PHQL as documentation provide is for querying models. Is there model called tasks ?
Also what is Builder ? This code looks pretty weir. Didn't know you can select this way but it looks just bad. What's a problem with OOP ?
'(SELECT COUNT(Manager\Models\Tasks._) from tasks WHERE Manager\Models\Tasks.project = Manager\Models\Projects._ ) as alltasks'
it should be:
'(SELECT COUNT(Manager\Models\Tasks._) from Manager\Models\Tasks WHERE Manager\Models\Tasks.project = Manager\Models\Projects._ ) as alltasks'
Also try to use creatBuilder and just methods. This way you can get rid of Manager\Models\Clients and use just an alias. Also ust namespace aliases so you don't need to use full namespaces.