Skip to content

Commit

Permalink
wop
Browse files Browse the repository at this point in the history
  • Loading branch information
salarmehr committed Jan 29, 2020
1 parent 893df7f commit e519ead
Show file tree
Hide file tree
Showing 8 changed files with 249 additions and 159 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"autoload": {
"psr-4": {
"Salarmehr\\": "src/"
"Salarmehr\\Cosmopolitan\\": "src/"
},
"files": [
"src/helper.php"
Expand Down
6 changes: 6 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,9 @@ Localising some values for: فارسی (ایران)
Licence
=======
MIT

Links
=====
- [Locale Explorer](http://demo.icu-project.org/icu-bin/locexp)
- [ICU Data](https://github.com/unicode-org/icu/tree/release-65-1/icu4c/source/data)
- [ICU data tables by Alexander Makarov](https://intl.rmcreative.ru/)
20 changes: 20 additions & 0 deletions src/Bundle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
/**
* Created by Reza Salarmehr.
*/

declare(strict_types=1);

namespace Salarmehr\Cosmopolitan;

class Bundle extends \ResourceBundle
{
public function get($index, $fallback = null)
{
$output = parent::get($index, $fallback);
if (intl_is_failure(self::getErrorCode())) {
throw new Exception(parent::getErrorMessage());
}
return $output;
}
}
147 changes: 0 additions & 147 deletions src/Cosmopolitan.php

This file was deleted.

12 changes: 12 additions & 0 deletions src/Exception.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/**
* Created by Reza Salarmehr.
*/

declare(strict_types=1);

namespace Salarmehr\Cosmopolitan;

class Exception extends \Exception
{
}
Loading

0 comments on commit e519ead

Please sign in to comment.