BetterReflection\SourceLocator\Type\StringSourceLocator::__construct PHP Метод

__construct() публичный Метод

public __construct ( string $source )
$source string
    public function __construct($source)
    {
        parent::__construct();
        $this->source = (string) $source;
        if (empty($this->source)) {
            // Whilst an empty string is still "valid" PHP code, there is no
            // point in us even trying to parse it because we won't find what
            // we are looking for, therefore this throws an exception
            throw new EmptyPhpSourceCode('Source code string was empty');
        }
    }