Download the PHP package kassko/data-mapper-bundle without Composer
On this page you can find all versions of the php package kassko/data-mapper-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package data-mapper-bundle
data-mapper-bundle
This bundle integrates the data-mapper component into Symfony applications. Which is a mapper that provides a lot of features to represent some raw data as objects.
To know more about this component and how to use it, please read the data-mapper documentation reference.
Installation on Symfony 2
Note that:
- The second version number is used when compatibility is broken
- The third for new feature
- The fourth for hotfix
- The first for new API or to go from pre-release to release (from 0 to 1)
Using a version in 0.14
is recommended.
Versions in 0.15
are no longer maintained.
You can install the library with composer and here is a good requirement:
Register the bundle in app/AppKernel.php
:
- DataMapper service
- Configuration reference
- Expression language integration
- Expression language services
- Add a provider
- Object listener
- Custom loader
DataMapper service
Get the service from your controller:
It represents a Kassko\DataMapper\DataMapper
instance. To know more about this component and how to use it, please read the data-mapper documentation reference.
Configuration reference
(1) availables types are annotations, yaml, php, php_file, yaml_file. And maybe others, feel free to add custom mapping loaders.
Expression language integration
Expression language services
Add a provider
With the code above, the container is available in your provider. You can use it:
Object listener
The data-mapper needs to be able to retrieve an object listener from its full qualified class name. In order to do that, you have to register your object listener as a service and tag it with kassko_data_mapper.listener
.
To know more about object listener, please read the data-mapper documentation reference.
Custom loader
DataMapper provide three formats for mapping: annotations
, yaml
and php
. But you can use a custom mapping loader.
For more details about how to implement your custom loader, please read the data-mapper documentation reference.
Use a service in a persistent object without injecting it
You need to add it in the registry. You can do that by this way.
Tag your service:
And then you can get your service from your persistent object:
All versions of data-mapper-bundle with dependencies
doctrine/common Version ^2.4|^3.0
symfony/framework-bundle Version ^2.6|^3.0|^4.0|^5.0
symfony/twig-bundle Version ^2.4|^3.0|^4.0|^5.0
zendframework/zend-stdlib Version ^2.3|^3.0
kassko/data-mapper Version ^1.0
kassko/class-resolver-bundle Version ^1.0