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


PHP unknown_type::getName方法代碼示例

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


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

示例1: _addActionsDisplayGroupElement

 /**
  *
  * @param unknown_type $element
  */
 private function _addActionsDisplayGroupElement($element)
 {
     $displayGroup = $this->getDisplayGroup("zfBootstrapFormActions");
     if ($displayGroup === null) {
         $displayGroup = $this->addDisplayGroup(array($element->getName()), "zfBootstrapFormActions", array("decorators" => array("FormElements", array("HtmlTag", array("tag" => "div", "class" => "actions")))));
     } else {
         $displayGroup->addElement($element);
     }
     return $displayGroup;
 }
開發者ID:Eximagen,項目名稱:sochi,代碼行數:14,代碼來源:Twitter.php

示例2: getCategoryPath

 /**
  * Get category path
  * @param unknown_type $category
  */
 public function getCategoryPath($category, $store)
 {
     $categoryPath = str_replace('/', '_._._', $category->getName()) . '/' . $category->getId();
     while ($category->getParentId() > 0) {
         $parentCategory = $category->getParentCategory();
         $category = Mage::getModel('catalog/category')->setStoreId($store->getId())->load($parentCategory->getId());
         if (in_array($category->getId(), $this->allowCategoryIds[$store->getId()])) {
             if ($category && $category->getIsActive() && $category->getIncludeInMenu()) {
                 $categoryPath = str_replace('/', '_._._', $category->getName()) . '/' . $category->getId() . '/' . $categoryPath;
             }
         }
     }
     return trim($categoryPath, '/');
 }
開發者ID:shebin512,項目名稱:Magento_Zoff,代碼行數:18,代碼來源:Ultility0805.php

示例3: getCategoryPath

 /**
  * Get category path
  * @param unknown_type $category
  */
 public function getCategoryPath($category, $store)
 {
     $currentCategory = $category;
     $categoryPath = str_replace('/', '_._._', $category->getName()) . '/' . $category->getId();
     while ($category->getParentId() > 0) {
         $category = $category->getParentCategory();
         if (in_array($category->getId(), $this->allowCategoryIds[$store->getId()])) {
             $category->setStoreId($store->getId());
             $categoryPath = str_replace('/', '_._._', $category->getName()) . '/' . $category->getId() . '/' . $categoryPath;
         }
     }
     return trim($categoryPath, '/');
 }
開發者ID:jokusafet,項目名稱:MagentoSource,代碼行數:17,代碼來源:Ultility.php

示例4: renderEditFieldFile

 /**
  * TODO PHPDoc
  * Enter description here ...
  * @param unknown_type $field
  * @param unknown_type $is_multiple
  * @param unknown_type $object
  * @param unknown_type $template
  */
 public function renderEditFieldFile($field, $is_multiple, $object, $template)
 {
     list($template_block) = def_module::loadTemplates("data/reflection/{$template}", "reflection_field_file");
     $regexp = "|^" . CURRENT_WORKING_DIR . "|";
     $block_arr = array();
     if ($is_multiple) {
         //TODO
     } else {
         $field_name = $field->getName();
         $block_arr['attribute:name'] = $field_name;
         $block_arr['attribute:title'] = $field->getTitle();
         $block_arr['attribute:tip'] = $field->getTip();
         $block_arr['attribute:maxsize'] = $this->getAllowedMaxFileSize();
         $block_arr['attribute:field_id'] = $field->getId();
         $value = $object ? $object->getValue($field->getName()) : "";
         if ($value) {
             $block_arr['attribute:relative-path'] = $value->getFilePath(true);
             $block_arr['node:value'] = $value->getFilePath();
         } else {
             $block_arr['node:value'] = "";
         }
         if ($object) {
             $block_arr['void:object_id'] = $object->getId();
         }
         $block_arr['attribute:input_name'] = $object ? "data[" . $object->getId() . "][{$field_name}]" : "data[new][{$field_name}]";
         $folder_name = $field_name . '/';
         $general_name = "./files/";
         if ($value instanceof umiFile) {
             if ($value->getIsBroken() == false) {
                 $value = false;
             }
         }
         if ($value) {
             $destination_folder = "." . preg_replace($regexp, "", $value->getDirName());
         } else {
             $destination_folder = $general_name . (is_dir($general_name . $folder_name) ? $folder_name : '');
         }
         $block_arr['attribute:destination-folder'] = $destination_folder;
     }
     return def_module::parseTemplate($template_block, $block_arr);
 }
開發者ID:BGCX261,項目名稱:zimmerli-svn-to-git,代碼行數:49,代碼來源:__client_reflection.php

示例5: _getObject

 /**
  *
  * @param unknown_type $rs
  */
 private static function _getObject($rs)
 {
     $ret = new User();
     $ret->setAvatar($rs->getAvatar());
     $ret->setCos($rs->getCos());
     $ret->setCreationDate($rs->getCreationDate());
     $ret->setEmail($rs->getEmail());
     $ret->setEnabled($rs->getEnabled());
     $ret->setId($rs->getId());
     $ret->setName($rs->getName());
     $ret->setUsername($rs->getUsername());
     //
     // The following is a workaround on the fact that the translation of this
     // serialized object to the database gets all broken, due to the fact of PHP
     // introducing NULL bytes around the '*' that is prepended before protected
     // variable members, in the serialized mode. This method replaces those
     // problematic NULL bytes with an identifier string '~~NULL_BYTE~~',
     // rendering serialization and unserialization of these specific kinds of
     // object safe. Credits to travis@travishegner.com on:
     // http://pt.php.net/manual/en/function.serialize.php#96504
     //
     $unsafeSerializedNotifications = str_replace(CINTIENT_NULL_BYTE_TOKEN, "", $rs->getNotifications());
     if (($notifications = unserialize($unsafeSerializedNotifications)) === false) {
         $notifications = array();
     }
     $ret->setNotifications($notifications);
     $ret->resetSignature();
     return $ret;
 }
開發者ID:rasismeiro,項目名稱:cintient,代碼行數:33,代碼來源:User.php


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