|
| | MaxSize () |
| |
| | getUploadMaxSize () |
| |
| | setFile ($name) |
| |
| | setPath ($path) |
| |
| | getFileExtension ($file) |
| |
| | allowedFileExtensions () |
| |
| | getFileUploadError ($code) |
| |
| | showFileUploadError () |
| |
| | setStore (string $type='local') |
| |
| | getStore () |
| |
| | setImageDim (int $width, int $height, bool $square=false) |
| |
| | getImageDim () |
| |
| | writeManifest ($directory, $filename, array $addedToCDN) |
| |
| | addFile () |
| |
| | getFiles () |
| |
| | searchFiles (array $params=array()) |
| |
| | setExtension (array $extension=array()) |
| |
| | setMimeTypes (array $mimtypes=array()) |
| |
| | typeAllowed () |
| |
| | getFile () |
| |
| | isCDN () |
| |
| | getManifest () |
| |
| | getPath () |
| |
| | isFile () |
| |
| | deleteFile () |
| |
| | resetRotation ($filename) |
| |
| | output (string $Mime='') |
| |
| | add () |
| |
| | get_entity () |
| |
| | save () |
| |
| | get_entities () |
| |
| | AddedEntityGuid () |
| |
| | updateEntity () |
| |
| | deleteByOwnerGuid ($guid, $type) |
| |
| | deleteEntity ($guid='') |
| |
| | searchEntities (array $params=array()) |
| |
| | canChange ($user='') |
| |
| | destruct () |
| |
| | __construct () |
| |
| | Connect () |
| |
| | insert ($params) |
| |
| | statement ($query) |
| |
| | execute ($values=array()) |
| |
| | update ($params=array()) |
| |
| | select ($params, $multi='') |
| |
| | fetch ($data=false) |
| |
| | delete ($params) |
| |
| | getLastEntry () |
| |
| | constructWheres (array $array, $operator="AND") |
| |
| | generateLimit ($data_limit=false, $page_limit=false, $offset=false) |
| |
| | clearVars () |
| |
| | __destruct () |
| |
| | getGUID () |
| |
| | getID () |
| |
| | getParam ($param) |
| |
| | isParam ($param) |
| |
| | __call ($method, $args) |
| |
◆ addFile()
addFile Add file to database
- Parameters
-
| integer | $object-,>owner_guid | Guid of owner , the file belongs to |
| string | $object-,>type | Owner type, |
| string | $object-,>subtype | file type |
- Returns
- integer|boolean
◆ allowedFileExtensions()
| allowedFileExtensions |
( |
| ) |
|
Allowed file extensions Validate file extension before save
- Returns
- array|null
◆ DeleteDir()
| static DeleteDir |
( |
|
$path | ) |
|
|
static |
DeleteDir Delete the directories including files
- Parameters
-
| string | $path | path of directory |
- Returns
- boolean
◆ deleteFile()
Delete file
- Returns
- boolean
◆ getFile()
Get a file
- Returns
- boolean|object
◆ getFileExtension()
| getFileExtension |
( |
|
$file | ) |
|
Get file extension from its name
- Parameters
-
| string | $file | Full file name |
- Returns
- string|false
◆ getFiles()
getFiles Get owner files
- Parameters
-
| integer | $object-,>owner_guid | Guid of owner , the file belongs to |
| string | $object-,>type | Owner type |
| string | $object-,>subtype | File type |
- Returns
- object
◆ getFileUploadError()
| getFileUploadError |
( |
|
$code | ) |
|
getFileUploadError Print user friendly file upload error
- Parameters
-
- Returns
- string
◆ getImageDim()
Get Image settings
- Returns
- boolean|array
◆ getManifest()
Get Manifest for CDN file
- Returns
- array|bool
◆ getPath()
Get a full file path in data root
- Returns
- boolean|string
◆ getStore()
Get store type
- Returns
- string|bool
◆ getUploadMaxSize()
UploadMaxSize Get server upload max size in bytes [E] Ossn::File MaxSize() add UploadMaxSize #2148
- Returns
- integer
◆ isCDN()
Check if the file is CDN
- Returns
- bool
◆ isFile()
Check if file exists or not
- Returns
- boolean
◆ MaxSize()
MaxSize Get server post max size size in bytes
- Returns
- integer
◆ mimeTypes()
◆ moveFiles()
| static moveFiles |
( |
|
$from, |
|
|
|
$to |
|
) |
| |
|
static |
moveFiles Move files from one directory to another
- Parameters
-
| string | $from | Complete directory path from where you want to move files. |
| string | $to | Complete directory path where you want to move files. |
- Returns
- boolean
◆ output()
| output |
( |
string |
$Mime = '' | ) |
|
Output the file to the browser
- Parameters
-
- Returns
- void
◆ resetRotation()
| resetRotation |
( |
|
$filename | ) |
|
Fix image rotation #981
- Returns
- void
◆ searchFiles()
| searchFiles |
( |
array |
$params = array() | ) |
|
getFiles
- Parameters
-
| string | $params,['subtype'] | File type |
| string | $params,['type'] | user/object/message etc |
| string | $params,['page_limit'] | Files per page |
| string | $params,['count'] | true if you want to count only |
- Returns
- array|bool
◆ setExtension()
| setExtension |
( |
array |
$extension = array() | ) |
|
Set required file extension
- Parameters
-
| array | $extension | Uploaded file extension can be jpg, jpeg |
- Returns
- void
◆ setFile()
setFile Set a required file in memory
- Parameters
-
- Returns
- void
◆ setImageDim()
| setImageDim |
( |
int |
$width, |
|
|
int |
$height, |
|
|
bool |
$square = false |
|
) |
| |
setImageDim Set Image Resolution
- Parameters
-
| int | $maxwidth | The desired width of the resized image |
| int | $maxheight | The desired height of the resized image |
| bool | $square | If it is true it will return a croped image based on w&h |
- Returns
- void
◆ setMimeTypes()
| setMimeTypes |
( |
array |
$mimtypes = array() | ) |
|
Set required file mimetype If not set, it will try to match mimetype with pre-defined mime type
- Parameters
-
| array | $mimtypes | Mimetypes that are allowed |
- Returns
- void
◆ setPath()
Set a path for file where it need to upload
- Parameters
-
| string | $path | Path where file need to save |
- Returns
- void
◆ setStore()
| setStore |
( |
string |
$type = 'local' | ) |
|
Set upload type
- Parameters
-
| string | $type | Type local/cdn |
- Returns
- void
◆ showFileUploadError()
showFileUploadError Show file upload errors
- Returns
- void
◆ typeAllowed()
Validate a uploaded file
Make sure the file extension match also check mimetype
- Returns
- boolean
◆ writeManifest()
| writeManifest |
( |
|
$directory, |
|
|
|
$filename, |
|
|
array |
$addedToCDN |
|
) |
| |
Write a manifest file for CDN based files
This contains the extra attributes like url, procider etc
- Parameters
-
| string | $directory | Directory Name |
| string | $filename | File name |
| array | $addedToCDN | A data that need to be added to file |
- Returns
- boolean
The documentation for this class was generated from the following file:
- source/classes/OssnFile.php