Lemon\RestBundle\Object\Registry::all PHP Method

all() public method

public all ( )
    public function all()
    {
        return $this->classes;
    }

Usage Example

 /**
  * @param Request $request
  * @return Response
  */
 public function indexAction(Request $request)
 {
     $format = $this->negotiator->getBestFormat($request->headers->get('Accept'));
     if ($format == 'html') {
         $format = 'json';
     }
     $data = array();
     foreach ($this->registry->all() as $definition) {
         $data[$definition->getName() . '_url'] = $this->router->generate('lemon_rest_list', array('resource' => $definition->getName()), RouterInterface::ABSOLUTE_URL);
     }
     $output = $this->serializer->serialize($data, $format);
     $response = new Response();
     $response->headers->set('Content-Type', $request->headers->get('Accept'));
     $response->setContent($output);
     return $response;
 }
All Usage Examples Of Lemon\RestBundle\Object\Registry::all