Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: g:\Work\WWW\php\tbox\lib/ccfile.phps
PHP Documentation - PHP/Toolbox::Form

CCFile

CSnippet
  |
  +-- CMarkup
    |
    +-- CControl
      |
      +-- CCFile

The CForm control for file uploading.

 

private class CCFile extends CControl

The CForm control for file uploading.
| new CFile(array( | "label" => ..., | "do" => $DO, | "upload_dir" => "$DOCUMENT_ROOT/upload/" | ))

 

Methods inherited from CControl

ccontrol, getvalue, invalue, validatevalue

Methods inherited from CMarkup

cmarkup, write

Methods inherited from CSnippet

csnippet, append, qualify, getglobal, setglobal, write, flush, writecode

Public Method Summary

void

CCFile( $attrs)

No additional comments.

Private Method Summary

void

outValue()

Control's value to output from the form.No additional comments.
void

acceptUpload( $tmpfile, $oldfile, $abs_path, $upload_dir)

Accepts uploaded file
void

doUploadFile( $tmpfile, $oldfile, $abs_path, $upload_dir)

Performs the file uploading and database operation logic.
void

render()

Main rendering method.No additional comments.
void

renderReadonly()

Readonly rendering method.No additional comments.

Fields inherited from CControl

$nodata

Fields inherited from CMarkup

$attrs, $nodata

Fields inherited from CSnippet

$id

Private Field Summary

string

$do

The operation:
string

$type

string

$abs_path

string

$upload_dir

Public Method Details

CCFile

public void CCFile( $attrs )

 

No additional comments.

Parameter
$attrs
No additional comments.
Returns void


Private Method Details

outValue

private void outValue( )

  Control's value to output from the form.
Use this to override the data handling, e.g. to process special data formats.

No additional comments.

Returns void


acceptUpload

private void acceptUpload( $tmpfile, $oldfile, $abs_path, $upload_dir )

  Accepts uploaded file
and moves it to permanent location.

Parameter
$tmpfile
No additional comments.
$oldfile
No additional comments.
$abs_path
No additional comments.
$upload_dir
No additional comments.
Returns void


doUploadFile

private void doUploadFile( $tmpfile, $oldfile, $abs_path, $upload_dir )

  Performs the file uploading and database operation logic.

Parameter
$tmpfile
No additional comments.
$oldfile
No additional comments.
$abs_path
No additional comments.
$upload_dir
No additional comments.
Returns void


render

private void render( )

  Main rendering method.
It never has to be used directly, use it via the parent form method
$form->renderControl($form->controls["name"]);
instead.

No additional comments.

Returns void


renderReadonly

private void renderReadonly( )

  Readonly rendering method.
It's called by parent form when in Readonly mode. It produces a plain text and a hidden field.

No additional comments.

Returns void


Private Field Details

$do

private string $do

>>""<<

The operation:

  • INS - insert a record
  • EDIT - modify a record
  • DEL - delete a record

$type

private string $type

>>"file"<<



$abs_path

private string $abs_path

>>"/tmp"<<



$upload_dir

private string $upload_dir

>>""<<




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta