本文整理汇总了PHP中Main::run方法的典型用法代码示例。如果您正苦于以下问题:PHP Main::run方法的具体用法?PHP Main::run怎么用?PHP Main::run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Main
的用法示例。
在下文中一共展示了Main::run方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
<th>QAS Geo</th>
<th>QAS Queue</th>
<th>type of errors</th>
<th>error name</th>
<th>qty</th>
</tr>
</thead>
<tbody class="highlight-row"></tbody>
</table>
</div>
</fieldset>
</body>
</html>
<?php
} else {
echo Main::run();
}
class Main
{
public static function run()
{
// DataBase Connection
$connection = mysql_connect("localhost", "stgq6", "bluehost");
if (!$connection) {
die("DataBase connection failed: " . mysql_error());
}
// Selects data base
$db_select = mysql_select_db("stgq6", $connection);
if (!$db_select) {
die("DataBase selection failed: " . mysql_error());
}
示例2: ampersand
$this->Template->request = ampersand($this->Environment->request);
$this->Template->top = $GLOBALS['TL_LANG']['MSC']['backToTop'];
$this->Template->modules = $this->User->navigation();
$this->Template->home = $GLOBALS['TL_LANG']['MSC']['home'];
$this->Template->backToTop = $GLOBALS['TL_LANG']['MSC']['backToTop'];
$this->Template->expandNode = $GLOBALS['TL_LANG']['MSC']['expandNode'];
$this->Template->collapseNode = $GLOBALS['TL_LANG']['MSC']['collapseNode'];
$this->Template->loadingData = $GLOBALS['TL_LANG']['MSC']['loadingData'];
$this->Template->coreOnlyMode = $GLOBALS['TL_LANG']['MSC']['coreOnlyMode'];
$this->Template->isCoreOnlyMode = $GLOBALS['TL_CONFIG']['coreOnlyMode'];
// Front end preview links
if (CURRENT_ID != '') {
// Pages
if ($this->Input->get('do') == 'page') {
$this->Template->frontendFile = '?page=' . CURRENT_ID;
} elseif ($this->Input->get('do') == 'article') {
$objArticle = $this->Database->prepare("SELECT id, pid, alias, inColumn FROM tl_article WHERE id=?")->limit(1)->execute(CURRENT_ID);
if ($objArticle->numRows) {
$this->Template->frontendFile = '?page=' . $objArticle->pid . '&article=' . ($objArticle->inColumn != 'main' ? $objArticle->inColumn . ':' : '') . ($objArticle->alias != '' && !$GLOBALS['TL_CONFIG']['disableAlias'] ? $objArticle->alias : $objArticle->id);
}
}
}
$this->Template->output();
}
}
/**
* Instantiate the controller
*/
$objMain = new Main();
$objMain->run();
示例3: params_worker
}
}
public static function params_worker($opt)
{
if (isset($opt["worker"])) {
Crontab::$worker = true;
}
}
public static function params_tasktype($opt)
{
if (isset($opt["tasktype"])) {
Crontab::$taskType = $opt["tasktype"];
}
}
/**
* 记录日志
* @param $message
*/
public static function log_write($message)
{
$now = date("H:i:s");
if (Crontab::$daemon) {
$destination = Crontab::$log_path . "log_" . date("Y-m-d") . ".log";
error_log("{$now} : {$message}\r\n", 3, $destination, '');
}
echo "{$now} : {$message}\r\n";
}
}
//运行
Main::run();
示例4: Spot
$this->spots[] = new Spot(42);
$this->spots[] = new Spot(48);
$this->spots[] = new Scanner(300);
$this->spots[] = new Scanner(305);
$this->spots[] = new Scanner(310);
$this->spots[] = new Scanner(314);
$this->dmx->addDevice(new Spot(6));
$this->dmx->addDevice(new Spot(12));
$this->dmx->addDevice(new Spot(18));
$this->dmx->addDevice(new Spot(24));
$this->dmx->addDevice(new Spot(30));
$this->dmx->addDevice(new Spot(36));
$this->dmx->addDevice(new Spot(42));
$this->dmx->addDevice(new Spot(48));
$this->dmx->addDevice(new Scanner(300));
$this->dmx->addDevice(new Scanner(305));
$this->dmx->addDevice(new Scanner(310));
$this->dmx->addDevice(new Scanner(314));
//$prog=new ProgMorse($this->dmx,"tardis__");
$prog = new DmxHttp\Prog\Rand($this->dmx);
//$prog=new DmxHttp\Prog\RunLight($this->dmx);
//$prog=new ProgCounter($this->dmx);
//$prog=new ProgRamp($this->dmx);
//$prog=new DmxHttp\Prog\Advanced($this->dmx);
$prog->run();
}
}
require __DIR__ . '/vendor/autoload.php';
$main = new Main();
$main->run();
示例5: pushObserver
public function pushObserver(ObserverInterface $observer)
{
$this->observers[] = $observer;
}
public function updateObservers()
{
array_walk($this->observers, function (ObserverInterface $observer) {
$observer->update();
});
}
}
class Main
{
use ObserverTrait;
public function run()
{
new \TestComponents\Component1();
}
}
class Observer1 implements ObserverInterface
{
public function update()
{
echo '<p>' . __CLASS__ . '</p>';
}
}
$app = new Main();
$app->pushObserver(new Observer1());
$app->updateObservers();
$app->run();