If added function will be called before the function.
The function should be of type : f(instance, &arguments) => void
@param $type
@param $name
@param callable $function
162448
public function addFunctionPreCallFunction($type, $name, callable $function)
    {
        $this->appendToArrayOrCallForEachAlias($type, function() use ($type, $name, $function){
            $this->fnPreCallFunctions[$type][$name][] = $function;
        }, function($target) use ( $function, $name){
            $this->addFunctionPreCallFunction($target, $name, $function);
        });


    }
181211
static
	public void putFunction(String name, Function function){
		FunctionRegistry.functions.put(Objects.requireNonNull(name), function);
	}
532178
static
	public void putFunction(String name, Class<? extends Function> functionClazz){
		FunctionRegistry.functionClazzes.put(Objects.requireNonNull(name), checkClass(functionClazz));
	}
110043
public function addFunction($name, $function)
    {
        if ($this->initialized) {
            throw new RuntimeException(sprintf('Unable to add function "%s" as they have already been initialized.', $name));
        }

        $this->functions[$name] = $function;
    }
279877
public function supports(string $name, string $type): bool
    {
        switch ($type) {
            case DSL::TYPE_QUERY:
                return \in_array($name, $this->queries, true);
            case DSL::TYPE_AGGREGATION:
                return \in_array($name, $this->aggregations, true);
            case DSL::TYPE_SUGGEST:
                return \in_array($name, $this->suggesters, true);
        }

        // disables version check in Facade for custom DSL objects
        return true;
    }
938767
public function addTime($name, $type = self::USER_START) {
        if ($this->_enabled == true) {
            switch ($type) {
                case self::USER_START:
                    $this->_timeUser[$name] = 0;
                    $this->_timeUser[$name] = microtime(true);
                    break;

                case self::USER_END:
                    $this->_timeUser[$name] = round((microtime(true) - $this->_timeUser[$name]) * 1000, 4);
                    break;
            }
        }
    }
153242
protected function _postback($name, &$default, $type = NULL)
    {
        if( isset($this->postback['bool']) && $this->postback['bool'] === true )
        {
            $method = ! empty($this->method) ? $this->method : $this->postback['type'];
    
            $this->postback = [];

            if( $type === 'checkbox' || $type === 'radio' )
            {
                if( $method::$name() === $default )
                {
                    $this->checked();
                }    
            }
            else
            {
                $default = Singleton::class('ZN\Validation\Data')->postBack($name, $method) ?: $default;
            }   
        }
    }
272002
public function AddFunction(
        \Peg\Lib\Definitions\Element\FunctionElement $function,
        $header,
        $namespace="\\"
    )
    {
        $this->AddHeader($header);

        $this->headers[$header]->AddFunction($function, $namespace);
    }
279233
public function onAddedToType(TypeInterface &$type)
    {
        parent::onAddedToType($type);

        $type->addTrait(AdditionalPropertiesInterface::class, AdditionalPropertiesInterfaceImplementation::class)->protectFields($this->getName());
    }
576557
public function isAdded($type, $name) {
        $widget = $this->getWidgetBoxManager()->findPublishedByTypeAndName($type, $name);
        return $widget;
    }
78029
function (name, func)
        {
            if (typeof(ModalDialog.events) == 'undefined') {
                ModalDialog.events = [];
            }
    
            ModalDialog.events.push([name, func]);
        }
279715
public function addListener($name, callable $callback) {
        if(!array_key_exists($name, $this->registered_events)) {
            $this->registered_events[$name] = [];
        }

        $this->registered_events[$name][] = $callback;
    }
429570
public static function remove($type, $name)
    {
        if (isset(self::$data[$type]['header'][$name])) {
            unset(self::$data[$type]['header'][$name]);

            return true;
        } elseif (isset(self::$data[$type]['footer'][$name])) {
            unset(self::$data[$type]['footer'][$name]);

            return true;
        }

        return false;
    }
426417
def add_function(self, function):
        
        function = self.build_function(function)
        if function.name in self.functions:
            raise FunctionAlreadyRegistered(function.name)
        self.functions[function.name] = function
787946
public function requestField(string $type, string $name): void
    {
        $this->fields[$type][] = $name;
        $this->updateUriQuery();
    }
1081640
public function addColumn( $table, $name, $type )
    {
        return $this->handler->addColumn( $table, $name, $type );
    }
971081
private function checkCallbackName(&$name)
    {
        if ( ! is_string($name)) {
            $type = gettype($name);

            throw new Exceptions\InvalidTypeException(
                "The callback name value must be a string, $type given."
            );
        }

        $name = strtolower(trim($name));
    }