示例#1
0
 /**
  * {@inheritDoc}
  *
  * @param string $tag
  * @return Annotation
  */
 public function get($tag)
 {
     if ($this->exist($tag)) {
         return parent::get($tag);
     }
     return new Annotation();
 }
示例#2
0
 public function test__callDynamic()
 {
     $objects = new Objects();
     $objects[0] = new resources\foo();
     $objects[1] = new resources\foo();
     $objects->addMethod('getFoo', function () {
         return 'foo from object';
     });
     $this->assertSame('foo from object', $objects->getFoo());
 }