apps/files_external/lib/Lib/FrontendDefinitionTrait.php
/**
	 * Check if parameters are satisfied in a StorageConfig
	 *
	 * @param StorageConfig $storage
	 * @return bool
	 */
Check if parameters are satisfied in a StorageConfig
@param StorageConfig $storage
@return bool
Check if parameters are satisfied in a StorageConfig @param StorageConfig $storage @return bool
public function validateStorageDefinition(StorageConfig $storage) {
		foreach ($this->getParameters() as $name => $parameter) {
			$value = $storage->getBackendOption($name);
			if (!is_null($value) || !$parameter->isOptional()) {
				if (!$parameter->validateValue($value)) {
					return false;
				}
				$storage->setBackendOption($name, $value);
			}
		}
		return true;
	}
public function validateStorageDefinition ( StorageConfig $ storage ) { foreach ( $ this -> getParameters ( ) as $ name => $ parameter ) { $ value = $ storage -> getBackendOption ( $ name ) ; if ( ! is_null ( $ value ) || ! $ parameter -> isOptional ( ) ) { if ( ! $ parameter -> validateValue ( $ value ) ) { return false ; } $ storage -> setBackendOption ( $ name , $ value ) ; } } return true ; }
Check if parameters are satisfied in a StorageConfig
 @param StorageConfig $storage
 @return bool
Check if parameters are satisfied in a StorageConfig @param StorageConfig $storage @return bool