synapsestudios/synapse-base — pull request #26 by paulstatezny (2014-04-10 22:58:53+00:00)
Title: Standardize Namespacing Conventions

### Standardize Namespacing Conventions

Namespaces should follow the following convention:

- `Synapse\Domain\DomainServicetype`
- `Synapse\Domain\Subdomain\DomainServicetype`

**Domain** is the area of the application in question (Usually the type of entity) such as `User`.

**Servicetype** is the type of service represented by the class such as `Entity`, `Mapper`, `Controller`, `Converter`, or even `Service` (if you have a general-purpose service to perform tasks related to that type of entity.)

Sometimes an entity is intimately related to another entity, so you may want to house services related to the first entity under the second's namespace. For example, a `UserToken` is closely related to a `User`; it belongs to a `User`. In that case, you would have a **Subdomain** segment `Token` in your namespace.

With this pattern, you should end up with fully qualified class names such as:
- `Synapse\User\UserController`
- `Synapse\User\Token\TokenEntity`