BetterReflection\SourceLocator\Type\SingleFileSourceLocator::__construct PHP Method

__construct() public method

public __construct ( string $filename )
$filename string
    public function __construct($filename)
    {
        parent::__construct();
        $this->filename = (string) $filename;
        if (empty($this->filename)) {
            throw new InvalidFileLocation('Filename was empty');
        }
        if (!file_exists($this->filename)) {
            throw new InvalidFileLocation('File does not exist');
        }
        if (!is_file($this->filename)) {
            throw new InvalidFileLocation('Is not a file: ' . $this->filename);
        }
    }
SingleFileSourceLocator