本文整理汇总了PHP中core_kernel_classes_Class::removePropertyValueByLg方法的典型用法代码示例。如果您正苦于以下问题:PHP core_kernel_classes_Class::removePropertyValueByLg方法的具体用法?PHP core_kernel_classes_Class::removePropertyValueByLg怎么用?PHP core_kernel_classes_Class::removePropertyValueByLg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core_kernel_classes_Class
的用法示例。
在下文中一共展示了core_kernel_classes_Class::removePropertyValueByLg方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testRightModels
public function testRightModels()
{
$namespaces = common_ext_NamespaceManager::singleton()->getAllNamespaces();
$localNamespace = $namespaces[LOCAL_NAMESPACE . '#'];
// In tao context, the only one model which is updatable
$updatableModels = core_kernel_persistence_smoothsql_SmoothModel::getUpdatableModelIds();
$this->assertEquals(1, count($updatableModels));
$this->assertEquals(1, $localNamespace->getModelId());
$readableModels = core_kernel_persistence_smoothsql_SmoothModel::getReadableModelIds();
$this->assertTrue(count($readableModels) > 3);
$this->assertTrue(array_search(1, $readableModels) !== false);
$this->assertTrue(array_search(2, $readableModels) !== false);
$this->assertTrue(array_search(3, $readableModels) !== false);
$this->assertTrue(array_search(4, $readableModels) !== false);
// Try to delete a resource of a locked model
$property = new core_kernel_classes_Property(RDFS_LABEL);
$domain = new core_kernel_classes_Property(RDFS_DOMAIN, __METHOD__);
$this->assertFalse($property->removePropertyValues($domain, array('pattern' => RDFS_LABEL)));
// Try to remove a property value which is lg dependent of a locked model
$clazz = new core_kernel_classes_Class('http://www.tao.lu/middleware/Rules.rdf#And');
$this->assertFalse($clazz->removePropertyValueByLg($property, 'EN'));
}