Giter Club home page Giter Club logo

Comments (7)

barbushin avatar barbushin commented on July 18, 2024

Give me please some example :)

from php-console.

Chi-teck avatar Chi-teck commented on July 18, 2024
$dispatcher =  $connector->getDebugDispatcher();
$dispatcher->setFormatter('table');
$data = $db->query('SELECT * FROM table')->fetchAll();

// Take column headers from object/array properties.
$dispatcher->dispatchDebug($data, 'Big table with all available columns');

// Specifiy column headers directly. 
$dispatcher->setTableHeaders(['Header 1', 'Header 2', 'Header 3']);
$dispatcher->dispatchDebug($data, 'Simple three-column table');

// Add row numbers.
$dispatcher->setTableRowNumbers(TRUE);
$dispatcher->dispatchDebug($data, 'The same table with row numbers column');

from php-console.

barbushin avatar barbushin commented on July 18, 2024

Oh noo, it's too complicated to get used :) I think I will just add some options on client like:

Table-tags.
[x] sql
[x] db
[ ] some
[ ] other

So when there will be sql & db tags in message, it will be grouped to a table with field sql, db.

from php-console.

velosipedist avatar velosipedist commented on July 18, 2024

I think, some facade shortcut like PC::table(array | Traversable $data, [array $headers]) will be very handy.

from php-console.

barbushin avatar barbushin commented on July 18, 2024

@velosipedist Good idea, thank you! I think I'll implement it soon.

from php-console.

Chi-teck avatar Chi-teck commented on July 18, 2024

Perhaps we could use signature of native chrome console.table function as ChromePHP extension does.

query-log

from php-console.

LorincJuraj avatar LorincJuraj commented on July 18, 2024

@barbushin Hi. Any progress on this? It would be very handy. I am using console.table() a lot to output Objects/Json when debugging JS. Having option to output PHP arrays (and possibly JSON) as table would be very handy.

from php-console.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.