本文整理匯總了PHP中TYPO3\CMS\Core\Resource\ResourceStorage::isOnline方法的典型用法代碼示例。如果您正苦於以下問題:PHP ResourceStorage::isOnline方法的具體用法?PHP ResourceStorage::isOnline怎麽用?PHP ResourceStorage::isOnline使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TYPO3\CMS\Core\Resource\ResourceStorage
的用法示例。
在下文中一共展示了ResourceStorage::isOnline方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: isEquivalentObjectStorage
/**
* Determines whether the passed storage object and record (sys_file_storage) can be
* seen as equivalent during import.
*
* @param ResourceStorage $storageObject The storage object which should get compared
* @param array $storageRecord The storage record which should get compared
* @return bool Returns TRUE when both object storages can be seen as equivalent
*/
protected function isEquivalentObjectStorage(ResourceStorage $storageObject, array $storageRecord)
{
// compare the properties: driver, writable and online
if ($storageObject->getDriverType() === $storageRecord['driver'] && (bool) $storageObject->isWritable() === (bool) $storageRecord['is_writable'] && (bool) $storageObject->isOnline() === (bool) $storageRecord['is_online']) {
$storageRecordConfiguration = ResourceFactory::getInstance()->convertFlexFormDataToConfigurationArray($storageRecord['configuration']);
$storageObjectConfiguration = $storageObject->getConfiguration();
// compare the properties: pathType and basePath
if ($storageRecordConfiguration['pathType'] === $storageObjectConfiguration['pathType'] && $storageRecordConfiguration['basePath'] === $storageObjectConfiguration['basePath']) {
return true;
}
}
return false;
}