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);
 }