PHP Class VersionPress\Storages\DirectoryStorage

For example, posts are stored as .ini in the vpdb/posts folder. Note that the same file can be used by multiple entities. For example, both the main post data and postmeta for it are stored in the same INI file.
Inheritance: extends Storage
Exibir arquivo Open project: versionpress/versionpress Class Usage Examples

Public Methods

Method Description
__construct ( string $directory, EntityInfo $entityInfo, string $dbPrefix, ChangeInfoFactory $changeInfoFactory ) DirectoryStorage constructor.
commit ( )
delete ( $restriction )
entityExistedBeforeThisRequest ( $data )
exists ( $id, $parentId = null )
getEntityFilename ( $id, $parentId = null )
getPathCommonToAllEntities ( )
loadAll ( )
loadEntity ( $id, $parentId = null )
prepareStorage ( )
save ( $data )
saveLater ( $data )

Protected Methods

Method Description
removeUnwantedColumns ( $entity )

Private Methods

Method Description
createChangeInfo ( $oldEntity, $newEntity, $action )
getEntityFiles ( )
loadAllFromFiles ( $entityFiles )

Method Details

__construct() public method

DirectoryStorage constructor.
public __construct ( string $directory, EntityInfo $entityInfo, string $dbPrefix, ChangeInfoFactory $changeInfoFactory )
$directory string
$entityInfo VersionPress\Database\EntityInfo
$dbPrefix string
$changeInfoFactory VersionPress\ChangeInfos\ChangeInfoFactory

commit() public method

public commit ( )

delete() public method

public delete ( $restriction )

entityExistedBeforeThisRequest() public method

exists() public method

public exists ( $id, $parentId = null )

getEntityFilename() public method

public getEntityFilename ( $id, $parentId = null )

getPathCommonToAllEntities() public method

loadAll() public method

public loadAll ( )

loadEntity() public method

public loadEntity ( $id, $parentId = null )

prepareStorage() public method

public prepareStorage ( )

removeUnwantedColumns() protected method

protected removeUnwantedColumns ( $entity )

save() public method

public save ( $data )

saveLater() public method

public saveLater ( $data )