src/Peach/Http/Header/CookieOptions.php
public function formatOptions()
    {
        $result = array();
        if ($this->expires !== null) {
            $result[] = $this->formatExpires();
        }
        if ($this->maxAge !== null) {
            $result[] = "max-age={$this->maxAge}";
        }
        if ($this->domain !== null) {
            $result[] = "domain={$this->domain}";
        }
        if ($this->path !== null) {
            $result[] = "path={$this->path}";
        }
        if ($this->secure) {
            $result[] = "secure";
        }
        if ($this->httpOnly) {
            $result[] = "httponly";
        }
        return $result;
    }
public function formatOptions()
    {
        $result = array();
        if ($this->expires !== null) {
            $result[] = $this->formatExpires();
        }
        if ($this->maxAge !== null) {
            $result[] = "max-age={$this->maxAge}";
        }
        if ($this->domain !== null) {
            $result[] = "domain={$this->domain}";
        }
        if ($this->path !== null) {
            $result[] = "path={$this->path}";
        }
        if ($this->secure) {
            $result[] = "secure";
        }
        if ($this->httpOnly) {
            $result[] = "httponly";
        }
        return $result;
    }
このオブジェクトが持つ各属性を書式化し, 結果を配列で返します.

@return array 各属性を書式化した結果の配列
@ignore
@todo 複数の Set-Cookie ヘッダーで同じオプションを適用することを想定し, 返り値をキャッシュできるようにする