CODE STYLE class.sessions.php

This commit is contained in:
Fernando Ontiveros
2012-10-09 13:22:53 -04:00
parent b5a9522b6c
commit f11a2fdd93

View File

@@ -1,6 +1,7 @@
<?php
/**
* class.Sessions.php
*
* @package workflow.engine.ProcessMaker
*
* ProcessMaker Open Source Edition
@@ -24,14 +25,17 @@
*
*/
require_once 'classes/model/Session.php';
/**
* Sessions - Sessions class
*
* @package workflow.engine.ProcessMaker
* @author Everth S. Berrios Morales
* @copyright 2008 COLOSA
*/
class Sessions {
class Sessions
{
protected $tmpfile;
private $sessionId;
@@ -39,10 +43,12 @@ class Sessions {
/**
* This function is the constructor of the Sessions class
*
* @param string $sSessionId
* @return void
*/
public function __construct($sSessionId=NULL){
public function __construct ($sSessionId = NULL)
{
$this->sessionId = $sSessionId;
}
@@ -57,8 +63,7 @@ class Sessions {
*/
public function getSessionUser ($sSessionId = NULL)
{
try
{
try {
if ($sSessionId != NULL) {
$this->sessionId = $sSessionId;
} else if ($this->sessionId == NULL) {
@@ -80,8 +85,7 @@ class Sessions {
$this->deleteTmpfile();
}
return $aRow;
}
catch (Exception $oError) {
} catch (Exception $oError) {
throw ($oError);
}
}
@@ -97,8 +101,7 @@ class Sessions {
*/
public function verifySession ($sSessionId = NULL)
{
try
{
try {
if ($sSessionId != NULL) {
$this->sessionId = $sSessionId;
} else if ($this->sessionId == NULL) {
@@ -124,8 +127,7 @@ class Sessions {
}
return $aRow;
}
catch (Exception $oError) {
} catch (Exception $oError) {
throw ($oError);
}
}
@@ -246,7 +248,8 @@ class Sessions {
* param
* @return void
*/
private function deleteTmpfile(){
private function deleteTmpfile ()
{
if ($this->sessionId == NULL) {
throw new Exception( 'session id was not set.' );
}