/** * Converts annotation into ZF2 route config item. * * @param AnnotationInterface $annotation * @return array */ protected function buildRouteFromAnnotation(AnnotationInterface $annotation) { return array('type' => $annotation->getType(), 'options' => array('route' => $annotation->getRoute(), 'defaults' => $annotation->getDefaults(), 'constraints' => $annotation->getConstraints()), 'may_terminate' => (bool) $annotation->getMayTerminate()); }
/** * Converts annotation into ZF2 route config item. * * @param AnnotationInterface $annotation * @return array */ protected function getRouteConfig(AnnotationInterface $annotation) { return array($annotation->getName() => array('type' => $annotation->getType(), 'options' => array('route' => $annotation->getRoute(), 'defaults' => $annotation->getDefaults(), 'constraints' => $annotation->getConstraints()), 'priority' => (int) $annotation->getPriority(), 'may_terminate' => (bool) $annotation->getMayTerminate(), 'child_routes' => array())); }