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

Public Member Functions

 init ()
 
 getFileList ()
 
 getFilesCount ($upload_target_srl)
 
 getDownloadUrl ($file_srl, $sid, $module_srl="")
 
 getFileConfig ($module_srl=null)
 
 getFile ($file_srl, $columnList=array())
 
 getFiles ($upload_target_srl, $columnList=array(), $sortIndex= 'file_srl', $ckValid=false)
 
 getUploadConfig ()
 
 getUploadStatus ($attached_size=0)
 
 getFileModuleConfig ($module_srl)
 
 getFileGrant ($file_info, $member_info)
 
- 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

Model 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.model.php.

Member Function Documentation

fileModel::getDownloadUrl (   $file_srl,
  $sid,
  $module_srl = "" 
)

Get a download path

Parameters
int$file_srlThe sequence of file to get url
string$sid
Returns
string Returns a url

Definition at line 140 of file file.model.php.

fileModel::getFile (   $file_srl,
  $columnList = array() 
)

Get file information

Parameters
int$file_srlThe sequence of file to get information
array$columnListThe list of columns to get from DB
Returns
BaseObject|object|array If error returns an instance of BaseObject. If result set is one returns a object that contins file information. If result set is more than one returns array of object.

Definition at line 213 of file file.model.php.

fileModel::getFileConfig (   $module_srl = null)

Get file configurations

Parameters
int$module_srlIf set this, returns specific module's configuration. Otherwise returns global configuration.
Returns
object Returns configuration.

Definition at line 151 of file file.model.php.

fileModel::getFileGrant (   $file_info,
  $member_info 
)

Returns a grant of file

Parameters
object$file_infoThe file information to get grant
object$member_infoThe member information to get grant
Returns
object Returns a grant of file

Definition at line 347 of file file.model.php.

fileModel::getFileList ( )

Return a file list attached in the document

It is used when a file list of the upload_target_srl is requested for creating/updating a document. Attempt to replace with sever-side session if upload_target_srl is not yet determined

Returns
void

Definition at line 25 of file file.model.php.

fileModel::getFileModuleConfig (   $module_srl)

Return file configuration of the module

Parameters
int$module_srlThe sequence of module to get configuration
Returns
object

Definition at line 335 of file file.model.php.

fileModel::getFiles (   $upload_target_srl,
  $columnList = array(),
  $sortIndex = 'file_srl',
  $ckValid = false 
)

Return all files which belong to a specific document

Parameters
int$upload_target_srlThe sequence of target to get file list
array$columnListThe list of columns to get from DB
string$sortIndexThe column that used as sort index
Returns
array Returns array of object that contains file information. If no result returns null.

Definition at line 253 of file file.model.php.

fileModel::getFilesCount (   $upload_target_srl)

Return number of attachments which belongs to a specific document

Parameters
int$upload_target_srlThe sequence to get a number of files
Returns
int Returns a number of files

Definition at line 125 of file file.model.php.

fileModel::getUploadConfig ( )

Return configurations of the attachement (it automatically checks if an administrator is)

Returns
object Returns a file configuration of current module. If user is admin, returns PHP's max file size and allow all file types.

Definition at line 281 of file file.model.php.

fileModel::getUploadStatus (   $attached_size = 0)

Return messages for file upload and it depends whether an admin is or not

Parameters
int$attached_size
Returns
string

Definition at line 312 of file file.model.php.

fileModel::init ( )

Initialization

Returns
void

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


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