Ejemplo n.º 1
0
 public function serializeAnnArgs(Annotation $ann)
 {
     $args = [];
     foreach ($ann->getArgs() as $arg) {
         if ($arg instanceof Annotation) {
             $arg = $this->serializeAnnArgs($arg);
         }
         $args[] = $arg;
     }
     return $args;
 }
Ejemplo n.º 2
0
 protected function getAnnotationArgs(\Notoj\Annotation\Annotation $annotation)
 {
     $args = $annotation->getArgs();
     if (empty($args[0])) {
         $args[0] = array();
     }
     if (empty($args[1])) {
         $args[1] = NULL;
     }
     if (is_string($args[0])) {
         $args[1] = $args[0];
         $args[0] = array();
     }
     return $args;
 }