CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (GitHub)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • Slack
    • Paid Support
CakePHP

C CakePHP 2.9 API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 2.9
      • 4.2
      • 4.1
      • 4.0
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Packages

  • Cake
    • Cache
      • Engine
    • Configure
    • Console
      • Command
        • Task
    • Controller
      • Component
        • Acl
        • Auth
    • Core
    • Error
    • Event
    • I18n
    • Log
      • Engine
    • Model
      • Behavior
      • Datasource
        • Database
        • Session
      • Validator
    • Network
      • Email
      • Http
    • Routing
      • Filter
      • Route
    • TestSuite
      • Coverage
      • Fixture
      • Reporter
    • Utility
    • View
      • Helper
  • None

Classes

  • BaseShellHelper
  • ConsoleOutputStub
  • ProgressShellHelper
  • TableShellHelper

Class TableShellHelper

Create a visually pleasing ASCII art table from 2 dimensional array data.

BaseShellHelper
Extended by TableShellHelper
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Location: Cake/Console/Helper/TableShellHelper.php

Properties summary

  • $_defaultConfig protected
    array
    Default config for this helper.

Inherited Properties

  • _config, _configInitialized, _consoleOutput

Method Summary

  • _addStyle() protected
    Add style tags
  • _calculateWidths() protected
    Calculate the column widths
  • _render() protected
    Output a row.
  • _rowSeparator() protected
    Output a row separator.
  • output() public
    Output a table.

Method Detail

_addStyle() protected ¶

_addStyle( string $text , string $style )

Add style tags

Parameters
string $text
The text to be surrounded
string $style
The style to be applied
Returns
string

_calculateWidths() protected ¶

_calculateWidths( array $rows )

Calculate the column widths

Parameters
array $rows
The rows on which the columns width will be calculated on.
Returns
array

_render() protected ¶

_render( array $row , array $widths , array $options = array() )

Output a row.

Parameters
array $row
The row to output.
array $widths
The widths of each column to output.
array $options optional array()
Options to be passed.

_rowSeparator() protected ¶

_rowSeparator( array $widths )

Output a row separator.

Parameters
array $widths
The widths of each column to output.

output() public ¶

output( array $rows )

Output a table.

Parameters
array $rows
The data to render out.

Methods inherited from BaseShellHelper

__construct() public ¶

__construct( ConsoleOutput $consoleOutput , array $config = array() )

Constructor.

Parameters
ConsoleOutput $consoleOutput
The ConsoleOutput instance to use.
array $config optional array()
The settings for this helper.

config() public ¶

config( null $config = null )

Initialize config & store config values

Parameters
null $config optional null
Config values to set
Returns
array|

Properties detail

$_defaultConfig ¶

protected array

Default config for this helper.

array(
    'headers' => true,
    'rowSeparator' => false,
    'headerStyle' => 'info',
)
OpenHub
Rackspace
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (GitHub)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • Slack
  • Paid Support

Generated using CakePHP API Docs