StringCase

Introduction #

StringCase is a process to convert string values to various case types such as "upper", "lower", "first-cap", "all-cap".

"upper" means all upper case strings. "lower" means all lower case string. "first-cap" means the first word with its first letter in upper case. "all-cap" means all words with their first letter in upper case.

Example #

<?php
class MyReport extends \koolreport\KoolReport
{
    public function setup()
    {
        ...
        ->pipe(new \koolreport\processes\StringCase(array(
            "upper" => "customerName,productLine",
            "lower" => "productName",
            // "first-cap" => "customerName",
            // "all-cap" => "productName"
        )))
        ...
    }
}

Code explanation:

In the above example, we change "customerName" and "productLine" columns to all upper case, "productName" one to all lower case.

Get started with KoolReport

KoolReport will help you to construct good php data report by gathering your data from multiple sources, transforming them into valuable insights, and finally visualizing them in stunning charts and graphs.