Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BaseRBAC: Create a 'getList()' method #9

Open
jburns131 opened this issue Aug 23, 2013 · 4 comments
Open

BaseRBAC: Create a 'getList()' method #9

jburns131 opened this issue Aug 23, 2013 · 4 comments

Comments

@jburns131
Copy link
Collaborator

Right now there are no methods to get/return all Roles/Permissions.

I think a good addition to the BaseRBAC class would be a 'getList()' method that does just that.

Alternative proposed names:

  • getList
  • getAll
  • listAll
@abiusx
Copy link
Contributor

abiusx commented Aug 23, 2013

That would be a heavy function. It would be nicer to use yield, to reduce memory consumption specially for all permissions.
Also we will need plain and depthed outputs.
-A


Notice: This message is digitally signed, its source and integrity are verifiable.
If you mail client does not support S/MIME verification, it will display a file (smime.p7s), which includes the X.509 certificate and the signature body. Read more at Certified E-Mail with Comodo and Thunderbird in AbiusX.com

On Shahrivar 1, 1392, at 1:53 PM, Jesse Burns notifications@github.com wrote:

Right now there are no methods to get/return all Roles/Permissions.

I think a good addition to the BaseRBAC class would be a 'getList()' method that does just that.


Reply to this email directly or view it on GitHub.

@jburns131
Copy link
Collaborator Author

Yes, not a simple one there.

I'm going to put this one on the back burner until I can address any open issues and finish creating unit tests for the existing code base.

Once that is finished I'll create a topic branch for this issue and work out a proposal for you to review.

@abiusx
Copy link
Contributor

abiusx commented Aug 23, 2013

I think a good solution would be to add a note on PHPDOC, saying that this is memory consuming on PHP 5.3-

on PHP 5.4+, you can use the yield statement to create a generator.
-A


Notice: This message is digitally signed, its source and integrity are verifiable.
If you mail client does not support S/MIME verification, it will display a file (smime.p7s), which includes the X.509 certificate and the signature body. Read more at Certified E-Mail with Comodo and Thunderbird in AbiusX.com

On Shahrivar 1, 1392, at 7:19 PM, Jesse Burns notifications@github.com wrote:

Yes, not a simple one there.

I'm going to put this one on the back burner until I can address any open issues and finish creating unit tests for the existing code base.

Once that is finished I'll create a topic branch for this issue and work out a proposal for you to review.


Reply to this email directly or view it on GitHub.

@jburns131
Copy link
Collaborator Author

Generators are only supported for PHP 5 >= 5.5.0, but that is a good alternative to use if available.

Thanks for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants