1752 | | $this->name = $data['name']; |
1753 | | $this->value = isset( $data['value'] ) ? $data['value'] : ''; |
1754 | | $this->path = isset( $data['path'] ) ? $data['path'] : ''; |
1755 | | $this->domain = isset( $data['domain'] ) ? $data['domain'] : ''; |
1756 | | |
1757 | | if ( isset( $data['expires'] ) ) |
1758 | | $this->expires = is_int( $data['expires'] ) ? $data['expires'] : strtotime( $data['expires'] ); |
1759 | | else |
1760 | | $this->expires = null; |
| 1752 | foreach ( $data as $key => $val ) |
| 1753 | { |
| 1754 | $key = strtolower( $key ); |
| 1755 | if ( 'expires' == $key ) |
| 1756 | $val = is_int( $val ) ? $val : strtotime( $val ); |
| 1757 | $this->$key = $val; |
| 1758 | } |