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