public
Description: A lightweight MVC framework on top of Grok-PHP
Homepage: http://chippino.googlecode.com
Clone URL: git://github.com/Jakobo/chippino.git
adaptations to chippino to support new grok model

Signed-off-by: Jakob Heuser <jakob@felocity.org>
Jakobo (author)
Wed Jul 02 13:43:09 -0700 2008
commit  06763113b720075f892460c584a5a8255d3f2379
tree    cbb7c007f556594ab9ef67d92f19cbc85046f847
parent  f8a2a0ef9172c6758604bb3117c1f2a3f4526add
...
33
34
35
36
 
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
...
145
146
147
148
149
150
151
...
180
181
182
183
 
184
185
186
...
33
34
35
 
36
37
38
39
40
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
43
44
...
100
101
102
 
103
104
105
...
134
135
136
 
137
138
139
140
0
@@ -33,57 +33,12 @@ function chipi($file = NULL, $namespace = NULL) {
0
 function chippino_config() {
0
     static $chip;
0
     if (!isset($chip)) {
0
- $chip = new Chippino_Container();
0
+ $chip = new Grok_Container();
0
     }
0
     return $chip;
0
 }
0
 
0
 /**
0
- * Underlying container class of Chippino, bringing Grok with it.
0
- *
0
- * Not recommended to use this directly.
0
- * Keeping the container class separate from Grok allows us to ensure that internal variables don't
0
- * collide with the variables used in writing to a Grok in an include file.
0
- * The Chippino Container adds iteration functions.
0
- **/
0
-class Chippino_Container extends Grok_Container implements Iterator {
0
- /**
0
- * @see http://www.php.net/manual/en/language.oop5.iterations.php
0
- **/
0
- public function current() {
0
- return current($this->__data);
0
- }
0
-
0
- /**
0
- * @see http://www.php.net/manual/en/language.oop5.iterations.php
0
- **/
0
- public function key() {
0
- return key($this->__data);
0
- }
0
-
0
- /**
0
- * @see http://www.php.net/manual/en/language.oop5.iterations.php
0
- **/
0
- public function next() {
0
- return next($this->__data);
0
- }
0
-
0
- /**
0
- * @see http://www.php.net/manual/en/language.oop5.iterations.php
0
- **/
0
- public function valid() {
0
- return ($this->current() !== false);
0
- }
0
-
0
- /**
0
- * @see http://www.php.net/manual/en/language.oop5.iterations.php
0
- **/
0
- public function rewind() {
0
- reset($this->__data);
0
- }
0
-}
0
-
0
-/**
0
  * Here is the actual Grok Class. Enjoy!
0
  **/
0
 class Chippino_Dispatcher {
0
@@ -145,7 +100,6 @@ class Chippino_Dispatcher {
0
       $this->getSingleton()
0
     ));
0
     
0
- $grok->import($input);
0
         return $grok->dispatch($this->getFilePath());
0
     }
0
 }
0
@@ -180,7 +134,7 @@ class Chippino_Factory {
0
             $chips[$key] = grok($file);
0
         }
0
         
0
- $chips[$key]->import($input);
0
+ $chips[$key]->__construct($input);
0
         
0
         return $chips[$key];
0
     }
...
37
38
39
40
 
41
...
37
38
39
 
40
41
0
@@ -37,5 +37,5 @@ while (FALSE !== ($file = readdir($handle))) {
0
 }
0
 
0
 // wrap into a Chippino_Container
0
-$this->config_results = new Chippino_Container($config);
0
+$this->config_results = new Grok_Container($config);
0
 return $this->config_results;
...
11
12
13
14
 
15
16
17
...
11
12
13
 
14
15
16
17
0
@@ -11,7 +11,7 @@
0
  **/
0
 
0
 $output = array();
0
-foreach ($this->export() as $key => $params) {
0
+foreach ($this as $key => $params) {
0
     if (!is_array($params)) {
0
         $params = array('as' => $params);
0
     }

Comments

    No one has commented yet.