<?php is_subclass_of(mixed $object_or_class, string $class, bool $allow_string = true): bool
<?php throw new JsonResourceException("[{$bindable}] is not a valid Statamic API resource"); } if (! is_subclass_of($class, JsonResource::class)) { throw new JsonResourceException("[{$class}] must be a subclass of ".JsonResource::class); } }
<?php foreach ($this->app['files']->files($path) as $file) { $class = $file->getBasename('.php'); $fqcn = $this->app->getNamespace()."{$folder}\\{$class}"; if (is_subclass_of($fqcn, $requiredClass)) { $fqcn::register(); } }