Exemplo n.º 1
0
 public static function export($value)
 {
     // export value
     if (is_int($value)) {
         return $value;
     }
     if (is_bool($value)) {
         return $value ? 'true' : 'false';
     }
     if (is_array($value)) {
         $var = array_map(function ($itm) {
             return Config::export($itm);
         }, $value);
         return "array(" . implode(",", $var) . ")";
     }
     return "'" . (string) $value . "'";
 }
Exemplo n.º 2
0
 public function testNonExistsFile()
 {
     Config::import('test', '/tmp/' . uniqid());
     $this->setExpectedException('InvalidArgumentException');
     Config::export('test');
 }
Exemplo n.º 3
0
<?php

namespace neam\bootstrap;

require dirname(__FILE__) . DIRECTORY_SEPARATOR . 'common.php';
echo Config::export("shell");