nyroFwk  0.2
Public Member Functions | Protected Member Functions | Protected Attributes
form_fileUploaded Class Reference
Inheritance diagram for form_fileUploaded:
object

Public Member Functions

 getHelper ()
 
 save ()
 
 getInfo ()
 
 getCurrent ()
 
 setCurrent ($file, $refill=false)
 
 getView ()
 
 isSaved ($fromRequest=false)
 
 delete ()
 
 isValid ()
 
 __toString ()
 
 getAttr ($name)
 
 setAttr ($name, $value)
 
 getCfg ()
 

Protected Member Functions

 afterInit ()
 
 getHelperPrm ($name)
 
 callHelper ($fct, $filename=null, $defRet=true)
 
 safeFileName ($name)
 
 beforeInit ()
 

Protected Attributes

 $file = array()
 
 $dir
 
 $saved
 
 $subdir
 
 $helper
 
 $cfg
 

Detailed Description

Used by form_file to save the uploaded file

Definition at line 10 of file fileUploaded.class.php.

Member Function Documentation

◆ __toString()

__toString ( )

Definition at line 273 of file fileUploaded.class.php.

◆ afterInit()

afterInit ( )
protected

Definition at line 47 of file fileUploaded.class.php.

◆ beforeInit()

beforeInit ( )
protectedinherited

Call just before the configuration initialisation

Definition at line 35 of file object.class.php.

◆ callHelper()

callHelper (   $fct,
  $filename = null,
  $defRet = true 
)
protected

Call an helper function

Parameters
string$fctFunction name
string$filenameFilename
mixed$defRetDefault return if not callabled
Returns
mixed The helper function return or $defRet

Definition at line 126 of file fileUploaded.class.php.

◆ delete()

delete ( )

Delete the uploaded file

Returns
string

Definition at line 225 of file fileUploaded.class.php.

◆ getAttr()

getAttr (   $name)
inherited

Get an attribute

Parameters
string$nameAttribute name
Returns
mixed|null The attribute or null if not set

Definition at line 48 of file object.class.php.

◆ getCfg()

getCfg ( )
inherited

Get the configuration object

Returns
config

Definition at line 67 of file object.class.php.

◆ getCurrent()

getCurrent ( )

Get the current file path

Returns
string

Definition at line 179 of file fileUploaded.class.php.

◆ getHelper()

getHelper ( )

Get the helper object

Returns
null|helper_file

Definition at line 102 of file fileUploaded.class.php.

◆ getHelperPrm()

getHelperPrm (   $name)
protected

Get helper parameters to use with callHelper

Parameters
string$nameParameter name
Returns
array The value parameter
See also
callHelper

Definition at line 113 of file fileUploaded.class.php.

◆ getInfo()

getInfo ( )

The files uploaded info, retrieved from $_FILES

Returns
array

Definition at line 170 of file fileUploaded.class.php.

◆ getView()

getView ( )

Get the view for the uploaded element

Returns
string

Definition at line 199 of file fileUploaded.class.php.

◆ isSaved()

isSaved (   $fromRequest = false)

Indicate if the file was saved in this request

Returns
boolean

Definition at line 213 of file fileUploaded.class.php.

◆ isValid()

isValid ( )

Indicate if the file uploaded is valid

Returns
boolean

Definition at line 244 of file fileUploaded.class.php.

◆ safeFileName()

safeFileName (   $name)
protected

Create a filename to not erease existing files

Parameters
string$nameFilename
Returns
string Filename useable

Definition at line 259 of file fileUploaded.class.php.

◆ save()

save ( )

Save the file uploaded. Add a key 'saved' in the file array info

Definition at line 137 of file fileUploaded.class.php.

◆ setAttr()

setAttr (   $name,
  $value 
)
inherited

Set an attribute

Parameters
string$nameAttribute name
mixed$valueAttribute value

Definition at line 58 of file object.class.php.

◆ setCurrent()

setCurrent (   $file,
  $refill = false 
)

Set the current file path

Parameters
string$file
bool$refill

Definition at line 189 of file fileUploaded.class.php.

Field Documentation

◆ $cfg

$cfg
protectedinherited

Definition at line 17 of file object.class.php.

◆ $dir

$dir
protected

Definition at line 24 of file fileUploaded.class.php.

◆ $file

$file = array()
protected

Definition at line 17 of file fileUploaded.class.php.

◆ $helper

$helper
protected

Definition at line 45 of file fileUploaded.class.php.

◆ $saved

$saved
protected

Definition at line 31 of file fileUploaded.class.php.

◆ $subdir

$subdir
protected

Definition at line 38 of file fileUploaded.class.php.


The documentation for this class was generated from the following file:
Generated on Sun Oct 15 2017 22:25:20 for nyroFwk by doxygen 1.8.13