protected function find($id = null)
	{
		$query = $this->query();
		$query->where('id', $id);

		if (is_null($id) or is_null($model = $query->get_one()))
		{
			throw new \HttpNotFoundException();
		}

		return $model;
	}
protected function find($id = null)
	{
		$query = $this->query();
		$query->where('id', $id);

		if (is_null($id) or is_null($model = $query->get_one()))
		{
			throw new \HttpNotFoundException();
		}

		return $model;
	}
protected function find ( $ id = null ) { $ query = $ this -> query ( ) ; $ query -> where ( 'id' , $ id ) ; if ( is_null ( $ id ) or is_null ( $ model = $ query -> get_one ( ) ) ) { throw new \ HttpNotFoundException ( ) ; } return $ model ; }
Finds an entity of model

@param integer $id

@return Model
Finds an entity of model