public function __construct(Annotation $ann, array $args, $server) { $this->server = $server; $this->ann = $ann; $this->args = $args; if ($ann->isMethod() || $ann->isClass()) { $this->is_loaded = class_exists($ann['class'], false); } else { $this->is_loaded = is_callable($ann['function']); } }
public function __construct(Collection $col, Annotation $prop) { $this->collection = $col; $this->annotation = $prop; if ($prop->has('Id')) { $this->type = '_id'; } foreach ($this->getCallback('Validate') as $val) { $this->getTypeFromAnnotation($val->annotation); } foreach ($this->getCallback('DefaultValue') as $val) { $this->getTypeFromAnnotation($val->annotation); } $this->isId = $this->annotation->has('Id'); }