src/Genesis/Utils/Common.php
public static function appendItemsToArrayObj(&$arrObj, $key, $values)
    {
        if (! $arrObj instanceof \ArrayObject) {
            return null;
        }

        $arr = $arrObj->getArrayCopy();

        $commonArrKeyValues =
            Common::isArrayKeyExists($key, $arr)
                ? $arr[$key]
                : [];

        $arr[$key] = array_merge($commonArrKeyValues, $values);

        return $arrObj = self::createArrayObject($arr);
    }
public static function appendItemsToArrayObj(&$arrObj, $key, $values)
    {
        if (! $arrObj instanceof \ArrayObject) {
            return null;
        }

        $arr = $arrObj->getArrayCopy();

        $commonArrKeyValues =
            Common::isArrayKeyExists($key, $arr)
                ? $arr[$key]
                : [];

        $arr[$key] = array_merge($commonArrKeyValues, $values);

        return $arrObj = self::createArrayObject($arr);
    }
public static function appendItemsToArrayObj ( & $ arrObj , $ key , $ values ) { if ( ! $ arrObj instanceof \ ArrayObject ) { return null ; } $ arr = $ arrObj -> getArrayCopy ( ) ; $ commonArrKeyValues = Common :: isArrayKeyExists ( $ key , $ arr ) ? $ arr [ $ key ] : [ ] ; $ arr [ $ key ] = array_merge ( $ commonArrKeyValues , $ values ) ; return $ arrObj = self :: createArrayObject ( $ arr ) ; }
Appends items to an ArrayObject by key

@param \ArrayObject $arrObj
@param string $key
@param array $values
@return \ArrayObject|null
Appends items to an ArrayObject by key