Возвращает имя конфигурации для данного менеджера workflow

@return string

@throws Exception\InvalidConfigurationNameException
337412
public function getConfiguration()
    {
        if (null === $this->configuration) {
            $errMsg = 'no attribute \'configuration\'';
            throw new Exception\InvalidConfigurationNameException($errMsg);
        }
        return $this->configuration;
    }
426892
private function compileConfiguration()
    {
        $code = '';
        $configurationByWrapper = [];
        foreach ($this->configurations as $key => $configuration) {
            if(!isset($configurationByWrapper[$configuration->getIdWrapper()])){
                $configurationByWrapper[$configuration->getIdWrapper()] = [];
            }
            $data = array();
            $data['key'] = $configuration->getKey();
            $data['value'] = $configuration->getValue();
            $data['active'] = $configuration->getActive();
            $data['id'] = $configuration->getId();
            $configurationByWrapper[$configuration->getIdWrapper()][] = $data;
        }
        foreach ($configurationByWrapper as $id => $data) {
            $code .= sprintf("'%s' => %s,",$id,var_export($data,true));
        }

        return $code;
    }
392165
public function getRootName(): string
    {
        $className = \get_class($this);
        if ('Bundle\\DependencyInjection\\Configuration' !== mb_substr($className, -40)) {
            throw new BadMethodCallException('This extension does not follow the naming convention; you must overwrite the getRootName() method.');
        }
        $classBaseName = mb_substr($className, 0, mb_strlen($className) - 40);

        return mb_strtolower(str_replace('\\', '_', $classBaseName));
    }
632682
private function getFieldName()
    {
        $environment   = $this->getEnvironment();
        $inputProvider = $environment->getInputProvider();

        $fieldName = $inputProvider->hasValue('name') ? $inputProvider->getValue('name') : null;
        if (null === $fieldName) {
            return $fieldName;
        }

        if (('select' !== $inputProvider->getParameter('act'))
            && ('edit' !== $inputProvider->getParameter('mode'))
        ) {
            return $fieldName;
        }

        $dataDefinition = $environment->getDataDefinition();
        $sessionStorage = $environment->getSessionStorage();

        $session = $sessionStorage->get($dataDefinition->getName() . '.' . $inputProvider->getParameter('select'));

        $originalPropertyName = null;
        foreach ($session['models'] as $modelId) {
            if (null !== $originalPropertyName) {
                break;
            }

            $propertyNamePrefix = \str_replace('::', '____', $modelId) . '_';
            if (0 !== strpos($fieldName, $propertyNamePrefix)) {
                continue;
            }

            $originalPropertyName = \substr($fieldName, \strlen($propertyNamePrefix));
        }

        if (!$originalPropertyName) {
            return $fieldName;
        }

        return $originalPropertyName;
    }
1108983
private function getConfiguration()
    {
        if (empty($this->configuration)) {
            $this->configuration = unserialize($this->getAsString('uc'));
        }

        return $this->configuration;
    }
1011873
public function getIndexMetadata()
    {
        if (null !== $this->indexMetadata) {
            return $this->indexMetadata;
        }
        $metadata = $this->getModuleOptions()->getWorkflowEntryToObjectMetadata();

        $index = [];
        foreach ($metadata as $metadataItem) {
            if (!array_key_exists(static::WORKFLOW_MANAGER_NAME, $metadataItem) && !array_key_exists(static::WORKFLOW_MANAGER_ALIAS, $metadataItem)) {
                $errMsg = sprintf(
                    'You must specify the %s or %s',
                    static::WORKFLOW_MANAGER_NAME,
                    static::WORKFLOW_MANAGER_ALIAS
                );
                throw new Exception\InvalidWorkflowEntryToObjectMetadataException($errMsg);
            }

            if (array_key_exists(static::WORKFLOW_MANAGER_NAME, $metadataItem) && array_key_exists(static::WORKFLOW_MANAGER_ALIAS, $metadataItem)) {
                $errMsg = sprintf(
                    'You can not specify both %s and %s',
                    static::WORKFLOW_MANAGER_NAME,
                    static::WORKFLOW_MANAGER_ALIAS
                );
                throw new Exception\InvalidWorkflowEntryToObjectMetadataException($errMsg);
            }

            if (!array_key_exists(static::WORKFLOW_NAME, $metadataItem)) {
                $errMsg = sprintf('there is no option %s', static::WORKFLOW_NAME);
                throw new Exception\InvalidWorkflowEntryToObjectMetadataException($errMsg);
            }
            $workflowName = $metadataItem[static::WORKFLOW_NAME];

            if (!array_key_exists(static::ROUTER_NAME, $metadataItem)) {
                $errMsg = sprintf('there is no option %s', static::ROUTER_NAME);
                throw new Exception\InvalidWorkflowEntryToObjectMetadataException($errMsg);
            }
            $routerName = $metadataItem[static::ROUTER_NAME];

            $prefix = '';
            if (array_key_exists(static::WORKFLOW_MANAGER_NAME, $metadataItem)) {
                $prefix = 'name_' . $metadataItem[static::WORKFLOW_MANAGER_NAME] . '_';
            }

            if (array_key_exists(static::WORKFLOW_MANAGER_ALIAS, $metadataItem)) {
                $prefix = 'alias_' . $metadataItem[static::WORKFLOW_MANAGER_ALIAS] . '_';
            }

            $uniqueKey = $prefix . $workflowName . '_' . $routerName;

            if (array_key_exists($uniqueKey, $index)) {
                $errMsg = sprintf('Index contains duplicate keys %s', $uniqueKey);
                throw new Exception\InvalidWorkflowEntryToObjectMetadataException($errMsg);
            }

            $index[$uniqueKey] = [];


            if (!array_key_exists(static::MAP, $metadataItem)) {
                $errMsg = sprintf('there is no option %s', static::MAP);
                throw new Exception\InvalidWorkflowEntryToObjectMetadataException($errMsg);
            }
            if (!is_array($metadataItem[static::MAP])) {
                $errMsg = sprintf('option %s is not array', static::MAP);
                throw new Exception\InvalidWorkflowEntryToObjectMetadataException($errMsg);
            }
            $map = $metadataItem[static::MAP];

            foreach ($map as $mapItem) {
                if (!array_key_exists(static::ENTITY_CLASS_NAME, $mapItem)) {
                    $errMsg = sprintf('there is no option %s', static::ENTITY_CLASS_NAME);
                    throw new Exception\InvalidWorkflowEntryToObjectMetadataException($errMsg);
                }
                $entityClassName = $mapItem[static::ENTITY_CLASS_NAME];

                if (array_key_exists($entityClassName, $index[$uniqueKey])) {
                    $errMsg = sprintf('Metadata for entities already exist %s', $mapItem[static::ENTITY_CLASS_NAME]);
                    throw new Exception\InvalidWorkflowEntryToObjectMetadataException($errMsg);
                }
                $index[$uniqueKey][$entityClassName] = [];

                if (!array_key_exists(static::IDENTIFIERS_MAP, $mapItem)) {
                    $errMsg = sprintf('there is no option %s', static::IDENTIFIERS_MAP);
                    throw new Exception\InvalidWorkflowEntryToObjectMetadataException($errMsg);
                }
                if (!is_array($mapItem[static::IDENTIFIERS_MAP])) {
                    $errMsg = sprintf('option %s is not array', static::IDENTIFIERS_MAP);
                    throw new Exception\InvalidWorkflowEntryToObjectMetadataException($errMsg);
                }

                $identifiersMap = $mapItem[static::IDENTIFIERS_MAP];

                foreach ($identifiersMap as $identifierItem) {
                    if (!array_key_exists(static::PROPERTY_NAME, $identifierItem)) {
                        $errMsg = sprintf('there is no option %s', static::PROPERTY_NAME);
                        throw new Exception\InvalidWorkflowEntryToObjectMetadataException($errMsg);
                    }
                    $propertyName = $identifierItem[static::PROPERTY_NAME];

                    if (array_key_exists($propertyName, $index[$uniqueKey][$entityClassName])) {
                        $errMsg = sprintf('Metadata for property already exist %s', $propertyName);
                        throw new Exception\InvalidWorkflowEntryToObjectMetadataException($errMsg);
                    }
                    $index[$uniqueKey][$entityClassName][$propertyName] = [];

                    $modeOriginal = array_key_exists(static::MODE, $identifierItem) ? $identifierItem[static::MODE] : static ::MODE_ROUTER_PARAM;
                    $mode = strtolower($modeOriginal);

                    if (!array_key_exists($mode, $this->accessMode)) {
                        $errMsg = sprintf('Invalid value for the "mode" %s', $mode);
                        throw new Exception\InvalidWorkflowEntryToObjectMetadataException($errMsg);
                    }
                    $index[$uniqueKey][$entityClassName][$propertyName][static::MODE] = $mode;

                    if (!array_key_exists(static::PARAM_NAME, $identifierItem)) {
                        $errMsg = sprintf('there is no option %s', static::PARAM_NAME);
                        throw new Exception\InvalidWorkflowEntryToObjectMetadataException($errMsg);
                    }
                    $paramName = $identifierItem[static::PARAM_NAME];
                    $index[$uniqueKey][$entityClassName][$propertyName][static::PARAM_NAME] = $paramName;
                }
            }
        }

        $this->indexMetadata = $index;

        return $this->indexMetadata;
    }
457035
public function getFactoryOptions()
    {
        if ($this->factoryOptions) {
            return $this->factoryOptions;
        }
        if (!$this->hasFactoryOptions()) {
            $errMsg = 'Factory options not specified';
            throw new Exception\InvalidFactoryConfigException($errMsg);
        }
        $this->factoryOptions = new ConfigurationServiceOptions($this->factory);
        return $this->factoryOptions;
    }
230661
private function getConfigurationNamingContext()
    {
        $result = $this->adldap->getRootDse(['configurationnamingcontext']);

        if (is_array($result) && array_key_exists('configurationnamingcontext', $result)) {
            return $result['configurationnamingcontext'];
        }

        return false;
    }
582594
public function getNamespace()
	{
	    if (!isset($this->namespace)) {
	        if ($this->isApp()) {
	            $this->namespace = Config::get('app.namespace') ?: '\\' . ucfirst(basename($this->basePath));
	        } else {
	            $name = str_replace(Ioc::app()->basePath, '', $this->basePath);
	            $name = StringHelper::toClassName($name);
	            $this->namespace = Ioc::app()->getNamespace() . '\\' . $name;
	        }
	    }
	    
	    return $this->namespace;
	}
182255
public function getScriptFile()
    {
        if (isset($this->_scriptFile)) {
            return $this->_scriptFile;
        }

        if (($scriptFilename = $this->getServerParam('SCRIPT_FILENAME')) !== null) {
            return $scriptFilename;
        }

        throw new InvalidConfigException('Unable to determine the entry script file path.');
    }
1281889
protected function getFullConfiguration()
    {
        $contextHash = $this->getContextHash();

        if (false === array_key_exists($contextHash, $this->configuration)) {
            $typoScriptArray = ($this->environmentService->isEnvironmentInFrontendMode())
                ? $this->getFrontendTypoScriptConfiguration()
                : $this->getBackendTypoScriptConfiguration();

            $this->configuration[$contextHash] = $this->typoScriptService->convertTypoScriptArrayToPlainArray($typoScriptArray);
        }

        return $this->configuration[$contextHash];
    }
828807
public function get_instance_name() {
        if ($this->plugin === 'core') {
            $string = get_string('allevents', 'tool_monitor');
        } else {
            if ($this->cmid == 0) {
                $string = get_string('allmodules', 'tool_monitor');
            } else {
                $cms = get_fast_modinfo($this->courseid);
                $cms = $cms->get_cms();
                if (isset($cms[$this->cmid])) {
                    $string = $cms[$this->cmid]->get_formatted_name(); // Instance name.
                } else {
                    // Something is wrong, instance is not present anymore.
                    $string = get_string('invalidmodule', 'tool_monitor');
                }
            }
        }

        return $string;
    }
1089865
public static function configureAndGetDSN() :string {

		// alter the configuration
		self::$_config = array(
			'driver'	=> Config::get('database','driver'),
			'database'	=> Config::get('database', 'database'),
			'hostname'	=> Config::get('database', 'hostname'),
			'username'	=> Config::get('database', 'username'),
			'password'	=> Config::get('database', 'password'),
			'before'	=> Config::get('database', 'before'),
			'quote'		=> '',
			'nulls'		=> [
				'query'		=>'',
				'column'	=>'',
				'true'		=>'',
				'false'		=>'',
			]
		);

		// depending on the driver
		switch(self::$_config['driver']) {
			
			case 'sqlite':
				$dsn = self::configureForSQLite();
			break;
			
			case 'mysql':
				$dsn = self::configureForMySQL();
			break;

			case 'postgres':
				$dsn = self::configureForPGSql();
			break;

			case 'odbc':
				$dsn = self::configureForODBC();
			break;

			case 'sqlsrv':
				$dsn = self::configureForSQLServer();
			break;
			
			default:
				// causes exception
				Throw new Exception('Database::connect() : Unknown driver');
			break;
			
		}

		// the dsn we have assembled
		return $dsn;

	}
643988
public function run(): string
    {
        if (null === $this->languageModel) {
            throw new InvalidConfigException('Language model is not defined.');
        }

        return $this->render('tableMultilanguage', [
            'languageModel' => $this->languageModel,
            'fields'        => $this->fields,
            'model'         => $this->model,
        ]);
    }
1029835
private function getOnceVarName()
    {
        $name = (string) $this->getRequiredParameter('name');
        $varName = preg_replace('/[^a-zA-Z0-9_]+/i', '', $name);
        if (empty($varName))
            throw new Exception('variable name [' . $name . '] is invalid');

        return $varName;
    }
353942
protected function getExceptionName()
    {
        if ($this->exception instanceof Exception) {
            $name = $this->exception->getName();
        } elseif ($this->exception instanceof ErrorException) {
            $name = $this->exception->getName();
        } else {
            $name = $this->defaultName;
        }
        return $name;
    }
73249
public function get_formatted_name() : string {
        $context = $this->get_handler()->get_configuration_context();
        return format_string($this->get('name'), true, ['context' => $context]);
    }