function __construct($path_or_other = null, $action = null) { if (is_resource($path_or_other) && get_resource_type($path_or_other) === '_p_Xapian__WritableDatabase') { $this->_cPtr = $path_or_other; return; } switch (func_num_args()) { case 0: $this->_cPtr = new_WritableDatabase(); break; case 1: $this->_cPtr = new_WritableDatabase($path_or_other); break; default: $this->_cPtr = new_WritableDatabase($path_or_other, $action); } }
function __construct($path_or_other = null, $action = null) { switch (func_num_args()) { case 0: $r = new_WritableDatabase(); break; case 1: $r = new_WritableDatabase($path_or_other); break; default: $r = new_WritableDatabase($path_or_other, $action); } $this->_cPtr = $r; }