public function createSqlFromProcedure($procedureName, array $bindings, $cursor = false)
    {
        $paramsString = implode(',', array_map(function ($param) {
            return ':' . $param;
        }, array_keys($bindings)));

        $prefix = count($bindings) ? ',' : '';
        $cursor = $cursor ? $prefix . $cursor : null;

        return sprintf('begin %s(%s%s); end;', $procedureName, $paramsString, $cursor);
    }
public function createSqlFromProcedure($procedureName, array $bindings, $cursor = false)
    {
        $paramsString = implode(',', array_map(function ($param) {
            return ':' . $param;
        }, array_keys($bindings)));

        $prefix = count($bindings) ? ',' : '';
        $cursor = $cursor ? $prefix . $cursor : null;

        return sprintf('begin %s(%s%s); end;', $procedureName, $paramsString, $cursor);
    }
public function createSqlFromProcedure ( $ procedureName , array $ bindings , $ cursor = false ) { $ paramsString = implode ( ',' , array_map ( function ( $ param ) { return ':' . $ param ; } , array_keys ( $ bindings ) ) ) ; $ prefix = count ( $ bindings ) ? ',' : '' ; $ cursor = $ cursor ? $ prefix . $ cursor : null ; return sprintf ( 'begin %s(%s%s); end;' , $ procedureName , $ paramsString , $ cursor ) ; }
Creates sql command to run a procedure with bindings.

@param  string      $procedureName
@param  array       $bindings
@param  string|bool $cursor
@return string
Creates sql command to run a procedure with bindings .