Skip to content

Config Service

Configurations

Config Service Provider

PROVIDER_CONFIG=\Zemit\Provider\Config\ServiceProvider

Config Configurations Object

<?php
new Config([
    // global config
    'phalcon' => [],
    'core' => [],
    'app' => [],
    'php' => [],
    'debug' => [],
    'response' => [],
    'identity' => [],
    'models' => [],
    'providers' => [],
    'logger' => [],
    'filters' => [],
    'modules' => [],
    'router' => [],
    'gravatar' => [],
    'reCaptcha' => [],
    'aws' => [],
    'locale' => [],
    'translate' => [],
    'session' => [],
    'module' => [],
    'security' => [],
    'cache' => [],
    'metadata' => [],
    'annotations' => [],
    'mailer' => [],
    'cookies' => [],
    'oauth2' => [],
    'dotenv' => [],
    'client' => [],
    'permissions' => [],
    // ...
]);

Config Service (config)

Config Service Provider

Config Service Provider (config): \Zemit\Provider\Config\ServiceProvider

<?php
// Retrieving the service from an Injectable
$config = $this->config;

// Retrieving the service from the DI
$config = $this->di->get('config');

// Retrieving the service from the getDI()
$config = $this->getDI()->get('config');

// Retrieving the service from anywhere
$config = Di::getDefault()->get('config');