Load source part.

@param $source
962146
public function loadSource($source)
    {
        $parser = new Parser();

        list($this->headers, $this->content) = $parser->parsePart($source);
    }
51754
public void load(Object source, Object target)
  {
    for (LoadField load : _loadFields) {
      load.load(source, target);
    }
  }
1275281
public function install($source)
    {
        $pattern                             = chr(1) . '^' . preg_quote(JPATH_ROOT) . '/' . chr(1);
        $this->extensions[basename($source)] = preg_replace($pattern, '', $source);

        $xmlDirectory = $source . '/entities';
        $strategy     = new RecursiveDirectoryStrategy($xmlDirectory);
        $this->builder->addLocatorStrategy($strategy);
        $entityNames = $this->importDefinition($xmlDirectory . '/*.xml');

        foreach ($entityNames as $entityName) {
            $this->dataDirectories[$entityName] = $source . '/data';
        }

        return $entityNames;
    }
1004724
public function setSource($source)
    {
        if ($source !== null && !\Erebot\Utils::stringifiable($source)) {
            throw new \Erebot\InvalidValueException('Not a valid nickname');
        }

        $this->source = $source;
    }
668139
public function prepareSource(&$source = null, $reference = false)
    {
        if (is_null($source)) {
            $raw = static::loadRawFromRequest();

            $this->data = json_decode($raw, true);

            if (!is_array($this->data)) {
                $this->data = [];
            }
        } else {
            if ($reference) {
                $this->data = &$source;
            } else {
                $this->data = $source;
            }
        }
    }
973932
protected void load(ApplicationContext context, Object[] sources) {
		if (logger.isDebugEnabled()) {
			logger.debug(
					"Loading source " + StringUtils.arrayToCommaDelimitedString(sources));
		}
		BeanDefinitionLoader loader = createBeanDefinitionLoader(
				getBeanDefinitionRegistry(context), sources);
		if (this.beanNameGenerator != null) {
			loader.setBeanNameGenerator(this.beanNameGenerator);
		}
		if (this.resourceLoader != null) {
			loader.setResourceLoader(this.resourceLoader);
		}
		if (this.environment != null) {
			loader.setEnvironment(this.environment);
		}
		loader.load();
	}
610247
public function loadResource($source = null)
    {

        $routes     = array();
        $source     = $this->resolveResorceSource($source);
        $extension  = Path::getExtension($source);

        if (file_exists($source)) {
            $content = File::load($source);
            if ($extension == 'yml') {
                $array  = Yaml::parse($content);
            } elseif ($extension == 'json') {
                $array  = json_decode($content, true);
            } else {
                throw new \Exception("Unsupported routing file type. Routes can only be loaded from yml or json files");
            }

            if (is_array($array)) {

                if (isset($array['imports'])) {
                    foreach ($array['imports'] as $import) {
                        if (isset($import['resource'])) {
                            $extraSource = $this->resolveResorceSource($import['resource']);
                            foreach ($this->loadResource($import['resource']) as $name => $route) {
                                $routes[$name] = $route;
                            }
                        }
                    }
                }

                if (isset($array['routes'])) {
                    foreach ($array['routes'] as $name => $route) {
                        $routes[$name] = $route;
                    }
                }
            }
        }

        $this->resource = $routes;

        return $routes;
    }
1339594
public function setSource($source)
    {
        if (Format::isIdentifier($source)) {
            $this->source = $source;
        } else {
            $msg = "'${source}' is not a valid QTI identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
553532
public function setSource($source)
    {
        if (is_string($source)) {
            $this->source = new PhingFile($source);
        } else {
            $this->source = $source;
        }
    }
164059
public function get_file_source_info($source) {
        global $USER;
        list($type, $fileid, $filename) = $this->split_part($source);
        return 'Box ('. fullname($USER) . '): ' . $filename;
    }
1080992
public function loadString($string)
    {
        $this->sourceString = $string;

        if ($this->config->allowPhpScripts === false) {
            $this->sourceString = preg_replace(
                '/<\\?.*(\\?>|$)/Us',
                '',
                str_replace('<?=', '<?php echo ', $this->sourceString)
            );
        }

        $this->sourceString = str_replace(
            [
                '__DIR__',
                '__FILE__',
            ],
            [
                "'" . $this->getSourceFileDirectory() . "'",
                "'" . $this->getSourceFilePath() . "'",
            ],
            $this->sourceString
        );

        return empty($this->sourceString);
    }
1350187
public function load($source)
    {
        $this->clean();

        if ($src = $this->loader->load($source)) {
            $this->source = $src;
            $this->resource = new Imagick($source);
            $this->getInfo();

            return true;
        }

        $this->error = 'error loading source';
        return false;
    }
801237
public function resolve($part, $source)
    {
        if (is_array($source)) {
            $source = $this->handleArray($part, $source);
        } elseif (is_object($source)) {
            $source = $this->handleObject($part, $source);
        }

        return $source;
    }
185864
public function prepareSource(&$source = null, $reference = false)
    {
        $headers = [];

        foreach ((array) $source as $key => $value) {
            $headers[HeaderHelper::normalizeHeaderName($key)] = implode(', ', $value);
        }

        parent::prepareSource($headers, $reference);
    }
904833
public static function setSource($source = null)
    {
        if (! is_resource($source) && ! is_null($source)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid source provided; must be a null or an resource, "%s" given.',
                is_object($source) ? get_class($source) : gettype($source)
            ));
        }
        static::$source = $source;
    }
363312
public function load(...$sources)
    {
        if (!$sources) {
            throw new \RuntimeException('Sources must not be empty');
        }

        $this->clear();
        foreach ($sources as $source) {
            switch ($source) {
                case 'query':
                case 'post':
                case 'files':
                case 'cookie':
                    $this->data = array_merge($this->data, $this->request->$source());
                    break;
                default:
                    throw new \RuntimeException('Unknown source: ' . $source);
            }
        }

        if ($session = $this->session->get('input')) {
            $this->session->unset('input');
            if (!$this->data) {
                $this->data   = $session['data'] ?? [];
                $this->errors = $session['errors'] ?? [];
            }
        }
    }
1172778
public function loadString($source)
    {
        $name = crc32($source);

        if(!$file = $this->isCached($name))
        {
            //Compile the template
            if(!$this->_source = $this->_compile($source)) {
                throw new RuntimeException(sprintf('The template content cannot be compiled.'));
            }

            $this->cache($name, $this->_source);
        }
        else  $this->_source = file_get_contents($file);

        return $this;
    }