public function saveCurrentContext(array $p_propertiesList = array()) { if (count($p_propertiesList) == 0) { $p_propertiesList = $this->allPropertiesNames(); } $savedContext = array(); foreach ($p_propertiesList as $propertyName) { if ($this->has_property($propertyName)) { $savedContext[$propertyName] = $this->{$propertyName}; } } array_push($this->m_savedContext, $savedContext); }