Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

classkit_import(3) [php man page]

CLASSKIT_IMPORT(3)							 1							CLASSKIT_IMPORT(3)

classkit_import - Import new class method definitions from a file

SYNOPSIS
array classkit_import (string $filename) DESCRIPTION
Note This function cannot be used to manipulate the currently running (or chained) method. Warning This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk. PARAMETERS
o $filename - The filename of the class method definitions to import RETURN VALUES
Associative array of imported methods EXAMPLES
Example #1 classkit_import(3) example <?php // file: newclass.php class Example { function foo() { return "bar! "; } } ?> <?php // requires newclass.php (see above) class Example { function foo() { return "foo! "; } } $e = new Example(); // output original echo $e->foo(); // import replacement method classkit_import('newclass.php'); // output imported echo $e->foo(); ?> The above example will output: foo! bar! SEE ALSO
classkit_method_add(3), classkit_method_copy(3). PHP Documentation Group CLASSKIT_IMPORT(3)

Check Out this Related Man Page

CLASSKIT_METHOD_COPY(3) 						 1						   CLASSKIT_METHOD_COPY(3)

classkit_method_copy - Copies a method from class to another

SYNOPSIS
bool classkit_method_copy (string $dClass, string $dMethod, string $sClass, [string $sMethod]) DESCRIPTION
Warning This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk. PARAMETERS
o $dClass - Destination class for copied method o $dMethod - Destination method name o $sClass - Source class of the method to copy o $sMethod - Name of the method to copy from the source class. If this parameter is omitted, the value of $dMethod is assumed. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 classkit_method_copy(3) example <?php class Foo { function example() { return "foo! "; } } class Bar { // initially, no methods } // copy the example() method from the Foo class to the Bar class, as baz() classkit_method_copy('Bar', 'baz', 'Foo', 'example'); // output copied function echo Bar::baz(); ?> The above example will output: foo! SEE ALSO
classkit_method_add(3), classkit_method_redefine(3), classkit_method_remove(3), classkit_method_rename(3). PHP Documentation Group CLASSKIT_METHOD_COPY(3)
Man Page

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

are Associative Arrays possible in UNIX?

Is it possible to say.. myArr=34 myArr=15 ? (11 Replies)
Discussion started by: yongho
11 Replies

2. UNIX for Dummies Questions & Answers

foo

if ; then echo Its Cold for $sid at $c_dst $jobroot/scripts/abc.sh $sid COLD $c_dst elif ; then echo Its Hot for $sid at $h_dst $jobroot/scripts/abc.sh $sid HOT $h_dst else echo No backup for $sid today wat does foo do ?? (2 Replies)
Discussion started by: bn_unx
2 Replies

3. Web Development

Need Number Format Help in PHP

I have a number coming into a php echo statement that looks like 0293 and i want to output it looking like 29.3 and for the life of me i cannot figure out how to do it with available php functions like number_format, sprintf, or printf. Sample Data: 0293 0304 0282 0310 1324 2000 ... (2 Replies)
Discussion started by: RacerX
2 Replies

4. Web Development

[PHP] Post and get (at the same time (?))

Hi, i'm programming a very tiny website for a friend. But i have some doubts... I have a page called form.php, it receives a variable using the get method... (form.php?variable_importante=datos)... In form.php i have a form, and it sends data to form_manager.php using POST method... But the... (2 Replies)
Discussion started by: Sandia_man
2 Replies

5. Shell Programming and Scripting

Request to check run php in Unix shell

Hi I m running a php file in Unix shell it says php cpmmnad not found bash-3.2$ cat echo.php <? php echo"heelo world" >? bash-3.2$ php echo.php bash: php: command not found actually I want to change certain thing a in a website using php script so I m beginner and trying... (6 Replies)
Discussion started by: manigrover
6 Replies

6. Web Development

Want to edit a sh file using php code

Hi friends, I want to edit sh file using php, i have tried different method. but its shows permission issues. Folder path : xyz permission :0755 owner: 545 group: 0 filename : abc.sh permission :0644 owner:0 group: 0 how to edit these files using php/ i have use below codes, but... (3 Replies)
Discussion started by: sanjay833i
3 Replies

7. Programming

UNIX C Send data to PHP

Helo, i try send data from Unix to PHP. What is the correctly way to do this ? i try: c char command ; sprintf(command , "php import.php %s",my_vars); system(command ); php $my_data = @ $argv; this work, but i am not sure that is the right way. an the special chargers are not in... (1 Reply)
Discussion started by: freaky4552
1 Replies