Tag:twig

  • Hyperf publishes session, minimalist dB, zookeeper configuration center components and supports twig / plates view engine support

    Time:2019-11-22

    Update content Major new additions updated this weekMinimal DB components,Zookeeper configuration center, andSession component, and addedTwigandPlatesThe support of view engine and the support of cluster execution are added to the planning task component.Minimal DB componentsIt mainly provides support for scenarios that want simplicity and performance as the primary demands, without the need for a large […]

  • Developing a PHP-MVC Framework Based on PSR-0 Coding Specification (I)

    Time:2019-5-1

    I. Entry Documents. Index.php <?php header(‘Content-type:text/html;charset=utf-8’); date_default_timezone_set(‘PRC’); require_once(__DIR__.’/configs/Website.php’); require_once(__DIR__.’/frame/Common/Function.php’); require_once(__DIR__.’/frame/App.php’); spl_autoload_register(‘frame\App::autoload’); frame\App::run(); ?> 2. Site global configuration file. Configs/Website.php <?php define(‘BASEPATH’,dirname(dirname(__FILE__))); define(‘APP’,BASEPATH.’/app’); define(‘CTRL’,BASEPATH.’/app/Controllers’); define(‘CTRLNAMESPACE’,’app\Controllers\\’); define(‘DEBUG’,TRUE); 3. Global Routing Profile. Configs/Routes.php <?php /* * Routing structure * array( *’Namespace’=> array( *’Routing Alias’=>’[email protected]’ * ) * ) */ return array( ‘Home’=>array( ‘index-index’=>’[email protected]’, ‘index/test’=>’[email protected]’, ), ‘Admin’=>array( ‘login’=>’[email protected]’ ), […]

  • Yaf-example

    Time:2019-4-7

    Yaf is a PHP framework written in C language by Brother Bird. Yaf document address: http://yaf.laruence.com/manual/ In fact, I contacted Yaf a long time ago, but I just learned and didn’t understand and use it in depth. However, due to the recent reconstruction of a project, and the framework used in the reconstruction is the […]