concrete/src/File/Image/Thumbnail/AtomicThumbnailStream.php
public function getIterator()
    {
        $db = $this->manager->connection();
        // Make sure we have the proper columns before doing anything with SQL
        if (!$this->lockColumnsExist($db)) {
            return;
        }

        $qb = $db->createQueryBuilder();
        $nextQuery = $this->getNextQuery($qb);
        $try = 10;

        while ($next = $this->next($nextQuery)) {
            unset($next[$this->lockColumn]);
            unset($next[$this->lockTimeoutColumn]);
            if (!$this->reserveNext($next, $db)) {
                if ($try--) {
                    // Avoid infinite loop
                    break;
                }

                // We were unable to reserve this properly, lets try the next item instead.
                continue;
            }

            yield $next;
        }
    }
public function getIterator()
    {
        $db = $this->manager->connection();
        // Make sure we have the proper columns before doing anything with SQL
        if (!$this->lockColumnsExist($db)) {
            return;
        }

        $qb = $db->createQueryBuilder();
        $nextQuery = $this->getNextQuery($qb);
        $try = 10;

        while ($next = $this->next($nextQuery)) {
            unset($next[$this->lockColumn]);
            unset($next[$this->lockTimeoutColumn]);
            if (!$this->reserveNext($next, $db)) {
                if ($try--) {
                    // Avoid infinite loop
                    break;
                }

                // We were unable to reserve this properly, lets try the next item instead.
                continue;
            }

            yield $next;
        }
    }
public function getIterator ( ) { $ db = $ this -> manager -> connection ( ) ; // Make sure we have the proper columns before doing anything with SQL if ( ! $ this -> lockColumnsExist ( $ db ) ) { return ; } $ qb = $ db -> createQueryBuilder ( ) ; $ nextQuery = $ this -> getNextQuery ( $ qb ) ; $ try = 10 ; while ( $ next = $ this -> next ( $ nextQuery ) ) { unset ( $ next [ $ this -> lockColumn ] ) ; unset ( $ next [ $ this -> lockTimeoutColumn ] ) ; if ( ! $ this -> reserveNext ( $ next , $ db ) ) { if ( $ try -- ) { // Avoid infinite loop break ; } // We were unable to reserve this properly, lets try the next item instead. continue ; } yield $ next ; } }
Get an iterator that outputs locked thumbnail rows
@return \Generator|void
Get an iterator that outputs locked thumbnail rows