1: <?php
2:
3: namespace PHPixie\BundleFramework;
4:
5: abstract class Builder extends \PHPixie\Framework\Builder
6: {
7: /**
8: * Framework configuration
9: * @return Configuration
10: */
11: public function configuration()
12: {
13: return $this->instance('configuration');
14: }
15:
16: /**
17: * Bundle registry
18: * @return Bundles
19: */
20: public function bundles()
21: {
22: return $this->instance('bundles');
23: }
24:
25: /**
26: * Assets
27: * @return Assets
28: */
29: public function assets()
30: {
31: return parent::assets();
32: }
33:
34: /**
35: * Framework components
36: * @return Components
37: */
38: public function components()
39: {
40: return parent::components();
41: }
42:
43: /**
44: * Framework components
45: * @return Components
46: */
47: protected function buildComponents()
48: {
49: return new Components($this);
50: }
51:
52: /**
53: * @return Assets
54: */
55: protected function buildAssets()
56: {
57: return new Assets(
58: $this->components(),
59: $this->getRootDirectory()
60: );
61: }
62:
63: /**
64: * @return Configuration
65: */
66: protected function buildConfiguration()
67: {
68: return new Configuration($this);
69: }
70:
71: /**
72: * Build project bundles registry
73: * @return Bundles
74: */
75: abstract protected function buildBundles();
76:
77: /**
78: * Project root directory
79: * @return string
80: */
81: abstract protected function getRootDirectory();
82: }