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

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

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

            $category->setCaller($this);
            $category->saveWithTranslation();

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

            return $category;
        }

        throw new Exception(sprintf(Exception::CANT_UPDATE_MODEL,
            'Subbly\\Model\\Category',
            $this->name()
        ));
    }