src/Charcoal/Queue/AbstractQueueManager.php
public function loadQueueItems()
    {
        $loader = new CollectionLoader([
            'logger'  => $this->logger,
            'factory' => $this->queueItemFactory(),
        ]);
        $loader->setModel($this->queueItemProto());
        $loader->addFilter([
            'property' => 'processed',
            'value'    => 0,
        ]);
        $loader->addFilter([
             'property' => 'processing_date',
             'operator' => '<',
             'value'    => date('Y-m-d H:i:s'),
        ]);

        $queueId = $this->queueId();
        if ($queueId) {
            $loader->addFilter([
                'property' => 'queue_id',
                'value'    => $queueId,
            ]);
        }

        $loader->addOrder([
            'property' => 'queued_date',
            'mode'     => 'asc',
        ]);

        if ($this->limit > 0) {
            $loader->setNumPerPage($this->limit);
            $loader->setPage(0);
        }

        $queued = $loader->load();

        return $queued;
    }
public function loadQueueItems()
    {
        $loader = new CollectionLoader([
            'logger'  => $this->logger,
            'factory' => $this->queueItemFactory(),
        ]);
        $loader->setModel($this->queueItemProto());
        $loader->addFilter([
            'property' => 'processed',
            'value'    => 0,
        ]);
        $loader->addFilter([
             'property' => 'processing_date',
             'operator' => '<',
             'value'    => date('Y-m-d H:i:s'),
        ]);

        $queueId = $this->queueId();
        if ($queueId) {
            $loader->addFilter([
                'property' => 'queue_id',
                'value'    => $queueId,
            ]);
        }

        $loader->addOrder([
            'property' => 'queued_date',
            'mode'     => 'asc',
        ]);

        if ($this->limit > 0) {
            $loader->setNumPerPage($this->limit);
            $loader->setPage(0);
        }

        $queued = $loader->load();

        return $queued;
    }
public function loadQueueItems ( ) { $ loader = new CollectionLoader ( [ 'logger' => $ this -> logger , 'factory' => $ this -> queueItemFactory ( ) , ] ) ; $ loader -> setModel ( $ this -> queueItemProto ( ) ) ; $ loader -> addFilter ( [ 'property' => 'processed' , 'value' => 0 , ] ) ; $ loader -> addFilter ( [ 'property' => 'processing_date' , 'operator' => '<' , 'value' => date ( 'Y-m-d H:i:s' ) , ] ) ; $ queueId = $ this -> queueId ( ) ; if ( $ queueId ) { $ loader -> addFilter ( [ 'property' => 'queue_id' , 'value' => $ queueId , ] ) ; } $ loader -> addOrder ( [ 'property' => 'queued_date' , 'mode' => 'asc' , ] ) ; if ( $ this -> limit > 0 ) { $ loader -> setNumPerPage ( $ this -> limit ) ; $ loader -> setPage ( 0 ) ; } $ queued = $ loader -> load ( ) ; return $ queued ; }
Retrieve the items of the current queue.

@return \Charcoal\Model\Collection|array
Retrieve the items of the current queue .