Source of file Data.php
Size: 0,813 Bytes - Last Modified: 2021-12-24T06:34:06+00:00
/var/www/docs.ssmods.com/process/src/code/widgets/Data/Data.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344 | <?php namespace Cleopas\Widgets\Data; use Cleopas\Widgets\Widget; class Data extends Widget { protected $data = array(); /** * @param $name * @param $arguments * @return $this */ public function __call($name, $arguments) { $this->data[$name] = $arguments[0]; return $this; } /** * @param $name * @param $value * @return $this */ public function __set($name, $value) { $this->data[$name] = $value; return $this; } public function __get($name) { if ($this->data[$name] instanceof \Closure) { return $this->data[$name] = call_user_func_array($this->data[$name], array($this)); } else { return $this->data[$name]; } } } |