本文整理汇总了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;
}
示例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);
示例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();
}