Welcome Guest, Not a member yet? Register   Sign In
Extending a Library
#1

[eluser]n0xie[/eluser]
Is it possible to extend a custom library? I'm not talking about a Core Library, but something like this:
Code:
class mylibrary{}

Code:
class somelibrary extend mylibrary{}

Code:
// some controller
$this->load->library('somelibrary');
#2

[eluser]Dam1an[/eluser]
Yeah, but you would need to specify the include path manually, so
Code:
include APPPATH.'libraries/My_library.php';
class Some_library extends My_library {
  ...
}
#3

[eluser]n0xie[/eluser]
Yeah that's what I thought. Looks ugly so I guess I just have to edit the library. I was hoping I could use one of my libraries and then override one of the functions but I guess editing will get me the same result.

Thanks for the quick answer.




Theme © iAndrew 2016 - Forum software by © MyBB