Call the extension named $name with $params.

@param string $name
@param array  $params (optional)

@return mixed
490603
public static function callExtension($name, array $params = [])
    {
        $extension = static::getExtension($name);

        // call_user_func_array seems to be slow
        switch (count($params)) {
            case 0:
                return call_user_func($extension);
            case 1:
                return call_user_func($extension, $params[0]);
            case 2:
                return call_user_func($extension, $params[0], $params[1]);
            case 3:
                return call_user_func($extension, $params[0], $params[1], $params[2]);
            case 4:
                return call_user_func($extension, $params[0], $params[1], $params[2], $params[3]);
            default:
                return call_user_func_array($extension, $params);
        }
    }
686272
public static function __callstatic($name, $params)
    {
        if (!in_array($name, static::getKnownBorders())) {
            throw new Exception("Unknown border function name $name");
        }

        // target string is expected to be:
        $targetString = $params[0][0];
        $functionName = '__' . $name;

        return static::$functionName($targetString);
    }
1037347
public static function URL($name, $params = []){
      return ($r = static::tagged($name)) ? $r-> getURL($params) : new URL();
    }
996603
public function param( $param_name, $callback )
	{
		if( is_callable($callback) )
		{
			$this->_params[$param_name] = $callback( new request() );
		}
		else
		{
			$this->_params[$param_name] = $callback;
		}
	}
501800
protected function _checkParams( stdClass $params, array $names )
	{
		foreach( $names as $name )
		{
			if( !property_exists( $params, $name ) ) {
				throw new Controller_ExtJS_Exception( sprintf( 'Missing parameter "%1$s"', $name ), -1 );
			}
		}
	}
181038
public function renderArray($name, $params = [])
    {
        return $this->view($this->generator->generate($this->callbacks, $name, $params));
    }
1060727
public static function call_if_exists($name, $arguments = []) {
		if (self::exists($name)) {
			$application = Application::get();
			$classname = 'Hook_' . ucfirst($application->name);
			call_user_func_array([$classname, $name], $arguments);
		}
	}
985241
protected function storeSearchParams( array $params, $name )
	{
		$key = 'aimeos/admin/jqadm/' . $name;
		$session = $this->getContext()->getSession();

		if( isset( $params['filter'] ) ) {
			$session->set( $key . '/filter', $params['filter'] );
		}

		if( isset( $params['sort'] ) ) {
			$session->set( $key . '/sort', $params['sort'] );
		}

		if( isset( $params['page'] ) ) {
			$session->set( $key . '/page', $params['page'] );
		}

		if( isset( $params['fields'] ) ) {
			$session->set( $key . '/fields', $params['fields'] );
		}

		return [
			'fields' => $session->get( $key . '/fields' ),
			'filter' => $session->get( $key . '/filter' ),
			'page' => $session->get( $key . '/page' ),
			'sort' => $session->get( $key . '/sort' ),
		];
	}
1353864
public function getExtension($name)
    {
        if ($this->hasExtension($name)) {
            return $this->_extensions[$name];
        }

        throw new HandlerNotFoundException(get_class($this).": No extension named \"$name\" found");
    }
1292020
public function getPartial(array $name, array $params = array())
	{
		list($class, $method) = $name;
		$obj = $this->container->resolve($class);
		return call_user_func_array([$obj, $method], $params);
	}
1190260
public function url(string $name, array $params = []): string
    {
        return $this->core->router->generate($name, $params);
    }
1131251
public function params($name, $params = null, $override = false)
    {
        $overrideAll = (is_array($name) && is_bool($params)) ? $params : false;
        Util::operateArray($this->smsData['params'], $name, $params, [], function ($name, array $params) use ($override) {
            if (!isset($this->smsData['params'][$name])) {
                $this->smsData['params'][$name] = [];
            }
            $target = &$this->smsData['params'][$name];
            if ($override) {
                $target = $params;
            } else {
                $target = array_merge($target, $params);
            }
        }, $overrideAll);

        return $this;
    }
505119
protected function loadCollector($name, array $params = null) {
		$locator = $this->getCollectorsLocator();
		
		try {
			return $locator->get(ucfirst($name), $params);
		} catch (Exception $exception) {
			$this->pushException($exception);
		}
	}
1098764
public function fire($name, $params = [])
    {
        if ($this->prefixEventName === null) {
            $reflector = new \ReflectionClass($this);
            $this->prefixEventName = 'e' . $reflector->getShortName();
        }
        
        $event = new Event($params);
        if (method_exists($this, $this->prefixEventHandler . $name)) {
            call_user_func([$this, $this->prefixEventHandler . $name], $event);
        }
        Yii::$app->trigger($this->prefixEventName . ucfirst($name), $event);
    }
1165350
public function getRoute($name, array $params = null)
    {
        if (!isset($this->routes[ $name ])) {
            throw new RouteNotFoundException('The path does not exist.');
        }

        $route = $this->routes[ $name ];

        $prefix = !$this->isRewrite()
            ? '?'
            : '';

        $path = $route[ 'path' ];

        if (!empty($params) && isset($route[ 'with' ])) {
            foreach ($route[ 'with' ] as $key => $value) {
                if (!preg_match('/^' . $value . '$/', $params[ $key ])) {
                    throw new RouteArgumentException($params[ $key ], $value, $path);
                }
                $path = str_replace($key, $params[ $key ], $path);
            }
        }

        return $this->basePath . $prefix . $path;
    }
658553
public function create(string $name, array $params = array())
    {
        if (empty($name)) {
            throw new FactoryException ('create() requires a non-empty form name as first argument');
        }

        $className = $this->getFactoryNamespace() . '\\' . $name . $this->getFactoryPostfix();

        if (!class_exists($className)) {
            throw new FactoryException ('Form class "' . $className . '" does not exist');
        }

        $result = $this->createFormInstance($className, $params);

        return $result;
    }
397110
public function getExtension($name, array $params = [], $sanitize = null)
    {
        $result = $this->_getExtensionInternal($name, $params);
        if (!empty($params)) {
            $this->removePlaceholder('params');
        }

        return $this->sanitize($result, $sanitize);
    }