Download the PHP package mero/base-bundle without Composer
On this page you can find all versions of the php package mero/base-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package base-bundle
MeroBaseBundle
Symfony Bundle with additional features.
Requeriments
- PHP 5.4.9 or above
- Symfony 2.7 or above(including Symfony 3)
Instalation with composer
- Open your project directory;
- Run
composer require mero/base-bundle
to add MeroBaseBundle in your project vendor; - Open my/project/dir/app/AppKernel.php;
- Add
Mero\Bundle\BaseBundle\MeroBaseBundle()
.
Symfony validators
Applies to | Options | Class | Validator | Description |
---|---|---|---|---|
property or method | message | DateRange | DateRangeValidator | Validates date range |
Basic usage
Brazilian validators in the new version
The brazilian validators feature has been migrated to the package mero/br-validator-bundle.
AbstractController to Symfony Controllers
Abstract controller with basic methods for easy identification framework resources.
Name | Atributes | Return type | Description |
---|---|---|---|
getCurrentRequest | - | Request | Gets the cuurrent request |
getActionName | - | string | Gets the action name |
getBundleName | Request $request | string | Gets the bundle name |
getRouteName | Request $request | string | Gets the route name |
wsResponse | $data, int $status, array $headers, string $format | Response | Return a new JSON or XML response |
Usage example:
Doctrine ORM entities
Name | Type | Description | Address |
---|---|---|---|
IdTrait | Trait | Create the primary key integer field | Mero\Bundle\BaseBundle\Entity\Field\IdTrait |
UuidTrait | Trait | Create the primary key UUID field | Mero\Bundle\BaseBundle\Entity\Field\UuidTrait |
CreatedTrait | Trait | Create field to store the creation date | Mero\Bundle\BaseBundle\Entity\Field\CreatedTrait |
ModifiedTrait | Trait | Create field to store the date of last change | Mero\Bundle\BaseBundle\Entity\Field\ModifiedTrait |
AbstractEntity | Abstract Class | Classic entity superclass using integer identifier | Mero\Bundle\BaseBundle\Entity\AbstractEntity |
AbstractEntityWithUuid | Abstract Class | Entity superclass using UUID identifier | Mero\Bundle\BaseBundle\Entity\AbstractEntityWithUuid |
Usage example with AbstractEntity:
Usage example with AbstractEntityWithUuid:
Usage example with Traits:
Twig extensions
Country
Gets name of the country based on the ISO 3166-1 alpha 2. Example: entity.getCountry() is a value generated by the type of form country.
Language
Gets name of the language based on the unicode language identifier. Example: entity.getLanguage() is a value generated by the type of form language.
Helpers
className
Gets name of the class. This helper was added to facilitate applications using PHP 5.4. Use of this feature is discouraged if you are using PHP 5.5 or above due to the native implementation added in the language.
All versions of base-bundle with dependencies
ext-intl Version *