All Data Structures Functions Variables Pages
Static Public Member Functions
FileModelUtil Class Reference

Static Public Member Functions

static makeByFilePathAndName ($filePath, $fileName)
 
static makeByUploadedFile ($uploadedFile)
 
static resolveModelsHasManyFilesFromPost (&$model, $relationName, $postDataVariableName)
 
static makeByExistingFileModelId ($fileModelId, $sharedContent=true)
 
static makeByFileModel ($existingFileModel, $sharedContent=true)
 

Detailed Description

Model to handle file attachments. This model stores name, type, and size information. It has a related FileContent model that has the actual file content.

Definition at line 41 of file FileModelUtil.php.

Member Function Documentation

static makeByFilePathAndName (   $filePath,
  $fileName 
)
static
Parameters
string$filePath
string$fileName
Returns
$fileModel or false on failure

Definition at line 49 of file FileModelUtil.php.

static makeByUploadedFile (   $uploadedFile)
static

Given an instance of a CUploadedFile, make a FileModel, save it, and return it. If the file is empty, an exception is thrown otherwise the fileModel is returned.

Parameters
object$uploadedFileCUploadedFile

Definition at line 77 of file FileModelUtil.php.

static resolveModelsHasManyFilesFromPost ( $model,
  $relationName,
  $postDataVariableName 
)
static
Parameters
$model
$relationName
$postDataVariableName

Definition at line 99 of file FileModelUtil.php.

static makeByExistingFileModelId (   $fileModelId,
  $sharedContent = true 
)
static
Parameters
integer$fileModelId
bool$sharedContent
Returns
$fileModel or false on failure

Definition at line 146 of file FileModelUtil.php.

static makeByFileModel (   $existingFileModel,
  $sharedContent = true 
)
static
Parameters
FileModel$existingFileModel
bool$sharedContent
Returns
$fileModel or false on failure

Definition at line 159 of file FileModelUtil.php.


The documentation for this class was generated from the following file:
Generated on Mon Jan 27 2020 07:10:38