Registers a resource to fetch a template

@param string $type name of resource
@param array $functions array of functions to handle resource
334142
function register_resource($type, $functions)
	{
		if (count($functions)==4) {
			$this->_plugins['resource'][$type] =
			array($functions, false);

		} elseif (count($functions)==5) {
			$this->_plugins['resource'][$type] =
			array(array(array(&$functions[0], $functions[1])
			,array(&$functions[0], $functions[2])
			,array(&$functions[0], $functions[3])
			,array(&$functions[0], $functions[4]))
			,false);

		} else {
			$this->trigger_error("malformed function-list for '$type' in register_resource");

		}
	}
1369291
protected function _storeOrRender($type, array $args) {
        if ($args['render']) {
            $method = '_render' . ucfirst($type);
            return $this->{$method}($args['value'], $args['attrs']);
        }
        static::$_scripts[] = array(
            'type'  => $type,
            'value' => $args['value'],
            'attrs' => $args['attrs']
        );
        return $this;
    }
849556
public function registerAsSingleton(string $type): self
    {
        $this->typeDefinition->register($type, true);
        return $this;
    }
608442
public function getRegister($type, array $args = [])
    {
        try {
            $wrapper = $this->wrapperFactory($type, $args, ServiceTypeResolver\RegisterWrapper::class);
        } catch (\Exception $e) {
            throw new Exception\ErrorCreatingRegisterException($e->getMessage(), $e->getCode(), $e);
        }
        return $wrapper;
    }
715162
public function getRegister($type, array $args = [])
    {
        $chain = clone $this->chain;
        while ($chain) {
            /** @var TypeResolverInterface $resolver */
            $resolver = $chain->current();
            try {
                $register = $resolver->getRegister($type, $args);
                if ($register instanceof RegisterInterface) {
                    return $register;
                }
            } catch (\Exception $e) {
                if (!$this->getFlagIgnoreException()) {
                    throw new Exception\RuntimeException($e->getMessage(), $e->getCode(), $e);
                }
            }
            $chain->next();
        }

        $errMsg = sprintf('Register for type %s not found', $type);
        throw new Exception\ResultNotFoundException($errMsg);
    }
453865
public function setUp(Server $server, $type)
    {
        $server->registerHandler($this->backend->getUserLibraryInstance()->generateTypeHandler());
        if(($user = $this->backend->getUserLibraryInstance()->getUserLoggedIn()) != null){
            $server->registerHandler($user->generateTypeHandler());
        }
        $server->registerHandler($this->backend->getPageOrderInstance()->generateTypeHandler());
        if(($page = $this->backend->getPageOrderInstance()->getCurrentPage()) != null){
            $server->registerHandler($page->generateTypeHandler());
        }
        $server->registerHandler($this->backend->getLoggerInstance()->generateTypeHandler());
        $server->registerHandler($this->backend->getUpdaterInstance()->generateTypeHandler());
        $server->registerHandler($this->backend->getSiteInstance()->generateTypeHandler());
        $server->registerHandler($this->backend->getFileLibraryInstance()->generateTypeHandler());
        $server->registerHandler(new PostGetFilesArrayAccessTypeHandlerImpl());
        $server->registerHandler(new ParserTypeHandlerImpl());




    }
1216735
public function type($type)
    {
        $types = is_array($type) ? $type : func_get_args();

        $this->types = array_merge($this->types, $types);

        return $this;
    }
368422
public function registerJavascript($name, $source, $type = Assets::TYPE_FILE)
    {
        $this->javascripts[$name][] = array($source, $type);

        return $this;
    }
1165635
public function addTypePreCallFunction($type, callable $function)
    {
        if (isset($this->alias[$type])) {
            foreach ($this->alias[$type] as $target) {
                $this->addTypePreCallFunction($target, $function);
            }
            return;
        }

        $this->tPreCallFunctions[$type][] = $function;
    }
466944
public function runHandlersFromType($type, array $additional_params = []): MiddlewareHandler
    {
        foreach ($this->handlers[$type] as $ware_data) {
            // Call every registered function with supplied params
            $obj = new $ware_data['class'];
            $obj->{$ware_data['method']}(array_merge($additional_params, $ware_data['params']));
        }

        return $this;
    }
1204155
public function addType($type)
    {
        if (func_num_args() > 1) {
            foreach (func_get_args() as $t) {
                $this->addType($t);
            }
        } else {
            if (is_array($type)) {
                foreach ($type as $t) {
                    $this->addType($t);
                }
            } else {
                if (!$this->typeIsAvailable($type)) {
                    $this->types[] = $type;
                }
            }
        }

        return $this;
    }
117811
public function templates($type)
    {
        $data      = [];
        $extension = $this->repository->findOrFail($type);
        foreach ($extension->param('templates') as $template) {
            $data[] = ['key' => $template['path'], 'value' => $template['description']];
        }

        return response()->json([
            'template' => $data[0]['key'],
            'selected' => $type,
            'data'     => $data,
        ], 200);
    }
721783
function register(type, name, create) {
		if (!(type in definitions)) {
			definitions[type] = {};
		}

		if (type === 'pipe') {
			create = chain(create, devour);
		}

		definitions[type][name] = create;
	}
319260
function registerPlugin(type, Plugin) {
    if (!plugins[type]) {
      throw new Error('Attempting to register "' + Plugin + '" as "' + type + '" which is not a valid HTMLBars plugin type.');
    }

    plugins[type].push(Plugin);
  }
536981
protected function assetRendered($assets, $type): void
    {
        $assets = (array) $assets;

        foreach ($assets as $asset) {
            $this->renderedTags[] = $type.'::'.$asset;
        }
    }
110140
public function load($resource, $type = null)
    {
        if (!$resource instanceof ConfiguratorInterface) {
            throw new InvalidArgumentException('Resource must be configurator');
        }

        $this->container->addObjectResource($resource);
        $resource->load($this->container);
    }
159976
public function registerFilter($type, $callback)
    {
        $this->smarty->registered_filters[$type][$this->_get_filter_name($callback)] = $callback;
    }