entity = $endpoint; } /** * @param string $url * @param string $http_method * @return IApiEndpoint */ public function getApiEndpointByUrlAndMethod($url, $http_method) { return $this->entity->Filter(array( array( 'name'=>'route', 'op' => '=', 'value'=> $url ), array( 'name'=>'http_method', 'op' => '=', 'value'=> $http_method )))->firstOrFail(); } /** * @param int $id * @return IEntity */ public function getById($id) { return $this->entity->find($id); } }