PhalconRest\Mvc\Controllers\CrudResourceController::getFindData PHP Method

getFindData() protected method

protected getFindData ( $id )
    protected function getFindData($id)
    {
        $phqlBuilder = $this->phqlQueryParser->fromQuery($this->query, $this->getResource());
        $phqlBuilder->andWhere('[' . $this->getResource()->getModel() . '].' . $this->getModelPrimaryKey() . ' = :id:', ['id' => $id])->limit(1);
        $this->modifyReadQuery($phqlBuilder);
        $this->modifyFindQuery($phqlBuilder, $id);
        $results = $phqlBuilder->getQuery()->execute();
        return count($results) >= 1 ? $results->getFirst() : null;
    }