Welcome Guest, Not a member yet? Register   Sign In
--Is there a controller hierarchy ?
#4

[eluser]Unknown[/eluser]
I tried the library approach, but it can only be accessed through composition but not inheritance.

Specifically, I first created a script:

<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Someclass {

function some_function()
{
}
}

?>

Then put it into the library folder, and modified the autoload.php to auto-load it.

After that I can access it in other controllers through composition like:
$this->someclass->some_function();

But still I cannot sub-class it like:

class SubClass extends Someclass {
// some logic here
}


Messages In This Thread
--Is there a controller hierarchy ? - by El Forum - 10-15-2007, 06:26 PM
--Is there a controller hierarchy ? - by El Forum - 10-16-2007, 03:57 AM
--Is there a controller hierarchy ? - by El Forum - 10-16-2007, 07:22 AM
--Is there a controller hierarchy ? - by El Forum - 10-16-2007, 10:59 AM
--Is there a controller hierarchy ? - by El Forum - 10-16-2007, 11:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB