Changeset 468 for trunk/lib/MCVE.inc.php


Ignore:
Timestamp:
Feb 20, 2014 3:03:59 AM (10 years ago)
Author:
anonymous
Message:

Completed integrating /branches/eli_branch into /trunk. Changes include:

  • Removed closing ?> from end of files
  • Upgrade old-style contructor methods to use construct() instead.
  • Class properties and methods defined as public, private, static or protected
  • Ensure code runs under E_ALL with only mysql_* deprecated warnings
  • Search for the '@' symbol anywhere it might be used to supress runtime errors, then replace with proper error recovery.
  • Run the php cli -l option to check files for syntax errors.
  • Bring tests up-to-date with latest version and methods of PHPUnit
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/lib/MCVE.inc.php

    r396 r468  
    3131class MCVE {
    3232
    33     var $username;
    34     var $password;
    35     var $host = 'localhost';
    36     var $ip_port = 8333;
    37     var $ssl_port = 8444;
    38     var $ca_bundle_file = '/usr/share/ssl/certs/ca-bundle.crt';
    39     var $connect_method = 'ip';
    40     var $timeout = 10;
    41     var $blocking = 1;
    42     var $connected = false;
    43     var $conn;
    44 
    45     function MCVE($username, $password)
     33    public $username;
     34    public $password;
     35    public $host = 'localhost';
     36    public $ip_port = 8333;
     37    public $ssl_port = 8444;
     38    public $ca_bundle_file = '/usr/share/ssl/certs/ca-bundle.crt';
     39    public $connect_method = 'ip';
     40    public $timeout = 10;
     41    public $blocking = 1;
     42    public $connected = false;
     43    public $conn;
     44
     45    public function __construct($username, $password)
    4646    {
    4747        $app =& App::getInstance();
     
    5858    }
    5959
    60     function _connect()
     60    private function _connect()
    6161    {
    6262        $app =& App::getInstance();
     
    123123    }
    124124
    125     function beginTrans()
     125    public function beginTrans()
    126126    {
    127127        if (!$this->_connect()) {
     
    134134    }
    135135
    136     function transParam($tid, $key, $var1, $var2=null)
     136    public function transParam($tid, $key, $var1, $var2=null)
    137137    {
    138138        if (!isset($var2)) {
     
    144144    }
    145145
    146     function sendTrans($tid, $type='', $hide_msg=false)
     146    public function sendTrans($tid, $type='', $hide_msg=false)
    147147    {
    148148        $app =& App::getInstance();
     
    191191    }
    192192
    193     function disconnect($tid)
     193    public function disconnect($tid)
    194194    {
    195195        if ($this->connected) {
     
    208208// End of class.
    209209
    210 ?>
Note: See TracChangeset for help on using the changeset viewer.