Omega13a's Corner
Contribute To This Site
Submit a Download
Submit a Link
Submit A Review for Omega13a's Corner

This Website Is Best Viewed In Mozilla Firefox 0.9+
You Are Currently Using
  Login or Register
::  Home   ::  Your Account   ::  Forums   ::  UFT Encyclopedia   ::  UFT Writer  ::
2020.42
Omega13a's Wish List
My Amazon.com Wish List
 
Affiliates
Supported by

[ Be A Supporter ]
[ NukeSupporters( tm) ]
 
Navigation
· Hom e
· Rep ort An Error








 
UFT Community

Omega13a's Corner Forums

 
Vote For Us
 
Ads


call_user_method

call_user_method

(PHP 3 >= 3.0.3, PHP 4, PHP 5)

call_user_method --  Call a user method on an specific object [deprecated]

Description

mixed call_user_method ( string method_name, object &obj [, mixed parameter [, mixed ...]] )

Warning

The call_user_method() function is deprecated as of PHP 4.1.0, use the call_user_func() variety with the array(&$obj, "method_name") syntax instead.

Calls the method referred by method_name from the user defined obj object. An example of usage is below, where we define a class, instantiate an object and use call_user_method() to call indirectly its print_info method.

<?php
class Country {
    var
$NAME;
    var
$TLD;
    
    function
Country($name, $tld)
    {
        
$this->NAME = $name;
        
$this->TLD = $tld;
    }

    function
print_info($prestr = "")
    {
        echo
$prestr . "Country: " . $this->NAME . "\n";
        echo
$prestr . "Top Level Domain: " . $this->TLD . "\n";
    }
}

$cntry = new Country("Peru", "pe");

echo
"* Calling the object method directly\n";
$cntry->print_info();

echo
"\n* Calling the same method indirectly\n";
call_user_method("print_info", $cntry, "\t");
?>

See also call_user_func_array(), and call_user_func().


Total Hits: 0

Powered by PHPNukePage Protected By Copyscape. Do Not CopyNukeSentinel ProtectedPowered by PEARPowered by PECL

© 2000, 2001, 2002 Trek Archive, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 United Federation of Trek.
Omega's Corner is © 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 omega13a.
Star Trek®, Star Trek: The Next Generation®, Star Trek: Deep Space Nine®, Star Trek: Voyager®, Enterprise®, and Star Trek: Enterprise® are registered trademarks of Paramount Pictures and Viacom. All Star Trek material found on this site is for promotional purposes only, and not personal or financial gain. No infringements on their copyrights is intended.
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.


ROR Sitemap Google Sitemap

PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.3765 Seconds
Server Load: 1.31
Queries: 24 (0.0967 seconds)
Included 91 files
239 classes defined
46 interfaces defined
0 classes loaded using __autoload()
2,614 functions defined
4,342 constants defined

:: subBlack phpbb2 style by spectre :: PHP-Nuke theme by www.nukemods.com ::

This Website Is Best Viewed In Mozilla Firefox 0.9+
You Are Currently Using

UFT's Webring of Sci-Fi and Fantasy
UFT's Webring of Sci-Fi and Fantasy
Previous site : Random : Next site : List sites
Powered by PHP-Ring
Psychology News
Scitrek webring
Scitrek webring
Previous site : Random : Next site : List sites
Powered by .PHP-Ring
Psychology News
robots.txt
Contributors Contact Us