Screen\Injection\LocalPath::__construct PHP Метод

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

LocalPath constructor.
public __construct ( string $url )
$url string Local file path
    public function __construct($url)
    {
        $filePath = realpath($url);
        if (!$filePath || !file_exists($filePath)) {
            throw new FileNotFoundException($filePath);
        }
        $this->src = self::sanitize($filePath);
    }

Usage Example

Пример #1
0
 public function __construct()
 {
     $path = __DIR__ . '/../../../scripts/facebook-hide-login.js';
     parent::__construct($path);
 }