Majid Rafei
Majid Rafei

Reputation: 97

How to manage namespaces in Zend?

What is the best practice to use namespaces in Zend?

How do I manage the namespace for repositories, services, etc.?

I have found a general directory structure in the Zend documentation here, but it does not describe where to place repositories and other services!

Please consider it a whole option implementation of a MVC framework.

Thanks.

Upvotes: 0

Views: 74

Answers (1)

Tim Fountain
Tim Fountain

Reputation: 33148

The documentation you linked to is for Zend Framework 1, which predates PHP namespaces.

The short answer is that you can structure the code in whatever way makes sense for your application. As the classes are autoloaded, there is no set pattern you need to follow - organise things in a way that makes sense to you.

Upvotes: 1

Related Questions