Eloquent\Phony\Mock\Method\WrappedMagicMethod::__construct PHP Method

__construct() public method

Construct a new wrapped magic method.
public __construct ( string $name, ReflectionMethod $callMagicMethod, boolean $isUncallable, Eloquent\Phony\Mock\Handle\Handle $handle )
$name string The name.
$callMagicMethod ReflectionMethod The _callMagic() method.
$isUncallable boolean True if the underlying magic method is uncallable.
$handle Eloquent\Phony\Mock\Handle\Handle The handle.
    public function __construct($name, ReflectionMethod $callMagicMethod, $isUncallable, Handle $handle)
    {
        $this->name = $name;
        $this->callMagicMethod = $callMagicMethod;
        $this->isUncallable = $isUncallable;
        $this->handle = $handle;
        if ($callMagicMethod->isStatic()) {
            $this->mock = null;
            $callback = array($callMagicMethod->getDeclaringClass()->getName(), '__callStatic');
        } else {
            $this->mock = $handle->get();
            $callback = array($this->mock, '__call');
        }
        parent::__construct($callback, null);
    }