Answer the question
In order to leave comments, you need to log in
Is there a .NET / c# analogue of petapoco in PHP?
There is a petapoco library in .net www.toptensoftware.com/petapoco
It is good because you can "map" RAW SQL onto a flat object.
I have been looking at Laravel ORM Eloquent.
But there are problems:
1) with the work itself with RAW SQL.
2) there is RAW SQL and if you do, then the mapping does not work, and you have to use result[0]['name'] ,
but I would like result[0]->name.
3) plus I want autocomplete hints, for example, from vs code or phpstorm.
Question. Is there an analogue of petapoco in php?
Answer the question
In order to leave comments, you need to log in
even in PDO you can do this.
php.net/manual/ru/pdostatement.fetchobject.php
code example is something like here
php.net/manual/ru/pdostatement.fetch.php
or Doctrine ORM, raw sql can also be mapped there, although the need to map is equal to 0 .01% of cases
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question