Queue.php 336 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Spider\Lib;
  3. use Dever;
  4. class Queue
  5. {
  6. public function __construct($method = false)
  7. {
  8. if ($method) {
  9. Dever::config('base')->queue = array('method' => $method);
  10. }
  11. Dever::import('queue');
  12. }
  13. public function push($project)
  14. {
  15. Dever::push($project);
  16. }
  17. public function pop()
  18. {
  19. return Dever::pop();
  20. }
  21. }