We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

sonething about listener

I want to listener the function

    $result = $this->builder()
        ->from(array('tw'=>'Aops\Apps\Admin\Models\AuthUserWechats'))
        ->columns(array('tw.uid','tw.wechatid','tw.status'))
        ->where('tw.uid = :uid:',array('uid'=>intval($uid)))
        ->getQuery()
        ->execute()
        ->toArray();

I want to do something after toArray(),every builders run toarray,i hope it will show 1231 after running toarray()?? such as aftertoArray(),can phalcon listen it?



145.0k
Accepted
answer
edited Oct '16

What you mean ? Maybe just use CONCAT_WS in query ? And it will return concated 1231. Also if you want to select only one row use getSingleResult instead of execute. Then it will just returns ["1231"]