/** 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); }
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); }
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); }
/** * {@inheritdoc} */ public function setCacheDir($cacheDir) { parent::setCacheDir($cacheDir); \Notoj\Notoj::enableCache($cacheDir . DIRECTORY_SEPARATOR . "_annotations.php"); }
protected function generateIfNeeded() { if ($this->devel || !is_file($this->loader)) { Notoj::enableCache($this->loader . ".tmp"); $watcher = new Watch($this->loader . ".lock"); if ($watcher->hasChanged()) { new Generate($this, $watcher); $this->generate = true; } } }
protected function __construct(TBase $object, $localCache) { $this->object = $object; $this->annotations = Notoj::parseDocComment($object->GetPHPDoc(), $foo, $localCache); $this->annotations->setObject($this); }