Welcome Guest, Not a member yet? Register   Sign In
Code Iginter Core subclassing
#6

[eluser]Daniel Peraza[/eluser]
Using http://ellislab.com/codeigniter/user-gui...asses.html, I was able to write a Controller subclass, with the only difference, that in the user guide, the core class is prefixed with CI_, and I had to delete that prefix to get my class working.

But according to the user guide, there is no way to create core Model subclass, because it is not a System Class. So this leaves a great hole in my mind when trying to implement this.

On the other hand, retaking the Controller sub-classing, I have been reading on Design Patterns in PHP, I have no much experience with Design Patterns, but may be using a kind of Access Control - Proxy Design Pattern, we could write a more robust class with all the authentication features centralized in only one class, that then, the rest of the controllers would inherit, checking authentication on every request, and taking the necessary actions when an user is not properly authenticated to access the system.

I tried to implement this using redirections instead of saving member subject objects instances, but I made a mistake and my controller went on recursive redirection instead of calling the proper controller.

I would like to see if somebody else have implemented this idea, or if somebody could outline a basic implementation of this special design pattern. The examples I have found on the web, are all focused in the Remote type of Proxy Design Pattern instead of the Access Control Proxy Design Pattern.


Messages In This Thread
Code Iginter Core subclassing - by El Forum - 10-20-2008, 06:12 PM
Code Iginter Core subclassing - by El Forum - 10-20-2008, 08:07 PM
Code Iginter Core subclassing - by El Forum - 10-21-2008, 01:38 PM
Code Iginter Core subclassing - by El Forum - 10-21-2008, 01:45 PM
Code Iginter Core subclassing - by El Forum - 10-23-2008, 03:25 AM
Code Iginter Core subclassing - by El Forum - 10-23-2008, 01:56 PM
Code Iginter Core subclassing - by El Forum - 10-23-2008, 08:04 PM
Code Iginter Core subclassing - by El Forum - 10-24-2008, 02:01 PM
Code Iginter Core subclassing - by El Forum - 10-24-2008, 02:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB