public static function addMixin($identifier, $mixins)
    {
        settype($mixins, 'array');

        $objIdentifier = self::getIdentifier($identifier);
        $strIdentifier = (string) $objIdentifier;

        if (!isset(self::$_mixins[$strIdentifier])) {
            self::$_mixins[$strIdentifier] = array();
        }

        self::$_mixins[$strIdentifier] = array_unique(array_merge(self::$_mixins[$strIdentifier], $mixins));

        if (self::$_services->offsetExists($strIdentifier)) {
            $instance = self::$_services->offsetGet($strIdentifier);
            self::_mixin($strIdentifier, $instance);
        }
    }
public static function addMixin($identifier, $mixins)
    {
        settype($mixins, 'array');

        $objIdentifier = self::getIdentifier($identifier);
        $strIdentifier = (string) $objIdentifier;

        if (!isset(self::$_mixins[$strIdentifier])) {
            self::$_mixins[$strIdentifier] = array();
        }

        self::$_mixins[$strIdentifier] = array_unique(array_merge(self::$_mixins[$strIdentifier], $mixins));

        if (self::$_services->offsetExists($strIdentifier)) {
            $instance = self::$_services->offsetGet($strIdentifier);
            self::_mixin($strIdentifier, $instance);
        }
    }
public static function addMixin ( $ identifier , $ mixins ) { settype ( $ mixins , 'array' ) ; $ objIdentifier = self :: getIdentifier ( $ identifier ) ; $ strIdentifier = ( string ) $ objIdentifier ; if ( ! isset ( self :: $ _mixins [ $ strIdentifier ] ) ) { self :: $ _mixins [ $ strIdentifier ] = array ( ) ; } self :: $ _mixins [ $ strIdentifier ] = array_unique ( array_merge ( self :: $ _mixins [ $ strIdentifier ] , $ mixins ) ) ; if ( self :: $ _services -> offsetExists ( $ strIdentifier ) ) { $ instance = self :: $ _services -> offsetGet ( $ strIdentifier ) ; self :: _mixin ( $ strIdentifier , $ instance ) ; } }
Add a mixin or an array of mixins for an identifier

The mixins are mixed when the indentified object is first instantiated see {@link get}
Mixins are also added to objects that already exist in the service container.

@param	mixed	An object that implements AnObjectServiceable, AnServiceIdentifier object
or valid identifier string
@param  string|array   A mixin identifier or a array of mixin identifiers
@see AnObject::mixin
Add a mixin or an array of mixins for an identifier