public function mergeArray(array $array = null)
    {
        $count = 0;

        if (is_array($array)) {
            if (count($array) > 0) {
                foreach ($array as $key => $item) {
                    if (!$this->containsKey($key)) {
                        $this->addItem($item);
                        $count++;
                    }
                }
            }
        } elseif ($array !== null) {
            throw new ENabuCoreException(
                ENabuCoreException::ERROR_METHOD_PARAMETER_NOT_VALID,
                array('$array', print_r($array, true))
            );
        }

        return $count;
    }
public function mergeArray(array $array = null)
    {
        $count = 0;

        if (is_array($array)) {
            if (count($array) > 0) {
                foreach ($array as $key => $item) {
                    if (!$this->containsKey($key)) {
                        $this->addItem($item);
                        $count++;
                    }
                }
            }
        } elseif ($array !== null) {
            throw new ENabuCoreException(
                ENabuCoreException::ERROR_METHOD_PARAMETER_NOT_VALID,
                array('$array', print_r($array, true))
            );
        }

        return $count;
    }
public function mergeArray ( array $ array = null ) { $ count = 0 ; if ( is_array ( $ array ) ) { if ( count ( $ array ) > 0 ) { foreach ( $ array as $ key => $ item ) { if ( ! $ this -> containsKey ( $ key ) ) { $ this -> addItem ( $ item ) ; $ count ++ ; } } } } elseif ( $ array !== null ) { throw new ENabuCoreException ( ENabuCoreException :: ERROR_METHOD_PARAMETER_NOT_VALID , array ( '$array' , print_r ( $ array , true ) ) ) ; } return $ count ; }
Merges items included in an array.
@param array|null $array Array of items to merge.
@return int Returns the count of items merged.
Merges items included in an array .