_setResourceModel($resourceModel); } public function getSession($url = null, $username = null, $password = null, $roleType = Gpf_Api_Session::MERCHANT) { if (isset($this->_session)) { return $this->_session; } // else open the session with the given information $config = Mage::getSingleton('pap/config'); if (is_null($url)) { $url = $config->getRemotePath().'/scripts/server.php'; } if (is_null($username)) { $username = $config->getAPIUsername(); } if (is_null($password)) { $password = $config->getAPIPassword(); } $this->_session = new Gpf_Api_Session($url); $this->_session->login($username, $password, $roleType); return $this->_session; } } ?>