Download the PHP package adrotec/breeze.server.php without Composer
On this page you can find all versions of the php package adrotec/breeze.server.php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package breeze.server.php
Project Status: 🚨 Unmaintained 🚨
This project is no longer maintained. We will not be accepting pull requests, addressing issues, nor making future releases.
breeze.server.php
Featured in Official BreezeJS docs
This project is a PHP library that facilitates building Breeze JS compatible backends using Doctrine
Features:
- Framework agnostic
- Generates Breeze metadata from Doctrine mappings
- Expands graphs of related entites using EAGER loading with joins
- Serializes query results to JSON with JMSSerializer
- Handles saving Breeze payloads with Doctrine Unit of Work
- Supports breeze validations with Symfony Validator Component
- Supports breeze inheritance and polymorphic queries. Only Single Table Inheritance and Class Table Inheritance are supported in both server and client. But you can use Mapped Superclasses in the server without any fear.
Doctrine
a well documented, feature rich and popular Object Relational Mapper for PHP which supports several database systems
Why use Doctrine? (extracted from doctrine website)
- Around since 2006 with very stable, high-quality codebase.
- Extremely flexible and powerful object-mapping and query features.
- Support for both high-level and low-level database programming for all your use-cases.
- Large Community and integrations with many different frameworks (Symfony, Zend Framework, CodeIgniter, FLOW3, Lithium and more
Currently this library supports Doctrine ORM only. Future versions should support Doctrine MongoDB ODM too.
Some of the Doctrine Types are converted into Breeze Data Types
Built in Doctrine types with their breeze equivalent types
string
-String
- SQL VARCHAR to a PHP string.integer
-Int32
- SQL INT to a PHP integer.smallint
-Int32
- SMALLINT to a PHP integer.bigint
-Int32
- BIGINT to a PHP string.boolean
-Boolean
- SQL boolean to a PHP boolean.decimal
-Decimal
- SQL DECIMAL to a PHP double.date
-DateTime
- SQL DATETIME to a PHP DateTime object.time
-DateTime
- SQL TIME to a PHP DateTime object.datetime
-DateTime
- SQL DATETIME/TIMESTAMP to a PHP DateTime object.float
-Double
- SQL Float (Double Precision) to a PHP double. IMPORTANT: Works only with locale settings that use decimal points as separator.- Other data types fall back to
String
JMS Serializer
a powerful serialization library for PHP. Provides more control over your serialized results. e.g: if you want to exclude a property from returned results, you may use the @Exclude annotation. Read the documentation to find out more.
Symfony Validator Component
(Optional, if you want to support validation) a powerful validation service for PHP with out of box support for Doctrine.
Please note that, by using the Symfony components, it does not necessarily mean you have to use the full stack symfony framework, since they are decoupled and standalone components.
Some of the Validation Constraints are converted to equivalent breeze validators.
Built in Validation Constraints with their Breeze equivalent validators
- Luhn - creditCard
- Email - emailAddress
- Length - maxLength
- Regex - regularExpression
- NotBlank - required
- Url - url
Example/Demo
- Featured - EmpDirectory sample application
- Basic - https://github.com/adrotec/breeze.server.php.demo
Installation
The library uses composer, the package manager for PHP.
add these lines to your composer.json
and run composer update
Please note that symfony/validator - 2.6+
is required by "adrotec/breeze.server.php"
since the library relies on ConstraintViolation::getConstraint()
method which is not (yet) available in the older versions.
Usage
The library provides a basic framework to easily bootstrap the API. You may use either Application
or StandaloneApplication
class.
Using the Application
class
Using the StandaloneApplication
class
With Symfony 2
There's a bundle for that!
All versions of breeze.server.php with dependencies
doctrine/orm Version >=2.4
jms/serializer Version ~1.0
adrotec/odataphpprod Version 1.1.*