Simple, High performance PHP framework written in C.
API Services Framework (or simply Asf). It's has many micro-innovation and is a new generation of lightweight MVC framework.
- 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
- PHP 7.0, PHP 7.1, PHP 7.2, PHP 7.3, PHP 7.4
- GCC 4.4.0+ (Recommended GCC 4.8+)
git clone https://github.com/yulonghu/asf.git
Provide two installation methods. Select No.1, Use the following methods to install the extension:
cd asf/travis
sudo ./install -i /path/to/phpize -c /path/to/php-config
Select No.2, PHP extension standard installation:
cd asf/asf
/path/to/phpize
./configure --with-php-config=/path/to/php-config
make && make install
extension=asf.so
Restart the web server
http://www.box3.cn/phpasf/index.html
/php-bin-path/php asf-src/tools/asf_project.php /to-path/project_name
+ public
| - index.php
+ config
| - config.php
+ library
+ modules
| - Bootstrap.php
| - Constants.php
+ api
|+ services
|- Index.php // Default service
|+ logics
|+ daos
<?php
$configs = array(
'asf' => array(
'root_path' => APP_PATH . '/modules',
)
);
return $configs;
<?php
define('APP_PATH', dirname(__DIR__));
$app = new Asf_Application(APP_PATH . '/config/config.php');
$app->run();
<?php
class IndexService
{
public function indexAction()
{
return 'Hello World';
}
}
{
"errno": 0,
"data": "Hello World"
}
Asf is open source software under the PHP License v3.01