PHP Класс VersionPress\Storages\Mirror

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

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

Метод Описание
__construct ( StorageFactory $storageFactory, AbsoluteUrlReplacer $urlReplacer )
delete ( string $entityName, array $restriction ) Chooses an appropriate storage and calls its {@see VersionPress\Storages\Storage::delete() delete()} method.
flushChangeList ( ) Dumps a list of {@see VersionPress\ChangeInfos\ChangeInfo} objects captured by this mirror.
getChangeList ( ) : TrackedChangeInfo[] Contains a list of {@see VersionPress\ChangeInfos\ChangeInfo} objects captured by this mirror.
save ( string $entityName, array $data ) Chooses an appropriate storage and calls its {@see VersionPress\Storages\Storage::save() save()} method.
shouldBeSaved ( string $entityName, array $data ) : boolean Queries the associated storage whether the entity data should be saved or not

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

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

public __construct ( StorageFactory $storageFactory, AbsoluteUrlReplacer $urlReplacer )
$storageFactory StorageFactory
$urlReplacer VersionPress\Utils\AbsoluteUrlReplacer

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

Chooses an appropriate storage and calls its {@see VersionPress\Storages\Storage::delete() delete()} method.
См. также: Storage::delete()
public delete ( string $entityName, array $restriction )
$entityName string Entity type determines the storage used
$restriction array Restriction passed to the `VersionPress\Storages\Storage::delete()` method

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

Capturing new changes starts again from this point.
public flushChangeList ( )

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

Can be an empty array if there was no real change in any of the storages.
public getChangeList ( ) : TrackedChangeInfo[]
Результат VersionPress\ChangeInfos\TrackedChangeInfo[]

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

Chooses an appropriate storage and calls its {@see VersionPress\Storages\Storage::save() save()} method.
См. также: Storage::save()
public save ( string $entityName, array $data )
$entityName string Entity type determines the storage used
$data array Data passed to the `VersionPress\Storages\Storage::save()` method

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

Queries the associated storage whether the entity data should be saved or not
См. также: Storage::shouldBeSaved()
public shouldBeSaved ( string $entityName, array $data ) : boolean
$entityName string Determines the storage
$data array Data passed to VersionPress\Storages\Storage::shouldBeSaved()
Результат boolean