Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yulonghu/asf
Simple, High performance PHP framework written in C
https://github.com/yulonghu/asf
asf c framework php php7
Last synced: 6 days ago
JSON representation
Simple, High performance PHP framework written in C
- Host: GitHub
- URL: https://github.com/yulonghu/asf
- Owner: yulonghu
- License: other
- Created: 2018-05-04T03:18:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-21T15:02:28.000Z (about 3 years ago)
- Last Synced: 2024-11-26T11:22:43.786Z (29 days ago)
- Topics: asf, c, framework, php, php7
- Language: C
- Homepage: http://www.box3.cn/phpasf
- Size: 382 KB
- Stars: 239
- Watchers: 5
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-php-extensions - asf - 网站框架 (网站框架)
README
# Asf - API Services Framework
[![Build Status](https://travis-ci.org/yulonghu/asf.svg?branch=master)](https://travis-ci.org/yulonghu/asf)Simple, High performance PHP framework written in C.
## Introduction
API Services Framework (or simply Asf). It's has many micro-innovation and is a new generation of lightweight MVC framework.## Features
- The class provided by the framework, loaded when the PHP process starts, and resident in memory.
- Errno = 999, PHP fatal error interception.
- Strong early warning mechanism (DB, Cache, Script, PHP Error).
- Support for Logger Buffer Cache
- Support for GPC methods, making it easier to use PHP global variables ($_GET, $_POST, $_COOKIE)
- Support for configuration file resident memory
- Support for faster, easier-to-operate cookie management## Install
### Requirements
- PHP 7.0, PHP 7.1, PHP 7.2, PHP 7.3, PHP 7.4
- GCC 4.4.0+ (Recommended GCC 4.8+)### DownLoad
```
git clone https://github.com/yulonghu/asf.git
```### Compile for Linux/Unix/Mac
Provide two installation methods.
Select No.1, Use the following methods to install the extension:```bash
cd asf/travis
sudo ./install -i /path/to/phpize -c /path/to/php-config
```Select No.2, PHP extension standard installation:
```bash
cd asf/asf
/path/to/phpize
./configure --with-php-config=/path/to/php-config
make && make install
```#### Add the extension to your php.ini
```ini
extension=asf.so
```Restart the web server
### Documentation
http://www.box3.cn/phpasf/index.html
## Get Started
### Use tools to create a new project
```
/php-bin-path/php asf-src/tools/asf_project.php /to-path/project_name
```
#### Layout
```
+ public
| - index.php
+ config
| - config.php
+ library
+ modules
| - Bootstrap.php
| - Constants.php
+ api
|+ services
|- Index.php // Default service
|+ logics
|+ daos
```### config/config.php
```php
array(
'root_path' => APP_PATH . '/modules',
)
);return $configs;
```### public/index.php
```php
run();
```### Default service
```php