PHP Class Bolt\Filesystem\FilePermissions

Author: Benjamin Georgeault ([email protected])
Afficher le fichier Open project: bolt/bolt Class Usage Examples

Protected Properties

Свойство Type Description
$allowed Regex list represented editable resources.
$allowedPrefixes List of Filesystem prefixes that are editable.
$blocked Regex list represented resources forbidden for edition.
$config Bolt\Config
$maxUploadSize Maximum upload size allowed by PHP, in bytes.

Méthodes publiques

Méthode Description
__construct ( Config $config ) Constructor, initialize filters rules.
allowedUpload ( string $originalFilename ) : boolean Checks if a given file is acceptable for upload.
authorized ( string $prefix, string $path ) : boolean Check if you can do something with the given file or directory.
getAllowedUploadExtensions ( ) : array Get the array of configured acceptable file extensions.
getMaxUploadSize ( ) : double Get the maximum upload size the server is configured to accept.
getMaxUploadSizeNice ( ) : string Get the max upload value in a formatted string.

Method Details

__construct() public méthode

Constructor, initialize filters rules.
public __construct ( Config $config )
$config Bolt\Config

allowedUpload() public méthode

Checks if a given file is acceptable for upload.
public allowedUpload ( string $originalFilename ) : boolean
$originalFilename string
Résultat boolean

authorized() public méthode

Check if you can do something with the given file or directory.
public authorized ( string $prefix, string $path ) : boolean
$prefix string
$path string
Résultat boolean

getAllowedUploadExtensions() public méthode

Get the array of configured acceptable file extensions.
public getAllowedUploadExtensions ( ) : array
Résultat array

getMaxUploadSize() public méthode

Get the maximum upload size the server is configured to accept.
public getMaxUploadSize ( ) : double
Résultat double

getMaxUploadSizeNice() public méthode

Get the max upload value in a formatted string.
public getMaxUploadSizeNice ( ) : string
Résultat string

Property Details

$allowed protected_oe property

Regex list represented editable resources.
protected $allowed

$allowedPrefixes protected_oe property

List of Filesystem prefixes that are editable.
protected $allowedPrefixes

$blocked protected_oe property

Regex list represented resources forbidden for edition.
protected $blocked

$config protected_oe property

protected Config,Bolt $config
Résultat Bolt\Config

$maxUploadSize protected_oe property

Maximum upload size allowed by PHP, in bytes.
protected $maxUploadSize