Class MOXMAN_CorePlugin
Inheritance | MOXMAN_CorePlugin |
---|---|
Implements | MOXMAN_Http_IHandler, MOXMAN_ICommandHandler, MOXMAN_IPlugin |
Core plugin contains core commands and logic.
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | MOXMAN_CorePlugin | |
bind() | Binds a specific event by name for a specific plugin instance. | MOXMAN_CorePlugin |
copyThumbnail() | MOXMAN_CorePlugin | |
createThumbnail() | Creates a thumbnail for the specified file and returns that file object or the input file if thumbnails are disabled or not supported. | MOXMAN_CorePlugin |
deleteThumbnail() | Deletes any existing thumbnail for the specified file. | MOXMAN_CorePlugin |
execute() | Gets executed when a RPC call is made. | MOXMAN_CorePlugin |
fileToJson() | Converts a file instance to a JSON serializable object. | MOXMAN_CorePlugin |
fire() | This method will fire a specific event by name with the specified event args instance. | MOXMAN_CorePlugin |
getThumbnail() | MOXMAN_CorePlugin | |
init() | Initializes the core plugin. | MOXMAN_CorePlugin |
moveThumbnail() | MOXMAN_CorePlugin | |
onFileAction() | Event handler function. Gets executed when a file action event occurs. | MOXMAN_CorePlugin |
processRequest() | Process a request using the specified context. | MOXMAN_CorePlugin |
unbind() | Unbinds a specific event by name from a specific plugin instance. | MOXMAN_CorePlugin |
Protected Methods
Method | Description | Defined By |
---|---|---|
fireThumbnailTargetFileAction() | MOXMAN_CorePlugin |
Method Details
public void __construct ( ) |
Binds a specific event by name for a specific plugin instance.
public MOXMAN_PluginManager bind ( $name, $func, $plugin ) | ||
$name | string | Event name to bind. |
$func | string | String name of the function to call. |
$plugin | \MOXMAN_Plugin | Plugin instance to call event method on. |
return | MOXMAN_PluginManager | PluginManager instance to enable chainablity. |
---|
public void copyThumbnail ( MOXMAN_Vfs_IFile $fromFile, MOXMAN_Vfs_IFile $toFile ) | ||
$fromFile | ||
$toFile |
Creates a thumbnail for the specified file and returns that file object or the input file if thumbnails are disabled or not supported.
public MOXMAN_Vfs_IFile createThumbnail ( MOXMAN_Vfs_IFile $file, $localTempFile = null ) | ||
$file | MOXMAN_Vfs_IFile | File to generate thumbnail for. |
$localTempFile | ||
return | MOXMAN_Vfs_IFile | File instance that got generated or input file. |
---|
Deletes any existing thumbnail for the specified file.
public void deleteThumbnail ( MOXMAN_Vfs_IFile $file ) | ||
$file | MOXMAN_Vfs_IFile | File to remove thumbnail for. |
Gets executed when a RPC call is made.
public Object execute ( $name, $params ) | ||
$name | string | Name of RPC command to execute. |
$params | Object | Object passed in from RPC handler. |
return | Object | Return object that gets passed back to client. |
---|
Converts a file instance to a JSON serializable object.
public static 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. |
---|
This method will fire a specific event by name with the specified event args instance.
public MOXMAN_PluginManager fire ( $name, MOXMAN_Util_EventArgs $args ) | ||
$name | string | Name of the event to fire for example custom info. |
$args | MOXMAN_Util_EventArgs | Event args to pass to all event listeners. |
return | MOXMAN_PluginManager | PluginManager instance to enable chainablity. |
---|
protected void fireThumbnailTargetFileAction ( $action, $fromFile, $toFile ) | ||
$action | ||
$fromFile | ||
$toFile |
public void getThumbnail ( MOXMAN_Vfs_IFile $file ) | ||
$file |
Initializes the core plugin.
public void init ( ) |
public void moveThumbnail ( MOXMAN_Vfs_IFile $fromFile, MOXMAN_Vfs_IFile $toFile ) | ||
$fromFile | ||
$toFile |
Event handler function. Gets executed when a file action event occurs.
public void onFileAction ( MOXMAN_Vfs_FileActionEventArgs $args ) | ||
$args | MOXMAN_Vfs_FileActionEventArgs | File action event arguments. |
Process a request using the specified context.
public void processRequest ( MOXMAN_Http_Context $httpContext ) | ||
$httpContext | MOXMAN_Http_Context | Context instance to pass to use for the handler. |
Unbinds a specific event by name from a specific plugin instance.
public MOXMAN_PluginManager unbind ( $name, $func, $plugin ) | ||
$name | string | Event name to unbind. |
$func | string | String name of the function not to call. |
$plugin | MOXMAN_IPlugin | Plugin instance to not call event method on. |
return | MOXMAN_PluginManager | PluginManager instance to enable chainablity. |
---|