当前位置: 首页>>代码示例>>PHP>>正文


PHP Arrays::multikey方法代码示例

本文整理汇总了PHP中Arrays::multikey方法的典型用法代码示例。如果您正苦于以下问题:PHP Arrays::multikey方法的具体用法?PHP Arrays::multikey怎么用?PHP Arrays::multikey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Arrays的用法示例。


在下文中一共展示了Arrays::multikey方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: code

 public function code($code = 200)
 {
     $messages = Arrays::multikey($this->config['messages']);
     if (isset($messages[$code])) {
         return $messages[$code];
     }
     return false;
 }
开发者ID:bytemtek,项目名称:znframework,代码行数:8,代码来源:HTTP.php

示例2: set

 public function set($exp = '')
 {
     if (!is_string($exp)) {
         return Error::set('Error', 'stringParameter', 'exp');
     }
     $chars = $this->config['setTimeFormatChars'];
     $chars = Arrays::multikey($chars);
     $setExp = str_ireplace(array_keys($chars), array_values($chars), $exp);
     return strftime($setExp);
 }
开发者ID:bytemtek,项目名称:znframework,代码行数:10,代码来源:Time.php

示例3: set

 public function set($exp = 'H:i:s')
 {
     if (!is_string($exp)) {
         return Error::set('Error', 'stringParameter', 'exp');
     }
     $chars = $this->config['setDateFormatChars'];
     $chars = Arrays::multikey($chars);
     $newClock = str_ireplace(array_keys($chars), array_values($chars), $exp);
     return date($newClock);
 }
开发者ID:bytemtek,项目名称:znframework,代码行数:10,代码来源:Date.php

示例4: _regularConverting

 private function _regularConverting($pattern, $ex = '', $delimiter)
 {
     $specialChars = $this->config['specialChars'];
     $pattern = str_ireplace(array_keys($specialChars), array_values($specialChars), $pattern);
     // Config/Regex.php dosyasından düzenlenmiş karakter
     // listeleri alınıyor.
     $regexChars = Arrays::multikey($this->config['regexChars']);
     $settingChars = Arrays::multikey($this->config['settingChars']);
     // --------------------------------------------------------------------------------------------
     $pattern = str_ireplace(array_keys($regexChars), array_values($regexChars), $pattern);
     if (!empty($ex)) {
         $ex = str_ireplace(array_keys($settingChars), array_values($settingChars), $ex);
     }
     $pattern = $delimiter . trim($pattern, '/') . $delimiter . $ex;
     return $pattern;
 }
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:16,代码来源:Regex.php

示例5: vectorSize

 protected function vectorSize($mode = '', $cipher = '')
 {
     $mode = strtolower($mode);
     $cipher = strtolower($cipher);
     $modes = array('cbc' => 16, 'rc2' => 8, 'ecb' => 0);
     $modes = Arrays::multikey($modes);
     $mode = isset($modes[$mode]) ? $modes[$mode] : 16;
     if (!empty($cipher)) {
         $mode = isset($modes[$cipher]) ? $modes[$cipher] : $mode;
     }
     return mb_substr(hash('sha1', Config::get('Encode', 'projectKey')), 0, $mode);
 }
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:12,代码来源:OpensslDriver.php

示例6: urlWord

 public function urlWord($str = '', $splitWord = '-')
 {
     if (!is_string($str)) {
         return Error::set(lang('Error', 'stringParameter', 'str'));
     }
     if (!is_string($splitWord)) {
         $splitWord = "-";
     }
     $accent = Config::get('ForeignChars', 'accentChars');
     $accent = Arrays::multikey($accent);
     $badChars = Config::get('Security', 'urlBadChars');
     $str = str_replace(array_keys($accent), array_values($accent), $str);
     $str = str_replace($badChars, '', $str);
     $str = preg_replace("/\\s+/", ' ', $str);
     $str = str_replace(" ", '', $str);
     $str = str_replace(' ', $splitWord, trim(strtolower($str)));
     return $str;
 }
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:18,代码来源:Convert.php

示例7: vectorSize

 protected function vectorSize($mode = '', $cipher = '')
 {
     $mode = strtolower($mode);
     $cipher = strtolower($cipher);
     $modes = array('cbc' => 8, 'cast_256|loki97|rijndael_128|saferplus|serpent|twofish' => 16, 'rijndael_192' => 24, 'rijndael_256' => 32);
     $modes = Arrays::multikey($modes);
     $mode = isset($modes[$mode]) ? $modes[$mode] : 8;
     if (!empty($cipher)) {
         $mode = isset($modes[$cipher]) ? $modes[$cipher] : $mode;
     }
     return mb_substr(hash('sha1', Config::get('Encode', 'projectKey')), 0, $mode);
 }
开发者ID:bytemtek,项目名称:znframework,代码行数:12,代码来源:Mcrypt.php

示例8: accent

 public function accent($str = '')
 {
     if (!is_string($str)) {
         return Error::set('Error', 'stringParameter', 'str');
     }
     // Config/ForeignChars.php dosyasından
     // kullanılacak karakter listesini al.
     $accent = Config::get('ForeignChars', 'accentChars');
     $accent = Arrays::multikey($accent);
     return str_replace(array_keys($accent), array_values($accent), $str);
 }
开发者ID:bytemtek,项目名称:znframework,代码行数:11,代码来源:Convert.php


注:本文中的Arrays::multikey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。