Public Member Functions | |
zRom_upload ($method=null) | |
__construct ($method=null) | |
initValidator ($map_file) | |
Initilizes the validation System. | |
valueOf ($fieldName, $strict=false) | |
Works same as zRom_form::valueOf() however only applicable to File Upload. | |
isSubmitted () | |
Checks wheather or not form has been submitted. | |
Data Fields | |
$items = array() | |
$isValid = true | |
$is_submited = false | |
$frm_method |
$request->file
is actually an Instance of zRom_upload Class. This class works like a Container or all File Upload Field(s). actually There is a composition relation between zRom_fields and zRom_form cause all fields are contained into zRom_form as a zRom_fields object
Definition at line 265 of file map.php.
zRom_upload::__construct | ( | $ | method = null |
) |
zRom_upload::zRom_upload | ( | $ | method = null |
) |
Definition at line 284 of file map.php.
References upload::__construct().
00284 { 00285 $this->__construct($method); 00286 }
zRom_upload::initValidator | ( | $ | map_file | ) |
Initilizes the validation System.
Validates the form by the provided Validation Map Name.
$map_file | string Name of the Validation Map e.g. if the map Name is abcd.vld.map.php just specify ancd here |
Definition at line 304 of file map.php.
References validationCore::$rules, zLogger::debug(), validationCore::errtext(), validationCore::isValid(), validationCore::parseCriteria(), and validationCore::validationStatus().
00304 { 00305 zLogger::debug("Initializing Validation(FILE) System reading ".$map_file, 'rom.validation'); 00306 $this->isValid = false; 00307 $this->parseCriteria($map_file); 00308 $this->isValid = $this->isValid(); 00309 foreach($this->rules as $field_name => $rules){ 00310 //{ Make the $this->${field_names} = OBJECTS 00311 $field_name = str_replace(' ', '_', $field_name);//Replace all SPACE with _ 00312 $errText = $this->errtext($field_name); 00313 $this->{$field_name} =& new zRom_fields($this->items[$field_name], $errText, $this->isValid($field_name), $this->validationStatus($field_name)); 00314 $validString = ($this->isValid($field_name)) ? "Valid" : "InValid"; 00315 zLogger::debug("Storing Form Field: $field_name Value:$field_name as $validString ErrText: ".$errText, 'rom.Validation'); 00316 } 00317 }
zRom_upload::valueOf | ( | $ | fieldName, | |
$ | strict = false | |||
) |
Works same as zRom_form::valueOf() however only applicable to File Upload.
$fieldName | string Name of the form Field thats value you want to retrive | |
$strict | boolean if set to true returns boolean false if the form field doesn't exists |
Definition at line 325 of file map.php.
00325 { 00326 return isset($this->items[$fieldName]) ? $this->items[$fieldName] : ($strict ? false : ""); 00327 }
zRom_upload::isSubmitted | ( | ) |