public function update()
    {
        $args        = func_get_args();
        $productCategory = null;

        if (count($args) == 1 && $args[0] instanceof ProductCategory) {
            $productCategory = $args[0];
        } elseif (count($args) == 2 && !empty($args[0]) && is_array($args[1])) {
            $productCategory = $this->find($args[0]);
            $productCategory->fill($args[1]);
        }

        if ($productCategory instanceof ProductCategory) {
            if ($this->fireEvent('updating', array($productCategory)) === false) {
                return false;
            }

            $productCategory->setCaller($this);
            $productCategory->save();

            $this->fireEvent('updated', array($productCategory));

            return $productCategory;
        }

        throw new Exception(sprintf(Exception::CANT_UPDATE_MODEL,
            'Subbly\\Model\\ProductCategory',
            $this->name()
        ));
    }
public function update()
    {
        $args        = func_get_args();
        $productCategory = null;

        if (count($args) == 1 && $args[0] instanceof ProductCategory) {
            $productCategory = $args[0];
        } elseif (count($args) == 2 && !empty($args[0]) && is_array($args[1])) {
            $productCategory = $this->find($args[0]);
            $productCategory->fill($args[1]);
        }

        if ($productCategory instanceof ProductCategory) {
            if ($this->fireEvent('updating', array($productCategory)) === false) {
                return false;
            }

            $productCategory->setCaller($this);
            $productCategory->save();

            $this->fireEvent('updated', array($productCategory));

            return $productCategory;
        }

        throw new Exception(sprintf(Exception::CANT_UPDATE_MODEL,
            'Subbly\\Model\\ProductCategory',
            $this->name()
        ));
    }
public function update ( ) { $ args = func_get_args ( ) ; $ productCategory = null ; if ( count ( $ args ) == 1 && $ args [ 0 ] instanceof ProductCategory ) { $ productCategory = $ args [ 0 ] ; } elseif ( count ( $ args ) == 2 && ! empty ( $ args [ 0 ] ) && is_array ( $ args [ 1 ] ) ) { $ productCategory = $ this -> find ( $ args [ 0 ] ) ; $ productCategory -> fill ( $ args [ 1 ] ) ; } if ( $ productCategory instanceof ProductCategory ) { if ( $ this -> fireEvent ( 'updating' , array ( $ productCategory ) ) === false ) { return false ; } $ productCategory -> setCaller ( $ this ) ; $ productCategory -> save ( ) ; $ this -> fireEvent ( 'updated' , array ( $ productCategory ) ) ; return $ productCategory ; } throw new Exception ( sprintf ( Exception :: CANT_UPDATE_MODEL , 'Subbly\\Model\\ProductCategory' , $ this -> name ( ) ) ) ; }
Update a ProductCategory.

@example
$productCategory = [Subbly\Model\ProductCategory instance];
Subbly::api('subbly.product_category')->update($productCategory);

Subbly::api('subbly.product_category')->update($product_sku, array(
'firstname' => 'Jon',
'lastname'  => 'Snow',
));

@return \Subbly\Model\ProductCategory

@api
Update a ProductCategory .