Download the PHP package tangoman/entity-helper without Composer
On this page you can find all versions of the php package tangoman/entity-helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package entity-helper
TangoMan Entity Helper
TangoMan Entity Helper provides a collection of traits for common properties to use in your project entities.
Features
- Included asserts with custom messages (french) for property validation.
- Fluent setters for all properties, allowing chaining.
- Magic JsonSerialisable.
Installation
Step 1: Download the Helper
Open a command console, enter your project directory and execute the following command to download the latest stable version of this helper:
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable VichUploader
Since TangoMan Entity Helper requires VichUploaderBundle,
if you plan to use UploadableDocument, or UploadableImage traits,
enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
Step 3: Implement your entities
Add "use" statements inside your entities for desired traits. See below for full list of availlable traits.
Step 4: Update your database schema
Open a command console, enter your project directory and execute the following command to update your database schema:
Usage
Inside your entity class:
Some traits will require your entity class to use Symfony\Component\Validator\Constraints
for validation.
UploadableDocument and UploadableImage traits will require your entity class to use
Vich\UploaderBundle\Mapping\Annotation as Vich
annotation.
src\AppBundle\Entity\FooBar.php
Trait JsonSerializable
Magic method to make your entities jsonserializable.
Allows to use php json_encode()
function on your object.
In order to use php JsonSerializable interface on your object your class must implement \JsonSerializable
src\AppBundle\Entity\FooBar.php
Note
If you find any bug please report here : Issues
License
Copyright (c) 2018 Matthias Morin
Distributed under the MIT license.
If you like TangoMan Entity Helper please star! And follow me on GitHub: TangoMan75 ... And check my other cool projects.
All versions of entity-helper with dependencies
ext-simplexml Version *
php Version >=5.5.0