diff --git a/gulliver/system/class.dbconnection.php b/gulliver/system/class.dbconnection.php index b6400743d..8af61cfb3 100644 --- a/gulliver/system/class.dbconnection.php +++ b/gulliver/system/class.dbconnection.php @@ -93,7 +93,7 @@ class DBConnection * @return string * */ - public function DBConnection($strServer = DB_HOST, $strUser = DB_USER, $strPwd = DB_PASS, $strDB = DB_NAME, $type = DB_ADAPTER, $strPort = 0, $errorLevel = 2) + public function __construct($strServer = DB_HOST, $strUser = DB_USER, $strPwd = DB_PASS, $strDB = DB_NAME, $type = DB_ADAPTER, $strPort = 0, $errorLevel = 2) { $this->errorLevel = $errorLevel; if ($type == null) { diff --git a/gulliver/system/class.dbrecordset.php b/gulliver/system/class.dbrecordset.php index 54a2d459a..d3caa950c 100644 --- a/gulliver/system/class.dbrecordset.php +++ b/gulliver/system/class.dbrecordset.php @@ -47,9 +47,9 @@ class DBRecordSet * @param string $intResult Database recordset default value = false * @return void */ - function DBRecordSet ($intResult = null) + public function __construct($intResult = null) { - $this->SetTo( $intResult ); + $this->SetTo($intResult); } /** diff --git a/gulliver/system/class.dbsession.php b/gulliver/system/class.dbsession.php index f987d45a4..93e07900c 100644 --- a/gulliver/system/class.dbsession.php +++ b/gulliver/system/class.dbsession.php @@ -52,12 +52,12 @@ class DBSession * @return void * */ - function DBSession ($objConnection = null, $strDBName = '') + public function __construct($objConnection = null, $strDBName = '') { if ($strDBName != '') { $strDBName = $objConnection->db->_db; } - $this->setTo( $objConnection, $strDBName ); + $this->setTo($objConnection, $strDBName); } /** diff --git a/gulliver/system/class.dbtable.php b/gulliver/system/class.dbtable.php index b43929378..64de786c9 100644 --- a/gulliver/system/class.dbtable.php +++ b/gulliver/system/class.dbtable.php @@ -53,12 +53,15 @@ class DBTable /** * Initiate a database conecction using default values * - * @author Fernando Ontiveros Lira * @access public - * @param object $objConnection conecction string + * + * @param object $objConnection + * @param string $strTable + * @param array $arrKeys + * * @return void */ - public function dBTable($objConnection = null, $strTable = "", $arrKeys = array('UID')) + public function __construct($objConnection = null, $strTable = "", $arrKeys = ['UID']) { $this->_dbc = null; $this->_dbses = null; diff --git a/gulliver/system/class.error.php b/gulliver/system/class.error.php index 04a454de5..fba111daf 100644 --- a/gulliver/system/class.error.php +++ b/gulliver/system/class.error.php @@ -77,12 +77,12 @@ class G_Error extends PEAR_Error * * @see PEAR_Error */ - public function G_Error ($code = G_ERROR, $mode = PEAR_ERROR_RETURN, $level = E_USER_NOTICE, $debuginfo = null) + public function __construct($code = G_ERROR, $mode = PEAR_ERROR_RETURN, $level = E_USER_NOTICE, $debuginfo = null) { - if (is_int( $code )) { - $this->PEAR_Error( 'G Error: ' . G_Error::errorMessage( $code ), $code, $mode, $level, $debuginfo ); + if (is_int($code)) { + $this->PEAR_Error('G Error: ' . G_Error::errorMessage($code), $code, $mode, $level, $debuginfo); } else { - $this->PEAR_Error( "G Error: $code", DB_ERROR, $mode, $level, $debuginfo ); + $this->PEAR_Error("G Error: $code", DB_ERROR, $mode, $level, $debuginfo); } } diff --git a/gulliver/system/class.inputfilter.php b/gulliver/system/class.inputfilter.php index ec1054abe..c24e97ad6 100644 --- a/gulliver/system/class.inputfilter.php +++ b/gulliver/system/class.inputfilter.php @@ -25,13 +25,13 @@ class InputFilter /** * Constructor for inputFilter class. Only first parameter is required. * @access constructor - * @param Array $tagsArray - list of user-defined tags - * @param Array $attrArray - list of user-defined attributes + * @param array $tagsArray - list of user-defined tags + * @param array $attrArray - list of user-defined attributes * @param int $tagsMethod - 0= allow just user-defined, 1= allow all but user-defined * @param int $attrMethod - 0= allow just user-defined, 1= allow all but user-defined * @param int $xssAuto - 0= only auto clean essentials, 1= allow clean blacklisted tags/attr */ - public function inputFilter($tagsArray = array(), $attrArray = array(), $tagsMethod = 0, $attrMethod = 0, $xssAuto = 1) + public function __construct($tagsArray = [], $attrArray = [], $tagsMethod = 0, $attrMethod = 0, $xssAuto = 1) { // make sure user defined arrays are in lowercase for ($i = 0; $i < count($tagsArray); $i++) { diff --git a/gulliver/system/class.objectTemplate.php b/gulliver/system/class.objectTemplate.php index 837f5afe5..dcecb8f58 100644 --- a/gulliver/system/class.objectTemplate.php +++ b/gulliver/system/class.objectTemplate.php @@ -44,7 +44,7 @@ class objectTemplate extends Smarty * @return void */ - function objectTemplate ($templateFile) + public function __construct($templateFile) { $this->template_dir = PATH_TPL; $this->compile_dir = PATH_SMARTY_C; diff --git a/gulliver/system/class.table.php b/gulliver/system/class.table.php index 1ab2c2def..2c56c3168 100644 --- a/gulliver/system/class.table.php +++ b/gulliver/system/class.table.php @@ -49,16 +49,16 @@ class Table public $_contexto = ''; /** - * Set conecction using default values + * Set connection using default values * - * @author Fernando Ontiveros Lira - * @access public * @param string $objConnection connection string + * * @return void + * @access public */ - public function Table ($objConnection = null) + public function __construct($objConnection = null) { - $this->SetTo( $objConnection ); + $this->SetTo($objConnection); } /** diff --git a/gulliver/system/class.tree.php b/gulliver/system/class.tree.php index 1dac4016c..ca4db501e 100644 --- a/gulliver/system/class.tree.php +++ b/gulliver/system/class.tree.php @@ -25,9 +25,9 @@ class PmTree extends Xml_Node * * @param array $xmlnode default value NULL * - * @return none + * @return void */ - public function PmTree($xmlnode = null) + public function __construct($xmlnode = null) { if (!isset($xmlnode)) { return; diff --git a/gulliver/system/class.webResource.php b/gulliver/system/class.webResource.php index f8bcae563..e7f4c6674 100644 --- a/gulliver/system/class.webResource.php +++ b/gulliver/system/class.webResource.php @@ -48,34 +48,34 @@ class WebResource * @param string $uri * @param string $post * - * @return none + * @return void */ - function WebResource ($uri, $post) + public function __construct($uri, $post) { $this->_uri = $uri; - if (isset( $post['function'] ) && $post['function'] != '') { + if (isset($post['function']) && $post['function'] != '') { /*Call a function*/ - header( 'Content-Type: text/json' ); + header('Content-Type: text/json'); //$parameters=G::json_decode((urldecode($post['parameters']))); //for %AC - $parameters = G::json_decode( ($post['parameters']) ); - $paramsRef = array (); + $parameters = G::json_decode(($post['parameters'])); + $paramsRef = array(); foreach ($parameters as $key => $value) { - if (is_string( $key )) { - $paramsRef[] = "\$parameters['" . addcslashes( $key, '\\\'' ) . "']"; + if (is_string($key)) { + $paramsRef[] = "\$parameters['" . addcslashes($key, '\\\'') . "']"; } else { $paramsRef[] = '$parameters[' . $key . ']'; } } - - $paramsRef = implode( ',', $paramsRef ); + + $paramsRef = implode(',', $paramsRef); $filter = new InputFilter(); $post['function'] = $filter->validateInput($post['function']); $paramsRef = $filter->validateInput($paramsRef); - - $res = eval( 'return ($this->' . $post['function'] . '(' . $paramsRef . '));' ); - $res = G::json_encode( $res ); - print ($res) ; + + $res = eval('return ($this->' . $post['function'] . '(' . $paramsRef . '));'); + $res = G::json_encode($res); + print ($res); } else { /*Print class definition*/ $this->_encode(); diff --git a/gulliver/system/class.xmlMenu.php b/gulliver/system/class.xmlMenu.php index 763ad1b3d..6c32d3416 100644 --- a/gulliver/system/class.xmlMenu.php +++ b/gulliver/system/class.xmlMenu.php @@ -61,11 +61,11 @@ class XmlFormFieldXmlMenu extends XmlFormField * @param string $home default value '' * @param string $owner * - * @return none + * @return void */ - public function XmlFormFieldXmlMenu ($xmlNode, $lang = 'en', $home = '', $owner = null) + public function __construct($xmlNode, $lang = 'en', $home = '', $owner = null) { - parent::__construct( $xmlNode, $lang, $home, $owner ); + parent::__construct($xmlNode, $lang, $home, $owner); $this->home = $home; } diff --git a/gulliver/system/class.xmlformTemplate.php b/gulliver/system/class.xmlformTemplate.php index 8b75f3af4..ac5353ff7 100644 --- a/gulliver/system/class.xmlformTemplate.php +++ b/gulliver/system/class.xmlformTemplate.php @@ -17,13 +17,13 @@ class xmlformTemplate extends Smarty /** * Function xmlformTemplate * - * @author David S. Callizaya S. - * @access public * @param string form * @param string templateFile + * * @return string + * @access public */ - public function xmlformTemplate (&$form, $templateFile) + public function __construct(&$form, $templateFile) { $this->template_dir = PATH_XMLFORM; $this->compile_dir = PATH_SMARTY_C; diff --git a/workflow/engine/classes/Padl.php b/workflow/engine/classes/Padl.php index 6aa8ebe1f..89faf1472 100644 --- a/workflow/engine/classes/Padl.php +++ b/workflow/engine/classes/Padl.php @@ -174,7 +174,7 @@ class Padl * * @access private * */ - public function padl() + public function __construct() { # check to see if the class has been secured $this->_check_secure(); diff --git a/workflow/engine/classes/ReplacementLogo.php b/workflow/engine/classes/ReplacementLogo.php index 4a9d92d1a..a38d37e54 100644 --- a/workflow/engine/classes/ReplacementLogo.php +++ b/workflow/engine/classes/ReplacementLogo.php @@ -6,15 +6,13 @@ */ class ReplacementLogo { - - //var $dir=''; /** * This function is the constructor of the ReplacementLogo class * param * * @return void */ - public function replacementLogo () + public function __construct() { } diff --git a/workflow/engine/classes/XMLConnection.php b/workflow/engine/classes/XMLConnection.php index ac3d937b2..0587f6a29 100644 --- a/workflow/engine/classes/XMLConnection.php +++ b/workflow/engine/classes/XMLConnection.php @@ -13,7 +13,7 @@ class XMLConnection * @param string $file * @return void */ - public function XMLConnection($file) + public function __construct($file) { $this->xmldoc = new Xml_Document(); $this->xmldoc->parseXmlFile($file); diff --git a/workflow/engine/classes/XMLResult.php b/workflow/engine/classes/XMLResult.php index 76a21904a..145dd05d9 100644 --- a/workflow/engine/classes/XMLResult.php +++ b/workflow/engine/classes/XMLResult.php @@ -14,9 +14,10 @@ class XMLResult * XMLResult * * @param array $result + * * @return void */ - public function XMLResult ($result = array()) + public function __construct($result = []) { $this->result = $result; $this->cursor = 0; diff --git a/workflow/engine/classes/XmlFormFieldToolBar.php b/workflow/engine/classes/XmlFormFieldToolBar.php index 8c1e37a16..603ce4952 100644 --- a/workflow/engine/classes/XmlFormFieldToolBar.php +++ b/workflow/engine/classes/XmlFormFieldToolBar.php @@ -21,9 +21,10 @@ class XmlFormFieldToolBar extends XmlFormField * @param string $lang * @param string $home * @param string $owner + * * @return void */ - public function XmlFormFieldToolBar($xmlNode, $lang = 'en', $home = '', $owner = ' ') + public function __construct($xmlNode, $lang = 'en', $home = '', $owner = ' ') { parent::__construct($xmlNode, $lang, $home, $owner); $this->home = $home; diff --git a/workflow/engine/methods/services/Rest/FormatedMessage.php b/workflow/engine/methods/services/Rest/FormatedMessage.php index 15661314c..4a2e35129 100644 --- a/workflow/engine/methods/services/Rest/FormatedMessage.php +++ b/workflow/engine/methods/services/Rest/FormatedMessage.php @@ -19,7 +19,7 @@ require_once ("CURLMessage.php"); class FormatedMessage extends CURLMessage { - public function FormatedMessage () + public function __construct() { parent::__construct(); } diff --git a/workflow/engine/methods/services/Rest/JsonMessage.php b/workflow/engine/methods/services/Rest/JsonMessage.php index 34d06135b..e89d34203 100644 --- a/workflow/engine/methods/services/Rest/JsonMessage.php +++ b/workflow/engine/methods/services/Rest/JsonMessage.php @@ -22,7 +22,7 @@ class JsonMessage extends FormatedMessage /** * Call the parent Curl initialization and set the type of the message */ - public function JsonMessage () + public function __construct() { parent::__construct(); $this->type = "json"; diff --git a/workflow/engine/methods/services/Rest/RestMessage.php b/workflow/engine/methods/services/Rest/RestMessage.php index 0c9e4dcee..64c2c16ec 100644 --- a/workflow/engine/methods/services/Rest/RestMessage.php +++ b/workflow/engine/methods/services/Rest/RestMessage.php @@ -22,7 +22,7 @@ class RestMessage extends SimpleMessage /** * Call the parent Curl initialization and set the type of the message */ - public function RestMessage () + public function __construct() { parent::__construct(); $this->type = "rest"; diff --git a/workflow/engine/methods/services/Rest/SimpleMessage.php b/workflow/engine/methods/services/Rest/SimpleMessage.php index 5a67123ec..37a57d6df 100644 --- a/workflow/engine/methods/services/Rest/SimpleMessage.php +++ b/workflow/engine/methods/services/Rest/SimpleMessage.php @@ -19,7 +19,7 @@ require_once ("CURLMessage.php"); class SimpleMessage extends CURLMessage { - public function SimpleMessage () + public function __construct() { parent::__construct(); } diff --git a/workflow/engine/methods/services/Rest/XmlMessage.php b/workflow/engine/methods/services/Rest/XmlMessage.php index f6c597100..d28b51645 100644 --- a/workflow/engine/methods/services/Rest/XmlMessage.php +++ b/workflow/engine/methods/services/Rest/XmlMessage.php @@ -22,7 +22,7 @@ class XmlMessage extends FormatedMessage /** * Call the parent Curl initialization and set the type of the message */ - public function XmlMessage () + public function __construct() { parent::__construct(); $this->type = "xml";