PHPackages                             thefrozenfire/zf2-command-module - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. thefrozenfire/zf2-command-module

ActiveLibrary[CLI &amp; Console](/categories/cli)

thefrozenfire/zf2-command-module
================================

Command object pattern implementation

1.0.2(11y ago)0224MITPHP

Since Mar 24Pushed 11y agoCompare

[ Source](https://github.com/TheFrozenFire/ZF2-Command-Module)[ Packagist](https://packagist.org/packages/thefrozenfire/zf2-command-module)[ RSS](/packages/thefrozenfire-zf2-command-module/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Command Objects
===============

[](#command-objects)

This module provides a basic implementation of the command object pattern in ZF2, as well as aggregate command objects. Command objects are typically used in place of stringing together the results from various unrelated service methods in an application service, though nothing prevents you from calling application services from command objects as well. In an architecture which isn't service-oriented, you might instead think of command objects as an encapsulation of the logic in your controller actions, in a portable contract.

The primary purpose of command objects is to encapsulate the dependencies and parameters of a discrete "command" which can be invoked at the application level.

Basic Usage
-----------

[](#basic-usage)

### Command Object

[](#command-object)

```
