summaryrefslogtreecommitdiff
path: root/poc/poc02-compiling-cake/src/php-weave/cakephp_weaver.class.php
blob: cc2564126423bf615acc73478253af80e5b21176 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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"))));
	}

}
?>