Elgg
Version 1.9
|
Go to the source code of this file.
Namespaces | |
Elgg\Core | |
Activate a plugin or plugins. | |
Functions | |
get_dir_size ($dir, $totalsize=0) | |
Get the size of the specified directory. More... | |
get_uploaded_file ($input_name) | |
Get the contents of an uploaded file. More... | |
get_resized_image_from_uploaded_file ($input_name, $maxwidth, $maxheight, $square=false, $upscale=false) | |
Gets the jpeg contents of the resized version of an uploaded image (Returns false if the uploaded file was not an image) More... | |
get_resized_image_from_existing_file ($input_name, $maxwidth, $maxheight, $square=false, $x1=0, $y1=0, $x2=0, $y2=0, $upscale=false) | |
Gets the jpeg contents of the resized version of an already uploaded image (Returns false if the file was not an image) More... | |
get_image_resize_parameters ($width, $height, $options) | |
Calculate the parameters for resizing an image. More... | |
file_delete ($guid) | |
Delete an ElggFile file. More... | |
file_get_general_file_type ($mimetype) | |
Returns an overall file type from the mimetype. More... | |
delete_directory ($directory) | |
Delete a directory and all its contents. More... | |
clear_user_files ($user) | |
Removes all user files. More... | |
get_default_filestore () | |
Return the default filestore. More... | |
set_default_filestore (ElggFilestore $filestore) | |
Set the default filestore for the system. More... | |
_elgg_filestore_init () | |
Initialize the file library. More... | |
_elgg_filestore_test ($hook, $type, $value) | |
Unit tests for files. More... | |
Variables | |
$DEFAULT_FILE_STORE = null | |
Variable holding the default datastore. More... | |
_elgg_filestore_init | ( | ) |
Initialize the file library.
Listens to system init and configures the default filestore
Definition at line 495 of file filestore.php.
_elgg_filestore_test | ( | $hook, | |
$type, | |||
$value | |||
) |
Unit tests for files.
string | $hook | unit_test |
string | $type | system |
mixed | $value | Array of tests |
Definition at line 517 of file filestore.php.
clear_user_files | ( | $user | ) |
Removes all user files.
Definition at line 448 of file filestore.php.
delete_directory | ( | $directory | ) |
Delete a directory and all its contents.
string | $directory | Directory to delete |
Definition at line 405 of file filestore.php.
file_delete | ( | $guid | ) |
Delete an ElggFile file.
int | $guid | ElggFile GUID |
Definition at line 325 of file filestore.php.
file_get_general_file_type | ( | $mimetype | ) |
Returns an overall file type from the mimetype.
string | $mimetype | The MIME type |
Definition at line 364 of file filestore.php.
get_default_filestore | ( | ) |
get_dir_size | ( | $dir, | |
$totalsize = 0 |
|||
) |
Get the size of the specified directory.
string | $dir | The full path of the directory |
int | $totalsize | Add to current dir size |
Definition at line 18 of file filestore.php.
get_image_resize_parameters | ( | $width, | |
$height, | |||
$options | |||
) |
Calculate the parameters for resizing an image.
int | $width | Width of the original image |
int | $height | Height of the original image |
array | $options | See $defaults for the options |
Definition at line 202 of file filestore.php.
get_resized_image_from_existing_file | ( | $input_name, | |
$maxwidth, | |||
$maxheight, | |||
$square = false , |
|||
$x1 = 0 , |
|||
$y1 = 0 , |
|||
$x2 = 0 , |
|||
$y2 = 0 , |
|||
$upscale = false |
|||
) |
Gets the jpeg contents of the resized version of an already uploaded image (Returns false if the file was not an image)
string | $input_name | The name of the file on the disk |
int | $maxwidth | The desired width of the resized image |
int | $maxheight | The desired height of the resized image |
bool | $square | If set to true, takes the smallest of maxwidth and maxheight and use it to set the dimensions on the new image. If no crop parameters are set, the largest square that fits in the image centered will be used for the resize. If square, the crop must be a square region. |
int | $x1 | x coordinate for top, left corner |
int | $y1 | y coordinate for top, left corner |
int | $x2 | x coordinate for bottom, right corner |
int | $y2 | y coordinate for bottom, right corner |
bool | $upscale | Resize images smaller than $maxwidth x $maxheight? |
Definition at line 107 of file filestore.php.
get_resized_image_from_uploaded_file | ( | $input_name, | |
$maxwidth, | |||
$maxheight, | |||
$square = false , |
|||
$upscale = false |
|||
) |
Gets the jpeg contents of the resized version of an uploaded image (Returns false if the uploaded file was not an image)
string | $input_name | The name of the file input field on the submission form |
int | $maxwidth | The maximum width of the resized image |
int | $maxheight | The maximum height of the resized image |
bool | $square | If set to true, will take the smallest of maxwidth and maxheight and use it to set the dimensions on all size; the image will be cropped. |
bool | $upscale | Resize images smaller than $maxwidth x $maxheight? |
Definition at line 71 of file filestore.php.
get_uploaded_file | ( | $input_name | ) |
Get the contents of an uploaded file.
(Returns false if there was an issue.)
string | $input_name | The name of the file input field on the submission form |
Definition at line 43 of file filestore.php.
set_default_filestore | ( | ElggFilestore | $filestore | ) |
Set the default filestore for the system.
ElggFilestore | $filestore | An ElggFilestore object. |
Definition at line 480 of file filestore.php.
$DEFAULT_FILE_STORE = null |
Variable holding the default datastore.
Definition at line 460 of file filestore.php.