Changeset 523 for trunk/lib/Lock.inc.php
- Timestamp:
- May 24, 2015 3:01:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Lock.inc.php
r502 r523 31 31 class Lock 32 32 { 33 34 33 // A place to keep an object instance for the singleton pattern. 35 34 protected static $instance = null; … … 51 50 52 51 // Auth_SQL object from which to access a current user_id. 53 protected $_auth ;52 protected $_auth = null; 54 53 55 54 /** … … 60 59 * @static 61 60 */ 62 public static function &getInstance($auth_object )61 public static function &getInstance($auth_object=null) 63 62 { 64 63 if (self::$instance === null) { … … 74 73 * @param mixed $auth_object An Auth_SQL or Auth_FILE object. 75 74 */ 76 public function __construct($auth_object) 77 { 78 $app =& App::getInstance(); 79 80 if (!method_exists($auth_object, 'get') || !method_exists($auth_object, 'getUsername')) { 81 trigger_error('Constructor not provided a valid Auth_* object.', E_USER_ERROR); 82 } 83 84 $this->_auth = $auth_object; 75 public function __construct($auth_object=null) 76 { 77 $app =& App::getInstance(); 78 79 if (!is_null($auth_object) || is_null($this->_auth)) { 80 if (!method_exists($auth_object, 'get') || !method_exists($auth_object, 'getUsername')) { 81 trigger_error('Constructor not provided a valid Auth_* object.', E_USER_ERROR); 82 } 83 84 $this->_auth = $auth_object; 85 } 85 86 86 87 // Get create tables config from global context.
Note: See TracChangeset
for help on using the changeset viewer.