<commit_before><?php namespace GridView;

use GridView\Columns\Column;

/**
 * Table Class
 * The idea is for this class to easily build a table from an array of arrays,
 * or an array of objects, something akin to what you would get back from a
 * database result set.
 *
 * @author <NAME> <<EMAIL>>
 */
class Table implements \ArrayAccess {

    /**
     * @const SORT_DIRECTION_ASC ASC
     */
    const SORT_DIRECTION_ASC  = 'ASC';

    /**
     * @const SORT_DIRECTION_DESC DESC
     */
    const SORT_DIRECTION_DESC = 'DESC';

    /**
     * the css id for the table
     *
     * @var string
     */
    public $id            = 'GridViewTable';

    /**
     * the data source the table will be using to build the table
     *
     * @var array
     */
    public $dataSource    = array();

    /**
     * the internal array of \GridView\Columns added to the table
     *
     * @var array
     */
    protected $columns    = array();

    /**
     * css classes used on the main table when rendered
     *
     * @var string
     */
    public $tableCss      = 'table table-bordered table-striped';

    /**
     * css added to each row in the table
     *
     * @var string
     */
    public $tableRowCss   = null;

    /**
     * url used when created the sort link in javascript
     *
     * @var string
     */
    public $sortUrl       = null;

    /**
     * which way to sort the records that is sent back to server
     *
     * @var string
     */
    public $sortDirection = 'ASC';

    /**
     * Collection of headers taken from the added columns
     *
     * @var array
     */
    protected $headers    = array();

    /**
     * Collection of footers taken from the added columns
     *
     * @var string
     */
    protected $footers    = array();

    /**
     * message to display when the $dataSource is empty
     *
     * @var string
     */
    public $noResultsText = '<p><span class="text-warning">No results.</span></p>';

    /**
     * javascript that will be included at end of table
     *
     * @var string
     */
    public $javascript    = '';

    /**
     * If true, will use the generated jQuery based javascripts for table functionality
     * like sorting and items per page
     *
     * @var boolean
     */
    public $useJqueryJavascripts = true;

    /**
     * number of items to render per page. the table does not limit the amount
     * of items to display, but rather will pass this value back to server via
     * url using the $itemsPerPageIdentifier. This array is used to build a drop
     * down list of options
     *
     * @var array
     */
    public $itemsPerPage  = array(10, 20, 50, 100);

    /**
     * the identifier used for building the drop down list of $itemsPerPag
     *
     * @var string
     */
    public $itemsPerPageIdentifier = 'limit';

    /**
     * turn on/off the display of $itemsPerPage drop down list
     *
     * @var boolean
     */
    public $showItemsPerPageHeader = false;

    /**
     * Collection of buttons added via the addEditButton(), addViewButton, and
     * addDeleteButton() methods. Those convenience methods bypass normal column
     * creation, and this groups them all together into the same column, which is
     * usually what you want for the table
     *
     * @var array
     */
    protected $buttons = array();

    /**
     * if set to true, the filters row in the header will be turned off.
     *
     * @var boolean
     */
    public $noFilters       = false;

    /**
     * @var bool
     */
    public $useColumnFilters = false;

    /**
     * use the modal filter by default. the column headers are freaking annoying as fuck.
     * @var bool
     */
    public $useModalFilters = true;

    /**<commit_msg>made buttons var public, cause why the hell not<commit_after><?php namespace GridView;

use GridView\Columns\Column;

/**
 * Table Class
 * The idea is for this class to easily build a table from an array of arrays,
 * or an array of objects, something akin to what you would get back from a
 * database result set.
 *
 * @author <NAME> <<EMAIL>>
 */
class Table implements \ArrayAccess {

    /**
     * @const SORT_DIRECTION_ASC ASC
     */
    const SORT_DIRECTION_ASC  = 'ASC';

    /**
     * @const SORT_DIRECTION_DESC DESC
     */
    const SORT_DIRECTION_DESC = 'DESC';

    /**
     * the css id for the table
     *
     * @var string
     */
    public $id            = 'GridViewTable';

    /**
     * the data source the table will be using to build the table
     *
     * @var array
     */
    public $dataSource    = array();

    /**
     * the internal array of \GridView\Columns added to the table
     *
     * @var array
     */
    protected $columns    = array();

    /**
     * css classes used on the main table when rendered
     *
     * @var string
     */
    public $tableCss      = 'table table-bordered table-striped';

    /**
     * css added to each row in the table
     *
     * @var string
     */
    public $tableRowCss   = null;

    /**
     * url used when created the sort link in javascript
     *
     * @var string
     */
    public $sortUrl       = null;

    /**
     * which way to sort the records that is sent back to server
     *
     * @var string
     */
    public $sortDirection = 'ASC';

    /**
     * Collection of headers taken from the added columns
     *
     * @var array
     */
    protected $headers    = array();

    /**
     * Collection of footers taken from the added columns
     *
     * @var string
     */
    protected $footers    = array();

    /**
     * message to display when the $dataSource is empty
     *
     * @var string
     */
    public $noResultsText = '<p><span class="text-warning">No results.</span></p>';

    /**
     * javascript that will be included at end of table
     *
     * @var string
     */
    public $javascript    = '';

    /**
     * If true, will use the generated jQuery based javascripts for table functionality
     * like sorting and items per page
     *
     * @var boolean
     */
    public $useJqueryJavascripts = true;

    /**
     * number of items to render per page. the table does not limit the amount
     * of items to display, but rather will pass this value back to server via
     * url using the $itemsPerPageIdentifier. This array is used to build a drop
     * down list of options
     *
     * @var array
     */
    public $itemsPerPage  = array(10, 20, 50, 100);

    /**
     * the identifier used for building the drop down list of $itemsPerPag
     *
     * @var string
     */
    public $itemsPerPageIdentifier = 'limit';

    /**
     * turn on/off the display of $itemsPerPage drop down list
     *
     * @var boolean
     */
    public $showItemsPerPageHeader = false;

    /**
     * Collection of buttons added via the addEditButton(), addViewButton, and
     * addDeleteButton() methods. Those convenience methods bypass normal column
     * creation, and this groups them all together into the same column, which is
     * usually what you want for the table
     *
     * @var array
     */
    public $buttons = array();

    /**
     * if set to true, the filters row in the header will be turned off.
     *
     * @var boolean
     */
    public $noFilters       = false;

    /**
     * @var bool
     */
    public $useColumnFilters = false;

    /**
     * use the modal filter by default. the column headers are freaking annoying as fuck.
     * @var bool
     */
    public $useModalFilters = true;

    /**
{'fraction_non_alphanumeric': 0.09501661129568106, 'fraction_numerical': 0.0023920265780730896, 'mean_word_length': 1.938695821944553, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2711497', 'n_tokens_mistral': 2164, 'n_tokens_neox': 2095, 'n_words': 820}