function getVar($key, $format = 's') { if ($key == "options") { $key = "nb_options"; } return parent::getVar($key, $format); }
function getVar($key, $format = 's') { if ($format == 's' && in_array($key, array())) { return call_user_func(array($this, $key)); } return parent::getVar($key, $format); }
function getVar($key, $format = 's') { if ($format == 's' && in_array($key, array('rate', 'default_currency'))) { return call_user_func(array($this, $key)); } return parent::getVar($key, $format); }
function getVar($key, $format = 'e') { if (substr($key, 0, 4) == 'url_') { return parent::getVar('url', $format); } elseif (substr($key, 0, 8) == 'caption_') { return parent::getVar('caption', $format); } else { return parent::getVar($key, $format); } }
function toArray() { $ret = parent::toArray(); $ret['fromInfo'] = $this->getFromInfo(); $ret['toInfo'] = $this->getToInfo(); $ret['fullLink'] = $this->link(true); return $ret; }
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); require_once 'SmartObject.php'; $smObj = new SmartObject(); $smObj->setTitle('test')->setSubTitle('test1'); echo $smObj->getTitle(); echo $smObj->getSubTitle();
function toArray($format = 's') { global $myts; if (!$myts) { $myts =& MyTextSanitizer::getInstance(); } $ret = parent::toArray(); if ($format == 'e') { $ret['partnerid'] = $this->getVar('partnerid', 'e'); } $ret['description'] = $myts->undoHtmlSpecialChars($ret['description']); return $ret; }