PHP Class Puli\Repository\Resource\GenericResource

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

Public Methods

Method 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 )

Protected Methods

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

Method Details

__construct() public method

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

attachTo() public method

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

createReference() public method

public createReference ( $path )

detach() public method

public detach ( )

getChild() public method

public getChild ( $relPath )

getMetadata() public method

public getMetadata ( )

getName() public method

public getName ( )

getPath() public method

public getPath ( )

getRepository() public method

public getRepository ( )

getRepositoryPath() public method

public getRepositoryPath ( )

getVersions() public method

public getVersions ( )

hasChild() public method

public hasChild ( $relPath )

hasChildren() public method

public hasChildren ( )

isAttached() public method

public isAttached ( )

isReference() public method

public isReference ( )

listChildren() public method

public listChildren ( )

postUnserialize() protected method

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 method

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 method

public serialize ( )

unserialize() public method

public unserialize ( $string )