本文整理匯總了PHP中Source::setSource方法的典型用法代碼示例。如果您正苦於以下問題:PHP Source::setSource方法的具體用法?PHP Source::setSource怎麽用?PHP Source::setSource使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Source
的用法示例。
在下文中一共展示了Source::setSource方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: htmlspecialchars
<?php
session_start();
header('Content-type: application/json');
require_once "source_interface.php";
require_once "source_actions.php";
require_once "project_test_source.php";
require_once "plugin_test_source.php";
require_once "source.php";
$report_type = htmlspecialchars($_GET['report_type']);
$source = new Source();
if ($report_type == 'project_src_test') {
$source->setSource(Source::PROJECT);
$source->generateSource();
echo $source->getSource();
} else {
if ($report_type == 'third_party_plugins_test') {
$source->setSource(Source::PLUGIN);
$source->generateSource();
echo $source->getSource();
}
}
示例2: Source
<?php
header('Content-type: application/json');
require_once "source_interface.php";
require_once "source_actions.php";
require_once "plugin_test_source.php";
require_once "source.php";
$source = new Source();
session_start();
$source->setSource(Source::PLUGIN);
if (isset($_SESSION[PluginTestSource::TMPSESSIONNAME])) {
echo $source->getSource();
}
示例3: Source
<?php
header('Content-type: application/json');
require_once "source_interface.php";
require_once "source_actions.php";
require_once "project_test_source.php";
require_once "source.php";
$source = new Source();
session_start();
$source->setSource(Source::PROJECT);
if (isset($_SESSION[ProjectTestSource::TMPSESSIONNAME])) {
echo $source->getSource();
}