久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何將第 3 方庫添加到 magento?

how to add a 3rd party library to magento?(如何將第 3 方庫添加到 magento?)
本文介紹了如何將第 3 方庫添加到 magento?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

該庫不需要與 magento 集成,它主要是一個與 API 通信的包裝器.

The library doesn't need to integrate with magento, it's mostly a wrapper that communicates with an API.

我希望能夠使用這個庫并從控制器或模型中進行這些 API 調用.

I would like to be able to use this library and make these API calls from within a controller or model.

我可以把圖書館放在哪里?如何將它們添加到自動加載器?

Where can I put the library? How do I add them to the autoloader?

推薦答案

查看網站根目錄中的/lib 文件夾.來自 Magento 基礎目錄:

Look into /lib folder in your website root directory. From Magento Base Directories:

Magento 的庫文件夾是非基于模塊的 Magento 代碼存在.這包括大量的允許 Magento 的系統代碼運行,以及一些第三派對圖書館(包括 Zend框架).圖書館也是Magento 將搜索的最后一個代碼池嘗試自動加載文件時.

Magento’s library folder is where non-module based Magento code lives. This include a large amount of the system code which allows Magento to run, as well as a number of third party libraries (including the Zend Framework). The library is also the last code pool Magento will search when attempting to autoload a file.

因此,換句話說,如果您的庫支持 zend 文件命名約定 - 庫類將被 magento 自動加載器找到并加載.否則,您可以使用 Mage::getBaseDir(‘lib’) 獲取/lib 目錄的路徑并編寫類似

So, in other words, if your library supports zend file naming convention - library classes will be found and loaded by magento autoloader. Otherwise you can get path of your /lib directory with Mage::getBaseDir(‘lib’) and write something like

require_once(Mage::getBaseDir('lib') . '/EZComponents/Base/src/base.php');

這篇關于如何將第 3 方庫添加到 magento?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數組自動填充選擇框)
PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 久草视频在线播放 | 青青草华人在线视频 | 色婷婷综合久久久久中文一区二区 | av影音在线 | 午夜精品久久久久久久99黑人 | 欧美8一10sex性hd | 国产成人免费 | 久草在线高清 | 国产欧美在线 | www久久 | 99国产视频 | 亚洲午夜视频在线观看 | 91久操网| 99热激情 | 热re99久久精品国产99热 | 国产传媒毛片精品视频第一次 | 亚洲三区在线 | 成年人视频在线免费观看 | 国产精品久久久久不卡 | 中文字幕在线视频精品 | 最新国产精品视频 | 欧美精品日韩精品国产精品 | 国产视频中文字幕 | 伊人久久综合影院 | 欧美日韩中文字幕 | 国产伦精品一区二区三区精品视频 | 国产中文视频 | www.久久 | 成人片免费看 | 欧美日韩一区二区三区视频 | 国内自拍偷拍一区 | 亚洲精品乱码久久久久久按摩 | 欧美高清视频一区 | 中文字幕亚洲欧美日韩在线不卡 | 欧美四虎 | 国产精品视频一二三区 | 少妇特黄a一区二区三区88av | 日本成人三级电影 | 黄网站免费观看 | 日韩欧美在线观看视频网站 | 7777精品伊人久久精品影视 |