當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ObjectIdentity::getIdentifier方法代碼示例

本文整理匯總了PHP中Symfony\Component\Security\Acl\Domain\ObjectIdentity::getIdentifier方法的典型用法代碼示例。如果您正苦於以下問題:PHP ObjectIdentity::getIdentifier方法的具體用法?PHP ObjectIdentity::getIdentifier怎麽用?PHP ObjectIdentity::getIdentifier使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Symfony\Component\Security\Acl\Domain\ObjectIdentity的用法示例。


在下文中一共展示了ObjectIdentity::getIdentifier方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: underlying

 /**
  * Constructs an underlying ObjectIdentity for given ObjectIdentity
  * Underlying is class level ObjectIdentity for given object level ObjectIdentity.
  *
  * @param ObjectIdentity $oid
  * @return ObjectIdentity
  * @throws InvalidAclException
  */
 public function underlying(ObjectIdentity $oid)
 {
     if ($oid->getIdentifier() === self::ROOT_IDENTITY_TYPE || $oid->getIdentifier() === ($extensionKey = $this->extensionSelector->select($oid)->getExtensionKey())) {
         throw new InvalidAclException(sprintf('Cannot get underlying ACL for %s', $oid));
     }
     return new ObjectIdentity($extensionKey, $oid->getType());
 }
開發者ID:ashutosh-srijan,項目名稱:findit_akeneo,代碼行數:15,代碼來源:ObjectIdentityFactory.php

示例2: getObjectIdentity

 /**
  * Retrieve the document associated with the values in the ObjectIdentity
  *
  * @param ObjectIdentity $oid
  * @return \Doctrine\MongoDB\Cursor
  */
 protected function getObjectIdentity(ObjectIdentity $oid)
 {
     $query = array("identifier" => $oid->getIdentifier(), "type" => $oid->getType());
     return $this->connection->selectCollection($this->options['oid_collection'])->findOne($query);
 }
開發者ID:netvlies,項目名稱:MongoDBAclBundle,代碼行數:11,代碼來源:AclProvider.php

示例3: getOidKey

 protected function getOidKey(ObjectIdentity $oid)
 {
     return $oid->getIdentifier() . $oid->getType();
 }
開發者ID:Maksold,項目名稱:platform,代碼行數:4,代碼來源:RootBasedAclProviderTest.php

示例4: getKey

 /**
  * Gets a key used to store ACL in $this->items collection
  *
  * @param OID $oid
  * @return string
  */
 protected function getKey(OID $oid)
 {
     return $oid->getType() . '!' . $oid->getIdentifier();
 }
開發者ID:Maksold,項目名稱:platform,代碼行數:10,代碼來源:AclManager.php

示例5: testConstructorWithProxy

 public function testConstructorWithProxy()
 {
     $id = new ObjectIdentity('fooid', 'Acme\\DemoBundle\\Proxy\\__CG__\\Symfony\\Component\\Security\\Tests\\Acl\\Domain\\TestDomainObject');
     $this->assertEquals('fooid', $id->getIdentifier());
     $this->assertEquals('Acme\\DemoBundle\\Proxy\\__CG__\\Symfony\\Component\\Security\\Tests\\Acl\\Domain\\TestDomainObject', $id->getType());
 }
開發者ID:laubosslink,項目名稱:lab,代碼行數:6,代碼來源:ObjectIdentityTest.php

示例6: testConstructor

 public function testConstructor()
 {
     $id = new ObjectIdentity('fooid', 'footype');
     $this->assertEquals('fooid', $id->getIdentifier());
     $this->assertEquals('footype', $id->getType());
 }
開發者ID:nickaggarwal,項目名稱:sample-symfony2,代碼行數:6,代碼來源:ObjectIdentityTest.php


注:本文中的Symfony\Component\Security\Acl\Domain\ObjectIdentity::getIdentifier方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。