Pheasant\Finder\Wizard::_findById PHP Méthode

_findById() private méthode

Find an object by primary key
private _findById ( $params )
    private function _findById($params)
    {
        if (count($params) > 1) {
            throw new \InvalidArgumentException("byId doesn't support composite keys");
        }
        $keys = array_keys($this->_schema->primary());
        return $this->_finder->find($this->_class, new Criteria("`{$keys[0]}`=?", $params[0]))->one();
    }