public function __construct($path) { $this->path = realpath($path); if (!$this->path) { throw new \InvalidArgumentException("'{$path}' not found"); } }