<?

class CAT_Music extends CAT_Item {
    var $title;
    var $album;
    var $author;
    var $notes;

    function CAT_Music() {
        //die('OK');
    }

    function getBanner() {
        return 'Music';
    }

    function getEmptyMessage() {
        return "No items for the moment";
    }
       
    function getClass() {
        return 'CAT_Music';
    }

    function isRateable() {
        return true;
    }

    function getData() {
        $a = array();
        
        $a['title'] = $this->title;
        $a['album'] = $this->album;
        $a['author'] = $this->author;
        $a['notes'] = $this->notes;

        return serialize($a);
    }

    function setData($s) {
        $a = unserialize($s);
        
        $this->title = $a['title'];
        $this->album = $a['album'];
        $this->author = $a['author'];
        $this->notes = $a['notes'];
    }

    function fromForm($a) {
        $this->title = $a['title'];
        $this->album = $a['album'];
        $this->author = $a['author'];
        $this->notes = $a['notes'];

        // must be here, if you want a permalink.
        // inherited from superclass
        $this->permalink = $a['permalink'];
    }
}

?>