PHP Класс KamranAhmed\Smasher\Path

Responsible for managing everything related to Paths
Показать файл Открыть проект

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

Метод Описание
__construct ( string $path = '' ) Path constructor.
createItem ( array $detail = [] ) Creates the path based upon the type of it
getDetail ( ) : array Gets the detail about the currently set path
getFileContent ( ) : string If the set path is file, it returns the contents of the file
getGroup ( ) : array Returns the detail of the path group
getLastModified ( ) : string Gets the last date when the path was modified
getMode ( ) : string Returns the permission that the path has
getName ( ) : mixed Gets the name of the currently set path
getOwner ( ) : array Returns the detail of the path owner
getPath ( ) : string Gets the path which is being operated
getRealPath ( ) : string Gets the real path for the path
getSize ( ) : integer Returns the size of the path in bytes
getType ( ) : string Gets the type of path i.e. whether it is file, link or dir
saveFileContent ( $content ) : integer Writes content to the specified path
setPath ( $path ) Sets the path to operate on
validate ( ) : boolean Validates whether the path exists or not

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

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

Path constructor.
public __construct ( string $path = '' )
$path string

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

Creates the path based upon the type of it
public createItem ( array $detail = [] )
$detail array

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

Gets the detail about the currently set path
public getDetail ( ) : array
Результат array

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

If the set path is file, it returns the contents of the file
public getFileContent ( ) : string
Результат string

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

Returns the detail of the path group
public getGroup ( ) : array
Результат array

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

Gets the last date when the path was modified
public getLastModified ( ) : string
Результат string

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

Returns the permission that the path has
public getMode ( ) : string
Результат string

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

Gets the name of the currently set path
public getName ( ) : mixed
Результат mixed

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

Returns the detail of the path owner
public getOwner ( ) : array
Результат array

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

Gets the path which is being operated
public getPath ( ) : string
Результат string

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

Gets the real path for the path
public getRealPath ( ) : string
Результат string

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

Returns the size of the path in bytes
public getSize ( ) : integer
Результат integer

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

Gets the type of path i.e. whether it is file, link or dir
public getType ( ) : string
Результат string

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

Writes content to the specified path
public saveFileContent ( $content ) : integer
$content
Результат integer

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

Sets the path to operate on
public setPath ( $path )
$path

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

Validates whether the path exists or not
public validate ( ) : boolean
Результат boolean