コード例 #1
0
ファイル: xapian.php プロジェクト: zhangjingpu/yaf-lib
 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);
     }
 }
コード例 #2
0
ファイル: xapian.php プロジェクト: BillTheBest/1.6.x
 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;
 }