limingxinleo / x-phalcon-helper
Phalcon Helper Functions
Installs: 3 180
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=5.5
- ext-phalcon: ^3.0
Requires (Dev)
- phalcon/dd: ^1.0
- phpunit/phpunit: >=4.8
- vlucas/phpdotenv: ^2.4
This package is auto-updated.
Last update: 2024-10-17 19:18:34 UTC
README
Phalcon helper
获取依赖注入服务
<?php use Phalcon\Config; use Phalcon\Di\FactoryDefault; $di = new FactoryDefault(); $di->setShared('config', function () { return new Config([ 'version' => '0.0.1', 'application' => [ 'logDir' => __DIR__ . '/../logs/', ], ]); }); $config = di('config');
获取系统环境变量
<?php $name = env('name','limx');