當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Console::writeLn方法代碼示例

本文整理匯總了PHP中Console::writeLn方法的典型用法代碼示例。如果您正苦於以下問題:PHP Console::writeLn方法的具體用法?PHP Console::writeLn怎麽用?PHP Console::writeLn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Console的用法示例。


在下文中一共展示了Console::writeLn方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: fork

 /**
  * @brief Fork the process, sending it to the background.
  * 
  * Remember to check the return value in order to figure out if the fork
  * was successful, and exit your application gracefully if true. This
  * method does NOT return the new pid. Use getLastPid() to retrieve the
  * pid of the new child process.
  * 
  * @param boolean $quiet If false, the fork status will be displayed
  * @return boolean True in the forked code, false in code calling fork.
  */
 protected function fork($quiet = true)
 {
     $pid = pcntl_fork();
     if ($pid == -1) {
         throw new CriticalException("pcntl_fork() failed!");
     } elseif ($pid == 0) {
         $this->servicemain();
         return true;
     } else {
         $this->_last_pid = $pid;
         if (!$quiet) {
             Console::writeLn("Forked to new pid %d", $pid);
         }
         return false;
     }
 }
開發者ID:noccy80,項目名稱:lepton-ng,代碼行數:27,代碼來源:application.php

示例2: inspect

 public function inspect()
 {
     Console::writeLn('Inspecting model %s:', $this->model);
     foreach ($this->_data as $field => $data) {
         Console::writeLn('  %s = %s', $field, $data);
     }
 }
開發者ID:noccy80,項目名稱:lepton-ng,代碼行數:7,代碼來源:model.php

示例3: extensions

 function extensions()
 {
     $cb = 0;
     Console::writeLn(__astr("\\b{Loaded extensions:}"));
     $ext = get_loaded_extensions();
     sort($ext);
     foreach ($ext as $val) {
         Console::write('  %-18s', $val);
         $cb++;
         if ($cb > 3 && $val != end($ext)) {
             Console::writeLn();
             $cb = 0;
         }
     }
     Console::writeLn();
     Console::writeLn();
 }
開發者ID:noccy80,項目名稱:lepton-ng,代碼行數:17,代碼來源:info.php

示例4: config

 function config()
 {
     Console::write("Reading configuration metadata ... ");
     Console::status('dbx           ');
     sleep(1);
     Console::status('dbx.db        ');
     sleep(1);
     Console::status('dbx.db.mysql  ');
     sleep(1);
     Console::writeLn('done          ');
     Console::writeLn("Parsing configuration file ... done");
     Console::writeLn("Preparing options ... done");
 }
開發者ID:noccy80,項目名稱:lepton-ng,代碼行數:13,代碼來源:baseactions.php

示例5: getFiles

 public function getFiles()
 {
     Console::write("Reading file database: ");
     $fn = 'zip://' . $this->packagename . '#' . $this->filedb;
     Console::write("%s ... ", $fn);
     $fh = fopen($fn, 'r');
     $files = array();
     while (!feof($fh)) {
         $fl = fgets($fh);
         while (strpos($fl, "  ") !== false) {
             $fl = str_replace("  ", " ", $fl);
         }
         $fd = explode(" ", str_replace("\n", "", $fl));
         $files[] = array('filename' => $fd[1], 'md5' => $fd[0]);
     }
     Console::writeLn("Done");
     return $files;
 }
開發者ID:noccy80,項目名稱:lepton-ng,代碼行數:18,代碼來源:l2package.php


注:本文中的Console::writeLn方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。