本文整理匯總了PHP中stdClass::getWrappedObject方法的典型用法代碼示例。如果您正苦於以下問題:PHP stdClass::getWrappedObject方法的具體用法?PHP stdClass::getWrappedObject怎麽用?PHP stdClass::getWrappedObject使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類stdClass
的用法示例。
在下文中一共展示了stdClass::getWrappedObject方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: exact
/**
* @param \stdClass $object
*/
function it_wraps_non_token_arguments_into_ExactValueToken($object)
{
$this->beConstructedWith(array(42, 'zet', $object));
$class = get_class($object->getWrappedObject());
$hash = spl_object_hash($object->getWrappedObject());
$this->__toString()->shouldReturn("exact(42), exact(\"zet\"), exact({$class}:{$hash} Object (\n 'objectProphecy' => Prophecy\\Prophecy\\ObjectProphecy Object (*Prophecy*)\n))");
}
示例2: sprintf
/**
* @param \stdClass $object
*/
function it_generates_proper_string_representation_for_object($object)
{
$objHash = sprintf('%s:%s', get_class($object->getWrappedObject()), spl_object_hash($object->getWrappedObject()));
$this->beConstructedWith($object);
$this->__toString()->shouldReturn("exact({$objHash} Object (\n 'objectProphecy' => Prophecy\\Prophecy\\ObjectProphecy Object (*Prophecy*)\n))");
}
示例3: sprintf
/**
* @param stdClass $object
*/
function it_generates_proper_string_representation_for_object_without_exporting($object)
{
$objHash = sprintf('%s:%s', get_class($object->getWrappedObject()), spl_object_hash($object->getWrappedObject()));
$this->stringify($object, FALSE)->shouldReturn("{$objHash}");
}
示例4: it_should_use_classname_if_entity_is_no_ResourceInterface
/**
* @param \BjyAuthorize\Service\Authorize $authorizeService
* @param \stdClass $entity
*/
public function it_should_use_classname_if_entity_is_no_ResourceInterface($authorizeService, $entity)
{
$authorizeService->isAllowed(Argument::cetera())->willReturn(true);
$this->mockListenerFactory($authorizeService->getWrappedObject());
$className = get_class($entity->getWrappedObject());
$permission = 'permission';
$this->isAllowed($entity, $permission);
$authorizeService->isAllowed($className, $permission)->shouldBeCalled();
}