PHP Класс Bolt\Filesystem\FilePermissions

Автор: Benjamin Georgeault ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

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

allowedUpload() публичный Метод

Checks if a given file is acceptable for upload.
public allowedUpload ( string $originalFilename ) : boolean
$originalFilename string
Результат boolean

authorized() публичный Метод

Check if you can do something with the given file or directory.
public authorized ( string $prefix, string $path ) : boolean
$prefix string
$path string
Результат boolean

getAllowedUploadExtensions() публичный Метод

Get the array of configured acceptable file extensions.
public getAllowedUploadExtensions ( ) : array
Результат array

getMaxUploadSize() публичный Метод

Get the maximum upload size the server is configured to accept.
public getMaxUploadSize ( ) : double
Результат double

getMaxUploadSizeNice() публичный Метод

Get the max upload value in a formatted string.
public getMaxUploadSizeNice ( ) : string
Результат string

Описание свойств

$allowed защищенное свойство

Regex list represented editable resources.
protected $allowed

$allowedPrefixes защищенное свойство

List of Filesystem prefixes that are editable.
protected $allowedPrefixes

$blocked защищенное свойство

Regex list represented resources forbidden for edition.
protected $blocked

$config защищенное свойство

protected Config,Bolt $config
Результат Bolt\Config

$maxUploadSize защищенное свойство

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