Exemplo n.º 1
0
 /**
  * Creates a array of data generated by iterate over prototype properties
  * @param Prototype $prototype
  * @return array
  */
 public static function data(Prototype $prototype)
 {
     $ret = array();
     foreach ($prototype->properties as $key => $value) {
         $ret[$key] = $prototype->offsetGet($key);
     }
     return $ret;
 }
Exemplo n.º 2
0
 public function testUncallablePropertyInvoked()
 {
     $this->setExpectedException(BadMethodCallException::class);
     $obj = new Prototype();
     $obj->a = 1;
     $obj->a();
 }