Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/easyapprepo/yii-apputil
Some useful and necessary utilities for Yii applications
https://github.com/easyapprepo/yii-apputil
yii yii-extension
Last synced: 2 months ago
JSON representation
Some useful and necessary utilities for Yii applications
- Host: GitHub
- URL: https://github.com/easyapprepo/yii-apputil
- Owner: easyapprepo
- Created: 2017-02-11T10:01:50.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-01-31T09:22:29.000Z (almost 5 years ago)
- Last Synced: 2024-07-30T21:07:35.662Z (5 months ago)
- Topics: yii, yii-extension
- Language: PHP
- Size: 10.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yii-apputil
Some useful and necessary utilities for Yii applications
Enjoy :D
## Installation
* Navigate to /protected folder of you yii 1.x application and require the package
```shell
$ cd YiiAppPath/protected
$ composer require easyapprepo/yii-apputil:"dev-master"
```
* Now, on your application configuration (eg: protected/config/main.php) add the following code to the components section
```PHP
'components'=>array(
...
'apputil' => array(
'class' => 'application.vendor.easyapprepo.yii-apputil.AppUtility',
),
```
* then, you can use it like this
```PHP
$persianNumber = Yii::app()->apputil->str->EN2PN('123456');
print $persianNumber; // ۱۲۳۴۵۶
```
## Methodes
###String Methodes
```PHP
Yii::app()->apputil->str->EN2PN('123456');
//۱۲۳۴۵۶Yii::app()->apputil->str->PN2EN('۱۲۳۴۵۶');
//123456Yii::app()->apputil->str->fixPersianString('ولي');
//ولی```