name = $name; } /** * Get an attribute * * @param string $name Attribute name * @return mixed */ public function __get($name) { // allow reading the private name attribute if ($name === 'name') { return $this->name; } } /** * Set the time the cookie expires * * Example: $cookie->setExpiresTime("+30 days"); * * @param string $time A time string appropriate for strtotime() * @return void */ public function setExpiresTime($time) { $this->expire = strtotime($time); } }