PHP 클래스 CMS\Page

상속: extends Model
파일 보기 프로젝트 열기: sphido/cms 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$children array

보호된 프로퍼티들

프로퍼티 타입 설명
$content string | null
$meta array

공개 메소드들

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

메소드 상세

__construct() 공개 메소드

public __construct ( $file = null, array $meta = [], $content = null )
$meta array

__get() 공개 메소드

Return file metadata value
public __get ( string $name ) : null
$name string
리턴 null

__isset() 공개 메소드

public __isset ( string $name ) : boolean
$name string
리턴 boolean

__set() 공개 메소드

Set meta value
public __set ( string $name, mixed $value )
$name string
$value mixed

fromPath() 공개 정적인 메소드

Create new File instance from path
public static fromPath ( string $path, array $meta = [] ) : static
$path string
$meta array
리턴 static

getContent() 공개 메소드

Return file content
public getContent ( ) : string
리턴 string

getDescription() 공개 메소드

Return automatic description Notice: getDescription use slow function shorten() in some cases
public getDescription ( ) : mixed
리턴 mixed

getDir() 공개 메소드

Return current directory
public getDir ( ) : string
리턴 string

getMeta() 공개 메소드

Return current file metadata
public getMeta ( array $meta = [] ) : array
$meta array
리턴 array

getName() 공개 메소드

Return name of file without extension
public getName ( ) : string
리턴 string

getSlug() 공개 메소드

Return link to file
public getSlug ( string | null $src = null ) : string
$src string | null
리턴 string

getUrl() 공개 메소드

public getUrl ( null | string $src = null ) : string
$src null | string
리턴 string

is() 공개 메소드

Check extension.
public is ( string $ext ) : boolean
$ext string
리턴 boolean

isValid() 공개 메소드

public isValid ( array $skip = [] ) : boolean
$skip array
리턴 boolean

setContent() 공개 메소드

Set file content
public setContent ( string $content )
$content string

프로퍼티 상세

$children 공개적으로 프로퍼티

public array $children
리턴 array

$content 보호되어 있는 프로퍼티

protected string|null $content
리턴 string | null

$meta 보호되어 있는 프로퍼티

protected array $meta
리턴 array