File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,22 +12,22 @@ class Layout extends Widget {
1212 /**
1313 * set the view to inject into the layout
1414 */
15- protected $ view ;
15+ protected $ __view ;
1616
1717 /**
1818 * assign a widget as the view to be injected
1919 * @param Widget $view The view
2020 */
2121 function setView ( callable $ view ){
22- $ this ->view = $ view ;
22+ $ this ->__view = $ view ;
2323 }
2424
2525 /**
2626 * get the view, mostly for internal use
2727 * @return Widget
2828 */
2929 function getView (){
30- return $ this ->view ;
30+ return $ this ->__view ;
3131 }
3232
3333 /**
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ trait WidgetTrait {
77 /**
88 * property to hold the data local to the widget, available via __get()
99 */
10- private $ internalDataMap = array ();
10+ private $ __internalDataMap = array ();
1111
1212 /**
1313 * make your widget callable
@@ -18,14 +18,14 @@ abstract function __invoke();
1818 * for docs, check \Chevron\Widgets\WidgetInterface
1919 */
2020 public function get ($ key ){
21- return isset ($ this ->internalDataMap [$ key ]) ? $ this ->internalDataMap [$ key ] : null ;
21+ return isset ($ this ->__internalDataMap [$ key ]) ? $ this ->__internalDataMap [$ key ] : null ;
2222 }
2323
2424 /**
2525 * for docs, check \Chevron\Widgets\WidgetInterface
2626 */
2727 public function set ($ key , $ value ){
28- $ this ->internalDataMap [$ key ] = $ value ;
28+ $ this ->__internalDataMap [$ key ] = $ value ;
2929 }
3030
3131 /**
@@ -43,7 +43,7 @@ public function setMany(array $internalDataMap){
4343 * @return bool
4444 */
4545 public function __isset ($ name ){
46- return array_key_exists ($ name , $ this ->internalDataMap );
46+ return array_key_exists ($ name , $ this ->__internalDataMap );
4747 }
4848
49- }
49+ }
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class Widget extends AbstractWidget {
1010 /**
1111 * The file that the widget will load
1212 */
13- protected $ file ;
13+ protected $ __file ;
1414
1515 /**
1616 * Set the file and data map for the Widget
@@ -40,10 +40,10 @@ function __toString(){
4040 * for docs, check \Chevron\Widgets\WidgetInterface
4141 */
4242 function render (){
43- if ( !file_exists ($ this ->file ) ){
44- throw new \RuntimeException ("Not a file: ' {$ this ->file }' " );
43+ if ( !file_exists ($ this ->__file ) ){
44+ throw new \RuntimeException ("Not a file: ' {$ this ->__file }' " );
4545 }
46- return require ($ this ->file );
46+ return require ($ this ->__file );
4747 }
4848
4949 /**
@@ -64,7 +64,7 @@ function __get($key){
6464 * change the base layout
6565 */
6666 protected function setFile ($ file ){
67- $ this ->file = $ file ;
67+ $ this ->__file = $ file ;
6868 }
6969
7070}
You can’t perform that action at this time.
0 commit comments