protected function getItemsByCompositeExpression(CompositeExpression $expression = null, QueryBuilder $queryBuilder = null) : array
    {
        if (!$queryBuilder instanceof QueryBuilder) {
            $queryBuilder = $this->getQueryBuilder();
        }

        $queryBuilder->select('*')->from($this->table);
        if (isset($expression)) {
            $queryBuilder->where($expression);
        }

        $indexQueueItemRecords = $queryBuilder->execute()->fetchAll();
        return $this->getIndexQueueItemObjectsFromRecords($indexQueueItemRecords);
    }
protected function getItemsByCompositeExpression(CompositeExpression $expression = null, QueryBuilder $queryBuilder = null) : array
    {
        if (!$queryBuilder instanceof QueryBuilder) {
            $queryBuilder = $this->getQueryBuilder();
        }

        $queryBuilder->select('*')->from($this->table);
        if (isset($expression)) {
            $queryBuilder->where($expression);
        }

        $indexQueueItemRecords = $queryBuilder->execute()->fetchAll();
        return $this->getIndexQueueItemObjectsFromRecords($indexQueueItemRecords);
    }
protected function getItemsByCompositeExpression ( CompositeExpression $ expression = null , QueryBuilder $ queryBuilder = null ) : array { if ( ! $ queryBuilder instanceof QueryBuilder ) { $ queryBuilder = $ this -> getQueryBuilder ( ) ; } $ queryBuilder -> select ( '*' ) -> from ( $ this -> table ) ; if ( isset ( $ expression ) ) { $ queryBuilder -> where ( $ expression ) ; } $ indexQueueItemRecords = $ queryBuilder -> execute ( ) -> fetchAll ( ) ; return $ this -> getIndexQueueItemObjectsFromRecords ( $ indexQueueItemRecords ) ; }
Returns a collection of items by CompositeExpression.
D

@param CompositeExpression|null $expression Optional expression to filter records.
@param QueryBuilder|null $queryBuilder QueryBuilder to use
@return array
Returns a collection of items by CompositeExpression . D