Possible Duplicate:
Can I include code into a PHP class?
Hello,
I have some third-part php files that I would like to include as classes in my application. The problem is those files keep changing and they are not OOP, just a bunch of functions. To keep them updated and to work in my framework I have to use them in a class, so I would like to include the file and access it via -> operator:
Example:
class Vendor {
include("../vendor/functions.php");
}
and then:
$vendor = new Vendor();
$vendor->foorbar();
Any ideas ?