Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Finds whether a variable is an object
<?php is_object(mixed $value): bool
<?php $object = data_get($freshInstance, $objectName, null);
if (is_object($object)) {
$isInitialized = (new \ReflectionProperty($object, (string) $propertyName))->isInitialized($object);
} else {
$isInitialized = false;
<?php static::$shortCircuitCreateCall = false;
foreach ($components as $name => $class) {
if (is_object($class)) $class = $class::class;
if (is_numeric($name)) {
app('livewire')->component($class);
<?php app('livewire')->component($key, $value);
}
}
} elseif (is_object($name)) {
$anonymousClassComponent = $name;
$name = str()->random(10);
<?php static function match($target)
{
return is_object($target) && $target instanceof Wireable;
}
function dehydrate($target, $dehydrateChild)
<?php function isDiscoverable($classOrName)
{
if (is_object($classOrName)) {
$classOrName = get_class($classOrName);
}
<?php protected function getNameAndClass($nameComponentOrClass)
{
$nameOrClass = is_object($nameComponentOrClass) ? $nameComponentOrClass::class : $nameComponentOrClass;
if (class_exists($nameOrClass) && is_subclass_of($nameOrClass, Component::class)) {
<?php {
if (isset($this->aliases[$name])) {
if (is_object($this->aliases[$name])) return $this->aliases[$name]::class;
return $this->aliases[$name];
}
<?php protected function classToName($class)
{
$resolvedAliases = array_map(fn ($i) => is_object($i) ? get_class($i) : $i, $this->aliases);
if ($name = array_search($class, $resolvedAliases)) return $name;
<?php $childKey = str($path)->afterLast('.');
if ($parent && is_object($parent) && property_exists($parent, $childKey) && Utils::propertyIsTyped($parent, $childKey)) {
$type = Utils::getProperty($parent, $childKey)->getType();
$types = $type instanceof ReflectionUnionType ? $type->getTypes() : [$type];
<?php public static $key = 'enm';
static function match($target) {
return is_object($target) && is_subclass_of($target, 'BackedEnum');
}
static function matchByType($type) {
<?php public function getPolicyFor($class)
{
if (is_object($class)) {
$class = get_class($class);
}
<?php public function queue($event)
{
if ($event instanceof ShouldBroadcastNow ||
(is_object($event) &&
method_exists($event, 'shouldBroadcastNow') &&
$event->shouldBroadcastNow())) {
return $this->app->make(BusDispatcherContract::class)->dispatchNow(new BroadcastEvent(clone $event));
<?php 'The expected chain can not be empty.'
);
if (collect($expectedChain)->contains(fn ($job) => is_object($job))) {
$expectedChain = collect($expectedChain)->map(fn ($job) => serialize($job))->all();
} else {
$chain = collect($this->chained)->map(fn ($job) => get_class(unserialize($job)))->all();
<?php foreach ($keys as $key) {
if (Arr::accessible($item) && Arr::exists($item, $key)) {
$result[$key] = $item[$key];
} elseif (is_object($item) && isset($item->{$key})) {
$result[$key] = $item->{$key};
}
}
<?php } else {
$itemKey = data_get($item, $key);
if (is_object($itemKey) && method_exists($itemKey, '__toString')) {
$itemKey = (string) $itemKey;
}