Skip to content

Commit

Permalink
update README and LICENSE
Browse files Browse the repository at this point in the history
  • Loading branch information
alekitto committed Feb 18, 2022
1 parent 7197339 commit 440a7c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Alessandro Chitolina <alekitto@gmail.com>
Copyright (c) 2016-2022 Alessandro Chitolina <alekitto@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,24 @@ class Loader implements LoaderInterface
}
```

If more than one source is available for your metadatas (Annotations, YAMLs, XMLs,
If more than one source is available for your metadata (Annotations, YAMLs, XMLs,
etc.) you can use the `ChainLoader` class, adding your loaders to it.

## Validation

When a metadata is loaded the factory `validate` method is called with the newly loaded
metadata as argument and the `kcs_metadata.metadata_loaded` event is dispatched
(if the event dispatcher is present).
metadata as argument and the `Kcs\Metadata\Event\ClassMetadataLoadedEvent` event is dispatched
(if an event dispatcher is present).
You can extend `validate` or listen for the metadata loaded event and check
for metadata validity. If a validation error occurs you have to throw an
`InvalidMetadataException`.

## Metadata classes

You can extend the provided classes `ClassMetadata`, `MethodMetadata` and `PropertyMetadata`
to build your metadata informations.
By default all the public properties are serialized in cache (if cache is
present). You can customize this behaviour by exteding the `__sleep` method
to build your metadata information.
By default, all the public properties are serialized in cache (if cache is
present). You can customize this behaviour by extending the `__sleep` method
of the metadata classes, returning an array of serialized properties.

## License
Expand Down

0 comments on commit 440a7c0

Please sign in to comment.