/ @copydoc IMachineDefinitionReader::loadString
355263
public function loadString(string $machine_type, string $data_string, array $options = [], string $filename = null)
	{
		return Utils::parse_json_string($data_string, $filename);
	}
1044368
def _load_text(handle, split=False, encoding="utf-8"):
    """"""
    string = handle.read().decode(encoding)
    return string.splitlines() if split else string
1036059
public static function loadString($data, $format = Format::JSON, $options = [])
    {
        // Load a string into the given namespace [or default namespace if not given]
        $class = static::getFormatClass($format);

        return $class::stringToStruct($data, $options);
    }
866955
function load()
    {
        $content = trim(file_get_contents($this->file));
        $this->data = explode("\n",$content);
    }
310234
public function loadString($pString, $pToArray = false)
    {
        $this->_content = ($pToArray) ? json_decode($pString, true) : json_decode($pString);
        return $this;
    }
179065
public function loadFromString($string)
    {
        $target = array();
        $array = explode(self::SEPARATOR, $string);

        foreach ($array as $index => $value) {
            // Additional check
            if (!empty($value)) {
                // Ensure we have only clean values
                if (strpos(self::SEPARATOR, $value) === false) {
                    array_push($target, $value);
                }
            }
        }

        // Override with modified one
        $this->collection = $target;
    }
1245855
protected void loadDataFromFile(InputStream is) throws IOException {
		PHPFileParser fp = new PHPFileParser(is);
		createInternalDataStructre(fp.getSections());
	}
298038
function getLoadingText()
    {
        return isset($this->getConfig()->search->loadingText) ? $this->getConfig()->search->loadingText : 'loading';
    }
217280
public void load(final InputStream is, final String encoding) throws IOException {
		load(new InputStreamReader(is, encoding));
	}
774552
public function loadFromString(string $content): TemplateInterface
    {
        $class = $this->generateTemplateCacheClass($content);

        return $this->compileAndSaveTemplate(
            $content,
            $this->resolveCacheTemplatePath($class),
            $class
        );
    }
756832
private function loadImageFromString($imagestring)
    {
        if (Utils::isJPGResource($imagestring)) {
            $this->extension = 'jpg';
            $this->type = IMAGETYPE_JPEG;
        }

        if (Utils::isPNGResource($imagestring)) {
            $this->extension = 'png';
            $this->type = IMAGETYPE_PNG;
        }

        $this->from = 'imagestring';
        $this->resource = imagecreatefromstring($imagestring);
        $this->width = $this->boxWidth = imagesx($this->resource);
        $this->height = $this->boxHeight = imagesy($this->resource);
    }
437921
public function loadString($content, $url = null)
    {
        parent::loadString($content);

        //Let twig load the content by proxiing through the getSource() method.
        $this->_twig_template = $this->_twig->loadTemplate($content);

        //Push the template on the stack
        array_push($this->_stack, $url);
        return $this;
    }
1137425
function load($str, $lowercase=true, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT, $defaultSpanText=DEFAULT_SPAN_TEXT)
	{
		global $debug_object;

		// prepare
		$this->prepare($str, $lowercase, $stripRN, $defaultBRText, $defaultSpanText);
		// strip out cdata
		$this->remove_noise("'<!\[CDATA\[(.*?)\]\]>'is", true);
		// strip out comments
		$this->remove_noise("'<!--(.*?)-->'is");
		// Per sourceforge http://sourceforge.net/tracker/?func=detail&aid=2949097&group_id=218559&atid=1044037
		// Script tags removal now preceeds style tag removal.
		// strip out <script> tags
		$this->remove_noise("'<\s*script[^>]*[^/]>(.*?)<\s*/\s*script\s*>'is");
		$this->remove_noise("'<\s*script\s*>(.*?)<\s*/\s*script\s*>'is");
		// strip out <style> tags
		$this->remove_noise("'<\s*style[^>]*[^/]>(.*?)<\s*/\s*style\s*>'is");
		$this->remove_noise("'<\s*style\s*>(.*?)<\s*/\s*style\s*>'is");
		// strip out preformatted tags
		$this->remove_noise("'<\s*(?:code)[^>]*>(.*?)<\s*/\s*(?:code)\s*>'is");
		// strip out server side scripts
		$this->remove_noise("'(<\?)(.*?)(\?>)'s", true);
		// strip smarty scripts
		$this->remove_noise("'(\{\w)(.*?)(\})'s", true);

		// parsing
		while ($this->parse());
		// end
		$this->root->_[HDOM_INFO_END] = $this->cursor;
		$this->parse_charset();

		// make load function chainable
		return $this;

	}
13780
static function buildFromString($str, $lowercase=true, $forceTagsClosed=true, $target_charset = self::DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=self::DEFAULT_BR_TEXT, $defaultSpanText=self::DEFAULT_SPAN_TEXT)
    {
        $dom = new Tree(null, $lowercase, $forceTagsClosed, $target_charset, $stripRN, $defaultBRText, $defaultSpanText);
        if (empty($str) or strlen($str) > self::MAX_FILE_SIZE)
        {
            $dom->clear();
            return false;
        }
        $dom->load($str, $lowercase, $stripRN);
        return $dom;
    }
1159132
public function readString() {

            $strref = $this->readU29();

            if (($strref & 0x01) == 0) {
                $strref = $strref >> 1;
                if ($strref>=count($this->storedStrings)) {
                    throw new Exception('Undefined string reference: ' . $strref);
                    return false;
                }
                return $this->storedStrings[$strref];
            } else {
                $strlen = $strref >> 1; 
                $str = $this->stream->readBuffer($strlen);
                if ($str != "") $this->storedStrings[] = $str;
                return $str;
            }

        }
1174551
public function loadTemplateFromString($str)
    {
        $this->source = 'string: '.$str;
        $this->template = $this->tags = [];
        if (!$str) {
            return;
        }
        $this->tag_cnt = [];

        /* First expand self-closing tags {$tag} -> {tag}{/tag} */
        $str = preg_replace('/{\$([-_:\w]+)}/', '{\1}{/\1}', $str);

        $this->parseTemplate($str);

        return $this;
    }
744363
private function loadStoredRoutines(): void
  {
    // Log an empty line.
    $this->io->writeln('');

    // Sort the sources by routine name.
    usort($this->sources, function ($a, $b) {
      return strcmp($a['routine_name'], $b['routine_name']);
    });

    // Process all sources.
    foreach ($this->sources as $filename)
    {
      $routineName = $filename['routine_name'];

      $helper = new RoutineLoaderHelper($this->io,
                                        $filename['path_name'],
                                        $this->phpStratumMetadata[$routineName] ?? null,
                                        $this->replacePairs,
                                        $this->rdbmsOldMetadata[$routineName] ?? null,
                                        $this->sqlMode,
                                        $this->characterSet,
                                        $this->collate);

      try
      {
        $this->phpStratumMetadata[$routineName] = $helper->loadStoredRoutine();
      }
      catch (RoutineLoaderException $e)
      {
        $messages = [$e->getMessage(),
                     sprintf("Failed to load file '%s'", $filename['path_name'])];
        $this->io->error($messages);

        $this->errorFilenames[] = $filename['path_name'];
        unset($this->phpStratumMetadata[$routineName]);
      }
      catch (DataLayerException $e)
      {
        if ($e->isQueryError())
        {
          // Exception is caused by a SQL error. Log the message and the SQL statement with highlighting the error.
          $this->io->error($e->getShortMessage());
          $this->io->text($e->getMarkedQuery());
        }
        else
        {
          $this->io->error($e->getMessage());
        }
      }
    }
  }