コード例 #1
0
 /**
  * Object constructor.
  *
  * @param string $filepath - path to the XML data file. Use 'php://input' for PHP
  * input stream.
  * @param moodle_database $mdb Connection to the target database
  * @see xml_database_importer::__construct()
  * @param boolean $check_schema - whether or not to check that XML database
  * @see xml_database_importer::__construct()
  */
 public function __construct($filepath, moodle_database $mdb, $check_schema = true)
 {
     $this->filepath = $filepath;
     parent::__construct($mdb, $check_schema);
 }
コード例 #2
0
 /**
  * Object constructor.
  *
  * @param string $data - string with XML data
  * @param moodle_database $mdb Connection to the target database
  * @see xml_database_importer::__construct()
  * @param boolean $check_schema - whether or not to check that XML database
  * @see xml_database_importer::__construct()
  */
 public function __construct($data, moodle_database $mdb, $check_schema = true)
 {
     parent::__construct($mdb, $check_schema);
     $this->data = $data;
 }