namespace: VDM\Joomla\Interfaces\File
@startuml
interface HandlerInterface #Lavender {
+ setUseStreams(bool $useStreams) : self
+ setAllowUnsafe(bool $allowUnsafe) : self
+ setSafeFileOptions(array $safeFileOptions) : self
+ setEnqueueError(bool $enqueueError) : self
+ setLegalFormats(array $legalFormats) : self
+ getFile(string $field, string $type, ...) : ?array
+ removeFile(string $path) : bool
+ getErrors(bool $toString = true) : string|array
}
note right of HandlerInterface::setUseStreams
Set the $useStreams property to use streams for file handling
since: 5.0.3
return: self
end note
note left of HandlerInterface::setAllowUnsafe
Set the $allowUnsafe property to allow or disallow unsafe file uploads.
since: 5.0.3
return: self
end note
note right of HandlerInterface::setSafeFileOptions
Set the $safeFileOptions property to define options for file safety checks.
since: 5.0.3
return: self
end note
note left of HandlerInterface::setEnqueueError
Set the $enqueueError property to control error reporting behavior.
since: 5.0.3
return: self
end note
note right of HandlerInterface::setLegalFormats
Set the $legalFormats property to define legal file formats.
since: 5.0.3
return: self
end note
note left of HandlerInterface::getFile
Get a file from the input based on field name and file type, then process it.
since: 3.0.11
return: ?array
arguments:
string $field
string $type
string $filter = null
string $path = null
end note
note right of HandlerInterface::removeFile
Remove a previously uploaded file.
This method uses the same internal removal mechanism as the uploader,
ensuring consistent cleanup logic across the system.
It accepts either:
- a full filesystem path
- or a filename resolvable by Path::clean
since: 5.1.4
return: bool
end note
note left of HandlerInterface::getErrors
Get the error messages as a string.
since: 5.0.3
return: string|array
end note
@enduml
The Power feature in JCB allows you to write PHP classes and their implementations, making it easy to include them in your Joomla project. JCB handles linking, autoloading, namespacing, and folder structure creation for you.
By using the SPK (Super Power Key) in your custom code (replacing the class name in your code with the SPK), JCB will automatically pull the Power from the repository into your project. This makes it available in your JCB instance, allowing you to edit and include the class in your generated Joomla component.
JCB uses placeholders like [[[NamespacePrefix]]] and [[[ComponentNamespace]]] in
namespacing to prevent collisions and improve reusability across different JCB systems.
You can also set the JCB powers path globally or per component under the Dynamic Integration tab, providing flexibility and maintainability.
To add this specific Power to your project in JCB:
Simply use this SPK:
Super---0e23f0ac_8a0a_450e_b40c_912bf331bfae---Power
Remember to replace the
---with___to activate this Power in your code.