Reply to Re: A quick question about xml-rpc

Your name:

Reply:


Posted by Jerry Stuckle on 05/11/07 11:34

Ming wrote:
> On May 10, 4:54 pm, Mike P2 <sumguyovrt...@gmail.com> wrote:
>> On May 10, 7:06 pm, Ming <minghu...@gmail.com> wrote:
>>
>>> Thanks Mike. I still do not quite understand. I do not have any class
>>> that has getStateName method. It is an object in the remote machine
>>> that has this method, isn't it? Correct me if I am wrong, it sounds it
>>> is sufficient to just send $method = 'getStateName'
>>> Ming
>> Yes, the object is on the remote machine, and the method
>> 'getStateName' is within that object. Just like you might organize
>> methods into classes in your own php code, the remote machine has
>> getStateName() organized into an 'examples' object.
>>
>> In PHP, if you have an object instance in the variable $examples and
>> the class that it is an instance of has the method getStateName(), you
>> can't just do:
>>
>> $whatever = getStateName();
>>
>> You have to do
>>
>> $whatever = $examples->getStateName();
>>
>> Because getStateName() is not in the global scope, it is in the
>> $examples object.
>>
>> If you still don't understand and would like to know why you have to
>> put in 'examples', maybe you should study PHP OOP more to get a better
>> understanding of OOP.
>>
>> -Mike PII
>
>
> Hi Mike,
>
> Thanks for reply.
>
> I have used OOP and Java for several years so I understand OOP
> concepts. Back to my question, it seems the 'examples' in $method =
> 'examples.getStateName' is arbitrary. Can I change it to other words?
>
> Thanks a lot,
>
> Ming
>

Ming,

It has nothing to do with YOUR code. You're calling a procedure on the
SERVER.

In this case the procedure defined by the server is
example.getStateName. It can be foo.bar, if you change it on both ends.

It's just like a web page. You can create a web page with any (legal)
name you want. But if you want a browser to display the page, the
browser has to use the URI defined at the server.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация