Exemplo n.º 1
0
 /**
  * @param       $template
  * @param       $path
  * @param array $arguments
  *
  * @return $this
  */
 protected function create($template, $path, array $arguments = [])
 {
     if (file_exists($path)) {
         return $this;
     }
     check_directory($path);
     $content = $this->getTemplate($template, $arguments);
     File::put($path, $content);
     return $this;
 }
Exemplo n.º 2
0
}
if (function_exists('get_current_user')) {
    echo 'B. running user ' . get_current_user() . " \n";
} else {
    echo 'B. running user ' . 'NOT available' . " \n";
}
if (function_exists('getmyuid')) {
    echo 'C. script owner ' . getmyuid() . " \n";
} else {
    echo 'C. script owner ' . 'NOT available' . " \n";
}
define('ROOT', dirname(__FILE__));
define('APPLICATION_PATH', ROOT . '/application');
define('LIBRARY_PATH', ROOT . '/library');
define('FILES_DIR', ROOT . '/upload');
// place where we will upload project files
define('CACHE_DIR', ROOT . '/cache');
define('THEMES_DIR', ROOT . '/public/assets/themes');
define('PLUGINS_DIR', APPLICATION_PATH . '/plugins');
check_directory(ROOT);
check_directory(APPLICATION_PATH);
check_directory(LIBRARY_PATH);
check_directory(FILES_DIR);
check_directory(CACHE_DIR);
check_directory(PLUGINS_DIR);
check_directory(ROOT . '/config');
check_directory(ROOT . '/public');
check_file(ROOT . '/config/config.php');
check_file(ROOT . '/cache/autoloader.php');
check_file(ROOT . '/cache/trace.txt');
check_file(ROOT . '/cache/log.php');