1<?php
2namespace DALMP;
3
4/**
5 * Queue
6 *
7 * @author Nicolas Embriz <nbari@dalmp.com>
8 * @package DALMP
9 * @license BSD License
10 * @version 3.0.3
11 */
12class Queue
13{
14    /**
15     * QueueInterface instance
16     *
17     * @var QueueInterface
18     * @access private
19     */
20    private $cache_object;
21
22    public function __construct(Queue\QueueInterface $object)
23    {
24        $this->cache_object = $object;
25    }
26
27    public function __call($method, $args)
28    {
29        if (!method_exists($this->cache_object, $method)) {
30            throw new \Exception("Undefined method {$method}");
31        }
32
33        return call_user_func_array(array($this->cache_object, $method), $args);
34    }
35
36}
37