public function add(array $data)
    {
        $result = null;
        $this->hook->attach('product.class.add.before', $data, $result, $this);

        if (isset($result)) {
            return (int) $result;
        }

        $result = $this->db->insert('product_class', $data);
        $this->hook->attach('product.class.add.after', $data, $result, $this);
        return (int) $result;
    }
public function add(array $data)
    {
        $result = null;
        $this->hook->attach('product.class.add.before', $data, $result, $this);

        if (isset($result)) {
            return (int) $result;
        }

        $result = $this->db->insert('product_class', $data);
        $this->hook->attach('product.class.add.after', $data, $result, $this);
        return (int) $result;
    }
public function add ( array $ data ) { $ result = null ; $ this -> hook -> attach ( 'product.class.add.before' , $ data , $ result , $ this ) ; if ( isset ( $ result ) ) { return ( int ) $ result ; } $ result = $ this -> db -> insert ( 'product_class' , $ data ) ; $ this -> hook -> attach ( 'product.class.add.after' , $ data , $ result , $ this ) ; return ( int ) $ result ; }
Adds a product class
@param array $data
@return integer
Adds a product class