Download the PHP package zf3belcebur/doctrine-orm-fast-api without Composer
On this page you can find all versions of the php package zf3belcebur/doctrine-orm-fast-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package doctrine-orm-fast-api
zf3belcebur-doctrine-orm-fast-api
Quickly create an automatic API CRUD with your Doctrine ORM connection
See
Installation
Installation of this module uses composer. For composer documentation, please refer to getcomposer.org.
Then add ZF3Belcebur\DoctrineORMFastApi
to your config/application.config.php
How to use?
ZF3Belcebur\DoctrineORMFastApi\Controller\IndexController
extends AbstractRestfulController
and provide the automatic code to all methods.
- All views return a JsonModel
Config your custom route, by default /bapi
Get available api's
- go to url
/bapi
get list
- go to url
/bapi/entity-name
get list
- get EntityManager or Paginator Object from route params
get list with filter
- go to url
/bapi/entity-name?propertyOrRelationName=propertyOrRelationValue
- To filter with a boolean you need to convert to an integer
- /bapi/product?enable=1
- /bapi/product?enable=1&family=7
Get
- Do a GET requesto to url
/bapi/entity-name/identifierValue
- /bapi/product/25687
Update
- /bapi/product/25687
- Do a PUT request to url
/bapi/entity-name/identifierValue
- PUT -> /bapi/product/25687
Create
- PUT -> /bapi/product/25687
- Do a POST request to url
/bapi/entity-name/identifierValue
- POST -> /bapi/product/25687
DELETE
- POST -> /bapi/product/25687
- Do a DELETE request to url
/bapi/entity-name/identifierValue
- DELETE -> /bapi/product/25687
Form validation
- If you need to validate data with a ZendForm just add the formName to the url to get it from the FormElementManager
- /bapi/product/25687/my-form-name
Naming strategy
Add new strategies
- You can add other strategies by fieldName, fieldType, or relation.
Examples
-
First Add your strategies by type or by name in your config file
- Remove the
reflection-file-path
file to regenerate configuration. By Defaultgetcwd() . '/config/autoload/zf3belcebur-doctrine-orm-fast-api.global.php'
Custom extract function
- use
\ZF3Belcebur\DoctrineORMFastApi\Resource\DoctrineORMFastApiInterface
in your entity to implements your custom method
Default Config
All versions of doctrine-orm-fast-api with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.1
zendframework/zend-filter Version 2.*
doctrine/doctrine-module Version 2.*
doctrine/doctrine-orm-module Version 2.*
zendframework/zend-filter Version 2.*
doctrine/doctrine-module Version 2.*
doctrine/doctrine-orm-module Version 2.*
The package zf3belcebur/doctrine-orm-fast-api contains the following files
Loading the files please wait ....