本文整理汇总了PHP中core_kernel_classes_Resource::setPropertiesValues方法的典型用法代码示例。如果您正苦于以下问题:PHP core_kernel_classes_Resource::setPropertiesValues方法的具体用法?PHP core_kernel_classes_Resource::setPropertiesValues怎么用?PHP core_kernel_classes_Resource::setPropertiesValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core_kernel_classes_Resource
的用法示例。
在下文中一共展示了core_kernel_classes_Resource::setPropertiesValues方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: enableDefaultFeatures
/**
* Set the default Test Runner Features for a newly created delivery
* xx
* @param DeliveryCreatedEvent $event
*/
public static function enableDefaultFeatures(DeliveryCreatedEvent $event)
{
$serviceManager = ServiceManager::getServiceManager();
$testRunnerFeatureService = $serviceManager->get(TestRunnerFeatureService::SERVICE_ID);
$allFeatures = $testRunnerFeatureService->getAll();
$defaultFeatures = [];
foreach ($allFeatures as $feature) {
if ($feature->isEnabledByDefault() === true) {
$defaultFeatures[] = $feature->getId();
}
}
$delivery = new \core_kernel_classes_Resource($event->getDeliveryUri());
$delivery->setPropertiesValues([DeliveryContainerService::TEST_RUNNER_FEATURES_PROPERTY => implode(',', $defaultFeatures)]);
}
示例2: copyPropertyValuesFromTemplateToAssembly
/**
*
* @author Lionel Lecaque, lionel@taotesting.com
* @param core_kernel_classes_Resource $template
* @param core_kernel_classes_Resource $assembly
*/
private function copyPropertyValuesFromTemplateToAssembly(core_kernel_classes_Resource $template, core_kernel_classes_Resource $assembly)
{
$resultServProps = array(TAO_DELIVERY_RESULTSERVER_PROP, TAO_DELIVERY_MAXEXEC_PROP, TAO_DELIVERY_START_PROP, TAO_DELIVERY_END_PROP);
$templatePropsValues = $template->getPropertiesValues($resultServProps);
$allEmpty = true;
foreach ($templatePropsValues as $key => $value) {
if (!empty($value)) {
$allEmpty = false;
break;
}
}
if ($allEmpty == false) {
$assembly->setPropertiesValues($templatePropsValues);
}
}
示例3: createInstanceWithProperties
/**
* (non-PHPdoc)
* @see core_kernel_persistence_ClassInterface::createInstanceWithProperties()
*/
public function createInstanceWithProperties(core_kernel_classes_Class $type, $properties)
{
$returnValue = null;
if (isset($properties[RDF_TYPE])) {
throw new core_kernel_persistence_Exception('Additional types in createInstanceWithProperties not permited');
}
$properties[RDF_TYPE] = $type;
$returnValue = new core_kernel_classes_Resource(common_Utils::getNewUri(), __METHOD__);
$returnValue->setPropertiesValues($properties);
return $returnValue;
}