Exemple #1
0
 public function __construct($modelName, $data = null)
 {
     $this->_modelName = $modelName;
     if (!empty($data)) {
         $this->_data->setData($data);
     } else {
         $this->_data = new ArrayStorage(ModelOperator::getInstance()->getModelStructure($modelName));
     }
 }
Exemple #2
0
 /**
  * @param $data
  * @changed
  * @param null $deepKey
  */
 public static function setConfig($data, $deepKey = null)
 {
     if (empty(self::$_config)) {
         self::$_config = new ArrayStorage();
     }
     if ($deepKey) {
         self::$_config->setDeepValue($deepKey, $data);
     } else {
         self::$_config->setData($data);
     }
 }