Sulu\Component\Webspace\Url::toArray PHP Method

toArray() public method

public toArray ( $depth = null )
    public function toArray($depth = null)
    {
        $res = [];
        $res['url'] = $this->getUrl();
        $res['language'] = $this->getLanguage();
        $res['country'] = $this->getCountry();
        $res['segment'] = $this->getSegment();
        $res['redirect'] = $this->getRedirect();
        $res['main'] = $this->isMain();
        $res['analyticsKey'] = $this->getAnalyticsKey();
        $res['environment'] = $this->getEnvironment();
        return $res;
    }