Esempio n. 1
0
 public static function push($tgzPath)
 {
     $push = new \Pearfarm_Task_Push();
     try {
         $push->run(array('push', $tgzPath));
     } catch (\Pearfarm_TaskArgumentException $ex) {
         pantr::writeln($ex->getMessage(), pantr::ERROR);
         pantr::log()->error($ex);
     }
 }
Esempio n. 2
0
 public function uploadTree($tree, $stack = array())
 {
     foreach ($tree as $k => $file) {
         if (is_int($k)) {
             $lpath = implode('/', $stack) . '/' . $file;
             $this->ftp->put($file, $lpath);
             $this->progressBar->incProgress();
             pantr::log()->notice('ftp upload ' . $lpath);
         } else {
             array_push($stack, $k);
             $this->ftp->mkdir($k);
             $this->ftp->cd($k);
             $this->uploadTree($file, $stack);
             $this->ftp->cdup();
             array_pop($stack);
         }
     }
 }
Esempio n. 3
0
/**
 * Log a message at a priority.
 * If called with no arguments at all, this method will return
 * the current Zend_Log instance.
 *
 * @param  string   $message   Message to log
 * @param  integer  $priority  Priority of message
 * @param  mixed    $extras    Extra information to log in event
 * @return void
 * @throws Zend_Log_Exception
 */
function log($message = null, $priority = null, $extras = null)
{
    return pantr::log($message, $priority, $extras);
}