Sets the source string.

@param string $source The source string

@return StringScanner The StringScanner object
549163
public function setSource($source)
    {
        $this->source = $source;
        $this->length = mb_strlen($source);
        $this->head = 0;
        $this->last= 0;
        $this->captures = array();
        $this->match = null;
        $this->reset();

        return $this;
    }
369111
public function setSource(Processable $source)
    {
        if ($source instanceof ExpressionProcessor) {
            parent::setSource($source);
        } else {
            $msg = "ExpressionProcessingException::setSource only accept ExpressionProcessor objects.";
            throw new InvalidArgumentException($msg);
        }
    }
903868
public function createDocumentFromSource($source)
    {
        if ($source instanceof \DOMDocument) {
            return $source;
        }

        throw new RuntimeException(RuntimeException::INVALID_DOM_SOURCE_STR, RuntimeException::INVALID_DOM_SOURCE);
    }
452493
public function concat($string)
    {
        $this->source .= $string;
        $this->length = mb_strlen($this->source);
        return $this;
    }
1052239
public function generate($source = null)
    {
        $this->getImporter()->setInput($source);

        // Add these dependencies to collection
        $this->addRawDependenciesToCollection($this->getImporter()->import());

        // Return this
        return $this;
    }
1267091
public function setSources(array $sources)
    {
        $this->sources = array_map(function (Source\TokenSource $source) {
            return $source;
        }, $sources);
    }
1056398
public function setSource($source)
    {
        $crawler = $this->getCrawler();
        if (!is_null($crawler) && $crawler instanceof Crawler) {
            throw new ParserContextException('It is not allowed to update source when crawler is active.');
        }

        $this->source = $source;

        return $this;
    }
913828
public function addImage($source)
    {
        $images   = $this->getImages();
        $images[] = $source;
        
        $this->setData('images', $images);
        
        return $this;
    }
885379
public function before($source)
    {
        foreach ($this as $node) {
            if ($node instanceof Element) {
                $node->before($source);
            }
        }

        return $this;
    }
1005849
public function copyPalette($source)
    {
        if( ! is_resource($source) )
        {
            throw new InvalidArgumentException(NULL, '[resource]');
        }

        imagepalettecopy($this->canvas, $source);
    }
814257
public function getDataSource(string  $source) : Source
	{
		switch ($source) {
			case 'form':
			case 'forms':
				return $this
					->getDataSources()
					->getFormsDataSource();
				break;
			case 'entry':
			case 'entries':
				return $this
					->getDataSources()
					->getEntryDataSource();
				break;
			case 'entryValue':
			case 'entryValues':
				return $this
					->getDataSources()
					->getEntryValuesDataSource();
		}
	}
507310
public function setOriginal(string $source): void
    {
        $this->xliff->setOriginal($source);
        $this->markChanged();
    }
553532
public function setSource($source)
    {
        if (is_string($source)) {
            $this->source = new PhingFile($source);
        } else {
            $this->source = $source;
        }
    }
1004724
public function setSource($source)
    {
        if ($source !== null && !\Erebot\Utils::stringifiable($source)) {
            throw new \Erebot\InvalidValueException('Not a valid nickname');
        }

        $this->source = $source;
    }
1160318
public function set_source($value){
		if (is_string($value))
			$value = trim($value);
		$this->source = $value;
	}
413802
public function hydrate($source)
    {
        /**
         * foreach element of the "source" try to find programmatically
         * the correct data model base in the property type and name.
         */
        foreach ($source as $key => $value) {
            $this->set($key, $value);
        }

        return $this;
    }
962146
public function loadSource($source)
    {
        $parser = new Parser();

        list($this->headers, $this->content) = $parser->parsePart($source);
    }