/** * This is the class constructor for XMLObject class * @param $nodeName [STRING] * @param $attributeList [ARRAY] An array of key=>value pairs for this * object's attributes. * @param $isDebugEnabled [BOOLEAN] * @return [void] */ function __construct($nodeName = '', $attributeList = null, $isDebugEnabled = false) { parent::__construct(); $this->xmlValues = array(); $this->xmlNodeName = $nodeName; $this->xmlAttributes = array(); if (is_null($attributeList) == false) { $this->xmlAttributes = $attributeList; } if ($isDebugEnabled == true) { $this->debugEnable(); } }
/** * This is the class constructor for class Page * * @param $templateFile [PAGE_TEMPLATE_DEFAULT] */ function __construct($templateFile = PAGE_TEMPLATE_DEFAULT) { parent::__construct(); // Turn on Debugging while designing ... //$this->debugEnable(); // NOTE: Setting the pageTemplateFile this way is being // depreciated for having it set via the pageContent Object. // This will dissappear soon ... // // Split the Template file data into it's path & File parts. $this->parseTemplateData($templateFile); $this->debug('pageTemplatePath=[' . $this->pageTemplatePath . ']<br>'); $this->debug('pageTemplate=[' . $this->pageTemplate . ']<br>'); }
/** * This is the class constructor for Database class */ function __construct() { parent::__construct(); $this->isInitialized = false; $this->dbName = ''; $this->dbTableName = "<null>"; $this->dbFields = array(); // $this->FieldsTypeArray; //<- Do I need this? Or do I just rely on the programmer to condition the Values properly? $this->dbValues = array(); $this->sql = "<null>"; $this->dbCondition = "<null>"; $this->dbResult = "<null>"; $this->dbErrorMsg = ""; // Default = DONT suppress errors. // NOTE: Session management set's this to TRUE -> It first attempts // to INSERT session, if that returns an error it then // UPDATES the data. $this->shouldSuppressErrors = false; }
function testUpdateSiteObjectRecordOk() { $this->db->sqlInsert('sys_site_object', array('id' => $object_id = 100, 'title' => 'old title', 'identifier' => 'old identifier', 'class_id' => 234)); $mapper = new SiteObjectMapperTestVersion1($this); $site_object = new SiteObject(); $site_object->setId($object_id); $site_object->setIdentifier('test'); $site_object->setTitle('test'); $site_object->setLocaleId('fr'); $site_object->attachBehaviour($this->behaviour); $this->behaviour->setReturnValue('getId', 25); $this->behaviour_mapper->expectOnce('save', array(new IsAExpectation('MockSiteObjectBehaviour'))); $mapper->update($site_object); $this->_checkSysSiteObjectRecord($site_object); $mapper->tally(); }
protected function _findSiteObjectLocaleId($object_id) { include_once(LIMB_DIR . '/class/core/site_objects/SiteObject.class.php'); return SiteObject :: findObjectLocaleId($object_id); }
public function getBehaviourByObjectId($object_id) { $behaviour_name = SiteObject :: findBehaviourNameById($object_id); return Limb :: toolkit()->createBehaviour($behaviour_name); }