ziimple / zen
Zen is a microframework to enable a more declarative approach to PHP application development
Requires
- aws/aws-sdk-php: ^3.52.17
- phpmailer/phpmailer: ^6.0
- stripe/stripe-php: ^5.6
Requires (Dev)
- phpdocumentor/phpdocumentor: ^2.9
- phpunit/phpunit: ^6.4
This package is not auto-updated.
Last update: 2018-11-18 14:02:53 UTC
README
<<<<<<< HEAD
What is Zen?
Zen is a simple micro-framework aims to speed up development of application classes with PHP by providing a declaractive approach to application units within PHP. Zen seperates data (and metadata) away from the programming so code can be more abstract and more adaptive to more scenarios.
Zen includes a full Object Mapper so you can declare the commands to use and simply calling them using simple one-line code for various scenario since often code require more than just CRUD...
How is it different?
Zen is made up of a bunch of goodies:
- A bunch of PHP classes
- Adapters for quick and easy access to services
- Feature based interfaces =======
What does Zen do?
Zen is a declarative PHP framework that allow you to write code and deploy faster. Apart from OR Mapping, Zen also comes with a workflow engine, data access, plus a bunch of plug-in enabled services so you can deploy faster and get things running.
What is inside?
- OR Mapping with metadata split outside the class - allow self containing declaration of metadata
- Allow cascading inheriting metadata - so you do not need to rewrite metadata from parent classes.
- Document Centric Workflow engine allowing CRUD of data plus a big bunch of goodies.
- Built in macro engine - allow you to do some common Excel like tasks within your declarative metadata
- Caching control so you can store code and run them faster
- Built-in SMTP and messaging engine using PHPMailer to save you the hassle.
v0.0.0-A1
Installing Zen
Since Zen is loaded on Packagist so you can use composer to load the whole package
composer require ziimple/zen
<<<<<<< HEAD
=======
** Note: ** Zen will write data into JSON format, so this can be used in MySQL or NoSQL, which ever form of DB you like.
## Example Usage
Here is a simple class declared using Zen framework:
```
<?php
namespace Test
use \Zen\ZenObject as master;
use \Zen
class Person extends master {
// Here we assume the load and write functions will be XXX_PERSON_XXX depending on your metadata setup
const SQL_PDX_PFX = "PERSON";
// That's pretty much it... unless you have custom functions...
//
// all CRUD functions are provided by ZenObject
public function __something__() {
// do something
}
}
And in the metadata it will look something like this
<?xml version="1.0" encoding="UTF-8"?>
<instance>
<commands>
<command id="load" method="SPV_{instance}_GET">
<fields>
<field column="{instance}_ID">
<source>instance</source>
<data>id</data>
</field>
</fields>
</command>
</commands>
<metadata>
<data name="name" type="json">
<data name="first" type="string" required="true" />
<data name="last" type="string" required="true" />
</data>
<data name="email" type="string" />
</metadata>
</instance>
That's pretty much it to create a class to run!
v0.0.0-A1