public function setContext($context = null)
    {
        if ($context === null) {
            return $this;
        }
        if (is_array($context)) {
            $context = new ArrayWrapper($context);
        }
        if (! is_object($context) || ! $context instanceof WrapperInterface) {
            throw new \InvalidArgumentException(
                'Validator context must be either an array or an instance
                of Sirius\Validator\DataWrapper\WrapperInterface'
            );
        }
        $this->context = $context;

        return $this;
    }