当前位置: 首页>>代码示例>>PHP>>正文


PHP ObjectIdentity::getType方法代码示例

本文整理汇总了PHP中Symfony\Component\Security\Acl\Domain\ObjectIdentity::getType方法的典型用法代码示例。如果您正苦于以下问题:PHP ObjectIdentity::getType方法的具体用法?PHP ObjectIdentity::getType怎么用?PHP ObjectIdentity::getType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\Security\Acl\Domain\ObjectIdentity的用法示例。


在下文中一共展示了ObjectIdentity::getType方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getOidKey

 protected function getOidKey(ObjectIdentity $oid)
 {
     return $oid->getIdentifier() . $oid->getType();
 }
开发者ID:Maksold,项目名称:platform,代码行数:4,代码来源:RootBasedAclProviderTest.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: 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

示例4: 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

示例5: 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

示例6: getAllowedPermissions

 /**
  * {@inheritdoc}
  */
 public function getAllowedPermissions(ObjectIdentity $oid)
 {
     if ($oid->getType() === ObjectIdentityFactory::ROOT_IDENTITY_TYPE) {
         $result = array_keys($this->permissionToMaskBuilderIdentity);
     } else {
         $config = $this->entityMetadataProvider->getMetadata($oid->getType());
         $result = $config->getPermissions();
         if (empty($result)) {
             $result = array_keys($this->map);
         }
         $metadata = $this->getMetadata($oid);
         if (!$metadata->hasOwner()) {
             foreach ($result as $key => $value) {
                 if (in_array($value, array('ASSIGN', 'SHARE'))) {
                     unset($result[$key]);
                 }
             }
         }
     }
     return $result;
 }
开发者ID:Maksold,项目名称:platform,代码行数:24,代码来源:EntityAclExtension.php

示例7: getAllowedPermissions

 /**
  * {@inheritdoc}
  */
 public function getAllowedPermissions(ObjectIdentity $oid)
 {
     if ($oid->getType() === ObjectIdentityFactory::ROOT_IDENTITY_TYPE) {
         $result = array_keys($this->permissionToMaskBuilderIdentity);
     } else {
         $config = new EntitySecurityMetadata();
         $result = $config->getPermissions();
         if (empty($result)) {
             $result = array_keys($this->map);
         }
     }
     return $result;
 }
开发者ID:paulclarkin,项目名称:pim-community-dev,代码行数:16,代码来源:EntityAclExtension.php


注:本文中的Symfony\Component\Security\Acl\Domain\ObjectIdentity::getType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。