PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

classkit_method_add> <Classkit Functions
Last updated: Sat, 24 Mar 2007

view this page in

classkit_import

(PECL classkit:0.3-0.4 runkit:0.7-0.9)

classkit_import — Import new class method definitions from a file

Popis

array classkit_import ( string $filename )

Poznámka: Tuto funkci nelze použít k manipulaci s aktuálně běžící metodou (nebo metodou v řetězu).

Varování

Tato funkce je EXPERIMENTÁLNÍ. Chování této funkce, její název a všechno ostatní, co je zde zdokumentováno, se v budoucích verzích PHP může BEZ OHLÁŠENÍ změnit. Berte to v úvahu a používejte tuto funkci na vlastní nebezpečí.

Seznam parametrů

filename

The filename of the class method definitions to import

Návratové hodnoty

Associative array of imported methods

Příklady

Příklad 285. 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();

?>

Výše uvedený příklad vypíše:


foo!
bar!

    

Viz také

classkit_method_add()
classkit_method_copy()



add a note add a note User Contributed Notes
classkit_import
There are no user contributed notes for this page.

classkit_method_add> <Classkit Functions
Last updated: Sat, 24 Mar 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites