Possible duplicate:
Is it possible to include code in 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 that these files continue to change, and they are not OOP, but just a bunch of functions. In order for them to update and work within my framework, I have to use them in the class, so I would like to include the file and access it through → operator:
Example:
class Vendor {
include("../vendor/functions.php");
}
and then:
$vendor = new Vendor();
$vendor->foorbar();
Any ideas?
source
share