mini\Metadata\MetadataStore
class
Documentation
Registry for metadata instances with auto-building from attributes
Stores Metadata by class name or custom identifiers. Automatically builds metadata from class attributes when accessing unknown classes.
Accessed via Mini::$mini->get(MetadataStore::class) or the metadata() helper.
Example:
$store = Mini::$mini->get(MetadataStore::class);
$store[User::class] = (new Metadata())->title('User')->description('User account');
// Or access directly to auto-build from attributes:
$userMeta = $store->get(User::class); // Builds from attributes if not cached
Inheritance
Extends: mini\Util\InstanceStore
Implements:
ArrayAccess
Countable
IteratorAggregate
Traversable
mini\Contracts\MapInterface
Methods (17)
Documentation missing
Get metadata by key, auto-building from class attributes if needed
Magic getter - auto-builds from attributes if needed
public
offsetExists()
inherited from mini\Util\InstanceStore
Check if a key exists (mirrors WeakMap::offsetExists)
public
offsetGet()
inherited from mini\Util\InstanceStore
Get an instance by key (mirrors WeakMap::offsetGet)
public
offsetSet()
inherited from mini\Util\InstanceStore
Set an instance with type validation (mirrors WeakMap::offsetSet)
public
offsetUnset()
inherited from mini\Util\InstanceStore
Remove an instance (mirrors WeakMap::offsetUnset)
public
count()
inherited from mini\Util\InstanceStore
Get the number of stored instances
public
getIterator()
inherited from mini\Util\InstanceStore
Get iterator for stored instances
public
has()
inherited from mini\Util\InstanceStore
Check if key exists (WeakMap-style method)
public
__set()
inherited from mini\Util\InstanceStore
Set instance by member access
public
set()
inherited from mini\Util\InstanceStore
Set instance with type validation (WeakMap-style method)
public
add()
inherited from mini\Util\InstanceStore
Add instance with type validation (throws if key already exists)
public
delete()
inherited from mini\Util\InstanceStore
Delete instance (WeakMap-style method)
public
keys()
inherited from mini\Util\InstanceStore
Get all stored keys
public
values()
inherited from mini\Util\InstanceStore
Get all stored values
public
getRequiredType()
inherited from mini\Util\InstanceStore
Get the required type for this store