tweak the status method.:
This commit is contained in:
parent
f1feb467f1
commit
b65fa7040d
|
@ -243,7 +243,7 @@ protected function cookies()
|
||||||
|
|
||||||
// All of the cookies for the response are actually stored on the
|
// All of the cookies for the response are actually stored on the
|
||||||
// Cookie class until we're ready to send the response back to
|
// Cookie class until we're ready to send the response back to
|
||||||
// the browser. This allows a cookies to be set easily.
|
// the browser. This allows our cookies to be set easily.
|
||||||
foreach (Cookie::$jar as $name => $cookie)
|
foreach (Cookie::$jar as $name => $cookie)
|
||||||
{
|
{
|
||||||
$config = array_values($cookie);
|
$config = array_values($cookie);
|
||||||
|
@ -277,16 +277,23 @@ public function headers()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the response status code.
|
* Get / set the response status code.
|
||||||
*
|
*
|
||||||
* @param int $status
|
* @param int $status
|
||||||
* @return Response
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function status($status)
|
public function status($status = null)
|
||||||
{
|
{
|
||||||
$this->foundation->setStatusCode($status);
|
if (is_null($status))
|
||||||
|
{
|
||||||
|
return $this->foundation->getStatusCode();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->foundation->setStatusCode($status);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue