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


PHP strings::get方法代码示例

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


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

示例1: getListQuery

 /**
  * Method to build an SQL query to load the list data.
  *
  * @return      string  An SQL query
  */
 protected function getListQuery()
 {
     // Get the current user for authorisation checks
     $this->user = JFactory::getUser();
     $this->userId = $this->user->get('id');
     $this->guest = $this->user->get('guest');
     $this->groups = $this->user->get('groups');
     $this->authorisedGroups = $this->user->getAuthorisedGroups();
     $this->levels = $this->user->getAuthorisedViewLevels();
     $this->app = JFactory::getApplication();
     $this->input = $this->app->input;
     $this->initSet = true;
     // Make sure all records load, since no pagination allowed.
     $this->setState('list.limit', 0);
     // Get a db connection.
     $db = JFactory::getDbo();
     // Create a new query object.
     $query = $db->getQuery(true);
     // Get from #__costbenefitprojection_country as a
     $query->select($db->quoteName(array('a.id', 'a.user', 'a.name', 'a.publicname', 'a.publicemail', 'a.publicnumber', 'a.publicaddress'), array('id', 'user', 'name', 'publicname', 'publicemail', 'publicnumber', 'publicaddress')));
     $query->from($db->quoteName('#__costbenefitprojection_country', 'a'));
     $query->where('CHAR_LENGTH(a.causesrisks) > 5');
     $query->where('CHAR_LENGTH(a.percentfemale) > 5');
     $query->where('CHAR_LENGTH(a.percentmale) > 5');
     $query->where('CHAR_LENGTH(a.datayear) > 3');
     $query->where('CHAR_LENGTH(a.productivity_losses) > 0');
     $query->where('CHAR_LENGTH(a.sick_leave) > 0');
     $query->where('CHAR_LENGTH(a.medical_turnovers) > 0');
     $query->where('a.published = 1');
     $query->order('a.name ASC');
     // return the query object
     return $query;
 }
开发者ID:namibia,项目名称:CBP-Joomla-3-Component,代码行数:38,代码来源:createaccount.php

示例2: getListQuery

 /**
  * Method to build an SQL query to load the list data.
  *
  * @return      string  An SQL query
  */
 protected function getListQuery()
 {
     // Get the current user for authorisation checks
     $this->user = JFactory::getUser();
     $this->userId = $this->user->get('id');
     $this->guest = $this->user->get('guest');
     $this->groups = $this->user->get('groups');
     $this->authorisedGroups = $this->user->getAuthorisedGroups();
     $this->levels = $this->user->getAuthorisedViewLevels();
     $this->app = JFactory::getApplication();
     $this->input = $this->app->input;
     $this->initSet = true;
     // Make sure all records load, since no pagination allowed.
     $this->setState('list.limit', 0);
     // Get a db connection.
     $db = JFactory::getDbo();
     // Create a new query object.
     $query = $db->getQuery(true);
     // Filtering.
     $ids = (array) array_map('intval', explode('_', $this->input->get('cid', null, 'CMD')));
     if (!$this->user->authorise('core.options', 'com_costbenefitprojection') && CostbenefitprojectionHelper::checkArray($ids)) {
         // make absolutely sure that these companies can be viewed
         $companies = CostbenefitprojectionHelper::hisCompanies($this->userId);
         foreach ($ids as $nr => $pk) {
             if (!CostbenefitprojectionHelper::checkArray($companies) || !in_array($pk, $companies)) {
                 // remove if not found
                 unset($ids[$nr]);
             }
         }
     }
     // only continue if we have ids
     if (!CostbenefitprojectionHelper::checkArray($ids)) {
         // redirect away if not a correct (TODO for now we go to default view)
         JError::raiseWarning(500, JText::_('No companies selected!'));
         $app = JFactory::getApplication();
         if ($app->isAdmin()) {
             JFactory::getApplication()->redirect('index.php?option=com_costbenefitprojection');
         } else {
             JFactory::getApplication()->redirect('index.php?option=com_costbenefitprojection&view=cpanel');
         }
     }
     // Get from #__costbenefitprojection_company as a
     $query->select($db->quoteName(array('a.id', 'a.name', 'a.user', 'a.department', 'a.per', 'a.country', 'a.service_provider', 'a.datayear', 'a.working_days', 'a.total_salary', 'a.total_healthcare', 'a.productivity_losses', 'a.males', 'a.females', 'a.medical_turnovers_males', 'a.medical_turnovers_females', 'a.sick_leave_males', 'a.sick_leave_females', 'a.percentmale', 'a.percentfemale', 'a.causesrisks', 'a.published', 'a.access'), array('id', 'name', 'user', 'department', 'per', 'country', 'service_provider', 'datayear', 'working_days', 'total_salary', 'total_healthcare', 'productivity_losses', 'males', 'females', 'medical_turnovers_males', 'medical_turnovers_females', 'sick_leave_males', 'sick_leave_females', 'percentmale', 'percentfemale', 'causesrisks', 'published', 'access')));
     $query->from($db->quoteName('#__costbenefitprojection_company', 'a'));
     // Get from #__costbenefitprojection_country as e
     $query->select($db->quoteName(array('e.id', 'e.name', 'e.alias', 'e.user', 'e.currency', 'e.datayear', 'e.worldzone', 'e.codethree', 'e.codetwo', 'e.working_days', 'e.presenteeism', 'e.medical_turnovers', 'e.sick_leave', 'e.healthcare', 'e.productivity_losses', 'e.publicname', 'e.publicemail', 'e.publicnumber', 'e.publicaddress', 'e.percentmale', 'e.percentfemale', 'e.causesrisks', 'e.maledeath', 'e.femaledeath', 'e.maleyld', 'e.femaleyld', 'e.access'), array('country_id', 'country_name', 'country_alias', 'country_user', 'country_currency', 'country_datayear', 'country_worldzone', 'country_codethree', 'country_codetwo', 'country_working_days', 'country_presenteeism', 'country_medical_turnovers', 'country_sick_leave', 'country_healthcare', 'country_productivity_losses', 'country_publicname', 'country_publicemail', 'country_publicnumber', 'country_publicaddress', 'country_percentmale', 'country_percentfemale', 'country_causesrisks', 'country_maledeath', 'country_femaledeath', 'country_maleyld', 'country_femaleyld', 'country_access')));
     $query->join('LEFT', $db->quoteName('#__costbenefitprojection_country', 'e') . ' ON (' . $db->quoteName('a.country') . ' = ' . $db->quoteName('e.id') . ')');
     // Get from #__costbenefitprojection_currency as f
     $query->select($db->quoteName(array('f.id', 'f.name', 'f.alias', 'f.codethree', 'f.numericcode', 'f.symbol', 'f.thousands', 'f.decimalplace', 'f.decimalsymbol', 'f.positivestyle', 'f.negativestyle', 'f.published', 'f.access', 'f.ordering'), array('currency_id', 'currency_name', 'currency_alias', 'currency_codethree', 'currency_numericcode', 'currency_symbol', 'currency_thousands', 'currency_decimalplace', 'currency_decimalsymbol', 'currency_positivestyle', 'currency_negativestyle', 'currency_published', 'currency_access', 'currency_ordering')));
     $query->join('LEFT', $db->quoteName('#__costbenefitprojection_currency', 'f') . ' ON (' . $db->quoteName('e.currency') . ' = ' . $db->quoteName('f.codethree') . ')');
     // Check if $ids is an array with values.
     $array = $ids;
     if (isset($array) && CostbenefitprojectionHelper::checkArray($array)) {
         $query->where('a.id IN (' . implode(',', $array) . ')');
     } else {
         return false;
     }
     // return the query object
     return $query;
 }
开发者ID:namibia,项目名称:CBP-Joomla-3-Component,代码行数:65,代码来源:combinedresults.php

示例3: init_richedit

 function init_richedit()
 {
     $this->_load_js_script();
     $id = $this->get_attribute('id');
     if ($_COOKIE['use_textarea_instead_of_richedit']) {
         $caption = strings::get('use_richedit_instead_of_textarea', 'common');
     } else {
         $caption = strings::get('use_textarea_instead_of_richedit', 'common');
     }
     echo "<table cellpadding=0 cellspacing=0>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><button id='{$id}_button' class='button' onclick='toggle_richedit_textarea();window.location.reload();return false;' style='display:none'>{$caption}</button></td>\n\t\t\t\t\t\t<td nowrap> " . strings::get('richedit_textarea_warning', 'common') . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t  </table>";
     if ($this->get_attribute('mode') == 'light') {
         $init_function = 'install_limb_lite_extension(editor.config);';
     } else {
         $init_function = 'install_limb_full_extension(editor.config);editor.registerPlugin(TableOperations);';
     }
     if (!$this->get_attribute('rows')) {
         $this->set_attribute('rows', RICHEDIT_DEFAULT_ROWS);
     }
     if (!$this->get_attribute('cols')) {
         $this->set_attribute('cols', RICHEDIT_DEFAULT_COLS);
     }
     if (!($width = $this->get_attribute('width'))) {
         $width = RICHEDIT_DEFAULT_WIDTH;
     }
     if (!($height = $this->get_attribute('height'))) {
         $height = RICHEDIT_DEFAULT_HEIGHT;
     }
     echo "\n    <script type='text/javascript' defer='defer'>\n    \r\n      function init_richedit_{$id}()\r\n      {\r\n\t    \tvar editor = new HTMLArea('{$id}');\n\t    \t\n\t    \tif(typeof(editor.config) == 'undefined')\n\t    \t\treturn;\n\n\t    \t{$init_function}\n\t    \t\n        editor.config.width = '{$width}';\r\n        editor.config.height = '{$height}';  \t    \t\r\n\n\t      c = get_cookie('use_textarea_instead_of_richedit');\n\t\n\t      if(c != 1)\n\t        editor.generate();\n        \n        document.getElementById('{$id}_button').style.display = 'block';\n      }\n      \n      add_event(window, 'load', init_richedit_{$id});      \n      \r\n    </script>";
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:29,代码来源:richedit_component.class.php

示例4: array

 function _define_actions()
 {
   return array(
       'events_list' => array(
           'template_path' => '/stats_event/events_list.html',
           'action_name' => strings :: get('show_events_list', 'stats'),
           'action_path' => '/stats_event/stats_event_filter_action',
       ),
       'edit' => array(
           'popup' => true,
           'JIP' => true,
           'action_name' => strings :: get('edit'),
           'action_path' => '/site_object/edit_action',
           'template_path' => '/site_object/edit.html',
           'img_src' => '/shared/images/edit.gif'
       ),
       'delete' => array(
           'JIP' => true,
           'popup' => true,
           'action_name' => strings :: get('delete'),
           'action_path' => 'form_delete_site_object_action',
           'template_path' => '/site_object/delete.html',
           'img_src' => '/shared/images/rem.gif'
       ),
   );
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:26,代码来源:stats_event_controller.class.php

示例5: array

 function _define_actions()
 {
   return array(
       'display' => array(
           'template_path' => '/version/display.html',
       ),
       'recover' => array(
           'action_path' => '/version/recover_version_action',
           'popup' => true
       ),
       'edit' => array(
           'popup' => true,
           'JIP' => true,
           'action_name' => strings :: get('edit'),
           'action_path' => '/site_object/edit_action',
           'template_path' => '/site_object/full_edit.html',
           'img_src' => '/shared/images/edit.gif'
       ),
       'delete' => array(
           'JIP' => true,
           'popup' => true,
           'action_name' => strings :: get('delete'),
           'action_path' => 'form_delete_site_object_action',
           'template_path' => '/site_object/delete.html',
           'img_src' => '/shared/images/rem.gif'
       ),
   );
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:28,代码来源:version_controller.class.php

示例6: array

  function _define_actions()
  {
    return array(
        'display' => array(
            'template_path' => '/search/display.html',
            'transaction' => false,
        ),
        'fulltext_search' => array(
            'template_path' => '/search/fulltext_search.html',
            'transaction' => false,
            'action_path' => '/search_action'
        ),
        'edit' => array(
            'popup' => true,
            'JIP' => true,
            'action_name' => strings :: get('edit'),
            'action_path' => '/site_object/edit_action',
            'template_path' => '/site_object/edit.html',
            'img_src' => '/shared/images/edit.gif'
        ),
        'delete' => array(
            'JIP' => true,
            'popup' => true,
            'action_name' => strings :: get('delete'),
            'action_path' => 'form_delete_site_object_action',
            'template_path' => '/site_object/delete.html',
            'img_src' => '/shared/images/rem.gif'
        ),

    );
  }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:search_controller.class.php

示例7: array

	function login_object_controller()
	{
		$this->_actions = array(
				'login' => array(
						'permissions_required' => 'r',
						'action_path' => 'login_action',
						'template_path' => 'login.html'
				),
				'logout' => array(
						'permissions_required' => 'r',
						'action_path' => 'logout_action',
				),
				'edit' => array(
						'permissions_required' => 'w',
						'popup' => true,
						'JIP' => true,
						'action_name' => strings :: get('edit'),
						'action_path' => '/site_object/edit_action',
						'template_path' => '/site_object/edit.html',
						'img_src' => '/shared/images/edit.gif'
				),
				'change_user_locale' => array(
						'permissions_required' => 'w',
						'popup' => true,
						'action_name' => strings :: get('change_locale', 'user'),
						'action_path' => '/user/change_user_locale_action',
				),
		);
		
		parent :: site_object_controller();
	}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:31,代码来源:login_object_controller.class.php

示例8: check

	function check($value)
	{
	  $value = "$value";
	  
    if(!preg_match("~^[a-zA-Z]\d[a-zA-Z]\s?\d[a-zA-Z]\d$~", $value))
      $this->error(strings :: get('error_invalid_zip_format', 'error'));
	} 
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:7,代码来源:canada_zip_rule.class.php

示例9: array

 function _define_actions()
 {
   return array(
       'admin_display' => array(
           'template_path' => '/admin_page/admin_display.html',
           'transaction' => false,
       ),
       'edit' => array(
           'popup' => true,
           'JIP' => true,
           'action_name' => strings :: get('edit'),
           'action_path' => '/site_object/edit_action',
           'template_path' => '/site_object/edit.html',
           'icon' => 'edit'
       ),
       'register_new_object' => array(
           'popup' => true,
           'JIP' => true,
           'action_name' => strings :: get('register_new_object'),
           'action_path' => '/site_object/register_new_object_action',
           'template_path' => '/site_object/register_new_object.html',
           'icon' => 'activate'
       )
   );
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:25,代码来源:admin_page_controller.class.php

示例10: array

 function _define_actions()
 {
   return array(
       'display' => array(
           'template_path' => '/pricelist_folder/display.html'
       ),
       'admin_display' => array(
           'template_path' => '/pricelist_folder/admin_display.html'
       ),
       'set_metadata' => array(
           'popup' => true,
           'JIP' => true,
           'action_name' => strings :: get('set_metadata'),
           'action_path' => '/site_object/set_metadata_action',
           'template_path' => '/site_object/set_metadata.html',
           'icon' => 'configure'
       ),
       'create_pricelist_object' => array(
           'template_path' => '/pricelist_object/create.html',
           'action_path' => '/pricelist_object/create_pricelist_object_action',
           'JIP' => true,
           'popup' => true,
           'icon' => 'new.generic',
           'action_name' => strings :: get('create_pricelist_object', 'pricelist'),
           'can_have_access_template' => true,
       ),
       'edit' => array(
           'template_path' => '/site_object/edit.html',
           'action_path' => '/site_object/edit_action',
           'popup' => true,
           'JIP' => true,
           'icon' => 'edit',
           'action_name' => strings :: get('edit_pricelist_folder', 'pricelist'),
       ),
       'publish' => array(
           'popup' => true,
           'JIP' => true,
           'action_name' => strings :: get('publish'),
           'action_path' => '/doc_flow_object/set_publish_status_action',
           'icon' => 'publish',
           'can_have_access_template' => true,
       ),
       'unpublish' => array(
           'popup' => true,
           'JIP' => true,
           'action_name' => strings :: get('unpublish'),
           'action_path' => '/doc_flow_object/set_publish_status_action',
           'icon' => 'unpublish',
           'can_have_access_template' => true,
       ),
       'delete' => array(
           'JIP' => true,
           'popup' => true,
           'action_name' => strings :: get('delete_pricelist_folder', 'pricelist'),
           'action_path' => 'form_delete_site_object_action',
           'template_path' => '/site_object/delete.html',
           'icon' => 'delete'
       ),
   );
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:60,代码来源:pricelist_folder_controller.class.php

示例11: render_image_select

 function render_image_select()
 {
     $id = $this->get_attribute('id');
     $md5id = substr(md5($id), 0, 5);
     $image_node_id = $this->get_value();
     $start_path = '';
     if ($image_node_id && ($image_data = fetch_one_by_node_id($image_node_id))) {
         $span_name = $image_data['identifier'];
         $start_path = '/root?action=image_select&node_id=' . $image_data['parent_node_id'];
     } else {
         $span_name = '';
     }
     if (!$start_path) {
         $start_path = $this->get_attribute('start_path');
         if (!$start_path) {
             $start_path = session::get('limb_image_select_working_path');
         }
         if (!$start_path) {
             $start_path = '/root/images';
         }
         $start_path .= '?action=image_select';
     }
     echo "<span id='{$md5id}_name'>{$span_name}</span><br><img id='{$md5id}_img' src='/shared/images/1x1.gif'/>\n      <script type='text/javascript'>\n        var image_select_{$md5id};\n\n        function init_image_select_{$md5id}()\n        {\n          image_select_{$md5id} = new image_select('{$id}', '{$md5id}');\n          image_select_{$md5id}.set_start_path('{$start_path}');\n          image_select_{$md5id}.generate();\n        }\n\n        function image_select_{$md5id}_insert_image(image)\n        {\n          image_select_{$md5id}.insert_image(image);\n        }\n\n        function image_select_{$md5id}_get_image()\n        {\n          return image_select_{$md5id}.get_image();\n        }\n\n        function image_reset_{$md5id}()\n        {\n          image_select_{$md5id}.id_container.value = 0;\n          init_image_select_{$md5id}();\n        }\n\n        add_event(window, 'load', init_image_select_{$md5id});\n      </script>";
     echo "<br><br><input class='button' type='button' onclick='popup(\"/root/tools/image_select?properties=0\", null, null, false, image_select_{$md5id}_insert_image, image_select_{$md5id}_get_image)' value='" . strings::get('select_image', 'image') . "'>";
     echo '&nbsp;';
     echo "<input class='button' type='button' onclick='image_reset_{$md5id}()' value='" . strings::get('reset') . "'>";
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:27,代码来源:image_select_component.class.php

示例12: prepare

	function prepare()
	{
		$params = array();
		$params['id'] = $this->get('node_id');
		$params['action'] = 'order';
		$params['rn'] = time();
		$params['popup'] = 1;
		
		$this->set('order_up_alt', strings :: get('order_up'));
		$this->set('order_down_alt', strings :: get('order_down'));
		
		if (!$this->get('is_first_child'))
		{
			$params['direction'] = 'up';
			$this->set('order_up_href', add_url_query_items($_SERVER['PHP_SELF'], $params));
		}	
		else
			$this->set('order_up_href', '');

		if (!$this->get('is_last_child'))
		{
			$params['direction'] = 'down';
			$this->set('order_down_href', add_url_query_items($_SERVER['PHP_SELF'], $params));
		}	
		else
			$this->set('order_down_href', '');
		
		return parent :: prepare();	
	} 
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:29,代码来源:order_component.class.php

示例13: array

 function _define_actions()
 {
   return array(
       'display' => array(
           'action_path' => '/feedback_object/send_feedback_action',
           'template_path' => '/feedback_object/display.html'
       ),
       'admin_display' => array(
           'template_path' => '/feedback_object/admin_display.html'
       ),
       'edit' => array(
           'popup' => true,
           'JIP' => true,
           'action_name' => strings :: get('edit_feedback_content', 'feedback'),
           'action_path' => '/feedback_object/edit_feedback_action',
           'template_path' => '/feedback_object/edit.html',
           'img_src' => '/shared/images/edit.gif'
       ),
       'delete' => array(
           'JIP' => true,
           'popup' => true,
           'action_name' => strings :: get('delete'),
           'action_path' => 'form_delete_site_object_action',
           'template_path' => '/site_object/delete.html',
           'img_src' => '/shared/images/rem.gif'
       ),
   );
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:28,代码来源:feedback_object_controller.class.php

示例14: validate

 /**
  * Performs validation
  * 
  * @param dataspace $ - data to validate
  * @param error_list $ 
  * @return boolean TRUE if validation passed
  * @access public 
  */
 function validate(&$dataspace)
 {
     $value = $dataspace->get($this->field_name);
     if (!isset($value) || $value === '') {
         $this->error(strings::get('error_required', 'error'));
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:15,代码来源:required_rule.class.php

示例15: array

	function _define_actions()
	{
		return array(
				'display' => array(
						'permissions_required' => 'r',
						'template_path' => '/news_folder/display.html'
				),
				'admin_display' => array(
						'permissions_required' => 'rw',
						'template_path' => '/news_folder/admin_display.html'
				),
				'create_news' => array(
						'permissions_required' => 'w',
						'template_path' => '/news_object/create.html',
						'action_path' => '/news/create_news_action',
						'JIP' => true,
						'popup' => true,
						'img_src' => '/shared/images/new.generic.gif',
						'action_name' => strings :: get('create_newsline', 'newsline'),
						'can_have_access_template' => true,
				),
				'edit' => array(
						'permissions_required' => 'w',
						'template_path' => '/news_folder/edit.html',
						'action_path' => '/news_folder/edit_news_folder_action',
						'popup' => true,
						'JIP' => true,
						'img_src' => '/shared/images/edit.gif',
						'action_name' => strings :: get('edit_news_folder', 'newsline'),
				),
		);
	}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:32,代码来源:news_folder_controller.class.php


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