src/SharedData.php
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];
    }
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];
    }
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 ] ; }
Get data by key
@param string $key
@param mixed  $defaultValue
@return mixed|null
Get data by key