<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\QuickRun\Crawl; class ArrayQueue implements BaseQueue { private $data = array(); function prepend($Np3Ob, $w6bW5 = array(), $gZ39D = null) { array_unshift($this->data, array('id' => $gZ39D, 'handler' => $Np3Ob, 'param' => $w6bW5)); } function append($Np3Ob, $w6bW5 = array(), $gZ39D = null) { array_push($this->data, array('id' => $gZ39D, 'handler' => $Np3Ob, 'param' => $w6bW5)); } function exists($gZ39D) { foreach ($this->data as $YaV4m) { if ($YaV4m['id'] == $gZ39D) { return true; } } return false; } function size() { return count($this->data); } function poll() { return array_shift($this->data); } }