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

PHP lcfirst函数代码示例

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

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



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

示例1: getExtensionSummary

 /**
  * Returns information about this extension plugin
  *
  * @param array $params Parameters to the hook
  *
  * @return string Information about pi1 plugin
  * @hook TYPO3_CONF_VARS|SC_OPTIONS|cms/layout/class.tx_cms_layout.php|list_type_Info|calendarize_calendar
  */
 public function getExtensionSummary(array $params)
 {
     $relIconPath = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . ExtensionManagementUtility::siteRelPath('calendarize') . 'ext_icon.png';
     $this->flexFormService = GeneralUtility::makeInstance('HDNET\\Calendarize\\Service\\FlexFormService');
     $this->layoutService = GeneralUtility::makeInstance('HDNET\\Calendarize\\Service\\ContentElementLayoutService');
     $this->layoutService->setTitle('<img src="' . $relIconPath . '" /> Calendarize');
     if ($params['row']['list_type'] != 'calendarize_calendar') {
         return '';
     }
     $this->flexFormService->load($params['row']['pi_flexform']);
     if (!$this->flexFormService->isValid()) {
         return '';
     }
     $actions = $this->flexFormService->get('switchableControllerActions', 'main');
     $parts = GeneralUtility::trimExplode(';', $actions, true);
     $parts = array_map(function ($element) {
         $split = explode('->', $element);
         return ucfirst($split[1]);
     }, $parts);
     $actionKey = lcfirst(implode('', $parts));
     $this->layoutService->addRow(LocalizationUtility::translate('mode', 'calendarize'), LocalizationUtility::translate('mode.' . $actionKey, 'calendarize'));
     $this->layoutService->addRow(LocalizationUtility::translate('configuration', 'calendarize'), $this->flexFormService->get('settings.configuration', 'main'));
     if ((bool) $this->flexFormService->get('settings.hidePagination', 'main')) {
         $this->layoutService->addRow(LocalizationUtility::translate('hide.pagination.teaser', 'calendarize'), '!!!');
     }
     $this->addPageIdsToTable();
     return $this->layoutService->render();
 }
开发者ID:kaptankorkut,项目名称:calendarize,代码行数:36,代码来源:CmsLayout.php


示例2: fire

 /**
  * Execute the console command.
  *
  * @return void
  */
 public function fire()
 {
     // Prepare variables
     $table = lcfirst($this->option('table'));
     $viewVars = compact('table');
     // Prompt
     $this->line('');
     $this->info("Table name: {$table}");
     $this->comment("A migration that creates social_sites and user_social_sites tables," . " referencing the {$table} table will" . " be created in app/database/migrations directory");
     $this->line('');
     if ($this->confirm("Proceed with the migration creation? [Yes|no]")) {
         $this->info("Creating migration...");
         // Generate
         $filename = 'database/migrations/' . date('Y_m_d_His') . "_create_oauth_client_setup_tables.php";
         $output = $this->app['view']->make('laravel-oauth-client::generators.migration', $viewVars)->render();
         $filename = $this->app['path'] . '/' . trim($filename, '/');
         $directory = dirname($filename);
         if (!is_dir($directory)) {
             @mkdir($directory, 0755, true);
         }
         @file_put_contents($filename, $output, FILE_APPEND);
         $this->info("Migration successfully created!");
     }
     $this->call('dump-autoload');
 }
开发者ID:xwiz,项目名称:laravel-oauth-client,代码行数:30,代码来源:MigrationCommand.php


示例3: 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


示例4: generate

 /**
  * Generate the CRUD controller.
  *
  * @param BundleInterface   $bundle           A bundle object
  * @param string            $entity           The entity relative class name
  * @param ClassMetadataInfo $metadata         The entity class metadata
  * @param string            $format           The configuration format (xml, yaml, annotation)
  * @param string            $routePrefix      The route name prefix
  * @param array             $needWriteActions Wether or not to generate write actions
  *
  * @throws \RuntimeException
  */
 public function generate(BundleInterface $bundle, $entity, ClassMetadataInfo $metadata, $format, $routePrefix, $needWriteActions, $forceOverwrite)
 {
     $this->routePrefix = $routePrefix;
     $this->routeNamePrefix = self::getRouteNamePrefix($routePrefix);
     $this->actions = $needWriteActions ? array('index', 'show', 'new', 'edit', 'delete') : array('index', 'show');
     if (count($metadata->identifier) != 1) {
         throw new \RuntimeException('The CRUD generator does not support entity classes with multiple or no primary keys.');
     }
     $this->entity = $entity;
     $this->entitySingularized = lcfirst(Inflector::singularize($entity));
     $this->entityPluralized = lcfirst(Inflector::pluralize($entity));
     $this->bundle = $bundle;
     $this->metadata = $metadata;
     $this->setFormat($format);
     $this->generateControllerClass($forceOverwrite);
     $dir = sprintf('%s/Resources/views/%s', $this->rootDir, str_replace('\\', '/', strtolower($this->entity)));
     if (!file_exists($dir)) {
         $this->filesystem->mkdir($dir, 0777);
     }
     $this->generateIndexView($dir);
     if (in_array('show', $this->actions)) {
         $this->generateShowView($dir);
     }
     if (in_array('new', $this->actions)) {
         $this->generateNewView($dir);
     }
     if (in_array('edit', $this->actions)) {
         $this->generateEditView($dir);
     }
     $this->generateTestClass();
     $this->generateConfiguration();
 }
开发者ID:spinx,项目名称:SensioGeneratorBundle,代码行数:44,代码来源:DoctrineCrudGenerator.php


示例5: addContent

 /**
  * Generate view content
  *
  * @param string          $moduleName
  * @param ClassReflection $loadedEntity
  */
 protected function addContent($moduleName, ClassReflection $loadedEntity)
 {
     // prepare some params
     $moduleIdentifier = $this->filterCamelCaseToUnderscore($moduleName);
     $entityName = $loadedEntity->getShortName();
     $entityParam = lcfirst($entityName);
     $formParam = lcfirst(str_replace('Entity', '', $loadedEntity->getShortName())) . 'DataForm';
     $moduleRoute = $this->filterCamelCaseToDash($moduleName);
     // set action body
     $body = [];
     $body[] = 'use ' . $loadedEntity->getName() . ';';
     $body[] = '';
     $body[] = '/** @var ' . $entityName . ' $' . $entityParam . ' */';
     $body[] = '$' . $entityParam . ' = $this->' . $entityParam . ';';
     $body[] = '';
     $body[] = '$this->h1(\'' . $moduleIdentifier . '_title_update\');';
     $body[] = '';
     $body[] = '$this->' . $formParam . '->setAttribute(\'action\', $this->url(\'' . $moduleRoute . '/update\', [\'id\' => $' . $entityParam . '->getIdentifier()]));';
     $body[] = '';
     $body[] = 'echo $this->bootstrapForm($this->' . $formParam . ');';
     $body[] = '?>';
     $body[] = '<p>';
     $body[] = '    <a class="btn btn-primary" href="<?php echo $this->url(\'' . $moduleRoute . '\'); ?>">';
     $body[] = '        <i class="fa fa-table"></i>';
     $body[] = '        <?php echo $this->translate(\'' . $moduleIdentifier . '_action_index\'); ?>';
     $body[] = '    </a>';
     $body[] = '</p>';
     $body = implode(AbstractGenerator::LINE_FEED, $body);
     // add method
     $this->setContent($body);
 }
开发者ID:zfrapid,项目名称:zf2rapid,代码行数:37,代码来源:UpdateActionViewGenerator.php


示例6: timespan

/**
 * Rewrites CI's timespan function
 * Leaving only years and months
 * @param int $seconds Number of Seconds
 * @param string $time Unix Timestamp
 * @return string String representaton of date difference
 */
function timespan($seconds = 1, $time = '')
{
    $CI =& get_instance();
    $CI->lang->load('date');
    if (!is_numeric($seconds)) {
        $seconds = 1;
    }
    if (!is_numeric($time)) {
        $time = time();
    }
    if ($time <= $seconds) {
        $seconds = 1;
    } else {
        $seconds = $time - $seconds;
    }
    $str = '';
    $years = floor($seconds / 31536000);
    if ($years > 0) {
        $str .= $years . ' ' . lcfirst($CI->lang->line($years > 1 ? 'date_years' : 'date_year')) . ', ';
    }
    $seconds -= $years * 31536000;
    $months = floor($seconds / 2628000);
    if ($years > 0 or $months > 0) {
        if ($months > 0) {
            $str .= $months . ' ' . lcfirst($CI->lang->line($months > 1 ? 'date_months' : 'date_month')) . ', ';
        }
    }
    return substr(trim($str), 0, -1);
}
开发者ID:alex-krav,项目名称:personal-page-codeigniter,代码行数:36,代码来源:MY_date_helper.php


示例7: toJson

 /**
  * Get our comparison data by scanning our comparison directory
  * @return array
  */
 public function toJson()
 {
     // Add our current directory pointer to the array (can't be done in property definition)
     array_unshift($this->comparisonDir, dirname(__FILE__));
     // Try to do this platform independent
     $comparisonDir = implode(DIRECTORY_SEPARATOR, $this->comparisonDir);
     if (!count($this->comparisonCache)) {
         // Iterate our directory looking for comparison classes
         foreach (new DirectoryIterator($comparisonDir) as $file) {
             // Skip sub-dirs and dot files
             if ($file->isDir() || $file->isDot()) {
                 continue;
             }
             $fileName = $file->getFilename();
             $className = str_replace('.php', '', $fileName);
             $reflectClass = new ReflectionClass('\\Verdict\\Filter\\Comparison\\' . $className);
             // Skip interfaces and abstracts
             if (!$reflectClass->isInstantiable() || !$reflectClass->implementsInterface('\\Verdict\\Filter\\Comparison\\ComparisonInterface') || $className === 'Truth') {
                 continue;
             }
             $reflectMethod = $reflectClass->getMethod('getDisplay');
             $this->comparisonCache[lcfirst($className)] = $reflectMethod->invoke(null);
         }
         // First, lowercase our sort order array
         $sortOrder = array_map('lcfirst', $this->sortOrder);
         // Next, sort our keys based on their position inside our sort order array
         uksort($this->comparisonCache, function ($a, $b) use($sortOrder) {
             return array_search($a, $sortOrder) - array_search($b, $sortOrder);
         });
     }
     return $this->comparisonCache;
 }
开发者ID:rfink,项目名称:verdict,代码行数:36,代码来源:Discover.php


示例8: getFunctions

 /**
  * {@inheritdoc}
  */
 public function getFunctions()
 {
     return ['getsearchresultsnippet' => new \Twig_SimpleFunction('getSearchResultSnippet', function ($object) {
         $pathArray = explode('\\', get_class($object));
         return 'SyliusSearchBundle:SearchResultSnippets:' . lcfirst(array_pop($pathArray)) . '.html.twig';
     })];
 }
开发者ID:ahmadrabie,项目名称:Sylius,代码行数:10,代码来源:SearchElementExtension.php


示例9: extractAttributes

 /**
  * {@inheritdoc}
  */
 protected function extractAttributes($object, $format = null, array $context = array())
 {
     // If not using groups, detect manually
     $attributes = array();
     // methods
     $reflClass = new \ReflectionClass($object);
     foreach ($reflClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflMethod) {
         if ($reflMethod->getNumberOfRequiredParameters() !== 0 || $reflMethod->isStatic() || $reflMethod->isConstructor() || $reflMethod->isDestructor()) {
             continue;
         }
         $name = $reflMethod->name;
         if (0 === strpos($name, 'get') || 0 === strpos($name, 'has')) {
             // getters and hassers
             $attributeName = lcfirst(substr($name, 3));
         } elseif (strpos($name, 'is') === 0) {
             // issers
             $attributeName = lcfirst(substr($name, 2));
         }
         if ($this->isAllowedAttribute($object, $attributeName)) {
             $attributes[$attributeName] = true;
         }
     }
     // properties
     foreach ($reflClass->getProperties(\ReflectionProperty::IS_PUBLIC) as $reflProperty) {
         if ($reflProperty->isStatic() || !$this->isAllowedAttribute($object, $reflProperty->name)) {
             continue;
         }
         $attributes[$reflProperty->name] = true;
     }
     return array_keys($attributes);
 }
开发者ID:cilefen,项目名称:symfony,代码行数:34,代码来源:ObjectNormalizer.php


示例10: generate

 /**
  * Generates set of code based on data.
  *
  * @return array
  */
 public function generate()
 {
     $this->prepareData($this->data);
     $columnFields = ['name', 'description', 'label'];
     $table = $this->describe->getTable($this->data['name']);
     foreach ($table as $column) {
         if ($column->isAutoIncrement()) {
             continue;
         }
         $field = strtolower($column->getField());
         $method = 'set_' . $field;
         $this->data['camel'][$field] = lcfirst(camelize($method));
         $this->data['underscore'][$field] = underscore($method);
         array_push($this->data['columns'], $field);
         if ($column->isForeignKey()) {
             $referencedTable = Tools::stripTableSchema($column->getReferencedTable());
             $this->data['foreignKeys'][$field] = $referencedTable;
             array_push($this->data['models'], $referencedTable);
             $dropdown = ['list' => plural($referencedTable), 'table' => $referencedTable, 'field' => $field];
             if (!in_array($field, $columnFields)) {
                 $field = $this->describe->getPrimaryKey($referencedTable);
                 $dropdown['field'] = $field;
             }
             array_push($this->data['dropdowns'], $dropdown);
         }
     }
     return $this->data;
 }
开发者ID:rougin,项目名称:combustor,代码行数:33,代码来源:ControllerGenerator.php


示例11: formatAction

 public function formatAction($action, $suffix)
 {
     if ($this->isDefaultAction($action)) {
         return is_null($suffix) ? RouterParameter::DEFAULT_ACTION_METHOD : RouterParameter::DEFAULT_ACTION_NAME_URL . $suffix;
     }
     return lcfirst(StringUtils::camelize($action)) . $suffix;
 }
开发者ID:waspframework,项目名称:waspframework,代码行数:7,代码来源:AbstractActionFinder.php


示例12: printException

 /**
  * @param ExampleEvent $event
  */
 protected function printException(ExampleEvent $event)
 {
     if (null === ($exception = $event->getException())) {
         return;
     }
     $title = str_replace('\\', DIRECTORY_SEPARATOR, $event->getSpecification()->getTitle());
     $title = str_pad($title, 50, ' ', STR_PAD_RIGHT);
     $message = $this->getPresenter()->presentException($exception, $this->io->isVerbose());
     if ($exception instanceof PendingException) {
         $this->io->writeln(sprintf('<pending-bg>%s</pending-bg>', $title));
         $this->io->writeln(sprintf('<lineno>%4d</lineno>  <pending>- %s</pending>', $event->getExample()->getFunctionReflection()->getStartLine(), $event->getExample()->getTitle()));
         $this->io->writeln(sprintf('<pending>%s</pending>', lcfirst($message)), 6);
         $this->io->writeln();
     } elseif ($exception instanceof SkippingException) {
         if ($this->io->isVerbose()) {
             $this->io->writeln(sprintf('<skipped-bg>%s</skipped-bg>', $title));
             $this->io->writeln(sprintf('<lineno>%4d</lineno>  <skipped>? %s</skipped>', $event->getExample()->getFunctionReflection()->getStartLine(), $event->getExample()->getTitle()));
             $this->io->writeln(sprintf('<skipped>%s</skipped>', lcfirst($message)), 6);
             $this->io->writeln();
         }
     } elseif (ExampleEvent::FAILED === $event->getResult()) {
         $this->io->writeln(sprintf('<failed-bg>%s</failed-bg>', $title));
         $this->io->writeln(sprintf('<lineno>%4d</lineno>  <failed>✘ %s</failed>', $event->getExample()->getFunctionReflection()->getStartLine(), $event->getExample()->getTitle()));
         $this->io->writeln(sprintf('<failed>%s</failed>', lcfirst($message)), 6);
         $this->io->writeln();
     } else {
         $this->io->writeln(sprintf('<broken-bg>%s</broken-bg>', $title));
         $this->io->writeln(sprintf('<lineno>%4d</lineno>  <broken>! %s</broken>', $event->getExample()->getFunctionReflection()->getStartLine(), $event->getExample()->getTitle()));
         $this->io->writeln(sprintf('<broken>%s</broken>', lcfirst($message)), 6);
         $this->io->writeln();
     }
 }
开发者ID:franzliedke,项目名称:phpspec,代码行数:35,代码来源:ConsoleFormatter.php


示例13: __call

 public function __call($method, $args)
 {
     if (preg_match('/(set|get)([A-Z][a-zA-Z]*)/', $method, $matches) === 0) {
         throw new \BadMethodCallException("Invalid method name: {$method}");
     }
     $type = $matches[1];
     $attr = lcfirst($matches[2]);
     if (!in_array($attr, array_keys($this->nodes))) {
         $attr = preg_replace('/([A-Z][a-z]*)/', '-$1', $attr);
         $attr = strtolower($attr);
         if (!in_array($attr, array_keys($this->nodes))) {
             throw new \BadMethodCallException("Invalid attribute name: {$attr}");
         }
     }
     if ($type == 'get') {
         return $this->nodes[$attr];
     }
     if (!is_array($args) || count($args) == 0) {
         throw new \InvalidArgumentException("Missing method arguments: {$method}");
     }
     if (count($args) > 1) {
         throw new \InvalidArgumentException('Expected 1 argument. ' . count($args) . ' passed.');
     }
     $this->nodes[$attr] = reset($args);
     return $this;
 }
开发者ID:eumatheusgomes,项目名称:cielo,代码行数:26,代码来源:NodeGetterSetter.php


示例14: beforeAction

 public function beforeAction($action)
 {
     //log flush instantly
     \Yii::$app->getLog()->flushInterval = 1;
     foreach (\Yii::$app->getLog()->targets as $logTarget) {
         $logTarget->exportInterval = 1;
     }
     $module = $this->module;
     $this->realClient = new \GearmanWorker();
     if (!empty($module) && isset(\Yii::$app->params['gearman'][$module->getUniqueId()])) {
         $this->group = $module->getUniqueId();
     }
     $this->realClient->addServers(\Yii::$app->params['gearman'][$this->group]);
     /**
      * 注册可用的方法
      */
     $methods = get_class_methods(get_class($this));
     if ($methods) {
         $this->stdout("Available worker:" . PHP_EOL, Console::BOLD);
         foreach ($methods as $method) {
             if (substr($method, 0, strlen($this->callbackPrefix)) == $this->callbackPrefix) {
                 $funcName = "{$module->id}/{$this->id}/" . lcfirst(substr($method, strlen($this->callbackPrefix)));
                 $this->stdout("\t" . $funcName . PHP_EOL);
                 $that = $this;
                 $this->realClient->addFunction($funcName, function ($gearmanJob) use($that, $method) {
                     call_user_func([$that, $method], $gearmanJob);
                     $that->cleanUp();
                 });
             }
         }
     }
     return parent::beforeAction($action);
 }
开发者ID:highestgoodlikewater,项目名称:yii2-liuxy-extension,代码行数:33,代码来源:Worker.php


示例15: __set

 public function __set($attribute, $value)
 {
     $attribute = lcfirst($attribute);
     if (isset($this->{$attribute})) {
         $this->{$attribute} = $value;
     }
 }
开发者ID:nealerickson,项目名称:li3_loggr,代码行数:7,代码来源:loggr_event.php


示例16: __construct

 /**  
  * Constructor.
  * moduleName, controllerName, actionName is set in this method.
  * @param string $moduleName module name.
  * @param string $controllerName controller name.
  * @param string $actionName action name.
  */
 public function __construct($moduleName, $controllerName, $actionName)
 {
     /*{{{*/
     $this->moduleName = lcfirst($moduleName);
     $this->controllerName = lcfirst($controllerName);
     $this->actionName = lcfirst($actionName);
 }
开发者ID:andals,项目名称:vine,代码行数:14,代码来源:BaseController.php


示例17: ajaxFormField

 /**
  * One stop shop for an edit in place object property
  *
  * @param $opts array:
  *					'url' 		=> string - default backend genericController method
  *					'wysiwyg' 	=> BOOL - default false
  */
 public function ajaxFormField($fieldName, $opts = null)
 {
     $value = $this->obj->{$fieldName}();
     $id = lcfirst($this->obj->getClass()) . "_" . $fieldName . '_' . $this->obj->id();
     //---------------------------- $opts['url']
     $url = isset($opts['url']) ? $opts['url'] : '?adminAction=genericEditField&adminLayout=empty&ajax=true';
     //---------------------------- $opts['wysiwyg']
     if ($opts['wysiwyg']) {
         $this->accelJs()->wysiwyg();
     } else {
         $value = htmlentities($value);
     }
     $this->accelJs()->ready("\n            \$('.ajax-editable-link').unbind('click').click(function(){\n                var mySpanID = \$(this).attr('id').replace('_link', '');\n                var pieces = mySpanID.split('_');\n\t\t\t\tvar myInput = \$('.ajax-editable-input[name='+mySpanID+']');\n                var me = \$(this);\n                // we're saving\n                if(\$(this).hasClass('save')){\n\t                me.html('" . AccelJS::escape(FormBuilder::adminIcon('spinner')) . "');\n                    \$.ajax({\n                        type     : 'post',\n                        url        : '{$url}',\n                        data    : {\n                            className     : pieces[0],\n                            field        : pieces[1],\n                            id            : pieces[2],\n                            value        : myInput.val()\n                        },\n                        success    : function(ret){\n\t\t\t\t\t\t\tif(myInput.hasClass('mceEditor')){\n\t\t\t\t\t\t\t\tmyInput.ckeditorGet().destroy();\n\n\t\t\t\t\t\t\t\t\$('#' + mySpanID).html(ret);\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\$('#' + mySpanID).html(htmlentities(ret));\n\n\t\t\t\t\t\t\t}\n                            me.html('" . AccelJS::escape(FormBuilder::adminIcon('file_edit')) . "');\n                            me.removeClass('save');\n                        }\n\n                    });\n\n\n                // we're editing\n                } else {\n\t\t\t\t\tif(me.hasClass('wysiwyg')){\n\t\t\t\t\t\tvar editableInput = \$(document.createElement('textarea'))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.attr('name', mySpanID)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.val(\$('#' + mySpanID).html())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addClass('ajax-editable-input')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addClass('mceEditor');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar editableInput = \$(document.createElement('input'))\n\t\t\t\t\t\t\t\t\t\t\t\t.attr('name', mySpanID)\n\t\t\t\t\t\t\t\t\t\t\t\t.val(\$('#' + mySpanID).text())\n\t\t\t\t\t\t\t\t\t\t\t\t.addClass('ajax-editable-input');\n\t\t\t\t\t}\n\n\n                    \$('#' + mySpanID).html(editableInput);\n\n\t\t\t\t\tif(editableInput.hasClass('mceEditor')){\n\t\t\t\t\t\t" . $this->accelJs()->wysiwygJs($opts['wysiwyg']) . "\n\t\t\t\t\t}\n\n                    accelJS.ajaxEditableInputCheck();\n\n                    \$(this).html('" . AccelJS::escape(FormBuilder::adminIcon('save')) . "');\n                    \$(this).addClass('save');\n                }\n            });\n            accelJS.ajaxEditableInputCheck();\n\n\n        ");
     $this->accelJs()->js("\n            accelJS.ajaxEditableInputCheck =  function(){\n                \$('input.ajax-editable-input').unbind('keyup').keyup(function(e){\n                    if(e.keyCode == 13) {\n                        \$(this).parent().next('a').click();\n                    }\n                });\n            }\n        ");
     $addClass = $opts['wysiwyg'] ? 'wysiwyg' : '';
     $ret .= "<span class='ajax-editable' id='" . $id . "'>" . $value . "</span><a class='ajax-editable-link pointer {$addClass}' id='" . $id . "_link'>" . FormBuilder::adminIcon('file_edit') . "</a>";
     /*
             if($value){
                 $ret .= "<span class='ajax-editable' id='".$id."'>".htmlentities($value)."</span><a class='ajax-editable-link pointer' id='".$id."_link'>".FormBuilder::adminIcon('file_edit')."</a>";
             } else {
                 $ret .= "<span class='ajax-editable' id='".$id."'><input type='text' name='$id' class='ajax-editable-input'  /></span><a class='ajax-editable-link pointer save' id='".$id."_link'>".FormBuilder::adminIcon('save')."</a>";
             }
     */
     return $ret;
 }
开发者ID:netacceleration,项目名称:accelpress,代码行数:32,代码来源:FormBuilder.php


示例18: _createFunctionExportClass

 protected function _createFunctionExportClass()
 {
     $function = $this->createFunction('exportClass');
     $function->setSignature(array('array &$class', '$overwrite = false'));
     $body = array('parent::exportClass($class, $overwrite);', '', 'if (array_key_exists(\'' . $this->_class['class_id'] . '\', $class[\'handlers\'])) {', '    foreach ($class[\'handlers\'][\'' . $this->_class['class_id'] . '\']', '             as $contentType => $' . lcfirst($this->_class['class_name_plural']) . ') {', '', '        $contentTypeName = str_replace(" ", "", ucwords(', '            str_replace("_", " ", $contentType)));', '', '        $class[\'content_type\'] = $contentType;', '        $phpFile = ThemeHouse_AddOnManager_PhpFile::create(', '            \'' . $this->_class['addon_id'] . '_PhpFile_' . $this->_class['class_name'] . '\',', '            $class[\'addon_id\'] . \'_' . $this->_class['class_name'] . '_\' . $contentTypeName,', '            $class', '        );', '', '        $phpFile->export($overwrite);', '    }', '}');
     $function->setBody($body);
 }
开发者ID:ThemeHouse-XF,项目名称:ExtendClass,代码行数:7,代码来源:Class.php


示例19: resolve

 /**
  * @return string
  */
 public function resolve()
 {
     $bundle = $this->dashToCamelCase($this->request->attributes->get('module'));
     $controller = $this->dashToCamelCase($this->request->attributes->get('controller'));
     $action = lcfirst($this->dashToCamelCase($this->request->attributes->get('action')));
     return $bundle . '/' . $controller . '/' . $action;
 }
开发者ID:spryker,项目名称:Kernel,代码行数:10,代码来源:RouteNameResolver.php


示例20: loadClassMetadata

 /**
  * {@inheritDoc}
  */
 public function loadClassMetadata(ClassMetadata $metadata)
 {
     $annotClass = 'Symfony\\Component\\Validator\\Constraints\\Validation';
     $reflClass = $metadata->getReflectionClass();
     $loaded = false;
     if ($annot = $this->reader->getClassAnnotation($reflClass, $annotClass)) {
         foreach ($annot->constraints as $constraint) {
             $metadata->addConstraint($constraint);
         }
         $loaded = true;
     }
     foreach ($reflClass->getProperties() as $property) {
         if ($annot = $this->reader->getPropertyAnnotation($property, $annotClass)) {
             foreach ($annot->constraints as $constraint) {
                 $metadata->addPropertyConstraint($property->getName(), $constraint);
             }
             $loaded = true;
         }
     }
     foreach ($reflClass->getMethods() as $method) {
         if ($annot = $this->reader->getMethodAnnotation($method, $annotClass)) {
             foreach ($annot->constraints as $constraint) {
                 // TODO: clean this up
                 $name = lcfirst(substr($method->getName(), 0, 3) == 'get' ? substr($method->getName(), 3) : substr($method->getName(), 2));
                 $metadata->addGetterConstraint($name, $constraint);
             }
             $loaded = true;
         }
     }
     return $loaded;
 }
开发者ID:skoop,项目名称:symfony-sandbox,代码行数:34,代码来源:AnnotationLoader.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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