Esempio n. 1
0
File: Dir.php Progetto: mbcraft/piol
 /**
  * 
  * Construct a directory instance, using a path relative to PIOL_ROOT_PATH.
  * 
  * @param string $path the path of this directory, relative to PIOL_ROOT_PATH as a root.
  * 
  * @api
  */
 public function __construct($path)
 {
     if ($path == "") {
         $path = DS;
     }
     //replace \ with /
     $new_path = str_replace("\\", DS, $path);
     if (substr($new_path, strlen($new_path) - 1, 1) != DS) {
         $new_path = $new_path . DS;
     }
     parent::__construct($new_path);
 }
Esempio n. 2
0
 /**
  *
  * Construct a \Mbcraft\Piol\File instance.
  *
  * @param string $path The path of the file.
  *
  * @api
  */
 public function __construct($path)
 {
     parent::__construct($path);
 }
Esempio n. 3
0
 function __construct($path)
 {
     $new_path = str_replace("\\", DS, $path);
     parent::__construct($new_path);
 }