protected function copyQueue(\SplPriorityQueue $queue)
    {
        $this->items = [];

        foreach ($queue as $item) {
            $this->items[] = $item;
        }
    }
protected function copyQueue(\SplPriorityQueue $queue)
    {
        $this->items = [];

        foreach ($queue as $item) {
            $this->items[] = $item;
        }
    }
protected function copyQueue ( \ SplPriorityQueue $ queue ) { $ this -> items = [ ] ; foreach ( $ queue as $ item ) { $ this -> items [ ] = $ item ; } }
Copy queue items.

@param \SplPriorityQueue $queue
@return void
Copy queue items .