Inspired with www.apple.com/ipad/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* PHP `strftime()` format to `IntlDateFormatter()` pattern converter. | |
* | |
* PHP `strftime()` is deprecated since v 8.1. They recommended to use `IntlDateFormatter()` instead. | |
* However `IntlDateFormatter()` pattern does not fully supported all format that `strftime()` does. | |
* | |
* Run this file to get the result of most close pattern to `strftime()` based on Thai locale. | |
* | |
* @license MIT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Turn all URLs in clickable links. | |
* | |
* @param string $value | |
* @param array $protocols http/https, ftp, mail, twitter | |
* @param array $attributes | |
* @return string | |
*/ | |
public function linkify($value, $protocols = array('http', 'mail'), array $attributes = array()) |