/** * @param string $file * @return File */ public function set($file) { if (substr($file, -1) === '/') { $file = substr($file, 0, -1); } $length = strlen(constant('ROOT_DIR')); if ($length) { if (substr($file, 0, $length) !== constant('ROOT_DIR')) { $file = constant('ROOT_DIR') . $file; } } return parent::set($file); }
/** * @see Url::set * @param $url string * @throws Exception */ public function __construct($url = '') { parent::__construct($url); }