src/Attribute/BaseSimple.php
public function searchFor($strPattern)
    {
        // Base implementation, do a simple search on given column.
        $strPattern = str_replace(array('*', '?'), array('%', '_'), $strPattern);
        $arrIds     = $this->connection->createQueryBuilder()
            ->select('id')
            ->from($this->getMetaModel()->getTableName())
            ->where($this->getColName() . ' LIKE :pattern')
            ->setParameter('pattern', $strPattern)
            ->execute()
            ->fetchAll(\PDO::FETCH_COLUMN, 'id');

        return $arrIds;
    }
public function searchFor($strPattern)
    {
        // Base implementation, do a simple search on given column.
        $strPattern = str_replace(array('*', '?'), array('%', '_'), $strPattern);
        $arrIds     = $this->connection->createQueryBuilder()
            ->select('id')
            ->from($this->getMetaModel()->getTableName())
            ->where($this->getColName() . ' LIKE :pattern')
            ->setParameter('pattern', $strPattern)
            ->execute()
            ->fetchAll(\PDO::FETCH_COLUMN, 'id');

        return $arrIds;
    }
public function searchFor ( $ strPattern ) { // Base implementation, do a simple search on given column. $ strPattern = str_replace ( array ( '*' , '?' ) , array ( '%' , '_' ) , $ strPattern ) ; $ arrIds = $ this -> connection -> createQueryBuilder ( ) -> select ( 'id' ) -> from ( $ this -> getMetaModel ( ) -> getTableName ( ) ) -> where ( $ this -> getColName ( ) . ' LIKE :pattern' ) -> setParameter ( 'pattern' , $ strPattern ) -> execute ( ) -> fetchAll ( \ PDO :: FETCH_COLUMN , 'id' ) ; return $ arrIds ; }
Search all items that match the given expression.

Base implementation, perform string matching search.
The standard wildcards * (many characters) and ? (a single character) are supported.

@param string $strPattern The text to search for. This may contain wildcards.

@return int[] the ids of matching items.
Search all items that match the given expression .