PHP code example of phalcon-framwork / extensions
1. Go to this page and download the library: Download phalcon-framwork/extensions library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
phalcon-framwork / extensions example snippets
php
use use PhalconExtensions\Volt as VoltExtension;
...
$di->setShared('viewEngineVolt', function (View $view, DI $di) {
...
// 获取编译器对象
$compiler = $viewEngineVolt->getCompiler();
// 添加扩展
$compiler->addExtension(new VoltExtension());
return $viewEngineVolt;
});