public static function findQuery($query, $params)
    {
        $query = static::$_dataSource->prepare($query);
        $query->execute($params);
        $fetch = $query->fetchAll(\PDO::FETCH_ASSOC);

        $collection = array();
        foreach ($fetch as $unRes) {
            $object = new static();
            $object->hydrate($unRes);
            $collection[] = $object;
        }

        return $collection;
    }
public static function findQuery($query, $params)
    {
        $query = static::$_dataSource->prepare($query);
        $query->execute($params);
        $fetch = $query->fetchAll(\PDO::FETCH_ASSOC);

        $collection = array();
        foreach ($fetch as $unRes) {
            $object = new static();
            $object->hydrate($unRes);
            $collection[] = $object;
        }

        return $collection;
    }
public static function findQuery ( $ query , $ params ) { $ query = static :: $ _dataSource -> prepare ( $ query ) ; $ query -> execute ( $ params ) ; $ fetch = $ query -> fetchAll ( \ PDO :: FETCH_ASSOC ) ; $ collection = array ( ) ; foreach ( $ fetch as $ unRes ) { $ object = new static ( ) ; $ object -> hydrate ( $ unRes ) ; $ collection [ ] = $ object ; } return $ collection ; }
Return model array fetched from database with custom mysql query

@param $query
@param $params

@return static[]
@todo must return Collection
Return model array fetched from database with custom mysql query