Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
fb66bf53
Commit
fb66bf53
authored
Jun 17, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve cookie class comments.
parent
df235f3f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
cookie.php
system/cookie.php
+9
-11
No files found.
system/cookie.php
View file @
fb66bf53
...
@@ -47,6 +47,11 @@ class Cookie {
...
@@ -47,6 +47,11 @@ class Cookie {
/**
/**
* Create a new Cookie instance.
* Create a new Cookie instance.
*
*
* Note: Cookies can be sent using the Cookie::put method.
* However, the number of parameters that method requires
* is somewhat cumbersome. Instantiating a new Cookie class
* and setting the properties can be a little easier on the eyes.
*
* @param string $name
* @param string $name
* @return void
* @return void
*/
*/
...
@@ -76,7 +81,7 @@ class Cookie {
...
@@ -76,7 +81,7 @@ class Cookie {
{
{
if
(
is_null
(
$this
->
name
))
if
(
is_null
(
$this
->
name
))
{
{
throw
new
\Exception
(
"
Error sending cookie. The cookie does not have
a name."
);
throw
new
\Exception
(
"
Attempting to send cookie without
a name."
);
}
}
return
static
::
put
(
$this
->
name
,
$this
->
value
,
$this
->
lifetime
,
$this
->
path
,
$this
->
domain
,
$this
->
secure
);
return
static
::
put
(
$this
->
name
,
$this
->
value
,
$this
->
lifetime
,
$this
->
path
,
$this
->
domain
,
$this
->
secure
);
...
@@ -90,15 +95,7 @@ class Cookie {
...
@@ -90,15 +95,7 @@ class Cookie {
*/
*/
public
static
function
has
(
$name
)
public
static
function
has
(
$name
)
{
{
foreach
(
func_get_args
()
as
$key
)
return
!
is_null
(
static
::
get
(
$key
));
{
if
(
is_null
(
static
::
get
(
$key
)))
{
return
false
;
}
}
return
true
;
}
}
/**
/**
...
@@ -129,7 +126,8 @@ class Cookie {
...
@@ -129,7 +126,8 @@ class Cookie {
}
}
/**
/**
* Set the value of a cookie.
* Set the value of a cookie. If a negative number of minutes is
* specified, the cookie will be deleted.
*
*
* @param string $name
* @param string $name
* @param string $value
* @param string $value
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment