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


PHP Registry::registry方法代碼示例

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


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

示例1: getBrand

 public function getBrand()
 {
     $product = $this->registry->registry('current_product');
     $collection = $this->_brandFactory->create()->getCollection();
     $collection->addFieldToFilter('attribute_id', $product->getManufacturer());
     return $collection->getFirstItem();
 }
開發者ID:emizentech,項目名稱:magento2-shop-by-brand,代碼行數:7,代碼來源:ProductBrand.php

示例2: getInstance

 public static function getInstance()
 {
     if (self::$registry === null) {
         self::$registry = new self();
     }
     return self::$registry;
 }
開發者ID:khanhicetea,項目名稱:ndkfw,代碼行數:7,代碼來源:autoload.php

示例3: clear

 public static function clear()
 {
     self::$registry = array();
 }
開發者ID:Annejas,項目名稱:PremadeSets,代碼行數:4,代碼來源:registry.php

示例4: close

 /**
  * Closes and clean-up the registry database
  */
 public static function close()
 {
     return self::$registry = array();
 }
開發者ID:BackupTheBerlios,項目名稱:medick-svn,代碼行數:7,代碼來源:Registry.php

示例5: getInstanceRegistry

 /**
  * The singleton method.
  *
  * This method implements the pattern singleton.
  *
  * @return object  Return the object instanced.
  *
  * @throws None.
  *
  * @access     private
  * @static     No.
  * @see        None.
  * @since      Available from the version  1.0 20-09-2007.
  * @deprecated No.
  */
 public static function getInstanceRegistry()
 {
     if (!isset(self::$registry)) {
         $class = __CLASS__;
         self::$registry = new $class();
     }
     return self::$registry;
 }
開發者ID:vicholuis,項目名稱:proyectopruebalms,代碼行數:23,代碼來源:Registry.php

示例6: deleteAll

 /**
  * deletes the whole registry
  *
  * @static
  * @access public
  * @return void
  */
 public static function deleteAll()
 {
     self::$registry = array();
 }
開發者ID:GamerSource,項目名稱:Infected-CMS-2,代碼行數:11,代碼來源:registry.php

示例7: setAll

 /**
  * Overwrite all entries with the provided array
  * of keys => objects
  *
  * @param $registry array
  */
 public static function setAll($registry)
 {
     self::$registry = $registry;
 }
開發者ID:ning,項目名稱:ub,代碼行數:10,代碼來源:registry-direct-access.php

示例8: getCurrentCategory

 public function getCurrentCategory()
 {
     return $this->registry->registry('current_category');
 }
開發者ID:devbelvg,項目名稱:M2_ConversionPro_Embedded,代碼行數:4,代碼來源:Data.php


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