ThumbBase::imports PHP Method

imports() protected method

This is where all the plugins magic happens! This function "loads" the plugin functions, making them available as methods on the class.
protected imports ( string $object )
$object string The name of the object to import / "load"
    protected function imports($object)
    {
        // the new object to import
        $newImport = new $object();
        // the name of the new object (class name)
        $importName = get_class($newImport);
        // the new functions to import
        $importFunctions = get_class_methods($newImport);
        // add the object to the registry
        array_push($this->imported, array($importName, $newImport));
        // add the methods to the registry
        foreach ($importFunctions as $key => $functionName) {
            $this->importedFunctions[$functionName] =& $newImport;
        }
    }