PHP Class Doctrine\OXM\Storage\FileSystemStorage

Author: Richard Fullmer ([email protected])
Inheritance: implements Doctrine\OXM\Storage\Storage
Afficher le fichier Open project: doctrine/oxm Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( $baseStoragePath, $defaultFileExtension = 'xml' ) Construct a file system store with a specific base path
__destruct ( ) Release all known file locks when FileSystemStorage no longer in scope
delete ( ClassMetadataInfo $classMetadata, $id, array $options = [] ) {@inheritDoc}
exists ( ClassMetadataInfo $classMetadata, $id ) {@inheritDoc}
getFileExtension ( ) : string
getFileModeBits ( ) : integer
getStoragePath ( ) : string
getUseNamespaceInPath ( ) : boolean
insert ( ClassMetadataInfo $classMetadata, string $id, string $xmlContent ) : boolean Insert the XML into the filesystem with a specific identifier
load ( ClassMetadataInfo $classMetadata, $id ) {@inheritDoc}
setFileExtension ( string $fileExtension ) : void
setFileModeBits ( integer $fileModeBits ) : void
setStoragePath ( string $baseStoragePath ) : void
setUseNamespaceInPath ( boolean $useNamespaceInPath ) : void
update ( ClassMetadataInfo $classMetadata, string $id, string $xmlContent ) : boolean Update the XML in the filesystem with a specific identifier

Méthodes protégées

Méthode Description
getFilename ( ClassMetadataInfo $classMetadata, mixed $id ) : string

Private Methods

Méthode Description
buildStoragePath ( $className ) : string
lock ( string $filename, Resource $handle ) : boolean
prepareStoragePathForClass ( string $className ) : string Build the realpath to save the xml in a specific folder
resolveClassName ( ClassMetadataInfo $classMetadata ) : string
unlock ( string $filename ) : boolean

Method Details

__construct() public méthode

Construct a file system store with a specific base path
public __construct ( $baseStoragePath, $defaultFileExtension = 'xml' )

__destruct() public méthode

Release all known file locks when FileSystemStorage no longer in scope
public __destruct ( )

delete() public méthode

{@inheritDoc}
public delete ( ClassMetadataInfo $classMetadata, $id, array $options = [] )
$classMetadata Doctrine\OXM\Mapping\ClassMetadataInfo
$options array

exists() public méthode

{@inheritDoc}
public exists ( ClassMetadataInfo $classMetadata, $id )
$classMetadata Doctrine\OXM\Mapping\ClassMetadataInfo

getFileExtension() public méthode

public getFileExtension ( ) : string
Résultat string

getFileModeBits() public méthode

public getFileModeBits ( ) : integer
Résultat integer

getFilename() protected méthode

protected getFilename ( ClassMetadataInfo $classMetadata, mixed $id ) : string
$classMetadata Doctrine\OXM\Mapping\ClassMetadataInfo
$id mixed
Résultat string The filename for the given entity

getStoragePath() public méthode

public getStoragePath ( ) : string
Résultat string

getUseNamespaceInPath() public méthode

public getUseNamespaceInPath ( ) : boolean
Résultat boolean

insert() public méthode

Insert the XML into the filesystem with a specific identifier
public insert ( ClassMetadataInfo $classMetadata, string $id, string $xmlContent ) : boolean
$classMetadata Doctrine\OXM\Mapping\ClassMetadataInfo
$id string
$xmlContent string
Résultat boolean

load() public méthode

{@inheritDoc}
public load ( ClassMetadataInfo $classMetadata, $id )
$classMetadata Doctrine\OXM\Mapping\ClassMetadataInfo

setFileExtension() public méthode

public setFileExtension ( string $fileExtension ) : void
$fileExtension string
Résultat void

setFileModeBits() public méthode

public setFileModeBits ( integer $fileModeBits ) : void
$fileModeBits integer
Résultat void

setStoragePath() public méthode

public setStoragePath ( string $baseStoragePath ) : void
$baseStoragePath string
Résultat void

setUseNamespaceInPath() public méthode

public setUseNamespaceInPath ( boolean $useNamespaceInPath ) : void
$useNamespaceInPath boolean
Résultat void

update() public méthode

Update the XML in the filesystem with a specific identifier
public update ( ClassMetadataInfo $classMetadata, string $id, string $xmlContent ) : boolean
$classMetadata Doctrine\OXM\Mapping\ClassMetadataInfo
$id string
$xmlContent string
Résultat boolean