本文整理汇总了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();
}