diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2012-08-01 20:24:03 +0000 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2012-08-01 20:24:03 +0000 |
commit | 104ff522c43fabc7c284fc38a46d17c16fe114d1 (patch) | |
tree | 5d1369301bef4bb198172a5ff167006a3d3c3d0a /poc/poc02-compiling-cake/src/php-weave/cakephp_weaver.class.php | |
parent | f435a514cd0597108cec95b5febdc105b0e16302 (diff) | |
download | 2012-php-weave-104ff522c43fabc7c284fc38a46d17c16fe114d1.tar.gz 2012-php-weave-104ff522c43fabc7c284fc38a46d17c16fe114d1.tar.bz2 2012-php-weave-104ff522c43fabc7c284fc38a46d17c16fe114d1.zip |
Ecriure d'un squelette de l'outil de compilation. Une première instance sera implémentée pour le framework CakePHP.
Pour l'instant les méthodes abstraites sont des bouchons qui ne permettent même pas de couvrir tout le code de la classe abstraite.
git-svn-id: file:///var/svn/2012-php-weave/trunk@5 d972a294-176a-4cf9-8ea1-fcd5b0c30f5c
Diffstat (limited to 'poc/poc02-compiling-cake/src/php-weave/cakephp_weaver.class.php')
-rw-r--r-- | poc/poc02-compiling-cake/src/php-weave/cakephp_weaver.class.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/poc/poc02-compiling-cake/src/php-weave/cakephp_weaver.class.php b/poc/poc02-compiling-cake/src/php-weave/cakephp_weaver.class.php new file mode 100644 index 0000000..cc25641 --- /dev/null +++ b/poc/poc02-compiling-cake/src/php-weave/cakephp_weaver.class.php @@ -0,0 +1,49 @@ +<?php +require_once 'abstract_weaver.class.php'; + +class CakePHPWeaver extends AbstractWeaver { + public function detectFramework($sourcetree_rootpath) { + + } + + public function parseFrameworkConfig($fw_props) { + + } + + public function parseFrameworkCode($fw_props, $fw_conf, $cache_path) { + + } + + public function parseApplicationCode($fw_props, $fw_conf, $fw_extra, $cache_path) { + + } + + public function computePageList($fw_props, $fw_conf, $fw_extra, $app_extra) { + return array( + 'page1' => array(), + 'page2' => array(), + ); + } + + public function outputMappingFile($app_pages, $result_path) { + + } + + public function makePageFullAST($page, $page_props, $fw_props, $fw_conf, $fw_extra, $app_extra, $cache_path) { + + } + + public function analysePageAST($page_full_ast, $page, $page_props, $fw_props, $fw_conf, $fw_extra, $app_extra, $cache_path) { + + } + + public function throwDeadCode(&$page_annotated_ast) { + + } + + public function weaveCode($page_annotated_ast) { + return array(new PHPParser_Node_Stmt_Echo(array(new PHPParser_Node_Scalar_String("Hello World\n")))); + } + +} +?> |