/** * @param string $path The path to the file (MUST BE A VALID URL) * @param mixed $params Additional arguments (could be useful for derivated classes) * @throws EyeInvalidArgumentException * @throws EyeMissingArgumentException * @throws EyeNullPointerException */ public function __construct($path, $params = null) { try { parent::__construct($path, $params); } catch (EyeException $e) { throw new EyeException('Unable to create ' . __CLASS__ . '.', 0, $e); } }
/** * @param string $path The path to the file (MUST BE A VALID URL) * @param mixed $params Additional arguments (could be useful for derivated classes) * @throws EyeInvalidArgumentException * @throws EyeMissingArgumentException * @throws EyeNullPointerException */ public function __construct($path, $params = null) { try { $path = self::autocompletePath($path); } catch (EyeException $e) { throw new EyeInvalidArgumentException($path . ' is not a valid path value.', 0, $e); } try { parent::__construct($path, $params); } catch (EyeException $e) { throw new EyeException('Unable to create ' . __CLASS__ . '.', 0, $e); } }
/** * @param string $path The path to the file (MUST BE A VALID URL) * @param mixed $params Additional arguments (could be useful for derivated classes) * @throws EyeInvalidArgumentException * @throws EyeMissingArgumentException * @throws EyeNullPointerException */ public function __construct($path, $params = null) { try { $urlParts = AdvancedPathLib::parse_url($path); if ($urlParts['scheme'] != self::URL_SCHEME_SYSTEM) { throw new EyeInvalidArgumentException($urlParts['scheme'] . ' is not a valid scheme for system file, expecting ' . self::URL_SCHEME_SYSTEM . '.'); } } catch (EyeException $e) { throw new EyeInvalidArgumentException($path . ' is not a valid path value.', 0, $e); } try { parent::__construct($path, $params); } catch (EyeException $e) { throw new EyeException('Unable to create ' . __CLASS__, 0, $e); } }
/** * @param string $path The path to the file (MUST BE A VALID URL) * @param mixed $params Additional arguments (could be useful for derivated classes) * @throws EyeInvalidArgumentException * @throws EyeMissingArgumentException * @throws EyeNullPointerException */ public function __construct($path, $params = null) { try { $urlParts = EyeosAbstractVirtualFile::parse_url($path); if ($urlParts['scheme'] != self::URL_SCHEME_SHARE) { throw new EyeInvalidArgumentException($urlParts['scheme'] . ' is not a valid scheme for user file, expecting ' . self::URL_SCHEME_SHARE . '.'); } } catch (EyeException $e) { throw new EyeInvalidArgumentException($path . ' is not a valid path value.', 0, $e); } if (isset($urlParts['principalname']) && $urlParts['path'] != '/') { throw new EyeInvalidArgumentException($path . ' is not a valid URL value: the path part should be empty.'); } try { parent::__construct($path, $params); } catch (EyeException $e) { throw new EyeException('Unable to create ' . __CLASS__ . '.', 0, $e); } }