file_support
class file_support extends facade mixin file_support
Facade for local_middag\framework\support\moodle\file_support.
Properties
| static protected array<string,object> | $resolved_instances | The resolved object instances (cached roots). |
from abstract_facade |
| static protected bool | $cached | Indicates if resolved instances should be cached. |
from abstract_facade |
Methods
Dynamically handle static method calls on the facade proxy.
Return the service accessor key for this facade.
Swap a given instance for testing or runtime overriding.
Clear one cached facade instance.
Resolve the instance from the Kernel container.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Details
in
abstract_facade at line 62
static mixed
__callStatic(string $method, array $args)
Dynamically handle static method calls on the facade proxy.
at line 53
static string
get_facade_accessor()
Return the service accessor key for this facade.
in
abstract_facade at line 94
static object
get_facade_root()
Get the root object behind the facade.
in
abstract_facade at line 104
static void
swap(object $instance)
Swap a given instance for testing or runtime overriding.
in
abstract_facade at line 118
static void
clear_resolved_instance(string $name)
Clear one cached facade instance.
in
abstract_facade at line 126
static void
clearresolved_instances()
Clear all cached facade instances.
in
abstract_facade at line 134
static void
disable_cache()
Disable instance caching (useful for testing).
in
abstract_facade at line 143
static void
enable_cache()
Enable instance caching.
in
abstract_facade at line 151
static void
reset()
Reset the facade: clear cache and re-enable caching.
in
abstract_facade at line 168
static protected object
resolve_facade_instance(string $name)
Resolve the instance from the Kernel container.
at line 48
static file_storage
get_storage()
No description
at line 48
static stored_file|false|null
get_file(int $contextid, string $component, string $filearea, int $itemid, bool $validimage = false)
No description
at line 48
static array
get_area_files(int $contextid, string $component, string $filearea, int $itemid)
No description
at line 48
void
static() $string get_content(\stored_file $file)
No description
at line 48
static bool
delete_file(stored_file $file)
No description
at line 48
static bool
delete_file_by_id(int $fileid)
No description
at line 48
static bool
delete_area_files(int $contextid, string $component, string $filearea, int|false $itemid = false)
No description
at line 48
static string
get_file_url(stored_file $file, bool $forcedownload = false, ?string $preview = null)
No description
at line 48
static bool
has_files(int $contextid, string $component, string $filearea, int $itemid)
No description
at line 48
static int
get_area_size(int $contextid, string $component, string $filearea, int $itemid)
No description
at line 48
static int
count_area_files(int $contextid, string $component, string $filearea, int $itemid)
No description
at line 48
static bool
is_valid_image(stored_file $file)
No description
at line 48
static mixed
get_content_file_handle(stored_file $file)
No description