Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /home/mendipla/public_html/includes/src/Mage_Core_functions.php on line 60
Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/mendipla/public_html/includes/src/Mage_Core_functions.php on line 32
{
if (empty($this->_xml)) {
return false;
}
if (!$result = @$this->_xml->xpath($xpath)) {
return false;
}
return $result;
}
/**
* Enter description here...
*
* @param Varien_Simplexml_Config_Cache_Abstract $cache
* @return Varien_Simplexml_Config
*/
public function setCache($cache)
{
$this->_cache = $cache;
return $this;
}
/**
* Enter description here...
*
* @return Varien_Simplexml_Config_Cache_Abstract
*/
public function getCache()
{
return $this->_cache;
}
/**
* Enter description here...
*
* @param boolean $flag
* @return Varien_Simplexml_Config
*/
public function setCacheSaved($flag)
{
$this->_cacheSaved = $flag;
return $this;
}
/**
* Enter description here...
*
* @return boolean
*/
public function getCacheSaved()
{
return $this->_cacheSaved;
}
/**
* Enter description here...
*
* @param string $id
* @return Varien_Simplexml_Config
*/
public function setCacheId($id)
{
$this->_cacheId = $id;
return $this;
}
/**
* Enter description here...
*
* @return string
*/
public function getCacheId()
{
return $this->_cacheId;
}
/**
* Enter description here...
*
* @param array $tags
* @return Varien_Simplexml_Config
*/
public function setCacheTags($tags)
{
$this->_cacheTags = $tags;
return $this;
}
/**
* Enter description here...
*
* @return array
*/
public function getCacheTags()
{
return $this->_cacheTags;
}
/**
* Enter description here...
*
* @param int $lifetime
* @return Varien_Simplexml_Config
*/
public function setCacheLifetime($lifetime)
{
$this->_cacheLifetime = $lifetime;
return $this;
}
/**
* Enter description here...
*
* @return int
*/
public function getCacheLifetime()
{
return $this->_cacheLifetime;
}
/**
* Enter description here...
*
* @param string $data
* @return Varien_Simplexml_Config
*/
public function setCacheChecksum($data)
{
if (is_null($data)) {
$this->_cacheChecksum = null;
} elseif (false===$data || 0===$data) {
$this->_cacheChecksum = false;
} else {
$this->_cacheChecksum = md5($data);
}
return $this;
}
/**
* Enter description here...
*
* @param string $data
* @return Varien_Simplexml_Config
*/
public function updateCacheChecksum($data)
{
if (false===$this->getCacheChecksum()) {
return $this;
}
if (false===$data || 0===$data) {
$this->_cacheChecksum = false;
} else {
$this->setCacheChecksum($this->getCacheChecksum().':'.$data);
}
return $this;
}
/**
* Enter description here...
*
* @return string
*/
public function getCacheChecksum()
{
return $this->_cacheChecksum;
}
/**
* Enter description here...
*
* @return string
*/
public function getCacheChecksumId()
{
return $this->getCacheId().'__CHECKSUM';
}
/**
* Enter description here...
*
* @return boolean
*/
public function fetchCacheChecksum()
{
return false;
}
/**
* Enter description here...
*
* @return boolean
*/
public function validateCacheChecksum()
{
$newChecksum = $this->getCacheChecksum();
if (false===$newChecksum) {
return false;
}
if (is_null($newChecksum)) {
return true;
}
$cachedChecksum = $this->getCache()->load($this->getCacheChecksumId());
return $newChecksum===false && $cachedChecksum===false || $newChecksum===$cachedChecksum;
}
/**
* Enter description here...
*
* @return boolean
*/
public function loadCache()
{
if (!$this->validateCacheChecksum()) {
return false;
}
$xmlString = $this->_loadCache($this->getCacheId());
$xml = simplexml_load_string($xmlString, $this->_elementClass);
if ($xml) {
$this->_xml = $xml;
$this->setCacheSaved(true);
return true;
}
return false;
}
/**
* Enter description here...
*
* @param array $tags
* @return Varien_Simplexml_Config
*/
public function saveCache($tags=null)
{
if ($this->getCacheSaved()) {
return $this;
}
if (false===$this->getCacheChecksum()) {
return $this;
}
if (is_null($tags)) {
$tags = $this->_cacheTags;
}
if (!is_null($this->getCacheChecksum())) {
$this->_saveCache($this->getCacheChecksum(), $this->getCacheChecksumId(), $tags, $this->getCacheLifetime());
}
$xmlString = $this->getXmlString();
$this->_saveCache($xmlString, $this->getCacheId(), $tags, $this->getCacheLifetime());
$this->setCacheSaved(true);
return $this;
}
/**
* Return Xml of node as string
*
* @return string
*/
public function getXmlString()
{
return $this->getNode()->asNiceXml('', false);
}
/**
* Enter description here...
*
* @return Varien_Simplexml_Config
*/
public function removeCache()
{
$this->_removeCache($this->getCacheId());
$this->_removeCache($this->getCacheChecksumId());
return $this;
}
/**
* Enter description here...
*
* @param string $id
* @return boolean
*/
protected function _loadCache($id)
{
return $this->getCache()->load($id);
}
/**
* Enter description here...
*
* @param string $data
* @param string $id
* @param array $tags
* @param int|boolean $lifetime
* @return boolean
*/
protected function _saveCache($data, $id, $tags=array(), $lifetime=false)
{
return $this->getCache()->save($data, $id, $tags, $lifetime);
}
/**
* Enter description here...
*
* @todo check this, as there are no caches that implement remove() method
* @param string $id
* @return unknown
*/
protected function _removeCache($id)
{
return $this->getCache()->remove($id);
}
/**
* Imports XML file
*
* @param string $filePath
* @return boolean
*/
public function loadFile($filePath)
{
if (!is_readable($filePath)) {
//throw new Exception('Can not read xml file '.$filePath);
return false;
}
$fileData = file_get_contents($filePath);
$fileData = $this->processFileData($fileData);
return $this->loadString($fileData, $this->_elementClass);
}
/**
* Imports XML string
*
* @param string $string
* @return boolean
*/
public function loadString($string)
{
if (is_string($string)) {
$xml = simplexml_load_string($string, $this->_elementClass);
if ($xml instanceof Varien_Simplexml_Element) {
$this->_xml = $xml;
return true;
}
} else {
Mage::logException(new Exception('"$string" parameter for simplexml_load_string is not a string'));
}
return false;
}
/**
* Imports DOM node
*
* @param DOMNode $dom
* @return Varien_Simplexml_Element
*/
public function loadDom($dom)
{
$xml = simplexml_import_dom($dom, $this->_elementClass);
if ($xml) {
$this->_xml = $xml;
return true;
}
return false;
}
/**
* Create node by $path and set its value.
*
* @param string $path separated by slashes
* @param string $value
* @param boolean $overwrite
* @return Varien_Simplexml_Config
*/
public function setNode($path, $value, $overwrite=true)
{
$xml = $this->_xml->setNode($path, $value, $overwrite);
return $this;
}
/**
* Process configuration xml
*
* @return Varien_Simplexml_Config
*/
public function applyExtends()
{
$targets = $this->getXpath($this->_xpathExtends);
if (!$targets) {
return $this;
}
foreach ($targets as $target) {
$sources = $this->getXpath((string)$target['extends']);
if ($sources) {
foreach ($sources as $source) {
$target->extend($source);
}
} else {
#echo "Not found extend: ".(string)$target['extends'];
}
#unset($target['extends']);
}
return $this;
}
/**
* Stub method for processing file data right after loading the file text
*
* @param string $text
* @return string
*/
public function processFileData($text)
{
return $text;
}
/**
* Enter description here...
*
* @param Varien_Simplexml_Config $config
* @param boolean $overwrite
* @return Varien_Simplexml_Config
*/
public function extend(Varien_Simplexml_Config $config, $overwrite=true)
{
$this->getNode()->extend($config->getNode(), $overwrite);
return $this;
}
}
Fatal error: Uncaught Error: Class 'Varien_Simplexml_Config' not found in /home/mendipla/public_html/includes/src/Mage_Core_Model_Config_Base.php:38
Stack trace:
#0 /home/mendipla/public_html/includes/src/Varien_Autoload.php(94): include()
#1 [internal function]: Varien_Autoload->autoload('Mage_Core_Model...')
#2 /home/mendipla/public_html/includes/src/Mage_Core_Model_Config.php(35): spl_autoload_call('Mage_Core_Model...')
#3 /home/mendipla/public_html/includes/src/Varien_Autoload.php(94): include('/home/mendipla/...')
#4 [internal function]: Varien_Autoload->autoload('Mage_Core_Model...')
#5 /home/mendipla/public_html/app/Mage.php(740): spl_autoload_call('Mage_Core_Model...')
#6 /home/mendipla/public_html/app/Mage.php(679): Mage::_setConfigModel(Array)
#7 /home/mendipla/public_html/index.php(83): Mage::run('', 'store')
#8 {main}
thrown in /home/mendipla/public_html/includes/src/Mage_Core_Model_Config_Base.php on line 38