Author: Nate Brunette (n@tebru.net)
Inheritance: implements Tebru\Dynamo\Annotation\DynamoAnnotation
 /**
  * Set queries if annotation exists, otherwise just use request uri queries
  *
  * @param HttpRequest $requestAnnotation
  */
 private function setQueries(HttpRequest $requestAnnotation)
 {
     $queries = $requestAnnotation->getQueries();
     if ($this->annotations->exists(Query::NAME)) {
         /** @var Query $queryAnnotation */
         foreach ($this->annotations->get(Query::NAME) as $queryAnnotation) {
             $queries[$queryAnnotation->getRequestKey()] = $queryAnnotation->getVariable();
         }
     }
     $this->methodBodyBuilder->setQueries($queries);
 }
Esempio n. 2
0
 /**
  * @param Method $method
  * @param HttpRequest $annotation
  * @return null
  */
 public function handle(Method $method, $annotation)
 {
     $method->setType($annotation->getType());
     $method->setPath($annotation->getPath());
     $method->addQueries($annotation->getQueries());
 }