UninitializedStub example

$className = $class->name;

        foreach ($class->getProperties() as $p) {
            if ($p->isStatic()) {
                continue;
            }

            $classProperties[match (true) {
                $p->isPublic() => $p->name,
                $p->isProtected() => self::PREFIX_PROTECTED.$p->name,
                default => "\0".$className."\0".$p->name,
            }] = new UninitializedStub($p);
        }

        if ($parent = $class->getParentClass()) {
            $classProperties += self::$classProperties[$parent->name] ??= self::getClassProperties($parent);
        }

        return $classProperties;
    }
}
Home | Imprint | This part of the site doesn't use cookies.