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