lib/AktiveMerchant/Billing/Base.php
public static function gateway($name = null, $options = array())
    {
        $gateway = "\\AktiveMerchant\\Billing\\Gateways\\" . Inflect::camelize($name);

        if (class_exists($gateway)) {
            return new $gateway($options);
        }

        throw new Exception("Unable to load class: {$gateway}.");
    }
public static function gateway($name = null, $options = array())
    {
        $gateway = "\\AktiveMerchant\\Billing\\Gateways\\" . Inflect::camelize($name);

        if (class_exists($gateway)) {
            return new $gateway($options);
        }

        throw new Exception("Unable to load class: {$gateway}.");
    }
public static function gateway ( $ name = null , $ options = array ( ) ) { $ gateway = "\\AktiveMerchant\\Billing\\Gateways\\" . Inflect :: camelize ( $ name ) ; if ( class_exists ( $ gateway ) ) { return new $ gateway ( $ options ) ; } throw new Exception ( "Unable to load class: {$gateway}." ) ; }
Factory method for gateways.

Return the matching gateway for the provider
$name must be the name of the gateway class in underscore format
for AuthorizeNet gateway will be authorize_net

<code>
AktiveMerchant\Billing\Base::gateway('authorize_net');
</code>

@param  string $name    the underscored name of the gateway.
@param  array  $options the options for gateway construct.

@return \AktiveMerchant\Billing\Gateway the gateway instance
Factory method for gateways .