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