Checks that a particular handler hasn't already been registered

@param EventHandler $input
@throws RuntimeException
17320
private function checkUniqueHandler(EventHandler $input)
    {
        foreach ($this->handlers as $handler) {
            if ($handler === $input) {
                throw new RuntimeException();
            }
        }
    }
450933
public function setInput($input)
    {
        if (is_resource($input)) {
            $input = stream_get_contents($input);
        }
        if (is_string($input)) {
            $input = json_decode($input);
        }
        $this->input = $input;
    }
399092
public function call($name, $input)
	{
		$normalized_name = strtolower($name);

		if ( ! isset($this->handlers[$normalized_name]))
		{
			throw new UnexpectedValueException('No required handler: ' . $name, 1);
		}

		return $this->handlers[$normalized_name]($input);
	}
14451
protected function validateInput($input)
    {
        // check
        $keys = [
            'form',
            'elements',
        ];

        switch (gettype($input)) {
            case 'array':
                foreach ($keys as $key) {
                    if (array_key_exists($key, $input) === false) {
                        throw new \Exception(
                            'Input invalid! Please make sure that input array contains keys (form, elements).'
                        );
                    }
                }
                break;
        }

        return true;
    }
192644
private function checkAttributes($input)
    {
        if (!$this->hasValidStructure($input)) {
            $unknown = $this->checkValidStructure($input);

            $params = [];
            if (count($unknown) !== 0) {
                $params['attributes'] = $unknown;
            }
            $exception = $this->reportError($input, $params);

            throw $exception;
        }
    }
1370193
function(input) {
        var state = this.state;
        var eventType = input.eventType;

        var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);
        var isValid = this.attrTest(input);

        // on cancel input and we've recognized before, return STATE_CANCELLED
        if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {
            return state | STATE_CANCELLED;
        } else if (isRecognized || isValid) {
            if (eventType & INPUT_END) {
                return state | STATE_ENDED;
            } else if (!(state & STATE_BEGAN)) {
                return STATE_BEGAN;
            }
            return state | STATE_CHANGED;
        }
        return STATE_FAILED;
    }
199796
private static function isValid($input)
    {
        if (!is_array($input)) {
            return false;
        }
        foreach ($input as $value) {
            if (!is_scalar($value)) {
                return false;
            }
        }

        return true;
    }
377245
protected function validatePathsExist(InputInterface $input): void
    {
        if (! is_string($input->getArgument('source'))) {
            throw new Exception('Missing the source path');
        }
        if (! is_string($input->getArgument('target'))) {
            throw new Exception('Missing the target path');
        }
    }
579561
public static function checkCreateDateTime($input)
    {
        $dateObj = \DateTime::createFromFormat('Y-m-d\TH:i:s', $input);
        if($dateObj !== false && $input === $dateObj->format('Y-m-d\TH:i:s'))
            return $input;
        else
            return false;
    }
622096
protected function registerUser(array $input)
    {
        $this->dispatch(new RegisterUserJob(array_get($input, 'name'),
                                            array_get($input, 'email'),
                                            array_get($input, 'password')));
        $this->info(trans('authentication::user.console.created', $input));
    }
54904
public function delete(array $input)
    {
        if(isset($input[$this->id_field_name]) && ! empty($input[$this->id_field_name]))
        {
            try
            {
                $this->r->delete($input[$this->id_field_name]);
            }
            catch(ModelNotFoundException $e)
            {
                $this->errors = new MessageBag(array("model" => "Element does not exists."));
                throw new NotFoundException();
            }
            catch(PermissionException $e)
            {
                $this->errors = new MessageBag(array("model" => "Cannot delete this item, please check that the item is not already associated to any other element, in that case remove the association first."));
                throw new PermissionException();
            }
        }
        else
        {
            $this->errors = new MessageBag(array("model" => "Id not given"));
            throw new NotFoundException();
        }
    }
984039
private function _initialise(array $input = array())
	{
		foreach ($input as $key => $object)
		{
			if (!is_null($object))
			{
				$this->offsetSet($key, $object);
			}
		}

		$this->rewind();
	}
384901
public function unserialize($input)
    {
        // Unserialize the data, and inputs.
        list($this->data, $this->inputs) = unserialize($input);

        $this->filter = class_exists('Windwalker\\Filter\\InputFilter') ? new InputFilter() : new NullFilter();
    }
875089
public void process(InputStream input) throws IOException, ConverterException {
        while (0 != input.available()) {
            Tag tag = ParserUtils.parseTag(input);
            TagHandler handler = getHandler(tag);
            if (null == handler) {
                skipHandler.handle(tag, input);
            } else {
                handler.handle(tag, input);
            }
        }
    }
353758
protected function isUpdate($input)
    {
        return (isset($input[$this->id_field_name]) && ! empty($input[$this->id_field_name]) );
    }
1151786
protected function execute(InputInterface $input, OutputInterface $output)
    {
        try
        {
            if (method_exists($this, 'start'))
            {
                $this->start();
            }
            else
            {
                throw new \RuntimeException('Command is not set correctly.');
            }
        }
        catch (\Exception $e)
        {
            $this->error($e->getMessage());
        }
    }
182773
public static function registerHandlebarsExtension($source, $runtime = false)
    {
        if (!self::isRegistered($runtime)) {
            $extension = $runtime ? self::EXTN_RUNTIME : self::EXTN_HANDLEBARS;
            V8Js::registerExtension($extension, $source, [], false);
        }
    }