XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | List of all members
fileController Class Reference
Inheritance diagram for fileController:
file ModuleObject BaseObject

Public Member Functions

 init ()
 
 procFileUpload ()
 
 procFileIframeUpload ()
 
 procFileImageResize ()
 
 procFileDownload ()
 
 procFileOutput ()
 
 procFileDelete ()
 
 procFileGetList ()
 
 triggerCheckAttached (&$obj)
 
 triggerAttachFiles (&$obj)
 
 triggerDeleteAttached (&$obj)
 
 triggerCommentCheckAttached (&$obj)
 
 triggerCommentAttachFiles (&$obj)
 
 triggerCommentDeleteAttached (&$obj)
 
 triggerDeleteModuleFiles (&$obj)
 
 setUploadInfo ($editor_sequence, $upload_target_srl=0)
 
 setFilesValid ($upload_target_srl)
 
 insertFile ($file_info, $module_srl, $upload_target_srl, $download_count=0, $manual_insert=false)
 
 deleteFile ($file_srl)
 
 deleteFiles ($upload_target_srl)
 
 moveFile ($source_srl, $target_module_srl, $target_srl)
 
 procFileSetCoverImage ()
 
 printUploadedFileList ($editor_sequence, $upload_target_srl)
 
 triggerCopyModule (&$obj)
 
- Public Member Functions inherited from file
 moduleInstall ()
 
 checkUpdate ()
 
 moduleUpdate ()
 
 recompileCache ()
 
- Public Member Functions inherited from ModuleObject
 setModule ($module)
 
 setModulePath ($path)
 
 setRedirectUrl ($url= './', $output=NULL)
 
 getRedirectUrl ()
 
 setMessage ($message= 'success', $type=NULL)
 
 setMessageType ($type)
 
 getMessageType ()
 
 setRefreshPage ()
 
 setAct ($act)
 
 setModuleInfo ($module_info, $xml_info)
 
 stop ($msg_code)
 
 setTemplateFile ($filename)
 
 getTemplateFile ()
 
 setTemplatePath ($path)
 
 getTemplatePath ()
 
 setEditedLayoutFile ($filename)
 
 getEditedLayoutFile ()
 
 setLayoutFile ($filename)
 
 getLayoutFile ()
 
 setLayoutPath ($path)
 
 getLayoutPath ($layout_name="", $layout_type="P")
 
 proc ()
 
- Public Member Functions inherited from BaseObject
 __construct ($error=0, $message= 'success')
 
 setError ($error=0)
 
 getError ()
 
 setHttpStatusCode ($code= '200')
 
 getHttpStatusCode ()
 
 setMessage ($message= 'success', $type=NULL)
 
 getMessage ()
 
 add ($key, $val)
 
 adds ($object)
 
 get ($key)
 
 gets ()
 
 getVariables ()
 
 getObjectVars ()
 
 toBool ()
 
 toBoolean ()
 

Additional Inherited Members

- Public Attributes inherited from ModuleObject
 $mid = NULL
 string to represent run-time instance of Module (XE Module) More...
 
 $module = NULL
 Class name of Xe Module that is identified by mid. More...
 
 $module_srl = NULL
 integer value to represent a run-time instance of Module (XE Module) More...
 
 $module_info = NULL
 an object containing the module information More...
 
 $origin_module_info = NULL
 
 $xml_info = NULL
 an object containing the module description extracted from XML file More...
 
 $module_path = NULL
 a path to directory where module source code resides More...
 
 $act = NULL
 a string value to contain the action name More...
 
 $template_path = NULL
 a path of directory where template files reside More...
 
 $template_file = NULL
 name of template file More...
 
 $layout_path = ''
 a path of directory where layout files reside More...
 
 $layout_file = ''
 name of layout file More...
 
 $edited_layout_file = ''
 name of temporary layout files that is modified in an admin mode More...
 
 $stop_proc = FALSE
 a flag to indicating whether to stop the execution of code. More...
 
 $module_config = NULL
 
 $ajaxRequestMethod = array('XMLRPC', 'JSON')
 
 $gzhandler_enable = TRUE
 
- Public Attributes inherited from BaseObject
 $error = 0
 
 $message = 'success'
 
 $variables = array()
 
 $httpStatusCode = NULL
 

Detailed Description

Controller class of the file module

Author
NAVER (devel.nosp@m.oper.nosp@m.s@xpr.nosp@m.esse.nosp@m.ngine.nosp@m..com)

Definition at line 7 of file file.controller.php.

Member Function Documentation

fileController::deleteFile (   $file_srl)

Delete the attachment

This method call trigger 'file.deleteFile'.
Before, after trigger object contains:

  • download_url
  • file_srl
  • upload_target_srl
  • upload_target_type
  • sid
  • module_srl
  • member_srl
  • download_count
  • direct_download
  • source_filename
  • uploaded_filename
  • file_size
  • comment
  • isvalid
  • regdate
  • ipaddress
Parameters
int$file_srlSequence of file to delete
Returns
BaseObject

Definition at line 834 of file file.controller.php.

fileController::deleteFiles (   $upload_target_srl)

Delete all attachments of a particular document

Parameters
int$upload_target_srlUpload target srl to delete files
Returns
BaseObject

Definition at line 899 of file file.controller.php.

fileController::init ( )

Initialization

Returns
void

Definition at line 13 of file file.controller.php.

fileController::insertFile (   $file_info,
  $module_srl,
  $upload_target_srl,
  $download_count = 0,
  $manual_insert = false 
)

Add an attachement

This method call trigger 'file.insertFile'.
Before trigger object contains:

  • module_srl
  • upload_target_srl
After trigger object contains:

  • file_srl
  • upload_target_srl
  • module_srl
  • direct_download
  • source_filename
  • uploaded_filename
  • donwload_count
  • file_size
  • comment
  • member_srl
  • sid
Parameters
object$file_infoPHP file information array
int$module_srlSequence of module to upload file
int$upload_target_srlSequence of target to upload file
int$download_countInitial download count
bool$manual_insertIf set true, pass validation check
Returns
BaseObject

Definition at line 656 of file file.controller.php.

fileController::moveFile (   $source_srl,
  $target_module_srl,
  $target_srl 
)

Move an attachement to the other document

Parameters
int$source_srlSequence of target to move
int$target_module_srlNew squence of module
int$target_srlNew sequence of target
Returns
void

Definition at line 943 of file file.controller.php.

fileController::printUploadedFileList (   $editor_sequence,
  $upload_target_srl 
)

Find the attachment where a key is upload_target_srl and then return java script code

Deprecated:
Parameters
int$editor_sequence
int$upload_target_srl
Returns
void

Definition at line 1047 of file file.controller.php.

fileController::procFileDelete ( )

Delete an attachment from the editor

Returns
BaseObject

Definition at line 394 of file file.controller.php.

fileController::procFileDownload ( )

Download Attachment

Receive a request directly
file_srl: File sequence
sid : value in DB for comparison, No download if not matched
This method call trigger 'file.downloadFile'.
before, after.
Trigger object contains:

  • download_url
  • file_srl
  • upload_target_srl
  • upload_target_type
  • sid
  • module_srl
  • member_srl
  • download_count
  • direct_download
  • source_filename
  • uploaded_filename
  • file_size
  • comment
  • isvalid
  • regdate
  • ipaddress
return void

Definition at line 179 of file file.controller.php.

fileController::procFileGetList ( )

get file list

Returns
BaseObject

Definition at line 438 of file file.controller.php.

fileController::procFileIframeUpload ( )

Iframe upload attachments

Returns
BaseObject

Definition at line 63 of file file.controller.php.

fileController::procFileImageResize ( )

Image resize

Returns
BaseObject

Definition at line 111 of file file.controller.php.

fileController::procFileOutput ( )

Definition at line 304 of file file.controller.php.

fileController::procFileSetCoverImage ( )

Definition at line 986 of file file.controller.php.

fileController::procFileUpload ( )

Upload attachments in the editor

Determine the upload target srl from editor_sequence and uploadTargetSrl variables. Create and return the UploadTargetSrl if not exists so that UI can use the value for sync.

Returns
void

Definition at line 26 of file file.controller.php.

fileController::setFilesValid (   $upload_target_srl)

Set the attachements of the upload_target_srl to be valid By changing its state to valid when a document is inserted, it prevents from being considered as a unnecessary file

Parameters
int$upload_target_srl
Returns
BaseObject

Definition at line 618 of file file.controller.php.

fileController::setUploadInfo (   $editor_sequence,
  $upload_target_srl = 0 
)

Upload enabled

Parameters
int$editor_sequence
int$upload_target_srl
Returns
void

Definition at line 601 of file file.controller.php.

fileController::triggerAttachFiles ( $obj)

A trigger to link the attachment with the upload_target_srl (document_srl)

Parameters
object$objTrigger object
Returns
BaseObject

Definition at line 501 of file file.controller.php.

fileController::triggerCheckAttached ( $obj)

A trigger to return numbers of attachments in the upload_target_srl (document_srl)

Parameters
object$objTrigger object
Returns
BaseObject

Definition at line 484 of file file.controller.php.

fileController::triggerCommentAttachFiles ( $obj)

A trigger to link the attachment with the upload_target_srl (comment_srl)

Parameters
object$objTrigger object
Returns
BaseObject

Definition at line 550 of file file.controller.php.

fileController::triggerCommentCheckAttached ( $obj)

A trigger to return numbers of attachments in the upload_target_srl (comment_srl)

Parameters
object$objTrigger object
Returns
BaseObject

Definition at line 533 of file file.controller.php.

fileController::triggerCommentDeleteAttached ( $obj)

A trigger to delete the attachment in the upload_target_srl (comment_srl)

Parameters
object$objTrigger object
Returns
BaseObject

Definition at line 568 of file file.controller.php.

fileController::triggerCopyModule ( $obj)

Definition at line 1052 of file file.controller.php.

fileController::triggerDeleteAttached ( $obj)

A trigger to delete the attachment in the upload_target_srl (document_srl)

Parameters
object$objTrigger object
Returns
BaseObject

Definition at line 518 of file file.controller.php.

fileController::triggerDeleteModuleFiles ( $obj)

A trigger to delete all the attachements when deleting the module

Parameters
object$objTrigger object
Returns
BaseObject

Definition at line 585 of file file.controller.php.


The documentation for this class was generated from the following file: