OOP Cookie Class
===

i recently made a cookie class but unfortunatly it wasn't really OOP because i made the class do 2 different things. that is set/get the cookie and also store te cookie. and OOP means every class has its own operation. so i decided to rewrite my class but i am not able to let it work. here is how i tought i should do it. 

i made a interface for the CRUD and a Class that implements this interface called CookieStorage. also i made a Cookie class that sets the cookie values etc. but now by creating this two classes it doesn't work because i get this error: Fatal error: Call to undefined method CookieStorage::getName() in /Applications/MAMP/htdocs/library/lib/CookieStorage.php on line 27 

below you can find my code. thanks in advance!

    <?php

    interface StorageInterface
    {
        public function set(Cookie $cookie);
        public function get(Cookie $cookie);
        public function update(Cookie $cookie);
        public function delete(Cookie $cookie);
    }

    class CookieStorage implements StorageInterface
    {


        /**
         * constructor
         */
        public function __construct() {

        }

        /**
         * Create cookie.
         */
        public function set(Cookie $cookie) {
            return setcookie(   
                                $this->getName(),
                                $this->getValue(),
                                $this->getTime(), 
                                $this->getPath(), 
                                $this->getDomain(), 
                                $this->getSecure(), true 
                            );
        }

        /**
         * Get cookie.
         */
        public function get(Cookie $cookie) {
            return $_COOKIE[$this->getName()];

        }

        /**
         * Update cookie.
         */
        public function update(Cookie $cookie) {
            return $this->update();
        }


        public function delete(Cookie $cookie) {
        
            return $this->delete();
        }
    }

    ?>


    <?php

    class Cookie
    {
    /**
     * Cookie name - the name of the cookie.
     * @var bool
     */
    private $name = false;

    /**
     * Cookie value
     * @var string
     */
    private $value = "";

    /**
     * Cookie life time
     * @var DateTime
     */
    private $time;

    /**
     * Cookie domain
     * @var bool
     */
    private $domain = false;

    /**
     * Cookie path
     * @var bool
     */
    private $path = false;

    /**
     * Cookie secure
     * @var bool
     */
    private $secure = false;

    /**
     * Constructor
     */
    public function __construct() {
        
     }
    /**
     * @param $domain
     */
    public function setDomain($domain) {
        $this->domain = $domain;
    }

    /**
     * @return bool
     */
    public function getDomain() {
        return $this->domain;
    }

    /**
     * @param $id
     */
    public function setName($id) {
        $this->name = $id;
    }

    /**
     * @return bool
     */
    public function getName() {
        return $this->name;
    }

    /**
     * @param $path
     */
    public function setPath($path) {
        $this->path = $path;
    }

    /**
     * @return bool
     */
    public function getPath() {
        return $this->path;
    }

    /**
     * @param $secure
     */
    public function setSecure($secure) {
        $this->secure = $secure;
    }

    /**
     * @return bool
     */
    public function getSecure() {
        return $this->secure;
    }

    /**
     * @param $time
     */
    public function setTime($time) {

        $date = new DateTime();
        $date->modify($time);
        $this->time = $date->getTimestamp();
    }

    /**
     * @return bool|int
     */
    public function getTime() {
        return $this->time;
    }

    /**
     * @param string $value
     */
    public function setValue($value) {
        $this->value = $value;
    }

    /**
     * @return string
     */
    public function getValue() {
        return $this->value;
    }
    }

    ?>