當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Y::sklonyator方法代碼示例

本文整理匯總了PHP中Y::sklonyator方法的典型用法代碼示例。如果您正苦於以下問題:PHP Y::sklonyator方法的具體用法?PHP Y::sklonyator怎麽用?PHP Y::sklonyator使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Y的用法示例。


在下文中一共展示了Y::sklonyator方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: actionRequestForm

 public function actionRequestForm($id, $type, $holes)
 {
     if ($id) {
         $gibdd = GibddHeads::model()->findByPk((int) $id);
         $holemodel = Holes::model()->findAllByPk(explode(',', $holes));
         $gibddModel = new GibddRuForm();
         $usermodel = Yii::app()->user->userModel;
         $model = new HoleRequestForm();
         $model->sendToGibddru = 1;
         $model->to = $gibdd ? $gibdd->post_dative . ' ' . $gibdd->fio_dative : '';
         $model->signature = $usermodel->relProfile->request_signature ? $usermodel->relProfile->request_signature : $usermodel->last_name . ' ' . substr($usermodel->name, 0, 2) . ($usermodel->name ? '.' : '') . ' ' . substr($usermodel->second_name, 0, 2) . ($usermodel->second_name ? '.' : '');
         $model->postaddress = $usermodel->relProfile->request_address ? $usermodel->relProfile->request_address : '';
         if ($type == 'gibdd') {
             if (count($holemodel) > 1) {
                 $model->holes = CHtml::listData($holemodel, 'ID', 'ID');
             } elseif (count($holemodel) == 1) {
                 $model->address = CHtml::encode($holemodel[0]->ADDRESS);
             }
             $gibddModel = $model->getResult($holemodel[0]);
             if ($gibddModel) {
                 $model->from = Y::sklonyator($gibddModel->f_fam, 2) . ' ' . Y::sklonyator($gibddModel->f_name, 2) . ' ' . Y::sklonyator($gibddModel->f_coname, 2);
                 $model->signature = $gibddModel->f_fam . ' ' . substr($gibddModel->f_name, 0, 2) . ($gibddModel->f_name ? '.' : '') . ' ' . substr($gibddModel->f_coname, 0, 2) . ($gibddModel->f_coname ? '.' : '');
                 $model->postaddress = ($gibddModel->f_ind ? $gibddModel->f_ind . ', ' : '') . ($gibddModel->f_reg ? $gibddModel->f_reg . ', ' : '') . ($gibddModel->f_npunkt ? $gibddModel->f_npunkt . ', ' : '') . $gibddModel->f_addr;
             }
             if (count($holemodel) > 1) {
                 $model->address = CHtml::encode(implode('; ', CHtml::listData($holemodel, 'ID', 'ADDRESS')));
                 $this->renderPartial('_form_gibdd_manyholes', array('model' => $model, 'holes' => $holemodel, 'gibdd' => $gibdd, 'gibddModel' => $gibddModel, 'error' => ''));
             } elseif (count($holemodel) == 1) {
                 $this->renderPartial('_form_gibdd', array('model' => $model, 'hole' => $holemodel[0], 'gibdd' => $gibdd, 'gibddModel' => $gibddModel, 'error' => ''));
             }
         }
     }
 }
開發者ID:ASDAFF,項目名稱:RosYama.2,代碼行數:33,代碼來源:HolesController.php

示例2: setAttribsFromGibddForm

 public function setAttribsFromGibddForm($gibddModel)
 {
     $this->from = Y::sklonyator($gibddModel->f_fam, 2) . ' ' . Y::sklonyator($gibddModel->f_name, 2) . ' ' . Y::sklonyator($gibddModel->f_coname, 2);
     $this->signature = $gibddModel->f_fam . ' ' . substr($gibddModel->f_name, 0, 2) . ($gibddModel->f_name ? '.' : '') . ' ' . substr($gibddModel->f_coname, 0, 2) . ($gibddModel->f_coname ? '.' : '');
     $this->postaddress = ($gibddModel->f_ind ? $gibddModel->f_ind . ', ' : '') . ($gibddModel->f_reg ? $gibddModel->f_reg . ', ' : '') . ($gibddModel->f_npunkt ? $gibddModel->f_npunkt . ', ' : '') . $gibddModel->f_addr;
 }
開發者ID:ASDAFF,項目名稱:RosYama.2,代碼行數:6,代碼來源:HoleRequestForm.php

示例3: sklonyator

 public function sklonyator($str)
 {
     return Y::sklonyator($str);
 }
開發者ID:ASDAFF,項目名稱:RosYama.2,代碼行數:4,代碼來源:SpravController.php


注:本文中的Y::sklonyator方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。