You are here

public function AcsfVariableStorageMock::get in Acquia Cloud Site Factory Connector 8.2

Same name and namespace in other branches
  1. 8 tests/AcsfVariableStorageMock.php \AcsfVariableStorageMock::get()

Retrieves a named variable.

Parameters

string $name: The name of the variable.

mixed $default: The default value of the variable.

Return value

mixed The value of the variable.

File

tests/AcsfVariableStorageMock.php, line 68

Class

AcsfVariableStorageMock
Mock AcsfVariableStorage class used for testing.

Code

public function get($name, $default = NULL) {
  if (isset($this->storage[$name])) {
    return unserialize($this->storage[$name]['value']);
  }
  else {
    return $default;
  }
}