本文整理汇总了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());
}
示例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);
}
示例3: getOidKey
protected function getOidKey(ObjectIdentity $oid)
{
return $oid->getIdentifier() . $oid->getType();
}
示例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();
}
示例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());
}
示例6: testConstructor
public function testConstructor()
{
$id = new ObjectIdentity('fooid', 'footype');
$this->assertEquals('fooid', $id->getIdentifier());
$this->assertEquals('footype', $id->getType());
}