phpdoc for Admins-ApiCommand
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -105,7 +105,6 @@ class FroxlorRPC
|
|||||||
// it will recognize non-api classes+methods as valid commands
|
// it will recognize non-api classes+methods as valid commands
|
||||||
$apiclass = FROXLOR_INSTALL_DIR . '/lib/classes/api/commands/class.' . $command[0] . '.php';
|
$apiclass = FROXLOR_INSTALL_DIR . '/lib/classes/api/commands/class.' . $command[0] . '.php';
|
||||||
if (! file_exists($apiclass) || ! @method_exists($command[0], $command[1])) {
|
if (! file_exists($apiclass) || ! @method_exists($command[0], $command[1])) {
|
||||||
// there will be an exception from the autoloader for class_exists hence the try-catch-block
|
|
||||||
throw new Exception("Unknown command", 400);
|
throw new Exception("Unknown command", 400);
|
||||||
}
|
}
|
||||||
return array(
|
return array(
|
||||||
|
|||||||
@@ -86,6 +86,77 @@ class Admins extends ApiCommand implements ResourceEntity
|
|||||||
/**
|
/**
|
||||||
* create a new admin user
|
* create a new admin user
|
||||||
*
|
*
|
||||||
|
* @param string $name
|
||||||
|
* @param string $email
|
||||||
|
* @param string $admin_password
|
||||||
|
* optional, default auto-generated
|
||||||
|
* @param string $def_language
|
||||||
|
* optional, default is system-default language
|
||||||
|
* @param string $custom_notes
|
||||||
|
* optional, default empty
|
||||||
|
* @param bool $custom_notes_show
|
||||||
|
* optional, default false
|
||||||
|
* @param int $diskspace
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $diskspace_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $traffic
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $traffic_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $customers
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $customers_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $domains
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $domains_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $subdomains
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $subdomains_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $emails
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $emails_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $email_accounts
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $email_accounts_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $email_forwarders
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $email_forwarders_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $email_quota
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $email_quota_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $ftps
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $ftps_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $tickets
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $tickets_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $mysqls
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $mysqls_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param bool $customers_see_all
|
||||||
|
* optional, default false
|
||||||
|
* @param bool $domains_see_all
|
||||||
|
* optional, default false
|
||||||
|
* @param bool $tickets_see_all
|
||||||
|
* optional, default false
|
||||||
|
* @param bool $caneditphpsettings
|
||||||
|
* optional, default false
|
||||||
|
* @param bool $change_serversettings
|
||||||
|
* optional, default false
|
||||||
|
* @param array $ipaddress
|
||||||
|
* optional, list of ip-address id's; default -1 (all IP's)
|
||||||
|
*
|
||||||
* @access admin
|
* @access admin
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
* @return array
|
* @return array
|
||||||
@@ -301,6 +372,82 @@ class Admins extends ApiCommand implements ResourceEntity
|
|||||||
* optional, the admin-id
|
* optional, the admin-id
|
||||||
* @param string $loginname
|
* @param string $loginname
|
||||||
* optional, the loginname
|
* optional, the loginname
|
||||||
|
* @param string $name
|
||||||
|
* optional
|
||||||
|
* @param string $email
|
||||||
|
* optional
|
||||||
|
* @param string $admin_password
|
||||||
|
* optional, default auto-generated
|
||||||
|
* @param string $def_language
|
||||||
|
* optional, default is system-default language
|
||||||
|
* @param string $custom_notes
|
||||||
|
* optional, default empty
|
||||||
|
* @param string $theme
|
||||||
|
* optional
|
||||||
|
* @param bool $deactivated
|
||||||
|
* optional, default false
|
||||||
|
* @param bool $custom_notes_show
|
||||||
|
* optional, default false
|
||||||
|
* @param int $diskspace
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $diskspace_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $traffic
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $traffic_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $customers
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $customers_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $domains
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $domains_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $subdomains
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $subdomains_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $emails
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $emails_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $email_accounts
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $email_accounts_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $email_forwarders
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $email_forwarders_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $email_quota
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $email_quota_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $ftps
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $ftps_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $tickets
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $tickets_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param int $mysqls
|
||||||
|
* optional, default 0
|
||||||
|
* @param bool $mysqls_ul
|
||||||
|
* optional, default false
|
||||||
|
* @param bool $customers_see_all
|
||||||
|
* optional, default false
|
||||||
|
* @param bool $domains_see_all
|
||||||
|
* optional, default false
|
||||||
|
* @param bool $tickets_see_all
|
||||||
|
* optional, default false
|
||||||
|
* @param bool $caneditphpsettings
|
||||||
|
* optional, default false
|
||||||
|
* @param bool $change_serversettings
|
||||||
|
* optional, default false
|
||||||
|
* @param array $ipaddress
|
||||||
|
* optional, list of ip-address id's; default -1 (all IP's)
|
||||||
*
|
*
|
||||||
* @access admin
|
* @access admin
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ class Froxlor extends ApiCommand
|
|||||||
$reflection = new \ReflectionClass($mod);
|
$reflection = new \ReflectionClass($mod);
|
||||||
$_functions = $reflection->getMethods(\ReflectionMethod::IS_PUBLIC);
|
$_functions = $reflection->getMethods(\ReflectionMethod::IS_PUBLIC);
|
||||||
foreach ($_functions as $func) {
|
foreach ($_functions as $func) {
|
||||||
if ($func->class == $mod && $func->isPublic()) {
|
if ($func->class == $mod && $func->isPublic() && !$func->isStatic()) {
|
||||||
array_push($functions, array_merge(array(
|
array_push($functions, array_merge(array(
|
||||||
'module' => $matches[1],
|
'module' => $matches[1],
|
||||||
'function' => $func->name
|
'function' => $func->name
|
||||||
|
|||||||
Reference in New Issue
Block a user