コード例 #1
0
ファイル: Service.php プロジェクト: crodas/worker
 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']);
     }
 }
コード例 #2
0
ファイル: Property.php プロジェクト: agpmedia/activemongo2
 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');
 }