PHP Class Puli\Repository\Resource\GenericResource

Since: 1.0
Author: Bernhard Schussek ([email protected])
Inheritance: implements Puli\Repository\Api\Resource\PuliResource
Afficher le fichier Open project: puli/repository Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( string | null $path = null ) Creates a new resource.
attachTo ( Puli\Repository\Api\ResourceRepository $repo, $path = null )
createReference ( $path )
detach ( )
getChild ( $relPath )
getMetadata ( )
getName ( )
getPath ( )
getRepository ( )
getRepositoryPath ( )
getVersions ( )
hasChild ( $relPath )
hasChildren ( )
isAttached ( )
isReference ( )
listChildren ( )
serialize ( )
unserialize ( $string )

Méthodes protégées

Méthode Description
postUnserialize ( array $data ) Invoked after unserializing a resource.
preSerialize ( array &$data ) Invoked before serializing a resource.

Method Details

__construct() public méthode

Creates a new resource.
public __construct ( string | null $path = null )
$path string | null The path of the resource.

attachTo() public méthode

public attachTo ( Puli\Repository\Api\ResourceRepository $repo, $path = null )
$repo Puli\Repository\Api\ResourceRepository

createReference() public méthode

public createReference ( $path )

detach() public méthode

public detach ( )

getChild() public méthode

public getChild ( $relPath )

getMetadata() public méthode

public getMetadata ( )

getName() public méthode

public getName ( )

getPath() public méthode

public getPath ( )

getRepository() public méthode

public getRepository ( )

getRepositoryPath() public méthode

public getRepositoryPath ( )

getVersions() public méthode

public getVersions ( )

hasChild() public méthode

public hasChild ( $relPath )

hasChildren() public méthode

public hasChildren ( )

isAttached() public méthode

public isAttached ( )

isReference() public méthode

public isReference ( )

listChildren() public méthode

public listChildren ( )

postUnserialize() protected méthode

Override this method if you want to unserialize custom data in subclasses.
protected postUnserialize ( array $data )
$data array The unserialized data. Pop your custom data from the end of the array before calling the parent method.

preSerialize() protected méthode

Override this method if you want to serialize custom data in subclasses.
protected preSerialize ( array &$data )
$data array The data to serialize. Add custom data at the end of the array.

serialize() public méthode

public serialize ( )

unserialize() public méthode

public unserialize ( $string )