Fakoli Framework
BooleanTypeRenderer Class Reference
+ Inheritance diagram for BooleanTypeRenderer:
+ Collaboration diagram for BooleanTypeRenderer:

Public Member Functions

 BooleanTypeRenderer ()
 
- Public Member Functions inherited from AbstractTypeRenderer
 AbstractTypeRenderer ()
 

Static Public Member Functions

static format ($value, $template="")
 
- Static Public Member Functions inherited from AbstractTypeRenderer
static format ($value, $template="")
 
static translationDateTemplate ($template, $includeTime=true)
 

Detailed Description

Definition at line 38 of file boolean_type_renderer.inc.

Member Function Documentation

◆ BooleanTypeRenderer()

BooleanTypeRenderer::BooleanTypeRenderer ( )

Definition at line 40 of file boolean_type_renderer.inc.

41  {
42  }

◆ format()

static BooleanTypeRenderer::format (   $value,
  $template = "" 
)
static

Definition at line 53 of file boolean_type_renderer.inc.

54  {
55  trace("BooleanTypeRenderer template is $template and value is $value", 5);
56 
57  $text = null;
58 
59  if($template)
60  {
61  list($true, $false) = explode("/", $template);
62  if($true !== '' && $false !== '')
63  $text = ($value) ? $true : $false;
64  }
65 
66  if($text === null)
67  $text = ($value) ? "True" : "False";
68 
69  return $text;
70  }
trace($msg, $lvl, $callStack=null)
Send output to the trace log.
Definition: functions.inc:959

The documentation for this class was generated from the following file: