I have a library in code igniter that looks like class MyClass($options = array())
The file is Myclass.php
I have a file (config/Myclass.php) that looks like
$Myclass = array(
'something' => 'value',
'another' => 'value'
);
Which I thought should pass the $Myclass array in when I initialize my class, but apparently not?
What do I need to do to fix it?
AH I found the answer,
The array inside your config file must be called
$config.The name of the file must also be a lower case representation of the library file name.
e.g
LIB FILE:
Somelibrary.phpLIB CONTENTS:
class Somelibrary($options = array()){...CONF FILE:
somelibrary.phpCONF CONTENTS:
$config = array('something' => 'value');