Skip to content

Commit

Permalink
Use old namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyserver committed Oct 23, 2023
1 parent 96378fb commit baecd0e
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions structure/ws_to_ts_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,26 @@
* Helper functions for converting a Moodle WS structure to a TS type.
*/

use core_external\external_api;
use core_external\external_function_parameters;
use core_external\external_value;
use core_external\external_warnings;
use core_external\external_files;
use core_external\external_single_structure;
use core_external\external_multiple_structure;
if (file_exists("$CFG->libdir/external/classes/external_api.php")) {
use core_external\external_api;
use core_external\external_function_parameters;
use core_external\external_value;
use core_external\external_warnings;
use core_external\external_files;
use core_external\external_single_structure;
use core_external\external_multiple_structure;
} else {
require_once("$CFG->libdir/externallib.php");

use external_api;
use external_function_parameters;
use external_value;
use external_warnings;
use external_files;
use external_single_structure;
use external_multiple_structure;
}


/**
* Get the structure of a WS params or returns.
Expand Down

0 comments on commit baecd0e

Please sign in to comment.