Set the decorated translator

@param   TranslatorInterface $delegate The decorated translator
@return  TranslatorCache
@throws  \InvalidArgumentException If the delegate does not implement the TranslatorInterface
516277
public function setDelegate($delegate)
    {
        if (!$delegate instanceof TranslatorInterface) {
            throw new \InvalidArgumentException('Delegate: '.get_class($delegate).' does not implement TranslatorInterface');
        }

        return parent::setDelegate($delegate);
    }
884688
public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
        $operation = $this->getOperation($request);

        foreach ($operation->getParameters() as $parameter) {
            $name    = $parameter->getName();
            $request = $request->withAttribute(
                $name,
                $this->processorBuilder
                    ->build($this->getOperation($request)->getParameter($name)->getSchema())
                    ->hydrate($request->getAttribute($name))
            );
        }

        return $delegate->process($request);
    }
1177433
protected function _setTranslator($translator)
    {
        if (!(is_null($translator) || $translator instanceof StringTranslatorInterface)) {
            throw new InvalidArgumentException('Invalid translator');
        }

        $this->translator = $translator;

        return $this;
    }
555088
public function setForeign($foreign)
    {
        if (!is_string($foreign) && null !== $foreign) {
            throw new \InvalidArgumentException('The attribute foreign on the class Attribute has to be string or null (' . gettype($foreign) . ('object' === gettype($foreign) ? ' ' . get_class($foreign) : '') . ' given).');
        }

        $this->foreign = $foreign;

        return $this;
    }
921152
public function initialize($instance, ServiceLocatorInterface $serviceLocator)
    {
        if ($instance instanceof TranslatorAwareController) {
            $instance->setTranslator($serviceLocator->getServiceLocator()->get('translator'));
        }
    }
201146
public function setTranslator($translator = null)
    {
        if ((null === $translator) || ($translator instanceof Zend_Translate_Adapter)) {
            $this->_translator = $translator;
        } elseif ($translator instanceof Zend_Translate) {
            $this->_translator = $translator->getAdapter();
        } else {
            include_once 'Zend/Validate/Exception.php';
            throw new Zend_Validate_Exception('Invalid translator specified');
        }
        return $this;
    }
605736
public function setupRequirements(ContainerInterface $container)
    {
        $this->setTranslator($container->get('MvcTranslator'));
        $this->setInputFilterManager($container->get(InputFilterPluginManager::class));
    }
923599
public function setCache(?CacheInterface $cache)
    {
        if (!$cache) {
            $cache = new VoidCachePool();
        }
        $this->cache = $cache;

        return $this;
    }
631933
public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
        if (null === $this->routerMatch) {
            throw new \InvalidArgumentException('RouterMatch must be set before calling the proces method.');
        }
        return $this->runRouteHandler($request);
    }
241283
public function setLocale($locale)
    {
        if (!is_string($locale) || empty($locale)) {
            throw new \InvalidArgumentException('Locale must be an IETF language tag.');
        }

        // Set the Locale on Fixer that needs it
        foreach ($this->_rules as $rule) {
            if ($rule instanceof LocaleAwareFixerInterface) {
                $rule->setLocale($locale);
            }
        }

        $this->locale = $locale;
    }
474177
public function process(Request $request, RequestHandlerInterface $delegate): ResponseInterface
    {
        try {
            return $delegate->handle($request);
        } catch (\Throwable $t) {
            return $this->handleException($t, $request);
        }
    }
1201657
public function remove(TranslatorInterface $translator)
    {
        $hash = spl_object_hash($translator);

        unset($this->translators[$hash]);

        return $this;
    }
1080522
public function set($object = null)
    {
        if (null !== $object && !$object instanceof Language) {
            throw new General\InvalidArgumentTypeException('exception_only_language_objects_are_accepted');
        }

        $this->alLanguage = $object;

        return $this;
    }
1373558
public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
        $operation = $this->getOperation($request);

        foreach ($this->parameterAssembler->getRequestParameters($request, $operation) as $name => $value) {
            $request = $request->withAttribute($name, $value);
        }

        return $delegate->process($request);
    }
104927
public function setTranslatable(TranslatableInterface $translatable = null)
    {
        if ($translatable === $this->translatable) {
            return $this;
        }

        $previousTranslatable = $this->translatable;
        $this->translatable = $translatable;

        /** @var TranslationInterface $this */
        if (null !== $previousTranslatable) {
            $previousTranslatable->removeTranslation($this);
        }

        if (null !== $translatable) {
            $translatable->addTranslation($this);
        }

        return $this;
    }
599401
public function setProtocol($protocol) {

        if ( empty($protocol) || !in_array($protocol, $this->supported_protocols) ) throw new InvalidArgumentException('Invalid or unsupported RPC protocol');

        $this->protocol = $protocol;

        return $this;

    }
55488
public function setLang($lang)
    {
    	// Argument Validation
    	if (gettype($lang) != 'string')
        	throw new CAS_TypeMismatchException($lang, '$lang', 'string');

        phpCAS::traceBegin();
        $obj = new $lang();
        if (!($obj instanceof CAS_Languages_LanguageInterface)) {
            throw new CAS_InvalidArgumentException(
                '$className must implement the CAS_Languages_LanguageInterface'
            );
        }
        $this->_lang = $lang;
        phpCAS::traceEnd();
    }