Iterate through the configured modules, find the matching module and set
the route path accordingly

@param array $value (contains action, controller and package of the module controller)
@return boolean
972504
protected function resolveValue($value)
    {
        if (is_array($value)) {
            $this->value = $value['module'];
        } else {
            $this->value = $value;
        }
        return true;
    }
224075
public function set($path, $value)
    {
        list($name, $path) = $this->splitPath($path);

        if (empty($path)) {
            throw new RuntimeException('The root node of config is not writable');
        }

        return $this->load($name)->set($path, $value);
    }
648069
private function hasQueryOperators($value) : bool
    {
        if (! is_array($value) && ! is_object($value)) {
            return false;
        }

        if (is_object($value)) {
            $value = get_object_vars($value);
        }

        foreach ($value as $key => $_) {
            if (isset($key[0]) && $key[0] === '$') {
                return true;
            }
        }

        return false;
    }
211448
public static function isArrayable($value)
    {
        if ($value instanceof ManagesItemsInterface
            || $value instanceof ManagesItemsTrait
            || $value instanceof Traversable
            || is_array($value)
        ) {
            return true;
        }
        return false;
    }
1154166
public function findByApiKey( $value )
    {

        $apiOptions = $this->__get('apiOptions');

        if( !isset( $apiOptions['findByKey'] ) ) {
            return $this->find( $value, true );
        }

        $property = $apiOptions['findByKey'];

        $filter = $this->getFindFilterFactory()
            ->get( $property, null, $value );

        return $this->findByFilterComponents(
            FindFilterComponentFactory::FIND_ONE,
            array( $property => $filter ),
            self::ALL
        );

    }
837204
public function parse_value($value) {

        if (strpos($value, '$LtiLink.custom.url') !== false) {
            $id = optional_param('id', 0, PARAM_INT); // Course Module ID.
            if (!empty($id)) {
                $cm = get_coursemodule_from_id('lti', $id, 0, false, MUST_EXIST);
                $this->params['link_id'] = $cm->instance;
            }
            $value = str_replace('$LtiLink.custom.url', parent::get_endpoint(), $value);
        }
        return $value;

    }
609964
public function setDirectoryForPlaces($value)
    {
        $this->directoryForPlaces = trim(str_replace(DIRECTORY_SEPARATOR, '/', trim((string) $value)), '/');

        return $this;
    }
628416
public function match($value)
    {
        usort($this->rules, array($this, 'sort'));

        foreach ($this->rules as $rule) {
            $match = $rule->match($value);

            if ($match === false) {
                continue;
            }

            $this->matchParams = $match;

            return $this->dependencyManager->get($rule->getController());
        }

        return $this->dependencyManager->get($this->catchallController);
    }
849163
public function hasLayout($value = null)
    {
        if (null !== $value) {
            $this->hasLayout = $value;
        }
        return $this->hasLayout;
    }
562556
public function setFindSource($value, array $middleware)
    {
        $this->findSource = (bool) $value;
        $this->middleware = $middleware;
    }
359956
protected function calculateFullPath(array &$value, $route)
    {
        if (!empty($value['as_id'])) {
            preg_match_all('/{(.*?)}/', $route, $matches);
            $route = str_replace($matches[0], '{'.$value['as_id'].'}', $route);
        }

        return url($route);
    }
867458
protected function normalizePath($value)
    {
        // array of paths = recursive
        if (is_array($value)) {
            foreach ($value as $i => $val) {
                $value[$i] = $this->normalizePath($val);
            }

            return $value;
        }

        $converter = new PathConverter(dirname($this->config['config_path']), $this->config['path']);

        return $converter->convert($value);
    }
927037
public function setPath($path, $value = null, $method = null)
    {
        $this->paths[$path] = [];

        if (! is_null($value)) {
            $this->paths[$path]['path'] = $value;
        }

        if (! is_null($method)) {
            $this->paths[$path]['method'] = $method;
        }
    }
1097378
public function match($value, $argument = null)
    {
        if (\is_string($value)) {
            $requestValue = $this->getParsedValue($value);
        } else {
            $requestValue = $value;
        }
        $configValue = $this->decodeJson($argument);

        if (!\is_array($requestValue) || !\is_array($configValue)) {
            return false;
        }

        return ArraysHelper::areRecursivelyEquals($requestValue, $configValue);
    }
472694
protected function loadMetadataFor($value)
    {
        $definitions = $this->getDefinitions();

        foreach ($definitions as $name => $options) {
            if ($value == $options['type']) {
                $definition = $options;

                break;
            }
        }

        if (!isset($definition)) {
            throw new NoSuchMetadataException(sprintf('No metadata found for module type "%s".', $value));
        }

        // Build route collection
        $collection = new RouteCollection;

        foreach ($definition['routing'] as $resource) {
            $resourceType = isset($resource['type']) ? $resource['type'] : null;

            $subCollection = $this->routingLoader->load($resource['resource'], $resourceType);

            $collection->addCollection($subCollection);
        }

        // Build metadata
        $metadata = new ModuleMetadata($definition['name'], $definition['type'], $collection);

        return $this->collection[$definition['type']] = $metadata;
    }
979538
public function filter(&$value) {
        $accepted_types = optional_param_array('accepted_types', '', PARAM_RAW);
        if (isset($value['children'])) {
            if (!empty($value['children'])) {
                $value['children'] = array_filter($value['children'], array($this, 'filter'));
            }
            return true; // always return directories
        } else {
            if ($accepted_types == '*' or empty($accepted_types)
                or (is_array($accepted_types) and in_array('*', $accepted_types))) {
                return true;
            } else {
                foreach ($accepted_types as $ext) {
                    if (preg_match('#'.$ext.'$#i', $value['title'])) {
                        return true;
                    }
                }
            }
        }
        return false;
    }
378934
protected function setPropertyByPath($path, $value)
    {
        $path = explode('.', $path);
        $root = $path[0];
        unset($path[0]);

        $array = ($this->hasProperty($root) ? $this->getProperty($root) : []);
        $pointer = &$array;

        // Loop through the array path and set array parts
        foreach ($path as $part) {
            if (!isset($pointer[$part])) {
                $pointer[$part] = [];
            }

            if (!is_array($pointer[$part])) {
                $pointer[$part] = [];
            }

            $pointer = &$pointer[$part];
        }

        $pointer = $value;
        unset($pointer);

        $this->setProperty($root, $array);
    }