PHP Class fkooman\RemoteStorage\MetadataStorage

Datei anzeigen Open project: fkooman/php-remote-storage Class Usage Examples

Public Methods

Method Description
__construct ( PDO $db, $prefix = '', fkooman\IO\IO $io = null )
createTableQueries ( $prefix )
deleteNode ( Path $p )
getContentType ( Path $p )
getVersion ( Path $p )
initDatabase ( )
updateDocument ( Path $p, $contentType ) We have a very weird version update method by including a sequence number that makes it easy for tests to see if there is correct behavior, a sequence number is not enough though as deleting a file would reset the sequence number and thus make it possible to have files with different content to have the same sequence number in the same location, but in order to check if all versions are updated up to the root we have to do this this way.
updateFolder ( Path $p )

Private Methods

Method Description
getMetadata ( Path $p ) Get the version of the path which can be either a folder or document.

Method Details

__construct() public method

public __construct ( PDO $db, $prefix = '', fkooman\IO\IO $io = null )
$db PDO
$io fkooman\IO\IO

createTableQueries() public static method

public static createTableQueries ( $prefix )

deleteNode() public method

public deleteNode ( Path $p )
$p Path

getContentType() public method

public getContentType ( Path $p )
$p Path

getVersion() public method

public getVersion ( Path $p )
$p Path

initDatabase() public method

public initDatabase ( )

updateDocument() public method

..
public updateDocument ( Path $p, $contentType )
$p Path

updateFolder() public method

public updateFolder ( Path $p )
$p Path