code: public function getVariables($name = null)
      {
          if (null === $name) {
              return $this->variables;
          }
  
          if (!array_key_exists($name, $this->variables)) {
              throw new OutOfRangeException('Variable does not exist.');
          }
  
          return $this->variables[$name];
      }
docs: Get variables
  
  @param string $name
  @return array
  @throws \OutOfRangeException