classkit_import

(no version information, might be only in CVS)

classkit_import -- Import new class method definitions from a file

Leírás

array classkit_import ( string filename )

Megjegyzés: This function cannot be used to manipulate the currently running (or chained) method.

Figyelem

Ez a függvény KÍSÉRLETI JELLEGGEL MŰKÖDIK. A függvény működése, neve, bármi amit a függévénnyel kapcsolatban dokumentáltunk megváltozhat egy későbbi PHP kiadásban minden figyelmeztetés nélkül. Ezt a függvényt csak a saját felelősségedre használd!

Paraméterek

filename

The filename of the class method definitions to import

Visszatérési értékek

Associative array of imported methods

Példák

Példa 1. classkit_import() example

<?php
// file: newclass.php
class Example {
    function
foo() {
        return
"bar!\n";
    }
}
?>
<?php
// requires newclass.php (see above)
class Example {
    function
foo() {
        return
"foo!\n";
    }
}

$e = new Example();

// output original
echo $e->foo();

// import replacement method
classkit_import('newclass.php');

// output imported
echo $e->foo();

?>

A fenti példa a következő kimenetet adja:

foo!
bar!

Lásd még

classkit_method_add()
classkit_method_copy()