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 | |
$routes = []; | |
if ($_SERVER['ENV'] === 'production') { | |
$options = ['hostname' => 'connect.mysite.com', 'secure' => true]; | |
} else { | |
$options = ['hostname' => 'connect.localhost.com']; | |
} |
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
------------------------------------------------------------------------------ | |
To be added (Zend\I18n namespace): | |
View helpers: | |
- DateFormat <DASPRiD> | |
- NumberFormat <cgmartin> | |
- Currency <cgmartin> | |
------------------------------------------------------------------------------ | |
Convert to work with DateTime, Intl extension and/or Zend\I18n\Translator: |
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
$locale = $this->locale; | |
$fmt = new NumberFormatter($locale, NumberFormatter::DECIMAL); | |
if (intl_is_failure($fmt->getErrorCode())) { | |
throw new Exception\InvalidArgumentException("Invalid locale string given"); | |
} | |
$parsedFloat = $fmt->parse($value, NumberFormatter::TYPE_DOUBLE, $position); | |
if (intl_is_failure($fmt->getErrorCode()) || $position < strlen($value)) { | |
$this->error(self::NOT_FLOAT); | |
return false; |