예제 #1
0
 function testFixPath()
 {
     $path = dirname(__FILE__);
     $path = str_replace('/', '\\', $path);
     $path = Scaffold_Utils::fix_path($path);
     $this->assertEqual($path, dirname(__FILE__) . '/');
 }
예제 #2
0
 /**
  * Get or set the logging directory.
  *
  * @param   string  new log directory
  * @return  string
  */
 public static function log_directory($dir = NULL)
 {
     if (!empty($dir)) {
         // Get the directory path
         $dir = Scaffold_Utils::fix_path($dir);
         if (is_dir($dir) and is_writable($dir)) {
             // Change the log directory
             self::$log_directory = $dir;
         }
     }
     if (isset(self::$log_directory)) {
         return self::$log_directory;
     }
 }
예제 #3
0
파일: Scaffold.php 프로젝트: robeendey/ce
 /**
  * Adds a path to the include paths list
  *
  * @param 	$path 	The server path to add
  * @return 	void
  */
 public static function add_include_path($path)
 {
     if (func_num_args() > 1) {
         $args = func_get_args();
         foreach ($args as $inc) {
             self::add_include_path($inc);
         }
     }
     if (is_file($path)) {
         $path = dirname($path);
     }
     if (!in_array($path, self::$include_paths)) {
         self::$include_paths[] = Scaffold_Utils::fix_path($path);
     }
 }