class \mpf\base\Helper

class \mpf\base\Helper

Extends any helper classes.

It contains a single method that returns the latest instance of the called classed with the specified config options.

Example:

class MyHelper extends Helper{
   protected $format = 'Y-m-d H:i:s'; // can be changed from global config or class config when called;
   public function getFormatedDate($time = null){
       return date($this->format, $time?:time());
   }
}

echo "Current Time is : " . MyHelper::get()->getFormatedDate();
// or with custom format:

echo "Current Time is: " . MyHelper::get(['format'=>'Ymd H:i:s'])->getFormatedDate();

Attributes
private static array $_instances = {"88feb0f97c81fbfdfabb90a3bac64027":{"showActions":true,"showProgressBar":false,"timeTextSeparator":" ","translator":"\\mpf\\translators\\ArrayFile","screen":{"columns":"267","rows":"79"}}}

-no description found-

Methods

public static \mpf\base\Helper get (array $config = [])

  • $config

    -no description found-

Return a instance for helper.