public function addItem(Varien_Object $item)
    {
        if (!$item instanceof Aoe_Scheduler_Model_Job) {
            Mage::throwException(
                sprintf(
                    'Invalid model class. Expected "%s" and received "%s".',
                    'Aoe_Scheduler_Model_Job',
                    get_class($item)
                )
            );
        }

        $jobCode = $item->getJobCode();
        if (!$jobCode) {
            Mage::throwException('Jobs must have a job code');
        }

        if (isset($this->_items[$jobCode])) {
            Mage::throwException('Job with the same job code "' . $item->getJobCode() . '" already exist');
        }

        $this->_items[$jobCode] = $item;

        return $this;
    }
public function addItem(Varien_Object $item)
    {
        if (!$item instanceof Aoe_Scheduler_Model_Job) {
            Mage::throwException(
                sprintf(
                    'Invalid model class. Expected "%s" and received "%s".',
                    'Aoe_Scheduler_Model_Job',
                    get_class($item)
                )
            );
        }

        $jobCode = $item->getJobCode();
        if (!$jobCode) {
            Mage::throwException('Jobs must have a job code');
        }

        if (isset($this->_items[$jobCode])) {
            Mage::throwException('Job with the same job code "' . $item->getJobCode() . '" already exist');
        }

        $this->_items[$jobCode] = $item;

        return $this;
    }
public function addItem ( Varien_Object $ item ) { if ( ! $ item instanceof Aoe_Scheduler_Model_Job ) { Mage :: throwException ( sprintf ( 'Invalid model class. Expected "%s" and received "%s".' , 'Aoe_Scheduler_Model_Job' , get_class ( $ item ) ) ) ; } $ jobCode = $ item -> getJobCode ( ) ; if ( ! $ jobCode ) { Mage :: throwException ( 'Jobs must have a job code' ) ; } if ( isset ( $ this -> _items [ $ jobCode ] ) ) { Mage :: throwException ( 'Job with the same job code "' . $ item -> getJobCode ( ) . '" already exist' ) ; } $ this -> _items [ $ jobCode ] = $ item ; return $ this ; }
Adding item to item array

@param   Aoe_Scheduler_Model_Job $item

@return  $this
Adding item to item array