Phalcon helper
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.gitignore
.travis.yml
LICENSE
README.md
composer.json
phpunit.xml

README.md

x-phalcon-helper

Phalcon helper

Build Status

获取依赖注入服务

<?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');