You are here: Re: PHP to a COM object « PHP Programming Language « IT news, forums, messages
Re: PHP to a COM object

Posted by Steve on 11/15/07 14:22

"Alex" <d_keyoke@hotmail.com> wrote in message
news:473bf7eb$0$26761$426a74cc@news.free.fr...
> "Steve" <no.one@example.com> wrote in message
> news:mKH_i.34$dm.33@newsfe02.lga...
>> a difference, yes. something that will make your code quit bombing and
>> still get the Factory functionality...probably not. all an interface
>> (IFactory in this case) is, is a contract...a definition of what *all
>> usable* objects that *implement* that interface will provide a caller,
>> i.e. your php code. make sense? IFactory will provide you no other
>> functionality than that. here's an example in vb.
>
> OK it's like a class from which another inherits, then ?

kind of. the difference being that there is no functionality given to a
class that implements an interface (ifactory). if i inherit from a class in
the traditional sense, whatever functionality is present in the parent class
will be part of the inheriting class...the inheriting class can add more
interfaces (functions, properties, etc.) or rewrite/override/shadow the
parent class' interfaces (functions, properties, etc.)

other than that, yes, they're pretty similar.

> (snip the example)
>
>> anyway...i think i got off track, but does that help you know that you're
>> going to have to get at an actual Factory object in the list...which
>> doesn't solve your memory problem?
>
> Yes, that's very helpful. But it raises a question in PHP. Can I assume
> that COM tells PHP what type the objects in a class (or Interface) are ? I
> don't have to explicitely instanciate or cast the objects that are childs
> of a COM object ?

can you assume? no, not really. while COM defines everything about itself
and makes that information know to any callers, php doesn't need to know any
of it. php basically 'invokes' on a com object whatever you tell it to
attempt. it doesn't need to know about sawMill.foo, it simply attempts to
invoke 'foo' on the sawMill object. php only needs to handle errors thrown
from the invocation or supply the results thereof back to the caller.

> Now, I tried different values for memory_limit in php.ini and it doesnt
> change anything. I had a closer look at the memory usage, and Apache also
> takes almost 50M on a working page. So I'm not really sure it's a memory
> problem.

hmmm. glad i see in another post that you've got it figured out. i'd have
focused on memory a while longer...and have gotten no where.

> Actually, the COM syntax is not really complicated. So I'm beginning to
> think of a bug (in the object or PHP).

really? there are only a few ways to call things. what's puzzling you?

> I'm considering trying a newer version of PHP. But I fear the impacts.
>
> Thank you very much again, things are getting clearer :)


cheers

 

Navigation:

[Reply to this 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

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