timosh/php-activerecord-profiler-service

安装此插件以在silex profiler中显示SQL查询

v1.1 2016-08-25 17:02 UTC

This package is not auto-updated.

Last update: 2024-09-14 19:31:20 UTC


README

PHP ActiveRecordProfilerService for Silex2。实际上,要使用它,您必须安装php activerecord服务提供程序 https://packagist.org.cn/packages/timosh/php-activerecord-service-provider(它将phpactiverecord.org集成到您的项目中),要使用profiler,您必须安装silex profiler和twig。

#使用

$app->register(new \ActiveRecordServiceProvider\ActiveRecord(array(
        'ar.model_path'   => __DIR__.'/Model',
        'ar.default_connection' => 'development',
        'ar.connections' => array(
            'development' => 'mysql://user:password@host/database'
        ),
        'db.active_record.logger'=> new ActiveRecordServiceProvider\Logger(), //here we enabling our logger
    ))
);