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

如何將第 3 方庫(kù)添加到 magento?

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

問題描述

該庫(kù)不需要與 magento 集成,它主要是一個(gè)與 API 通信的包裝器.

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

我希望能夠使用這個(gè)庫(kù)并從控制器或模型中進(jìn)行這些 API 調(diào)用.

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

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

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

推薦答案

查看網(wǎng)站根目錄中的/lib 文件夾.來(lái)自 Magento 基礎(chǔ)目錄:

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

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

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.

因此,換句話說(shuō),如果您的庫(kù)支持 zend 文件命名約定 - 庫(kù)類將被 magento 自動(dòng)加載器找到并加載.否則,您可以使用 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');

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

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

相關(guān)文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個(gè)表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設(shè)置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數(shù)組自動(dòng)填充選擇框)
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 產(chǎn)生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 久久精品国产久精国产 | 91精品国产综合久久久久久丝袜 | 欧美精品久久久久 | 91精品国产综合久久久久久漫画 | 久久丝袜视频 | 欧美日韩在线综合 | 国产探花在线精品一区二区 | 狠狠干网 | 国产农村妇女毛片精品久久麻豆 | 一区二区三区中文字幕 | 午夜电影福利 | 久久免费香蕉视频 | 日韩一区二区av | 国产精品污www一区二区三区 | 91视频一88av| 少妇精品亚洲一区二区成人 | 91久操网| 色综合久久伊人 | 亚洲综合国产精品 | 亚洲精品高清视频 | 午夜久久久| 91免费在线 | 欧美日韩综合一区 | 一区二区中文 | 大学生a级毛片免费视频 | 国产精品免费观看视频 | 永久av | 美女久久久 | 国色天香综合网 | 国产目拍亚洲精品99久久精品 | 欧美专区在线观看 | 国产高清在线观看 | 国产欧美精品区一区二区三区 | 亚洲福利 | 免费成人高清在线视频 | 欧美一级片久久 | 97视频在线免费 | 亚洲视频一区在线观看 | 中文字幕第一页在线 | 久久久久国产精品一区二区 | 91在线精品视频 |