src/DumpController.php
public function printf(TableSchema $table, $functionName, $tip = null, $indent = 0)
    {
        $params = [];
        $params[] = &$table;
        $params[] = $indent;
        $functionName = ucfirst($functionName);
        $functionName = 'get' . $functionName;

        if ('getTableData' === $functionName) {
            if ($limit = $this->checkLimit($table->name)) {
                array_pop($params);
                $params[] = $limit;
                $params[] = $indent;
            } else {
                return 0;
            }
        }

        if (! $data = call_user_func_array([$this->schema, $functionName], $params)) {
            return 0;
        }

        if (! empty($tip)) {
            $tip .= ': ' . $this->schema->removePrefix($table->name, $this->db->tablePrefix);
            $this->output->startPrintf($tip); // record start time
            $this->output->stdout($data);
            $this->output->endPrintf($tip); // record end time
        } else {
            $this->output->stdout($data);
        }


        return 0;
    }
public function printf(TableSchema $table, $functionName, $tip = null, $indent = 0)
    {
        $params = [];
        $params[] = &$table;
        $params[] = $indent;
        $functionName = ucfirst($functionName);
        $functionName = 'get' . $functionName;

        if ('getTableData' === $functionName) {
            if ($limit = $this->checkLimit($table->name)) {
                array_pop($params);
                $params[] = $limit;
                $params[] = $indent;
            } else {
                return 0;
            }
        }

        if (! $data = call_user_func_array([$this->schema, $functionName], $params)) {
            return 0;
        }

        if (! empty($tip)) {
            $tip .= ': ' . $this->schema->removePrefix($table->name, $this->db->tablePrefix);
            $this->output->startPrintf($tip); // record start time
            $this->output->stdout($data);
            $this->output->endPrintf($tip); // record end time
        } else {
            $this->output->stdout($data);
        }


        return 0;
    }
Unified printf interface
@param TableSchema $table
@param $functionName string $functionName abstract function name
@see \hzhihua\dump\abstracts\AbstractSchema abstract function name
@param null $tip
@param int $indent text-indent 文本缩进
@return bool|int