3 ms·
> Want to write an ORM that uses classes or objects as column declaration in PHP? What prevents you from doing that in PHP?
by Gigablah 15y ago
> Want to write an ORM that uses classes or objects as column declaration in PHP?
What prevents you from doing that in PHP?
- ceol 15y agoPHP doesn't allow you to pass functions and classes as arguments.
- cgdangelo 15y agoUnless I'm misunderstanding you, passing functions as arguments is definitely possible with anonymous functions/closures.
- Gigablah 15y agoYou can. Here's my code as an example: https://github.com/gigablah/fsphinxphp/blob/master/src/FSphinx/FSphinxClient.php#L271 https://github.com/gigablah/fsphinxphp/blob/master/src/FSphi... Note the $getter parameter.