Formatter::__construct PHP Méthode

__construct() public méthode

Create a formatter.
public __construct ( object $format ) : void
$format object String format to log a message
Résultat void
    public function __construct($format)
    {
        $this->_format = $format;
    }

Usage Example

Exemple #1
0
 /**
  * PhpGetBrowser constructor.
  *
  * @param bool $returnArray
  */
 public function __construct(bool $returnArray = false)
 {
     $options = self::KEY_LOWER | self::VALUE_BOOLEAN_TO_STRING | self::VALUE_REG_EXP_LOWER;
     if ($returnArray) {
         $options |= self::RETURN_ARRAY;
     } else {
         $options |= self::RETURN_OBJECT;
     }
     parent::__construct($options);
 }