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