PHP code example of phalcon / incubator-config

1. Go to this page and download the library: Download phalcon/incubator-config library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

phalcon / incubator-config example snippets


use Phalcon\Incubator\Config\Adapter\Xml;

$config = new Xml('path/config.xml');

echo $config->phalcon->baseuri;
echo $config->nested->config->parameter;
xml
<root>
  <phalcon>
    <baseuri>/phalcon/</baseuri>
  </phalcon>
  <models>
    <metadata>memory</metadata>
  </models>
  <nested>
    <config>
      <parameter>here</parameter>
    </config>
  </nested>
</root>