src/main/php/DataDo/Data/Repository.php
private function addIntResultMethod(QueryBuilderResult $query, $methodName)
    {
        $intResultMethod = function () use ($query) {
            $sth = $this->pdo->prepare($query->getSql());
            $sth->execute(func_get_args());
            return $sth->rowCount();
        };

        $this->methods[$methodName] = \Closure::bind($intResultMethod, $this, get_class());
    }
private function addIntResultMethod(QueryBuilderResult $query, $methodName)
    {
        $intResultMethod = function () use ($query) {
            $sth = $this->pdo->prepare($query->getSql());
            $sth->execute(func_get_args());
            return $sth->rowCount();
        };

        $this->methods[$methodName] = \Closure::bind($intResultMethod, $this, get_class());
    }
private function addIntResultMethod ( QueryBuilderResult $ query , $ methodName ) { $ intResultMethod = function ( ) use ( $ query ) { $ sth = $ this -> pdo -> prepare ( $ query -> getSql ( ) ) ; $ sth -> execute ( func_get_args ( ) ) ; return $ sth -> rowCount ( ) ; } ; $ this -> methods [ $ methodName ] = \ Closure :: bind ( $ intResultMethod , $ this , get_class ( ) ) ; }
Add a new method that will result in an integer.
@param $query QueryBuilderResult a parsed dsl query
@param $methodName string the name of the method
Add a new method that will result in an integer .