PHP 클래스 KamranAhmed\Smasher\Path

Responsible for managing everything related to Paths
파일 보기 프로젝트 열기: kamranahmedse/smasher

공개 메소드들

메소드 설명
__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