Example #1
0
 /**
  * @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);
 }
Example #2
0
 /**
  * @see    Url::set
  * @param  $url string
  * @throws Exception
  */
 public function __construct($url = '')
 {
     parent::__construct($url);
 }