Fire/Sql/Collection.php
public function find($filter = null)
    {
        if (is_string($filter)) {
            json_decode($filter);
            $isJson = (json_last_error() === JSON_ERROR_NONE) ? true :false;
            if ($isJson) {
                $filter = new Filter($filter);
                return $this->_getObjectsByFilter($filter);
            } else {
                return $this->_getObject($filter);
            }
        } else if (is_object($filter) && $filter instanceof Filter) {
            return $this->_getObjectsByFilter($filter);
        }
        return [];
    }
public function find($filter = null)
    {
        if (is_string($filter)) {
            json_decode($filter);
            $isJson = (json_last_error() === JSON_ERROR_NONE) ? true :false;
            if ($isJson) {
                $filter = new Filter($filter);
                return $this->_getObjectsByFilter($filter);
            } else {
                return $this->_getObject($filter);
            }
        } else if (is_object($filter) && $filter instanceof Filter) {
            return $this->_getObjectsByFilter($filter);
        }
        return [];
    }
public function find ( $ filter = null ) { if ( is_string ( $ filter ) ) { json_decode ( $ filter ) ; $ isJson = ( json_last_error ( ) === JSON_ERROR_NONE ) ? true : false ; if ( $ isJson ) { $ filter = new Filter ( $ filter ) ; return $ this -> _getObjectsByFilter ( $ filter ) ; } else { return $ this -> _getObject ( $ filter ) ; } } else if ( is_object ( $ filter ) && $ filter instanceof Filter ) { return $ this -> _getObjectsByFilter ( $ filter ) ; } return [ ] ; }
Returns a collection of objects that match the filter criteria
@param string|null|Fire\Sql\Filter $filter
@return void
Returns a collection of objects that match the filter criteria