Ejemplo n.º 1
0
 /** I'm just a annotation without something useful */
 function testNoContent()
 {
     $arr = getReflection(__METHOD__)->getAnnotations();
     $this->assertEquals($arr->toCache(), array());
     $raw = getReflection(__METHOD__)->getDocComment();
     Notoj::parseDocComment($raw, $isCached);
     $this->assertTrue($isCached);
 }
Ejemplo n.º 2
0
 protected function __construct(TBase $object)
 {
     if (empty($object->annotations)) {
         $object->annotations = Notoj::parseDocComment($object->GetPHPDoc());
     }
     $this->object = $object;
     $this->annotations = $object->annotations;
     $this->annotations->setObject($this);
 }
Ejemplo n.º 3
0
 public function defineProperty($annotation, $name)
 {
     $ann = Notoj::parseDocComment($annotation);
     $name = $name[0] == '$' ? $name : '$' . $name;
     $prop = new \crodas\ClassInfo\Definition\TProperty($name);
     $prop = \Notoj\Object\Base::create($prop, NULL);
     $this->properties[] = (new Property($this, $prop, true))->setParent($this);
 }
Ejemplo n.º 4
0
 protected function __construct(TBase $object, $localCache)
 {
     $this->object = $object;
     $this->annotations = Notoj::parseDocComment($object->GetPHPDoc(), $foo, $localCache);
     $this->annotations->setObject($this);
 }