• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ucwords函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ucwords函数的典型用法代码示例。如果您正苦于以下问题:PHP ucwords函数的具体用法?PHP ucwords怎么用?PHP ucwords使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: doRegister

 public function doRegister(Request $request)
 {
     $validator = Validator::make($data = $request->all(), Admin::$rules, Admin::$messages);
     if ($validator->fails()) {
         return Redirect::back()->withErrors($validator)->withInput();
     }
     if ($validator->passes()) {
         $confirmation_code = Str::quickRandom(30);
         $admin = new Admin();
         $admin->fullname = ucwords($request->fullname);
         $admin->mobile_no = $request->mobile_no;
         $admin->email = $request->email;
         $admin->password = bcrypt($request->password);
         $admin->confirmation_code = $confirmation_code;
         $data = ['confirmation_code' => $confirmation_code, 'username' => $request->username, 'password' => $request->password, 'mobile_no' => $request->mobile_no];
         Basehelper::sendSMS($request->mobile_no, 'Hello ' . $request->username . ', you have successfully registere. Your username is ' . $request->username . ' and password is ' . $request->password);
         // Mail::send('emails.verify', $data, function($message) use ($admin, $data){
         // 	$message->from('no-reply@employment_bank', 'Employment Bank');
         //     	$message->to(Input::get('email'), $admin->name)
         //         	->subject('Verify your email address');
         // });
         if (!$admin->save()) {
             return Redirect::back()->with('message', 'Error while creating your account!<br> Please contact Technical Support');
         }
         return Redirect::route('admin.login')->with('message', 'Account has been created!<br>Now Check your email address to verify your account by checking your spam folder or inboxes for verification link after that you can login');
         //sendConfirmation() Will go the email and sms as needed
     } else {
         return Redirect::back()->withInput()->withErrors($validation);
         // ->with('message', 'There were validation errors.');
     }
 }
开发者ID:unicorn-softwares,项目名称:employment_bank,代码行数:31,代码来源:AdminHomeController.php


示例2: procedure_order_report

function procedure_order_report($pid, $encounter, $cols, $id)
{
    $cols = 1;
    // force always 1 column
    $count = 0;
    $data = sqlQuery("SELECT * " . "FROM procedure_order WHERE " . "procedure_order_id = '{$id}' AND activity = '1'");
    if ($data) {
        print "<table cellpadding='0' cellspacing='0'>\n<tr>\n";
        foreach ($data as $key => $value) {
            if ($key == "procedure_order_id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0" || $value == "0.00") {
                continue;
            }
            $key = ucwords(str_replace("_", " ", $key));
            if ($key == "Order Priority") {
                print "<td valign='top'><span class='bold'>" . xl($key) . ": </span><span class='text'>" . generate_display_field(array('data_type' => '1', 'list_id' => 'ord_priority'), $value) . " &nbsp;</span></td>\n";
            } else {
                if ($key == "Order Status") {
                    print "<td valign='top'><span class='bold'>" . xl($key) . ": </span><span class='text'>" . generate_display_field(array('data_type' => '1', 'list_id' => 'ord_status'), $value) . " &nbsp;</span></td>\n";
                } else {
                    print "<td valign='top'><span class='bold'>" . xl($key) . ": </span><span class='text'>{$value} &nbsp;</span></td>\n";
                }
            }
            $count++;
            if ($count == $cols) {
                $count = 0;
                print "</tr>\n<tr>\n";
            }
        }
        print "</tr>\n</table>\n";
    }
}
开发者ID:robonology,项目名称:openemr,代码行数:31,代码来源:report.php


示例3: reviewofs_report

function reviewofs_report($pid, $encounter, $cols, $id)
{
    $count = 0;
    $data = formFetch("form_reviewofs", $id);
    if ($data) {
        print "<table><tr>";
        foreach ($data as $key => $value) {
            if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0000-00-00 00:00:00") {
                continue;
            }
            if ($value == "on") {
                $value = "yes";
            }
            $key = ucwords(str_replace("_", " ", $key));
            //modified by BM 07-2009 for internationalization
            if ($key == "Additional Notes") {
                print "<td><span class=bold>" . xl($key) . ": </span><span class=text>" . text($value) . "</span></td>";
            } else {
                print "<td><span class=bold>" . xl($key) . ": </span><span class=text>" . xl($value) . "</span></td>";
            }
            $count++;
            if ($count == $cols) {
                $count = 0;
                print "</tr><tr>\n";
            }
        }
    }
    print "</tr></table>";
}
开发者ID:juggernautsei,项目名称:openemr,代码行数:29,代码来源:report.php


示例4: get_users

 /**
  * Ajax callback function to search users, used on exclude setting page
  *
  * @uses WP_User_Query WordPress User Query class.
  * @return void
  */
 public static function get_users()
 {
     if (!defined('DOING_AJAX') || !current_user_can(WP_Stream_Admin::SETTINGS_CAP)) {
         return;
     }
     check_ajax_referer('stream_get_users', 'nonce');
     $response = (object) array('status' => false, 'message' => esc_html__('There was an error in the request', 'stream'));
     $search = isset($_POST['find']) ? wp_unslash(trim($_POST['find'])) : '';
     $request = (object) array('find' => $search);
     add_filter('user_search_columns', array(__CLASS__, 'add_display_name_search_columns'), 10, 3);
     $users = new WP_User_Query(array('search' => "*{$request->find}*", 'search_columns' => array('user_login', 'user_nicename', 'user_email', 'user_url'), 'orderby' => 'display_name', 'number' => WP_Stream_Admin::PRELOAD_AUTHORS_MAX));
     remove_filter('user_search_columns', array(__CLASS__, 'add_display_name_search_columns'), 10);
     if (0 === $users->get_total()) {
         wp_send_json_error($response);
     }
     $response->status = true;
     $response->message = '';
     $response->users = array();
     foreach ($users->results as $key => $user) {
         $author = new WP_Stream_Author($user->ID);
         $args = array('id' => $author->ID, 'text' => $author->display_name);
         $args['tooltip'] = esc_attr(sprintf(__("ID: %d\nUser: %s\nEmail: %s\nRole: %s", 'stream'), $author->id, $author->user_login, $author->user_email, ucwords($author->get_role())));
         $args['icon'] = $author->get_avatar_src(32);
         $response->users[] = $args;
     }
     if (empty($search) || preg_match('/wp|cli|system|unknown/i', $search)) {
         $author = new WP_Stream_Author(0);
         $response->users[] = array('id' => $author->id, 'text' => $author->get_display_name(), 'icon' => $author->get_avatar_src(32), 'tooltip' => esc_html__('Actions performed by the system when a user is not logged in (e.g. auto site upgrader, or invoking WP-CLI without --user)', 'stream'));
     }
     wp_send_json_success($response);
 }
开发者ID:sdh100shaun,项目名称:pantheon,代码行数:37,代码来源:class-wp-stream-settings.php


示例5: generateEntity

 /**
  * Función que genera los archivos de las entidades, dentro de la carpeta generation
  */
 public function generateEntity()
 {
     $tables = $this->getDatabaseTables();
     //dpr($this->)
     $route = CRITERIA_PATH_XML_CLASS_GENERATED;
     foreach ($tables as $key => $table) {
         $writeclass = "<?php\n";
         $writeclass .= "/* Class autogenerated whith PHPCriteria v1.1 */\n\n";
         $tableName = $table['Name'];
         $writeclass .= "/**\n * @Entity(Table=\"{$tableName}\")\n*/\n";
         $entityName = "Entity" . ucwords($tableName);
         $writeclass .= "class " . $entityName . " {\n\n";
         $descTable[$tableName] = $this->getDescTable($tableName);
         foreach ($this->getDescTable($tableName) as $key_t => $column) {
             $writeclass .= "\t/**\n";
             if ($column['Key'] == "PRI") {
                 $writeclass .= "\t * @Id\n";
             }
             $writeclass .= "\t * @Column(Field=\"" . $column['Field'] . "\",Type=\"" . $column['Type'] . "\",Key=\"" . $column['Key'] . "\",Null=\"" . $column['Null'] . "\",Default=\"" . $column['Default'] . "\",Extra=\"" . $column['Extra'] . "\")\n";
             if ($column['Key'] == "MUL") {
                 $fk = self::findFKGenerateEntity($tableName, $column['Field']);
                 if (count($fk) > 0) {
                     $writeclass .= "\t * @JoinColumn(Table=\"" . $fk['REFERENCED_TABLE_NAME'] . "\",Column=\"" . $fk['REFERENCED_COLUMN_NAME'] . "\")\n";
                 }
             }
             $writeclass .= "\t*/\n";
             $writeclass .= "\tpublic \$" . $column['Field'] . ";\n\n";
         }
         $writeclass .= "\tfunction __construct() {}\n";
         $writeclass .= "}\n";
         $writeclass .= "?>";
         $this->escribirArchivo($route . $entityName . ".php", $writeclass, true);
     }
 }
开发者ID:ranmadxs,项目名称:phpcriteria,代码行数:37,代码来源:CriteriaGenerate.php


示例6: addBelongsToInformation

 public static function addBelongsToInformation($model, $key, $display, $data)
 {
     if (isset($model->belongModels) && array_key_exists($key, $model->belongModels)) {
         $belongData = $model->belongModels[$key];
         if (!isset($belongData["showon"]) || static::isValidView($belongData, $display)) {
             if (!isset($belongData["model"])) {
                 throw new Exception("Model Attribute not Found in belongsModels for {$key}", 1);
             }
             if (!isset($belongData["column"])) {
                 throw new Exception("Column Attribute not Found in belongsModels for {$key}", 1);
             }
             $column = $belongData["column"];
             $modelName = ucwords($belongData["model"]);
             $belongModel = $model->belongs_to("Admin\\{$modelName}", $key)->first();
             if (isset($belongModel)) {
                 $data = $belongModel->{$column};
             } else {
                 if (isset($belongData["alternative_text"])) {
                     $data = $belongData["alternative_text"];
                 }
             }
         }
     }
     return $data;
 }
开发者ID:robriggen,项目名称:lara_admin,代码行数:25,代码来源:datahelper.php


示例7: getTaxonomyLabel

 /**
  * Retrieve the taxonomy label
  *
  * @return string
  */
 public function getTaxonomyLabel()
 {
     if ($this->getTaxonomy()) {
         return ucwords(str_replace('_', ' ', $this->getTaxonomy()));
     }
     return false;
 }
开发者ID:LiamMcArthur,项目名称:extension-fishpig-wordpress-integration,代码行数:12,代码来源:Term.php


示例8: camelCase

 public static function camelCase($str, $exclude = array())
 {
     $str = preg_replace('/[^a-z0-9' . implode('', $exclude) . ']+/i', ' ', $str);
     // uppercase the first character of each word
     $str = ucwords(trim($str));
     return lcfirst(str_replace(' ', '', $str));
 }
开发者ID:norkazuleta,项目名称:proyectoServer,代码行数:7,代码来源:Utility.php


示例9: buildClass

 /**
  * Build the model class with the given name.
  *
  * @param  string  $name
  * @return string
  */
 protected function buildClass($name)
 {
     $stub = $this->files->get($this->getStub());
     $tableName = strtolower($this->getNameInput());
     $className = 'Create' . ucwords($tableName) . 'Table';
     $schema = $this->option('schema');
     $fields = explode(',', $schema);
     $data = array();
     $x = 0;
     foreach ($fields as $field) {
         $array = explode(':', $field);
         $data[$x]['name'] = trim($array[0]);
         $data[$x]['type'] = trim($array[1]);
         $x++;
     }
     $schemaFields = '';
     foreach ($data as $item) {
         if ($item['type'] == 'string') {
             $schemaFields .= "\$table->string('" . $item['name'] . "');";
         } elseif ($item['type'] == 'text') {
             $schemaFields .= "\$table->text('" . $item['name'] . "');";
         } elseif ($item['type'] == 'integer') {
             $schemaFields .= "\$table->integer('" . $item['name'] . "');";
         } elseif ($item['type'] == 'date') {
             $schemaFields .= "\$table->date('" . $item['name'] . "');";
         } else {
             $schemaFields .= "\$table->string('" . $item['name'] . "');";
         }
     }
     $schemaUp = "\n        Schema::create('" . $tableName . "', function(Blueprint \$table)\n        {\n            \$table->increments('id');\n            " . $schemaFields . "\n            \$table->timestamps();\n        });\n        ";
     $schemaDown = "Schema::drop('" . $tableName . "');";
     return $this->replaceSchemaUp($stub, $schemaUp)->replaceSchemaDown($stub, $schemaDown)->replaceClass($stub, $className);
 }
开发者ID:butoibogdan,项目名称:crud-generator,代码行数:39,代码来源:CrudMigrationCommand.php


示例10: ProcessInstructor

 public function ProcessInstructor($Company_Id, $Instructor_Name)
 {
     if (!is_numeric($Instructor_Name)) {
         $Instructor_Name = ucwords($Instructor_Name);
         return $this->MakeInstructorID($Company_Id, $Instructor_Name);
     }
 }
开发者ID:InvalidC,项目名称:ClassExercise,代码行数:7,代码来源:InstructorModel.php


示例11: autoDispatch

 /**
  * autoDispatch by Volter9
  * Ability to call controllers in their controller/model/param way
  */
 public static function autoDispatch()
 {
     $uri = parse_url($_SERVER['QUERY_STRING'], PHP_URL_PATH);
     $uri = trim($uri, ' /');
     $uri = ($amp = strpos($uri, '&')) !== false ? substr($uri, 0, $amp) : $uri;
     $parts = explode('/', $uri);
     $controller = array_shift($parts);
     $controller = $controller ? $controller : DEFAULT_CONTROLLER;
     $controller = ucwords($controller);
     $method = array_shift($parts);
     $method = $method ? $method : DEFAULT_METHOD;
     $args = !empty($parts) ? $parts : array();
     // Check for file
     if (!file_exists("app/Controllers/{$controller}.php")) {
         return false;
     }
     $controller = "\\Controllers\\{$controller}";
     $c = new $controller();
     if (method_exists($c, $method)) {
         $c->{$method}($args);
         //found method so stop
         return true;
     }
     return false;
 }
开发者ID:hieunguyenbk,项目名称:AgriExtension,代码行数:29,代码来源:Router.php


示例12: hist_exam_plan_report

function hist_exam_plan_report($pid, $encounter, $cols, $id)
{
    $cols = 1;
    // force always 1 column
    $count = 0;
    $data = sqlQuery("SELECT * " . "FROM form_hist_exam_plan WHERE " . "id = '{$id}' AND activity = '1'");
    if ($data) {
        print "<table cellpadding='0' cellspacing='0'>\n<tr>\n";
        foreach ($data as $key => $value) {
            if ($key == "id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0" || $value == "0.00") {
                continue;
            }
            if ($value == "on") {
                $value = "yes";
            }
            $key = ucwords(str_replace("_", " ", $key));
            print "<td valign='top'><span class='bold'>{$key}: </span><span class='text'>{$value} &nbsp;</span></td>\n";
            $count++;
            if ($count == $cols) {
                $count = 0;
                print "</tr>\n<tr>\n";
            }
        }
        print "</tr>\n</table>\n";
    }
}
开发者ID:katopenzz,项目名称:openemr,代码行数:26,代码来源:report.php


示例13: run

 public function run(&$_data)
 {
     $engine = strtolower(C('TMPL_ENGINE_TYPE'));
     if ('think' == $engine) {
         //[sae] 采用Think模板引擎
         if ($this->checkCache($_data['file'])) {
             // 缓存有效
             SaeMC::include_file(md5($_data['file']) . C('TMPL_CACHFILE_SUFFIX'), $_data['var']);
         } else {
             $tpl = Think::instance('ThinkTemplate');
             // 编译并加载模板文件
             $tpl->fetch($_data['file'], $_data['var']);
         }
     } else {
         // 调用第三方模板引擎解析和输出
         $class = 'Template' . ucwords($engine);
         if (is_file(CORE_PATH . 'Driver/Template/' . $class . '.class.php')) {
             // 内置驱动
             $path = CORE_PATH;
         } else {
             // 扩展驱动
             $path = EXTEND_PATH;
         }
         if (require_cache($path . 'Driver/Template/' . $class . '.class.php')) {
             $tpl = new $class();
             $tpl->fetch($_data['file'], $_data['var']);
         } else {
             // 类没有定义
             throw_exception(L('_NOT_SUPPERT_') . ': ' . $class);
         }
     }
     //[sae] 添加trace信息。
     trace(array('[SAE]核心缓存' => $_SERVER['HTTP_APPVERSION'] . '/' . RUNTIME_FILE, '[SAE]模板缓存' => $_SERVER['HTTP_APPVERSION'] . '/' . md5($_data['file']) . C('TMPL_CACHFILE_SUFFIX')));
 }
开发者ID:nexteee,项目名称:php,代码行数:34,代码来源:ParseTemplateBehavior.class.php


示例14: factory

 public static function factory($options)
 {
     $options = is_array($options) ? $options : array();
     //只实例化一个对象
     if (is_null(self::$cacheFactory)) {
         self::$cacheFactory = new cacheFactory();
     }
     $driver = isset($options['driver']) ? $options['driver'] : C("CACHE_TYPE");
     //静态缓存实例名称
     $driverName = md5_s($options);
     //对象实例存在
     if (isset(self::$cacheFactory->cacheList[$driverName])) {
         return self::$cacheFactory->cacheList[$driverName];
     }
     $class = 'Cache' . ucwords(strtolower($driver));
     //缓存驱动
     $classFile = YY_PATH . 'Cache/' . $class . '.class.php';
     //加载驱动类库文件
     if (!require_array($classFile)) {
         halt("缓存类型指定错误,不存在缓存驱动文件:" . $classFile);
     }
     $cacheObj = new $class($options);
     self::$cacheFactory->cacheList[$driverName] = $cacheObj;
     return self::$cacheFactory->cacheList[$driverName];
 }
开发者ID:kumfo,项目名称:YYphp,代码行数:25,代码来源:CacheFactory.class.php


示例15: display_each_ebook

function display_each_ebook($directory, $name)
{
    $check_thumb = check_thumb_exists(urldecode($directory . $name));
    echo '<td id = "thumbnail_container" width = "14%">
			<img rel ="images" id = "' . $directory . $name . '" src = "' . \OCP\Util::linkTo('reader', 'ajax/thumbnail.php') . '&filepath=' . $directory . rtrim($name, 'pdf') . 'png' . '">	
		</td>';
    echo '<td class = "filename svg" width = "86%">
			<a class="name" href="http://localhost' . \OCP\Util::linkTo('files', 'download.php') . '?file=' . $directory . $name . '" title="' . urldecode($name) . '" dir ="' . $directory . $name . '" value  = "' . $check_thumb . '">
				<span class = "nametext">' . htmlspecialchars(urldecode($name)) . '</span>
			</a>
			<div id = "displaybox">';
    $each_row = find_tags_for_ebook(urldecode($directory) . urldecode($name));
    $tags = explode(",", $each_row);
    $tag_count = 1;
    foreach ($tags as $tag) {
        if ($tag_count == 2) {
            echo ", ";
        }
        echo '<a href = "' . \OCP\Util::linkTo('reader', 'fetch_tags.php') . '?tag=' . $tag . '">' . ucwords($tag) . '</a>';
        $tag_count += 1;
    }
    echo '</div>
			<input type="button" class="start" value="Add Tag">
			<div id="contentbox" contenteditable="true"></div>
		</td>';
}
开发者ID:nanowish,项目名称:apps,代码行数:26,代码来源:library_display.php


示例16: column_default

 /**
  * Mange column data
  *
  * Default Column for listing table
  */
 function column_default($item, $column_name)
 {
     switch ($column_name) {
         case 'seller_store':
             return $item[$column_name];
         case 'curr_user_name':
             return $item[$column_name];
         case 'curr_user_email':
             return $item[$column_name];
         case 'user_rating':
             return $item[$column_name] . ' / 5';
         case 'user_comment':
             return $item[$column_name];
         case 'post_status':
             $seller_review_params = array('seller_review_id' => $item['ID'], 'seller_review_status' => $item['post_status']);
             $seller_review_query = add_query_arg($seller_review_params, admin_url());
             return '<a class="button" href="' . $seller_review_query . '">' . ucwords($item[$column_name]) . '</a>';
         case 'post_date':
             $format = get_option('date_format') . ' ' . get_option('time_format');
             $datetime = !empty($item[$column_name]) ? date_i18n($format, strtotime($item[$column_name])) : '';
             return $datetime;
         default:
             return $item[$column_name];
     }
 }
开发者ID:abcode619,项目名称:wpstuff,代码行数:30,代码来源:custom-seller-review.php


示例17: _toHtml

 protected function _toHtml()
 {
     $rssObj = Mage::getModel('rss/rss');
     $order = Mage::registry('current_order');
     $title = Mage::helper('rss')->__('Order # %s Notification(s)', $order->getIncrementId());
     $newurl = Mage::getUrl('sales/order/view', array('order_id' => $order->getId()));
     $data = array('title' => $title, 'description' => $title, 'link' => $newurl, 'charset' => 'UTF-8');
     $rssObj->_addHeader($data);
     $resourceModel = Mage::getResourceModel('rss/order');
     $results = $resourceModel->getAllCommentCollection($order->getId());
     if ($results) {
         foreach ($results as $result) {
             $urlAppend = 'view';
             $type = $result['entity_type_code'];
             if ($type && $type != 'order') {
                 $urlAppend = $type;
             }
             $type = Mage::helper('rss')->__(ucwords($type));
             $title = Mage::helper('rss')->__('Details for %s #%s', $type, $result['increment_id']);
             $description = '<p>' . Mage::helper('rss')->__('Notified Date: %s<br/>', $this->formatDate($result['created_at'])) . Mage::helper('rss')->__('Comment: %s<br/>', $result['comment']) . '</p>';
             $url = Mage::getUrl('sales/order/' . $urlAppend, array('order_id' => $order->getId()));
             $data = array('title' => $title, 'link' => $url, 'description' => $description);
             $rssObj->_addEntry($data);
         }
     }
     $title = Mage::helper('rss')->__('Order #%s created at %s', $order->getIncrementId(), $this->formatDate($order->getCreatedAt()));
     $url = Mage::getUrl('sales/order/view', array('order_id' => $order->getId()));
     $description = '<p>' . Mage::helper('rss')->__('Current Status: %s<br/>', $order->getStatusLabel()) . Mage::helper('rss')->__('Total: %s<br/>', $order->formatPrice($order->getGrandTotal())) . '</p>';
     $data = array('title' => $title, 'link' => $url, 'description' => $description);
     $rssObj->_addEntry($data);
     return $rssObj->createRssXml();
 }
开发者ID:SalesOneGit,项目名称:s1_magento,代码行数:32,代码来源:Status.php


示例18: formatTokens

 public function formatTokens($content)
 {
     $upperCaseModelName = ucfirst($this->modelName);
     $field_name = snake_case($this->modelName) . '_name';
     $modelId = $this->formatInstanceVariable() . '->id';
     $modelAttribute = $this->formatInstanceVariable() . '->' . $field_name;
     $createdAt = $this->formatInstanceVariable() . '->created_at';
     $modelRoute = '/' . $this->folderName;
     $dtTableName = snake_case($this->modelName) . '_table';
     $masterPage = $this->masterPage;
     $modelName = $this->modelName;
     $modelsUpperCase = ucwords(str_plural($this->modelName));
     $folderName = $this->folderName;
     $gridName = $this->formatVueGridName() . '-grid';
     $endGridName = '/' . $this->formatVueGridName() . '-grid';
     $vueApiRoute = 'api/' . $this->folderName . '-vue';
     $parent = $this->parent;
     $parentInstance = $this->formatParentInstanceVariable($this->parent);
     $parentInstances = $this->formatParents($this->parent);
     $parent_id = strtolower(snake_case($this->parent)) . '_id';
     $parentFieldName = strtolower(snake_case($this->parent)) . '_name';
     $child = $this->child;
     $slug = $this->slug;
     //create token array using compact
     $tokens = compact('upperCaseModelName', 'field_name', 'modelId', 'modelAttribute', 'createdAt', 'modelRoute', 'dtTableName', 'masterPage', 'modelName', 'modelsUpperCase', 'folderName', 'gridName', 'endGridName', 'vueApiRoute', 'parent', 'parentInstance', 'parentInstances', 'parent_id', 'parentFieldName', 'child', 'slug');
     $content = $this->insertTokensInContent($content, $tokens);
     return $content;
 }
开发者ID:evercode1,项目名称:view-maker,代码行数:28,代码来源:FormatsTokens.php


示例19: getList

 public function getList($filter = array())
 {
     $results = array();
     $extensions = $this->getExtensions();
     foreach ($this->fetchExtensionsPath() as $extension_path) {
         $options = $installed = FALSE;
         $basename = basename($extension_path);
         $title = ucwords(str_replace('_module', '', $basename));
         if (isset($extensions[$basename]) and $extension = $extensions[$basename]) {
             if (isset($extension['status']) and $extension['status'] === '1') {
                 $installed = TRUE;
             }
         } else {
             $extension = array();
         }
         // skip loop if not installed and $is_installed is set TRUE
         if (!empty($filter['status']) and $filter['status'] === TRUE and $installed === FALSE) {
             continue;
         }
         $config_items = $this->getConfig($basename);
         $config = (!empty($config_items) and is_array($config_items)) ? TRUE : FALSE;
         $ext_type = isset($config_items['ext_type']) ? $config_items['ext_type'] : 'module';
         if (isset($config_items['admin_options']) and $config_items['admin_options'] === TRUE) {
             $options = file_exists($extension_path . '/controllers/admin_' . $basename . '.php') ? TRUE : FALSE;
         }
         $results[$ext_type][$basename] = array('extension_id' => isset($extension['extension_id']) ? $extension['extension_id'] : 0, 'name' => $basename, 'title' => !empty($extension['title']) ? $extension['title'] : $title, 'type' => $ext_type, 'ext_data' => isset($extension['ext_data']) ? $extension['ext_data'] : '', 'options' => $options, 'config' => $config, 'installed' => $installed);
     }
     if (!empty($filter['type'])) {
         return $results[$filter['type']];
     }
     return $results;
 }
开发者ID:AKCore,项目名称:TastyIgniter,代码行数:32,代码来源:Extensions_model.php


示例20: get_tag_meta

 function get_tag_meta($keyword = 'blog', $id = 1)
 {
     $this->db->where('tag', $keyword)->where('websites_id', $id);
     $query = $this->db->get('tag_cloud');
     $row = $query->result_array();
     $data['title'] = $data['keywords'] = $data['description'] = $keyword . ' :: Tag';
     foreach ($row as $v) {
         if (!empty($v['meta_title'])) {
             $data['title'] = $v['meta_title'];
         } else {
             $data['title'] = ucwords($v['title']) . ' :: ' . __('Tag');
         }
         if (!empty($v['meta_keyword'])) {
             $data['keywords'] = $v['meta_keyword'];
         } else {
             $data['keywords'] = preg_replace('/\\s+|\\s/', ',', ucwords($v['title'])) . ',Blog,Tag';
         }
         if (!empty($v['meta_description'])) {
             $data['description'] = $v['meta_description'];
         } else {
             $data['description'] = 'TAG: ' . ucwords($v['title']);
         }
     }
     return $data;
 }
开发者ID:mashbro,项目名称:Codefight-CMS,代码行数:25,代码来源:Blog_model.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ud_get_wp_property函数代码示例发布时间:2022-05-23
下一篇:
PHP uctrans函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap