Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7977213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T09:07:55+00:00 2026-06-04T09:07:55+00:00

In PHP I would like to know what will be the method called by

  • 0

In PHP I would like to know what will be the method called by SOAP. Here is a sample to understand…

$soapserver = new SoapServer();
$soapserver->setClass('myClass');
$soapserver->handle();

What I would like to know is the name of the method that will be executed in handle()

Thank you !!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T09:07:56+00:00Added an answer on June 4, 2026 at 9:07 am

    In my opinion, the cleanest and most elegant way to access the called operation’s name in this situation would be using some kind of Wrapper or Surrogate design pattern. Depending on Your intent You would use either the Decorator or the Proxy.

    As an example, let’s say We want to dynamically add some additional functionality to our Handler object without touching the class itself. This allows for keeping the Handler class cleaner and, thus, more focused on its direct responsibility. Such functionality could be logging of methods and their parameters or implementing some kind of caching mechanism. For this We will use the Decorator design pattern. Instead of doing this:

    class MyHandlerClass
    {
        public function operation1($params)
        {
            // does some stuff here
        }
    
        public function operation2($params)
        {
            // does some other stuff here
        }
    }
    
    $soapserver = new SoapServer(null, array('uri' => "http://test-uri/"));
    $soapserver->setClass('MyHandlerClass');
    $soapserver->handle();
    

    We’ll do the following:

    class MyHandlerClassDecorator
    {
        private $decorated = null;
    
        public function __construct(MyHandlerClass $decorated)
        {
            $this->decorated = $decorated;
        }
    
        public function __call($method, $params)
        {
            // do something with the $method and $params
    
            // then call the real $method
            if (method_exists($this->decorated, $method)) {
                return call_user_func_array(
                    array($this->decorated, $method), $params);
            } else {
                throw new BadMethodCallException();
            }
        }
    }
    
    $soapserver = new SoapServer(null, array('uri' => "http://test-uri/"));
    $soapserver->setObject(new MyHandlerClassDecorator(new MyHandlerClass()));
    $soapserver->handle();
    

    If You want to control the access to the Handler’s operations, for instance, in order to impose access rights use the Proxy design pattern.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to know if PHP is Object Oriented, I read that from
I would like to know how to create a php function that can be
I would like to know what's the best way to organize my php project
I recently finished my PHP app and i would like to know if there's
I'm using a multi dimensional array in php, I would like to know how
Ok well heres what I would like to do in PHP: http://www.wordle.net/ I know
I would like to know if there is an equivalent of IsPostBack in PHP.
Has anyone of you ever used php_writeexcel (http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/)? I would like to know if
Using Php I would like to extract the current Url of a page including
I'm not very good at PHP and would like to have a PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.