Files
2026-03-15 01:27:05 +08:00

45 lines
1.3 KiB
PHP

<?php
return [
"phprs\\Router"=>[
"properties"=>[
"export_apis"=>true, //Enable output api documents, if true, visit http://your-host:port/apis/ to get documents
//,"hooks":["MyHook1","MyHook2"] //Enable hooks
"url_begin"=>1, // if url is "/abc/123", then 1st path node "/abc/" will be ignored.
"api_path"=>__DIR__.'/apis/',
//"default_strict_matching"=>true, //sub path do not match the parent path route in strict mode.
]
],
"phprs\\Invoker"=>[
"properties"=>[
//"cache":"@invokeCache" //cache result of apis(the apis with @cache)
]
]
//if the property "cache" of phprs\\Invoker is set
/**
,
"invokeCache"=>[
"class"=>"phprs\\util\\RedisCache",
"singleton"=>true,
"properties"=>[
"serialize"=>true,
"host"=>"127.0.0.1",
"port"=>"6379"
]
]
*/
//db config sample, and ezphp can work with PDO simply
,
"db"=>[
"singleton"=>true,
"class"=>"PDO",
"pass_by_construct"=>true,
"properties"=>[
"dsn"=>"mysql:host=rm-bp1btyuwq77591x0jpo.mysql.rds.aliyuncs.com:3306;dbname=youlehudong;charset=utf8",
"username"=>"games",
"password"=>"Games0791!!"
]
]
];