RSSAmplifier

Donat Studios · May 23, 2014

All Glory to __invoke

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

Lost in the shiny new features (see: namespaces and closures ) PHP 5.3 also added the __invoke method. While not plainly apparent, it is secretly an amazingly useful 'magic method' . If you're not taking advantage of __invoke , you should be . Why? It provides a uniform execution points for objects that have a doPrimaryAction() style method. What do I mean by this? Many simple, single…

Read on donatstudios.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.