id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
27,600 | OXID-eSales/paymorrow-module | core/oxpspaymorrowlogger.php | OxpsPaymorrowLogger.getErrorLogPath | public function getErrorLogPath()
{
$sLogPath = $this->_sErrorLogPath;
if ( !is_dir( $sLogPath ) ) {
mkdir( $sLogPath, 0777, true );
}
return $sLogPath;
} | php | public function getErrorLogPath()
{
$sLogPath = $this->_sErrorLogPath;
if ( !is_dir( $sLogPath ) ) {
mkdir( $sLogPath, 0777, true );
}
return $sLogPath;
} | [
"public",
"function",
"getErrorLogPath",
"(",
")",
"{",
"$",
"sLogPath",
"=",
"$",
"this",
"->",
"_sErrorLogPath",
";",
"if",
"(",
"!",
"is_dir",
"(",
"$",
"sLogPath",
")",
")",
"{",
"mkdir",
"(",
"$",
"sLogPath",
",",
"0777",
",",
"true",
")",
";",
... | Get error log directory full path.
Also creates missing log folders is needed.
@return bool|string | [
"Get",
"error",
"log",
"directory",
"full",
"path",
".",
"Also",
"creates",
"missing",
"log",
"folders",
"is",
"needed",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowlogger.php#L166-L175 |
27,601 | OXID-eSales/paymorrow-module | core/oxpspaymorrowlogger.php | OxpsPaymorrowLogger._toConvertToString | protected function _toConvertToString( $aArray )
{
$sResult = date( "Y-m-d H:i:s", oxRegistry::get( "oxUtilsDate" )->getTime() ) . PHP_EOL;
$sResult .= str_repeat( '=', 60 ) . PHP_EOL;
foreach ( $aArray as $sKey => $sValue ) {
$sResult .= " $sKey: $sValue" . PHP_EOL;
}
... | php | protected function _toConvertToString( $aArray )
{
$sResult = date( "Y-m-d H:i:s", oxRegistry::get( "oxUtilsDate" )->getTime() ) . PHP_EOL;
$sResult .= str_repeat( '=', 60 ) . PHP_EOL;
foreach ( $aArray as $sKey => $sValue ) {
$sResult .= " $sKey: $sValue" . PHP_EOL;
}
... | [
"protected",
"function",
"_toConvertToString",
"(",
"$",
"aArray",
")",
"{",
"$",
"sResult",
"=",
"date",
"(",
"\"Y-m-d H:i:s\"",
",",
"oxRegistry",
"::",
"get",
"(",
"\"oxUtilsDate\"",
")",
"->",
"getTime",
"(",
")",
")",
".",
"PHP_EOL",
";",
"$",
"sResul... | Converts the data array to string and returns it.
@param $aArray array that needs to be converted
@return string | [
"Converts",
"the",
"data",
"array",
"to",
"string",
"and",
"returns",
"it",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowlogger.php#L232-L244 |
27,602 | OXID-eSales/paymorrow-module | core/oxpspaymorrowlogger.php | OxpsPaymorrowLogger._getFormattedContents | protected function _getFormattedContents( $sLogDirectoryPath, $sFileName, $sFormat )
{
$sFilePath = $sLogDirectoryPath . '/' . $sFileName;
if ( in_array( $sFileName, array('.', '..', '.htaccess') ) or !is_file( $sFilePath ) ) {
return '';
}
$this->setFileName( $sFileNam... | php | protected function _getFormattedContents( $sLogDirectoryPath, $sFileName, $sFormat )
{
$sFilePath = $sLogDirectoryPath . '/' . $sFileName;
if ( in_array( $sFileName, array('.', '..', '.htaccess') ) or !is_file( $sFilePath ) ) {
return '';
}
$this->setFileName( $sFileNam... | [
"protected",
"function",
"_getFormattedContents",
"(",
"$",
"sLogDirectoryPath",
",",
"$",
"sFileName",
",",
"$",
"sFormat",
")",
"{",
"$",
"sFilePath",
"=",
"$",
"sLogDirectoryPath",
".",
"'/'",
".",
"$",
"sFileName",
";",
"if",
"(",
"in_array",
"(",
"$",
... | Get formatted log file content.
@param string $sLogDirectoryPath Log folder path.
@param string $sFileName Log file name.
@param string $sFormat Output format string.
@return string | [
"Get",
"formatted",
"log",
"file",
"content",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowlogger.php#L255-L266 |
27,603 | moodev/php-weasel | lib/Weasel/Annotation/AnnotationReader.php | AnnotationReader.setLogger | public function setLogger(LoggerInterface $logger)
{
$this->logger = $logger;
if (isset($logger)) {
$this->parser->setLogger($logger);
$this->nsParser->setLogger($logger);
}
} | php | public function setLogger(LoggerInterface $logger)
{
$this->logger = $logger;
if (isset($logger)) {
$this->parser->setLogger($logger);
$this->nsParser->setLogger($logger);
}
} | [
"public",
"function",
"setLogger",
"(",
"LoggerInterface",
"$",
"logger",
")",
"{",
"$",
"this",
"->",
"logger",
"=",
"$",
"logger",
";",
"if",
"(",
"isset",
"(",
"$",
"logger",
")",
")",
"{",
"$",
"this",
"->",
"parser",
"->",
"setLogger",
"(",
"$",... | Sets a logger instance on the mixed
@param LoggerInterface $logger
@return null | [
"Sets",
"a",
"logger",
"instance",
"on",
"the",
"mixed"
] | fecc7cc06cae719489cb4490f414ed6530e70831 | https://github.com/moodev/php-weasel/blob/fecc7cc06cae719489cb4490f414ed6530e70831/lib/Weasel/Annotation/AnnotationReader.php#L243-L250 |
27,604 | techdivision/import-product | src/Services/ProductBunchProcessor.php | ProductBunchProcessor.loadEavAttributeOptionValueByAttributeCodeAndStoreIdAndValue | public function loadEavAttributeOptionValueByAttributeCodeAndStoreIdAndValue($attributeCode, $storeId, $value)
{
return $this->getEavAttributeOptionValueRepository()->findOneByAttributeCodeAndStoreIdAndValue($attributeCode, $storeId, $value);
} | php | public function loadEavAttributeOptionValueByAttributeCodeAndStoreIdAndValue($attributeCode, $storeId, $value)
{
return $this->getEavAttributeOptionValueRepository()->findOneByAttributeCodeAndStoreIdAndValue($attributeCode, $storeId, $value);
} | [
"public",
"function",
"loadEavAttributeOptionValueByAttributeCodeAndStoreIdAndValue",
"(",
"$",
"attributeCode",
",",
"$",
"storeId",
",",
"$",
"value",
")",
"{",
"return",
"$",
"this",
"->",
"getEavAttributeOptionValueRepository",
"(",
")",
"->",
"findOneByAttributeCodeA... | Load's and return's the EAV attribute option value with the passed code, store ID and value.
@param string $attributeCode The code of the EAV attribute option to load
@param integer $storeId The store ID of the attribute option to load
@param string $value The value of the attribute option to load
@re... | [
"Load",
"s",
"and",
"return",
"s",
"the",
"EAV",
"attribute",
"option",
"value",
"with",
"the",
"passed",
"code",
"store",
"ID",
"and",
"value",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Services/ProductBunchProcessor.php#L913-L916 |
27,605 | techdivision/import-product | src/Services/ProductBunchProcessor.php | ProductBunchProcessor.persistProduct | public function persistProduct($product, $name = null)
{
// persist the new entity and return the ID
$id = $this->getProductAction()->persist($product, $name);
// add the product to the cache, register the SKU reference as well
$this->getProductRepository()->toCache($product[Member... | php | public function persistProduct($product, $name = null)
{
// persist the new entity and return the ID
$id = $this->getProductAction()->persist($product, $name);
// add the product to the cache, register the SKU reference as well
$this->getProductRepository()->toCache($product[Member... | [
"public",
"function",
"persistProduct",
"(",
"$",
"product",
",",
"$",
"name",
"=",
"null",
")",
"{",
"// persist the new entity and return the ID",
"$",
"id",
"=",
"$",
"this",
"->",
"getProductAction",
"(",
")",
"->",
"persist",
"(",
"$",
"product",
",",
"... | Persist's the passed product data and return's the ID.
@param array $product The product data to persist
@param string|null $name The name of the prepared statement that has to be executed
@return string The ID of the persisted entity | [
"Persist",
"s",
"the",
"passed",
"product",
"data",
"and",
"return",
"s",
"the",
"ID",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Services/ProductBunchProcessor.php#L1020-L1031 |
27,606 | OXID-eSales/paymorrow-module | core/oxpspaymorrowerrorhandler.php | OxpsPaymorrowErrorHandler.getErrorByCode | public function getErrorByCode( $iErrorCode )
{
return array_key_exists( $iErrorCode, $this->_aPublicErrors )
? $this->translateError( $this->_aPublicErrors[$iErrorCode] )
: $this->translateError( $this->_aPublicErrors[3000] ); // If exact error not exist throw general
} | php | public function getErrorByCode( $iErrorCode )
{
return array_key_exists( $iErrorCode, $this->_aPublicErrors )
? $this->translateError( $this->_aPublicErrors[$iErrorCode] )
: $this->translateError( $this->_aPublicErrors[3000] ); // If exact error not exist throw general
} | [
"public",
"function",
"getErrorByCode",
"(",
"$",
"iErrorCode",
")",
"{",
"return",
"array_key_exists",
"(",
"$",
"iErrorCode",
",",
"$",
"this",
"->",
"_aPublicErrors",
")",
"?",
"$",
"this",
"->",
"translateError",
"(",
"$",
"this",
"->",
"_aPublicErrors",
... | Get human readable error message by error code.
@param integer $iErrorCode
@return string | [
"Get",
"human",
"readable",
"error",
"message",
"by",
"error",
"code",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowerrorhandler.php#L58-L63 |
27,607 | OXID-eSales/paymorrow-module | core/oxpspaymorrowerrorhandler.php | OxpsPaymorrowErrorHandler.redirectWithError | public function redirectWithError( $iErrorCode, $sController = 'order' )
{
$sErrorMessage = $this->getErrorByCode( $iErrorCode );
// Set error
$oEx = oxNew( 'oxExceptionToDisplay' );
$oEx->setMessage( $sErrorMessage );
oxRegistry::get( "oxUtilsView" )->addErrorToDisplay( $oE... | php | public function redirectWithError( $iErrorCode, $sController = 'order' )
{
$sErrorMessage = $this->getErrorByCode( $iErrorCode );
// Set error
$oEx = oxNew( 'oxExceptionToDisplay' );
$oEx->setMessage( $sErrorMessage );
oxRegistry::get( "oxUtilsView" )->addErrorToDisplay( $oE... | [
"public",
"function",
"redirectWithError",
"(",
"$",
"iErrorCode",
",",
"$",
"sController",
"=",
"'order'",
")",
"{",
"$",
"sErrorMessage",
"=",
"$",
"this",
"->",
"getErrorByCode",
"(",
"$",
"iErrorCode",
")",
";",
"// Set error",
"$",
"oEx",
"=",
"oxNew",
... | Redirect user to given controller and shows an error.
In case of 'RELOAD_CONFIGURATION_REQUIRED' error, update module settings and redirect.
@codeCoverageIgnore
@param $iErrorCode
@param string $sController | [
"Redirect",
"user",
"to",
"given",
"controller",
"and",
"shows",
"an",
"error",
".",
"In",
"case",
"of",
"RELOAD_CONFIGURATION_REQUIRED",
"error",
"update",
"module",
"settings",
"and",
"redirect",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowerrorhandler.php#L74-L89 |
27,608 | OXID-eSales/paymorrow-module | core/oxpspaymorrowmodule.php | OxpsPaymorrowModule.cleanTmp | public static function cleanTmp( $sClearFolderPath = '' )
{
$sTempFolderPath = realpath(oxRegistry::getConfig()->getConfigParam( 'sCompileDir' ));
if ( !empty( $sClearFolderPath ) and
( strpos( $sClearFolderPath, $sTempFolderPath ) !== false ) and
is_dir( $sClearFolderPath... | php | public static function cleanTmp( $sClearFolderPath = '' )
{
$sTempFolderPath = realpath(oxRegistry::getConfig()->getConfigParam( 'sCompileDir' ));
if ( !empty( $sClearFolderPath ) and
( strpos( $sClearFolderPath, $sTempFolderPath ) !== false ) and
is_dir( $sClearFolderPath... | [
"public",
"static",
"function",
"cleanTmp",
"(",
"$",
"sClearFolderPath",
"=",
"''",
")",
"{",
"$",
"sTempFolderPath",
"=",
"realpath",
"(",
"oxRegistry",
"::",
"getConfig",
"(",
")",
"->",
"getConfigParam",
"(",
"'sCompileDir'",
")",
")",
";",
"if",
"(",
... | Clean temp folder content.
@param string $sClearFolderPath Sub-folder path to delete from. Should be a full, valid path inside temp folder.
@return boolean | [
"Clean",
"temp",
"folder",
"content",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowmodule.php#L121-L159 |
27,609 | OXID-eSales/paymorrow-module | core/oxpspaymorrowmodule.php | OxpsPaymorrowModule.translate | public function translate( $sCode, $blUseModulePrefix = true )
{
if ( $blUseModulePrefix ) {
$sCode = 'PAYMORROW_' . $sCode;
}
return oxRegistry::getLang()->translateString( $sCode, oxRegistry::getLang()->getBaseLanguage(), false );
} | php | public function translate( $sCode, $blUseModulePrefix = true )
{
if ( $blUseModulePrefix ) {
$sCode = 'PAYMORROW_' . $sCode;
}
return oxRegistry::getLang()->translateString( $sCode, oxRegistry::getLang()->getBaseLanguage(), false );
} | [
"public",
"function",
"translate",
"(",
"$",
"sCode",
",",
"$",
"blUseModulePrefix",
"=",
"true",
")",
"{",
"if",
"(",
"$",
"blUseModulePrefix",
")",
"{",
"$",
"sCode",
"=",
"'PAYMORROW_'",
".",
"$",
"sCode",
";",
"}",
"return",
"oxRegistry",
"::",
"getL... | Get translated string bt the translation code.
@param string $sCode
@param boolean $blUseModulePrefix User module translations prefix or not.
@return string | [
"Get",
"translated",
"string",
"bt",
"the",
"translation",
"code",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowmodule.php#L182-L189 |
27,610 | OXID-eSales/paymorrow-module | core/oxpspaymorrowmodule.php | OxpsPaymorrowModule.getCmsContent | public function getCmsContent( $sIdentifier, $blNoHtml = true )
{
/** @var oxContent|oxI18n $oContent */
$oContent = oxNew( 'oxContent' );
$oContent->loadByIdent( trim( (string) $sIdentifier ) );
$sValue = (string) $oContent->oxcontents__oxcontent->getRawValue();
return ( e... | php | public function getCmsContent( $sIdentifier, $blNoHtml = true )
{
/** @var oxContent|oxI18n $oContent */
$oContent = oxNew( 'oxContent' );
$oContent->loadByIdent( trim( (string) $sIdentifier ) );
$sValue = (string) $oContent->oxcontents__oxcontent->getRawValue();
return ( e... | [
"public",
"function",
"getCmsContent",
"(",
"$",
"sIdentifier",
",",
"$",
"blNoHtml",
"=",
"true",
")",
"{",
"/** @var oxContent|oxI18n $oContent */",
"$",
"oContent",
"=",
"oxNew",
"(",
"'oxContent'",
")",
";",
"$",
"oContent",
"->",
"loadByIdent",
"(",
"trim",... | Get CMS snippet content by identified ID.
@param string $sIdentifier
@param bool $blNoHtml
@return string | [
"Get",
"CMS",
"snippet",
"content",
"by",
"identified",
"ID",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowmodule.php#L199-L208 |
27,611 | OXID-eSales/paymorrow-module | core/oxpspaymorrowmodule.php | OxpsPaymorrowModule.getSetting | public function getSetting( $sModuleSettingName, $blUseModulePrefix = true )
{
if ( $blUseModulePrefix ) {
$sModuleSettingName = 'paymorrow' . (string) $sModuleSettingName;
}
return oxRegistry::getConfig()->getConfigParam( (string) $sModuleSettingName );
} | php | public function getSetting( $sModuleSettingName, $blUseModulePrefix = true )
{
if ( $blUseModulePrefix ) {
$sModuleSettingName = 'paymorrow' . (string) $sModuleSettingName;
}
return oxRegistry::getConfig()->getConfigParam( (string) $sModuleSettingName );
} | [
"public",
"function",
"getSetting",
"(",
"$",
"sModuleSettingName",
",",
"$",
"blUseModulePrefix",
"=",
"true",
")",
"{",
"if",
"(",
"$",
"blUseModulePrefix",
")",
"{",
"$",
"sModuleSettingName",
"=",
"'paymorrow'",
".",
"(",
"string",
")",
"$",
"sModuleSettin... | Get module setting value.
@param string $sModuleSettingName Module setting parameter name without module prefix.
@param boolean $blUseModulePrefix User module settings prefix or not.
@return mixed | [
"Get",
"module",
"setting",
"value",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowmodule.php#L218-L225 |
27,612 | OXID-eSales/paymorrow-module | core/oxpspaymorrowmodule.php | OxpsPaymorrowModule.updateSettings | public function updateSettings()
{
// Load the configuration from Paymorrow
/** @var OxpsPaymorrowRequestControllerProxy $oRequestControllerProxy */
$oRequestControllerProxy = oxNew( 'OxpsPaymorrowRequestControllerProxy' );
$aConfigurationResponse = $oRequestControllerProxy->getCon... | php | public function updateSettings()
{
// Load the configuration from Paymorrow
/** @var OxpsPaymorrowRequestControllerProxy $oRequestControllerProxy */
$oRequestControllerProxy = oxNew( 'OxpsPaymorrowRequestControllerProxy' );
$aConfigurationResponse = $oRequestControllerProxy->getCon... | [
"public",
"function",
"updateSettings",
"(",
")",
"{",
"// Load the configuration from Paymorrow",
"/** @var OxpsPaymorrowRequestControllerProxy $oRequestControllerProxy */",
"$",
"oRequestControllerProxy",
"=",
"oxNew",
"(",
"'OxpsPaymorrowRequestControllerProxy'",
")",
";",
"$",
... | Settings update event.
Fetches latest configuration data from Paymorrow and update relevant module settings with it. | [
"Settings",
"update",
"event",
".",
"Fetches",
"latest",
"configuration",
"data",
"from",
"Paymorrow",
"and",
"update",
"relevant",
"module",
"settings",
"with",
"it",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowmodule.php#L241-L285 |
27,613 | OXID-eSales/paymorrow-module | core/oxpspaymorrowmodule.php | OxpsPaymorrowModule.getPaymentTransactionId | public function getPaymentTransactionId($blOnlySessionKey = false)
{
$sTransactionIdKey = sprintf('pm_order_transaction_id%s', $this->getPaymentMethodName());
$sTransactionId = (string) oxRegistry::getSession()->getVariable($sTransactionIdKey);
return empty($blOnlySessionKey) ? $sTransactio... | php | public function getPaymentTransactionId($blOnlySessionKey = false)
{
$sTransactionIdKey = sprintf('pm_order_transaction_id%s', $this->getPaymentMethodName());
$sTransactionId = (string) oxRegistry::getSession()->getVariable($sTransactionIdKey);
return empty($blOnlySessionKey) ? $sTransactio... | [
"public",
"function",
"getPaymentTransactionId",
"(",
"$",
"blOnlySessionKey",
"=",
"false",
")",
"{",
"$",
"sTransactionIdKey",
"=",
"sprintf",
"(",
"'pm_order_transaction_id%s'",
",",
"$",
"this",
"->",
"getPaymentMethodName",
"(",
")",
")",
";",
"$",
"sTransact... | Check session for verified Paymorrow payment method ID and get order transaction ID for the method.
@param bool $blOnlySessionKey If true, only return a session ket of the transaction ID, otherwise - the ID
@return string | [
"Check",
"session",
"for",
"verified",
"Paymorrow",
"payment",
"method",
"ID",
"and",
"get",
"order",
"transaction",
"ID",
"for",
"the",
"method",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowmodule.php#L375-L381 |
27,614 | OXID-eSales/paymorrow-module | controllers/oxpspaymorrowresource.php | OxpsPaymorrowResource._getResource | protected function _getResource( $sResourcePath, $blNoCache = false )
{
$aResponse = null;
if ( !$blNoCache ) {
/** @var OxpsPaymorrowResourceCache $oResourceCache */
$oResourceCache = oxNew( 'OxpsPaymorrowResourceCache' );
$aResponse = $oResourceCache->pop( $sRe... | php | protected function _getResource( $sResourcePath, $blNoCache = false )
{
$aResponse = null;
if ( !$blNoCache ) {
/** @var OxpsPaymorrowResourceCache $oResourceCache */
$oResourceCache = oxNew( 'OxpsPaymorrowResourceCache' );
$aResponse = $oResourceCache->pop( $sRe... | [
"protected",
"function",
"_getResource",
"(",
"$",
"sResourcePath",
",",
"$",
"blNoCache",
"=",
"false",
")",
"{",
"$",
"aResponse",
"=",
"null",
";",
"if",
"(",
"!",
"$",
"blNoCache",
")",
"{",
"/** @var OxpsPaymorrowResourceCache $oResourceCache */",
"$",
"oRe... | Get a resource by path and output the resource content.
@param string $sResourcePath
@param bool $blNoCache forces not to cache resource | [
"Get",
"a",
"resource",
"by",
"path",
"and",
"output",
"the",
"resource",
"content",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/controllers/oxpspaymorrowresource.php#L96-L118 |
27,615 | OXID-eSales/paymorrow-module | controllers/oxpspaymorrowresource.php | OxpsPaymorrowResource._resourceResponse | protected function _resourceResponse( array $aResponse )
{
if ( isset( $aResponse['contentType'] ) ) {
oxRegistry::getUtils()->setHeader( 'Content-Type: ' . $aResponse['contentType'] );
}
if ( isset( $aResponse['body'] ) ) {
print( $aResponse['body'] );
}
... | php | protected function _resourceResponse( array $aResponse )
{
if ( isset( $aResponse['contentType'] ) ) {
oxRegistry::getUtils()->setHeader( 'Content-Type: ' . $aResponse['contentType'] );
}
if ( isset( $aResponse['body'] ) ) {
print( $aResponse['body'] );
}
... | [
"protected",
"function",
"_resourceResponse",
"(",
"array",
"$",
"aResponse",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"aResponse",
"[",
"'contentType'",
"]",
")",
")",
"{",
"oxRegistry",
"::",
"getUtils",
"(",
")",
"->",
"setHeader",
"(",
"'Content-Type: '",... | Sent response headers, content and stop execution to prevent defaults.
@codeCoverageIgnore
@param array $aResponse | [
"Sent",
"response",
"headers",
"content",
"and",
"stop",
"execution",
"to",
"prevent",
"defaults",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/controllers/oxpspaymorrowresource.php#L127-L138 |
27,616 | moodev/php-weasel | lib/Weasel/JsonMarshaller/JsonMapper.php | JsonMapper._registerBuiltInTypes | protected function _registerBuiltInTypes()
{
$this->registerJsonType("boolean", new Types\BoolType(), array("bool"));
$this->registerJsonType("float", new Types\FloatType());
$this->registerJsonType("integer", new Types\IntType(), array("int"));
$this->registerJsonType("string", new ... | php | protected function _registerBuiltInTypes()
{
$this->registerJsonType("boolean", new Types\BoolType(), array("bool"));
$this->registerJsonType("float", new Types\FloatType());
$this->registerJsonType("integer", new Types\IntType(), array("int"));
$this->registerJsonType("string", new ... | [
"protected",
"function",
"_registerBuiltInTypes",
"(",
")",
"{",
"$",
"this",
"->",
"registerJsonType",
"(",
"\"boolean\"",
",",
"new",
"Types",
"\\",
"BoolType",
"(",
")",
",",
"array",
"(",
"\"bool\"",
")",
")",
";",
"$",
"this",
"->",
"registerJsonType",
... | Setup the types we consider "built-in". | [
"Setup",
"the",
"types",
"we",
"consider",
"built",
"-",
"in",
"."
] | fecc7cc06cae719489cb4490f414ed6530e70831 | https://github.com/moodev/php-weasel/blob/fecc7cc06cae719489cb4490f414ed6530e70831/lib/Weasel/JsonMarshaller/JsonMapper.php#L80-L87 |
27,617 | moodev/php-weasel | lib/Weasel/JsonMarshaller/JsonMapper.php | JsonMapper.writeString | public function writeString($data, $type = null)
{
if (!isset($type)) {
$type = $this->_guessType($data);
}
return $this->_encodeValue($data, $this->_parseTypeString($type));
} | php | public function writeString($data, $type = null)
{
if (!isset($type)) {
$type = $this->_guessType($data);
}
return $this->_encodeValue($data, $this->_parseTypeString($type));
} | [
"public",
"function",
"writeString",
"(",
"$",
"data",
",",
"$",
"type",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"type",
")",
")",
"{",
"$",
"type",
"=",
"$",
"this",
"->",
"_guessType",
"(",
"$",
"data",
")",
";",
"}",
"retur... | Serialize an data to a string of JSON.
@param mixed $data Data to serialize
@param string $type Type of the data being encoded. If not provided then this will be guessed.
Guessing only works with primitives and simple objects.
@return string The JSON | [
"Serialize",
"an",
"data",
"to",
"a",
"string",
"of",
"JSON",
"."
] | fecc7cc06cae719489cb4490f414ed6530e70831 | https://github.com/moodev/php-weasel/blob/fecc7cc06cae719489cb4490f414ed6530e70831/lib/Weasel/JsonMarshaller/JsonMapper.php#L156-L162 |
27,618 | moodev/php-weasel | lib/Weasel/JsonMarshaller/JsonMapper.php | JsonMapper.registerJsonType | public function registerJsonType($name, $handler, $aliases = array())
{
$this->typeHandlers[$name] = $handler;
foreach ($aliases as $alias) {
$this->typeHandlers[$alias] = $handler;
}
} | php | public function registerJsonType($name, $handler, $aliases = array())
{
$this->typeHandlers[$name] = $handler;
foreach ($aliases as $alias) {
$this->typeHandlers[$alias] = $handler;
}
} | [
"public",
"function",
"registerJsonType",
"(",
"$",
"name",
",",
"$",
"handler",
",",
"$",
"aliases",
"=",
"array",
"(",
")",
")",
"{",
"$",
"this",
"->",
"typeHandlers",
"[",
"$",
"name",
"]",
"=",
"$",
"handler",
";",
"foreach",
"(",
"$",
"aliases"... | Register a custom type.
@param string $name
@param Types\JsonType $handler
@param string[] $aliases | [
"Register",
"a",
"custom",
"type",
"."
] | fecc7cc06cae719489cb4490f414ed6530e70831 | https://github.com/moodev/php-weasel/blob/fecc7cc06cae719489cb4490f414ed6530e70831/lib/Weasel/JsonMarshaller/JsonMapper.php#L673-L679 |
27,619 | moodev/php-weasel | lib/Weasel/JsonMarshaller/JsonMapper.php | JsonMapper.registerType | public function registerType($name, $handler, $aliases = array())
{
trigger_error("Types are deprecated, use JsonTypes through registerJsonType.", E_USER_DEPRECATED);
$this->registerJsonType($name, new OldTypeWrapper($handler), $aliases);
} | php | public function registerType($name, $handler, $aliases = array())
{
trigger_error("Types are deprecated, use JsonTypes through registerJsonType.", E_USER_DEPRECATED);
$this->registerJsonType($name, new OldTypeWrapper($handler), $aliases);
} | [
"public",
"function",
"registerType",
"(",
"$",
"name",
",",
"$",
"handler",
",",
"$",
"aliases",
"=",
"array",
"(",
")",
")",
"{",
"trigger_error",
"(",
"\"Types are deprecated, use JsonTypes through registerJsonType.\"",
",",
"E_USER_DEPRECATED",
")",
";",
"$",
... | Register an old style custom type.
This is a compatibility handler and will be removed. Please use registerJsonType!
@Deprecated
@param string $name
@param Types\Type $handler
@param string[] $aliases | [
"Register",
"an",
"old",
"style",
"custom",
"type",
".",
"This",
"is",
"a",
"compatibility",
"handler",
"and",
"will",
"be",
"removed",
".",
"Please",
"use",
"registerJsonType!"
] | fecc7cc06cae719489cb4490f414ed6530e70831 | https://github.com/moodev/php-weasel/blob/fecc7cc06cae719489cb4490f414ed6530e70831/lib/Weasel/JsonMarshaller/JsonMapper.php#L689-L693 |
27,620 | techdivision/import-product | src/Subjects/AbstractProductSubject.php | AbstractProductSubject.getTaxClassIdByTaxClassName | public function getTaxClassIdByTaxClassName($taxClassName)
{
// query whether or not, the requested tax class is available
if (isset($this->taxClasses[$taxClassName])) {
return (integer) $this->taxClasses[$taxClassName][MemberNames::CLASS_ID];
}
// throw an exception, i... | php | public function getTaxClassIdByTaxClassName($taxClassName)
{
// query whether or not, the requested tax class is available
if (isset($this->taxClasses[$taxClassName])) {
return (integer) $this->taxClasses[$taxClassName][MemberNames::CLASS_ID];
}
// throw an exception, i... | [
"public",
"function",
"getTaxClassIdByTaxClassName",
"(",
"$",
"taxClassName",
")",
"{",
"// query whether or not, the requested tax class is available",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"taxClasses",
"[",
"$",
"taxClassName",
"]",
")",
")",
"{",
"return",
... | Return's the tax class ID for the passed tax class name.
@param string $taxClassName The tax class name to return the ID for
@return integer The tax class ID
@throws \Exception Is thrown, if the tax class with the requested name is not available | [
"Return",
"s",
"the",
"tax",
"class",
"ID",
"for",
"the",
"passed",
"tax",
"class",
"name",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Subjects/AbstractProductSubject.php#L436-L450 |
27,621 | techdivision/import-product | src/Subjects/AbstractProductSubject.php | AbstractProductSubject.getRootCategory | public function getRootCategory()
{
// load the default store
$defaultStore = $this->getDefaultStore();
// load the actual store view code
$storeViewCode = $this->getStoreViewCode($defaultStore[MemberNames::CODE]);
// query weather or not we've a root category or not
... | php | public function getRootCategory()
{
// load the default store
$defaultStore = $this->getDefaultStore();
// load the actual store view code
$storeViewCode = $this->getStoreViewCode($defaultStore[MemberNames::CODE]);
// query weather or not we've a root category or not
... | [
"public",
"function",
"getRootCategory",
"(",
")",
"{",
"// load the default store",
"$",
"defaultStore",
"=",
"$",
"this",
"->",
"getDefaultStore",
"(",
")",
";",
"// load the actual store view code",
"$",
"storeViewCode",
"=",
"$",
"this",
"->",
"getStoreViewCode",
... | Return's the root category for the actual view store.
@return array The store's root category
@throws \Exception Is thrown if the root category for the passed store code is NOT available | [
"Return",
"s",
"the",
"root",
"category",
"for",
"the",
"actual",
"view",
"store",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Subjects/AbstractProductSubject.php#L552-L572 |
27,622 | techdivision/import-product | src/Subjects/AbstractProductSubject.php | AbstractProductSubject.getStoreViewCodesByWebsiteCode | public function getStoreViewCodesByWebsiteCode($websiteCode)
{
// query whether or not the website with the passed code exists
if (!isset($this->storeWebsites[$websiteCode])) {
// throw an exception if the website is NOT available
throw new \Exception(
$this-... | php | public function getStoreViewCodesByWebsiteCode($websiteCode)
{
// query whether or not the website with the passed code exists
if (!isset($this->storeWebsites[$websiteCode])) {
// throw an exception if the website is NOT available
throw new \Exception(
$this-... | [
"public",
"function",
"getStoreViewCodesByWebsiteCode",
"(",
"$",
"websiteCode",
")",
"{",
"// query whether or not the website with the passed code exists",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"storeWebsites",
"[",
"$",
"websiteCode",
"]",
")",
")",
"{",... | Returns an array with the codes of the store views related with the passed website code.
@param string $websiteCode The code of the website to return the store view codes for
@return array The array with the matching store view codes | [
"Returns",
"an",
"array",
"with",
"the",
"codes",
"of",
"the",
"store",
"views",
"related",
"with",
"the",
"passed",
"website",
"code",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Subjects/AbstractProductSubject.php#L581-L609 |
27,623 | techdivision/import-product | src/Subjects/AbstractProductSubject.php | AbstractProductSubject.getCleanUpColumns | public function getCleanUpColumns()
{
// load the colums that has to be cleaned-up
$cleanUpColumns = $this->getConfiguration()->getParam(ConfigurationKeys::CLEAN_UP_EMPTY_COLUMNS);
// query whether or not the image columns has to be cleaned-up also
if ($this->getConfiguration()->ha... | php | public function getCleanUpColumns()
{
// load the colums that has to be cleaned-up
$cleanUpColumns = $this->getConfiguration()->getParam(ConfigurationKeys::CLEAN_UP_EMPTY_COLUMNS);
// query whether or not the image columns has to be cleaned-up also
if ($this->getConfiguration()->ha... | [
"public",
"function",
"getCleanUpColumns",
"(",
")",
"{",
"// load the colums that has to be cleaned-up",
"$",
"cleanUpColumns",
"=",
"$",
"this",
"->",
"getConfiguration",
"(",
")",
"->",
"getParam",
"(",
"ConfigurationKeys",
"::",
"CLEAN_UP_EMPTY_COLUMNS",
")",
";",
... | Merge the columns from the configuration with all image type columns to define which
columns should be cleaned-up.
@return array The columns that has to be cleaned-up | [
"Merge",
"the",
"columns",
"from",
"the",
"configuration",
"with",
"all",
"image",
"type",
"columns",
"to",
"define",
"which",
"columns",
"should",
"be",
"cleaned",
"-",
"up",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Subjects/AbstractProductSubject.php#L617-L638 |
27,624 | techdivision/import-product | src/Subjects/AbstractProductSubject.php | AbstractProductSubject.mapLinkTypeCodeToLinkTypeId | public function mapLinkTypeCodeToLinkTypeId($linkTypeCode)
{
// query weather or not the link type code has been mapped
if (isset($this->linkTypes[$linkTypeCode])) {
return $this->linkTypes[$linkTypeCode][MemberNames::LINK_TYPE_ID];
}
// throw an exception if the link t... | php | public function mapLinkTypeCodeToLinkTypeId($linkTypeCode)
{
// query weather or not the link type code has been mapped
if (isset($this->linkTypes[$linkTypeCode])) {
return $this->linkTypes[$linkTypeCode][MemberNames::LINK_TYPE_ID];
}
// throw an exception if the link t... | [
"public",
"function",
"mapLinkTypeCodeToLinkTypeId",
"(",
"$",
"linkTypeCode",
")",
"{",
"// query weather or not the link type code has been mapped",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"linkTypes",
"[",
"$",
"linkTypeCode",
"]",
")",
")",
"{",
"return",
"$... | Return's the link type ID for the passed link type code.
@param string $linkTypeCode The link type code to return the link type ID for
@return integer The mapped link type ID
@throws \TechDivision\Import\Product\Exceptions\MapLinkTypeCodeToIdException Is thrown if the link type code is not mapped yet | [
"Return",
"s",
"the",
"link",
"type",
"ID",
"for",
"the",
"passed",
"link",
"type",
"code",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Subjects/AbstractProductSubject.php#L690-L704 |
27,625 | techdivision/import-product | src/Subjects/AbstractProductSubject.php | AbstractProductSubject.getProductLinkAttribute | public function getProductLinkAttribute($linkTypeId, $attributeCode)
{
// try to load the link attribute with the passed link type ID and attribute code
foreach ($this->linkAttributes as $linkAttribute) {
if ($linkAttribute[MemberNames::LINK_TYPE_ID] === $linkTypeId &&
$... | php | public function getProductLinkAttribute($linkTypeId, $attributeCode)
{
// try to load the link attribute with the passed link type ID and attribute code
foreach ($this->linkAttributes as $linkAttribute) {
if ($linkAttribute[MemberNames::LINK_TYPE_ID] === $linkTypeId &&
$... | [
"public",
"function",
"getProductLinkAttribute",
"(",
"$",
"linkTypeId",
",",
"$",
"attributeCode",
")",
"{",
"// try to load the link attribute with the passed link type ID and attribute code",
"foreach",
"(",
"$",
"this",
"->",
"linkAttributes",
"as",
"$",
"linkAttribute",
... | Return's the link attribute for the passed link type ID and attribute code.
@param integer $linkTypeId The link type
@param string $attributeCode The attribute code
@return array The link attribute | [
"Return",
"s",
"the",
"link",
"attribute",
"for",
"the",
"passed",
"link",
"type",
"ID",
"and",
"attribute",
"code",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Subjects/AbstractProductSubject.php#L714-L726 |
27,626 | techdivision/import-product | src/Subjects/AbstractProductSubject.php | AbstractProductSubject.getProductLinkAttributeByLinkTypeCodeAndAttributeCode | public function getProductLinkAttributeByLinkTypeCodeAndAttributeCode($linkTypeCode, $attributeCode)
{
// map the link type code => ID
$linkTypeId = $this->mapLinkTypeCodeToLinkTypeId($linkTypeCode);
// try to load the link attribute with the passed link type ID and attribute code
... | php | public function getProductLinkAttributeByLinkTypeCodeAndAttributeCode($linkTypeCode, $attributeCode)
{
// map the link type code => ID
$linkTypeId = $this->mapLinkTypeCodeToLinkTypeId($linkTypeCode);
// try to load the link attribute with the passed link type ID and attribute code
... | [
"public",
"function",
"getProductLinkAttributeByLinkTypeCodeAndAttributeCode",
"(",
"$",
"linkTypeCode",
",",
"$",
"attributeCode",
")",
"{",
"// map the link type code => ID",
"$",
"linkTypeId",
"=",
"$",
"this",
"->",
"mapLinkTypeCodeToLinkTypeId",
"(",
"$",
"linkTypeCode... | Return's the link attribute for the passed link type and attribute code.
@param string $linkTypeCode The link type code
@param string $attributeCode The attribute code
@return array The link attribute | [
"Return",
"s",
"the",
"link",
"attribute",
"for",
"the",
"passed",
"link",
"type",
"and",
"attribute",
"code",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Subjects/AbstractProductSubject.php#L736-L751 |
27,627 | techdivision/import-product | src/Subjects/AbstractProductSubject.php | AbstractProductSubject.getProductLinkAttributes | public function getProductLinkAttributes($linkTypeCode)
{
// map the link type code => ID
$linkTypeId = $this->mapLinkTypeCodeToLinkTypeId($linkTypeCode);
// initialize the array for the link attributes
$linkAttributes = array();
// try to load the link attribute with the ... | php | public function getProductLinkAttributes($linkTypeCode)
{
// map the link type code => ID
$linkTypeId = $this->mapLinkTypeCodeToLinkTypeId($linkTypeCode);
// initialize the array for the link attributes
$linkAttributes = array();
// try to load the link attribute with the ... | [
"public",
"function",
"getProductLinkAttributes",
"(",
"$",
"linkTypeCode",
")",
"{",
"// map the link type code => ID",
"$",
"linkTypeId",
"=",
"$",
"this",
"->",
"mapLinkTypeCodeToLinkTypeId",
"(",
"$",
"linkTypeCode",
")",
";",
"// initialize the array for the link attri... | Returns the product link attributes for the passed link type code.
@param string $linkTypeCode The link type code
@return array The product link types | [
"Returns",
"the",
"product",
"link",
"attributes",
"for",
"the",
"passed",
"link",
"type",
"code",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Subjects/AbstractProductSubject.php#L760-L779 |
27,628 | techdivision/import-product | src/Subjects/AbstractProductSubject.php | AbstractProductSubject.mapLinkTypeCodeToColumnName | public function mapLinkTypeCodeToColumnName($linkTypeCode)
{
// query whether or not the link type code has a mapping
if (isset($this->linkTypeCodeToColumnNameMapping[$linkTypeCode])) {
return $this->linkTypeCodeToColumnNameMapping[$linkTypeCode];
}
// return the passed... | php | public function mapLinkTypeCodeToColumnName($linkTypeCode)
{
// query whether or not the link type code has a mapping
if (isset($this->linkTypeCodeToColumnNameMapping[$linkTypeCode])) {
return $this->linkTypeCodeToColumnNameMapping[$linkTypeCode];
}
// return the passed... | [
"public",
"function",
"mapLinkTypeCodeToColumnName",
"(",
"$",
"linkTypeCode",
")",
"{",
"// query whether or not the link type code has a mapping",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"linkTypeCodeToColumnNameMapping",
"[",
"$",
"linkTypeCode",
"]",
")",
")",
"... | Maps the link type code to the apropriate column name.
@param string $linkTypeCode The link type code to map
@return string The mapped column name | [
"Maps",
"the",
"link",
"type",
"code",
"to",
"the",
"apropriate",
"column",
"name",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Subjects/AbstractProductSubject.php#L788-L798 |
27,629 | techdivision/import-product | src/Subjects/AbstractProductSubject.php | AbstractProductSubject.prepareLinkTypeMappings | public function prepareLinkTypeMappings()
{
// initialize the array with link type mappings
$linkTypeMappings = array();
// prepare the link type mappings
foreach ($this->getLinkTypes() as $linkType) {
// map the link type code to the column name, if necessary
... | php | public function prepareLinkTypeMappings()
{
// initialize the array with link type mappings
$linkTypeMappings = array();
// prepare the link type mappings
foreach ($this->getLinkTypes() as $linkType) {
// map the link type code to the column name, if necessary
... | [
"public",
"function",
"prepareLinkTypeMappings",
"(",
")",
"{",
"// initialize the array with link type mappings",
"$",
"linkTypeMappings",
"=",
"array",
"(",
")",
";",
"// prepare the link type mappings",
"foreach",
"(",
"$",
"this",
"->",
"getLinkTypes",
"(",
")",
"as... | Return's the link type code => colums mapping.
@return array The mapping with the link type codes => colums | [
"Return",
"s",
"the",
"link",
"type",
"code",
"=",
">",
"colums",
"mapping",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Subjects/AbstractProductSubject.php#L805-L845 |
27,630 | techdivision/import-product | src/Subjects/AbstractProductSubject.php | AbstractProductSubject.getLinkTypeColumnCallback | public function getLinkTypeColumnCallback($columnName)
{
// query whether or not a callback mapping is available
if (isset($this->linkTypeAttributeColumnToCallbackMapping[$columnName])) {
// load it from the array with the mappings
list (, $callbackName) = $this->linkTypeAtt... | php | public function getLinkTypeColumnCallback($columnName)
{
// query whether or not a callback mapping is available
if (isset($this->linkTypeAttributeColumnToCallbackMapping[$columnName])) {
// load it from the array with the mappings
list (, $callbackName) = $this->linkTypeAtt... | [
"public",
"function",
"getLinkTypeColumnCallback",
"(",
"$",
"columnName",
")",
"{",
"// query whether or not a callback mapping is available",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"linkTypeAttributeColumnToCallbackMapping",
"[",
"$",
"columnName",
"]",
")",
")",
... | Returns the callback method used to extract the value of the passed
column to create the link type attribute value with.
@param string $columnName The column name to create the callback for
@return callable The callback | [
"Returns",
"the",
"callback",
"method",
"used",
"to",
"extract",
"the",
"value",
"of",
"the",
"passed",
"column",
"to",
"create",
"the",
"link",
"type",
"attribute",
"value",
"with",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Subjects/AbstractProductSubject.php#L855-L868 |
27,631 | OXID-eSales/paymorrow-module | core/oxpspaymorrowsettings.php | OxpsPaymorrowSettings.getSettings | public function getSettings()
{
$aValidSettings = $this->getValidSettings();
$aSettings = array();
foreach ( $aValidSettings as $sSettingName ) {
$aSettings[$sSettingName] = $this->getSetting( $sSettingName );
}
return $aSettings;
} | php | public function getSettings()
{
$aValidSettings = $this->getValidSettings();
$aSettings = array();
foreach ( $aValidSettings as $sSettingName ) {
$aSettings[$sSettingName] = $this->getSetting( $sSettingName );
}
return $aSettings;
} | [
"public",
"function",
"getSettings",
"(",
")",
"{",
"$",
"aValidSettings",
"=",
"$",
"this",
"->",
"getValidSettings",
"(",
")",
";",
"$",
"aSettings",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"aValidSettings",
"as",
"$",
"sSettingName",
")",
"{... | Get Paymorrow settings from OXID DB oxConfig table.
@return array | [
"Get",
"Paymorrow",
"settings",
"from",
"OXID",
"DB",
"oxConfig",
"table",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowsettings.php#L241-L251 |
27,632 | OXID-eSales/paymorrow-module | core/oxpspaymorrowsettings.php | OxpsPaymorrowSettings.getSetting | public function getSetting( $sSettingName, $blUseModulePrefix = true )
{
return in_array( $sSettingName, $this->_aValidPaymorrowSettings )
? $this->_OxpsPaymorrowSettings_getSetting_parent( $sSettingName, true )
: null;
} | php | public function getSetting( $sSettingName, $blUseModulePrefix = true )
{
return in_array( $sSettingName, $this->_aValidPaymorrowSettings )
? $this->_OxpsPaymorrowSettings_getSetting_parent( $sSettingName, true )
: null;
} | [
"public",
"function",
"getSetting",
"(",
"$",
"sSettingName",
",",
"$",
"blUseModulePrefix",
"=",
"true",
")",
"{",
"return",
"in_array",
"(",
"$",
"sSettingName",
",",
"$",
"this",
"->",
"_aValidPaymorrowSettings",
")",
"?",
"$",
"this",
"->",
"_OxpsPaymorrow... | Get specific Paymorrow setting.
@param string $sSettingName
@param bool $sSettingName
@return mixed|null | [
"Get",
"specific",
"Paymorrow",
"setting",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowsettings.php#L261-L266 |
27,633 | OXID-eSales/paymorrow-module | core/oxpspaymorrowsettings.php | OxpsPaymorrowSettings._getKey | protected function _getKey( $sKeyType )
{
$sSettingName = (string) $sKeyType;
$sSettingName .= 'Key';
if ( $this->isSandboxMode() ) {
$sSettingName .= 'Test';
}
$sEncodedKey = (string) $this->getSetting( $sSettingName );
return !empty( $sEncodedKey ) ? ... | php | protected function _getKey( $sKeyType )
{
$sSettingName = (string) $sKeyType;
$sSettingName .= 'Key';
if ( $this->isSandboxMode() ) {
$sSettingName .= 'Test';
}
$sEncodedKey = (string) $this->getSetting( $sSettingName );
return !empty( $sEncodedKey ) ? ... | [
"protected",
"function",
"_getKey",
"(",
"$",
"sKeyType",
")",
"{",
"$",
"sSettingName",
"=",
"(",
"string",
")",
"$",
"sKeyType",
";",
"$",
"sSettingName",
".=",
"'Key'",
";",
"if",
"(",
"$",
"this",
"->",
"isSandboxMode",
"(",
")",
")",
"{",
"$",
"... | Get public or private merchant key or public Paymorrow key setting value.
It verifies if it is Test or Live mode to return corresponding value.
Additionally a base64 decoding is performed.
@param string $sKeyType True for public key, false for private key.
@return mixed | [
"Get",
"public",
"or",
"private",
"merchant",
"key",
"or",
"public",
"Paymorrow",
"key",
"setting",
"value",
".",
"It",
"verifies",
"if",
"it",
"is",
"Test",
"or",
"Live",
"mode",
"to",
"return",
"corresponding",
"value",
".",
"Additionally",
"a",
"base64",
... | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowsettings.php#L278-L290 |
27,634 | techdivision/import-product | src/Repositories/CategoryProductRepository.php | CategoryProductRepository.findAllBySku | public function findAllBySku($sku)
{
// prepare the params
$params = array(MemberNames::SKU => $sku);
// initialize the array for the category product relations
$categoryProducts = array();
// load and return the product category relation for the passed product SKU
... | php | public function findAllBySku($sku)
{
// prepare the params
$params = array(MemberNames::SKU => $sku);
// initialize the array for the category product relations
$categoryProducts = array();
// load and return the product category relation for the passed product SKU
... | [
"public",
"function",
"findAllBySku",
"(",
"$",
"sku",
")",
"{",
"// prepare the params",
"$",
"params",
"=",
"array",
"(",
"MemberNames",
"::",
"SKU",
"=>",
"$",
"sku",
")",
";",
"// initialize the array for the category product relations",
"$",
"categoryProducts",
... | Return's the category product relations for the product with the passed SKU.
@param string $sku The product SKU to load the category relations for
@return array The category product relations for the product with the passed SKU | [
"Return",
"s",
"the",
"category",
"product",
"relations",
"for",
"the",
"product",
"with",
"the",
"passed",
"SKU",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Repositories/CategoryProductRepository.php#L97-L116 |
27,635 | OXID-eSales/paymorrow-module | controllers/admin/oxpspaymorrowpaymentmap.php | OxpsPaymorrowPaymentMap.getPaymorrowEditValue | public function getPaymorrowEditValue()
{
$sOXID = $this->getPaymentObjectId();
if ( $sOXID != "-1" && isset( $sOXID ) ) {
/** @var oxPayment $oPayment */
$oPayment = oxNew( "oxPayment" );
$oPayment->loadInLang( $this->_iEditLang, $sOXID );
$oOtherL... | php | public function getPaymorrowEditValue()
{
$sOXID = $this->getPaymentObjectId();
if ( $sOXID != "-1" && isset( $sOXID ) ) {
/** @var oxPayment $oPayment */
$oPayment = oxNew( "oxPayment" );
$oPayment->loadInLang( $this->_iEditLang, $sOXID );
$oOtherL... | [
"public",
"function",
"getPaymorrowEditValue",
"(",
")",
"{",
"$",
"sOXID",
"=",
"$",
"this",
"->",
"getPaymentObjectId",
"(",
")",
";",
"if",
"(",
"$",
"sOXID",
"!=",
"\"-1\"",
"&&",
"isset",
"(",
"$",
"sOXID",
")",
")",
"{",
"/** @var oxPayment $oPayment... | Get current edited payment object.
@return null|oxPayment | [
"Get",
"current",
"edited",
"payment",
"object",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/controllers/admin/oxpspaymorrowpaymentmap.php#L77-L97 |
27,636 | OXID-eSales/paymorrow-module | controllers/admin/oxpspaymorrowpaymentmap.php | OxpsPaymorrowPaymentMap.save | public function save()
{
$aParams = oxRegistry::getConfig()->getRequestParameter( "editval" );
$sOXID = $aParams['oxpayments__oxid'];
/** @var OxpsPaymorrowOxPayment|oxPayment $oxPayment */
$oxPayment = oxNew( 'oxpayment' );
$oxPayment->load( $sOXID );
$blPaymorrow... | php | public function save()
{
$aParams = oxRegistry::getConfig()->getRequestParameter( "editval" );
$sOXID = $aParams['oxpayments__oxid'];
/** @var OxpsPaymorrowOxPayment|oxPayment $oxPayment */
$oxPayment = oxNew( 'oxpayment' );
$oxPayment->load( $sOXID );
$blPaymorrow... | [
"public",
"function",
"save",
"(",
")",
"{",
"$",
"aParams",
"=",
"oxRegistry",
"::",
"getConfig",
"(",
")",
"->",
"getRequestParameter",
"(",
"\"editval\"",
")",
";",
"$",
"sOXID",
"=",
"$",
"aParams",
"[",
"'oxpayments__oxid'",
"]",
";",
"/** @var OxpsPaym... | Save Payment methods mapping to database
@return string|void | [
"Save",
"Payment",
"methods",
"mapping",
"to",
"database"
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/controllers/admin/oxpspaymorrowpaymentmap.php#L105-L127 |
27,637 | OXID-eSales/paymorrow-module | controllers/admin/oxpspaymorrowpaymentmap.php | OxpsPaymorrowPaymentMap._setDuplicatedFields | protected function _setDuplicatedFields( $oPayment, $aParams )
{
$aDuplicatedFields = (array) $this->_aDuplicatedPaymentFields;
foreach ( $aDuplicatedFields as $sFieldName => $sType ) {
$sField = sprintf( '%s__%s', $oPayment->getCoreTableName(), $sFieldName );
if ( !isset( ... | php | protected function _setDuplicatedFields( $oPayment, $aParams )
{
$aDuplicatedFields = (array) $this->_aDuplicatedPaymentFields;
foreach ( $aDuplicatedFields as $sFieldName => $sType ) {
$sField = sprintf( '%s__%s', $oPayment->getCoreTableName(), $sFieldName );
if ( !isset( ... | [
"protected",
"function",
"_setDuplicatedFields",
"(",
"$",
"oPayment",
",",
"$",
"aParams",
")",
"{",
"$",
"aDuplicatedFields",
"=",
"(",
"array",
")",
"$",
"this",
"->",
"_aDuplicatedPaymentFields",
";",
"foreach",
"(",
"$",
"aDuplicatedFields",
"as",
"$",
"s... | Set payment model duplicated fields values from array.
Makes sure, that field is in the array.
For amount type field validates if value is correct.
@param OxpsPaymorrowOxPayment|oxPayment $oPayment
@param array $aParams
@return OxpsPaymorrowOxPayment|oxPayment | [
"Set",
"payment",
"model",
"duplicated",
"fields",
"values",
"from",
"array",
".",
"Makes",
"sure",
"that",
"field",
"is",
"in",
"the",
"array",
".",
"For",
"amount",
"type",
"field",
"validates",
"if",
"value",
"is",
"correct",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/controllers/admin/oxpspaymorrowpaymentmap.php#L140-L155 |
27,638 | OXID-eSales/paymorrow-module | controllers/admin/oxpspaymorrowpaymentmap.php | OxpsPaymorrowPaymentMap._setDuplicatedField | protected function _setDuplicatedField( $oPayment, $sFieldName, $sType, $aParams, $sField )
{
$mValue = $aParams[$sField];
settype( $mValue, $sType );
if ( ( $sFieldName == 'oxaddsumtype' ) and !in_array( $mValue, array('abs', '%') ) ) {
return false;
}
$oPaymen... | php | protected function _setDuplicatedField( $oPayment, $sFieldName, $sType, $aParams, $sField )
{
$mValue = $aParams[$sField];
settype( $mValue, $sType );
if ( ( $sFieldName == 'oxaddsumtype' ) and !in_array( $mValue, array('abs', '%') ) ) {
return false;
}
$oPaymen... | [
"protected",
"function",
"_setDuplicatedField",
"(",
"$",
"oPayment",
",",
"$",
"sFieldName",
",",
"$",
"sType",
",",
"$",
"aParams",
",",
"$",
"sField",
")",
"{",
"$",
"mValue",
"=",
"$",
"aParams",
"[",
"$",
"sField",
"]",
";",
"settype",
"(",
"$",
... | Check if field if valid and ok to set a value.
@param OxpsPaymorrowOxPayment|oxPayment $oPayment
@param string $sFieldName
@param string $sType
@param array $aParams
@param string $sField
@return bool | [
"Check",
"if",
"field",
"if",
"valid",
"and",
"ok",
"to",
"set",
"a",
"value",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/controllers/admin/oxpspaymorrowpaymentmap.php#L168-L180 |
27,639 | hostnet/accessor-generator-plugin-lib | src/Reflection/ReflectionProperty.php | ReflectionProperty.setModifiers | private function setModifiers(?int $modifiers): void
{
// Default to private.
if ($modifiers === null) {
$this->modifiers = \ReflectionProperty::IS_PRIVATE;
return;
}
// Get the number of active visibility modifiers amount all modifies.
$active_visib... | php | private function setModifiers(?int $modifiers): void
{
// Default to private.
if ($modifiers === null) {
$this->modifiers = \ReflectionProperty::IS_PRIVATE;
return;
}
// Get the number of active visibility modifiers amount all modifies.
$active_visib... | [
"private",
"function",
"setModifiers",
"(",
"?",
"int",
"$",
"modifiers",
")",
":",
"void",
"{",
"// Default to private.",
"if",
"(",
"$",
"modifiers",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"modifiers",
"=",
"\\",
"ReflectionProperty",
"::",
"IS_PRIVAT... | Check modifiers for right type and to have at least a visibility bit
enabled. Also turns null into private visibility.
@throws \InvalidArgumentException
@throws \DomainException
@param int|null $modifiers | [
"Check",
"modifiers",
"for",
"right",
"type",
"and",
"to",
"have",
"at",
"least",
"a",
"visibility",
"bit",
"enabled",
".",
"Also",
"turns",
"null",
"into",
"private",
"visibility",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Reflection/ReflectionProperty.php#L63-L88 |
27,640 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxorder.php | OxpsPaymorrowOxOrder.finalizeOrder | public function finalizeOrder( \OxidEsales\Eshop\Application\Model\Basket $oBasket, $oUser, $blRecalculatingOrder = false )
{
$mReturn = $this->_OxpsPaymorrowOxOrder_finalizeOrder_parent( $oBasket, $oUser, $blRecalculatingOrder );
if ( ( $this->oxorder__oxtransstatus->value == 'OK' ) and $this->_wa... | php | public function finalizeOrder( \OxidEsales\Eshop\Application\Model\Basket $oBasket, $oUser, $blRecalculatingOrder = false )
{
$mReturn = $this->_OxpsPaymorrowOxOrder_finalizeOrder_parent( $oBasket, $oUser, $blRecalculatingOrder );
if ( ( $this->oxorder__oxtransstatus->value == 'OK' ) and $this->_wa... | [
"public",
"function",
"finalizeOrder",
"(",
"\\",
"OxidEsales",
"\\",
"Eshop",
"\\",
"Application",
"\\",
"Model",
"\\",
"Basket",
"$",
"oBasket",
",",
"$",
"oUser",
",",
"$",
"blRecalculatingOrder",
"=",
"false",
")",
"{",
"$",
"mReturn",
"=",
"$",
"this"... | Overridden parent method.
Sends an update order Id call to set order number instead of order OXID.
Triggers for complete order payed with a Paymorrow payment method.
@param \OxidEsales\Eshop\Application\Model\Basket $oBasket
@param oxUser $oUser
@param bool ... | [
"Overridden",
"parent",
"method",
".",
"Sends",
"an",
"update",
"order",
"Id",
"call",
"to",
"set",
"order",
"number",
"instead",
"of",
"order",
"OXID",
".",
"Triggers",
"for",
"complete",
"order",
"payed",
"with",
"a",
"Paymorrow",
"payment",
"method",
"."
... | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxorder.php#L115-L134 |
27,641 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxorder.php | OxpsPaymorrowOxOrder.getPaymorrowOxUserPaymentReloaded | public function getPaymorrowOxUserPaymentReloaded()
{
$sUserPaymentId = $this->oxorder__oxpaymentid->value;
/** @var oxUserPayment $oUserPayment */
$oUserPayment = oxNew( 'oxUserPayment' );
$oUserPayment->load( $sUserPaymentId );
return $oUserPayment;
} | php | public function getPaymorrowOxUserPaymentReloaded()
{
$sUserPaymentId = $this->oxorder__oxpaymentid->value;
/** @var oxUserPayment $oUserPayment */
$oUserPayment = oxNew( 'oxUserPayment' );
$oUserPayment->load( $sUserPaymentId );
return $oUserPayment;
} | [
"public",
"function",
"getPaymorrowOxUserPaymentReloaded",
"(",
")",
"{",
"$",
"sUserPaymentId",
"=",
"$",
"this",
"->",
"oxorder__oxpaymentid",
"->",
"value",
";",
"/** @var oxUserPayment $oUserPayment */",
"$",
"oUserPayment",
"=",
"oxNew",
"(",
"'oxUserPayment'",
")"... | Get user payment instance related to the order.
@return oxUserPayment | [
"Get",
"user",
"payment",
"instance",
"related",
"to",
"the",
"order",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxorder.php#L141-L150 |
27,642 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxorder.php | OxpsPaymorrowOxOrder.getOrderDate | public function getOrderDate()
{
if ( empty( $this->oxorder__oxorderdate->value ) ) {
return '';
}
return date( 'Y-m-d', strtotime( $this->oxorder__oxorderdate->value ) );
} | php | public function getOrderDate()
{
if ( empty( $this->oxorder__oxorderdate->value ) ) {
return '';
}
return date( 'Y-m-d', strtotime( $this->oxorder__oxorderdate->value ) );
} | [
"public",
"function",
"getOrderDate",
"(",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"oxorder__oxorderdate",
"->",
"value",
")",
")",
"{",
"return",
"''",
";",
"}",
"return",
"date",
"(",
"'Y-m-d'",
",",
"strtotime",
"(",
"$",
"this",
"->",... | Get order creation date.
@return string | [
"Get",
"order",
"creation",
"date",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxorder.php#L167-L174 |
27,643 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxorder.php | OxpsPaymorrowOxOrder._wasPaymorrowPaymentUsed | protected function _wasPaymorrowPaymentUsed( oxBasket $oBasket )
{
/** @var OxpsPaymorrowOxPayment|oxPayment $oPayment */
$oPayment = oxNew( 'OxpsPaymorrowOxPayment' );
if ( $oPayment->load( $oBasket->getPaymentId() ) and $oPayment->isPaymorrowActiveAndMapped() ) {
return true;
... | php | protected function _wasPaymorrowPaymentUsed( oxBasket $oBasket )
{
/** @var OxpsPaymorrowOxPayment|oxPayment $oPayment */
$oPayment = oxNew( 'OxpsPaymorrowOxPayment' );
if ( $oPayment->load( $oBasket->getPaymentId() ) and $oPayment->isPaymorrowActiveAndMapped() ) {
return true;
... | [
"protected",
"function",
"_wasPaymorrowPaymentUsed",
"(",
"oxBasket",
"$",
"oBasket",
")",
"{",
"/** @var OxpsPaymorrowOxPayment|oxPayment $oPayment */",
"$",
"oPayment",
"=",
"oxNew",
"(",
"'OxpsPaymorrowOxPayment'",
")",
";",
"if",
"(",
"$",
"oPayment",
"->",
"load",
... | Check is valid Paymorrow payment method was used in the checkout ir not.
@param oxBasket $oBasket
@return bool | [
"Check",
"is",
"valid",
"Paymorrow",
"payment",
"method",
"was",
"used",
"in",
"the",
"checkout",
"ir",
"not",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxorder.php#L221-L231 |
27,644 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxorder.php | OxpsPaymorrowOxOrder._OxpsPaymorrowOxOrder_finalizeOrder_parent | protected function _OxpsPaymorrowOxOrder_finalizeOrder_parent( oxBasket $oBasket, $oUser,
$blRecalculatingOrder = false )
{
return parent::finalizeOrder( $oBasket, $oUser, $blRecalculatingOrder );
} | php | protected function _OxpsPaymorrowOxOrder_finalizeOrder_parent( oxBasket $oBasket, $oUser,
$blRecalculatingOrder = false )
{
return parent::finalizeOrder( $oBasket, $oUser, $blRecalculatingOrder );
} | [
"protected",
"function",
"_OxpsPaymorrowOxOrder_finalizeOrder_parent",
"(",
"oxBasket",
"$",
"oBasket",
",",
"$",
"oUser",
",",
"$",
"blRecalculatingOrder",
"=",
"false",
")",
"{",
"return",
"parent",
"::",
"finalizeOrder",
"(",
"$",
"oBasket",
",",
"$",
"oUser",
... | Parent `finalizeOrder` function call.
@codeCoverageIgnore
@param oxBasket $oBasket
@param oxUser|null $oUser
@param bool $blRecalculatingOrder
@return mixed | [
"Parent",
"finalizeOrder",
"function",
"call",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxorder.php#L259-L263 |
27,645 | hostnet/accessor-generator-plugin-lib | src/Twig/PerLineTokenParser.php | PerLineTokenParser.parse | public function parse(Token $token): PerLineNode
{
$stream = $this->parser->getStream();
// perline is a very simple tag, not having anything more than its name
// between the braces, so we expect the closing brace immediately.
$stream->expect(Token::BLOCK_END_TYPE);
// sub... | php | public function parse(Token $token): PerLineNode
{
$stream = $this->parser->getStream();
// perline is a very simple tag, not having anything more than its name
// between the braces, so we expect the closing brace immediately.
$stream->expect(Token::BLOCK_END_TYPE);
// sub... | [
"public",
"function",
"parse",
"(",
"Token",
"$",
"token",
")",
":",
"PerLineNode",
"{",
"$",
"stream",
"=",
"$",
"this",
"->",
"parser",
"->",
"getStream",
"(",
")",
";",
"// perline is a very simple tag, not having anything more than its name",
"// between the brace... | Parses perline token and returns PerLineNode.
Parse everything within the perline block and then restructure the
contents into some thing nice to build a PerLineNode out of.
@param Token $token
@throws SyntaxError
@return PerLineNode | [
"Parses",
"perline",
"token",
"and",
"returns",
"PerLineNode",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Twig/PerLineTokenParser.php#L48-L67 |
27,646 | hostnet/accessor-generator-plugin-lib | src/Twig/PerLineTokenParser.php | PerLineTokenParser.parseBody | private function parseBody(Node $body): PerLineNode
{
$prefix = ''; // Text before the (possibly) multi line expression
$postfix = ''; // Text before the (possibly) multi line expression
$lineno = $body->getTemplateLine(); // The line number wher... | php | private function parseBody(Node $body): PerLineNode
{
$prefix = ''; // Text before the (possibly) multi line expression
$postfix = ''; // Text before the (possibly) multi line expression
$lineno = $body->getTemplateLine(); // The line number wher... | [
"private",
"function",
"parseBody",
"(",
"Node",
"$",
"body",
")",
":",
"PerLineNode",
"{",
"$",
"prefix",
"=",
"''",
";",
"// Text before the (possibly) multi line expression",
"$",
"postfix",
"=",
"''",
";",
"// Text before the (possibly) multi line expression",
"$",
... | Parse the body into a prefix, postfix and all the
other twig nodes that will compile into multiple
lines.
@param Node $body
@return PerLineNode | [
"Parse",
"the",
"body",
"into",
"a",
"prefix",
"postfix",
"and",
"all",
"the",
"other",
"twig",
"nodes",
"that",
"will",
"compile",
"into",
"multiple",
"lines",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Twig/PerLineTokenParser.php#L78-L122 |
27,647 | aimeos/ai-admin-jsonadm | admin/jsonadm/src/Admin/JsonAdm/Base.php | Base.getDomains | protected function getDomains( \Aimeos\MW\View\Iface $view )
{
if( ( $domains = $view->param( 'resource' ) ) == '' )
{
/** admin/jsonadm/domains
* A list of domain names whose clients are available for the JSON API
*
* The HTTP OPTIONS method returns a list of resources known by the
* JSON API i... | php | protected function getDomains( \Aimeos\MW\View\Iface $view )
{
if( ( $domains = $view->param( 'resource' ) ) == '' )
{
/** admin/jsonadm/domains
* A list of domain names whose clients are available for the JSON API
*
* The HTTP OPTIONS method returns a list of resources known by the
* JSON API i... | [
"protected",
"function",
"getDomains",
"(",
"\\",
"Aimeos",
"\\",
"MW",
"\\",
"View",
"\\",
"Iface",
"$",
"view",
")",
"{",
"if",
"(",
"(",
"$",
"domains",
"=",
"$",
"view",
"->",
"param",
"(",
"'resource'",
")",
")",
"==",
"''",
")",
"{",
"/** adm... | Returns the list of domains that are available as resources
@param \Aimeos\MW\View\Iface $view View object with "resource" parameter
@return array List of domain names | [
"Returns",
"the",
"list",
"of",
"domains",
"that",
"are",
"available",
"as",
"resources"
] | 8e4dc6528afcd2199e6555b2e7ead4f75b221005 | https://github.com/aimeos/ai-admin-jsonadm/blob/8e4dc6528afcd2199e6555b2e7ead4f75b221005/admin/jsonadm/src/Admin/JsonAdm/Base.php#L140-L169 |
27,648 | aimeos/ai-admin-jsonadm | admin/jsonadm/src/Admin/JsonAdm/Base.php | Base.getIds | protected function getIds( $request )
{
$ids = [];
if( isset( $request->data ) )
{
foreach( (array) $request->data as $entry )
{
if( isset( $entry->id ) ) {
$ids[] = $entry->id;
}
}
}
return $ids;
} | php | protected function getIds( $request )
{
$ids = [];
if( isset( $request->data ) )
{
foreach( (array) $request->data as $entry )
{
if( isset( $entry->id ) ) {
$ids[] = $entry->id;
}
}
}
return $ids;
} | [
"protected",
"function",
"getIds",
"(",
"$",
"request",
")",
"{",
"$",
"ids",
"=",
"[",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"request",
"->",
"data",
")",
")",
"{",
"foreach",
"(",
"(",
"array",
")",
"$",
"request",
"->",
"data",
"as",
"$",
... | Returns the IDs sent in the request body
@param \stdClass $request Decoded request body
@return array List of item IDs | [
"Returns",
"the",
"IDs",
"sent",
"in",
"the",
"request",
"body"
] | 8e4dc6528afcd2199e6555b2e7ead4f75b221005 | https://github.com/aimeos/ai-admin-jsonadm/blob/8e4dc6528afcd2199e6555b2e7ead4f75b221005/admin/jsonadm/src/Admin/JsonAdm/Base.php#L178-L193 |
27,649 | aimeos/ai-admin-jsonadm | admin/jsonadm/src/Admin/JsonAdm/Base.php | Base.getRefItems | protected function getRefItems( array $listItems )
{
$list = $map = [];
$context = $this->getContext();
foreach( $listItems as $listItem ) {
$map[$listItem->getDomain()][] = $listItem->getRefId();
}
foreach( $map as $domain => $ids )
{
$manager = \Aimeos\MShop::create( $context, $domain );
$sea... | php | protected function getRefItems( array $listItems )
{
$list = $map = [];
$context = $this->getContext();
foreach( $listItems as $listItem ) {
$map[$listItem->getDomain()][] = $listItem->getRefId();
}
foreach( $map as $domain => $ids )
{
$manager = \Aimeos\MShop::create( $context, $domain );
$sea... | [
"protected",
"function",
"getRefItems",
"(",
"array",
"$",
"listItems",
")",
"{",
"$",
"list",
"=",
"$",
"map",
"=",
"[",
"]",
";",
"$",
"context",
"=",
"$",
"this",
"->",
"getContext",
"(",
")",
";",
"foreach",
"(",
"$",
"listItems",
"as",
"$",
"l... | Returns the items associated via a lists table
@param array $listItems List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface
@return array List of items implementing \Aimeos\MShop\Common\Item\Iface | [
"Returns",
"the",
"items",
"associated",
"via",
"a",
"lists",
"table"
] | 8e4dc6528afcd2199e6555b2e7ead4f75b221005 | https://github.com/aimeos/ai-admin-jsonadm/blob/8e4dc6528afcd2199e6555b2e7ead4f75b221005/admin/jsonadm/src/Admin/JsonAdm/Base.php#L226-L246 |
27,650 | aimeos/ai-admin-jsonadm | admin/jsonadm/src/Admin/JsonAdm/Base.php | Base.getAllowedResources | protected function getAllowedResources( \Aimeos\MW\View\Iface $view, array $resources )
{
$config = $this->getContext()->getConfig();
$allowed = [];
foreach( $resources as $resource )
{
if( $view->access( $config->get( 'admin/jsonadm/resource/' . $resource . '/groups', [] ) ) === true ) {
$allowed[] = ... | php | protected function getAllowedResources( \Aimeos\MW\View\Iface $view, array $resources )
{
$config = $this->getContext()->getConfig();
$allowed = [];
foreach( $resources as $resource )
{
if( $view->access( $config->get( 'admin/jsonadm/resource/' . $resource . '/groups', [] ) ) === true ) {
$allowed[] = ... | [
"protected",
"function",
"getAllowedResources",
"(",
"\\",
"Aimeos",
"\\",
"MW",
"\\",
"View",
"\\",
"Iface",
"$",
"view",
",",
"array",
"$",
"resources",
")",
"{",
"$",
"config",
"=",
"$",
"this",
"->",
"getContext",
"(",
")",
"->",
"getConfig",
"(",
... | Returns the list of allowed resources
@param \Aimeos\MW\View\Iface $view View object with "access" helper
@param array List of all available resources
@return array List of allowed resources | [
"Returns",
"the",
"list",
"of",
"allowed",
"resources"
] | 8e4dc6528afcd2199e6555b2e7ead4f75b221005 | https://github.com/aimeos/ai-admin-jsonadm/blob/8e4dc6528afcd2199e6555b2e7ead4f75b221005/admin/jsonadm/src/Admin/JsonAdm/Base.php#L256-L269 |
27,651 | aimeos/ai-admin-jsonadm | admin/jsonadm/src/Admin/JsonAdm/Base.php | Base.saveData | protected function saveData( \Aimeos\MShop\Common\Manager\Iface $manager, \stdClass $request )
{
$data = [];
if( isset( $request->data ) )
{
foreach( (array) $request->data as $entry ) {
$data[] = $this->saveEntry( $manager, $entry );
}
}
return $data;
} | php | protected function saveData( \Aimeos\MShop\Common\Manager\Iface $manager, \stdClass $request )
{
$data = [];
if( isset( $request->data ) )
{
foreach( (array) $request->data as $entry ) {
$data[] = $this->saveEntry( $manager, $entry );
}
}
return $data;
} | [
"protected",
"function",
"saveData",
"(",
"\\",
"Aimeos",
"\\",
"MShop",
"\\",
"Common",
"\\",
"Manager",
"\\",
"Iface",
"$",
"manager",
",",
"\\",
"stdClass",
"$",
"request",
")",
"{",
"$",
"data",
"=",
"[",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
... | Creates of updates several items at once
@param \Aimeos\MShop\Common\Manager\Iface $manager Manager responsible for the items
@param \stdClass $request Object with request body data
@return array List of items | [
"Creates",
"of",
"updates",
"several",
"items",
"at",
"once"
] | 8e4dc6528afcd2199e6555b2e7ead4f75b221005 | https://github.com/aimeos/ai-admin-jsonadm/blob/8e4dc6528afcd2199e6555b2e7ead4f75b221005/admin/jsonadm/src/Admin/JsonAdm/Base.php#L398-L410 |
27,652 | aimeos/ai-admin-jsonadm | admin/jsonadm/src/Admin/JsonAdm/Base.php | Base.saveRelationships | protected function saveRelationships( \Aimeos\MShop\Common\Manager\Iface $manager,
\Aimeos\MShop\Common\Item\Iface $item, \stdClass $relationships )
{
$id = $item->getId();
$listManager = $manager->getSubManager( 'lists' );
foreach( (array) $relationships as $domain => $list )
{
if( isset( $list->data ) ... | php | protected function saveRelationships( \Aimeos\MShop\Common\Manager\Iface $manager,
\Aimeos\MShop\Common\Item\Iface $item, \stdClass $relationships )
{
$id = $item->getId();
$listManager = $manager->getSubManager( 'lists' );
foreach( (array) $relationships as $domain => $list )
{
if( isset( $list->data ) ... | [
"protected",
"function",
"saveRelationships",
"(",
"\\",
"Aimeos",
"\\",
"MShop",
"\\",
"Common",
"\\",
"Manager",
"\\",
"Iface",
"$",
"manager",
",",
"\\",
"Aimeos",
"\\",
"MShop",
"\\",
"Common",
"\\",
"Item",
"\\",
"Iface",
"$",
"item",
",",
"\\",
"st... | Saves the item references associated via the list
@param \Aimeos\MShop\Common\Manager\Iface $manager Manager responsible for the items
@param \Aimeos\MShop\Common\Item\Iface $item Domain item with an unique ID set
@param \stdClass $relationships Object including the <domain>/data/attributes structure | [
"Saves",
"the",
"item",
"references",
"associated",
"via",
"the",
"list"
] | 8e4dc6528afcd2199e6555b2e7ead4f75b221005 | https://github.com/aimeos/ai-admin-jsonadm/blob/8e4dc6528afcd2199e6555b2e7ead4f75b221005/admin/jsonadm/src/Admin/JsonAdm/Base.php#L449-L478 |
27,653 | contributte/thepay-api | src/PermanentPayment.php | PermanentPayment.getSignatureLite | public function getSignatureLite(): string
{
$data = [
'merchantId' => $this->getMerchantConfig()->merchantId,
'accountId' => $this->getMerchantConfig()->accountId,
'merchantData' => $this->getMerchantData(),
'password' => $this->getMerchantConfig()->password,
];
return md5(
http_build_q... | php | public function getSignatureLite(): string
{
$data = [
'merchantId' => $this->getMerchantConfig()->merchantId,
'accountId' => $this->getMerchantConfig()->accountId,
'merchantData' => $this->getMerchantData(),
'password' => $this->getMerchantConfig()->password,
];
return md5(
http_build_q... | [
"public",
"function",
"getSignatureLite",
"(",
")",
":",
"string",
"{",
"$",
"data",
"=",
"[",
"'merchantId'",
"=>",
"$",
"this",
"->",
"getMerchantConfig",
"(",
")",
"->",
"merchantId",
",",
"'accountId'",
"=>",
"$",
"this",
"->",
"getMerchantConfig",
"(",
... | Version of the getSignature method. Used by getPermanentPayment call. | [
"Version",
"of",
"the",
"getSignature",
"method",
".",
"Used",
"by",
"getPermanentPayment",
"call",
"."
] | 7e28eaf30ad1880533add93cf9e7296e61c09b8e | https://github.com/contributte/thepay-api/blob/7e28eaf30ad1880533add93cf9e7296e61c09b8e/src/PermanentPayment.php#L94-L108 |
27,654 | OXID-eSales/paymorrow-module | core/oxpspaymorrowclient.php | OxpsPaymorrowClient.signRequest | public function signRequest( $sRequestString )
{
$hPrivateKey = openssl_get_privatekey(
oxRegistry::get( 'OxpsPaymorrowSettings' )->getPrivateKey()
);
openssl_sign( $sRequestString, $bSignature, $hPrivateKey );
return bin2hex( $bSignature );
} | php | public function signRequest( $sRequestString )
{
$hPrivateKey = openssl_get_privatekey(
oxRegistry::get( 'OxpsPaymorrowSettings' )->getPrivateKey()
);
openssl_sign( $sRequestString, $bSignature, $hPrivateKey );
return bin2hex( $bSignature );
} | [
"public",
"function",
"signRequest",
"(",
"$",
"sRequestString",
")",
"{",
"$",
"hPrivateKey",
"=",
"openssl_get_privatekey",
"(",
"oxRegistry",
"::",
"get",
"(",
"'OxpsPaymorrowSettings'",
")",
"->",
"getPrivateKey",
"(",
")",
")",
";",
"openssl_sign",
"(",
"$"... | Overridden parent method.
Loads private key from the module settings to sign request data.
@param string $sRequestString
@return string | [
"Overridden",
"parent",
"method",
".",
"Loads",
"private",
"key",
"from",
"the",
"module",
"settings",
"to",
"sign",
"request",
"data",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowclient.php#L48-L57 |
27,655 | aimeos/ai-admin-jsonadm | admin/jsonadm/src/Admin/JsonAdm/Common/Factory/Base.php | Base.addClientDecorators | protected static function addClientDecorators( \Aimeos\Admin\JsonAdm\Iface $client,
\Aimeos\MShop\Context\Item\Iface $context, $path )
{
$config = $context->getConfig();
/** admin/jsonadm/common/decorators/default
* Configures the list of decorators applied to all JSON API clients
*
* Decorators extend... | php | protected static function addClientDecorators( \Aimeos\Admin\JsonAdm\Iface $client,
\Aimeos\MShop\Context\Item\Iface $context, $path )
{
$config = $context->getConfig();
/** admin/jsonadm/common/decorators/default
* Configures the list of decorators applied to all JSON API clients
*
* Decorators extend... | [
"protected",
"static",
"function",
"addClientDecorators",
"(",
"\\",
"Aimeos",
"\\",
"Admin",
"\\",
"JsonAdm",
"\\",
"Iface",
"$",
"client",
",",
"\\",
"Aimeos",
"\\",
"MShop",
"\\",
"Context",
"\\",
"Item",
"\\",
"Iface",
"$",
"context",
",",
"$",
"path",... | Adds the decorators to the JSON API client object
@param \Aimeos\Admin\JsonAdm\Common\Iface $client Client object
@param \Aimeos\MShop\Context\Item\Iface $context Context instance with necessary objects
@param string $path Name of the client separated by slashes, e.g "product/property"
@return \Aimeos\Admin\JsonAdm\Co... | [
"Adds",
"the",
"decorators",
"to",
"the",
"JSON",
"API",
"client",
"object"
] | 8e4dc6528afcd2199e6555b2e7ead4f75b221005 | https://github.com/aimeos/ai-admin-jsonadm/blob/8e4dc6528afcd2199e6555b2e7ead4f75b221005/admin/jsonadm/src/Admin/JsonAdm/Common/Factory/Base.php#L48-L110 |
27,656 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxuserpayment.php | OxpsPaymorrowOxUserPayment.load | public function load( $sOxId )
{
$sSQL = sprintf(
'SELECT `OXID`, `OXUSERID`, `OXPAYMENTSID`, DECODE( `OXVALUE`, "%s" ) AS `OXVALUE`,
`OXPSPAYMORROWBANKNAME`, `OXPSPAYMORROWIBAN`, `OXPSPAYMORROWBIC`, `OXPSPAYMORROWORDERID`
FROM `oxuserpayments` WHERE `OXID` = %s',
... | php | public function load( $sOxId )
{
$sSQL = sprintf(
'SELECT `OXID`, `OXUSERID`, `OXPAYMENTSID`, DECODE( `OXVALUE`, "%s" ) AS `OXVALUE`,
`OXPSPAYMORROWBANKNAME`, `OXPSPAYMORROWIBAN`, `OXPSPAYMORROWBIC`, `OXPSPAYMORROWORDERID`
FROM `oxuserpayments` WHERE `OXID` = %s',
... | [
"public",
"function",
"load",
"(",
"$",
"sOxId",
")",
"{",
"$",
"sSQL",
"=",
"sprintf",
"(",
"'SELECT `OXID`, `OXUSERID`, `OXPAYMENTSID`, DECODE( `OXVALUE`, \"%s\" ) AS `OXVALUE`,\n `OXPSPAYMORROWBANKNAME`, `OXPSPAYMORROWIBAN`, `OXPSPAYMORROWBIC`, `OXPSPAYMORROWORDERID`\n ... | Overridden `load` function - loads additional Paymorrow fields in oxUserPayments table.
Loads user payment object.
@param string $sOxId
@return mixed | [
"Overridden",
"load",
"function",
"-",
"loads",
"additional",
"Paymorrow",
"fields",
"in",
"oxUserPayments",
"table",
".",
"Loads",
"user",
"payment",
"object",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxuserpayment.php#L130-L141 |
27,657 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxuserpayment.php | OxpsPaymorrowOxUserPayment.isUserPaymentPaymorrowMethod | public function isUserPaymentPaymorrowMethod()
{
$sPaymentId = $this->oxuserpayments__oxpaymentsid->value;
/** @var OxpsPaymorrowOxPayment|oxPayment $oxPayment */
$oxPayment = oxNew( 'oxPayment' );
$oxPayment->load( $sPaymentId );
return $oxPayment->isPaymorrowActiveAndMapp... | php | public function isUserPaymentPaymorrowMethod()
{
$sPaymentId = $this->oxuserpayments__oxpaymentsid->value;
/** @var OxpsPaymorrowOxPayment|oxPayment $oxPayment */
$oxPayment = oxNew( 'oxPayment' );
$oxPayment->load( $sPaymentId );
return $oxPayment->isPaymorrowActiveAndMapp... | [
"public",
"function",
"isUserPaymentPaymorrowMethod",
"(",
")",
"{",
"$",
"sPaymentId",
"=",
"$",
"this",
"->",
"oxuserpayments__oxpaymentsid",
"->",
"value",
";",
"/** @var OxpsPaymorrowOxPayment|oxPayment $oxPayment */",
"$",
"oxPayment",
"=",
"oxNew",
"(",
"'oxPayment'... | Check if user payment method is mapped to a Paymorrow payment method.
@return bool | [
"Check",
"if",
"user",
"payment",
"method",
"is",
"mapped",
"to",
"a",
"Paymorrow",
"payment",
"method",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxuserpayment.php#L148-L157 |
27,658 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxuserpayment.php | OxpsPaymorrowOxUserPayment.getPaymorrowOxPayment | public function getPaymorrowOxPayment()
{
$sPaymentId = $this->oxuserpayments__oxpaymentsid->value;
$oPayment = oxNew( 'oxPayment' );
$oPayment->load( $sPaymentId );
return $oPayment;
} | php | public function getPaymorrowOxPayment()
{
$sPaymentId = $this->oxuserpayments__oxpaymentsid->value;
$oPayment = oxNew( 'oxPayment' );
$oPayment->load( $sPaymentId );
return $oPayment;
} | [
"public",
"function",
"getPaymorrowOxPayment",
"(",
")",
"{",
"$",
"sPaymentId",
"=",
"$",
"this",
"->",
"oxuserpayments__oxpaymentsid",
"->",
"value",
";",
"$",
"oPayment",
"=",
"oxNew",
"(",
"'oxPayment'",
")",
";",
"$",
"oPayment",
"->",
"load",
"(",
"$",... | Get related payment method.
Used in custom paymorrow email templates.
@return oxPayment | [
"Get",
"related",
"payment",
"method",
".",
"Used",
"in",
"custom",
"paymorrow",
"email",
"templates",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxuserpayment.php#L165-L173 |
27,659 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasket.php | OxpsPaymorrowOxBasket.getPaymorrowBasketLineItems | public function getPaymorrowBasketLineItems()
{
/** @var OxpsPaymorrowOxBasket|oxBasket $this */
$aBasketContents = $this->getContents();
if ( empty( $aBasketContents ) ) {
return array();
}
$iLineItemCount = 1; // must start from 1
$aLineItems = ar... | php | public function getPaymorrowBasketLineItems()
{
/** @var OxpsPaymorrowOxBasket|oxBasket $this */
$aBasketContents = $this->getContents();
if ( empty( $aBasketContents ) ) {
return array();
}
$iLineItemCount = 1; // must start from 1
$aLineItems = ar... | [
"public",
"function",
"getPaymorrowBasketLineItems",
"(",
")",
"{",
"/** @var OxpsPaymorrowOxBasket|oxBasket $this */",
"$",
"aBasketContents",
"=",
"$",
"this",
"->",
"getContents",
"(",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"aBasketContents",
")",
")",
"{",
"r... | Get line items array - summary of bought products, costs and vouchers.
@for: OxpsPaymorrowEshopDataProvider
@return array | [
"Get",
"line",
"items",
"array",
"-",
"summary",
"of",
"bought",
"products",
"costs",
"and",
"vouchers",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasket.php#L48-L75 |
27,660 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasket.php | OxpsPaymorrowOxBasket.getPaymorrowTotalAmount | public function getPaymorrowTotalAmount()
{
/** @var OxpsPaymorrowOxBasket|oxBasket $this */
$dTotalPrice = (double) $this->getPrice()->getPrice();
// Add surcharge price in case it is not yet included in basket
$oSurchargePrice = $this->_getPaymentMethodSurcharge();
if ( ... | php | public function getPaymorrowTotalAmount()
{
/** @var OxpsPaymorrowOxBasket|oxBasket $this */
$dTotalPrice = (double) $this->getPrice()->getPrice();
// Add surcharge price in case it is not yet included in basket
$oSurchargePrice = $this->_getPaymentMethodSurcharge();
if ( ... | [
"public",
"function",
"getPaymorrowTotalAmount",
"(",
")",
"{",
"/** @var OxpsPaymorrowOxBasket|oxBasket $this */",
"$",
"dTotalPrice",
"=",
"(",
"double",
")",
"$",
"this",
"->",
"getPrice",
"(",
")",
"->",
"getPrice",
"(",
")",
";",
"// Add surcharge price in case i... | Get basket total amount.
Also adds surcharge amount if it is needed.
@return float | [
"Get",
"basket",
"total",
"amount",
".",
"Also",
"adds",
"surcharge",
"amount",
"if",
"it",
"is",
"needed",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasket.php#L93-L107 |
27,661 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasket.php | OxpsPaymorrowOxBasket._getPaymorrowAdditionalCostsSummary | protected function _getPaymorrowAdditionalCostsSummary( $iLineItemCount )
{
/** @var OxpsPaymorrowOxBasket|oxBasket $this */
// Line Item numbering after all basket items were summarized
$iLineItem = (int) $iLineItemCount;
// Get cost and add costs VATs
list( $aCostItems, $... | php | protected function _getPaymorrowAdditionalCostsSummary( $iLineItemCount )
{
/** @var OxpsPaymorrowOxBasket|oxBasket $this */
// Line Item numbering after all basket items were summarized
$iLineItem = (int) $iLineItemCount;
// Get cost and add costs VATs
list( $aCostItems, $... | [
"protected",
"function",
"_getPaymorrowAdditionalCostsSummary",
"(",
"$",
"iLineItemCount",
")",
"{",
"/** @var OxpsPaymorrowOxBasket|oxBasket $this */",
"// Line Item numbering after all basket items were summarized",
"$",
"iLineItem",
"=",
"(",
"int",
")",
"$",
"iLineItemCount",
... | Checks if there are any additional costs and returns Line Items array as summary.
@param int $iLineItemCount
@return array | [
"Checks",
"if",
"there",
"are",
"any",
"additional",
"costs",
"and",
"returns",
"Line",
"Items",
"array",
"as",
"summary",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasket.php#L160-L184 |
27,662 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasket.php | OxpsPaymorrowOxBasket._getDefaultCostsSummary | protected function _getDefaultCostsSummary( $iLineItem )
{
/** @var OxpsPaymorrowOxBasket|oxBasket $this */
$aCostItems = array();
$aCosts = (array) $this->getCosts();
foreach ( $aCosts as $sCost => $oPrice ) {
$aItemData = (array) $this->_validateCostPriceAndGetItsDat... | php | protected function _getDefaultCostsSummary( $iLineItem )
{
/** @var OxpsPaymorrowOxBasket|oxBasket $this */
$aCostItems = array();
$aCosts = (array) $this->getCosts();
foreach ( $aCosts as $sCost => $oPrice ) {
$aItemData = (array) $this->_validateCostPriceAndGetItsDat... | [
"protected",
"function",
"_getDefaultCostsSummary",
"(",
"$",
"iLineItem",
")",
"{",
"/** @var OxpsPaymorrowOxBasket|oxBasket $this */",
"$",
"aCostItems",
"=",
"array",
"(",
")",
";",
"$",
"aCosts",
"=",
"(",
"array",
")",
"$",
"this",
"->",
"getCosts",
"(",
")... | Load default shop costs and extract lite items summary.
@param int $iLineItem
@return array Mixed array with line items array as first element and new line count as second element. | [
"Load",
"default",
"shop",
"costs",
"and",
"extract",
"lite",
"items",
"summary",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasket.php#L193-L211 |
27,663 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasket.php | OxpsPaymorrowOxBasket._validateCostPriceAndGetItsData | protected function _validateCostPriceAndGetItsData( $mPrice, $iLineItem, $sCost )
{
if ( empty( $mPrice ) or !is_object( $mPrice ) or !$mPrice->getPrice() ) {
return array();
}
return $aItemData = (array) $this->_getCostSummary( $iLineItem, $sCost, $mPrice );
} | php | protected function _validateCostPriceAndGetItsData( $mPrice, $iLineItem, $sCost )
{
if ( empty( $mPrice ) or !is_object( $mPrice ) or !$mPrice->getPrice() ) {
return array();
}
return $aItemData = (array) $this->_getCostSummary( $iLineItem, $sCost, $mPrice );
} | [
"protected",
"function",
"_validateCostPriceAndGetItsData",
"(",
"$",
"mPrice",
",",
"$",
"iLineItem",
",",
"$",
"sCost",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"mPrice",
")",
"or",
"!",
"is_object",
"(",
"$",
"mPrice",
")",
"or",
"!",
"$",
"mPrice",
... | Validate cost price and get cost line item data array for a valid cost.
@param null|oxPrice $mPrice
@param int $iLineItem
@param string $sCost
@return array | [
"Validate",
"cost",
"price",
"and",
"get",
"cost",
"line",
"item",
"data",
"array",
"for",
"a",
"valid",
"cost",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasket.php#L222-L229 |
27,664 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasket.php | OxpsPaymorrowOxBasket._getCostSummary | protected function _getCostSummary( $iLineItem, $sCostName, $oPrice )
{
$sPmPrefix = OxpsPaymorrowOxBasketItem::getPaymorrowBasketSummaryLineItemPrefix( $iLineItem );
list( $sId, $sName, $sType ) = $this->_getCostMetadata( $sCostName );
if ( empty( $sId ) ) {
return array();
... | php | protected function _getCostSummary( $iLineItem, $sCostName, $oPrice )
{
$sPmPrefix = OxpsPaymorrowOxBasketItem::getPaymorrowBasketSummaryLineItemPrefix( $iLineItem );
list( $sId, $sName, $sType ) = $this->_getCostMetadata( $sCostName );
if ( empty( $sId ) ) {
return array();
... | [
"protected",
"function",
"_getCostSummary",
"(",
"$",
"iLineItem",
",",
"$",
"sCostName",
",",
"$",
"oPrice",
")",
"{",
"$",
"sPmPrefix",
"=",
"OxpsPaymorrowOxBasketItem",
"::",
"getPaymorrowBasketSummaryLineItemPrefix",
"(",
"$",
"iLineItem",
")",
";",
"list",
"(... | Get cost line item summary data as array.
@param integer $iLineItem
@param string $sCostName
@param oxPrice $oPrice
@return array | [
"Get",
"cost",
"line",
"item",
"summary",
"data",
"as",
"array",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasket.php#L240-L262 |
27,665 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasket.php | OxpsPaymorrowOxBasket._getCostMetadata | protected function _getCostMetadata( $sCostName )
{
$aCostsMap = array(
'oxdelivery' => array(
$this->_getShippingId(),
'DeliveryCosts',
'SHIPPING'
),
'oxwrapping' => array(
'Wrapping',
... | php | protected function _getCostMetadata( $sCostName )
{
$aCostsMap = array(
'oxdelivery' => array(
$this->_getShippingId(),
'DeliveryCosts',
'SHIPPING'
),
'oxwrapping' => array(
'Wrapping',
... | [
"protected",
"function",
"_getCostMetadata",
"(",
"$",
"sCostName",
")",
"{",
"$",
"aCostsMap",
"=",
"array",
"(",
"'oxdelivery'",
"=>",
"array",
"(",
"$",
"this",
"->",
"_getShippingId",
"(",
")",
",",
"'DeliveryCosts'",
",",
"'SHIPPING'",
")",
",",
"'oxwra... | Get costs metadata values.
@param string $sCostName
@return array Cost metadata array: ID, Name, Type | [
"Get",
"costs",
"metadata",
"values",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasket.php#L291-L322 |
27,666 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasket.php | OxpsPaymorrowOxBasket._getShippingId | protected function _getShippingId()
{
/** @var OxpsPaymorrowOxBasket|oxBasket $this */
$sId = (string) $this->getShippingId();
if ( !empty( $sId ) ) {
$sId = $this->_toUtf( $sId );
} else {
$sId = 'shippingCosts';
}
return $sId;
} | php | protected function _getShippingId()
{
/** @var OxpsPaymorrowOxBasket|oxBasket $this */
$sId = (string) $this->getShippingId();
if ( !empty( $sId ) ) {
$sId = $this->_toUtf( $sId );
} else {
$sId = 'shippingCosts';
}
return $sId;
} | [
"protected",
"function",
"_getShippingId",
"(",
")",
"{",
"/** @var OxpsPaymorrowOxBasket|oxBasket $this */",
"$",
"sId",
"=",
"(",
"string",
")",
"$",
"this",
"->",
"getShippingId",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"sId",
")",
")",
"{",
"... | Get shipping method ID.
Default value is "shippingCosts".
@return string | [
"Get",
"shipping",
"method",
"ID",
".",
"Default",
"value",
"is",
"shippingCosts",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasket.php#L330-L343 |
27,667 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasket.php | OxpsPaymorrowOxBasket._getPaymentId | protected function _getPaymentId()
{
/** @var OxpsPaymorrowOxBasket|oxBasket $this */
$sId = (string) $this->getPaymentId();
if ( !empty( $sId ) ) {
$sId = $this->_toUtf( $sId );
} else {
$sId = 'PaymentId';
}
return $sId;
} | php | protected function _getPaymentId()
{
/** @var OxpsPaymorrowOxBasket|oxBasket $this */
$sId = (string) $this->getPaymentId();
if ( !empty( $sId ) ) {
$sId = $this->_toUtf( $sId );
} else {
$sId = 'PaymentId';
}
return $sId;
} | [
"protected",
"function",
"_getPaymentId",
"(",
")",
"{",
"/** @var OxpsPaymorrowOxBasket|oxBasket $this */",
"$",
"sId",
"=",
"(",
"string",
")",
"$",
"this",
"->",
"getPaymentId",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"sId",
")",
")",
"{",
"$"... | Get payment method ID.
Default value is "PaymentId".
@return string | [
"Get",
"payment",
"method",
"ID",
".",
"Default",
"value",
"is",
"PaymentId",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasket.php#L351-L364 |
27,668 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasket.php | OxpsPaymorrowOxBasket._getTsProductId | protected function _getTsProductId()
{
/** @var OxpsPaymorrowOxBasket|oxBasket $this */
$sId = method_exists($this, 'getTsProductId')
? (string) $this->getTsProductId()
: '';
if ( !empty( $sId ) ) {
$sId = $this->_toUtf( $sId );
} else {
... | php | protected function _getTsProductId()
{
/** @var OxpsPaymorrowOxBasket|oxBasket $this */
$sId = method_exists($this, 'getTsProductId')
? (string) $this->getTsProductId()
: '';
if ( !empty( $sId ) ) {
$sId = $this->_toUtf( $sId );
} else {
... | [
"protected",
"function",
"_getTsProductId",
"(",
")",
"{",
"/** @var OxpsPaymorrowOxBasket|oxBasket $this */",
"$",
"sId",
"=",
"method_exists",
"(",
"$",
"this",
",",
"'getTsProductId'",
")",
"?",
"(",
"string",
")",
"$",
"this",
"->",
"getTsProductId",
"(",
")",... | Get TS protection ID.
Default value is "TsProtection".
@return string | [
"Get",
"TS",
"protection",
"ID",
".",
"Default",
"value",
"is",
"TsProtection",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasket.php#L372-L387 |
27,669 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasket.php | OxpsPaymorrowOxBasket._getPaymentMethodSurcharge | protected function _getPaymentMethodSurcharge( $mLineItem = null )
{
$oSession = oxRegistry::getSession();
if ( $oSession->getVariable( 'paymentid' ) or
( !$aPaymentPostData = (array) $oSession->getVariable( 'pm_verify' ) ) or
!array_key_exists( 'paymentid', $aPaymentPostD... | php | protected function _getPaymentMethodSurcharge( $mLineItem = null )
{
$oSession = oxRegistry::getSession();
if ( $oSession->getVariable( 'paymentid' ) or
( !$aPaymentPostData = (array) $oSession->getVariable( 'pm_verify' ) ) or
!array_key_exists( 'paymentid', $aPaymentPostD... | [
"protected",
"function",
"_getPaymentMethodSurcharge",
"(",
"$",
"mLineItem",
"=",
"null",
")",
"{",
"$",
"oSession",
"=",
"oxRegistry",
"::",
"getSession",
"(",
")",
";",
"if",
"(",
"$",
"oSession",
"->",
"getVariable",
"(",
"'paymentid'",
")",
"or",
"(",
... | Get payment method surcharge line item by loading it from posted Paymorrow payment form data.
@param null|int $mLineItem If null, then surcharge price object is returned, else surcharge line item data array
@return oxPrice|array | [
"Get",
"payment",
"method",
"surcharge",
"line",
"item",
"by",
"loading",
"it",
"from",
"posted",
"Paymorrow",
"payment",
"form",
"data",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasket.php#L396-L411 |
27,670 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasket.php | OxpsPaymorrowOxBasket._formatPriceItemResponse | protected function _formatPriceItemResponse( $mPrice, $mLineItem )
{
if ( !is_null( $mLineItem ) and is_object( $mPrice ) ) {
return $this->_getCostSummary( (int) $mLineItem, 'oxpayment', $mPrice );
}
return $mPrice;
} | php | protected function _formatPriceItemResponse( $mPrice, $mLineItem )
{
if ( !is_null( $mLineItem ) and is_object( $mPrice ) ) {
return $this->_getCostSummary( (int) $mLineItem, 'oxpayment', $mPrice );
}
return $mPrice;
} | [
"protected",
"function",
"_formatPriceItemResponse",
"(",
"$",
"mPrice",
",",
"$",
"mLineItem",
")",
"{",
"if",
"(",
"!",
"is_null",
"(",
"$",
"mLineItem",
")",
"and",
"is_object",
"(",
"$",
"mPrice",
")",
")",
"{",
"return",
"$",
"this",
"->",
"_getCost... | If line item requested, then return line item data array, otherwise price object fdirectly.
@param array|oxPrice $mPrice
@param null|int $mLineItem
@return array|oxPrice | [
"If",
"line",
"item",
"requested",
"then",
"return",
"line",
"item",
"data",
"array",
"otherwise",
"price",
"object",
"fdirectly",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasket.php#L421-L428 |
27,671 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasket.php | OxpsPaymorrowOxBasket._loadPaymentMethodSurcharge | protected function _loadPaymentMethodSurcharge( $sPaymentId )
{
/** @var oxPayment $oPaymentMethod */
$oPaymentMethod = oxNew( 'oxPayment' );
if ( !$oPaymentMethod->load( $sPaymentId ) or !$oPaymentMethod->getId() ) {
return array();
}
$oPaymentMethod->calculate... | php | protected function _loadPaymentMethodSurcharge( $sPaymentId )
{
/** @var oxPayment $oPaymentMethod */
$oPaymentMethod = oxNew( 'oxPayment' );
if ( !$oPaymentMethod->load( $sPaymentId ) or !$oPaymentMethod->getId() ) {
return array();
}
$oPaymentMethod->calculate... | [
"protected",
"function",
"_loadPaymentMethodSurcharge",
"(",
"$",
"sPaymentId",
")",
"{",
"/** @var oxPayment $oPaymentMethod */",
"$",
"oPaymentMethod",
"=",
"oxNew",
"(",
"'oxPayment'",
")",
";",
"if",
"(",
"!",
"$",
"oPaymentMethod",
"->",
"load",
"(",
"$",
"sP... | Load payment method by ID and calculate its surcharge for the basket.
@param string $sPaymentId
@return array|oxPrice Empty array on failure, price object on success. | [
"Load",
"payment",
"method",
"by",
"ID",
"and",
"calculate",
"its",
"surcharge",
"for",
"the",
"basket",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasket.php#L437-L454 |
27,672 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasket.php | OxpsPaymorrowOxBasket._getPaymorrowVouchersSummary | protected function _getPaymorrowVouchersSummary( $iLineItem )
{
$sPmPrefix = OxpsPaymorrowOxBasketItem::getPaymorrowBasketSummaryLineItemPrefix( $iLineItem );
/** @var oxPrice $oVoucher */
$oVoucher = $this->getVoucherDiscount();
return array(
$sPmPrefix . 'quantity' ... | php | protected function _getPaymorrowVouchersSummary( $iLineItem )
{
$sPmPrefix = OxpsPaymorrowOxBasketItem::getPaymorrowBasketSummaryLineItemPrefix( $iLineItem );
/** @var oxPrice $oVoucher */
$oVoucher = $this->getVoucherDiscount();
return array(
$sPmPrefix . 'quantity' ... | [
"protected",
"function",
"_getPaymorrowVouchersSummary",
"(",
"$",
"iLineItem",
")",
"{",
"$",
"sPmPrefix",
"=",
"OxpsPaymorrowOxBasketItem",
"::",
"getPaymorrowBasketSummaryLineItemPrefix",
"(",
"$",
"iLineItem",
")",
";",
"/** @var oxPrice $oVoucher */",
"$",
"oVoucher",
... | Get voucher discount summary.
@param $iLineItem - Paymorrow line item must be passed in order to properly merge line items.
@return array | [
"Get",
"voucher",
"discount",
"summary",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasket.php#L463-L480 |
27,673 | contributte/thepay-api | src/Helper/ButtonMerchant.php | ButtonMerchant.setButtonStyle | public function setButtonStyle(
?string $buttonStyle,
?string $buttonText = null
): void
{
if (empty($buttonStyle)) {
$buttonStyle = null;
}
$this->buttonStyle = $buttonStyle;
if ($buttonText !== null) {
$this->buttonText = $buttonText;
}
} | php | public function setButtonStyle(
?string $buttonStyle,
?string $buttonText = null
): void
{
if (empty($buttonStyle)) {
$buttonStyle = null;
}
$this->buttonStyle = $buttonStyle;
if ($buttonText !== null) {
$this->buttonText = $buttonText;
}
} | [
"public",
"function",
"setButtonStyle",
"(",
"?",
"string",
"$",
"buttonStyle",
",",
"?",
"string",
"$",
"buttonText",
"=",
"null",
")",
":",
"void",
"{",
"if",
"(",
"empty",
"(",
"$",
"buttonStyle",
")",
")",
"{",
"$",
"buttonStyle",
"=",
"null",
";",... | Sets the buttonStyle property.
@param string|null $buttonStyle String specifying the button style. Can be null
for default text button, or one of button styles specified in the
ThePay API documentation.
@param string $buttonText Optional argument specifying the text that should
be displayed on the button. | [
"Sets",
"the",
"buttonStyle",
"property",
"."
] | 7e28eaf30ad1880533add93cf9e7296e61c09b8e | https://github.com/contributte/thepay-api/blob/7e28eaf30ad1880533add93cf9e7296e61c09b8e/src/Helper/ButtonMerchant.php#L36-L50 |
27,674 | contributte/thepay-api | src/Helper/ButtonMerchant.php | ButtonMerchant.render | public function render(): string
{
$targetUrl = Escaper::htmlEntityEncode(self::buildUrl());
if ($this->buttonStyle === null) {
return "<a href=\"{$targetUrl}\">{$this->buttonText}</a>";
}
$gateUrl = $this->payment->getMerchantConfig()->gateUrl;
$buttonStyle = rawurlencode($this->buttonStyle);
$src =... | php | public function render(): string
{
$targetUrl = Escaper::htmlEntityEncode(self::buildUrl());
if ($this->buttonStyle === null) {
return "<a href=\"{$targetUrl}\">{$this->buttonText}</a>";
}
$gateUrl = $this->payment->getMerchantConfig()->gateUrl;
$buttonStyle = rawurlencode($this->buttonStyle);
$src =... | [
"public",
"function",
"render",
"(",
")",
":",
"string",
"{",
"$",
"targetUrl",
"=",
"Escaper",
"::",
"htmlEntityEncode",
"(",
"self",
"::",
"buildUrl",
"(",
")",
")",
";",
"if",
"(",
"$",
"this",
"->",
"buttonStyle",
"===",
"null",
")",
"{",
"return",... | Return the HTML code for the button. | [
"Return",
"the",
"HTML",
"code",
"for",
"the",
"button",
"."
] | 7e28eaf30ad1880533add93cf9e7296e61c09b8e | https://github.com/contributte/thepay-api/blob/7e28eaf30ad1880533add93cf9e7296e61c09b8e/src/Helper/ButtonMerchant.php#L81-L96 |
27,675 | aimeos/ai-admin-jsonadm | admin/jsonadm/src/Admin/JsonAdm/Catalog/Standard.php | Standard.getListItems | protected function getListItems( array $items, array $include )
{
$manager = \Aimeos\MShop::create( $this->getContext(), 'catalog/lists' );
$search = $manager->createSearch();
$expr = array(
$search->compare( '==', 'catalog.lists.parentid', array_keys( $items ) ),
$search->compare( '==', 'catalog.lists.do... | php | protected function getListItems( array $items, array $include )
{
$manager = \Aimeos\MShop::create( $this->getContext(), 'catalog/lists' );
$search = $manager->createSearch();
$expr = array(
$search->compare( '==', 'catalog.lists.parentid', array_keys( $items ) ),
$search->compare( '==', 'catalog.lists.do... | [
"protected",
"function",
"getListItems",
"(",
"array",
"$",
"items",
",",
"array",
"$",
"include",
")",
"{",
"$",
"manager",
"=",
"\\",
"Aimeos",
"\\",
"MShop",
"::",
"create",
"(",
"$",
"this",
"->",
"getContext",
"(",
")",
",",
"'catalog/lists'",
")",
... | Returns the list items for association relationships
@param array $items List of items implementing \Aimeos\MShop\Common\Item\Iface
@param array $include List of resource types that should be fetched
@return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface | [
"Returns",
"the",
"list",
"items",
"for",
"association",
"relationships"
] | 8e4dc6528afcd2199e6555b2e7ead4f75b221005 | https://github.com/aimeos/ai-admin-jsonadm/blob/8e4dc6528afcd2199e6555b2e7ead4f75b221005/admin/jsonadm/src/Admin/JsonAdm/Catalog/Standard.php#L212-L224 |
27,676 | OXID-eSales/paymorrow-module | controllers/oxpspaymorrowpayment.php | OxpsPaymorrowPayment.validatePayment | public function validatePayment()
{
// Remove payment methods initialization data from session of any is set
$this->_unsetSessionInitData();
$mReturn = $this->_OxpsPaymorrowPayment_validatePayment_parent();
if ($this->_isPaymorrowPayment(oxRegistry::getConfig()->getRequestParameter... | php | public function validatePayment()
{
// Remove payment methods initialization data from session of any is set
$this->_unsetSessionInitData();
$mReturn = $this->_OxpsPaymorrowPayment_validatePayment_parent();
if ($this->_isPaymorrowPayment(oxRegistry::getConfig()->getRequestParameter... | [
"public",
"function",
"validatePayment",
"(",
")",
"{",
"// Remove payment methods initialization data from session of any is set",
"$",
"this",
"->",
"_unsetSessionInitData",
"(",
")",
";",
"$",
"mReturn",
"=",
"$",
"this",
"->",
"_OxpsPaymorrowPayment_validatePayment_parent... | Overridden parent method.
Additionally checks if Paymorrow request was successful.
It is needed for detecting cases, when JavaScript is disabled in user browser and no requests were sent.
@return mixed | [
"Overridden",
"parent",
"method",
".",
"Additionally",
"checks",
"if",
"Paymorrow",
"request",
"was",
"successful",
".",
"It",
"is",
"needed",
"for",
"detecting",
"cases",
"when",
"JavaScript",
"is",
"disabled",
"in",
"user",
"browser",
"and",
"no",
"requests",
... | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/controllers/oxpspaymorrowpayment.php#L48-L64 |
27,677 | OXID-eSales/paymorrow-module | controllers/oxpspaymorrowpayment.php | OxpsPaymorrowPayment._isPaymentResponseSessionInvalid | protected function _isPaymentResponseSessionInvalid()
{
/** @var OxpsPaymorrowModule $oModule */
$oModule = oxRegistry::get('OxpsPaymorrowModule');
// Get Paymorrow response from session
$aPaymorrowResponse = $oModule->getPaymorrowResponseData();
// The response must exist ... | php | protected function _isPaymentResponseSessionInvalid()
{
/** @var OxpsPaymorrowModule $oModule */
$oModule = oxRegistry::get('OxpsPaymorrowModule');
// Get Paymorrow response from session
$aPaymorrowResponse = $oModule->getPaymorrowResponseData();
// The response must exist ... | [
"protected",
"function",
"_isPaymentResponseSessionInvalid",
"(",
")",
"{",
"/** @var OxpsPaymorrowModule $oModule */",
"$",
"oModule",
"=",
"oxRegistry",
"::",
"get",
"(",
"'OxpsPaymorrowModule'",
")",
";",
"// Get Paymorrow response from session",
"$",
"aPaymorrowResponse",
... | Check payment response in session fot errors.
@return bool True is response is invalid, false otherwise. | [
"Check",
"payment",
"response",
"in",
"session",
"fot",
"errors",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/controllers/oxpspaymorrowpayment.php#L99-L113 |
27,678 | moodev/php-weasel | lib/Weasel/JsonMarshaller/Config/AnnotationDriver.php | AnnotationDriver._getConfig | protected function _getConfig($class)
{
$rClass = new \ReflectionClass($class);
// Delegate actually loading the config for the class to the ClassAnnotationDriver
$classDriver = new ClassAnnotationDriver($rClass, $this->annotationReaderFactory, $this->annotationNamespace);
return $... | php | protected function _getConfig($class)
{
$rClass = new \ReflectionClass($class);
// Delegate actually loading the config for the class to the ClassAnnotationDriver
$classDriver = new ClassAnnotationDriver($rClass, $this->annotationReaderFactory, $this->annotationNamespace);
return $... | [
"protected",
"function",
"_getConfig",
"(",
"$",
"class",
")",
"{",
"$",
"rClass",
"=",
"new",
"\\",
"ReflectionClass",
"(",
"$",
"class",
")",
";",
"// Delegate actually loading the config for the class to the ClassAnnotationDriver",
"$",
"classDriver",
"=",
"new",
"... | _Really_ obtain the config for a named class
@param string $class The class to get the config for
@return \Weasel\JsonMarshaller\Config\ClassMarshaller The config, or null if not found | [
"_Really_",
"obtain",
"the",
"config",
"for",
"a",
"named",
"class"
] | fecc7cc06cae719489cb4490f414ed6530e70831 | https://github.com/moodev/php-weasel/blob/fecc7cc06cae719489cb4490f414ed6530e70831/lib/Weasel/JsonMarshaller/Config/AnnotationDriver.php#L68-L77 |
27,679 | moodev/php-weasel | lib/Weasel/WeaselJsonConfigDrivenFactory.php | WeaselJsonConfigDrivenFactory.getXmlMapperInstance | public function getXmlMapperInstance()
{
if (!isset($this->_xmlMapper)) {
$this->_xmlMapper = new XmlMapper($this->_getXmlConfigDriver());
}
return $this->_xmlMapper;
} | php | public function getXmlMapperInstance()
{
if (!isset($this->_xmlMapper)) {
$this->_xmlMapper = new XmlMapper($this->_getXmlConfigDriver());
}
return $this->_xmlMapper;
} | [
"public",
"function",
"getXmlMapperInstance",
"(",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"_xmlMapper",
")",
")",
"{",
"$",
"this",
"->",
"_xmlMapper",
"=",
"new",
"XmlMapper",
"(",
"$",
"this",
"->",
"_getXmlConfigDriver",
"(",
")",
... | Get a fully configured XmlMapper instance.
@return XmlMapper | [
"Get",
"a",
"fully",
"configured",
"XmlMapper",
"instance",
"."
] | fecc7cc06cae719489cb4490f414ed6530e70831 | https://github.com/moodev/php-weasel/blob/fecc7cc06cae719489cb4490f414ed6530e70831/lib/Weasel/WeaselJsonConfigDrivenFactory.php#L154-L160 |
27,680 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxpayment.php | OxpsPaymorrowOxPayment.setPaymorrowPaymentMap | public function setPaymorrowPaymentMap($iType)
{
$blValidMapping = array_key_exists($iType, $this->_aPaymorrowValidPaymentTypes);
if ($blValidMapping) {
$this->oxpayments__oxpspaymorrowmap = new oxField($iType);
}
return $blValidMapping;
} | php | public function setPaymorrowPaymentMap($iType)
{
$blValidMapping = array_key_exists($iType, $this->_aPaymorrowValidPaymentTypes);
if ($blValidMapping) {
$this->oxpayments__oxpspaymorrowmap = new oxField($iType);
}
return $blValidMapping;
} | [
"public",
"function",
"setPaymorrowPaymentMap",
"(",
"$",
"iType",
")",
"{",
"$",
"blValidMapping",
"=",
"array_key_exists",
"(",
"$",
"iType",
",",
"$",
"this",
"->",
"_aPaymorrowValidPaymentTypes",
")",
";",
"if",
"(",
"$",
"blValidMapping",
")",
"{",
"$",
... | Set Paymorrow payment method ID.
0 - Off / none
1 - Paymorrow Invoice
2 - Paymorrow Direct Debit | [
"Set",
"Paymorrow",
"payment",
"method",
"ID",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxpayment.php#L145-L154 |
27,681 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxpayment.php | OxpsPaymorrowOxPayment.isValidPayment | public function isValidPayment($aDynValue, $sShopId, $oUser, $dBasketPrice, $sShipSetId)
{
/** @var OxpsPaymorrowOxPayment|oxPayment $this */
$blIsValid = (bool) $this->_OxpsPaymorrowOxPayment_isValidPayment_parent(
$aDynValue, $sShopId, $oUser, $dBasketPrice, $sShipSetId
);
... | php | public function isValidPayment($aDynValue, $sShopId, $oUser, $dBasketPrice, $sShipSetId)
{
/** @var OxpsPaymorrowOxPayment|oxPayment $this */
$blIsValid = (bool) $this->_OxpsPaymorrowOxPayment_isValidPayment_parent(
$aDynValue, $sShopId, $oUser, $dBasketPrice, $sShipSetId
);
... | [
"public",
"function",
"isValidPayment",
"(",
"$",
"aDynValue",
",",
"$",
"sShopId",
",",
"$",
"oUser",
",",
"$",
"dBasketPrice",
",",
"$",
"sShipSetId",
")",
"{",
"/** @var OxpsPaymorrowOxPayment|oxPayment $this */",
"$",
"blIsValid",
"=",
"(",
"bool",
")",
"$",... | Overridden parent method.
Ignores default payment method form error in case method is converted to a Paymorrow payment method.
@param $aDynValue
@param $sShopId
@param $oUser
@param $dBasketPrice
@param $sShipSetId
@return bool | [
"Overridden",
"parent",
"method",
".",
"Ignores",
"default",
"payment",
"method",
"form",
"error",
"in",
"case",
"method",
"is",
"converted",
"to",
"a",
"Paymorrow",
"payment",
"method",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxpayment.php#L178-L196 |
27,682 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxpayment.php | OxpsPaymorrowOxPayment.loadPaymorrowDefault | public function loadPaymorrowDefault()
{
/** @var OxpsPaymorrowOxPayment|oxPayment $this */
$query = sprintf(
"SELECT * FROM `%s`WHERE %s AND `OXCHECKED` = 1 ORDER BY `OXSORT` ASC, `OXTIMESTAMP` DESC LIMIT 1",
$this->getViewName(),
$this->getPaymorrowMethodWhereC... | php | public function loadPaymorrowDefault()
{
/** @var OxpsPaymorrowOxPayment|oxPayment $this */
$query = sprintf(
"SELECT * FROM `%s`WHERE %s AND `OXCHECKED` = 1 ORDER BY `OXSORT` ASC, `OXTIMESTAMP` DESC LIMIT 1",
$this->getViewName(),
$this->getPaymorrowMethodWhereC... | [
"public",
"function",
"loadPaymorrowDefault",
"(",
")",
"{",
"/** @var OxpsPaymorrowOxPayment|oxPayment $this */",
"$",
"query",
"=",
"sprintf",
"(",
"\"SELECT * FROM `%s`WHERE %s AND `OXCHECKED` = 1 ORDER BY `OXSORT` ASC, `OXTIMESTAMP` DESC LIMIT 1\"",
",",
"$",
"this",
"->",
"get... | Load active, mapped and selected Paymorrow payment method.
If several are selected loads it by sorting and last updated.
@codeCoverageIgnore
@return mixed | [
"Load",
"active",
"mapped",
"and",
"selected",
"Paymorrow",
"payment",
"method",
".",
"If",
"several",
"are",
"selected",
"loads",
"it",
"by",
"sorting",
"and",
"last",
"updated",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxpayment.php#L206-L217 |
27,683 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxpayment.php | OxpsPaymorrowOxPayment.loadByPaymorrowName | public function loadByPaymorrowName($methodName)
{
/** @var OxpsPaymorrowOxPayment|oxPayment $this */
if (!array_key_exists($methodName, $this->paymorrowPaymentNameMap)) {
return false;
}
$query = sprintf(
"SELECT * FROM `%s` WHERE %s AND `OXPSPAYMORROWMAP` ... | php | public function loadByPaymorrowName($methodName)
{
/** @var OxpsPaymorrowOxPayment|oxPayment $this */
if (!array_key_exists($methodName, $this->paymorrowPaymentNameMap)) {
return false;
}
$query = sprintf(
"SELECT * FROM `%s` WHERE %s AND `OXPSPAYMORROWMAP` ... | [
"public",
"function",
"loadByPaymorrowName",
"(",
"$",
"methodName",
")",
"{",
"/** @var OxpsPaymorrowOxPayment|oxPayment $this */",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"methodName",
",",
"$",
"this",
"->",
"paymorrowPaymentNameMap",
")",
")",
"{",
"return",... | Load active, mapped Paymorrow payment method by it's name.
E.g. by value "INVOICE" or "SDD".
@param string $methodName
@codeCoverageIgnore
@return bool | [
"Load",
"active",
"mapped",
"Paymorrow",
"payment",
"method",
"by",
"it",
"s",
"name",
".",
"E",
".",
"g",
".",
"by",
"value",
"INVOICE",
"or",
"SDD",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxpayment.php#L229-L245 |
27,684 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxpayment.php | OxpsPaymorrowOxPayment._OxpsPaymorrowOxPayment_isValidPayment_parent | protected function _OxpsPaymorrowOxPayment_isValidPayment_parent($aDynValue, $sShopId, $oUser, $dBasketPrice,
$sShipSetId)
{
return parent::isValidPayment($aDynValue, $sShopId, $oUser, $dBasketPrice, $sShipSetId);
} | php | protected function _OxpsPaymorrowOxPayment_isValidPayment_parent($aDynValue, $sShopId, $oUser, $dBasketPrice,
$sShipSetId)
{
return parent::isValidPayment($aDynValue, $sShopId, $oUser, $dBasketPrice, $sShipSetId);
} | [
"protected",
"function",
"_OxpsPaymorrowOxPayment_isValidPayment_parent",
"(",
"$",
"aDynValue",
",",
"$",
"sShopId",
",",
"$",
"oUser",
",",
"$",
"dBasketPrice",
",",
"$",
"sShipSetId",
")",
"{",
"return",
"parent",
"::",
"isValidPayment",
"(",
"$",
"aDynValue",
... | Parent `isValidPayment` call.
@codeCoverageIgnore
@param $aDynValue
@param $sShopId
@param $oUser
@param $dBasketPrice
@param $sShipSetId
@return mixed | [
"Parent",
"isValidPayment",
"call",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxpayment.php#L274-L278 |
27,685 | techdivision/import-product | src/Observers/AbstractProductRelationObserver.php | AbstractProductRelationObserver.prepareProductRelationAttributes | protected function prepareProductRelationAttributes()
{
// initialize and return the entity
return $this->initializeEntity(
array(
MemberNames::PARENT_ID => $this->parentId,
MemberNames::CHILD_ID => $this->childId
)
);
} | php | protected function prepareProductRelationAttributes()
{
// initialize and return the entity
return $this->initializeEntity(
array(
MemberNames::PARENT_ID => $this->parentId,
MemberNames::CHILD_ID => $this->childId
)
);
} | [
"protected",
"function",
"prepareProductRelationAttributes",
"(",
")",
"{",
"// initialize and return the entity",
"return",
"$",
"this",
"->",
"initializeEntity",
"(",
"array",
"(",
"MemberNames",
"::",
"PARENT_ID",
"=>",
"$",
"this",
"->",
"parentId",
",",
"MemberNa... | Prepare the product relation attributes that has to be persisted.
@return array The prepared product relation attributes | [
"Prepare",
"the",
"product",
"relation",
"attributes",
"that",
"has",
"to",
"be",
"persisted",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Observers/AbstractProductRelationObserver.php#L165-L175 |
27,686 | techdivision/import-product | src/Actions/Processors/CategoryProductDeleteProcessor.php | CategoryProductDeleteProcessor.getStatements | protected function getStatements()
{
// return the array with the SQL statements that has to be prepared
return array(
SqlStatementKeys::DELETE_CATEGORY_PRODUCT => $this->loadStatement(SqlStatementKeys::DELETE_CATEGORY_PRODUCT),
SqlStatementKeys::DELETE_CATEGORY_PRODU... | php | protected function getStatements()
{
// return the array with the SQL statements that has to be prepared
return array(
SqlStatementKeys::DELETE_CATEGORY_PRODUCT => $this->loadStatement(SqlStatementKeys::DELETE_CATEGORY_PRODUCT),
SqlStatementKeys::DELETE_CATEGORY_PRODU... | [
"protected",
"function",
"getStatements",
"(",
")",
"{",
"// return the array with the SQL statements that has to be prepared",
"return",
"array",
"(",
"SqlStatementKeys",
"::",
"DELETE_CATEGORY_PRODUCT",
"=>",
"$",
"this",
"->",
"loadStatement",
"(",
"SqlStatementKeys",
"::"... | Return's the array with the SQL statements that has to be prepared.
@return array The SQL statements to be prepared
@see \TechDivision\Import\Actions\Processors\AbstractBaseProcessor::getStatements() | [
"Return",
"s",
"the",
"array",
"with",
"the",
"SQL",
"statements",
"that",
"has",
"to",
"be",
"prepared",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Actions/Processors/CategoryProductDeleteProcessor.php#L44-L52 |
27,687 | aimeos/ai-admin-jsonadm | admin/jsonadm/src/Admin/JsonAdm.php | JsonAdm.create | public static function create( \Aimeos\MShop\Context\Item\Iface $context,
\Aimeos\Bootstrap $aimeos, $path, $name = null )
{
$path = trim( $path, '/' );
if( empty( $path ) ) {
return self::createRoot( $context, $aimeos, $path, $name );
} else {
return self::createNew( $context, $aimeos, $path, $name );
... | php | public static function create( \Aimeos\MShop\Context\Item\Iface $context,
\Aimeos\Bootstrap $aimeos, $path, $name = null )
{
$path = trim( $path, '/' );
if( empty( $path ) ) {
return self::createRoot( $context, $aimeos, $path, $name );
} else {
return self::createNew( $context, $aimeos, $path, $name );
... | [
"public",
"static",
"function",
"create",
"(",
"\\",
"Aimeos",
"\\",
"MShop",
"\\",
"Context",
"\\",
"Item",
"\\",
"Iface",
"$",
"context",
",",
"\\",
"Aimeos",
"\\",
"Bootstrap",
"$",
"aimeos",
",",
"$",
"path",
",",
"$",
"name",
"=",
"null",
")",
"... | Creates the required client specified by the given path of client names.
Clients are created by providing only the domain name, e.g. "product"
for the \Aimeos\Admin\JsonAdm\Product\Standard or a path of names to
retrieve a specific sub-client, e.g. "product/type" for the
\Aimeos\Admin\JsonAdm\Product\Type\Standard cli... | [
"Creates",
"the",
"required",
"client",
"specified",
"by",
"the",
"given",
"path",
"of",
"client",
"names",
"."
] | 8e4dc6528afcd2199e6555b2e7ead4f75b221005 | https://github.com/aimeos/ai-admin-jsonadm/blob/8e4dc6528afcd2199e6555b2e7ead4f75b221005/admin/jsonadm/src/Admin/JsonAdm.php#L37-L47 |
27,688 | aimeos/ai-admin-jsonadm | admin/jsonadm/src/Admin/JsonAdm.php | JsonAdm.createNew | protected static function createNew( \Aimeos\MShop\Context\Item\Iface $context,
\Aimeos\Bootstrap $aimeos, $path, $name )
{
$pname = $name;
$parts = explode( '/', $path );
foreach( $parts as $key => $part )
{
if( ctype_alnum( $part ) === false )
{
$msg = sprintf( 'Invalid client "%1$s"', $path );
... | php | protected static function createNew( \Aimeos\MShop\Context\Item\Iface $context,
\Aimeos\Bootstrap $aimeos, $path, $name )
{
$pname = $name;
$parts = explode( '/', $path );
foreach( $parts as $key => $part )
{
if( ctype_alnum( $part ) === false )
{
$msg = sprintf( 'Invalid client "%1$s"', $path );
... | [
"protected",
"static",
"function",
"createNew",
"(",
"\\",
"Aimeos",
"\\",
"MShop",
"\\",
"Context",
"\\",
"Item",
"\\",
"Iface",
"$",
"context",
",",
"\\",
"Aimeos",
"\\",
"Bootstrap",
"$",
"aimeos",
",",
"$",
"path",
",",
"$",
"name",
")",
"{",
"$",
... | Creates a new client specified by the given path of client names.
@param \Aimeos\MShop\Context\Item\Iface $context Context object required by clients
@param \Aimeos\Bootstrap $aimeos Aimeos Bootstrap object
@param string $path Name of the client separated by slashes, e.g "product/stock"
@param string|null $name Name o... | [
"Creates",
"a",
"new",
"client",
"specified",
"by",
"the",
"given",
"path",
"of",
"client",
"names",
"."
] | 8e4dc6528afcd2199e6555b2e7ead4f75b221005 | https://github.com/aimeos/ai-admin-jsonadm/blob/8e4dc6528afcd2199e6555b2e7ead4f75b221005/admin/jsonadm/src/Admin/JsonAdm.php#L60-L107 |
27,689 | techdivision/import-product | src/Actions/Processors/StockItemUpdateProcessor.php | StockItemUpdateProcessor.execute | public function execute($row, $name = null)
{
// load the field names
$keys = array_keys($row);
// create a unique name for the prepared statement
$name = sprintf('%s-%s', $name, md5(implode('-', $keys)));
// query whether or not the statement has been prepared
if ... | php | public function execute($row, $name = null)
{
// load the field names
$keys = array_keys($row);
// create a unique name for the prepared statement
$name = sprintf('%s-%s', $name, md5(implode('-', $keys)));
// query whether or not the statement has been prepared
if ... | [
"public",
"function",
"execute",
"(",
"$",
"row",
",",
"$",
"name",
"=",
"null",
")",
"{",
"// load the field names",
"$",
"keys",
"=",
"array_keys",
"(",
"$",
"row",
")",
";",
"// create a unique name for the prepared statement",
"$",
"name",
"=",
"sprintf",
... | Implements the CRUD functionality the processor is responsible for,
can be one of CREATE, READ, UPDATE or DELETE a entity.
@param array $row The data to handle
@param string|null $name The name of the prepared statement to execute
@return void | [
"Implements",
"the",
"CRUD",
"functionality",
"the",
"processor",
"is",
"responsible",
"for",
"can",
"be",
"one",
"of",
"CREATE",
"READ",
"UPDATE",
"or",
"DELETE",
"a",
"entity",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Actions/Processors/StockItemUpdateProcessor.php#L49-L88 |
27,690 | OXID-eSales/paymorrow-module | core/oxpspaymorrowresourcecache.php | OxpsPaymorrowResourceCache.push | public function push( $sFileName, $mFileContent )
{
$sPath = $this->_getCacheFilePath( $sFileName );
if ( is_null( $sPath ) ) {
return false;
}
return file_put_contents( $sPath, serialize( $mFileContent ) );
} | php | public function push( $sFileName, $mFileContent )
{
$sPath = $this->_getCacheFilePath( $sFileName );
if ( is_null( $sPath ) ) {
return false;
}
return file_put_contents( $sPath, serialize( $mFileContent ) );
} | [
"public",
"function",
"push",
"(",
"$",
"sFileName",
",",
"$",
"mFileContent",
")",
"{",
"$",
"sPath",
"=",
"$",
"this",
"->",
"_getCacheFilePath",
"(",
"$",
"sFileName",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"sPath",
")",
")",
"{",
"return",
"fa... | Save file to cache.
@param string $sFileName
@param mixed $mFileContent
@return bool|int | [
"Save",
"file",
"to",
"cache",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowresourcecache.php#L107-L116 |
27,691 | OXID-eSales/paymorrow-module | core/oxpspaymorrowresourcecache.php | OxpsPaymorrowResourceCache.pop | public function pop( $sFileName )
{
$sPath = $this->_getCacheFilePath( $sFileName );
if ( is_null( $sPath ) ) {
return false;
}
if ( $this->_expired( $sPath ) ) {
@unlink( $sPath );
return false;
}
return unserialize( file_get_c... | php | public function pop( $sFileName )
{
$sPath = $this->_getCacheFilePath( $sFileName );
if ( is_null( $sPath ) ) {
return false;
}
if ( $this->_expired( $sPath ) ) {
@unlink( $sPath );
return false;
}
return unserialize( file_get_c... | [
"public",
"function",
"pop",
"(",
"$",
"sFileName",
")",
"{",
"$",
"sPath",
"=",
"$",
"this",
"->",
"_getCacheFilePath",
"(",
"$",
"sFileName",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"sPath",
")",
")",
"{",
"return",
"false",
";",
"}",
"if",
"("... | Get file from cache.
@param string $sFileName
@return bool|mixed | [
"Get",
"file",
"from",
"cache",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowresourcecache.php#L125-L140 |
27,692 | OXID-eSales/paymorrow-module | core/oxpspaymorrowresourcecache.php | OxpsPaymorrowResourceCache._getCacheFilePath | protected function _getCacheFilePath( $sFileName = '' )
{
$sTmpDirFullPath = realpath( oxRegistry::getConfig()->getConfigParam( 'sCompileDir' ) );
$sResourceCacheFolderName = $this->getCacheFolder();
$sResourceCachePath = $sTmpDirFullPath . DIRECTORY_SEPARATOR . $sResourceCach... | php | protected function _getCacheFilePath( $sFileName = '' )
{
$sTmpDirFullPath = realpath( oxRegistry::getConfig()->getConfigParam( 'sCompileDir' ) );
$sResourceCacheFolderName = $this->getCacheFolder();
$sResourceCachePath = $sTmpDirFullPath . DIRECTORY_SEPARATOR . $sResourceCach... | [
"protected",
"function",
"_getCacheFilePath",
"(",
"$",
"sFileName",
"=",
"''",
")",
"{",
"$",
"sTmpDirFullPath",
"=",
"realpath",
"(",
"oxRegistry",
"::",
"getConfig",
"(",
")",
"->",
"getConfigParam",
"(",
"'sCompileDir'",
")",
")",
";",
"$",
"sResourceCache... | Get full path to a file inside resource cache folder.
@param string $sFileName If empty, full path to resource cache folder is returned
@return null|string Null if resource cache folder is not available, full path string on success. | [
"Get",
"full",
"path",
"to",
"a",
"file",
"inside",
"resource",
"cache",
"folder",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowresourcecache.php#L158-L176 |
27,693 | OXID-eSales/paymorrow-module | core/oxpspaymorrowresourcecache.php | OxpsPaymorrowResourceCache._expired | protected function _expired( $sFilePath )
{
return (
!is_file( $sFilePath ) or
( filemtime( $sFilePath ) - 1000 <= strtotime( sprintf( 'now - %d second', $this->getCacheTtl() ) ) )
);
} | php | protected function _expired( $sFilePath )
{
return (
!is_file( $sFilePath ) or
( filemtime( $sFilePath ) - 1000 <= strtotime( sprintf( 'now - %d second', $this->getCacheTtl() ) ) )
);
} | [
"protected",
"function",
"_expired",
"(",
"$",
"sFilePath",
")",
"{",
"return",
"(",
"!",
"is_file",
"(",
"$",
"sFilePath",
")",
"or",
"(",
"filemtime",
"(",
"$",
"sFilePath",
")",
"-",
"1000",
"<=",
"strtotime",
"(",
"sprintf",
"(",
"'now - %d second'",
... | Check if file exists and was created not too long ago.
@param string $sFilePath
@return bool False if file is missing or is too old/expired, True otherwise. | [
"Check",
"if",
"file",
"exists",
"and",
"was",
"created",
"not",
"too",
"long",
"ago",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowresourcecache.php#L185-L191 |
27,694 | odan/csrf | src/CsrfMiddleware.php | CsrfMiddleware.process | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$tokenValue = $this->getToken();
$this->validate($request, $tokenValue);
// Attach Request Attributes
$request = $request->withAttribute('csrf_token', $tokenValue);
... | php | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$tokenValue = $this->getToken();
$this->validate($request, $tokenValue);
// Attach Request Attributes
$request = $request->withAttribute('csrf_token', $tokenValue);
... | [
"public",
"function",
"process",
"(",
"ServerRequestInterface",
"$",
"request",
",",
"RequestHandlerInterface",
"$",
"handler",
")",
":",
"ResponseInterface",
"{",
"$",
"tokenValue",
"=",
"$",
"this",
"->",
"getToken",
"(",
")",
";",
"$",
"this",
"->",
"valida... | Invoke middleware.
@param ServerRequestInterface $request The request
@param RequestHandlerInterface $handler The handler
@return ResponseInterface The response | [
"Invoke",
"middleware",
"."
] | 3022e03f610c7411b5ee6bc40e8560a5f56c169e | https://github.com/odan/csrf/blob/3022e03f610c7411b5ee6bc40e8560a5f56c169e/src/CsrfMiddleware.php#L72-L85 |
27,695 | odan/csrf | src/CsrfMiddleware.php | CsrfMiddleware.setSessionId | public function setSessionId(string $sessionId): void
{
if (empty($sessionId)) {
throw new RuntimeException('CSRF middleware failed. SessionId not found!');
}
$this->sessionId = $sessionId;
} | php | public function setSessionId(string $sessionId): void
{
if (empty($sessionId)) {
throw new RuntimeException('CSRF middleware failed. SessionId not found!');
}
$this->sessionId = $sessionId;
} | [
"public",
"function",
"setSessionId",
"(",
"string",
"$",
"sessionId",
")",
":",
"void",
"{",
"if",
"(",
"empty",
"(",
"$",
"sessionId",
")",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"'CSRF middleware failed. SessionId not found!'",
")",
";",
"}",
"$... | Set session id.
@param string $sessionId the session id | [
"Set",
"session",
"id",
"."
] | 3022e03f610c7411b5ee6bc40e8560a5f56c169e | https://github.com/odan/csrf/blob/3022e03f610c7411b5ee6bc40e8560a5f56c169e/src/CsrfMiddleware.php#L92-L99 |
27,696 | odan/csrf | src/CsrfMiddleware.php | CsrfMiddleware.injectTokenToResponse | private function injectTokenToResponse(ResponseInterface $response, string $tokenValue): ResponseInterface
{
// Check if response is html
$contentTypes = $response->getHeader('content-type');
$contentType = reset($contentTypes) ?: '';
if (strpos($contentType, 'text/html') === false) ... | php | private function injectTokenToResponse(ResponseInterface $response, string $tokenValue): ResponseInterface
{
// Check if response is html
$contentTypes = $response->getHeader('content-type');
$contentType = reset($contentTypes) ?: '';
if (strpos($contentType, 'text/html') === false) ... | [
"private",
"function",
"injectTokenToResponse",
"(",
"ResponseInterface",
"$",
"response",
",",
"string",
"$",
"tokenValue",
")",
":",
"ResponseInterface",
"{",
"// Check if response is html",
"$",
"contentTypes",
"=",
"$",
"response",
"->",
"getHeader",
"(",
"'conten... | Inject token to response object.
@param ResponseInterface $response the response
@param string $tokenValue token value
@throws RuntimeException
@return ResponseInterface the response | [
"Inject",
"token",
"to",
"response",
"object",
"."
] | 3022e03f610c7411b5ee6bc40e8560a5f56c169e | https://github.com/odan/csrf/blob/3022e03f610c7411b5ee6bc40e8560a5f56c169e/src/CsrfMiddleware.php#L222-L242 |
27,697 | odan/csrf | src/CsrfMiddleware.php | CsrfMiddleware.injectFormHiddenFieldToResponse | private function injectFormHiddenFieldToResponse(string $body, string $tokenValue): string
{
$regex = '/(<form\b[^>]*>)(.*?)(<\/form>)/is';
$htmlHiddenField = sprintf('$1<input type="hidden" name="%s" value="%s">$2$3', $this->name, $tokenValue);
$body = preg_replace($regex, $htmlHiddenField,... | php | private function injectFormHiddenFieldToResponse(string $body, string $tokenValue): string
{
$regex = '/(<form\b[^>]*>)(.*?)(<\/form>)/is';
$htmlHiddenField = sprintf('$1<input type="hidden" name="%s" value="%s">$2$3', $this->name, $tokenValue);
$body = preg_replace($regex, $htmlHiddenField,... | [
"private",
"function",
"injectFormHiddenFieldToResponse",
"(",
"string",
"$",
"body",
",",
"string",
"$",
"tokenValue",
")",
":",
"string",
"{",
"$",
"regex",
"=",
"'/(<form\\b[^>]*>)(.*?)(<\\/form>)/is'",
";",
"$",
"htmlHiddenField",
"=",
"sprintf",
"(",
"'$1<input... | Inject hidden field.
@param string $body body
@param string $tokenValue token
@return string html | [
"Inject",
"hidden",
"field",
"."
] | 3022e03f610c7411b5ee6bc40e8560a5f56c169e | https://github.com/odan/csrf/blob/3022e03f610c7411b5ee6bc40e8560a5f56c169e/src/CsrfMiddleware.php#L252-L259 |
27,698 | odan/csrf | src/CsrfMiddleware.php | CsrfMiddleware.injectJqueryToResponse | private function injectJqueryToResponse(string $body, string $tokenValue): string
{
$regex = '/(.*?)(<\/body>)/is';
$jQueryCode = sprintf(
'<script>$.ajaxSetup({beforeSend: function (xhr) { xhr.setRequestHeader("X-CSRF-Token","%s"); }});</script>',
$tokenValue
);
... | php | private function injectJqueryToResponse(string $body, string $tokenValue): string
{
$regex = '/(.*?)(<\/body>)/is';
$jQueryCode = sprintf(
'<script>$.ajaxSetup({beforeSend: function (xhr) { xhr.setRequestHeader("X-CSRF-Token","%s"); }});</script>',
$tokenValue
);
... | [
"private",
"function",
"injectJqueryToResponse",
"(",
"string",
"$",
"body",
",",
"string",
"$",
"tokenValue",
")",
":",
"string",
"{",
"$",
"regex",
"=",
"'/(.*?)(<\\/body>)/is'",
";",
"$",
"jQueryCode",
"=",
"sprintf",
"(",
"'<script>$.ajaxSetup({beforeSend: funct... | Inject jquery code.
@param string $body body data
@param string $tokenValue token value
@return string html | [
"Inject",
"jquery",
"code",
"."
] | 3022e03f610c7411b5ee6bc40e8560a5f56c169e | https://github.com/odan/csrf/blob/3022e03f610c7411b5ee6bc40e8560a5f56c169e/src/CsrfMiddleware.php#L269-L284 |
27,699 | OXID-eSales/paymorrow-module | core/oxpsoxid2paymorrow.php | OxpsOxid2Paymorrow.getBuiltPaymorrowResourceProxy | public function getBuiltPaymorrowResourceProxy()
{
/** @var $oPmResourceProxy PaymorrowResourceProxy */
$oPmResourceProxy = oxNew( 'PaymorrowResourceProxy' );
$oPmSettings = $this->getPaymorrowSettings();
$oPmResourceProxy->setMerchantId( $oPmSettings->getMerchantId() );
$... | php | public function getBuiltPaymorrowResourceProxy()
{
/** @var $oPmResourceProxy PaymorrowResourceProxy */
$oPmResourceProxy = oxNew( 'PaymorrowResourceProxy' );
$oPmSettings = $this->getPaymorrowSettings();
$oPmResourceProxy->setMerchantId( $oPmSettings->getMerchantId() );
$... | [
"public",
"function",
"getBuiltPaymorrowResourceProxy",
"(",
")",
"{",
"/** @var $oPmResourceProxy PaymorrowResourceProxy */",
"$",
"oPmResourceProxy",
"=",
"oxNew",
"(",
"'PaymorrowResourceProxy'",
")",
";",
"$",
"oPmSettings",
"=",
"$",
"this",
"->",
"getPaymorrowSetting... | Get built resource proxy with merchant and endpoint url set.
@return PaymorrowResourceProxy | [
"Get",
"built",
"resource",
"proxy",
"with",
"merchant",
"and",
"endpoint",
"url",
"set",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpsoxid2paymorrow.php#L95-L106 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.