PHP 클래스 Newscoop\Entity\Resource

The resources can be from the database or from the file system so whenever checking resources for equality use the path property.
상속: extends AbstractEntity
파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$name string
$path string

공개 메소드들

메소드 설명
__construct ( string $path = null )
exists ( ) : boolean Check if the resource exists
getName ( ) : string Provides the name of the theme resource, must be a user frendly name used for displaying it on the UI.
getPath ( ) : string Provides the path of the resource.
getProperty ( )
isSame ( Resource $other ) : boolean Checks if the provided resource is equal with this resource.
sameAs ( Resource $other ) : boolean Checks if the provided resource is equal with this resource.
setName ( string $name ) : Newscoop\Entity\Resource Set the name of the theme resource, must be a user frendly name used for displaying it on the UI.
setPath ( string $path ) : Newscoop\Entity\Resource Set the path of the resource.

메소드 상세

__construct() 공개 메소드

public __construct ( string $path = null )
$path string Should be id..

exists() 공개 메소드

Check if the resource exists
public exists ( ) : boolean
리턴 boolean True always for now

getName() 공개 메소드

Provides the name of the theme resource, must be a user frendly name used for displaying it on the UI.
public getName ( ) : string
리턴 string The name of the theme resource.

getPath() 공개 메소드

Provides the path of the resource.
public getPath ( ) : string
리턴 string The path of the resource.

getProperty() 공개 메소드

public getProperty ( )

isSame() 공개 메소드

The equality is done using the resource path.
public isSame ( Resource $other ) : boolean
$other Resource The resource to compare with.
리턴 boolean True if the resources are considered eqaul, false otherwise.

sameAs() 공개 메소드

The equality is done using the resource path.
public sameAs ( Resource $other ) : boolean
$other Resource The resource to compare with.
리턴 boolean True if the resources are considered eqaul, false otherwise.

setName() 공개 메소드

Set the name of the theme resource, must be a user frendly name used for displaying it on the UI.
public setName ( string $name ) : Newscoop\Entity\Resource
$name string The name of the theme resource, must not be null or empty.
리턴 Newscoop\Entity\Resource This object for chaining purposes.

setPath() 공개 메소드

Set the path of the resource.
public setPath ( string $path ) : Newscoop\Entity\Resource
$path string The path of the resource.
리턴 Newscoop\Entity\Resource This object for chaining purposes.

프로퍼티 상세

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

protected string $name
리턴 string

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

protected string $path
리턴 string