FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Time.php
Go to the documentation of this file.
1 <?php
2 
4 
5 class Time extends Date{
6 
7  const DATE = 'date'; //!< Linked date element.
8 
9  public $date = null;
10 
11  public function clientConfig(){
12  return array_merge(parent::clientConfig(),[self::DATE => $this->date]);
13  }
14 
15  public function convert($value){
16  return $this->local->convertTime($value);
17  }
18 
19  public function format($value){
20  return $this->local->formatTime($value);
21  }
22 
23  public function checkFormat($value,$index = null){
24  return preg_match('/^(\\d+|\\d{1,2}:\\d{1,2}:\\d{1,2})$/',$value);
25  }
26 
27 }
Rsi\Fred\Controller\Widget\Time\DATE
const DATE
Linked date element.
Definition: Time.php:7
Rsi\Fred\Controller\Widget\Time\clientConfig
clientConfig()
Public configuration.
Definition: Time.php:11
Rsi\Fred\Controller\Widget\Time\convert
convert($value)
Convert a value from user format to standard, internal format.
Definition: Time.php:15
Rsi\Fred\Controller\Widget\Time\format
format($value)
Format a value from standard, internal format to user format.
Definition: Time.php:19
Rsi\Fred\Controller\Widget\Time
Definition: Time.php:5
Rsi\Fred\Controller\Widget
Definition: Char.php:3
Rsi\Fred\Controller\Widget\Time\checkFormat
checkFormat($value, $index=null)
Definition: Time.php:23
Rsi\Fred\Controller\Widget\Time\$date
$date
Definition: Time.php:9
Rsi\Fred\Controller\Widget\Date
Definition: Date.php:5