1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

e_vars moved to model class for now (prevent autoload issues in thumb and cli mod)

This commit is contained in:
secretr 2010-12-11 15:55:24 +00:00
parent a0e0ee73dc
commit b540365c69
3 changed files with 86 additions and 82 deletions

View File

@ -176,7 +176,7 @@ class e107
'e_user_extended_structure_tree' => '{e_HANDLER}user_model.php',
'e_userperms' => '{e_HANDLER}user_handler.php',
'e_validator' => '{e_HANDLER}validator_class.php',
'e_vars' => '{e_HANDLER}e_parse_class.php',
'e_vars' => '{e_HANDLER}model_class.php',
'ecache' => '{e_HANDLER}cache_handler.php',
'news' => '{e_HANDLER}news_class.php',
'notify' => '{e_HANDLER}notify_class.php',

View File

@ -2160,84 +2160,3 @@ class e_parse
}
}
/**
* Data model for e_parse::simpleParse()
* NEW - not inherits core e_object
*/
class e_vars extends e_object
{
/**
* Get data array
*
* @return array
*/
public function getVars()
{
return $this->getData();
}
/**
* Set array data
*
* @param array $array
* @return e_vars
*/
public function setVars(array $array)
{
$this->setData($array);
return $this;
}
/**
* Add array data to the object (merge with existing)
*
* @param array $array
* @return e_vars
*/
public function addVars(array $array)
{
$this->addData($array);
}
/**
* Reset object data
*
* @return e_vars
*/
public function emptyVars()
{
$this->removeData();
return $this;
}
/**
* Check if there is data available
*
* @return boolean
*/
public function isEmpty()
{
return $this->hasData();
}
/**
* Check if given data key is set
* @param string $key
* @return boolean
*/
public function isVar($key)
{
return $this->is($key);
}
/**
* No need of object conversion, optional cloning
* @param boolean $clone return current object clone
* @return e_vars
*/
public function toSc($clone = false)
{
if($clone) return clone $this;
return $this;
}
}

View File

@ -409,6 +409,91 @@ class e_object
}
}
/**
* Data object for e_parse::simpleParse()
* NEW - not inherits core e_object
* Moved from e_parse_class.php
* Could go in separate file in the future, together with e_object class
*/
class e_vars extends e_object
{
/**
* Get data array
*
* @return array
*/
public function getVars()
{
return $this->getData();
}
/**
* Set array data
*
* @param array $array
* @return e_vars
*/
public function setVars(array $array)
{
$this->setData($array);
return $this;
}
/**
* Add array data to the object (merge with existing)
*
* @param array $array
* @return e_vars
*/
public function addVars(array $array)
{
$this->addData($array);
}
/**
* Reset object data
*
* @return e_vars
*/
public function emptyVars()
{
$this->removeData();
return $this;
}
/**
* Check if there is data available
*
* @return boolean
*/
public function isEmpty()
{
return $this->hasData();
}
/**
* Check if given data key is set
* @param string $key
* @return boolean
*/
public function isVar($key)
{
return $this->is($key);
}
/**
* No need of object conversion, optional cloning
* @param boolean $clone return current object clone
* @return e_vars
*/
public function toSc($clone = false)
{
if($clone) return clone $this;
return $this;
}
}
/**
* Base e107 Model class
*