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


PHP Source::init方法代碼示例

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


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

示例1: init

 public function init()
 {
     parent::init();
 }
開發者ID:basvandervlies,項目名稱:pakiti3,代碼行數:4,代碼來源:RepositoriesSource.php

示例2: foreach

foreach (Source::getArgList() as $arg) {
    $longopts[] = "from-{$arg}:";
    $longopts[] = "to-{$arg}:";
}
$options = getopt('', $longopts);
if (isset($options['help'])) {
    usage();
}
if (isset($options['test'])) {
    $options = array();
    $options['from-file'] = 'test/dev.sql';
    $options['to-file'] = 'test/live.sql';
}
define('VERBOSE', isset($options['verbose']));
$from = Source::init('from', $options);
$to = Source::init('to', $options);
$differ = new dbStructUpdater();
$to_sql = $to->getStructure();
$from_sql = $from->getStructure();
if (VERBOSE) {
    notice("*** From SQL: {$from} \n");
    echo $from_sql . "\n\n";
    notice('***');
    notice("*** To SQL: {$to} \n");
    echo $to_sql;
    notice('***');
}
$diffs = $differ->getUpdates($to_sql, $from_sql);
$generated = date('r');
echo "\n#\n# Structure difference between '{$from}' and '{$to}'\n#\n# Generated: {$generated}\n#\n# START DIFF;\n\n";
foreach ($diffs as $diff) {
開發者ID:sickhye,項目名稱:mysql-dbcompare,代碼行數:31,代碼來源:dbcompare.php

示例3: init

 public function init()
 {
     parent::init();
     # Get module ID from the DB
 }
開發者ID:basvandervlies,項目名稱:pakiti3,代碼行數:5,代碼來源:CveSource.php


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