cwmiller / broadworks-connector

Simple library for connecting to BroadWorks OCI-P API
MIT License
8 stars 5 forks source link

Single NameSpace #5

Closed TwinMist closed 6 years ago

TwinMist commented 6 years ago

Hi It is possible to combine the request and responcse namespace into a single entity? use CWM\BroadWorksConnector\Ocip\Models\UserGetListInGroupRequest; use CWM\BroadWorksConnector\Ocip\Models\UserGetListInGroupResponse; becomes use CWM\BroadWorksConnector\Ocip\Models\UserGetListInGroup or use CWM\BroadWorksConnector\Ocip\Models\UserGetListInGroupRequest;

great work...

cwmiller commented 6 years ago

Not really since each class needs to be in its own file.

If you'd like to reduce the number of uses at the top of your script, you could always just do use CWM\BroadWorksConnector\Ocip\Models;

The only drawback to this is you'd always have to reference Models e.g. $request = new Models\UserGetListInGroupRequest(). Or you can use an alias by doing use CWM\BroadWorksConnector\Ocip\Models as M; then referencing the classes as M\UserGetListInGroupRequest, etc.

TwinMist commented 6 years ago

Could you create something that loads all the classes ? or is this to much overhead?

Great work on this tool.