Abstract Class MOXMAN_Commands_BaseCommand
Class to be extended by other core plugin classes. Provides basic functionality shared by all commands.
Public Methods
Method | Description | Defined By |
---|---|---|
execute() | Gets executed when a RPC call is made. | MOXMAN_ICommand |
Protected Methods
Method | Description | Defined By |
---|---|---|
fileToJson() | Converts a file instance to a JSON serializable object. | MOXMAN_Commands_BaseCommand |
fireBeforeFileAction() | Fires a before file action event with the specified file object. | MOXMAN_Commands_BaseCommand |
fireBeforeTargetFileAction() | Fires a before file action event with the specified from/to file objects. | MOXMAN_Commands_BaseCommand |
fireCustomInfo() | Fires a file custom info for the specified file. | MOXMAN_Commands_BaseCommand |
fireFileAction() | Fires a file action event with the specified file object. | MOXMAN_Commands_BaseCommand |
fireFilesAction() | Fires a file action event with the specified file object and files array. | MOXMAN_Commands_BaseCommand |
fireTargetFileAction() | Fires a file action event with the specified from/to file objects. | MOXMAN_Commands_BaseCommand |
getPublicConfig() | Returns public config options to the client. | MOXMAN_Commands_BaseCommand |
Method Details
Converts a file instance to a JSON serializable object.
protected stdClass fileToJson ( $file, $meta = false ) | ||
$file | MOXMAN_Vfs_IFile | File to convert into JSON format. |
$meta | Boolean | State if the meta data should be returned or not. |
return | stdClass | JSON serializable object. |
---|
Fires a before file action event with the specified file object.
protected MOXMAN_Vfs_FileActionEventArgs fireBeforeFileAction ( $action, $file, $size = 0 ) | ||
$action | string | Action name for the file event for example DELETE. |
$file | MOXMAN_Vfs_IFile | File instance to use. |
$size | \Number | Size of the file being added. |
return | MOXMAN_Vfs_FileActionEventArgs | Returns event argument instance. |
---|
Fires a before file action event with the specified from/to file objects.
protected MOXMAN_Vfs_FileActionEventArgs fireBeforeTargetFileAction ( $action, $fromFile, $toFile ) | ||
$action | string | Action name for the file event for example COPY. |
$fromFile | MOXMAN_Vfs_IFile | From file to use. |
$toFile | MOXMAN_Vfs_IFile | To file to use. |
return | MOXMAN_Vfs_FileActionEventArgs | Returns event argument instance. |
---|
Fires a file custom info for the specified file.
protected MOXMAN_Vfs_CustomInfoEventArgs fireCustomInfo ( $type, $file ) | ||
$type | string | Type of info event. |
$file | MOXMAN_Vfs_IFile | File instance to use. |
return | MOXMAN_Vfs_CustomInfoEventArgs | Returns event argument instance. |
---|
Fires a file action event with the specified file object.
protected MOXMAN_Vfs_FileActionEventArgs fireFileAction ( $action, $file ) | ||
$action | string | Action name for the file event for example DELETE. |
$file | MOXMAN_Vfs_IFile | File instance to use. |
return | MOXMAN_Vfs_FileActionEventArgs | Returns event argument instance. |
---|
Fires a file action event with the specified file object and files array.
protected MOXMAN_Vfs_FileActionEventArgs fireFilesAction ( $action, $file, $files ) | ||
$action | string | Action for files event for example LIST_FILES. |
$file | MOXMAN_Vfs_IFile | File instance to use. |
$files | array | Array with files to include in event. |
return | MOXMAN_Vfs_FileActionEventArgs | Returns event argument instance. |
---|
Fires a file action event with the specified from/to file objects.
protected MOXMAN_Vfs_FileActionEventArgs fireTargetFileAction ( $action, $fromFile, $toFile ) | ||
$action | string | Action name for the file event for example COPY. |
$fromFile | MOXMAN_Vfs_IFile | From file to use. |
$toFile | MOXMAN_Vfs_IFile | To file to use. |
return | MOXMAN_Vfs_FileActionEventArgs | Returns event argument instance. |
---|
Returns public config options to the client.
protected stdClass getPublicConfig ( $file = null ) | ||
$file | MOXMAN_Vfs_IFile | File to get public config options for. |
return | stdClass | JSON serializable object of config options. |
---|