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


PHP Inflector::upper方法代碼示例

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


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

示例1: write

 public function write($str, $type = null)
 {
     $type = is_null($type) ? 'INFO' : $type;
     $type = Inflector::upper($type);
     $data = date('Y-m-d H:i:s') . ":{$type}:{$str}";
     File::append($this->file, $data . "\n");
 }
開發者ID:schpill,項目名稱:standalone,代碼行數:7,代碼來源:log.php

示例2: __callStatic

 public static function __callStatic($method, $args)
 {
     $auth = ['GET', 'POST', 'COOKIE', 'SESSION', 'SERVER', 'REQUEST', 'GLOBALS'];
     $method = Inflector::upper($method);
     if (Arrays::in($method, $auth) && count($args) > 0) {
         $default = isset($args[1]) ? $args[1] : null;
         return isAke(self::tab($method), Arrays::first($args), $default);
     } elseif (Arrays::in($method, $auth) && count($args) == 0) {
         return self::tab($method);
     } else {
         throw new Exception("Wrong parameters.");
     }
 }
開發者ID:schpill,項目名稱:thin,代碼行數:13,代碼來源:Input.php

示例3: ccode

 public static function ccode($code, $reverse = false)
 {
     $array = array('AF' => 'Afghanistan', 'AX' => 'Aland Islands', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'American Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AI' => 'Anguilla', 'AQ' => 'Antarctica', 'AG' => 'Antigua And Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaijan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BJ' => 'Benin', 'BM' => 'Bermuda', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia And Herzegovina', 'BW' => 'Botswana', 'BV' => 'Bouvet Island', 'BR' => 'Brazil', 'IO' => 'British Indian Ocean Territory', 'BN' => 'Brunei Darussalam', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'KH' => 'Cambodia', 'CM' => 'Cameroon', 'CA' => 'Canada', 'CV' => 'Cape Verde', 'KY' => 'Cayman Islands', 'CF' => 'Central African Republic', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CX' => 'Christmas Island', 'CC' => 'Cocos (Keeling) Islands', 'CO' => 'Colombia', 'KM' => 'Comoros', 'CG' => 'Congo', 'CD' => 'Congo, Democratic Republic', 'CK' => 'Cook Islands', 'CR' => 'Costa Rica', 'CI' => 'Cote D\'Ivoire', 'HR' => 'Croatia', 'CU' => 'Cuba', 'CY' => 'Cyprus', 'CZ' => 'Czech Republic', 'DK' => 'Denmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'EC' => 'Ecuador', 'EG' => 'Egypt', 'SV' => 'El Salvador', 'GQ' => 'Equatorial Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Ethiopia', 'FK' => 'Falkland Islands (Malvinas)', 'FO' => 'Faroe Islands', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'France', 'GF' => 'French Guiana', 'PF' => 'French Polynesia', 'TF' => 'French Southern Territories', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Germany', 'GH' => 'Ghana', 'GI' => 'Gibraltar', 'GR' => 'Greece', 'GL' => 'Greenland', 'GD' => 'Grenada', 'GP' => 'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GG' => 'Guernsey', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HM' => 'Heard Island & Mcdonald Islands', 'VA' => 'Holy See (Vatican City State)', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungary', 'IS' => 'Iceland', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Iran, Islamic Republic Of', 'IQ' => 'Iraq', 'IE' => 'Ireland', 'IM' => 'Isle Of Man', 'IL' => 'Israel', 'IT' => 'Italy', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JE' => 'Jersey', 'JO' => 'Jordan', 'KZ' => 'Kazakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KR' => 'Korea', 'KW' => 'Kuwait', 'KG' => 'Kyrgyzstan', 'LA' => 'Lao People\'s Democratic Republic', 'LV' => 'Latvia', 'LB' => 'Lebanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libyan Arab Jamahiriya', 'LI' => 'Liechtenstein', 'LT' => 'Lithuania', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Macedonia', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldives', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshall Islands', 'MQ' => 'Martinique', 'MR' => 'Mauritania', 'MU' => 'Mauritius', 'YT' => 'Mayotte', 'MX' => 'Mexico', 'FM' => 'Micronesia, Federated States Of', 'MD' => 'Moldova', 'MC' => 'Monaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MS' => 'Montserrat', 'MA' => 'Morocco', 'MZ' => 'Mozambique', 'MM' => 'Myanmar', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Netherlands', 'AN' => 'Netherlands Antilles', 'NC' => 'New Caledonia', 'NZ' => 'New Zealand', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'NU' => 'Niue', 'NF' => 'Norfolk Island', 'MP' => 'Northern Mariana Islands', 'NO' => 'Norway', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestinian Territory, Occupied', 'PA' => 'Panama', 'PG' => 'Papua New Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Philippines', 'PN' => 'Pitcairn', 'PL' => 'Poland', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'RE' => 'Reunion', 'RO' => 'Romania', 'RU' => 'Russian Federation', 'RW' => 'Rwanda', 'BL' => 'Saint Barthelemy', 'SH' => 'Saint Helena', 'KN' => 'Saint Kitts And Nevis', 'LC' => 'Saint Lucia', 'MF' => 'Saint Martin', 'PM' => 'Saint Pierre And Miquelon', 'VC' => 'Saint Vincent And Grenadines', 'WS' => 'Samoa', 'SM' => 'San Marino', 'ST' => 'Sao Tome And Principe', 'SA' => 'Saudi Arabia', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakia', 'SI' => 'Slovenia', 'SB' => 'Solomon Islands', 'SO' => 'Somalia', 'ZA' => 'South Africa', 'GS' => 'South Georgia And Sandwich Isl.', 'ES' => 'Spain', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SJ' => 'Svalbard And Jan Mayen', 'SZ' => 'Swaziland', 'SE' => 'Sweden', 'CH' => 'Switzerland', 'SY' => 'Syrian Arab Republic', 'TW' => 'Taiwan', 'TJ' => 'Tajikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TK' => 'Tokelau', 'TO' => 'Tonga', 'TT' => 'Trinidad And Tobago', 'TN' => 'Tunisia', 'TR' => 'Turkey', 'TM' => 'Turkmenistan', 'TC' => 'Turks And Caicos Islands', 'TV' => 'Tuvalu', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'United Arab Emirates', 'GB' => 'United Kingdom', 'US' => 'United States', 'UM' => 'United States Outlying Islands', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VE' => 'Venezuela', 'VN' => 'Viet Nam', 'VG' => 'Virgin Islands, British', 'VI' => 'Virgin Islands, U.S.', 'WF' => 'Wallis And Futuna', 'EH' => 'Western Sahara', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe');
     if ($reverse) {
         $array = array_flip($array);
         if (isset($array[$code])) {
             return $array[$code];
         }
     }
     $code = Inflector::upper($code);
     if (isset($array[$code])) {
         return $array[$code];
     }
 }
開發者ID:schpill,項目名稱:standalone,代碼行數:14,代碼來源:shortcode.php

示例4: open

 public static function open($action = null, $method = 'POST', $attributes = array(), $https = null, $upload = false)
 {
     $method = Inflector::upper($method);
     if (!Arrays::exists('id', $attributes)) {
         $attributes['id'] = md5(static::action($action, $https));
     }
     $attributes['method'] = static::method($method);
     $attributes['action'] = static::action($action, $https);
     if (true === $upload) {
         $attributes['enctype'] = 'multipart/form-data';
     }
     if (!Arrays::exists('accept-charset', $attributes)) {
         $attributes['accept-charset'] = 'utf-8';
     }
     $append = '';
     if ($method == 'PUT' || $method == 'DELETE') {
         $append = static::hidden(static::spoofer, $method);
     }
     return '<form' . Html::attributes($attributes) . '>' . $append;
 }
開發者ID:noikiy,項目名稱:inovi,代碼行數:20,代碼來源:Form.php

示例5: urlsite

 public function urlsite($echo = true)
 {
     if (null === static::$urlsite) {
         $protocol = 'http';
         if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {
             $protocol = 'https';
         }
         container()->setProtocol($protocol);
         $urlSite = "{$protocol}://" . $_SERVER["SERVER_NAME"] . "/";
         if (strstr($urlSite, '//')) {
             $urlSite = repl('//', '/', $urlSite);
             $urlSite = repl($protocol . ':/', $protocol . '://', $urlSite);
         }
         if (Inflector::upper(substr(PHP_OS, 0, 3)) === 'WIN') {
             $tab = explode('\\', $urlSite);
             $r = '';
             foreach ($tab as $c => $v) {
                 $r .= $v;
             }
             $r = repl('//', '/', $r);
             $r = repl($protocol . ':/', $protocol . '://', $r);
             $urlSite = $r;
         }
         static::$urlsite = $urlSite;
     }
     if (false === $echo) {
         return static::$urlsite;
     } else {
         echo static::$urlsite;
         return;
     }
 }
開發者ID:noikiy,項目名稱:inovi,代碼行數:32,代碼來源:View.php

示例6: setlocale

setlocale(LC_ALL, Config::get('application.lc.all', 'fr_FR.UTF-8'));
require_once __DIR__ . DS . 'helpers/functions.php';
require_once __DIR__ . DS . 'helpers.php';
require_once __DIR__ . DS . 'facades.php';
if (Arrays::exists('SERVER_NAME', $_SERVER)) {
    $protocol = 'http';
    if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {
        $protocol .= 's';
    }
    container()->setProtocol($protocol);
    $urlSite = "{$protocol}://" . $_SERVER["SERVER_NAME"] . "/";
    if (strstr($urlSite, '//')) {
        $urlSite = str_replace('//', '/', $urlSite);
        $urlSite = str_replace($protocol . ':/', $protocol . '://', $urlSite);
    }
    if (Inflector::upper(substr(PHP_OS, 0, 3)) === 'WIN') {
        $tab = explode('\\', $urlSite);
        $r = '';
        foreach ($tab as $c => $v) {
            $r .= $v;
        }
        $r = str_replace('//', '/', $r);
        $r = str_replace($protocol . ':/', $protocol . '://', $r);
        $urlSite = $r;
    }
    $base_uri = substr(str_replace('public/index.php', '', $_SERVER['SCRIPT_NAME']), 1);
    if (substr($_SERVER['REQUEST_URI'], 0, strlen($base_uri) + 1) != '/' . $base_uri) {
        $base_uri = '';
    }
    Config::set('application.base_uri', $base_uri);
    $application = Config::get('application');
開發者ID:schpill,項目名稱:standalone,代碼行數:31,代碼來源:context.php

示例7: query


//.........這裏部分代碼省略.........
                 $continue = true;
                 if (null !== $object->{$field}) {
                     $continue = static::analyze($object->{$field}, $op, $value);
                 } else {
                     $continue = false;
                 }
                 if (true === $continue) {
                     array_push($resultsAnd, $object);
                 }
             }
         }
         $results = array_intersect($results, $resultsAnd);
     }
     if (count($conditionsOr)) {
         foreach ($conditionsOr as $condition) {
             foreach ($datas as $tmpObject) {
                 $object = static::getObject($tmpObject);
                 $condition = repl('NOT LIKE', 'NOTLIKE', $condition);
                 $condition = repl('NOT IN', 'NOTIN', $condition);
                 list($field, $op, $value) = explode(' ', $condition, 3);
                 $continue = true;
                 if (null !== $object->{$field}) {
                     $continue = static::analyze($object->{$field}, $op, $value);
                 } else {
                     $continue = false;
                 }
                 if (true === $continue) {
                     array_push($resultsOr, $object);
                 }
             }
         }
         $results = array_merge($results, $resultsOr);
     }
     if (count($conditionsXor)) {
         foreach ($conditionsXor as $condition) {
             foreach ($datas as $tmpObject) {
                 $object = static::getObject($tmpObject);
                 $condition = repl('NOT LIKE', 'NOTLIKE', $condition);
                 $condition = repl('NOT IN', 'NOTIN', $condition);
                 list($field, $op, $value) = explode(' ', $condition, 3);
                 $continue = true;
                 if (null !== $object->{$field}) {
                     $continue = static::analyze($object->{$field}, $op, $value);
                 } else {
                     $continue = false;
                 }
                 if (true === $continue) {
                     array_push($resultsXor, $object);
                 }
             }
         }
         $results = array_merge(array_diff($results, $resultsXor), array_diff($resultsXor, $results));
     }
     if (count($results)) {
         if (0 < $limit) {
             $max = count($results);
             $number = $limit - $offset;
             if ($number > $max) {
                 $offset = $max - $limit;
                 if (0 > $offset) {
                     $offset = 0;
                 }
                 $limit = $max;
             }
             $results = array_slice($results, $offset, $limit);
         }
     }
     if (count($results) && null !== $orderField) {
         $sort = array();
         foreach ($results as $object) {
             $tab = (array) $object;
             foreach ($tab as $key => $value) {
                 $sort[$key][] = $value;
             }
         }
         $asort = array();
         foreach ($sort as $key => $rows) {
             for ($i = 0; $i < count($rows); $i++) {
                 if (!is_array(${$key})) {
                     ${$key} = array();
                 }
                 $asort[$i][$key] = $rows[$i];
                 array_push(${$key}, $rows[$i]);
             }
         }
         if ('ASC' == Inflector::upper($order)) {
             array_multisort(${$orderField}, SORT_ASC, $asort);
         } else {
             array_multisort(${$orderField}, SORT_DESC, $asort);
         }
         $collection = array();
         foreach ($asort as $key => $row) {
             $tmpId = $row['id'];
             $tmpObject = static::getById($type, $tmpId);
             array_push($collection, static::getObject($tmpObject));
         }
         $results = $collection;
     }
     return $results;
 }
開發者ID:schpill,項目名稱:thin,代碼行數:101,代碼來源:Admin.php

示例8: makeVoucher

 public function makeVoucher()
 {
     return 'R' . Inflector::upper(Inflector::random(9));
 }
開發者ID:schpill,項目名稱:standalone,代碼行數:4,代碼來源:resto.php

示例9: format

 protected static function format($type, $message)
 {
     return date('Y-m-d H:i:s') . ' ' . Inflector::upper($type) . " - {$message}" . PHP_EOL;
 }
開發者ID:schpill,項目名稱:thin,代碼行數:4,代碼來源:Log.php

示例10: describe

 public function describe()
 {
     $desc = array();
     $q = 'DESCRIBE ' . $this->_dbName . '.' . $this->_tableName;
     $res = $this->_query($q);
     if (is_array($res)) {
         $count = count($res);
     } else {
         $count = $res->rowCount();
     }
     if (0 < $count) {
         $field = 0;
         $type = 1;
         $null = 2;
         $key = 3;
         $default = 4;
         $extra = 5;
         $i = 1;
         $p = 1;
         foreach ($res as $row) {
             list($length, $scale, $precision, $unsigned, $primary, $index, $primaryPosition, $identity) = array(null, null, null, null, false, false, null, false);
             if (preg_match('/unsigned/', $row[$type])) {
                 $unsigned = true;
             }
             if (preg_match('/^((?:var)?char)\\((\\d+)\\)/', $row[$type], $matches)) {
                 $row[$type] = $matches[1];
                 $length = $matches[2];
             } else {
                 if (preg_match('/^decimal\\((\\d+),(\\d+)\\)/', $row[$type], $matches)) {
                     $row[$type] = 'decimal';
                     $precision = $matches[1];
                     $scale = $matches[2];
                 } else {
                     if (preg_match('/^float\\((\\d+),(\\d+)\\)/', $row[$type], $matches)) {
                         $row[$type] = 'float';
                         $precision = $matches[1];
                         $scale = $matches[2];
                     } else {
                         if (preg_match('/^((?:big|medium|small|tiny)?int)\\((\\d+)\\)/', $row[$type], $matches)) {
                             $row[$type] = $matches[1];
                             // The optional argument of a MySQL int type is not precision
                             // or length; it is only a hint for display width.
                         }
                     }
                 }
             }
             if (strlen($row[$key])) {
                 if (Inflector::upper($row[$key]) == 'PRI') {
                     $primary = true;
                     $primaryPosition = $p;
                     if ($row[$extra] == 'auto_increment') {
                         $identity = true;
                         $index = true;
                     } else {
                         $identity = false;
                     }
                     ++$p;
                 } else {
                     $index = true;
                 }
             }
             $desc[$this->foldCase($row[$field])] = array('ENTITY_NAME' => $this->foldCase($this->_dbName), 'TABLE_NAME' => $this->foldCase($this->_tableName), 'COLUMN_NAME' => $this->foldCase($row[$field]), 'COLUMN_POSITION' => $i, 'DATA_TYPE' => $row[$type], 'DEFAULT' => $row[$default], 'NULLABLE' => (bool) ($row[$null] == 'YES'), 'LENGTH' => $length, 'SCALE' => $scale, 'PRECISION' => $precision, 'UNSIGNED' => $unsigned, 'PRIMARY' => $primary, 'PRIMARY_POSITION' => $primaryPosition, 'INDEX' => $index, 'IDENTITY' => $identity);
             ++$i;
         }
     }
     return $desc;
 }
開發者ID:schpill,項目名稱:thin,代碼行數:67,代碼來源:Orm.php

示例11: command

 /**
  * Build the Redis command based from a given method and parameters.
  *
  * Redis protocol states that a command should conform to the following format:
  *
  *     *<number of arguments> CR LF
  *     $<number of bytes of argument 1> CR LF
  *     <argument data> CR LF
  *     ...
  *     $<number of bytes of argument N> CR LF
  *     <argument data> CR LF
  *
  * More information regarding the Redis protocol: http://redis.io/topics/protocol
  *
  * @param  string  $method
  * @param  array   $parameters
  * @return string
  */
 protected function command($method, $parameters)
 {
     $command = '*' . (count($parameters) + 1) . "\n";
     $command .= '$' . strlen($method) . "\n";
     $command .= Inflector::upper($method) . "\n";
     foreach ($parameters as $parameter) {
         $command .= '$' . strlen($parameter) . "\n" . $parameter . "\n";
     }
     return $command;
 }
開發者ID:schpill,項目名稱:thin,代碼行數:28,代碼來源:Redisraw.php

示例12: server

 /**
  * Get an item from the $_SERVER array.
  *
  * @param  string  $key
  * @param  mixed   $default
  * @return string
  */
 public static function server($key = null, $default = null)
 {
     return arrayGet(static::foundation()->server->all(), Inflector::upper($key), $default);
 }
開發者ID:schpill,項目名稱:thin,代碼行數:11,代碼來源:Request.php

示例13: getVoucherCode

 public function getVoucherCode()
 {
     return Inflector::upper(Inflector::random(9));
 }
開發者ID:schpill,項目名稱:standalone,代碼行數:4,代碼來源:payment.php

示例14: varIsDBResource

 function varIsDBResource($var, $db = "mysql")
 {
     if ($db == "pgsql") {
         $db = "pg";
     }
     if ($db == "sybase-db" || $db == "sybase-ct") {
         $db = "sybase";
     }
     $arrFields = array("name", "type", "flags");
     $numrows = call_user_func($db . "_num_rows", $var);
     $numfields = call_user_func($db . "_num_fields", $var);
     $this->makeTableHeader("resource", $db . " result", $numfields + 1);
     echo "<tr><td class=dBug_resourceKey>&nbsp;</td>";
     for ($i = 0; $i < $numfields; $i++) {
         $field_header = "";
         for ($j = 0; $j < count($arrFields); $j++) {
             $db_func = $db . "_field_" . $arrFields[$j];
             if (function_exists($db_func)) {
                 $fheader = call_user_func($db_func, $var, $i) . " ";
                 if ($j == 0) {
                     $field_name = $fheader;
                 } else {
                     $field_header .= $fheader;
                 }
             }
         }
         $field[$i] = call_user_func($db . "_fetch_field", $var, $i);
         echo "<td class=dBug_resourceKey title=\"" . $field_header . "\">" . $field_name . "</td>";
     }
     echo "</tr>";
     for ($i = 0; $i < $numrows; $i++) {
         $row = call_user_func($db . "_fetch_array", $var, constant(Inflector::upper($db) . "_ASSOC"));
         echo "<tr>\n";
         echo "<td class=dBug_resourceKey>" . ($i + 1) . "</td>";
         for ($k = 0; $k < $numfields; $k++) {
             $tempField = $field[$k]->name;
             $fieldrow = $row[$field[$k]->name];
             $fieldrow = $fieldrow == "" ? "[empty string]" : $fieldrow;
             echo "<td>" . $fieldrow . "</td>\n";
         }
         echo "</tr>\n";
     }
     echo "</table>";
     if ($numrows > 0) {
         call_user_func($db . "_data_seek", $var, 0);
     }
 }
開發者ID:schpill,項目名稱:thin,代碼行數:47,代碼來源:Info.php

示例15: route

<?php

namespace Thin;

$route = route()->setName('home')->setPath('/')->setModule('www')->setController('static')->setAction('home')->assign();
$route = route()->setName('test')->setPath('/(.*)/(.*)/test')->setModule('www')->setController('static')->setAction('test')->setParam1('variable_test')->setSettings1(function ($var) use($route) {
    return Inflector::upper($var);
})->setParam2('super')->setSettings2(function ($var) use($route) {
    return Inflector::upper($var);
})->assign();
/* Backend */
$route = route()->setName('back_home')->setPath('/backend')->setModule('backend')->setController('static')->setAction('home')->assign();
開發者ID:noikiy,項目名稱:inovi,代碼行數:12,代碼來源:routes.php


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