setAncestorClass(__CLASS__) ->loadObjects(); $result = array(); foreach ($xforms as $xform_template) { foreach ($xform_template->generateTransforms() as $xform) { $key = $xform->getTransformKey(); if (isset($result[$key])) { throw new Exception( pht( 'Two %s objects define the same transform key ("%s"), but '. 'each transform must have a unique key.', __CLASS__, $key)); } $result[$key] = $xform; } } $map = $result; } return $map; } }