Example #1
0
 protected static function init()
 {
     if (!self::$init) {
         self::$uncountable = array_merge(self::$uncountable, Config::getDefault(array('inflector', 'uncountable'), array()));
         self::$irregular = array_merge(self::$irregular, Config::getDefault(array('inflector', 'irregular'), array()));
         self::$init = TRUE;
     }
 }
Example #2
0
File: Uri.php Project: pirey/YMVC
 private function _setUri()
 {
     if (!empty($_GET["action"])) {
         $_GET["action"] = rtrim($_GET["action"], "/");
         $this->_slices = explode("/", $_GET["action"]);
         $this->_controller = $this->_slices[0];
         if (count($this->_slices) > 1 && $this->_slices[1] != "") {
             $this->_action = $this->_slices[1];
         }
         if (count($this->_slices) > 2) {
             $this->_params = array_slice($this->_slices, 2);
         }
     } else {
         $this->_controller = Config::getDefault("controller");
     }
 }
Example #3
0
File: View.php Project: pirey/YMVC
 public function __construct()
 {
     $this->setLayout(Config::getDefault("layout"));
 }
Example #4
0
<?php

$key = $_POST['key'];
$result = array('key' => $key, 'description' => Config::getDescription($key), 'type' => Config::getType($key), 'default_value' => Config::getDefault($key), 'value' => Config::get($key));
echo json_encode($result);