Commit dbe457ba authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Separation of the functions (Bug #1393621)



Allowing each of the 'classname' classes listed in external_functions
to be it's own function file to make it easier for developers.

Change-Id: I9c4e3dfc198abdf2c274c8a7d569fce5bf431471
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent f28e81b4
This diff is collapsed.
This diff is collapsed.
...@@ -274,10 +274,10 @@ function webservice_function_info($function, $strictness=MUST_EXIST) { ...@@ -274,10 +274,10 @@ function webservice_function_info($function, $strictness=MUST_EXIST) {
//first find and include the ext implementation class //first find and include the ext implementation class
$function->classpath = empty($function->classpath) ? get_config('docroot') . $function->component : get_config('docroot') . $function->classpath; $function->classpath = empty($function->classpath) ? get_config('docroot') . $function->component : get_config('docroot') . $function->classpath;
if (!file_exists($function->classpath . '/functions.php')) { if (!file_exists($function->classpath . '/functions/' . $function->classname . '.php')) {
throw new WebserviceCodingException(get_string('cannotfindimplfile', 'auth.webservice')); throw new WebserviceCodingException(get_string('cannotfindimplfile', 'auth.webservice'));
} }
require_once($function->classpath . '/functions.php'); require_once($function->classpath . '/functions/' . $function->classname . '.php');
$function->parameters_method = $function->methodname . '_parameters'; $function->parameters_method = $function->methodname . '_parameters';
$function->returns_method = $function->methodname . '_returns'; $function->returns_method = $function->methodname . '_returns';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment