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;
    }