本文整理汇总了PHP中getShopBasePath函数的典型用法代码示例。如果您正苦于以下问题:PHP getShopBasePath函数的具体用法?PHP getShopBasePath怎么用?PHP getShopBasePath使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getShopBasePath函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: testGetSmarty
/**
* @covers chromephp_oxutilsview::getSmarty
*/
public function testGetSmarty()
{
$sTest = getShopBasePath() . 'modules/debugax/smarty';
$oTestClass = $this->getMock('chromephp_oxutilsview', array('_debugaxGetPluginDirectories'));
$oTestClass->expects($this->once())->method('_debugaxGetPluginDirectories')->will($this->returnValue($sTest));
$this->assertTrue($oTestClass->getSmarty() instanceof Smarty);
}
开发者ID:OXIDprojects,项目名称:debugax,代码行数:10,代码来源:oxutilsviewTest.php
示例2: testGetFileContents
/**
* Testing Utilities::getFileContents()
*
* @return null
*/
public function testGetFileContents()
{
$sLicenseFile = "lizenz.txt";
$sFilePath = getShopBasePath() . "Setup/En/{$sLicenseFile}";
$oUtils = new Utilities();
$this->assertEquals(file_get_contents($sFilePath), $oUtils->getFileContents($sFilePath));
}
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:12,代码来源:UtilitiesTest.php
示例3: init
/**
* {@inheritdoc}
*
* @return null|void
*/
public function init()
{
// Duplicated init protection
if ($this->_blInit) {
return;
}
$this->_blInit = true;
$this->_loadVarsFromFile();
include getShopBasePath() . 'core/oxconfk.php';
$this->_setDefaults();
try {
$sShopID = $this->getShopId();
$blConfigLoaded = $this->_loadVarsFromDb($sShopID);
// loading shop config
if (empty($sShopID) || !$blConfigLoaded) {
/** @var oxConnectionException $oEx */
$oEx = oxNew("oxConnectionException");
$oEx->setMessage("Unable to load shop config values from database");
throw $oEx;
}
// loading theme config options
$this->_loadVarsFromDb($sShopID, null, oxConfig::OXMODULE_THEME_PREFIX . $this->getConfigParam('sTheme'));
// checking if custom theme (which has defined parent theme) config options should be loaded over parent theme (#3362)
if ($this->getConfigParam('sCustomTheme')) {
$this->_loadVarsFromDb($sShopID, null, oxConfig::OXMODULE_THEME_PREFIX . $this->getConfigParam('sCustomTheme'));
}
// loading modules config
$this->_loadVarsFromDb($sShopID, null, oxConfig::OXMODULE_MODULE_PREFIX);
$aOnlyMainShopVars = array('blMallUsers', 'aSerials', 'IMD', 'IMA', 'IMS');
$this->_loadVarsFromDb($this->getBaseShopId(), $aOnlyMainShopVars);
} catch (oxConnectionException $oEx) {
$oEx->debugOut();
oxRegistry::getUtils()->showMessageAndExit($oEx->getString());
}
}
开发者ID:ddpkts,项目名称:oxid-console,代码行数:40,代码来源:oxspecificshopconfig.php
示例4: init
public function init()
{
if ($this->_blInit) {
return;
}
$this->_blInit = true;
$this->_loadVarsFromFile();
include getShopBasePath() . 'Core/oxconfk.php';
$this->_setDefaults();
}
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:10,代码来源:oxconfigTest.php
示例5: getDirectoryPath
/**
* Forms path to edition directory.
*
* @return string
*/
public function getDirectoryPath()
{
$path = rtrim(getShopBasePath(), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
if ($this->getEditionSelector()->isEnterprise()) {
$path .= static::EDITIONS_DIRECTORY . DIRECTORY_SEPARATOR . static::ENTERPRISE_DIRECTORY . DIRECTORY_SEPARATOR;
}
if ($this->getEditionSelector()->isProfessional()) {
$path .= static::EDITIONS_DIRECTORY . DIRECTORY_SEPARATOR . static::PROFESSIONAL_DIRECTORY . DIRECTORY_SEPARATOR;
}
return $path;
}
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:16,代码来源:EditionRootPathProvider.php
示例6: setUp
/**
* Prepares test suite.
*/
protected function setUp()
{
parent::setUp();
$invoicePdfOrderClass = getShopBasePath() . 'modules/oe/invoicepdf/controllers/admin/invoicepdforder_overview.php';
if (!file_exists($invoicePdfOrderClass)) {
$this->markTestSkipped('These tests only work when invoicePDF module is present.');
}
if (!class_exists('InvoicepdfOrder_Overview', false)) {
class_alias('Order_Overview', 'InvoicepdfOrder_Overview_parent');
require_once $invoicePdfOrderClass;
}
}
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:15,代码来源:invoicepdforderoverviewTest.php
示例7: getText
/**
* Translates passed index
*
* @param string $sTextIdent translation index
*
* @return string
*/
public function getText($sTextIdent)
{
if ($this->_aLangData === null) {
$this->_aLangData = array();
$sLangFilePath = getShopBasePath() . EditionPathProvider::SETUP_DIRECTORY . '/' . ucfirst($this->getLanguage()) . '/lang.php';
if (file_exists($sLangFilePath) && is_readable($sLangFilePath)) {
$aLang = array();
include $sLangFilePath;
$this->_aLangData = array_merge($aLang, $this->getAdditionalMessages());
}
}
return isset($this->_aLangData[$sTextIdent]) ? $this->_aLangData[$sTextIdent] : null;
}
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:20,代码来源:Language.php
示例8: debugaxAutoload
function debugaxAutoload($sClass)
{
$sClass = basename($sClass);
$sBasePath = getShopBasePath();
$sClass = strtolower($sClass);
$aClassDirs = array($sBasePath . 'modules/debugax/', $sBasePath . 'modules/debugax/Admin/', $sBasePath . 'modules/debugax/Admin/chromephp/', $sBasePath . 'modules/debugax/Admin/helper/', $sBasePath . 'modules/debugax/core/', $sBasePath . 'modules/debugax/view/');
foreach ($aClassDirs as $sDir) {
$sFilename = $sDir . strtolower($sClass) . '.php';
if (file_exists($sFilename)) {
include $sFilename;
return;
}
}
}
开发者ID:OXIDprojects,项目名称:debugax,代码行数:14,代码来源:autoload.php
示例9: setUp
/**
* Prepares test suite.
*/
protected function setUp()
{
parent::setUp();
$invoicePdfOrderClass = getShopBasePath() . 'modules/oe/invoicepdf/models/invoicepdfoxorder.php';
if ($this->getTestConfig()->getShopEdition() == 'EE' || !file_exists($invoicePdfOrderClass)) {
$this->markTestSkipped('These tests only work when invoicePDF module is present.');
}
if (!class_exists('InvoicepdfOxOrder', false)) {
class_alias('oxOrder', 'InvoicepdfOxOrder_parent');
require_once getShopBasePath() . 'modules/oe/invoicepdf/models/invoicepdfoxorder.php';
require_once getShopBasePath() . 'modules/oe/invoicepdf/models/invoicepdfblock.php';
require_once getShopBasePath() . 'modules/oe/invoicepdf/models/invoicepdfarticlesummary.php';
require_once getShopBasePath() . 'Core/oxpdf.php';
}
}
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:18,代码来源:invoicepdfoxorderTest.php
示例10: render
/**
* Executes parent method parent::render(), cretes oxstatistic object,
* passes it's data to Smarty engine and returns name of template file
* "statistic_main.tpl".
*
* @return string
*/
public function render()
{
$myConfig = $this->getConfig();
$oLang = oxRegistry::getLang();
parent::render();
$soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
$aReports = array();
if ($soxId != "-1" && isset($soxId)) {
// load object
$oStat = oxNew("oxstatistic");
$oStat->load($soxId);
$aReports = $oStat->getReports();
$this->_aViewData["edit"] = $oStat;
}
// setting all reports data: check for reports and load them
$sPath = getShopBasePath() . "application/controllers/admin/reports";
$iLanguage = (int) oxRegistry::getConfig()->getRequestParameter("editlanguage");
$aAllreports = array();
$aReportFiles = glob($sPath . "/*.php");
foreach ($aReportFiles as $sFile) {
if (is_file($sFile) && !is_dir($sFile)) {
$sConst = strtoupper(str_replace('.php', '', basename($sFile)));
// skipping base report class
if ($sConst == 'REPORT_BASE') {
continue;
}
include $sFile;
$oItem = new stdClass();
$oItem->filename = basename($sFile);
$oItem->name = $oLang->translateString($sConst, $iLanguage);
$aAllreports[] = $oItem;
}
}
// setting reports data
oxRegistry::getSession()->setVariable("allstat_reports", $aAllreports);
oxRegistry::getSession()->setVariable("stat_reports_{$soxId}", $aReports);
// passing assigned reports count
if (is_array($aReports)) {
$this->_aViewData['ireports'] = count($aReports);
}
if (oxRegistry::getConfig()->getRequestParameter("aoc")) {
$oStatisticMainAjax = oxNew('statistic_main_ajax');
$this->_aViewData['oxajax'] = $oStatisticMainAjax->getColumns();
return "popups/statistic_main.tpl";
}
return "statistic_main.tpl";
}
开发者ID:mibexx,项目名称:oxid_yttutorials,代码行数:54,代码来源:statistic_main.php
示例11: getDirectoryPath
/**
* Returns path to edition directory. If no additional editions are found, returns base path.
*
* @return string
*/
public function getDirectoryPath()
{
if (Registry::instanceExists('oxConfigFile')) {
$configFile = Registry::get('oxConfigFile');
} else {
$configFile = new ConfigFile(getShopBasePath() . '/config.inc.php');
Registry::set('oxConfigFile', $configFile);
}
$editionsPath = $configFile->getVar('vendorDirectory') . '/' . static::EDITIONS_DIRECTORY;
$path = getShopBasePath();
if ($this->getEditionSelector()->isEnterprise()) {
$path = $editionsPath . '/' . static::ENTERPRISE_DIRECTORY;
} elseif ($this->getEditionSelector()->isProfessional()) {
$path = $editionsPath . '/' . static::PROFESSIONAL_DIRECTORY;
}
return realpath($path) . DIRECTORY_SEPARATOR;
}
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:22,代码来源:EditionRootPathProvider.php
示例12: render
/**
* Executes parent method parent::render(), cretes oxstatistic object,
* passes it's data to Smarty engine and returns name of template file
* "statistic_main.tpl".
*
* @return string
*/
public function render()
{
$myConfig = $this->getConfig();
$oLang = oxLang::getInstance();
parent::render();
$soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
$aReports = array();
if ($soxId != "-1" && isset($soxId)) {
// load object
$oStat = oxNew("oxstatistic");
$oStat->load($soxId);
$aReports = $oStat->getReports();
$this->_aViewData["edit"] = $oStat;
}
// setting all reports data: check for reports and load them
$sPath = getShopBasePath() . $myConfig->getConfigParam('sAdminDir') . "/reports";
$iLanguage = (int) oxConfig::getParameter("editlanguage");
$aAllreports = array();
$aReportFiles = glob($sPath . "/*.php");
foreach ($aReportFiles as $sFile) {
if (is_file($sFile) && !is_dir($sFile)) {
$sConst = strtoupper(str_replace('.php', '', basename($sFile)));
// skipping base report class
if ($sConst == 'REPORT_BASE') {
continue;
}
include $sFile;
$oItem = new oxStdClass();
$oItem->filename = basename($sFile);
$oItem->name = $oLang->translateString($sConst, $iLanguage);
$aAllreports[] = $oItem;
}
}
// setting reports data
oxSession::setVar("allstat_reports", $aAllreports);
oxSession::setVar("stat_reports_{$soxId}", $aReports);
// passing assigned reports count
$this->_aViewData['ireports'] = count($aReports);
if (oxConfig::getParameter("aoc")) {
$aColumns = array();
include_once 'inc/' . strtolower(__CLASS__) . '.inc.php';
$this->_aViewData['oxajax'] = $aColumns;
return "popups/statistic_main.tpl";
}
return "statistic_main.tpl";
}
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:53,代码来源:statistic_main.php
示例13: getFilePath
/**
* Tries to find file path for given class. Returns empty string on path not found.
*
* @param string $class
*
* @return string
*/
protected function getFilePath($class)
{
$filePath = '';
$moduleFiles = oxUtilsObject::getInstance()->getModuleVar('aModuleFiles');
if (is_array($moduleFiles)) {
$basePath = getShopBasePath();
foreach ($moduleFiles as $moduleId => $classPaths) {
if ($this->isModuleActive($moduleId) && array_key_exists($class, $classPaths)) {
$moduleFilePath = $basePath . 'modules/' . $classPaths[$class];
if (file_exists($moduleFilePath)) {
$filePath = $moduleFilePath;
}
}
}
}
return $filePath;
}
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:24,代码来源:ModuleAutoload.php
示例14: downloadConnector
/**
* Retrieves connector filename, the contents and saves it to shop directory. Returns connector $sFileName.
*
* @param string $sUsername eFire External Transaction username
* @param string $sPassword eFire External Transaction password
* @param string $sShopVersion eShop version
* @param bool $blSaveCredentials whether to save username and password to config for later use
*
* @return string
*/
public function downloadConnector($sUsername, $sPassword, $sShopVersion, $blSaveCredentials)
{
if ($blSaveCredentials) {
$this->getConfig()->saveShopConfVar('str', 'sEfiUsername', $sUsername);
$this->getConfig()->saveShopConfVar('str', 'sEfiPassword', $sPassword);
} else {
$this->getConfig()->saveShopConfVar('str', 'sEfiUsername', null);
$this->getConfig()->saveShopConfVar('str', 'sEfiPassword', null);
}
$this->_init($sUsername, $sPassword);
$sFileName = getShopBasePath() . "core/" . strtolower(basename($this->_getConnectorClassName($sShopVersion))) . ".php";
$sFileContents = $this->_getConnectorContents($sShopVersion);
//writing to file
$fOut = fopen($sFileName, "w");
if (!fputs($fOut, $sFileContents)) {
throw new oxException('EXCEPTION_COULDNOTWRITETOFILE');
}
fclose($fOut);
//remove possible old connector from the main shop dir
if (file_exists(getShopBasePath() . "oxefi.php")) {
unlink(getShopBasePath() . "oxefi.php");
}
return $sFileName;
}
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:34,代码来源:oxefidownloader.php
示例15: getShopBasePath
<?php
/**
* Barzahlen Payment Module (OXID eShop)
*
* @copyright Copyright (c) 2015 Cash Payment Solutions GmbH (https://www.barzahlen.de)
* @author Alexander Diebler
* @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, version 3 (GPL-3.0)
*/
require_once getShopBasePath() . 'modules/bz_barzahlen/api/loader.php';
/**
* Callback Controller
* Reachable from outside to handle HTTP push notifications on status changes
* for Barzahlen transactions.
*/
class bz_barzahlen_callback extends oxView
{
/**
* HTTP Header Codes
*/
const STATUS_OK = 200;
const STATUS_BAD_REQUEST = 400;
/**
* Transaction status codes.
*/
const STATE_PENDING = "pending";
const STATE_PAID = "paid";
const STATE_EXPIRED = "expired";
const STATE_REFUND_COMPLETED = "refund_completed";
const STATE_REFUND_EXPIRED = "refund_expired";
/**
开发者ID:alexschwarz89,项目名称:Barzahlen-OXID-4.7,代码行数:31,代码来源:bz_barzahlen_callback.php
示例16: getModulePath
/**
* return path to the requested module file
*
* @param string $sModule module name (directory name in modules dir)
* @param string $sFile file name to lookup
*
* @throws oxFileException
*
* @return string
*/
public function getModulePath($sModule, $sFile = '')
{
if (!$sFile || $sFile[0] != '/') {
$sFile = '/' . $sFile;
}
$sFile = rtrim(getShopBasePath(), '/') . '/modules/' . basename($sModule) . $sFile;
if (file_exists($sFile) || is_dir($sFile)) {
return $sFile;
}
$oEx = oxNew("oxFileException", "Requested file not found for module {$sModule} ({$sFile})");
$oEx->debugOut();
throw $oEx;
}
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:23,代码来源:oxviewconfig.php
示例17: _getReservedEntryKeys
/**
* cached getter: check root directory php file names for them not to be in 1st part of seo url
* because then apache will execute that php file instead of url parser
*
* @return array
*/
protected function _getReservedEntryKeys()
{
if (!isset(self::$_aReservedEntryKeys) || !is_array(self::$_aReservedEntryKeys)) {
$sDir = getShopBasePath();
self::$_aReservedEntryKeys = array_map('preg_quote', self::$_aReservedWords, array('#'));
$oStr = getStr();
foreach (glob("{$sDir}/*") as $sFile) {
if ($oStr->preg_match('/^(.+)\\.php[0-9]*$/i', basename($sFile), $aMatches)) {
self::$_aReservedEntryKeys[] = preg_quote($aMatches[0], '#');
self::$_aReservedEntryKeys[] = preg_quote($aMatches[1], '#');
} elseif (is_dir($sFile)) {
self::$_aReservedEntryKeys[] = preg_quote(basename($sFile), '#');
}
}
self::$_aReservedEntryKeys = array_unique(self::$_aReservedEntryKeys);
}
return self::$_aReservedEntryKeys;
}
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:24,代码来源:oxseoencoder.php
示例18: _setMailerPluginDir
/**
* Sets path to PHPMailer plugins
*
* @return null
*/
protected function _setMailerPluginDir()
{
$this->set("PluginDir", getShopBasePath() . "core/phpmailer/");
}
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:9,代码来源:oxemail.php
示例19: checkServerPermissions
/**
* Checks if permissions on servers are correctly setup
*
* @param string $sPath check path [optional]
* @param int $iMinPerm min permission level, default 777 [optional]
*
* @return int
*/
public function checkServerPermissions($sPath = null, $iMinPerm = 777)
{
$sVerPrefix = '';
clearstatcache();
$sPath = $sPath ? $sPath : getShopBasePath();
// special config file check
$sFullPath = $sPath . "config.inc.php";
if (!is_readable($sFullPath) || $this->isAdmin() && is_writable($sFullPath) || !$this->isAdmin() && !is_writable($sFullPath)) {
return 0;
}
$sTmp = "{$sPath}/tmp/";
if (class_exists('oxConfig')) {
$sCfgTmp = $this->getConfig()->getConfigParam('sCompileDir');
if (strpos($sCfgTmp, '<sCompileDir_') === false) {
$sTmp = $sCfgTmp;
}
}
$aPathsToCheck = array($sPath . 'out/pictures/promo/', $sPath . 'out/pictures/master/', $sPath . 'out/pictures/generated/', $sPath . 'out/pictures/media/', $sPath . 'out/media/', $sPath . 'log/', $sTmp);
$iModStat = 2;
$sPathToCheck = reset($aPathsToCheck);
while ($sPathToCheck) {
// missing file/folder?
if (!file_exists($sPathToCheck)) {
$iModStat = 0;
break;
}
if (is_dir($sPathToCheck)) {
// adding subfolders
$aSubF = glob($sPathToCheck . "*", GLOB_ONLYDIR);
if (is_array($aSubF)) {
foreach ($aSubF as $sNewFolder) {
$aPathsToCheck[] = $sNewFolder . "/";
}
}
}
// testing if file permissions >= $iMinPerm
//if ( ( (int) substr( decoct( fileperms( $sFullPath ) ), 2 ) ) < $iMinPerm ) {
if (!is_readable($sPathToCheck) || !is_writable($sPathToCheck)) {
$iModStat = 0;
break;
}
$sPathToCheck = next($aPathsToCheck);
}
return $iModStat;
}
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:53,代码来源:SystemRequirements.php
示例20: version_compare
// Remove standard gallery with javascript
$axZm['removeMorePics'] = true;
// Paths changed for oxid ver. 4.5+
$axZm['oxid4.5'] = version_compare($axZm['oxConfig']->getVersion(), 4.5) >= 0 ? true : false;
// Get all images
$axZm['pictures'] = $this->_tpl_vars['oView']->getPictures();
$axZm['icons'] = $this->_tpl_vars['oView']->getIcons();
if (!empty($axZm['pictures'])) {
foreach ($axZm['pictures'] as $k => $v) {
$axZm['masterImg'][$k] = str_replace($axZm['sShopURL'], '', $v);
$axZm['imgSize'][$k] = getimagesize(getShopBasePath() . $axZm['masterImg'][$k]);
$axZm['masterImg'][$k] = str_replace('out/pictures', '', $axZm['masterImg'][$k]);
$zoomData[$k]['f'] = basename($axZm['masterImg'][$k]);
$zoomData[$k]['p'] = dirname($axZm['masterImg'][$k]);
if ($axZm['oxid4.5']) {
$zoomData[$k]['p'] = str_replace('out/pictures/master', '', str_replace(getShopBasePath(), '', $axZm['oxConfig']->getMasterPictureDir()) . 'product/' . $k . '/');
}
}
$zoomData = strtr(base64_encode(addslashes(gzcompress(serialize($zoomData), 9))), '+/=', '-_,');
} else {
$axZm['noPictures'] = true;
}
// Image title
$axZm['imgAlt'] = strip_tags($this->_tpl_vars['product']->oxarticles__oxtitle->value);
if ($this->_tpl_vars['oxarticles__oxvarselect']->value) {
$axZm['imgAlt'] .= ' ' . $this->_tpl_vars['oxarticles__oxvarselect']->value;
}
// Preview image
echo '<div class="picture axZmContainer" style="width: ' . $axZm['detailSize'][0] . 'px; height: ' . $axZm['detailSize'][1] . 'px">';
echo '<div id="axZm-product-image" style="position: absolute; height: ' . $axZm['detailSize'][1] . 'px; width: ' . $axZm['detailSize'][0] . 'px;">';
echo '<a href="javascript: void(0)" id="axZm-product-link" style="margin: 0px; padding: 0px; position: absolute; z-index: 1; display: block; width: ' . $axZm['detailSize'][0] . 'px; height: ' . $axZm['detailSize'][1] . 'px;">';
开发者ID:jokusafet,项目名称:MagentoSource,代码行数:31,代码来源:oxid_media.php
注:本文中的getShopBasePath函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论