当前位置: 首页>>代码示例>>PHP>>正文


PHP Line::show方法代码示例

本文整理汇总了PHP中Line::show方法的典型用法代码示例。如果您正苦于以下问题:PHP Line::show方法的具体用法?PHP Line::show怎么用?PHP Line::show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Line的用法示例。


在下文中一共展示了Line::show方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: show

 /**
  * Show the prompt to user and return the answer.
  *
  * @return mixed
  */
 public function show()
 {
     /**
      * Ask for a number and validate it.
      */
     do {
         $valid = true;
         $number = parent::show();
         if ($number === "" && !$this->allowEmpty) {
             $valid = false;
         } elseif ($number === "") {
             $number = null;
         } elseif (!is_numeric($number)) {
             $this->getConsole()->writeLine("{$number} is not a number\n");
             $valid = false;
         } elseif (!$this->allowFloat && round($number) != $number) {
             $this->getConsole()->writeLine("Please enter a non-floating number, i.e. " . round($number) . "\n");
             $valid = false;
         } elseif ($this->max !== null && $number > $this->max) {
             $this->getConsole()->writeLine("Please enter a number not greater than " . $this->max . "\n");
             $valid = false;
         } elseif ($this->min !== null && $number < $this->min) {
             $this->getConsole()->writeLine("Please enter a number not smaller than " . $this->min . "\n");
             $valid = false;
         }
     } while (!$valid);
     /**
      * Cast proper type
      */
     if ($number !== null) {
         $number = $this->allowFloat ? (double) $number : (int) $number;
     }
     return $this->lastResponse = $number;
 }
开发者ID:idwsdta,项目名称:INIT-frame,代码行数:39,代码来源:Number.php

示例2: Table

     $scDbTable->showInsertMask();
 }
 // --------------------------------------------------
 //  Bearbeiten-Maske
 // --------------------------------------------------
 if (isset($_REQUEST["DbTableUpdate" . $scDbTable->TABLENAME])) {
     $scDbTable->doUpdate();
 }
 $updateMask = $scDbTable->getUpdateAllMask();
 $updateMask->show();
 $spc->setHeight(10);
 $spc->show();
 $newBtn = $scDbTable->getNewEntryButton();
 $newBtn->show();
 $spc->show();
 $ln->show();
 $spc->setHeight(20);
 $spc->show();
 // --------------------------------------------------
 //  Zuordnungen
 // --------------------------------------------------
 if (isset($_REQUEST['SelectedCronToEdit'])) {
     $_SESSION['SelectedCronToEdit'] = $_REQUEST['SelectedCronToEdit'];
 }
 $table = new Table(array("", ""));
 $table->setWidth("100%");
 $ttlZuord = new Title("Zuordnungen bearbeiten");
 $ttlZuord->setAlign("left");
 $rTitle = $table->createRow();
 $rTitle->setAttribute(0, $ttlZuord);
 $rTitle->setSpawnAll(true);
开发者ID:CyborgOne,项目名称:cybihomecontrol_ui,代码行数:31,代码来源:CronConfig.php

示例3: showLogContent

 function showLogContent()
 {
     $div = new Div();
     $div->setWidth("100%");
     $div->setHeight("250");
     $div->setStyle("white-space", "nowrap");
     $output = array();
     $tmp = exec("tail -n " . $this->getLinesToShow() . " " . $this->getPath(), $output);
     foreach (array_reverse($output) as $out) {
         $tx = new Text($out . "<br>", 2, false, false, false, false);
         $div->add($tx);
     }
     $ln = new Line();
     $ln->show();
     $div->show();
     $ln->show();
 }
开发者ID:CyborgOne,项目名称:cybihomecontrol_ui,代码行数:17,代码来源:LogFile.php


注:本文中的Line::show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。