Config\Adapter\Php

Class Phalcon\Config\Adapter\Php

extends class Phalcon\Config

implements Countable, ArrayAccess

Reads php files and converts them to Phalcon\Config objects. Given the next configuration file:

<?php
  return array(
  'database' => array(
      'adapter' => 'Mysql',
      'host' => 'localhost',
      'username' => 'scott',
      'password' => 'cheetah',
      'dbname' => 'test_db'
  ),

  'phalcon' => array(
      'controllersDir' => '../app/controllers/',
      'modelsDir' => '../app/models/',
      'viewsDir' => '../app/views/'
  ));

You can read it as follows:
$config = new Phalcon\Config\Adapter\Php("path/config.php");
echo $config->phalcon->controllersDir;
echo $config->datab