PHP Class Doctrine\OXM\Storage\FileSystemStorage

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

Public Methods

Method 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

Protected Methods

Method Description
getFilename ( ClassMetadataInfo $classMetadata, mixed $id ) : string

Private Methods

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

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

__destruct() public method

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

delete() public method

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

exists() public method

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

getFileExtension() public method

public getFileExtension ( ) : string
return string

getFileModeBits() public method

public getFileModeBits ( ) : integer
return integer

getFilename() protected method

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

getStoragePath() public method

public getStoragePath ( ) : string
return string

getUseNamespaceInPath() public method

public getUseNamespaceInPath ( ) : boolean
return boolean

insert() public method

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
return boolean

load() public method

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

setFileExtension() public method

public setFileExtension ( string $fileExtension ) : void
$fileExtension string
return void

setFileModeBits() public method

public setFileModeBits ( integer $fileModeBits ) : void
$fileModeBits integer
return void

setStoragePath() public method

public setStoragePath ( string $baseStoragePath ) : void
$baseStoragePath string
return void

setUseNamespaceInPath() public method

public setUseNamespaceInPath ( boolean $useNamespaceInPath ) : void
$useNamespaceInPath boolean
return void

update() public method

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
return boolean