public function getData($key, $defaultValue = null) {
        $key = $this->processKey($key);
        if (!$this->hasData($key)) {
            return $defaultValue;
        }
        if (is_array($this->shared[$key]) && isset($this->shared[$key]['#value'])) {
            return $this->shared[$key]['#value'];
        }
        return $this->shared[$key];
    }