Property | Type | Description | |
---|---|---|---|
$children | array |
Property | Type | Description | |
---|---|---|---|
$content | string | null | ||
$meta | array |
Method | Description | |
---|---|---|
__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 |
public __construct ( $file = null, array $meta = [], $content = null ) | ||
$meta | array |
public getDescription ( ) : mixed | ||
return | mixed |