PHP Класс fkooman\RemoteStorage\MetadataStorage

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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 )

Приватные методы

Метод Описание
getMetadata ( Path $p ) Get the version of the path which can be either a folder or document.

Описание методов

__construct() публичный Метод

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

createTableQueries() публичный статический Метод

public static createTableQueries ( $prefix )

deleteNode() публичный Метод

public deleteNode ( Path $p )
$p Path

getContentType() публичный Метод

public getContentType ( Path $p )
$p Path

getVersion() публичный Метод

public getVersion ( Path $p )
$p Path

initDatabase() публичный Метод

public initDatabase ( )

updateDocument() публичный Метод

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

updateFolder() публичный Метод

public updateFolder ( Path $p )
$p Path