API / Minn\Runtime / Registered

Registered final class

Minn\Runtime\Registered · public/minn/src/Minn/Runtime/Registered.php · 188 lines

What is registered, looked up the way WordPress's lookups answer: post types, post statuses and taxonomies by name, or listed by their flags (as names or the objects); whether one exists, is hierarchical or viewable; and the features a post type supports. A name that is not text or a number finds nothing.

Public

staticpostType(mixed $type): ?object#

A post type's object (get_post_type_object), or null.

staticpostTypes(mixed $args = array ( ), mixed $output = 'names', mixed $operator = 'and'): array#

The post types whose flags match (get_post_types): all of them (and), any (or) or none (not), as names or as the shared objects, so a flag a plugin changed on one is what the list reads.

@return array<string, mixed>
staticpostTypeExists(mixed $type): bool#

Whether a post type is registered (post_type_exists).

staticsupports(mixed $type, mixed $feature): bool#

Whether a post type supports a feature (post_type_supports).

statichierarchicalType(mixed $type): bool#

Whether a post type is hierarchical (is_post_type_hierarchical).

staticviewableType(mixed $type): bool#

Whether a post type, by name or its object, can be viewed on the site (is_post_type_viewable), as the filter leaves it.

staticstatus(mixed $status): ?object#

A post status's object (get_post_status_object), or null.

staticstatuses(mixed $args = array ( ), mixed $output = 'names', mixed $operator = 'and'): array#

The post statuses whose flags match (get_post_stati), as names or objects.

@return array<string, mixed>
staticviewableStatus(mixed $status): bool#

Whether posts in a status, by name or its object, can be viewed on the site (is_post_status_viewable): never an internal or protected one; then the filter.

statictaxonomy(mixed $taxonomy): object|false#

A taxonomy's object (get_taxonomy), or false.

statictaxonomies(mixed $args = array ( ), mixed $output = 'names', mixed $operator = 'and'): array#

The taxonomies whose flags match (get_taxonomies), as names or objects.

@return array<string, mixed>
statictaxonomyExists(mixed $taxonomy): bool#

Whether a taxonomy is registered (taxonomy_exists).

statichierarchicalTaxonomy(mixed $taxonomy): bool#

Whether a taxonomy is hierarchical (is_taxonomy_hierarchical).

staticviewableTaxonomy(mixed $taxonomy): bool#

Whether a taxonomy, by name or its object, can be queried on the site (is_taxonomy_viewable).

staticobjectInTaxonomy(mixed $objectType, mixed $taxonomy): bool#

Whether a taxonomy is registered for an object type (is_object_in_taxonomy).

staticobjectTaxonomies(mixed $objectType, mixed $output = 'names'): array#

The taxonomies registered for any of the object types given (get_object_taxonomies): a list of names, or the objects by name.

@return array<array-key, mixed>
staticforAttachments(mixed $output = 'names'): array#

The taxonomies registered for attachments, of any file type (get_taxonomies_for_attachments): a list of names, or the objects by name.

@return array<array-key, mixed>

Internals 1

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privatelisted(array $objects, mixed $args, mixed $operator, mixed $output): array#

Objects kept when their fields match (all, any or none of them, as the operator says; every one when nothing is asked), as names when the output asked is "names", else the objects.

$objectsarray<string, object>
@return array<string, mixed>