-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
102 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Mapping reference | ||
|
||
## Annotations | ||
|
||
To use annotations in your entities, you must import the `ZfrRest\Resource\Metadata\Annotation` namespace: | ||
|
||
```php | ||
use ZfrRest\Resource\Metadata\Annotation as REST; | ||
``` | ||
|
||
### Resource | ||
|
||
Allow to define mapping when a resource is accessed as a single resource. | ||
|
||
Attributes: | ||
|
||
* `controller`: FQCN of the controller (pulled from the controller plugin manager) | ||
* `inputFilter`: FQCN of the input filter (pulled from the input filter plugin manager) | ||
* `hydrator`: FQCN of the hydrator (pulled from the hydrator plugin manager). | ||
|
||
### Collection | ||
|
||
Allow to define mapping when a resource is accessed as a collection. | ||
|
||
Attributes: | ||
|
||
* `controller`: FQCN of the controller (pulled from the controller plugin manager) | ||
* `hydrator`: FQCN of the hydrator (pulled from the hydrator plugin manager). | ||
|
||
### Association | ||
|
||
Only allowed at property level. It allows to make an association traversable. | ||
|
||
Attributes: | ||
|
||
* `path`: allow to customize the URI from which the association is accessible (default to the property's name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters