@return DeimosHelper

@throws \InvalidArgumentException
778591
protected function instanceHelper()
    {
        if (method_exists($this->builder, 'helper'))
        {
            return $this->builder->helper();
        }

        return new DeimosHelper($this->builder);
    }
492219
public function get($name)
    {
        if (!$this->has($name)) {
            throw new InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name));
        }

        return $this->helpers[$name];
    }
53421
public function getValidator()
    {
        if (!$this->_validator instanceof AnDomainValidatorAbstract) {
            if (!$this->_validator instanceof AnServiceIdentifier) {
                $this->setValidator($this->_validator);
            }

            $config = array(
                'description' => $this->_repository->getDescription(),
            );

            $this->_validator = $this->getService($this->_validator, $config);
        }

        return $this->_validator;
    }
675084
public function getErrorsDispatcher() {
		if(!$this->errorsDispatcher) {
			$this->errorsDispatcher = new Dispatcher\Errors($this, $this->getDumper());
		}
		return $this->errorsDispatcher;
	}
58341
protected function getPasswordHelper()
	{
		if( $this->helper ) {
			return $this->helper;
		}

		$classname = \Aimeos\MShop\Common\Helper\Password\Typo3::class;

		if( class_exists( $classname ) === false ) {
			throw new \Aimeos\MShop\Exception( sprintf( 'Class "%1$s" not available', $classname ) );
		}

		$context = $this->getContext();
		$object = ( method_exists( $context, 'getHasherTypo3' ) ? $context->getHasherTypo3() : null );

		$helper = new $classname( array( 'object' => $object ) );

		return $this->helper = self::checkClass( \Aimeos\MShop\Common\Helper\Password\Iface::class, $helper );
	}
426331
public function createService(Di $di)
    {
        $required = [
            'views_dir'    => null,
            'template_500' => null,
            'template_404' => null,
        ];

        $config = $di->get('config')['error_handler']->toArray();
        $errMsg = sprintf('Cannot create error handler "%s"', __CLASS__);
        if (!isset($config['options'])) {
            throw new InvalidArgumentException($errMsg);
        }

        $options  = array_merge($required, $config['options']);
        if (empty($options['views_dir']) || empty($options['template_500']) || empty($options['template_404']) ||
                ($realPath = realpath($options['views_dir'])) === false) {
            throw new InvalidArgumentException($errMsg);
        }

        $this->options  = $options;
        $this->di       = $di;
        $this->viewsDir = $realPath;
        return $this;
    }
1147557
protected function getDelegateHydrator(): callable
    {
        $delegate = [$this, static::DEFAULT_DELEGATE_HYDRATE_METHOD_NAME];

        if (!is_callable($delegate, false, $callable_name)) {
            throw InvalidDelegateException::forNonCallable($callable_name);
        }

        return $delegate;
    }
668689
public function getValidator()
    {
        if (!($this->validator instanceof ValidatorInterface)) {
            $this->validator = ValidatorHelper::create($this->validator);
        }

        return $this->validator;
    }
304664
public function getPersistenceHelper()
    {
        if (null === $this->persistenceHelper) {
            $this->persistenceHelper = new Doctrine\ORM\PersistenceHelper(
                $this->em,
                $this->getPersistenceEventQueue()
            );
        }

        return $this->persistenceHelper;
    }
298970
protected function getFlashMessengerHelper()
    {
        if ($this->flashMessengerHelper) {
            return $this->flashMessengerHelper;
        }

        if (method_exists($this->view, 'plugin')) {
            $this->flashMessengerHelper = $this->view->plugin(FlashMessengerHelper::class);
        }

        if (!$this->flashMessengerHelper instanceof FlashMessengerHelper) {
            $this->flashMessengerHelper = new FlashMessengerHelper();
        }

        return $this->flashMessengerHelper;
    }
822489
public function getParser() : ParserInterface
    {
        if (null === $this->parser) {
            $patternHelper = new Parser\Helper\GetPattern($this->cache, $this->logger);
            $dataHelper = new Parser\Helper\GetData($this->cache, $this->logger, new Quoter());

            $this->parser = new Parser\Ini($patternHelper, $dataHelper, $this->formatter);
        }

        return $this->parser;
    }
544673
public function findRootContainer() : DelegateInterface
    {
        $obj = $this;
        while($obj->hasParent() === true) {
            $obj = $obj->getParent();
        }
        return $obj;
    }
1274336
protected function getRoleDomainMapper()
    {
        if ($this->roleDomainMapper !== null) {
            return $this->roleDomainMapper;
        }

        $this->roleDomainMapper = new Helper\RoleDomainMapper($this->getLimitationService());

        return $this->roleDomainMapper;
    }
887050
public function getHelper()
	{
		$config = $this->asConfig();
		if (isset($config))
		{
			$config = ConfigHelper::filterConfig($config, 'PHP');
		}
		else
		{
			// Use a dummy config with a regexp that doesn't match anything
			$config = [
				'attrName' => $this->attrName,
				'regexp'   => '/(?!)/',
				'tagName'  => $this->tagName
			];
		}

		return new Helper($config);
	}
337767
public function resolveTransformer()
    {
        if (is_string($this->resolver)) {
            return $this->container->make($this->resolver);
        } elseif (is_callable($this->resolver)) {
            return call_user_func($this->resolver, $this->container);
        } elseif (is_object($this->resolver)) {
            return $this->resolver;
        }

        throw new RuntimeException('Unable to resolve transformer binding.');
    }
318000
protected function buildSymfonyMatcher()
    {
        if (!$this->locator) {
            throw new \InvalidArgumentException('Unable to build Symfony matcher without config locator.');
        }

        $yaml_loader = new YamlFileLoader($this->locator);
        $routes = $yaml_loader->load($this->getRoutingFilename());
        $matcher = new UrlMatcher($routes, $this->getRequestContext());

        return($matcher);
    }
819131
public function getOptionParser() {
		$parser = parent::getOptionParser();
		$parser->description('There is no help');
		$taskNames = array_keys(Hash::normalize($this->tasks));
		foreach ($taskNames as $taskName) {
			$Task = $this->{$taskName};
			$parser->addSubcommand(Inflector::underscore($Task->name), array(
				'help' => $Task->getOptionParser()->description(),
				'parser' => $Task->getOptionParser()
			));
		}
		return $parser;
	}