public function getFlashCookieObject($name)
    {
        if (isset($_COOKIE[$name])) {
            $object = json_decode($_COOKIE[$name]);
            setcookie($name, '', time() - 3600, '/');
            return $object;
        }

        return null;
    }
public function getFlashCookieObject($name)
    {
        if (isset($_COOKIE[$name])) {
            $object = json_decode($_COOKIE[$name]);
            setcookie($name, '', time() - 3600, '/');
            return $object;
        }

        return null;
    }
public function getFlashCookieObject ( $ name ) { if ( isset ( $ _COOKIE [ $ name ] ) ) { $ object = json_decode ( $ _COOKIE [ $ name ] ) ; setcookie ( $ name , '' , time ( ) - 3600 , '/' ) ; return $ object ; } return null ; }
Return object and remove it from the cookie.

@param string $name
@return mixed|null
Return object and remove it from the cookie .