setTags() public method

Sets the route tags.
public setTags ( array $tags )
$tags array
Example #1
0
 /**
  * Builds a Route instance based on the given route config.
  *
  * @param ConfigObject $routeConfig A config object containing route parameters.
  *
  * @return Route
  */
 public function processRoute(ConfigObject $routeConfig)
 {
     // base route
     $callback = $this->isString($routeConfig->Callback) ? $routeConfig->Callback : $routeConfig->Callback->toArray();
     $route = new Route($routeConfig->Path, $callback);
     // route options
     if (($options = $routeConfig->get('Options', false)) !== false) {
         $route->setOptions($options->toArray());
     }
     // host
     if (($host = $routeConfig->get('Host', false)) !== false) {
         $route->setHost($host);
     }
     // schemes
     if (($schemes = $routeConfig->get('Schemes', false)) !== false) {
         $route->setSchemes($schemes);
     }
     // methods
     if (($methods = $routeConfig->get('Methods', false)) !== false) {
         $route->setMethods($methods->toArray());
     }
     // tags
     if (($tags = $routeConfig->get('Tags', false)) !== false) {
         $route->setTags($tags->toArray());
     }
     return $route;
 }