NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class MapFactory

Command factory used when explicitly mapping strings to command classes

  Guzzle\Service\Command\Factory\MapFactory implements Guzzle\Service\Command\Factory\FactoryInterface

Namespace: Guzzle\Service\Command\Factory
Located at Guzzle/Service/Command/Factory/MapFactory.php

## Methods summary

- `public` `__construct ( array $map )`
- `public` `factory ( string $name, array $args = array() )`

  Create a command by name

## Methods detail

# `public`
`__construct( array $map )`

#### Parameters

$map
  `array`
  $map Associative array mapping command names to classes

# `public CommandInterface|null`
`factory( string $name, array $args = array() )`

Create a command by name

#### Parameters

$name
  `string`
  $name Command to create
$args
  `array`
  $args Command arguments

#### Returns

`CommandInterface|null`

#### Implementation of

`Guzzle\Service\Command\Factory\FactoryInterface::factory()`

### Magic methods summary

## Properties summary

`protected array` | $map | # Associative array mapping command names to classes