ZenTaoPHP is a lightweight, efficient, friendly and loose MVC development framework. Licensed under LGPL agreement. The main functions of the ZenTaoPHP framework are as follows:
1. Single entry mode
Single entrance is a popular development method nowadays. The benefit is that you can have centralized control. Or maybe a relatively basic thing about the framework is a single entrance. Now the ZenTaoPHP framework supports two entry files in web mode and command line mode. For specific examples, you can view the two files demo/www/index.php and cli/call under the app directory.
2. MVC
ZenTaoPHP supports MVC development. However, compared with the various template implementations of other frameworks, ZenTaoPHP does not try to develop a new template system, but uses PHP as the template language. This is the fastest solution and the simplest one.
3. Support PATH_INFO and GET calling methods
It supports calling /user/info/id/123.html and also supports calling index.php?m=user&f=info&id=123. If you can control your running environment, you can use PATH_INFO.
4. Support multi-language functions
ZT supports multiple language functions and will automatically determine which language to use based on the current user client information.
5. Support multiple styles and functions
6. Automatic code generator
In the cli application, basic code generator functions are implemented, which can initialize the directory structure of an application and create a module based on a table.
7. Support multiple applications.
Different applications can be created under the app directory, and each application can have its own module, configuration, and entry file.
8. Support PDO
Database encapsulation uses PDO. In fact, PDO is already well encapsulated, so ZT does not do another layer of encapsulation and just uses PDO's native method.
9. Configuration and language can be referenced through objects
Configuration files and language files are configured through arrays. After being loaded by the ZT framework, they are converted into objects. So it can be referenced in the template like this: $config->xxx, $lang->aaa. Currently, it supports two dimensions, such as $lang->user->id.
10. What you see is API
Under the current trend of open platforms, it is more important to have a very good API mechanism. In ZT, every interface can become an API. As for the API, it is distinguished by the extension name it accesses. For example, if you visit user/read/id/123.html, a normal web page will be returned. If the access is user/read/id/123.json, then the data in json format will be returned. Basically, your method does not need to be changed. You only need to add a json template file.
11. Support calls between modules
One module can call the model file of another module, and then combine various business logic to complete its own functions.
Expand