Class NFileUpload
Text box and browse button that allow users to select a file to upload to the server.
NObject | --NComponent | --NFormControl | --NFileUpload
Public Method Summary | |
---|---|
NFileUpload |
__construct
([string $label =
NULL ])
|
NFileUpload |
setValue
(array|NHttpUploadedFile $value)
Sets control's value.
|
static bool |
validateFileSize
(NFileUpload $control, int $limit)
FileSize validator: is file size in limit?
|
static bool |
validateFilled
(IFormControl $control)
Filled validator: has been any file uploaded?
|
static bool |
validateMimeType
(NFileUpload $control, array|string $mimeType)
MimeType validator: has file specified mime type?
|
Protected Method Summary | |
---|---|
protected void |
attached
(IComponent $form)
This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.
|
Methods Inherited From NComponent |
---|
__construct(), attached(), detached(), getName(), getParent(), lookup(), lookupPath(), monitor(), setParent(), unmonitor(), validateParent(), __clone(), __wakeup() |
Methods Inherited From NObject |
---|
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset() |
Variable Summary |
---|
Method Details | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 39 __constructpublic NFileUpload __construct ([string $label =
|
|||||||||||||||
line 53 attachedprotected void attached (IComponent $form) This method will be called when the component (or component's parent) becomes attached to a monitored object. Do not call this method yourself.
|
|||||||||||||||
line 71 setValuepublic NFileUpload setValue (array|NHttpUploadedFile $value) Sets control's value.
|
|||||||||||||||
line 106 validateFileSizepublic static bool validateFileSize (NFileUpload $control, int $limit) FileSize validator: is file size in limit?
|
|||||||||||||||
line 92 validateFilledpublic static bool validateFilled (IFormControl $control) Filled validator: has been any file uploaded?
|
|||||||||||||||
line 120 validateMimeTypepublic static bool validateMimeType (NFileUpload $control, array|string $mimeType) MimeType validator: has file specified mime type?
|