本文整理汇总了PHP中Factory::getExtensionsService方法的典型用法代码示例。如果您正苦于以下问题:PHP Factory::getExtensionsService方法的具体用法?PHP Factory::getExtensionsService怎么用?PHP Factory::getExtensionsService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Factory
的用法示例。
在下文中一共展示了Factory::getExtensionsService方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: showAllServiceGroups
function showAllServiceGroups()
{
require_once __DIR__ . '/../../../../lib/Gocdb_Services/Factory.php';
$scope = '%%';
if (!empty($_GET['scope'])) {
$scope = $_GET['scope'];
}
$scopes = \Factory::getScopeService()->getScopes();
$sgKeyNames = "";
if (isset($_GET['sgKeyNames'])) {
$sgKeyNames = $_GET['sgKeyNames'];
}
$sgKeyValues = "";
if (isset($_GET['selectedSGKeyValue'])) {
$sgKeyValues = $_GET['selectedSGKeyValue'];
}
$sGroups = \Factory::getServiceGroupService()->getServiceGroups($scope, $sgKeyNames, $sgKeyValues);
$exServ = \Factory::getExtensionsService();
/* Doctrine will provide keynames that are the same even when selecting distinct becase the object
* is distinct even though the name is not unique. To avoid showing the same name repeatdly in the filter
* we will load all the keynames into an array before making it unique
*/
$keynames = array();
foreach ($exServ->getServiceGroupExtensionsKeyNames() as $extension) {
$keynames[] = $extension->getKeyName();
}
$keynames = array_unique($keynames);
$params['sGroups'] = $sGroups;
$params['scopes'] = $scopes;
$params['selectedScope'] = $scope;
$params['selectedSGKeyName'] = $sgKeyNames;
$params['selectedSGKeyValue'] = $sgKeyValues;
$params['sgKeyName'] = $keynames;
show_view("service_group/view_all.php", $params);
}
示例2: drawSEs
function drawSEs()
{
define("RECORDS_PER_PAGE", 30);
require_once __DIR__ . '/../../../../lib/Gocdb_Services/Factory.php';
$seServ = \Factory::getServiceService();
$exServ = \Factory::getExtensionsService();
$startRecord = 1;
if (isset($_REQUEST['record'])) {
$startRecord = $_REQUEST['record'];
}
// Validation, ensure start record >= 1
if ($startRecord < 1) {
$startRecord = 1;
}
$searchTerm = "";
if (!empty($_REQUEST['searchTerm'])) {
$searchTerm = $_REQUEST['searchTerm'];
}
//strip leading and trailing whitespace off search term
$searchTerm = strip_tags(trim($searchTerm));
if (1 === preg_match("/[';\"]/", $searchTerm)) {
throw new Exception("Invalid char in search term");
}
$serviceType = "";
if (isset($_REQUEST['serviceType'])) {
$serviceType = $_REQUEST['serviceType'];
}
$production = "";
if (isset($_REQUEST['production'])) {
$production = $_REQUEST['production'];
}
$monitored = "";
if (isset($_REQUEST['monitored'])) {
$monitored = $_REQUEST['monitored'];
}
$scope = "";
if (isset($_REQUEST['scope'])) {
$scope = $_REQUEST['scope'];
}
$ngi = "";
if (isset($_REQUEST['ngi'])) {
$ngi = $_REQUEST['ngi'];
}
//must be done before the if certstatus in the block that sets $certStatus
$showClosed = false;
if (isset($_REQUEST['showClosed'])) {
$showClosed = true;
}
$servKeyNames = "";
if (isset($_REQUEST['servKeyNames'])) {
$servKeyNames = $_REQUEST['servKeyNames'];
}
$servKeyValues = "";
if (isset($_REQUEST['selectedServKeyValue'])) {
$servKeyValues = $_REQUEST['selectedServKeyValue'];
}
$certStatus = "";
if (!empty($_REQUEST['certificationStatus'])) {
$certStatus = $_REQUEST['certificationStatus'];
//set show closed as true if production status selected is 'closed' - otherwise
// there will be no results
if ($certStatus == 'Closed') {
$showClosed = true;
}
}
$thisPage = 'index.php?Page_Type=Services';
if ($serviceType != "") {
$thisPage .= '&serviceType=' . $serviceType;
}
if ($searchTerm != "") {
$thisPage .= '&searchTerm=' . $searchTerm;
}
if ($production != "") {
$thisPage .= '&production=' . $production;
}
if ($monitored != "") {
$thisPage .= '&monitored=' . $monitored;
}
if ($scope != "") {
$thisPage .= '&scope=' . $scope;
}
if ($ngi != "") {
$thisPage .= '&ngi=' . $ngi;
}
if ($certStatus != "") {
$thisPage .= '&certStatus=' . $certStatus;
}
if ($showClosed != "") {
$thisPage .= '&showClosed=' . $showClosed;
}
if ($servKeyNames != "") {
$thisPage .= '&servKeyNames=' . $servKeyNames;
}
if ($servKeyValues != "") {
$thisPage .= '&servKeyValues=' . $servKeyValues;
}
if ($searchTerm != null || $searchTerm != "") {
if (substr($searchTerm, 0, 1) != '%') {
$searchTerm = '%' . $searchTerm;
}
//.........这里部分代码省略.........
示例3: showAllSites
function showAllSites()
{
require_once __DIR__ . '/../../../../lib/Gocdb_Services/Factory.php';
$exServ = \Factory::getExtensionsService();
// Do we really need to validate the URL parameter values, as the query
// to the DB always uses bind variables to protect against injection?
require_once __DIR__ . '/../../../../lib/Gocdb_Services/Validate.php';
$validatorService = new \org\gocdb\services\Validate();
$ngi = '%%';
if (!empty($_GET['NGI'])) {
$ngi = $_GET['NGI'];
if (!$validatorService->validate('ngi', 'NAME', $ngi)) {
throw new Exception("Invalid NGI parameter value");
}
}
$prodStatus = '%%';
if (!empty($_GET['prodStatus'])) {
$prodStatus = $_GET['prodStatus'];
}
//must be done before the if certstatus in the block that sets $certStatus
$showClosed = false;
if (isset($_GET['showClosed'])) {
$showClosed = true;
}
$certStatus = '%%';
if (!empty($_GET['certStatus'])) {
$certStatus = $_GET['certStatus'];
//set show closed as true if production status selected is 'closed' - otherwise
// there will be no results
if ($certStatus == 'Closed') {
$showClosed = true;
}
}
// Site extension property key name
$siteKeyNames = "";
if (isset($_GET['siteKeyNames'])) {
$siteKeyNames = $_GET['siteKeyNames'];
}
// Site extension property key value
$siteKeyValues = "";
if (isset($_GET['selectedSiteKeyValue'])) {
$siteKeyValues = $_GET['selectedSiteKeyValue'];
}
$scope = '%%';
if (!empty($_GET['scope'])) {
$scope = $_GET['scope'];
}
$serv = \Factory::getSiteService();
$params['scopes'] = \Factory::getScopeService()->getScopes();
$params['sites'] = $serv->getSitesBy($ngi, $prodStatus, $certStatus, $scope, $showClosed, null, $siteKeyNames, $siteKeyValues);
$params['NGIs'] = $serv->getNGIs();
$params['prodStatuses'] = $serv->getProdStatuses();
//Remove SC and PPS infrastructures from drop down list. TODO: Delete this block once they no longer exist
$SCInfrastructure = $serv->getProdStatusByName('SC');
$PPSInfrastructure = $serv->getProdStatusByName('PPS');
$productionStatuses = array();
foreach ($params['prodStatuses'] as $ps) {
if ($ps != $SCInfrastructure and $ps != $PPSInfrastructure) {
$productionStatuses[] = $ps;
}
}
$params['prodStatuses'] = $productionStatuses;
//delete up to here once pps and sc infrastructures have been removed from database
/* Doctrine will provide keynames that are the same even when selecting distinct becase the object
* is distinct even though the name is not unique. To avoid showing the same name repeatdly in the filter
* we will load all the keynames into an array before making it unique
*/
$keynames = array();
foreach ($exServ->getSiteExtensionsKeyNames() as $extension) {
$keynames[] = $extension->getKeyName();
}
$keynames = array_unique($keynames);
$params['selectedNgi'] = $ngi;
$params['certStatuses'] = $serv->getCertStatuses();
$params['selectedProdStatus'] = $prodStatus;
$params['selectedCertStatus'] = $certStatus;
$params['selectedScope'] = $scope;
$params['showClosed'] = $showClosed;
$params['siteKeyNames'] = $keynames;
$params['selectedSiteKeyNames'] = $siteKeyNames;
$params['selectedSiteKeyValue'] = $siteKeyValues;
show_view("site/view_all.php", $params, "Sites");
}