Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

When is Object::extend(...) useful or required?


Go to End


2 Posts   654 Views

Avatar
vwd

Community Member, 166 Posts

10 October 2011 at 3:57pm

Hi,

I'm trying to get my head around Object::extend(...)...

Please tell me if I understand what it does correctly:

  • Goes through all of the current object's extensions
  • Checks if a method of the same name as parameter $method exists,
  • And if so, calls the method with the parameters $a1-$a7

When would I need to use Object::extend? Are the situations when it is useful or even necessary? Any code examples that show its usefulness?

Thanks very much.
VWD.

What

Avatar
vwd

Community Member, 166 Posts

12 October 2011 at 11:05pm

This question was partially answered in this thread.