thirdparty/Zend/Feed/Builder/Entry.php
public function addCategory(array $category)
    {
        if (empty($category['term'])) {
            /**
             * @see Zend_Feed_Builder_Exception
             */
            require_once 'Zend/Feed/Builder/Exception.php';
            throw new Zend_Feed_Builder_Exception("you have to define the name of the category");
        }

        if (!$this->offsetExists('category')) {
            $categories = array($category);
        } else {
            $categories = $this->offsetGet('category');
            $categories[] = $category;
        }
        $this->offsetSet('category', $categories);
        return $this;
    }
public function addCategory(array $category)
    {
        if (empty($category['term'])) {
            /**
             * @see Zend_Feed_Builder_Exception
             */
            require_once 'Zend/Feed/Builder/Exception.php';
            throw new Zend_Feed_Builder_Exception("you have to define the name of the category");
        }

        if (!$this->offsetExists('category')) {
            $categories = array($category);
        } else {
            $categories = $this->offsetGet('category');
            $categories[] = $category;
        }
        $this->offsetSet('category', $categories);
        return $this;
    }
public function addCategory ( array $ category ) { if ( empty ( $ category [ 'term' ] ) ) { /**
             * @see Zend_Feed_Builder_Exception
             */ require_once 'Zend/Feed/Builder/Exception.php' ; throw new Zend_Feed_Builder_Exception ( "you have to define the name of the category" ) ; } if ( ! $ this -> offsetExists ( 'category' ) ) { $ categories = array ( $ category ) ; } else { $ categories = $ this -> offsetGet ( 'category' ) ; $ categories [ ] = $ category ; } $ this -> offsetSet ( 'category' , $ categories ) ; return $ this ; }
Add a category to the entry

@param  array $category see Zend_Feed_Builder_Entry::setCategories() for format
@return Zend_Feed_Builder_Entry
@throws Zend_Feed_Builder_Exception
Add a category to the entry