PHP Class Ojs\CoreBundle\Helper\FileHelper

Mostra file Open project: ojs/ojs Class Usage Examples

Public Methods

Method Description
generatePath ( string $fileName, boolean $createDir = false, string $uploadRootPath = './', integer $level = 3 ) : string Generates a $n level folder tree for given filename by exploding the filename
generateRandomPath ( boolean $createDir = false, string $uploadRootPath = './', integer $level = 3 ) : string Generates a $n level folder tree with random integer by exploding the filename

Method Details

generatePath() public method

Generates a $n level folder tree for given filename by exploding the filename
public generatePath ( string $fileName, boolean $createDir = false, string $uploadRootPath = './', integer $level = 3 ) : string
$fileName string
$createDir boolean
$uploadRootPath string upload root path
$level integer
return string

generateRandomPath() public method

Generates a $n level folder tree with random integer by exploding the filename
public generateRandomPath ( boolean $createDir = false, string $uploadRootPath = './', integer $level = 3 ) : string
$createDir boolean
$uploadRootPath string upload root path
$level integer
return string