Back

Class: Storage

:delete ($key, $file=NULL, $dirPath=false)

Odstrani subor $file uzivatela s klucom $key. V pripade $dirPath == true zmaze celu zlozku - zmaze celu zlozku. //Pre razdne $file sa maze cely adresar dany $id

:deleteDir ($dir)

:error ()

:fileInfo ($key, $fileName)

ziska informacie o subore
$key - kluc k v ceste
$fileName - nazov suboru
return pole s klucmi: size, type

:get ($key, $fileName=NULL, $onlyKey=false, $structure=false)

Nacita zoznam ciest k suborom v zlozke uzivatela definovaneho $key
$key
- kluc uzivatela
$fileName - ak je definovany nazov suboru, vrati cestu k nemu
$onlyKey - v pripade true nevracia uplnu cestu, ale len relativnu s kluc/subor
return - pole ciest k suborom

:getKey ($name, $id)

vrati kluc uzivatela z $name a $id

:getNormalArray ($data)

make normaln array from multiple files upload, where normal is $file[1], $file[2]...

:imageSettings ($resize=false, $preview=false)

specialne nastavenia pre obrazky
$resize - po uploade premeni na velkost s najdlhsim rozmerom $resize
$preview
- v pripade obrazka urcenie, ci sa vytvaraju zmensene previews

:init ($path, $type=NULL)

inicializuje ulozisko
$path - cesta k uloziku
$type - typ ulozika (image) alebo pole povolenych formatov

:move ($from, $to=NULL, $removeFrom=false)

Move file or files from $from to $to location //if $from is directory, it moves it contenct to $to directory //$to - is path AFTER the path defined in init //$removeFrom - unlink $to after success?

:parseType ($file)

eturn file type from uploaded file array

:path ($key)

eturns set path with key specified

:put ($key, $fileName, $content)

:resizeImage ($targetPath, $fileName, $resultPath, $type, $value, $size=NULL)

:setMaxSize ($size)

nastavi maximalnu velkost suboru v MB

:upload ($key, $upFile, $randomName=true, $setName=NULL)

ulozi nahrany subor do ulozisla
$key - kluc/zlozka pre subory
$upFile - subor pre upload v tmp ulozisku
$randomName - ma byt nazov nahodne generovany?
$setName - nastavit nazov staticky? (len pre $randomName=false)
return
- nazov uloadnuteho suboru


:_checkType ($type)


Back

ChameleonFramework © 2012 - 2024