Executes the given event handlers. Every event handler will
be initialized and executed.

@access protected
@param string $type
@param string $name
@param mixed $value
@return mixed
771747
protected function executeItems($type, $name, $value = null)
    {
        if (!isset($this->handlers[$type][$name])) {
            return $value;
        }
        
        $request = $this->framework->getRequest();

        foreach ($this->filterHandlers($type, $name, $request) as $handlerName) {
            $handler = $this->framework->getInstance($handlerName);
                
            $response = $this->framework->getResponse();
            $response->setData('_executedType', $type);
            $response->setData('_executedName', $name);
                
            // Execute the handler
            $handlerResult = $handler->execute(
                $this->framework, 
                $this->framework->getRequest(), 
                $response,
                $value
            );
                
            // Save the handler result to the variable if this is an filter handler
            if ($type === self::FILTER) {
                $value = $handlerResult;
            }
        }
        
        // Return the value if this is an filter handler
        if ($type === self::FILTER) {
            return $value;
        }
    }
67778
public static function checkType($name, $type, $value) {
    $given_type = self::getType($value);
    if ($given_type !== $type) {
      $value = $value instanceof Atom ? $value->toJson() : json_encode($value);
      throw new \UnexpectedValueException("`$value` should be a `$type` not `$given_type`. If you're decoding JSON, make sure you're using valid JSON.");
    }
  }
1045912
protected function _initValue($value = null, $type = self::T_TEXT)
    {
        switch ($type) {
            case self::T_TEXT:
                $this->rawValue = $value;
                break;
            case self::T_RAW:
                $this->value = $value;
                break;
        }
    }
345616
protected function validateType($value, $type, $name)
    {
        if (empty($type) || $type === 'mixed') {
            return;
        }

        if (isset($this->typeMap[$type])) {
            $test = 'is_' . $this->typeMap[$type];

            if (!call_user_func($test, $value)) {
                $givenType = gettype($value);

                throw new RuntimeException("Expected property '{$name}' to be a '{$type}'. '{$givenType}' given.");
            }

            return;
        }

        if (class_exists($type)) {
            if (!($value instanceof $type)) {
                $givenType = gettype($value);

                throw new RuntimeException("Expected property '{$name}' to be a '{$type}'. '{$givenType}' given.");
            }

            return;
        }

        throw new LogicException("Unrecognized type '{$type}' for property '{$name}'");
    }
1038986
public static function input($type, $name, $value = null, array $attributes = array())
    {
        if ($type === 'textarea') {
            $input = '<textarea{{attr}}>';

            if ($value !== null) {
                $input .= self::entities($value);
            }

            $input .= '</textarea>';
        } elseif (preg_match('#^(' . self::$alloweds . ')$#', $type)) {
            $input = '<input type="' . $type . '" value="';

            if ($value !== null) {
                $input .= self::entities($value);
            }

            $input .= '"{{attr}}' . self::$useXhtml . '>';
        } else {
            throw new Exception('Invalid type');
        }

        return self::setAttr($attributes, $input, $name, $type);
    }
575134
protected function bindValues($name, $type, $values)
    {
        if (!is_array($values)) {
            return $this->builder->createNamedParameter($values, $type);
        }

        foreach ($values as $key => $value) {
            $values[$key] = $this->bindValues($name, $type, $value);
        }

        return $values;
    }
1152634
public function bind($key, $value, $type = self::TYPE_DEFAULT)
    {
        // Check if locked
        if (isset($this->locked[$key])) {
            throw new \RuntimeException('Cannot override locked content "'. $key .'".');
        }

        // Check if value should be validated
        if (isset($this->validators[$key])) {
            $value = $this->validators[$key]->validate($value);
        }

        // Save key, type and value
        $this->keys[$key] = true;
        $this->types[$key] = $type;
        $this->raw[$key] = $value;
    }
25958
public function input(String $type = NULL, String $name = NULL, String $value = NULL, Array $attributes = []) : String
    {
        if( isset($this->settings['attr']['type']) )
        {
            $type = $this->settings['attr']['type'];

            unset($this->settings['attr']['type']);
        }

        $this->settings['attr'] = [];

        return $this->_input($name, $value, $attributes, $type);
    }
134479
protected static function execFilterQueue($value, array $queue, $type) {
        foreach($queue as $filter) {
            $value = self::executeValueMethod($value, $filter, $type, "filter");

            if($value === self::ERR_INVALID)
                return false;
        }
        return $value;
    }
1095850
protected function filterByTranslatableColumn($name, $type, $value)
    {
        $translation = $this->model->getTranslationModel();

        return $this->query->whereHas('translations', function ($query) use ($translation, $name, $type, $value) {
            return $query = $this->applyQueryElementByType($query, $translation->getTable(), $name, $type, $value);
        });
    }
163969
public function bind_value( string $name, $value, $data_type = false ) {
		$this->values_to_bind[ $name ] = array(
			'value'     => $value,
			'data_type' => $data_type,
		);
	}
926189
public function executeFilter($eventName, $value = null)
    {
        return $this->executeItems(self::FILTER, $eventName, $value);
    }
876867
public static function input(
        string $name, 
        string $type = "text", 
        string $value = null, 
        array $attributes = []
    ) : string 
    {
        $preAttributesInput = [
            "name" => $name,
            "type" => $type,
        ];
        if (!is_null($value)) {
            $preAttributesInput["value"] = $value;
        }
        $attributesInput = array_merge($preAttributesInput, $attributes);
        return self::tag("input", "", $attributesInput);
    }
308448
protected static function _method($name, $value, $input, $type)
    {
        if( empty($name) )
        {
            return $input;
        }

        # @value parametresi boş değilse 5.4.7[edited]
        if( $value !== NULL )
        {
            switch( $type )
            {
                case 'post'    : $_POST[$name]    = $value; break;
                case 'get'     : $_GET[$name]     = $value; break;
                case 'request' : $_REQUEST[$name] = $value; break;
                case 'env'     : $_ENV[$name]     = $value; break;
                default        : $_POST[$name]    = $value; break;
            }

            return true;
        }

        if( isset($input[$name]) )
        {
            if( is_scalar($input[$name]) )
            {
                if( Json::check($input[$name]) )
                {
                    return $input[$name];
                }
                else
                {
                    return htmlspecialchars($input[$name], ENT_QUOTES, "utf-8");
                }
            }
            elseif( is_array($input[$name]) )
            {
                return array_map('ZN\Security\Html::encode', $input[$name]);
            }

            return $input[$name];
        }

        return false;
    }
1178220
public static function run($value, string $type = null)
    {
        switch ($type) {
            case 'int':
                $regexp = self::compileRegexp(self::INT);
                break;
            case 'float':
                $regexp = self::compileRegexp(self::FLOAT);
                break;
            case 'text':
                $value = self::fixQuotes($value);
                $regexp = self::compileRegexp(self::CHARS_RUS . self::CHARS_ENG);
                break;
            default:
                $value = self::fixQuotes($value);
                $regexp = self::compileRegexp(
                    self::CHARS_RUS . self::CHARS_ENG . self::FLOAT .
                    '—~`@%[]/:<>;?&()_!$^-+=' . self::SUPER
                );
                break;
        }

        return preg_replace($regexp, '', $value);
    }
5746
public function bindValue($name, $value, $dataType = \PDO::PARAM_STR)
    {
        $this->binds[$name] = $value;
        return $this;
    }
363587
public function plainInput($type, $name, $value = null, $options = [])
    {
        return parent::input($type, $name, $value, $options);
    }