Register runner.

@param string $name Worker name.
@param WorkerRunnerInterface $runner Worker runner.
@param array $options Worker options.
346840
public function addRunner($name, WorkerRunnerInterface $runner, array $options = array())
    {
        $this->runners[$name] = array(
            'runner' => $runner,
            'options' => $options,
        );
    }
672534
public function pathBuilder($name = null, array $options = []) {
		if ($name instanceof PathBuilderInterface) {
			$this->_pathBuilder = $name;

			return $this->_pathBuilder;
		}

		if ($name !== null) {
			$this->_pathBuilder = $this->createPathBuilder($name, $options);
		}

		return $this->_pathBuilder;
	}
261830
public function getRunner(string $runner): string
    {
        if (!isset($this->runners[$runner])) {
            throw new RunnerNotRegisteredException($runner);
        }

        return $this->runners[$runner];
    }
1179
public function registerHelper($name, $helper = false)
    {
        if (is_array($name)) {
            foreach ($name as $n => $helper) {
                $this->registerHelper($n, $helper);
            }
        } elseif (is_object($name)) {
            $this->registerJavascriptObject('helper', $this->wrapHelperObject($name));
        } elseif ($helper === false) {
            $this->registerJavascriptObject('helper', $name);
        } elseif (is_callable($helper)) {
            $this->registerJavascriptFunction('helper', $name, $this->wrapHelperCallable($name, $helper));
        } else {
            $this->registerJavascriptFunction('helper', $name, $helper);
        }
    }
482456
public function renderEvent($name, array $options = [])
    {
        $eventName = sprintf('sonata.block.event.%s', $name);

        /** @var BlockEvent $event */
        $event = $this->eventDispatcher->dispatch($eventName, new BlockEvent($options));

        $content = '';

        foreach ($event->getBlocks() as $block) {
            $content .= $this->render($block);
        }

        if ($this->stopwatch) {
            $this->traces['_events'][uniqid('', true)] = [
                'template_code' => $name,
                'event_name' => $eventName,
                'blocks' => $this->getEventBlocks($event),
                'listeners' => $this->getEventListeners($eventName),
            ];
        }

        return $content;
    }
237387
public function register($name)
    {
        $this->hook->action($name, function () {
            if (! $this->nonceValid()) {
                wp_send_json($this->getErrorMessage());
            }

            wp_send_json($this->run());
        })->dispatch();
    }
324222
public function register( $name, $controller, array $options = [] )
	{
		if ( isset( $options['parameters'] ) && !isset( $this->parameters ) )
			$this->parameters = $options['parameters'];

		// If the resource name contains a slash, we will assume the developer wishes to
		// register these resource routes with a prefix so we will set that up out of
		// the box so they don't have to mess with it. Otherwise, we will continue.
		if ( Str::contains( $name, '/' ) )
		{
			$this->prefixedResource( $name, $controller, $options );

			return;
		}

		// We need to extract the base resource from the resource name. Nested resources
		// are supported in the framework, but we need to know what name to use for a
		// place-holder on the route parameters, which should be the base resources.
		$base = $this->getResourceWildcard( last( explode( '.', $name ) ) );

		$defaults = $this->resourceDefaults;

		foreach ( $this->getResourceMethods( $defaults, $options ) as $m )
			$this->{'addResource' . ucfirst( $m )}( $name, $base, $controller, $options );
	}
640078
public static function registerConfig($name, array $config) {
		if( empty($config['path']) ) {
			throw new \Exception('Missing a valid "path" in configuration of route "'.$name.'"');
		}
		
// 		$parameters = array();
// 		if( isset($config['parameters']) && is_array($config['parameters']) ) {
// 			foreach( $config['parameters'] as $paramName => $paramConfig ) {
// 				$parameters[] = CLIArgument::make($paramName, $paramConfig);
// 			}
// 		}
		$options = $config;
		unset($options['path'], $options['controller'], $options['parameters']);
		static::register($name, $config['path'], $config['controller'], array(), $options);
	}
1138545
public function register($provider, $options = [], $force = false){
		if(!isset($this->providers[$provider]) || $force){
			$this->providers[$provider] = new $provider($this,$options);
			with($this->providers[$provider])->register();
		}
	}
598539
public function createPathBuilder($name, array $options = []) {
		$className = App::className($name, 'Storage/PathBuilder', 'PathBuilder');
		if (!class_exists($className)) {
			$className = App::className('Burzum/FileStorage.' . $name, 'Storage/PathBuilder', 'PathBuilder');
		}

		if (!class_exists($className)) {
			throw new RuntimeException(sprintf('Could not find path builder "%s"!', $name));
		}

		$pathBuilder = new $className($options);
		if (!$pathBuilder instanceof PathBuilderInterface) {
			throw new RuntimeException(sprintf('Path builder class "%s" does not implement the PathBuilderInterface interface!', $name));
		}

		return $this->_pathBuilder = $pathBuilder;
	}
210770
public function property($name, $type, $options = array()) {
    if (!$this->has_property($name)) {
      $this->__properties[$name] = array('type' => $type, 'options' => $options);
    }
  }
359508
public function register(string $name, string $class, string $description, array $options = [])
    {
        $name = strtolower($name);

        $this->app->getConfig()->write('collectors.' . $name, [
            'class' => $class,
            'description' => $description,
            'options' => $options,
        ]);
        $this->container->singleton($class);
        $this->container->alias($name, $class);
    }
525982
protected function registerWorker()
	{
		$this->registerWorkCommand();

		$this->registerRestartCommand();

		$this->app->singleton('queue.worker', function($app)
		{
			return new Worker($app['queue'], $app['queue.failer'], $app['events']);
		});
	}
234736
protected function runJob($job, $connectionName, WorkerOptions $options)
    {
        try {
            $this->process($connectionName, $job, $options);
        } catch (Exception $e) {

            $this->stopWorkerIfLostConnection($e);
        } catch (Throwable $e) {

            $this->stopWorkerIfLostConnection($e);
        }
    }
747504
public function registerWorker()
    {
        $this->resqueInstance->redis->sadd($this->workerName() . 's', (string)$this);
        $this->resqueInstance->redis->set($this->workerName() . ':' . (string)$this . ':started', strtotime('now UTC'));
    }
197789
protected function register(array $options)
    {
        foreach ($options as $option => $argument) {
            if (is_bool($argument)) {
                add_theme_support($option);

                continue;
            }

            add_theme_support($option, $argument);
        }
    }
32337
public function resource($name, $controller, array $options = [])
    {
        if ($this->container->bound(ResourceRegistrar::class)) {
            $registrar = $this->container->make(ResourceRegistrar::class);
        } else {
            $registrar = new ResourceRegistrar($this);
        }

        $registrar->register($name, $controller, $options);
    }