oop - Is there a PHP equvalent of Objective-C Categories? -


for short period of time subjected myself objective-c, swore lot, 1 thing thought fabulous categories.

i add method nsstring object category, , available on nsstring object in application. similar possible in delphi , many other languages.

is possible in php?

if there tutorial, , can extend pdo object?

i have searched helpers , categories little success. seem remember reading possible.

no not possible in php add functionality existing native classes.

and yes indeed possible extend pdo.

class myclass extends pdo { /* class stuff here */ } 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -