/** * Removes all invalid iterators from the top of the stack. * @return void */ private function discardInvalid() { while ($this->valid() && !$this->stack->last()->valid()) { $this->pop(); } }
public function search($centerX, $centerY, $width = 1.0, $height = 1.0) { $searchBoundingBox = new Vector(); $searchBoundingBox->allocate(4); $searchBoundingBox->insert(self::BB_CENTER_X, $centerX); $searchBoundingBox->insert(self::BB_CENTER_Y, $centerY); $searchBoundingBox->insert(self::BB_WIDTH, $width); $searchBoundingBox->insert(self::BB_HEIGHT, $height); return $this->_search($searchBoundingBox, $this->boundingBox); }
global $a; $a = null; }], SPL_DLL => [function ($n) { global $a; $a = new SplDoublyLinkedList(); for (; $n--; $a[] = rand()) { } }, function ($i) { global $a; $a->pop(); }, function () { global $a; $a = null; }], VECTOR => [function ($n) { global $a; $a = new Vector(range(1, $n)); }, function ($i) { global $a; $a->pop(); }, function () { global $a; $a = null; }], DEQUE => [function ($n) { global $a; $a = new Deque(range(1, $n)); }, function ($i) { global $a; $a->pop(); }, function () { global $a; $a = null;