메소드 |
설명 |
|
__construct ( $file = null, array $meta = [], $content = null ) |
|
|
__get ( string $name ) : null |
Return file metadata value |
|
__isset ( string $name ) : boolean |
|
|
__set ( string $name, mixed $value ) |
Set meta value |
|
fromPath ( string $path, array $meta = [] ) : static |
Create new File instance from path |
|
getContent ( ) : string |
Return file content |
|
getDescription ( ) : mixed |
Return automatic description
Notice: getDescription use slow function shorten() in some cases |
|
getDir ( ) : string |
Return current directory |
|
getMeta ( array $meta = [] ) : array |
Return current file metadata |
|
getName ( ) : string |
Return name of file without extension |
|
getSlug ( string | null $src = null ) : string |
Return link to file |
|
getUrl ( null | string $src = null ) : string |
|
|
is ( string $ext ) : boolean |
Check extension. |
|
isValid ( array $skip = [] ) : boolean |
|
|
setContent ( string $content ) |
Set file content |
|