Skip to content

Stabilize public API #7

@Ocramius

Description

@Ocramius

Here's a short list of interfaces and ideas I came up with (could be splitted into multiple issues later)

  • ZfcAcl\Service\AclServiceInterface - new interface, let's place what the Acl service should actually do in here
  • ZfcAcl\Service\Context - do we need this? It looks more like a behavior to be set into a custom RoleProvider, and I would also move it out of the ZfcAcl\Service namespace
  • ZfcAcl\Service\Acl\RoleProvider - could this not just simply be replaced by a Zend\Acl\Role\RoleInterface? I think it adds an unnecessary layer of complexity... Eventual usage of associated entities/user objects could be hidden behind its implementation. I think it could be more a matter of educating users about it's usage.
  • ZfcAcl\View\Helper\ZfcAcl should be type hinted.
  • There is a LOT of confusion and abbreviations within ZfcAcl\Model in my opinion (still have to figure out how to solve that)
  • ZfcAcl\Model contains a lot of configuration classes and maps that consume them that aren't really easy nor intuitive, and require a lot of configuration that in most cases doesn't fit (see following point).
  • ZfcAcl\Service\ResourceMapperInterface - could add this interface as simple bi-directional mapping of $resourceName <-> $requestedItem. That would probably simplify the clutter of ZfcAcl\Model, whose aim was to map routes, events and controllers to resources. The entire configuration mapping thing could somehow be abstracted and made optional (or at least not necessary) by introducing sane defaults (see the mapper for the Dispatch guard)
  • ZfcAcl\Guard\GuardInterface (to rename) - Problematic to add a public method here, but I think it could be done assuming the mapper interface will be flexible enough.
  • ZfcAcl\Exception\ExceptionInterface - simply to comply with the new ZendFramework 2 exception concept :)
  • ZfcAcl\Guard\ActionControllerGuard - because we don't handle "actions" right now...
  • ZfcAcl\ZfcAclAwareInterface - for setter injection of the service itself

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions