Run method once the all input have been set.
Then you will have a valid document with a searchable path.

@param string $data
@param string $load
@param string $type

@return	mixed
17440
public function run($data = '', $load = 'string', $type = 'html')
    {
        if (!empty($data)) {
            $this->$type = $type;

            // Check if data is a path to a valid file then load into buffer.
            if (file_exists($data)) {
                $pathHash = md5($data);
                $this->views[$pathHash] = $data;
            }

            switch ($load . '.' . $type) {
                default:
                    return false;
                    
                // load string html
                case 'string.html':
                    if (@$this->loadHTML($data)) {
                        $objectName = 'Fabrication\\Html';
                        $this->pattern = new $objectName($this);
                        
                        $this->mapSymbols();
                        return true;
                    } else {
                        return false;
                    }
                    
                // load file html 
                case 'file.html':
                    if (@$this->loadHTMLFile($data)) {
                        $this->mapSymbols();
                        return true;
                    } else {
                        return false;
                    }

                // load string xml
                case 'string.xml':
                    if ($this->loadXML($data)) {
                        $this->mapSymbols();
                        return true;
                    } else {
                        return false;
                    }
                    
                // load file xml
                case 'file.xml':
                    $contents = file_get_contents($data);
                    if (@$this->loadXML($contents)) {
                        $this->mapSymbols();
                        return true;
                    } else {
                        return false;
                    }
            }
        }

        return;
    }
622764
public function load($resource, $type = null)
    {
        $routes = $this->loader->load($resource, $type);

        if (!$routes instanceof RouteCollection) {
            throw new \UnexpectedValueException(\sprintf('Decorated route loader is expected to return an instance of %s.', RouteCollection::class));
        }

        foreach ($routes->all() as $name => $route) {
            /** @var Route $route */
            if (null === $variable = $route->getOption('prefix_variable')) {
                continue;
            }

            if (!$route->hasDefault($variable)) {
                throw new \LogicException(\sprintf('Route "%s" with optional prefix "/{%s}" must have a default value for "%2$s".', $name, $variable));
            }

            $path = \sprintf('/{%s}%s', $variable, \ltrim($route->getPath(), '/'));
            $requirement = \sprintf('(%s)/|', $route->getRequirement($variable) ?? '[^/]+');

            $route
                ->setPath($path)
                ->setRequirement($variable, $requirement);
        }

        return $routes;
    }
728072
public function load($resource, $type = null): void
    {
        $path = $this->locator->locate($resource);

        /** @var mixed[]|null $content */
        $content = $this->loadFile($path);
        $this->container->fileExists($path);

        // empty file
        if ($content === null) {
            return;
        }

        // imports: $this->parseImports($content, $path);
        $this->privatesCaller->callPrivateMethod($this, 'parseImports', $content, $path);

        // parameters
        if (isset($content[self::PARAMETERS_KEY])) {
            $this->ensureParametersIsArray($content, $path);

            foreach ($content[self::PARAMETERS_KEY] as $key => $value) {
                // $this->resolveServices($value, $path, true),
                $resolvedValue = $this->privatesCaller->callPrivateMethod(
                    $this,
                    'resolveServices',
                    $value,
                    $path,
                    true
                );

                // only this section is different
                if ($this->container->hasParameter($key)) {
                    $newValue = $this->parametersMerger->merge(
                        $resolvedValue,
                        $this->container->getParameter($key)
                    );

                    $this->container->setParameter($key, $newValue);
                } else {
                    $this->container->setParameter($key, $resolvedValue);
                }
            }
        }

        // extensions: $this->loadFromExtensions($content);
        $this->privatesCaller->callPrivateMethod($this, 'loadFromExtensions', $content);

        /**
         * services - not accessible, private parent properties, luckily not needed
         * - $this->anonymousServicesCount = 0;
         * - $this->anonymousServicesSuffix = ContainerBuilder::hash($path);
         */
        $this->setCurrentDir(dirname($path));
        try {
            // $this->parseDefinitions($content, $path);
            $this->privatesCaller->callPrivateMethod($this, 'parseDefinitions', $content, $path);
        } finally {
            $this->instanceof = [];
        }
    }
562697
public function load($resource, $type = null) 
    {
        $path = $this->locator->locate($resource);
        
        if (!stream_is_local($path)) {
            throw new \InvalidArgumentException(sprintf('This is not a local file "%s".', $path));
        }

        if (!file_exists($path)) {
            throw new \InvalidArgumentException(sprintf('File "%s" not found.', $path));
        }

        $result = parse_ini_file($path, true);
        
        if (false === $result || array() === $result) {
            throw new \InvalidArgumentException(sprintf('The "%s" file is not valid.', $path));
        }
        
        return $result;
    }
4023
public function createForm($type, $data = null, array $options = [])
    {
        return $this->application['form.factory']->create($type, $data, $options);
    }
1221707
public function load($resource, $type = null)
    {
        $resource = (string) $resource;

        if (!is_file($resource)) {
            throw new InvalidArgumentException(sprintf('File "%s" is not a regular file.', $resource));
        }

        if (!is_readable($resource)) {
            throw new InvalidArgumentException(sprintf('File "%s" is not readable.', $resource));
        }

        $content = file_get_contents($resource);
        $decoded = @json_decode($content, true);

        if ($decoded === null) {
            throw new InvalidArgumentException(
                sprintf('File "%s" cannot be json decode (error code: %s).', $resource, json_last_error())
            );
        }

        return $decoded;
    }
1077058
public function persist($data, $type) {
        if (strtolower($type) == "create") return $this->repository->createRecord($data);

        if (strtolower($type) == "update") return $this->repository->updateRecord($data);

        if (strtolower($type) == "destroy") return $this->repository->destroyRecord($data);
    }
1115477
private function _loadData($type, $count)
    {
        $data = $this->ShapeFile->readSHP($count);
        if ($data === false) {
            return false;
        }
        $this->read += strlen($data);

        return Util::loadData($type, $data);
    }
286847
protected function editBlackListedData(string $data, string $type): string
    {
        if ($type == self::TYPE_EMAIL) {
            $data = sprintf('@%s', $data);
        }

        return $data;
    }
45519
public function resolve($resource, $type = null){
		$resolvingLoader = false;
		foreach($this->loaders as $loader){
			if($loader->supports($resource, $type)){
				$resolvingLoader = $loader;
			}
		}
		if(!$resolvingLoader){
			if(!$type){
				$type = (is_callable($resource))
					? 'closure'
					: pathinfo($resource, PATHINFO_EXTENSION)
				;
			}
			$resolvingLoader = $this->createLoaderForType($type);
		}

		return $resolvingLoader;
	}
642848
protected function  transformData($type, $data)
    {
        foreach ($data as $field => $value) {
            if (isset($this->fields[$field]['options']['transform'])) {
                $data[$field] = $this->transformerManager->{$type.'Form'}($value, $this->fields[$field]['options']['transform']);
            }
        }

        return $data;
    }
362461
public function load($file, $type = null)
    {
        $path = $this->locator->locate($file);

        if (!stream_is_local($path)) {
            throw new \InvalidArgumentException(sprintf('This is not a local file "%s".', $path));
        }

        if (!file_exists($path)) {
            throw new \InvalidArgumentException(sprintf('File "%s" not found.', $path));
        }

        if (null === $this->yamlParser) {
            $this->yamlParser = new YamlParser;
        }

        try {
            $parsedConfig = $this->yamlParser->parse(file_get_contents($path));
        } catch (ParseException $e) {
            throw new \InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $path), 0, $e);
        }

        $collection = [];

        // empty file
        if (null === $parsedConfig) {
            return $collection;
        }

        // not an array
        if (!is_array($parsedConfig)) {
            throw new \InvalidArgumentException(sprintf('The file "%s" must contain a YAML array.', $path));
        }

        foreach ($parsedConfig as $name => $config) {
            $this->validate($config, $name, $path);

            if (isset($config['resource'])) {
                $this->parseImport($collection, $config, $path, $file);
            } else {
                $this->parseMetadata($collection, $name, $config);
            }
        }

        return $collection;
    }
41976
public function get(string $type = '', string $module = '', $key = null) {
		$result = $this->data;
		if (!empty($type)) {
			$result = $result[$type] ?? null;
			if (!isset($result)) return $result;
			if (!empty($module)) {
				$result = $result[$module] ?? null;
				if (!isset($result)) return $result;
				if (!empty($key)) {
					$result = $result[$key] ?? null;
					if (!isset($result)) return $result;
				} else if (!empty($result['datasource'])) {
					// acl is skipped intentionally
					return \Factory::model($result['datasource'], true)->get(['skip_acl' => true]);
				}
			}
		}
		return $result;
	}
201148
private function load($type)
    {
        $index = $this->$type;
        if ($index) {
            return;
        }

        $cache = $this->di->get("cache");
        $key = $cache->createKey(__CLASS__, $type);
        $index = $cache->get($key);

        if (is_null($index) || $this->ignoreCache) {
            $createMethod = "create$type";
            $index = $this->$createMethod();
            $cache->put($key, $index);
        }

        $this->$type = $index;
    }
1225855
public function load($resource, $type = null)
    {
        $collection = new SymfonyRouteCollection();
        try{
            $results = $this->manager->findAllAlias();
        }catch (\Exception $e){
            return $collection;
        }
        foreach ($results as $metatag) {
            if (is_array($metatag['pathinfo'])) {
                $pathinfo = $metatag['pathinfo'];
            } else {
                $pathinfo = @unserialize($metatag['pathinfo']);
            }
            if (!is_array($pathinfo) || !isset($pathinfo['_route']) || !isset($metatag['alias'])) {
                continue;
            }
            $oldroute = $pathinfo['_route'];

            //add defaults to routealias
            if (isset($pathinfo['__defaults']) && is_array($pathinfo['__defaults'])) {
                foreach ($pathinfo['__defaults'] as $key => $value) {
                    if (strpos($key, '_') !== 0) {
                        $metatag['alias'] .= '-{'.$key.'}';
                    }
                }
            }
            $route = new Route($metatag['alias'], $pathinfo, array(), array());
            $collection->add(self::getRouteName($oldroute, $pathinfo), $route);
        }

        return $collection;
    }
1128881
public function load($file, $type = null)
    {
        $path = $this->locator->locate($file);

        $xml = $this->parseFile($path);
        $xml->registerXPathNamespace('config', 'http://thelia.net/schema/dic/config');

        $this->removeScope($xml);

        $this->container->addResource(new FileResource($path));

        $this->parseLoops($xml);

        $this->parseFilters($xml);

        $this->parseTemplateDirectives($xml);

        $this->parseParameters($xml);

        $this->parseCommands($xml);

        $this->parseForms($xml);

        $this->parseDefinitions($xml, $path);

        $this->parseHooks($xml, $path, $type);

        $this->propelOnlyRun(
            [$this, "parseExportCategories"],
            $xml
        );

        $this->propelOnlyRun(
            [$this, "parseExports"],
            $xml
        );

        $this->propelOnlyRun(
            [$this, "parseImportCategories"],
            $xml
        );

        $this->propelOnlyRun(
            [$this, "parseImports"],
            $xml
        );
    }
389254
public function validate($data, $type) {
        if (strtolower($type) == "create") $rules = $this->repository->getValidationRulesForCreate();

        if (strtolower($type) == "update") $rules = $this->repository->getValidationRulesForUpdate();

        $validator = Validator::make($data,$rules);

        if ($validator->fails()) return $validator->messages();

        return "passed";
    }