/**
  * Try create the controller api.
  *
  * @return array
  */
 protected function createApi()
 {
     $api = null;
     // get public methods from controller
     $methods = $this->reflection->getMethods(\ReflectionMethod::IS_PUBLIC);
     foreach ($methods as $method) {
         $mApi = $this->getMethodApi($method);
         if ($mApi) {
             $api[] = $mApi;
         }
     }
     return $api;
 }