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