本文整理汇总了PHP中Tinebase_Container::resetClassCache方法的典型用法代码示例。如果您正苦于以下问题:PHP Tinebase_Container::resetClassCache方法的具体用法?PHP Tinebase_Container::resetClassCache怎么用?PHP Tinebase_Container::resetClassCache使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tinebase_Container
的用法示例。
在下文中一共展示了Tinebase_Container::resetClassCache方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testAccountAnyoneDisabled
public function testAccountAnyoneDisabled()
{
$container = new Tinebase_Model_Container(array('name' => 'tine20shared', 'type' => Tinebase_Model_Container::TYPE_SHARED, 'owner_id' => Tinebase_Core::getUser(), 'backend' => 'Sql', 'application_id' => Tinebase_Application::getInstance()->getApplicationByName('Addressbook')->getId()));
$grants = new Tinebase_Record_RecordSet('Tinebase_Model_Grants', array(array('account_id' => '0', 'account_type' => Tinebase_Acl_Rights::ACCOUNT_TYPE_ANYONE, Tinebase_Model_Grants::GRANT_READ => true, Tinebase_Model_Grants::GRANT_EXPORT => true, Tinebase_Model_Grants::GRANT_SYNC => true)), TRUE);
$sharedContainer = $this->_instance->addContainer($container, $grants);
$readGrant = $this->_instance->hasGrant(Tinebase_Core::getUser(), $sharedContainer, Tinebase_Model_Grants::GRANT_READ);
$this->assertTrue($readGrant);
Tinebase_Config::getInstance()->set(Tinebase_Config::ANYONE_ACCOUNT_DISABLED, TRUE);
Tinebase_Core::getCache()->clean();
$readGrant = $this->_instance->resetClassCache('hasGrant')->hasGrant(Tinebase_Core::getUser(), $sharedContainer, Tinebase_Model_Grants::GRANT_READ);
$this->assertFalse($readGrant);
}