PHP Class fkooman\RemoteStorage\MetadataStorage

Afficher le fichier Open project: fkooman/php-remote-storage Class Usage Examples

Méthodes publiques

Méthode 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

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

Method Details

__construct() public méthode

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

createTableQueries() public static méthode

public static createTableQueries ( $prefix )

deleteNode() public méthode

public deleteNode ( Path $p )
$p Path

getContentType() public méthode

public getContentType ( Path $p )
$p Path

getVersion() public méthode

public getVersion ( Path $p )
$p Path

initDatabase() public méthode

public initDatabase ( )

updateDocument() public méthode

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

updateFolder() public méthode

public updateFolder ( Path $p )
$p Path