protected static function getCachedInstance()
    {
        $class = get_called_class();
        if (self::$instances === null || !isset(self::$instances[$class])) {
            return null;
        }
        return self::$instances[$class];
    }
protected static function getCachedInstance()
    {
        $class = get_called_class();
        if (self::$instances === null || !isset(self::$instances[$class])) {
            return null;
        }
        return self::$instances[$class];
    }
protected static function getCachedInstance ( ) { $ class = get_called_class ( ) ; if ( self :: $ instances === null || ! isset ( self :: $ instances [ $ class ] ) ) { return null ; } return self :: $ instances [ $ class ] ; }
Returns a cached singleton instance if one exists, or null if one hasn't
been created yet.

@return MessagePartFactory
Returns a cached singleton instance if one exists or null if one hasn t been created yet .