|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
-
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-
- namespace common\helpers;
-
- use yii ;
-
- class Url
- {
- public static function frontend()
- {
- $server_name = Yii::$app->getRequest()->serverName ;
- if($server_name == 'localhost')
- {
- return '../../frontend/web/' ;
- }
- elseif($server_name == 'www.laboiteapain.net' ||
- $server_name == 'boulanger.laboiteapain.net')
- {
- return 'http://www.laboiteapain.net/' ;
- }
- elseif($server_name == 'dev.laboiteapain.net' ||
- $server_name == 'boulanger-dev.laboiteapain.net')
- {
- return 'http://dev.laboiteapain.net/' ;
- }
- }
-
- public static function backend()
- {
- $server_name = Yii::$app->getRequest()->serverName ;
- if($server_name == 'localhost')
- {
- return '../../backend/web/' ;
- }
- elseif($server_name == 'www.laboiteapain.net' ||
- $server_name == 'boulanger.laboiteapain.net')
- {
- return 'http://boulanger.laboiteapain.net/' ;
- }
- elseif($server_name == 'dev.laboiteapain.net' ||
- $server_name == 'boulanger-dev.laboiteapain.net')
- {
- return 'http://boulanger-dev.laboiteapain.net/' ;
- }
- }
- }
|