Exemplo n.º 1
0
 public function __construct($view, $model, $locale, $conf, $base)
 {
     if (request::isPost() && $model->validatePost()) {
         $base = dir::trim(__DIR__, 0, 2, '\\', true);
         $src = dir::trim(__DIR__, 0, 1, '\\', true);
         $dst = dir::trim(__DIR__, null, 2, '\\', false, true) . request::get('appTitle');
         dir::copy($src, $dst);
         \lib\string::replaceInFile($base, array('../index.php', 'bootstrap.php', 'conf.php', 'conf\\dev.php', 'conf\\prod.php', 'controller.php', 'imodel.php', 'model.php', 'controller\\about.php', 'locale.php', 'locale\\us.php', 'locale\\us\\error.php', 'locale\\us\\label.php', 'locale\\us\\tip.php', 'locale\\us\\phrase.php', 'model\\about.php'), 'appfarm', request::get('appTitle'));
     }
 }
Exemplo n.º 2
0
 /**
  * Set class params with obtained url structure parameters.
  *
  * @return void;
  */
 public function currentDate($withTime = false, $format = null)
 {
     if (empty($format)) {
         $format = $this->dateFormat;
     }
     if ($withTime == true) {
         $format = $format . $this->dateTimeDelimiter . $this->timeFormat;
     } else {
         $format = $format;
     }
     return string::currentDate($format);
 }