engadida a magic function __set_state en cookies