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,700 | OXID-eSales/paymorrow-module | core/oxpsoxid2paymorrow.php | OxpsOxid2Paymorrow.buildPaymorrowGateway | public function buildPaymorrowGateway()
{
$oPmGateway = $this->getPaymorrowGateway();
$oPmGateway->setPmClient( $this->getPaymorrowClient() );
$oPmGateway->setEshopDataProvider( $this->getEshopDataProvider() );
$oPmGateway->setEndPointUrl( $this->getPaymorrowSettings()->getEndPointUR... | php | public function buildPaymorrowGateway()
{
$oPmGateway = $this->getPaymorrowGateway();
$oPmGateway->setPmClient( $this->getPaymorrowClient() );
$oPmGateway->setEshopDataProvider( $this->getEshopDataProvider() );
$oPmGateway->setEndPointUrl( $this->getPaymorrowSettings()->getEndPointUR... | [
"public",
"function",
"buildPaymorrowGateway",
"(",
")",
"{",
"$",
"oPmGateway",
"=",
"$",
"this",
"->",
"getPaymorrowGateway",
"(",
")",
";",
"$",
"oPmGateway",
"->",
"setPmClient",
"(",
"$",
"this",
"->",
"getPaymorrowClient",
"(",
")",
")",
";",
"$",
"o... | Get initialized Paymorrow gateway instance.
@return OxpsPaymorrowGateway | [
"Get",
"initialized",
"Paymorrow",
"gateway",
"instance",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpsoxid2paymorrow.php#L125-L139 |
27,701 | OXID-eSales/paymorrow-module | core/oxpsoxid2paymorrow.php | OxpsOxid2Paymorrow.getBuiltPaymorrowRequestController | public function getBuiltPaymorrowRequestController()
{
$oPmRequestController = $this->getPaymorrowRequestController();
$oPmGateway = $this->buildPaymorrowGateway();
$oPmRequestController->setGateway( $oPmGateway );
return $oPmRequestController;
} | php | public function getBuiltPaymorrowRequestController()
{
$oPmRequestController = $this->getPaymorrowRequestController();
$oPmGateway = $this->buildPaymorrowGateway();
$oPmRequestController->setGateway( $oPmGateway );
return $oPmRequestController;
} | [
"public",
"function",
"getBuiltPaymorrowRequestController",
"(",
")",
"{",
"$",
"oPmRequestController",
"=",
"$",
"this",
"->",
"getPaymorrowRequestController",
"(",
")",
";",
"$",
"oPmGateway",
"=",
"$",
"this",
"->",
"buildPaymorrowGateway",
"(",
")",
";",
"$",
... | Get built Paymorrow request controller with Paymorrow gateway set.
@return RequestController | [
"Get",
"built",
"Paymorrow",
"request",
"controller",
"with",
"Paymorrow",
"gateway",
"set",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpsoxid2paymorrow.php#L146-L155 |
27,702 | OXID-eSales/paymorrow-module | controllers/oxpspaymorrowprepareorder.php | OxpsPaymorrowPrepareOrder.prepareOrder | public function prepareOrder()
{
$this->setPaymorrowPaymentMethodId();
/** @var OxpsPaymorrowRequestControllerProxy $pmGateWay */
$pmGateWay = oxNew('OxpsPaymorrowRequestControllerProxy');
$oUtils = oxRegistry::getUtils();
$oUtils->setHeader("Content-Type: application/json"... | php | public function prepareOrder()
{
$this->setPaymorrowPaymentMethodId();
/** @var OxpsPaymorrowRequestControllerProxy $pmGateWay */
$pmGateWay = oxNew('OxpsPaymorrowRequestControllerProxy');
$oUtils = oxRegistry::getUtils();
$oUtils->setHeader("Content-Type: application/json"... | [
"public",
"function",
"prepareOrder",
"(",
")",
"{",
"$",
"this",
"->",
"setPaymorrowPaymentMethodId",
"(",
")",
";",
"/** @var OxpsPaymorrowRequestControllerProxy $pmGateWay */",
"$",
"pmGateWay",
"=",
"oxNew",
"(",
"'OxpsPaymorrowRequestControllerProxy'",
")",
";",
"$",... | Paymorrow function for Verifying Form Data against Paymorrow Services.
Also set selected payment method ID revealed by Paymorrow payment method name. | [
"Paymorrow",
"function",
"for",
"Verifying",
"Form",
"Data",
"against",
"Paymorrow",
"Services",
".",
"Also",
"set",
"selected",
"payment",
"method",
"ID",
"revealed",
"by",
"Paymorrow",
"payment",
"method",
"name",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/controllers/oxpspaymorrowprepareorder.php#L54-L64 |
27,703 | OXID-eSales/paymorrow-module | controllers/oxpspaymorrowprepareorder.php | OxpsPaymorrowPrepareOrder.setPaymorrowPaymentMethodId | protected function setPaymorrowPaymentMethodId()
{
/** @var oxPayment|OxpsPaymorrowOxPayment $payment */
$payment = oxNew('oxPayment');
$paymentIdField = self::OXPS_PAYMENT_ID_FIELD;
$paymentName = (string) $this->getConfig()->getRequestParameter(self::OXPS_PM_PAYMENT_NAME_FIELD);
... | php | protected function setPaymorrowPaymentMethodId()
{
/** @var oxPayment|OxpsPaymorrowOxPayment $payment */
$payment = oxNew('oxPayment');
$paymentIdField = self::OXPS_PAYMENT_ID_FIELD;
$paymentName = (string) $this->getConfig()->getRequestParameter(self::OXPS_PM_PAYMENT_NAME_FIELD);
... | [
"protected",
"function",
"setPaymorrowPaymentMethodId",
"(",
")",
"{",
"/** @var oxPayment|OxpsPaymorrowOxPayment $payment */",
"$",
"payment",
"=",
"oxNew",
"(",
"'oxPayment'",
")",
";",
"$",
"paymentIdField",
"=",
"self",
"::",
"OXPS_PAYMENT_ID_FIELD",
";",
"$",
"paym... | Load payment instance by Paymorrow payment method name
and set it to both, request and session if not yet set. | [
"Load",
"payment",
"instance",
"by",
"Paymorrow",
"payment",
"method",
"name",
"and",
"set",
"it",
"to",
"both",
"request",
"and",
"session",
"if",
"not",
"yet",
"set",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/controllers/oxpspaymorrowprepareorder.php#L71-L83 |
27,704 | OXID-eSales/paymorrow-module | components/widgets/oxpspaymorrowinit.php | OxpsPaymorrowInit.getPaymorrowJavaScriptPmInitFull | public function getPaymorrowJavaScriptPmInitFull()
{
$sPmPrintData = $this->_getPaymorrowPrintData();
$sPmControllerPrepareOrder = $this->getPaymorrowControllerPrepareOrderProcessPaymentURL();
$sSelectedMethod = $this->getSelectedPaymorrowMethod();
$sNextButtonId = 'paymentNextStepBo... | php | public function getPaymorrowJavaScriptPmInitFull()
{
$sPmPrintData = $this->_getPaymorrowPrintData();
$sPmControllerPrepareOrder = $this->getPaymorrowControllerPrepareOrderProcessPaymentURL();
$sSelectedMethod = $this->getSelectedPaymorrowMethod();
$sNextButtonId = 'paymentNextStepBo... | [
"public",
"function",
"getPaymorrowJavaScriptPmInitFull",
"(",
")",
"{",
"$",
"sPmPrintData",
"=",
"$",
"this",
"->",
"_getPaymorrowPrintData",
"(",
")",
";",
"$",
"sPmControllerPrepareOrder",
"=",
"$",
"this",
"->",
"getPaymorrowControllerPrepareOrderProcessPaymentURL",
... | Returns a JavaScript with Paymorrow payment methods initialization functions wrapped in document.ready.
@nice-to-have Use a template for JS generation rather than doing in within PHP.
@return string | [
"Returns",
"a",
"JavaScript",
"with",
"Paymorrow",
"payment",
"methods",
"initialization",
"functions",
"wrapped",
"in",
"document",
".",
"ready",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/components/widgets/oxpspaymorrowinit.php#L84-L108 |
27,705 | OXID-eSales/paymorrow-module | components/widgets/oxpspaymorrowinit.php | OxpsPaymorrowInit.getSelectedPaymorrowMethod | public function getSelectedPaymorrowMethod()
{
$sSessionPaymentId = (string) oxRegistry::getSession()->getVariable( 'paymentid' );
/** @var OxpsPaymorrowOxPayment|oxPayment $oPayment */
$oPayment = oxNew( 'OxpsPaymorrowOxPayment' );
if ( empty( $sSessionPaymentId ) or !$oPayment->l... | php | public function getSelectedPaymorrowMethod()
{
$sSessionPaymentId = (string) oxRegistry::getSession()->getVariable( 'paymentid' );
/** @var OxpsPaymorrowOxPayment|oxPayment $oPayment */
$oPayment = oxNew( 'OxpsPaymorrowOxPayment' );
if ( empty( $sSessionPaymentId ) or !$oPayment->l... | [
"public",
"function",
"getSelectedPaymorrowMethod",
"(",
")",
"{",
"$",
"sSessionPaymentId",
"=",
"(",
"string",
")",
"oxRegistry",
"::",
"getSession",
"(",
")",
"->",
"getVariable",
"(",
"'paymentid'",
")",
";",
"/** @var OxpsPaymorrowOxPayment|oxPayment $oPayment */",... | Get a code of selected Paymorrow payment method.
First session is checked for what user have selected, then payment methods configuration is checked.
It applies only on payment methods linked to Paymorrow.
@return string Paymorrow payment method code or empty string. | [
"Get",
"a",
"code",
"of",
"selected",
"Paymorrow",
"payment",
"method",
".",
"First",
"session",
"is",
"checked",
"for",
"what",
"user",
"have",
"selected",
"then",
"payment",
"methods",
"configuration",
"is",
"checked",
".",
"It",
"applies",
"only",
"on",
"... | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/components/widgets/oxpspaymorrowinit.php#L117-L131 |
27,706 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasketitem.php | OxpsPaymorrowOxBasketItem.getProductNumber | public function getProductNumber()
{
/** @var $this OxpsPaymorrowOxBasketItem|oxBasketItem */
/** @var oxArticle $oArticle */
$oArticle = $this->getArticle();
return isset( $oArticle->oxarticles__oxartnum->value ) ? (string) $oArticle->oxarticles__oxartnum->value : '';
} | php | public function getProductNumber()
{
/** @var $this OxpsPaymorrowOxBasketItem|oxBasketItem */
/** @var oxArticle $oArticle */
$oArticle = $this->getArticle();
return isset( $oArticle->oxarticles__oxartnum->value ) ? (string) $oArticle->oxarticles__oxartnum->value : '';
} | [
"public",
"function",
"getProductNumber",
"(",
")",
"{",
"/** @var $this OxpsPaymorrowOxBasketItem|oxBasketItem */",
"/** @var oxArticle $oArticle */",
"$",
"oArticle",
"=",
"$",
"this",
"->",
"getArticle",
"(",
")",
";",
"return",
"isset",
"(",
"$",
"oArticle",
"->",
... | Get related article number.
@return string | [
"Get",
"related",
"article",
"number",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasketitem.php#L61-L69 |
27,707 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxbasketitem.php | OxpsPaymorrowOxBasketItem.getPaymorrowBasketItemSummary | public function getPaymorrowBasketItemSummary( $iLineItemCount )
{
/** @var OxpsPaymorrowOxBasketItem|oxBasketItem $this */
$sPaymorrowLineItemPrefix = self::getPaymorrowBasketSummaryLineItemPrefix( $iLineItemCount );
return array(
$sPaymorrowLineItemPrefix . 'quantity' =... | php | public function getPaymorrowBasketItemSummary( $iLineItemCount )
{
/** @var OxpsPaymorrowOxBasketItem|oxBasketItem $this */
$sPaymorrowLineItemPrefix = self::getPaymorrowBasketSummaryLineItemPrefix( $iLineItemCount );
return array(
$sPaymorrowLineItemPrefix . 'quantity' =... | [
"public",
"function",
"getPaymorrowBasketItemSummary",
"(",
"$",
"iLineItemCount",
")",
"{",
"/** @var OxpsPaymorrowOxBasketItem|oxBasketItem $this */",
"$",
"sPaymorrowLineItemPrefix",
"=",
"self",
"::",
"getPaymorrowBasketSummaryLineItemPrefix",
"(",
"$",
"iLineItemCount",
")",... | Compiles summary data array of basket item for Paymorrow.
@param int $iLineItemCount
@return array | [
"Compiles",
"summary",
"data",
"array",
"of",
"basket",
"item",
"for",
"Paymorrow",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxbasketitem.php#L78-L94 |
27,708 | hostnet/accessor-generator-plugin-lib | src/Plugin.php | Plugin.getFilesAndReflectionClassesFromPackage | private function getFilesAndReflectionClassesFromPackage(PackageInterface $package)
{
$cache_id = $package->getName();
if (isset($this->metadata[$cache_id])) {
return $this->metadata[$cache_id];
}
$this->metadata[$cache_id] = [];
foreach ($this->getFilesForPacka... | php | private function getFilesAndReflectionClassesFromPackage(PackageInterface $package)
{
$cache_id = $package->getName();
if (isset($this->metadata[$cache_id])) {
return $this->metadata[$cache_id];
}
$this->metadata[$cache_id] = [];
foreach ($this->getFilesForPacka... | [
"private",
"function",
"getFilesAndReflectionClassesFromPackage",
"(",
"PackageInterface",
"$",
"package",
")",
"{",
"$",
"cache_id",
"=",
"$",
"package",
"->",
"getName",
"(",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"metadata",
"[",
"$",
"cach... | Returns a key-value array of ReflectionClass instances for all the file names found in the given package.
This method returns a cached instance when executed more than once for the same package.
@param PackageInterface $package
@return mixed
@throws Reflection\Exception\FileException | [
"Returns",
"a",
"key",
"-",
"value",
"array",
"of",
"ReflectionClass",
"instances",
"for",
"all",
"the",
"file",
"names",
"found",
"in",
"the",
"given",
"package",
".",
"This",
"method",
"returns",
"a",
"cached",
"instance",
"when",
"executed",
"more",
"than... | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Plugin.php#L214-L233 |
27,709 | hostnet/accessor-generator-plugin-lib | src/Plugin.php | Plugin.getFilesForPackage | private function getFilesForPackage(PackageInterface $package)
{
if ($package instanceof RootPackageInterface) {
$path = '.';
} else {
$path = $this->composer->getInstallationManager()->getInstallPath($package);
}
$path .= '/src';
$finder = new Finde... | php | private function getFilesForPackage(PackageInterface $package)
{
if ($package instanceof RootPackageInterface) {
$path = '.';
} else {
$path = $this->composer->getInstallationManager()->getInstallPath($package);
}
$path .= '/src';
$finder = new Finde... | [
"private",
"function",
"getFilesForPackage",
"(",
"PackageInterface",
"$",
"package",
")",
"{",
"if",
"(",
"$",
"package",
"instanceof",
"RootPackageInterface",
")",
"{",
"$",
"path",
"=",
"'.'",
";",
"}",
"else",
"{",
"$",
"path",
"=",
"$",
"this",
"->",
... | Find all the PHP files within a package.
Excludes
- all files in VCS directories
- all files in vendor folders
- all files in Generated folders
- all hidden files
@throws \LogicException
@throws \InvalidArgumentException
@param PackageInterface $package
@return \Iterator|\SplFileInfo[] | [
"Find",
"all",
"the",
"PHP",
"files",
"within",
"a",
"package",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Plugin.php#L250-L268 |
27,710 | techdivision/import-product | src/Observers/ProductInventoryUpdateObserver.php | ProductInventoryUpdateObserver.initializeStockItem | protected function initializeStockItem(array $attr)
{
// load the stock item with the passed item/product/stock ID
$entity = $this->loadStockItem(
$attr[MemberNames::PRODUCT_ID],
$attr[MemberNames::WEBSITE_ID],
$attr[MemberNames::STOCK_ID]
);
// ... | php | protected function initializeStockItem(array $attr)
{
// load the stock item with the passed item/product/stock ID
$entity = $this->loadStockItem(
$attr[MemberNames::PRODUCT_ID],
$attr[MemberNames::WEBSITE_ID],
$attr[MemberNames::STOCK_ID]
);
// ... | [
"protected",
"function",
"initializeStockItem",
"(",
"array",
"$",
"attr",
")",
"{",
"// load the stock item with the passed item/product/stock ID",
"$",
"entity",
"=",
"$",
"this",
"->",
"loadStockItem",
"(",
"$",
"attr",
"[",
"MemberNames",
"::",
"PRODUCT_ID",
"]",
... | Initialize the stock item with the passed attributes and returns an instance.
@param array $attr The stock item attributes
@return array The initialized stock item | [
"Initialize",
"the",
"stock",
"item",
"with",
"the",
"passed",
"attributes",
"and",
"returns",
"an",
"instance",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Observers/ProductInventoryUpdateObserver.php#L44-L61 |
27,711 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxuser.php | OxpsPaymorrowOxUser.getUserPaymorrowDateOfBirth | public function getUserPaymorrowDateOfBirth( $blSplit = false )
{
$mDate = $this->oxuser__oxbirthdate->value;
if ( !empty( $blSplit ) ) {
$aDate = explode( '-', $mDate );
$mDate = array(
$this->_getDateComponentAsInteger( $aDate, 0, '0000' ),
... | php | public function getUserPaymorrowDateOfBirth( $blSplit = false )
{
$mDate = $this->oxuser__oxbirthdate->value;
if ( !empty( $blSplit ) ) {
$aDate = explode( '-', $mDate );
$mDate = array(
$this->_getDateComponentAsInteger( $aDate, 0, '0000' ),
... | [
"public",
"function",
"getUserPaymorrowDateOfBirth",
"(",
"$",
"blSplit",
"=",
"false",
")",
"{",
"$",
"mDate",
"=",
"$",
"this",
"->",
"oxuser__oxbirthdate",
"->",
"value",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"blSplit",
")",
")",
"{",
"$",
"aDate",
... | Get user birth date.
@param bool $blSplit If true return array with year, month, day, if false the date as string (default)
@return string|array | [
"Get",
"user",
"birth",
"date",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxuser.php#L80-L94 |
27,712 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxuser.php | OxpsPaymorrowOxUser.getUserPaymorrowIpAddress | public function getUserPaymorrowIpAddress()
{
/** @var $oUtilsServer oxUtilsServer */
$oUtilsServer = oxRegistry::get( "oxUtilsServer" );
$sIpAddress = $oUtilsServer->getRemoteAddress();
return strpos( $sIpAddress, ':' ) ? $oUtilsServer->getServerVar( 'REMOTE_ADDR' ) : $sIpAddres... | php | public function getUserPaymorrowIpAddress()
{
/** @var $oUtilsServer oxUtilsServer */
$oUtilsServer = oxRegistry::get( "oxUtilsServer" );
$sIpAddress = $oUtilsServer->getRemoteAddress();
return strpos( $sIpAddress, ':' ) ? $oUtilsServer->getServerVar( 'REMOTE_ADDR' ) : $sIpAddres... | [
"public",
"function",
"getUserPaymorrowIpAddress",
"(",
")",
"{",
"/** @var $oUtilsServer oxUtilsServer */",
"$",
"oUtilsServer",
"=",
"oxRegistry",
"::",
"get",
"(",
"\"oxUtilsServer\"",
")",
";",
"$",
"sIpAddress",
"=",
"$",
"oUtilsServer",
"->",
"getRemoteAddress",
... | Get client remote IP address.
For IPv6 got from utils, gets value from REMOTE_ADDR variable directly.
@return string | [
"Get",
"client",
"remote",
"IP",
"address",
".",
"For",
"IPv6",
"got",
"from",
"utils",
"gets",
"value",
"from",
"REMOTE_ADDR",
"variable",
"directly",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxuser.php#L154-L161 |
27,713 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxuser.php | OxpsPaymorrowOxUser.getUserPaymorrowCountry | public function getUserPaymorrowCountry( $sCountryId = '' )
{
/** @var oxCountry $oCountry */
$oCountry = oxNew( 'oxCountry' );
$oCountry->load( empty( $sCountryId ) ? $this->oxuser__oxcountryid->value : (string) $sCountryId );
return $oCountry->oxcountry__oxisoalpha2->value;
} | php | public function getUserPaymorrowCountry( $sCountryId = '' )
{
/** @var oxCountry $oCountry */
$oCountry = oxNew( 'oxCountry' );
$oCountry->load( empty( $sCountryId ) ? $this->oxuser__oxcountryid->value : (string) $sCountryId );
return $oCountry->oxcountry__oxisoalpha2->value;
} | [
"public",
"function",
"getUserPaymorrowCountry",
"(",
"$",
"sCountryId",
"=",
"''",
")",
"{",
"/** @var oxCountry $oCountry */",
"$",
"oCountry",
"=",
"oxNew",
"(",
"'oxCountry'",
")",
";",
"$",
"oCountry",
"->",
"load",
"(",
"empty",
"(",
"$",
"sCountryId",
"... | Get user billing address country code.
@param string $sCountryId Optional country ID to load. If empty, default user billing country is loaded.
@return string | [
"Get",
"user",
"billing",
"address",
"country",
"code",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxuser.php#L288-L296 |
27,714 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxuser.php | OxpsPaymorrowOxUser.getUserGroupNames | public function getUserGroupNames()
{
/** @var OxpsPaymorrowOxUser|oxUser $this */
/** @var oxList $oGroups */
if ( !( $oGroups = $this->getUserGroups() ) ) {
return '';
}
$aGroups = array();
foreach ( $oGroups as $oGroup ) {
if ( $this->_is... | php | public function getUserGroupNames()
{
/** @var OxpsPaymorrowOxUser|oxUser $this */
/** @var oxList $oGroups */
if ( !( $oGroups = $this->getUserGroups() ) ) {
return '';
}
$aGroups = array();
foreach ( $oGroups as $oGroup ) {
if ( $this->_is... | [
"public",
"function",
"getUserGroupNames",
"(",
")",
"{",
"/** @var OxpsPaymorrowOxUser|oxUser $this */",
"/** @var oxList $oGroups */",
"if",
"(",
"!",
"(",
"$",
"oGroups",
"=",
"$",
"this",
"->",
"getUserGroups",
"(",
")",
")",
")",
"{",
"return",
"''",
";",
"... | Get user group names as comma separated string.
@return string | [
"Get",
"user",
"group",
"names",
"as",
"comma",
"separated",
"string",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxuser.php#L353-L371 |
27,715 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxuser.php | OxpsPaymorrowOxUser.mapDataAndSaveObject | public function mapDataAndSaveObject( array $aData, array $aMap, $oObject = null )
{
if ( is_null( $oObject ) ) {
$oObject = $this;
}
if ( $this->_mapDataFieldsToObject( $aData, $aMap, $oObject ) ) {
return $oObject->save();
}
return null;
} | php | public function mapDataAndSaveObject( array $aData, array $aMap, $oObject = null )
{
if ( is_null( $oObject ) ) {
$oObject = $this;
}
if ( $this->_mapDataFieldsToObject( $aData, $aMap, $oObject ) ) {
return $oObject->save();
}
return null;
} | [
"public",
"function",
"mapDataAndSaveObject",
"(",
"array",
"$",
"aData",
",",
"array",
"$",
"aMap",
",",
"$",
"oObject",
"=",
"null",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"oObject",
")",
")",
"{",
"$",
"oObject",
"=",
"$",
"this",
";",
"}",
"... | Find and map object fields in data array, assign the values and save object.
Updates only with not empty values and if values duffer from existing ones.
@param array $aData
@param array $aMap
@param object|null $oObject
@return bool|null | [
"Find",
"and",
"map",
"object",
"fields",
"in",
"data",
"array",
"assign",
"the",
"values",
"and",
"save",
"object",
".",
"Updates",
"only",
"with",
"not",
"empty",
"values",
"and",
"if",
"values",
"duffer",
"from",
"existing",
"ones",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxuser.php#L383-L394 |
27,716 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxuser.php | OxpsPaymorrowOxUser._getDateComponentAsInteger | protected function _getDateComponentAsInteger( $aDate, $iKey, $sZeroString = '00' )
{
if ( empty( $aDate[$iKey] ) or ( $aDate[$iKey] == $sZeroString ) ) {
return 0;
}
return (int) $aDate[$iKey];
} | php | protected function _getDateComponentAsInteger( $aDate, $iKey, $sZeroString = '00' )
{
if ( empty( $aDate[$iKey] ) or ( $aDate[$iKey] == $sZeroString ) ) {
return 0;
}
return (int) $aDate[$iKey];
} | [
"protected",
"function",
"_getDateComponentAsInteger",
"(",
"$",
"aDate",
",",
"$",
"iKey",
",",
"$",
"sZeroString",
"=",
"'00'",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"aDate",
"[",
"$",
"iKey",
"]",
")",
"or",
"(",
"$",
"aDate",
"[",
"$",
"iKey",
... | Get date component from an array by key as an integer.
@param array $aDate Date components as array.
@param int $iKey Date component index.
@param string $sZeroString A zero representing string value, default is "00".
@return int | [
"Get",
"date",
"component",
"from",
"an",
"array",
"by",
"key",
"as",
"an",
"integer",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxuser.php#L406-L413 |
27,717 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxuser.php | OxpsPaymorrowOxUser._isGroupValid | protected function _isGroupValid( $oGroup )
{
return ( !empty( $oGroup->oxgroups__oxactive->value ) and !empty( $oGroup->oxgroups__oxtitle->value ) );
} | php | protected function _isGroupValid( $oGroup )
{
return ( !empty( $oGroup->oxgroups__oxactive->value ) and !empty( $oGroup->oxgroups__oxtitle->value ) );
} | [
"protected",
"function",
"_isGroupValid",
"(",
"$",
"oGroup",
")",
"{",
"return",
"(",
"!",
"empty",
"(",
"$",
"oGroup",
"->",
"oxgroups__oxactive",
"->",
"value",
")",
"and",
"!",
"empty",
"(",
"$",
"oGroup",
"->",
"oxgroups__oxtitle",
"->",
"value",
")",... | Check if group is active and has non-empty title.
@param object $oGroup
@return bool | [
"Check",
"if",
"group",
"is",
"active",
"and",
"has",
"non",
"-",
"empty",
"title",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxuser.php#L422-L425 |
27,718 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxuser.php | OxpsPaymorrowOxUser._mapDataFieldsToObject | protected function _mapDataFieldsToObject( array $aData, array $aMap, $oObject )
{
$blValueSet = false;
foreach ( $aData as $sKey => $mValue ) {
$sValue = trim( (string) $mValue );
if ( $this->_isObjectFieldWithValidValue( $sKey, $sValue, $aMap, $oObject ) ) {
... | php | protected function _mapDataFieldsToObject( array $aData, array $aMap, $oObject )
{
$blValueSet = false;
foreach ( $aData as $sKey => $mValue ) {
$sValue = trim( (string) $mValue );
if ( $this->_isObjectFieldWithValidValue( $sKey, $sValue, $aMap, $oObject ) ) {
... | [
"protected",
"function",
"_mapDataFieldsToObject",
"(",
"array",
"$",
"aData",
",",
"array",
"$",
"aMap",
",",
"$",
"oObject",
")",
"{",
"$",
"blValueSet",
"=",
"false",
";",
"foreach",
"(",
"$",
"aData",
"as",
"$",
"sKey",
"=>",
"$",
"mValue",
")",
"{... | Check each data array field if it could be mapped to object and set the value if it is not empty and differ.
@param array $aData
@param array $aMap
@param object $oObject
@return bool True if at least one field updated, false otherwise. | [
"Check",
"each",
"data",
"array",
"field",
"if",
"it",
"could",
"be",
"mapped",
"to",
"object",
"and",
"set",
"the",
"value",
"if",
"it",
"is",
"not",
"empty",
"and",
"differ",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxuser.php#L436-L451 |
27,719 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxuser.php | OxpsPaymorrowOxUser._isObjectFieldWithValidValue | protected function _isObjectFieldWithValidValue( $sKey, $sValue, $aMap, $oObject )
{
if ( !array_key_exists( $sKey, $aMap ) ) {
return false;
}
$sField = $aMap[$sKey];
if ( empty( $sValue ) or ( $oObject->$sField->value == $sValue ) ) {
return false;
... | php | protected function _isObjectFieldWithValidValue( $sKey, $sValue, $aMap, $oObject )
{
if ( !array_key_exists( $sKey, $aMap ) ) {
return false;
}
$sField = $aMap[$sKey];
if ( empty( $sValue ) or ( $oObject->$sField->value == $sValue ) ) {
return false;
... | [
"protected",
"function",
"_isObjectFieldWithValidValue",
"(",
"$",
"sKey",
",",
"$",
"sValue",
",",
"$",
"aMap",
",",
"$",
"oObject",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"sKey",
",",
"$",
"aMap",
")",
")",
"{",
"return",
"false",
";... | Check if field is in the map array and value is nor blank, neither same as already set.
@param string $sKey
@param string $sValue
@param array $aMap
@param object $oObject
@return bool True if key is mapped with new non-blank value, false otherwise. | [
"Check",
"if",
"field",
"is",
"in",
"the",
"map",
"array",
"and",
"value",
"is",
"nor",
"blank",
"neither",
"same",
"as",
"already",
"set",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxuser.php#L463-L476 |
27,720 | hostnet/accessor-generator-plugin-lib | src/Annotation/Generate.php | Generate.getMostLimitedVisibility | public static function getMostLimitedVisibility(...$requirements): string
{
foreach ([self::VISIBILITY_NONE, self::VISIBILITY_PRIVATE, self::VISIBILITY_PROTECTED] as $search_string) {
foreach ($requirements as $requirement) {
if ($requirement === $search_string) {
... | php | public static function getMostLimitedVisibility(...$requirements): string
{
foreach ([self::VISIBILITY_NONE, self::VISIBILITY_PRIVATE, self::VISIBILITY_PROTECTED] as $search_string) {
foreach ($requirements as $requirement) {
if ($requirement === $search_string) {
... | [
"public",
"static",
"function",
"getMostLimitedVisibility",
"(",
"...",
"$",
"requirements",
")",
":",
"string",
"{",
"foreach",
"(",
"[",
"self",
"::",
"VISIBILITY_NONE",
",",
"self",
"::",
"VISIBILITY_PRIVATE",
",",
"self",
"::",
"VISIBILITY_PROTECTED",
"]",
"... | Resolves the most limited visibility for method generation.
If A defines public and B defines private, the returned visibility
modifier will be private. Precedence is as following:
- none
- private
- protected
- public
@param array ...$requirements
@return string | [
"Resolves",
"the",
"most",
"limited",
"visibility",
"for",
"method",
"generation",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Annotation/Generate.php#L224-L235 |
27,721 | hostnet/accessor-generator-plugin-lib | src/Annotation/Generate.php | Generate.setDefaultVisibility | public function setDefaultVisibility(string $visibility): void
{
if (null === $this->get) {
$this->get = $visibility;
}
if (null === $this->set) {
$this->set = $visibility;
}
if (null === $this->add) {
$this->add = $visibility;
}
... | php | public function setDefaultVisibility(string $visibility): void
{
if (null === $this->get) {
$this->get = $visibility;
}
if (null === $this->set) {
$this->set = $visibility;
}
if (null === $this->add) {
$this->add = $visibility;
}
... | [
"public",
"function",
"setDefaultVisibility",
"(",
"string",
"$",
"visibility",
")",
":",
"void",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"get",
")",
"{",
"$",
"this",
"->",
"get",
"=",
"$",
"visibility",
";",
"}",
"if",
"(",
"null",
"===",... | Sets the given visibility to all accessors if they are not explicitly defined.
@param string $visibility | [
"Sets",
"the",
"given",
"visibility",
"to",
"all",
"accessors",
"if",
"they",
"are",
"not",
"explicitly",
"defined",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Annotation/Generate.php#L242-L261 |
27,722 | techdivision/import-product | src/Observers/ProductInventoryObserver.php | ProductInventoryObserver.prepareStockItemAttributes | protected function prepareStockItemAttributes()
{
return array_merge($this->prepareAttributes(), $this->attributeLoader->load($this, $this->getHeaderStockMappings()));
} | php | protected function prepareStockItemAttributes()
{
return array_merge($this->prepareAttributes(), $this->attributeLoader->load($this, $this->getHeaderStockMappings()));
} | [
"protected",
"function",
"prepareStockItemAttributes",
"(",
")",
"{",
"return",
"array_merge",
"(",
"$",
"this",
"->",
"prepareAttributes",
"(",
")",
",",
"$",
"this",
"->",
"attributeLoader",
"->",
"load",
"(",
"$",
"this",
",",
"$",
"this",
"->",
"getHeade... | Prepare the stock item attributes of the entity that has to be persisted.
@return array The prepared stock status item | [
"Prepare",
"the",
"stock",
"item",
"attributes",
"of",
"the",
"entity",
"that",
"has",
"to",
"be",
"persisted",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Observers/ProductInventoryObserver.php#L125-L128 |
27,723 | OXID-eSales/paymorrow-module | core/oxpspaymorroweshopdataprovider.php | OxpsPaymorrowEshopDataProvider.collectCommonData | public function collectCommonData()
{
/** @var OxpsPaymorrowSettings $oPmSettings */
$oPmSettings = oxNew( 'OxpsPaymorrowSettings' );
/** @var oxUser|OxpsPaymorrowOxUser $oUser */
$oUser = $this->getUser();
return array(
'merchantId' => $oPmSettings->g... | php | public function collectCommonData()
{
/** @var OxpsPaymorrowSettings $oPmSettings */
$oPmSettings = oxNew( 'OxpsPaymorrowSettings' );
/** @var oxUser|OxpsPaymorrowOxUser $oUser */
$oUser = $this->getUser();
return array(
'merchantId' => $oPmSettings->g... | [
"public",
"function",
"collectCommonData",
"(",
")",
"{",
"/** @var OxpsPaymorrowSettings $oPmSettings */",
"$",
"oPmSettings",
"=",
"oxNew",
"(",
"'OxpsPaymorrowSettings'",
")",
";",
"/** @var oxUser|OxpsPaymorrowOxUser $oUser */",
"$",
"oUser",
"=",
"$",
"this",
"->",
"... | Compiles an array with mandatory authentication data.
@return array | [
"Compiles",
"an",
"array",
"with",
"mandatory",
"authentication",
"data",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorroweshopdataprovider.php#L49-L63 |
27,724 | OXID-eSales/paymorrow-module | core/oxpspaymorroweshopdataprovider.php | OxpsPaymorrowEshopDataProvider.collectEshopData | public function collectEshopData( $blLogData = true )
{
/** @var OxpsPaymorrowOxUser|oxUser $oUser */
$oUser = $this->getUser();
// If user does not exist return null
if ( !$oUser->exists() ) {
return null;
}
/** @var OxpsPaymorrowSettings $oPmSettings *... | php | public function collectEshopData( $blLogData = true )
{
/** @var OxpsPaymorrowOxUser|oxUser $oUser */
$oUser = $this->getUser();
// If user does not exist return null
if ( !$oUser->exists() ) {
return null;
}
/** @var OxpsPaymorrowSettings $oPmSettings *... | [
"public",
"function",
"collectEshopData",
"(",
"$",
"blLogData",
"=",
"true",
")",
"{",
"/** @var OxpsPaymorrowOxUser|oxUser $oUser */",
"$",
"oUser",
"=",
"$",
"this",
"->",
"getUser",
"(",
")",
";",
"// If user does not exist return null",
"if",
"(",
"!",
"$",
"... | Compiles an array with all user and order data to pass to Paymorrow.
@param bool $blLogData
@return array | [
"Compiles",
"an",
"array",
"with",
"all",
"user",
"and",
"order",
"data",
"to",
"pass",
"to",
"Paymorrow",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorroweshopdataprovider.php#L72-L116 |
27,725 | OXID-eSales/paymorrow-module | core/oxpspaymorroweshopdataprovider.php | OxpsPaymorrowEshopDataProvider.collectConfirmData | public function collectConfirmData()
{
$aData = $this->collectEshopData(false);
// Add transaction data from session
$aData['pm_order_transaction_id'] = oxRegistry::get('OxpsPaymorrowModule')->getPaymentTransactionId();
$aData['order_id'] = oxRegistry::getSession()->getVariable('pm_... | php | public function collectConfirmData()
{
$aData = $this->collectEshopData(false);
// Add transaction data from session
$aData['pm_order_transaction_id'] = oxRegistry::get('OxpsPaymorrowModule')->getPaymentTransactionId();
$aData['order_id'] = oxRegistry::getSession()->getVariable('pm_... | [
"public",
"function",
"collectConfirmData",
"(",
")",
"{",
"$",
"aData",
"=",
"$",
"this",
"->",
"collectEshopData",
"(",
"false",
")",
";",
"// Add transaction data from session",
"$",
"aData",
"[",
"'pm_order_transaction_id'",
"]",
"=",
"oxRegistry",
"::",
"get"... | Compiles an array with order confirmation data to pass to Paymorrow.
@return array | [
"Compiles",
"an",
"array",
"with",
"order",
"confirmation",
"data",
"to",
"pass",
"to",
"Paymorrow",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorroweshopdataprovider.php#L123-L159 |
27,726 | OXID-eSales/paymorrow-module | core/oxpspaymorroweshopdataprovider.php | OxpsPaymorrowEshopDataProvider.printPmData | public function printPmData()
{
$aData = $this->collectEshopData();
$aPrintData = array(
'phone' => $this->_findInArray( $aData, 'customer_phoneNumber' ),
'mobile' => $this->_findInArray( $aData, 'customer_mobileNumber' ),
'session_... | php | public function printPmData()
{
$aData = $this->collectEshopData();
$aPrintData = array(
'phone' => $this->_findInArray( $aData, 'customer_phoneNumber' ),
'mobile' => $this->_findInArray( $aData, 'customer_mobileNumber' ),
'session_... | [
"public",
"function",
"printPmData",
"(",
")",
"{",
"$",
"aData",
"=",
"$",
"this",
"->",
"collectEshopData",
"(",
")",
";",
"$",
"aPrintData",
"=",
"array",
"(",
"'phone'",
"=>",
"$",
"this",
"->",
"_findInArray",
"(",
"$",
"aData",
",",
"'customer_phon... | Get user data for the payment form initialization in JSON format.
@return string | [
"Get",
"user",
"data",
"for",
"the",
"payment",
"form",
"initialization",
"in",
"JSON",
"format",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorroweshopdataprovider.php#L167-L206 |
27,727 | OXID-eSales/paymorrow-module | core/oxpspaymorroweshopdataprovider.php | OxpsPaymorrowEshopDataProvider.toUtf | public static function toUtf( $sSting, $mLimitLength = null )
{
if ( !oxRegistry::getConfig()->getConfigParam( 'iUtfMode' ) ) {
$sSting = iconv( 'ISO-8859-15', 'UTF-8', $sSting );
}
if ( is_integer( $mLimitLength ) and $mLimitLength > 0 ) {
$sSting = mb_substr( $sSti... | php | public static function toUtf( $sSting, $mLimitLength = null )
{
if ( !oxRegistry::getConfig()->getConfigParam( 'iUtfMode' ) ) {
$sSting = iconv( 'ISO-8859-15', 'UTF-8', $sSting );
}
if ( is_integer( $mLimitLength ) and $mLimitLength > 0 ) {
$sSting = mb_substr( $sSti... | [
"public",
"static",
"function",
"toUtf",
"(",
"$",
"sSting",
",",
"$",
"mLimitLength",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"oxRegistry",
"::",
"getConfig",
"(",
")",
"->",
"getConfigParam",
"(",
"'iUtfMode'",
")",
")",
"{",
"$",
"sSting",
"=",
"icon... | Convert default OXID encoding ISO-8859-15 to UTF-8.
Additionally it checks if shop it not on UTF-8 encoding already.
Optionally crops string to fit provided length.
@codeCoverageIgnore
@param string $sSting
@param null|int $mLimitLength
@return string | [
"Convert",
"default",
"OXID",
"encoding",
"ISO",
"-",
"8859",
"-",
"15",
"to",
"UTF",
"-",
"8",
".",
"Additionally",
"it",
"checks",
"if",
"shop",
"it",
"not",
"on",
"UTF",
"-",
"8",
"encoding",
"already",
".",
"Optionally",
"crops",
"string",
"to",
"f... | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorroweshopdataprovider.php#L233-L244 |
27,728 | OXID-eSales/paymorrow-module | core/oxpspaymorroweshopdataprovider.php | OxpsPaymorrowEshopDataProvider._findInArray | protected function _findInArray( array $aData, $mKey, $sDefault = '' )
{
$sVal = $sDefault;
if ( array_key_exists( $mKey, $aData ) and is_scalar( $aData[$mKey] ) ) {
$sVal = trim( (string) $aData[$mKey] );
}
return $sVal;
} | php | protected function _findInArray( array $aData, $mKey, $sDefault = '' )
{
$sVal = $sDefault;
if ( array_key_exists( $mKey, $aData ) and is_scalar( $aData[$mKey] ) ) {
$sVal = trim( (string) $aData[$mKey] );
}
return $sVal;
} | [
"protected",
"function",
"_findInArray",
"(",
"array",
"$",
"aData",
",",
"$",
"mKey",
",",
"$",
"sDefault",
"=",
"''",
")",
"{",
"$",
"sVal",
"=",
"$",
"sDefault",
";",
"if",
"(",
"array_key_exists",
"(",
"$",
"mKey",
",",
"$",
"aData",
")",
"and",
... | Get array value by key.
@param array $aData
@param mixed $mKey
@param mixed $sDefault
@return string | [
"Get",
"array",
"value",
"by",
"key",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorroweshopdataprovider.php#L256-L265 |
27,729 | OXID-eSales/paymorrow-module | core/oxpspaymorroweshopdataprovider.php | OxpsPaymorrowEshopDataProvider._getBrowserHeaders | protected function _getBrowserHeaders()
{
$sHeaders = '';
$aHeaders = apache_request_headers();
foreach ( $aHeaders as $sHeader => $sValue ) {
$sHeaders .= " $sHeader: $sValue\n";
}
return base64_encode( $sHeaders );
} | php | protected function _getBrowserHeaders()
{
$sHeaders = '';
$aHeaders = apache_request_headers();
foreach ( $aHeaders as $sHeader => $sValue ) {
$sHeaders .= " $sHeader: $sValue\n";
}
return base64_encode( $sHeaders );
} | [
"protected",
"function",
"_getBrowserHeaders",
"(",
")",
"{",
"$",
"sHeaders",
"=",
"''",
";",
"$",
"aHeaders",
"=",
"apache_request_headers",
"(",
")",
";",
"foreach",
"(",
"$",
"aHeaders",
"as",
"$",
"sHeader",
"=>",
"$",
"sValue",
")",
"{",
"$",
"sHea... | Get request headers string.
@codeCoverageIgnore
@return string | [
"Get",
"request",
"headers",
"string",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorroweshopdataprovider.php#L274-L284 |
27,730 | OXID-eSales/paymorrow-module | core/oxpspaymorroweshopdataprovider.php | OxpsPaymorrowEshopDataProvider._getBasketAndSessionHash | protected function _getBasketAndSessionHash()
{
$oSession = oxRegistry::getSession();
$oBasket = $oSession->getBasket();
return md5(
$oSession->getId() . serialize( $oBasket ) .
$this->getUniqueString( self::OXPS_PAYMORROW_ORDER_HASH_SALT )
);
} | php | protected function _getBasketAndSessionHash()
{
$oSession = oxRegistry::getSession();
$oBasket = $oSession->getBasket();
return md5(
$oSession->getId() . serialize( $oBasket ) .
$this->getUniqueString( self::OXPS_PAYMORROW_ORDER_HASH_SALT )
);
} | [
"protected",
"function",
"_getBasketAndSessionHash",
"(",
")",
"{",
"$",
"oSession",
"=",
"oxRegistry",
"::",
"getSession",
"(",
")",
";",
"$",
"oBasket",
"=",
"$",
"oSession",
"->",
"getBasket",
"(",
")",
";",
"return",
"md5",
"(",
"$",
"oSession",
"->",
... | Compiles a hash string to identify a basket in current session.
Used as temporary order ID.
@return string | [
"Compiles",
"a",
"hash",
"string",
"to",
"identify",
"a",
"basket",
"in",
"current",
"session",
".",
"Used",
"as",
"temporary",
"order",
"ID",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorroweshopdataprovider.php#L292-L301 |
27,731 | OXID-eSales/paymorrow-module | core/oxpspaymorroweshopdataprovider.php | OxpsPaymorrowEshopDataProvider._addOrderData | protected function _addOrderData( array $aData, oxUser $oUser )
{
/** @var OxpsPaymorrowOxBasket|oxBasket $oBasket */
$oBasket = $oUser->getUserPaymorrowUserBasketFromSession();
// Common order fields
$aData['order_grossAmount'] = (double) $oBasket->getPaymorrowTotalAmount();
... | php | protected function _addOrderData( array $aData, oxUser $oUser )
{
/** @var OxpsPaymorrowOxBasket|oxBasket $oBasket */
$oBasket = $oUser->getUserPaymorrowUserBasketFromSession();
// Common order fields
$aData['order_grossAmount'] = (double) $oBasket->getPaymorrowTotalAmount();
... | [
"protected",
"function",
"_addOrderData",
"(",
"array",
"$",
"aData",
",",
"oxUser",
"$",
"oUser",
")",
"{",
"/** @var OxpsPaymorrowOxBasket|oxBasket $oBasket */",
"$",
"oBasket",
"=",
"$",
"oUser",
"->",
"getUserPaymorrowUserBasketFromSession",
"(",
")",
";",
"// Com... | Add order related data to array.
@param array $aData
@param OxpsPaymorrowOxUser|oxUser $oUser
@return array | [
"Add",
"order",
"related",
"data",
"to",
"array",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorroweshopdataprovider.php#L312-L326 |
27,732 | OXID-eSales/paymorrow-module | core/oxpspaymorroweshopdataprovider.php | OxpsPaymorrowEshopDataProvider._addOrderHistoryData | protected function _addOrderHistoryData( array $aData, oxUser $oUser )
{
/** @var oxList $oOrdersList */
$oOrdersList = $oUser->getOrders( 10 );
if ( empty( $oOrdersList ) or !$oOrdersList->count() ) {
return $aData;
}
$sFieldPrefix = 'customer_history_%d_%s';
... | php | protected function _addOrderHistoryData( array $aData, oxUser $oUser )
{
/** @var oxList $oOrdersList */
$oOrdersList = $oUser->getOrders( 10 );
if ( empty( $oOrdersList ) or !$oOrdersList->count() ) {
return $aData;
}
$sFieldPrefix = 'customer_history_%d_%s';
... | [
"protected",
"function",
"_addOrderHistoryData",
"(",
"array",
"$",
"aData",
",",
"oxUser",
"$",
"oUser",
")",
"{",
"/** @var oxList $oOrdersList */",
"$",
"oOrdersList",
"=",
"$",
"oUser",
"->",
"getOrders",
"(",
"10",
")",
";",
"if",
"(",
"empty",
"(",
"$"... | Add user order history data.
Maximum 10 last orders fields are added.
@param array $aData
@param oxUser $oUser
@return array | [
"Add",
"user",
"order",
"history",
"data",
".",
"Maximum",
"10",
"last",
"orders",
"fields",
"are",
"added",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorroweshopdataprovider.php#L416-L440 |
27,733 | OXID-eSales/paymorrow-module | core/oxpspaymorroweshopdataprovider.php | OxpsPaymorrowEshopDataProvider._addDeviceAndClientData | protected function _addDeviceAndClientData( array $aData, oxUser $oUser )
{
$oSession = oxRegistry::getSession();
$sSessionId = $oSession->getId();
$aData['device_checkId'] = $sSessionId;
$aData['client_browser_session_id'] = $sSessionId;
$aData['client_cookies_... | php | protected function _addDeviceAndClientData( array $aData, oxUser $oUser )
{
$oSession = oxRegistry::getSession();
$sSessionId = $oSession->getId();
$aData['device_checkId'] = $sSessionId;
$aData['client_browser_session_id'] = $sSessionId;
$aData['client_cookies_... | [
"protected",
"function",
"_addDeviceAndClientData",
"(",
"array",
"$",
"aData",
",",
"oxUser",
"$",
"oUser",
")",
"{",
"$",
"oSession",
"=",
"oxRegistry",
"::",
"getSession",
"(",
")",
";",
"$",
"sSessionId",
"=",
"$",
"oSession",
"->",
"getId",
"(",
")",
... | Add device and user client data.
@param array $aData
@param OxpsPaymorrowOxUser|oxUser $oUser
@return array | [
"Add",
"device",
"and",
"user",
"client",
"data",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorroweshopdataprovider.php#L450-L462 |
27,734 | OXID-eSales/paymorrow-module | controllers/oxpspaymorroworder.php | OxpsPaymorrowOrder._updatePaymentDescription | protected function _updatePaymentDescription(oxPayment $oxPayment)
{
$oLang = oxRegistry::getLang();
if ($oxPayment->getPaymorrowPaymentType() == 'pm_invoice') {
$oxPayment->oxpayments__oxdesc = new oxField(
$oLang->translateString('PAYMORROW_PAYMENT_METHOD_NAME_INVOICE'... | php | protected function _updatePaymentDescription(oxPayment $oxPayment)
{
$oLang = oxRegistry::getLang();
if ($oxPayment->getPaymorrowPaymentType() == 'pm_invoice') {
$oxPayment->oxpayments__oxdesc = new oxField(
$oLang->translateString('PAYMORROW_PAYMENT_METHOD_NAME_INVOICE'... | [
"protected",
"function",
"_updatePaymentDescription",
"(",
"oxPayment",
"$",
"oxPayment",
")",
"{",
"$",
"oLang",
"=",
"oxRegistry",
"::",
"getLang",
"(",
")",
";",
"if",
"(",
"$",
"oxPayment",
"->",
"getPaymorrowPaymentType",
"(",
")",
"==",
"'pm_invoice'",
"... | Update payment model description fields with custom translations and set the payment.
@param OxpsPaymorrowOxPayment|oxPayment $oxPayment | [
"Update",
"payment",
"model",
"description",
"fields",
"with",
"custom",
"translations",
"and",
"set",
"the",
"payment",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/controllers/oxpspaymorroworder.php#L74-L89 |
27,735 | OXID-eSales/paymorrow-module | controllers/oxpspaymorroworder.php | OxpsPaymorrowOrder._getNextStep | protected function _getNextStep( $iSuccess )
{
/** @var OxpsPaymorrowResponseHandler $oPmResponseHandler */
$oPmResponseHandler = oxRegistry::get( 'OxpsPaymorrowResponseHandler' );
/**
* If after validating confirmOrder against Paymorrow services there are errors,
* return... | php | protected function _getNextStep( $iSuccess )
{
/** @var OxpsPaymorrowResponseHandler $oPmResponseHandler */
$oPmResponseHandler = oxRegistry::get( 'OxpsPaymorrowResponseHandler' );
/**
* If after validating confirmOrder against Paymorrow services there are errors,
* return... | [
"protected",
"function",
"_getNextStep",
"(",
"$",
"iSuccess",
")",
"{",
"/** @var OxpsPaymorrowResponseHandler $oPmResponseHandler */",
"$",
"oPmResponseHandler",
"=",
"oxRegistry",
"::",
"get",
"(",
"'OxpsPaymorrowResponseHandler'",
")",
";",
"/**\n * If after validat... | Overridden for Paymorrow Services validation
@param $iSuccess
@return string | [
"Overridden",
"for",
"Paymorrow",
"Services",
"validation"
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/controllers/oxpspaymorroworder.php#L98-L141 |
27,736 | OXID-eSales/paymorrow-module | controllers/oxpspaymorroworder.php | OxpsPaymorrowOrder._checkForErrorsToRedirect | protected function _checkForErrorsToRedirect()
{
if ( oxRegistry::getSession()->getVariable( 'pm_init_data' ) ) {
$sUrl = oxRegistry::getConfig()->getShopCurrentUrl() . "cl=payment";
$sUrl = oxRegistry::get( "oxUtilsUrl" )->processUrl( $sUrl );
oxRegistry::getUtils()->re... | php | protected function _checkForErrorsToRedirect()
{
if ( oxRegistry::getSession()->getVariable( 'pm_init_data' ) ) {
$sUrl = oxRegistry::getConfig()->getShopCurrentUrl() . "cl=payment";
$sUrl = oxRegistry::get( "oxUtilsUrl" )->processUrl( $sUrl );
oxRegistry::getUtils()->re... | [
"protected",
"function",
"_checkForErrorsToRedirect",
"(",
")",
"{",
"if",
"(",
"oxRegistry",
"::",
"getSession",
"(",
")",
"->",
"getVariable",
"(",
"'pm_init_data'",
")",
")",
"{",
"$",
"sUrl",
"=",
"oxRegistry",
"::",
"getConfig",
"(",
")",
"->",
"getShop... | Check session for init error and redirect to payment step is any found.
The error or order declination entries are set during order confirmation.
This data is used on payment step ho inform user and handle payment forms and it is always unset there.
@codeCoverageIgnore | [
"Check",
"session",
"for",
"init",
"error",
"and",
"redirect",
"to",
"payment",
"step",
"is",
"any",
"found",
".",
"The",
"error",
"or",
"order",
"declination",
"entries",
"are",
"set",
"during",
"order",
"confirmation",
".",
"This",
"data",
"is",
"used",
... | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/controllers/oxpspaymorroworder.php#L150-L158 |
27,737 | hostnet/accessor-generator-plugin-lib | src/AnnotationProcessor/DoctrineAnnotationProcessor.php | DoctrineAnnotationProcessor.processBidirectional | private function processBidirectional($annotation, PropertyInformation $information): void
{
// Parse the mappedBy and inversedBy columns, there is no nice interface
// on them so we have to check for existence of the property.
if (property_exists($annotation, 'inversedBy') && $annotation->i... | php | private function processBidirectional($annotation, PropertyInformation $information): void
{
// Parse the mappedBy and inversedBy columns, there is no nice interface
// on them so we have to check for existence of the property.
if (property_exists($annotation, 'inversedBy') && $annotation->i... | [
"private",
"function",
"processBidirectional",
"(",
"$",
"annotation",
",",
"PropertyInformation",
"$",
"information",
")",
":",
"void",
"{",
"// Parse the mappedBy and inversedBy columns, there is no nice interface",
"// on them so we have to check for existence of the property.",
"... | Return referenced entity if we have a bidirectional doctrine association.
@throws \DomainException
@throws \InvalidArgumentException
@param mixed $annotation with annotation Annotation
@param PropertyInformation $information | [
"Return",
"referenced",
"entity",
"if",
"we",
"have",
"a",
"bidirectional",
"doctrine",
"association",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/AnnotationProcessor/DoctrineAnnotationProcessor.php#L114-L139 |
27,738 | hostnet/accessor-generator-plugin-lib | src/AnnotationProcessor/DoctrineAnnotationProcessor.php | DoctrineAnnotationProcessor.processColumn | protected function processColumn(Column $column, PropertyInformation $information): void
{
$information->setType($this->transformType($column->type));
$information->setFixedPointNumber(strtolower($column->type) === Type::DECIMAL);
$information->setLength($column->length ?: 0);
$infor... | php | protected function processColumn(Column $column, PropertyInformation $information): void
{
$information->setType($this->transformType($column->type));
$information->setFixedPointNumber(strtolower($column->type) === Type::DECIMAL);
$information->setLength($column->length ?: 0);
$infor... | [
"protected",
"function",
"processColumn",
"(",
"Column",
"$",
"column",
",",
"PropertyInformation",
"$",
"information",
")",
":",
"void",
"{",
"$",
"information",
"->",
"setType",
"(",
"$",
"this",
"->",
"transformType",
"(",
"$",
"column",
"->",
"type",
")"... | Process a Column Annotation, extract information about scale and
precision for decimal types, length and size of string and integer
types, if the column may be null and if it should be a unique value.
@param Column $column
@param PropertyInformation $information
@throws InvalidColumnSettingsException
@throws \DomainE... | [
"Process",
"a",
"Column",
"Annotation",
"extract",
"information",
"about",
"scale",
"and",
"precision",
"for",
"decimal",
"types",
"length",
"and",
"size",
"of",
"string",
"and",
"integer",
"types",
"if",
"the",
"column",
"may",
"be",
"null",
"and",
"if",
"i... | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/AnnotationProcessor/DoctrineAnnotationProcessor.php#L156-L183 |
27,739 | hostnet/accessor-generator-plugin-lib | src/AnnotationProcessor/DoctrineAnnotationProcessor.php | DoctrineAnnotationProcessor.processJoinColumn | private function processJoinColumn(JoinColumn $join_column, PropertyInformation $information): void
{
$information->setNullable($join_column->nullable);
$information->setUnique($join_column->unique);
} | php | private function processJoinColumn(JoinColumn $join_column, PropertyInformation $information): void
{
$information->setNullable($join_column->nullable);
$information->setUnique($join_column->unique);
} | [
"private",
"function",
"processJoinColumn",
"(",
"JoinColumn",
"$",
"join_column",
",",
"PropertyInformation",
"$",
"information",
")",
":",
"void",
"{",
"$",
"information",
"->",
"setNullable",
"(",
"$",
"join_column",
"->",
"nullable",
")",
";",
"$",
"informat... | Process a JoinColumn Annotation, extract nullable.
@param JoinColumn $join_column
@param PropertyInformation $information | [
"Process",
"a",
"JoinColumn",
"Annotation",
"extract",
"nullable",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/AnnotationProcessor/DoctrineAnnotationProcessor.php#L191-L195 |
27,740 | hostnet/accessor-generator-plugin-lib | src/AnnotationProcessor/PropertyInformation.php | PropertyInformation.processAnnotations | public function processAnnotations(): void
{
$class = $this->property->getClass();
$imports = $class ? array_change_key_case($class->getUseStatements()) : [];
$filename = $class ? $class->getFilename() : 'memory';
// Get all the namespaces in which annotations reside.
$n... | php | public function processAnnotations(): void
{
$class = $this->property->getClass();
$imports = $class ? array_change_key_case($class->getUseStatements()) : [];
$filename = $class ? $class->getFilename() : 'memory';
// Get all the namespaces in which annotations reside.
$n... | [
"public",
"function",
"processAnnotations",
"(",
")",
":",
"void",
"{",
"$",
"class",
"=",
"$",
"this",
"->",
"property",
"->",
"getClass",
"(",
")",
";",
"$",
"imports",
"=",
"$",
"class",
"?",
"array_change_key_case",
"(",
"$",
"class",
"->",
"getUseSt... | Start the processing of processAnnotations
@return void
@throws \OutOfBoundsException
@throws \Hostnet\Component\AccessorGenerator\Reflection\Exception\ClassDefinitionNotFoundException
@throws \RuntimeException | [
"Start",
"the",
"processing",
"of",
"processAnnotations"
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/AnnotationProcessor/PropertyInformation.php#L238-L302 |
27,741 | hostnet/accessor-generator-plugin-lib | src/AnnotationProcessor/PropertyInformation.php | PropertyInformation.validateType | private function validateType(string $type): string
{
if ('' === $type) {
throw new \DomainException(sprintf('A type name may not be empty'));
}
if ((int) $type) {
throw new \DomainException(sprintf('A type name may not start with a number. Found %s', $type));
... | php | private function validateType(string $type): string
{
if ('' === $type) {
throw new \DomainException(sprintf('A type name may not be empty'));
}
if ((int) $type) {
throw new \DomainException(sprintf('A type name may not start with a number. Found %s', $type));
... | [
"private",
"function",
"validateType",
"(",
"string",
"$",
"type",
")",
":",
"string",
"{",
"if",
"(",
"''",
"===",
"$",
"type",
")",
"{",
"throw",
"new",
"\\",
"DomainException",
"(",
"sprintf",
"(",
"'A type name may not be empty'",
")",
")",
";",
"}",
... | Throw exceptions for invalid types or return the valid type.
@see http://php.net/manual/en/language.types.php
@param string $type
@throws \DomainException
@throws \InvalidArgumentException
@return string | [
"Throw",
"exceptions",
"for",
"invalid",
"types",
"or",
"return",
"the",
"valid",
"type",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/AnnotationProcessor/PropertyInformation.php#L404-L425 |
27,742 | hostnet/accessor-generator-plugin-lib | src/AnnotationProcessor/PropertyInformation.php | PropertyInformation.setType | public function setType(?string $type): self
{
$this->type = $this->validateType($type);
$this->type_hint || $this->type_hint = $this->type;
return $this;
} | php | public function setType(?string $type): self
{
$this->type = $this->validateType($type);
$this->type_hint || $this->type_hint = $this->type;
return $this;
} | [
"public",
"function",
"setType",
"(",
"?",
"string",
"$",
"type",
")",
":",
"self",
"{",
"$",
"this",
"->",
"type",
"=",
"$",
"this",
"->",
"validateType",
"(",
"$",
"type",
")",
";",
"$",
"this",
"->",
"type_hint",
"||",
"$",
"this",
"->",
"type_h... | Set the type for this property.
The type must be one of the set returned
by getValidTypes.
@see http://php.net/manual/en/language.types.php
@param string|null $type
@throws \DomainException
@throws \InvalidArgumentException
@return PropertyInformation | [
"Set",
"the",
"type",
"for",
"this",
"property",
".",
"The",
"type",
"must",
"be",
"one",
"of",
"the",
"set",
"returned",
"by",
"getValidTypes",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/AnnotationProcessor/PropertyInformation.php#L440-L446 |
27,743 | hostnet/accessor-generator-plugin-lib | src/AnnotationProcessor/PropertyInformation.php | PropertyInformation.setTypeHint | public function setTypeHint(string $type_hint): self
{
$this->type_hint = $this->validateType($type_hint);
return $this;
} | php | public function setTypeHint(string $type_hint): self
{
$this->type_hint = $this->validateType($type_hint);
return $this;
} | [
"public",
"function",
"setTypeHint",
"(",
"string",
"$",
"type_hint",
")",
":",
"self",
"{",
"$",
"this",
"->",
"type_hint",
"=",
"$",
"this",
"->",
"validateType",
"(",
"$",
"type_hint",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Manually set the type hint for this property
The type hint must be a valid class name starting
with \ or a capital letter or one of the set returned
by getValidTypes.
Only use this method if you are not pleased
by the automatic type hint that was already
set by the setType method.
@see http://php.net/manual/en/langua... | [
"Manually",
"set",
"the",
"type",
"hint",
"for",
"this",
"property",
"The",
"type",
"hint",
"must",
"be",
"a",
"valid",
"class",
"name",
"starting",
"with",
"\\",
"or",
"a",
"capital",
"letter",
"or",
"one",
"of",
"the",
"set",
"returned",
"by",
"getVali... | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/AnnotationProcessor/PropertyInformation.php#L466-L471 |
27,744 | hostnet/accessor-generator-plugin-lib | src/AnnotationProcessor/PropertyInformation.php | PropertyInformation.setFullyQualifiedType | public function setFullyQualifiedType(string $type): self
{
if ('' === $type) {
$this->fully_qualified_type = '';
return $this;
}
if ($type[0] === '\\') {
$this->fully_qualified_type = $type;
return $this;
}
throw new \Domai... | php | public function setFullyQualifiedType(string $type): self
{
if ('' === $type) {
$this->fully_qualified_type = '';
return $this;
}
if ($type[0] === '\\') {
$this->fully_qualified_type = $type;
return $this;
}
throw new \Domai... | [
"public",
"function",
"setFullyQualifiedType",
"(",
"string",
"$",
"type",
")",
":",
"self",
"{",
"if",
"(",
"''",
"===",
"$",
"type",
")",
"{",
"$",
"this",
"->",
"fully_qualified_type",
"=",
"''",
";",
"return",
"$",
"this",
";",
"}",
"if",
"(",
"$... | Set the fully qualified type for this property.
The type must be a valid class name starting from
the root namespace, so it should start with a \
@param string $type
@throws \DomainException
@return PropertyInformation | [
"Set",
"the",
"fully",
"qualified",
"type",
"for",
"this",
"property",
".",
"The",
"type",
"must",
"be",
"a",
"valid",
"class",
"name",
"starting",
"from",
"the",
"root",
"namespace",
"so",
"it",
"should",
"start",
"with",
"a",
"\\"
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/AnnotationProcessor/PropertyInformation.php#L483-L498 |
27,745 | hostnet/accessor-generator-plugin-lib | src/AnnotationProcessor/PropertyInformation.php | PropertyInformation.setEncryptionAlias | public function setEncryptionAlias(string $encryption_alias): self
{
if (empty($encryption_alias)) {
throw new \InvalidArgumentException(sprintf('encryption_alias must not be empty %s', $encryption_alias));
}
$this->encryption_alias = $encryption_alias;
return $this;
... | php | public function setEncryptionAlias(string $encryption_alias): self
{
if (empty($encryption_alias)) {
throw new \InvalidArgumentException(sprintf('encryption_alias must not be empty %s', $encryption_alias));
}
$this->encryption_alias = $encryption_alias;
return $this;
... | [
"public",
"function",
"setEncryptionAlias",
"(",
"string",
"$",
"encryption_alias",
")",
":",
"self",
"{",
"if",
"(",
"empty",
"(",
"$",
"encryption_alias",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"sprintf",
"(",
"'encryption_alias ... | Set the encryption alias for this property, used to encrypt the value before storing.
The alias must be added to the composer.json of the app, with the proper keys defined (depending
on if the app will encrypt, decrypt or do both).
"extra": {
"accessor-generator": {
$encryption_alias: {
public-key:
private-key:
...
... | [
"Set",
"the",
"encryption",
"alias",
"for",
"this",
"property",
"used",
"to",
"encrypt",
"the",
"value",
"before",
"storing",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/AnnotationProcessor/PropertyInformation.php#L528-L537 |
27,746 | hostnet/accessor-generator-plugin-lib | src/AnnotationProcessor/PropertyInformation.php | PropertyInformation.setIntegerSize | public function setIntegerSize(int $integer_size): self
{
// Check Range.
$max_int_size = PHP_INT_SIZE << 3;
if ($integer_size <= 0 || $integer_size > $max_int_size) {
throw new \RangeException(
sprintf('Integer size %d, does not fit in domain (0, %d]', $integer_s... | php | public function setIntegerSize(int $integer_size): self
{
// Check Range.
$max_int_size = PHP_INT_SIZE << 3;
if ($integer_size <= 0 || $integer_size > $max_int_size) {
throw new \RangeException(
sprintf('Integer size %d, does not fit in domain (0, %d]', $integer_s... | [
"public",
"function",
"setIntegerSize",
"(",
"int",
"$",
"integer_size",
")",
":",
"self",
"{",
"// Check Range.",
"$",
"max_int_size",
"=",
"PHP_INT_SIZE",
"<<",
"3",
";",
"if",
"(",
"$",
"integer_size",
"<=",
"0",
"||",
"$",
"integer_size",
">",
"$",
"ma... | Set the size of the integer that will be stored, in bits.
@throws \InvalidArgumentException
@throws \RangeException
@param int $integer_size
@return PropertyInformation | [
"Set",
"the",
"size",
"of",
"the",
"integer",
"that",
"will",
"be",
"stored",
"in",
"bits",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/AnnotationProcessor/PropertyInformation.php#L592-L606 |
27,747 | hostnet/accessor-generator-plugin-lib | src/AnnotationProcessor/PropertyInformation.php | PropertyInformation.setPrecision | public function setPrecision(int $precision): self
{
// Check range.
if ($precision < 0 || $precision > 65) {
throw new \RangeException(sprintf('Precision %d, should be in interval [1,65]', $precision));
}
$this->precision = $precision;
return $this;
} | php | public function setPrecision(int $precision): self
{
// Check range.
if ($precision < 0 || $precision > 65) {
throw new \RangeException(sprintf('Precision %d, should be in interval [1,65]', $precision));
}
$this->precision = $precision;
return $this;
} | [
"public",
"function",
"setPrecision",
"(",
"int",
"$",
"precision",
")",
":",
"self",
"{",
"// Check range.",
"if",
"(",
"$",
"precision",
"<",
"0",
"||",
"$",
"precision",
">",
"65",
")",
"{",
"throw",
"new",
"\\",
"RangeException",
"(",
"sprintf",
"(",... | Set the number of significant digits for a decimal number.
This is only applicable to fixed point storage. The type will be a
string in that case because PHP has no fixed point numbers.
@see http://dev.mysql.com/doc/refman/5.7/en/precision-math-decimal-characteristics.html
@throws \RangeException It has a range of 1... | [
"Set",
"the",
"number",
"of",
"significant",
"digits",
"for",
"a",
"decimal",
"number",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/AnnotationProcessor/PropertyInformation.php#L767-L777 |
27,748 | hostnet/accessor-generator-plugin-lib | src/AnnotationProcessor/PropertyInformation.php | PropertyInformation.setScale | public function setScale(int $scale): self
{
// Check range.
if ($scale < 0 || $scale > 30) {
throw new \RangeException(sprintf('Scale "%d", should be in interval [0,30]', $scale));
}
$this->scale = $scale;
return $this;
} | php | public function setScale(int $scale): self
{
// Check range.
if ($scale < 0 || $scale > 30) {
throw new \RangeException(sprintf('Scale "%d", should be in interval [0,30]', $scale));
}
$this->scale = $scale;
return $this;
} | [
"public",
"function",
"setScale",
"(",
"int",
"$",
"scale",
")",
":",
"self",
"{",
"// Check range.",
"if",
"(",
"$",
"scale",
"<",
"0",
"||",
"$",
"scale",
">",
"30",
")",
"{",
"throw",
"new",
"\\",
"RangeException",
"(",
"sprintf",
"(",
"'Scale \"%d\... | Set the number of significant digits after the decimal point.
This is only applicable to fixed point storage. The type will be a float
in that case because PHP has no fixed point numbers.
@see http://dev.mysql.com/doc/refman/5.7/en/precision-math-decimal-characteristics.html
@throws \RangeException
@param int $scale... | [
"Set",
"the",
"number",
"of",
"significant",
"digits",
"after",
"the",
"decimal",
"point",
".",
"This",
"is",
"only",
"applicable",
"to",
"fixed",
"point",
"storage",
".",
"The",
"type",
"will",
"be",
"a",
"float",
"in",
"that",
"case",
"because",
"PHP",
... | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/AnnotationProcessor/PropertyInformation.php#L802-L812 |
27,749 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxpaymentgateway.php | OxpsPaymorrowOxPaymentGateway._savePaymorrowUserPaymentData | protected function _savePaymorrowUserPaymentData( oxOrder $oOrder, $oPmResponseHandler )
{
$aPmResponse = $oPmResponseHandler->getResponse();
$oUserPaymentId = $oOrder->oxorder__oxpaymentid->value;
/** @var OxpsPaymorrowOxUserPayment|oxUserPayment $oUserPayment */
$oUserPayment = o... | php | protected function _savePaymorrowUserPaymentData( oxOrder $oOrder, $oPmResponseHandler )
{
$aPmResponse = $oPmResponseHandler->getResponse();
$oUserPaymentId = $oOrder->oxorder__oxpaymentid->value;
/** @var OxpsPaymorrowOxUserPayment|oxUserPayment $oUserPayment */
$oUserPayment = o... | [
"protected",
"function",
"_savePaymorrowUserPaymentData",
"(",
"oxOrder",
"$",
"oOrder",
",",
"$",
"oPmResponseHandler",
")",
"{",
"$",
"aPmResponse",
"=",
"$",
"oPmResponseHandler",
"->",
"getResponse",
"(",
")",
";",
"$",
"oUserPaymentId",
"=",
"$",
"oOrder",
... | Saves Paymorrow User Payment data to oxUserPayments table
@param oxOrder $oOrder
@param OxpsPaymorrowResponseHandler $oPmResponseHandler
@return bool|string | [
"Saves",
"Paymorrow",
"User",
"Payment",
"data",
"to",
"oxUserPayments",
"table"
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxpaymentgateway.php#L104-L125 |
27,750 | OXID-eSales/paymorrow-module | models/oxpspaymorrowoxpaymentgateway.php | OxpsPaymorrowOxPaymentGateway._handleOrderResponseErrors | protected function _handleOrderResponseErrors( $oPmResponseHandler )
{
$aInitDataForPaymentStep = array();
// If order was declined, collect declination fields and unset error code ("unexpected" error)
if ( $oPmResponseHandler->wasDeclined() ) {
$aInitDataForPaymentStep = (array... | php | protected function _handleOrderResponseErrors( $oPmResponseHandler )
{
$aInitDataForPaymentStep = array();
// If order was declined, collect declination fields and unset error code ("unexpected" error)
if ( $oPmResponseHandler->wasDeclined() ) {
$aInitDataForPaymentStep = (array... | [
"protected",
"function",
"_handleOrderResponseErrors",
"(",
"$",
"oPmResponseHandler",
")",
"{",
"$",
"aInitDataForPaymentStep",
"=",
"array",
"(",
")",
";",
"// If order was declined, collect declination fields and unset error code (\"unexpected\" error)",
"if",
"(",
"$",
"oPm... | Check order response for declination status and fields and error fields.
Set all relevant fields to session.
The session data is used to go with redirection to payment step and used to initialize payment forms.
@param OxpsPaymorrowResponseHandler $oPmResponseHandler | [
"Check",
"order",
"response",
"for",
"declination",
"status",
"and",
"fields",
"and",
"error",
"fields",
".",
"Set",
"all",
"relevant",
"fields",
"to",
"session",
".",
"The",
"session",
"data",
"is",
"used",
"to",
"go",
"with",
"redirection",
"to",
"payment"... | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/models/oxpspaymorrowoxpaymentgateway.php#L134-L155 |
27,751 | techdivision/import-product | src/Observers/ProductWebsiteUpdateObserver.php | ProductWebsiteUpdateObserver.initializeProductWebsite | protected function initializeProductWebsite(array $attr)
{
// try to load the product website relation with the passed product/website ID
if ($this->loadProductWebsite($attr[MemberNames::PRODUCT_ID], $attr[MemberNames::WEBSITE_ID])) {
// throw a runtime exception, if the relation alread... | php | protected function initializeProductWebsite(array $attr)
{
// try to load the product website relation with the passed product/website ID
if ($this->loadProductWebsite($attr[MemberNames::PRODUCT_ID], $attr[MemberNames::WEBSITE_ID])) {
// throw a runtime exception, if the relation alread... | [
"protected",
"function",
"initializeProductWebsite",
"(",
"array",
"$",
"attr",
")",
"{",
"// try to load the product website relation with the passed product/website ID",
"if",
"(",
"$",
"this",
"->",
"loadProductWebsite",
"(",
"$",
"attr",
"[",
"MemberNames",
"::",
"PRO... | Initialize the product website with the passed attributes and returns an instance.
@param array $attr The product website attributes
@return array The initialized product website
@throws \RuntimeException Is thrown, if the attributes can not be initialized | [
"Initialize",
"the",
"product",
"website",
"with",
"the",
"passed",
"attributes",
"and",
"returns",
"an",
"instance",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Observers/ProductWebsiteUpdateObserver.php#L45-L62 |
27,752 | contributte/thepay-api | src/DataApi/DataApiObject.php | DataApiObject.sortDataProperties | private static function sortDataProperties(array $dataProperties): array
{
$inherited = [];
$own = [];
$calledClassName = static::class;
foreach ($dataProperties as $property) {
$propertyClass = $property->getDeclaringClass();
$propertyClassName = $propertyClass->getName();
if ($propertyClassName =... | php | private static function sortDataProperties(array $dataProperties): array
{
$inherited = [];
$own = [];
$calledClassName = static::class;
foreach ($dataProperties as $property) {
$propertyClass = $property->getDeclaringClass();
$propertyClassName = $propertyClass->getName();
if ($propertyClassName =... | [
"private",
"static",
"function",
"sortDataProperties",
"(",
"array",
"$",
"dataProperties",
")",
":",
"array",
"{",
"$",
"inherited",
"=",
"[",
"]",
";",
"$",
"own",
"=",
"[",
"]",
";",
"$",
"calledClassName",
"=",
"static",
"::",
"class",
";",
"foreach"... | Prepend inherited properties.
@param ReflectionProperty[] $dataProperties
@return ReflectionProperty[] | [
"Prepend",
"inherited",
"properties",
"."
] | 7e28eaf30ad1880533add93cf9e7296e61c09b8e | https://github.com/contributte/thepay-api/blob/7e28eaf30ad1880533add93cf9e7296e61c09b8e/src/DataApi/DataApiObject.php#L76-L95 |
27,753 | hostnet/accessor-generator-plugin-lib | src/Reflection/ReflectionClass.php | ReflectionClass.getName | public function getName(): string
{
// Check cache.
if (null === $this->name) {
$tokens = $this->getTokenStream();
// Find class token
try {
$loc = $tokens->scan(0, [T_CLASS, T_TRAIT]);
} catch (\OutOfBoundsException $e) {
... | php | public function getName(): string
{
// Check cache.
if (null === $this->name) {
$tokens = $this->getTokenStream();
// Find class token
try {
$loc = $tokens->scan(0, [T_CLASS, T_TRAIT]);
} catch (\OutOfBoundsException $e) {
... | [
"public",
"function",
"getName",
"(",
")",
":",
"string",
"{",
"// Check cache.",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"name",
")",
"{",
"$",
"tokens",
"=",
"$",
"this",
"->",
"getTokenStream",
"(",
")",
";",
"// Find class token",
"try",
"{",
... | Returns the name of the class, inside this file.
This is the simple class name and not the fully
qualified class name.
@throws Exception\ClassDefinitionNotFoundException
@throws \OutOfBoundsException
@return string | [
"Returns",
"the",
"name",
"of",
"the",
"class",
"inside",
"this",
"file",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Reflection/ReflectionClass.php#L125-L159 |
27,754 | hostnet/accessor-generator-plugin-lib | src/Reflection/ReflectionClass.php | ReflectionClass.getNamespace | public function getNamespace(): string
{
// Check cache.
if (null === $this->namespace) {
$tokens = $this->getTokenStream();
// Find namespace token
try {
$loc = $tokens->scan(0, [T_NAMESPACE]);
} catch (\OutOfBoundsException $e) {
... | php | public function getNamespace(): string
{
// Check cache.
if (null === $this->namespace) {
$tokens = $this->getTokenStream();
// Find namespace token
try {
$loc = $tokens->scan(0, [T_NAMESPACE]);
} catch (\OutOfBoundsException $e) {
... | [
"public",
"function",
"getNamespace",
"(",
")",
":",
"string",
"{",
"// Check cache.",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"namespace",
")",
"{",
"$",
"tokens",
"=",
"$",
"this",
"->",
"getTokenStream",
"(",
")",
";",
"// Find namespace token",
"t... | Returns the namespace of the class in this file or an empty string if no
namespace was declared.
@return string | [
"Returns",
"the",
"namespace",
"of",
"the",
"class",
"in",
"this",
"file",
"or",
"an",
"empty",
"string",
"if",
"no",
"namespace",
"was",
"declared",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Reflection/ReflectionClass.php#L167-L193 |
27,755 | hostnet/accessor-generator-plugin-lib | src/Reflection/ReflectionClass.php | ReflectionClass.getProperties | public function getProperties(): array
{
// Check cache
if (null === $this->properties) {
$tokens = $this->getTokenStream();
// Create empty set, to denote that
// we parsed all the properties
$this->properties = [];
// Start parsing from... | php | public function getProperties(): array
{
// Check cache
if (null === $this->properties) {
$tokens = $this->getTokenStream();
// Create empty set, to denote that
// we parsed all the properties
$this->properties = [];
// Start parsing from... | [
"public",
"function",
"getProperties",
"(",
")",
":",
"array",
"{",
"// Check cache",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"properties",
")",
"{",
"$",
"tokens",
"=",
"$",
"this",
"->",
"getTokenStream",
"(",
")",
";",
"// Create empty set, to denote... | Returns all private, protected and public properties for this class.
Properties declared with var are not provided as var declarations are
deprecated.
Only declared properties are returned. Properties created at runtime
are not taken into consideration.
@throws ClassDefinitionNotFoundException
@return ReflectionPrope... | [
"Returns",
"all",
"private",
"protected",
"and",
"public",
"properties",
"for",
"this",
"class",
".",
"Properties",
"declared",
"with",
"var",
"are",
"not",
"provided",
"as",
"var",
"declarations",
"are",
"deprecated",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Reflection/ReflectionClass.php#L287-L329 |
27,756 | hostnet/accessor-generator-plugin-lib | src/Reflection/ReflectionClass.php | ReflectionClass.parseNamespace | private function parseNamespace($loc): string
{
$tokens = $this->getTokenStream();
$ns = '';
if (\in_array($this->tokens->type($loc), [T_FUNCTION, T_CONST])) {
$ns .= $this->tokens->value($loc) . ' ';
$loc = $tokens->next($loc);
}
while (\in_arra... | php | private function parseNamespace($loc): string
{
$tokens = $this->getTokenStream();
$ns = '';
if (\in_array($this->tokens->type($loc), [T_FUNCTION, T_CONST])) {
$ns .= $this->tokens->value($loc) . ' ';
$loc = $tokens->next($loc);
}
while (\in_arra... | [
"private",
"function",
"parseNamespace",
"(",
"$",
"loc",
")",
":",
"string",
"{",
"$",
"tokens",
"=",
"$",
"this",
"->",
"getTokenStream",
"(",
")",
";",
"$",
"ns",
"=",
"''",
";",
"if",
"(",
"\\",
"in_array",
"(",
"$",
"this",
"->",
"tokens",
"->... | Parse the namespace and return as string
@param int $loc location of the first namespace token (T_STRING)
and not the T_NAMESPACE, T_AS or T_USE.
@return string | [
"Parse",
"the",
"namespace",
"and",
"return",
"as",
"string"
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Reflection/ReflectionClass.php#L381-L397 |
27,757 | hostnet/accessor-generator-plugin-lib | src/Reflection/ReflectionClass.php | ReflectionClass.parseDocComment | private function parseDocComment($loc): string
{
$tokens = $this->getTokenStream();
// Look back from T_PUBLIC, T_PROTECTED, T_PRIVATE or T_CLASS
// for the T_DOC_COMMENT token
$loc = $tokens->previous($loc, [T_WHITESPACE, T_STATIC, T_FINAL]);
// Check for doc comment
... | php | private function parseDocComment($loc): string
{
$tokens = $this->getTokenStream();
// Look back from T_PUBLIC, T_PROTECTED, T_PRIVATE or T_CLASS
// for the T_DOC_COMMENT token
$loc = $tokens->previous($loc, [T_WHITESPACE, T_STATIC, T_FINAL]);
// Check for doc comment
... | [
"private",
"function",
"parseDocComment",
"(",
"$",
"loc",
")",
":",
"string",
"{",
"$",
"tokens",
"=",
"$",
"this",
"->",
"getTokenStream",
"(",
")",
";",
"// Look back from T_PUBLIC, T_PROTECTED, T_PRIVATE or T_CLASS",
"// for the T_DOC_COMMENT token",
"$",
"loc",
"... | Returns the doc comment for a property, method or class. The comment is
stripped of leading whitespaces. Returns an empty string if no doc-
comment or an empty doc comment was found.
@param int $loc location of the visibility modifier or T_CLASS
@return string the contents of the doc comment | [
"Returns",
"the",
"doc",
"comment",
"for",
"a",
"property",
"method",
"or",
"class",
".",
"The",
"comment",
"is",
"stripped",
"of",
"leading",
"whitespaces",
".",
"Returns",
"an",
"empty",
"string",
"if",
"no",
"doc",
"-",
"comment",
"or",
"an",
"empty",
... | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Reflection/ReflectionClass.php#L408-L426 |
27,758 | hostnet/accessor-generator-plugin-lib | src/Reflection/ReflectionClass.php | ReflectionClass.parsePropertyModifiers | private function parsePropertyModifiers($loc): int
{
$tokens = $this->getTokenStream();
$modifiers = 0; // initialize bit filed with all modifiers switched off
// Enable visibility bits
switch ($tokens->type($loc)) {
case T_PRIVATE:
$modifiers |= \Refl... | php | private function parsePropertyModifiers($loc): int
{
$tokens = $this->getTokenStream();
$modifiers = 0; // initialize bit filed with all modifiers switched off
// Enable visibility bits
switch ($tokens->type($loc)) {
case T_PRIVATE:
$modifiers |= \Refl... | [
"private",
"function",
"parsePropertyModifiers",
"(",
"$",
"loc",
")",
":",
"int",
"{",
"$",
"tokens",
"=",
"$",
"this",
"->",
"getTokenStream",
"(",
")",
";",
"$",
"modifiers",
"=",
"0",
";",
"// initialize bit filed with all modifiers switched off",
"// Enable v... | Parse visibility and static modifier of the property in to a bit field
combining all the modifiers as is done in by PHP Reflection for the
\ReflectionProperty.
Note that properties can not be final and thus this function does not
scan for T_FINAL.
@see \ReflectionProperty
@param int $loc location of the visibility m... | [
"Parse",
"visibility",
"and",
"static",
"modifier",
"of",
"the",
"property",
"in",
"to",
"a",
"bit",
"field",
"combining",
"all",
"the",
"modifiers",
"as",
"is",
"done",
"in",
"by",
"PHP",
"Reflection",
"for",
"the",
"\\",
"ReflectionProperty",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Reflection/ReflectionClass.php#L442-L471 |
27,759 | hostnet/accessor-generator-plugin-lib | src/Reflection/ReflectionClass.php | ReflectionClass.parseDefaultValue | private function parseDefaultValue($loc): ?string
{
$tokens = $this->getTokenStream();
$default = '';
$loc = $tokens->next($loc);
if ($tokens->value($loc) === '=') {
$loc = $tokens->next($loc);
$type = $tokens->type($loc);
if (\in_array($ty... | php | private function parseDefaultValue($loc): ?string
{
$tokens = $this->getTokenStream();
$default = '';
$loc = $tokens->next($loc);
if ($tokens->value($loc) === '=') {
$loc = $tokens->next($loc);
$type = $tokens->type($loc);
if (\in_array($ty... | [
"private",
"function",
"parseDefaultValue",
"(",
"$",
"loc",
")",
":",
"?",
"string",
"{",
"$",
"tokens",
"=",
"$",
"this",
"->",
"getTokenStream",
"(",
")",
";",
"$",
"default",
"=",
"''",
";",
"$",
"loc",
"=",
"$",
"tokens",
"->",
"next",
"(",
"$... | Parses the default value assignment for a property and returns the
default value or null if there is no default value assigned.
The returned value includes single or double quotes as used in the code.
This way we can keep those and this also enables us to parse a default
value of null.
@param int $loc location of the... | [
"Parses",
"the",
"default",
"value",
"assignment",
"for",
"a",
"property",
"and",
"returns",
"the",
"default",
"value",
"or",
"null",
"if",
"there",
"is",
"no",
"default",
"value",
"assigned",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Reflection/ReflectionClass.php#L485-L516 |
27,760 | hostnet/accessor-generator-plugin-lib | src/Reflection/ReflectionClass.php | ReflectionClass.parseArrayDefinition | private function parseArrayDefinition($loc): string
{
$tokens = $this->getTokenStream();
$found = 0;
$brace = 0;
$code = '';
do {
$type = $tokens->type($loc);
switch ($type) {
case T_ARRAY:
$loc = $tokens->scan($... | php | private function parseArrayDefinition($loc): string
{
$tokens = $this->getTokenStream();
$found = 0;
$brace = 0;
$code = '';
do {
$type = $tokens->type($loc);
switch ($type) {
case T_ARRAY:
$loc = $tokens->scan($... | [
"private",
"function",
"parseArrayDefinition",
"(",
"$",
"loc",
")",
":",
"string",
"{",
"$",
"tokens",
"=",
"$",
"this",
"->",
"getTokenStream",
"(",
")",
";",
"$",
"found",
"=",
"0",
";",
"$",
"brace",
"=",
"0",
";",
"$",
"code",
"=",
"''",
";",
... | Parse an array definition. The definition can contain arrays itself. The
whole content of the array definition is stripped from comments and
excessive whitespaces.
@param int $loc location of the token stream where the array starts.
This should point to a T_ARRAY or [ token.
@return string code representation of the ... | [
"Parse",
"an",
"array",
"definition",
".",
"The",
"definition",
"can",
"contain",
"arrays",
"itself",
".",
"The",
"whole",
"content",
"of",
"the",
"array",
"definition",
"is",
"stripped",
"from",
"comments",
"and",
"excessive",
"whitespaces",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Reflection/ReflectionClass.php#L528-L567 |
27,761 | hostnet/accessor-generator-plugin-lib | src/Reflection/ReflectionClass.php | ReflectionClass.arrayWhitespace | private function arrayWhitespace($loc): ?string
{
$tokens = $this->getTokenStream();
$type = $tokens->type($loc);
switch ($type) {
case T_DOUBLE_ARROW:
return ' => ';
case ',':
return ', ';
default:
return ... | php | private function arrayWhitespace($loc): ?string
{
$tokens = $this->getTokenStream();
$type = $tokens->type($loc);
switch ($type) {
case T_DOUBLE_ARROW:
return ' => ';
case ',':
return ', ';
default:
return ... | [
"private",
"function",
"arrayWhitespace",
"(",
"$",
"loc",
")",
":",
"?",
"string",
"{",
"$",
"tokens",
"=",
"$",
"this",
"->",
"getTokenStream",
"(",
")",
";",
"$",
"type",
"=",
"$",
"tokens",
"->",
"type",
"(",
"$",
"loc",
")",
";",
"switch",
"("... | Returns tokens found within an array definition PSR conforming
whitespace to make the code more readable.
@param int $loc location in the token stream
@return string code with PSR spacing for array notation | [
"Returns",
"tokens",
"found",
"within",
"an",
"array",
"definition",
"PSR",
"conforming",
"whitespace",
"to",
"make",
"the",
"code",
"more",
"readable",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Reflection/ReflectionClass.php#L577-L589 |
27,762 | hostnet/accessor-generator-plugin-lib | src/Reflection/ReflectionClass.php | ReflectionClass.parseHereNowDocConcat | private function parseHereNowDocConcat($loc): ?string
{
$tokens = $this->getTokenStream();
$type = substr($tokens->value($loc), 3, 1);
$loc = $tokens->next($loc);
if ($loc) {
$string = substr($tokens->value($loc), 0, -1);
if ($type === '\'') {
... | php | private function parseHereNowDocConcat($loc): ?string
{
$tokens = $this->getTokenStream();
$type = substr($tokens->value($loc), 3, 1);
$loc = $tokens->next($loc);
if ($loc) {
$string = substr($tokens->value($loc), 0, -1);
if ($type === '\'') {
... | [
"private",
"function",
"parseHereNowDocConcat",
"(",
"$",
"loc",
")",
":",
"?",
"string",
"{",
"$",
"tokens",
"=",
"$",
"this",
"->",
"getTokenStream",
"(",
")",
";",
"$",
"type",
"=",
"substr",
"(",
"$",
"tokens",
"->",
"value",
"(",
"$",
"loc",
")"... | Parse heredoc and nowdoc into a concatenated string representation to be
useful for default values and inline assignment.
@param int $loc
@return string|null | [
"Parse",
"heredoc",
"and",
"nowdoc",
"into",
"a",
"concatenated",
"string",
"representation",
"to",
"be",
"useful",
"for",
"default",
"values",
"and",
"inline",
"assignment",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Reflection/ReflectionClass.php#L599-L615 |
27,763 | hostnet/accessor-generator-plugin-lib | src/Reflection/ReflectionClass.php | ReflectionClass.getTokenStream | private function getTokenStream(): TokenStream
{
if (null === $this->tokens) {
$this->tokens = new TokenStream(file_get_contents($this->filename));
}
return $this->tokens;
} | php | private function getTokenStream(): TokenStream
{
if (null === $this->tokens) {
$this->tokens = new TokenStream(file_get_contents($this->filename));
}
return $this->tokens;
} | [
"private",
"function",
"getTokenStream",
"(",
")",
":",
"TokenStream",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"tokens",
")",
"{",
"$",
"this",
"->",
"tokens",
"=",
"new",
"TokenStream",
"(",
"file_get_contents",
"(",
"$",
"this",
"->",
"filena... | Returns the TokenStream instance for the class.
@return TokenStream | [
"Returns",
"the",
"TokenStream",
"instance",
"for",
"the",
"class",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Reflection/ReflectionClass.php#L622-L629 |
27,764 | techdivision/import-product | src/Repositories/CacheWarmer/ProductCacheWarmer.php | ProductCacheWarmer.warm | public function warm()
{
// prepare the caches for the statements
foreach ($this->repository->findAll() as $product) {
// add the product to the cache, register the SKU reference as well
$this->repository->toCache(
$product[$this->repository->getPrimaryKeyNam... | php | public function warm()
{
// prepare the caches for the statements
foreach ($this->repository->findAll() as $product) {
// add the product to the cache, register the SKU reference as well
$this->repository->toCache(
$product[$this->repository->getPrimaryKeyNam... | [
"public",
"function",
"warm",
"(",
")",
"{",
"// prepare the caches for the statements",
"foreach",
"(",
"$",
"this",
"->",
"repository",
"->",
"findAll",
"(",
")",
"as",
"$",
"product",
")",
"{",
"// add the product to the cache, register the SKU reference as well",
"$... | Warms the cache for the passed repository.
@return void | [
"Warms",
"the",
"cache",
"for",
"the",
"passed",
"repository",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Repositories/CacheWarmer/ProductCacheWarmer.php#L61-L73 |
27,765 | aimeos/ai-admin-jsonadm | admin/jsonadm/src/Admin/JsonAdm/Standard.php | Standard.deleteItems | protected function deleteItems( \Aimeos\MW\View\Iface $view, ServerRequestInterface $request, ResponseInterface $response )
{
$manager = \Aimeos\MShop::create( $this->getContext(), $this->getPath() );
if( ( $id = $view->param( 'id' ) ) == null )
{
$body = (string) $request->getBody();
if( ( $payload = js... | php | protected function deleteItems( \Aimeos\MW\View\Iface $view, ServerRequestInterface $request, ResponseInterface $response )
{
$manager = \Aimeos\MShop::create( $this->getContext(), $this->getPath() );
if( ( $id = $view->param( 'id' ) ) == null )
{
$body = (string) $request->getBody();
if( ( $payload = js... | [
"protected",
"function",
"deleteItems",
"(",
"\\",
"Aimeos",
"\\",
"MW",
"\\",
"View",
"\\",
"Iface",
"$",
"view",
",",
"ServerRequestInterface",
"$",
"request",
",",
"ResponseInterface",
"$",
"response",
")",
"{",
"$",
"manager",
"=",
"\\",
"Aimeos",
"\\",
... | Deletes one or more items
@param \Aimeos\MW\View\Iface $view View instance with "param" view helper
@param \Psr\Http\Message\ServerRequestInterface $request Request object
@param \Psr\Http\Message\ResponseInterface $response Response object
@return \Psr\Http\Message\ResponseInterface Modified response object
@throws \... | [
"Deletes",
"one",
"or",
"more",
"items"
] | 8e4dc6528afcd2199e6555b2e7ead4f75b221005 | https://github.com/aimeos/ai-admin-jsonadm/blob/8e4dc6528afcd2199e6555b2e7ead4f75b221005/admin/jsonadm/src/Admin/JsonAdm/Standard.php#L507-L530 |
27,766 | aimeos/ai-admin-jsonadm | admin/jsonadm/src/Admin/JsonAdm/Standard.php | Standard.patchItems | protected function patchItems( \Aimeos\MW\View\Iface $view, ServerRequestInterface $request, ResponseInterface $response )
{
$body = (string) $request->getBody();
if( ( $payload = json_decode( $body ) ) === null || !isset( $payload->data ) ) {
throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Invalid JSON i... | php | protected function patchItems( \Aimeos\MW\View\Iface $view, ServerRequestInterface $request, ResponseInterface $response )
{
$body = (string) $request->getBody();
if( ( $payload = json_decode( $body ) ) === null || !isset( $payload->data ) ) {
throw new \Aimeos\Admin\JsonAdm\Exception( sprintf( 'Invalid JSON i... | [
"protected",
"function",
"patchItems",
"(",
"\\",
"Aimeos",
"\\",
"MW",
"\\",
"View",
"\\",
"Iface",
"$",
"view",
",",
"ServerRequestInterface",
"$",
"request",
",",
"ResponseInterface",
"$",
"response",
")",
"{",
"$",
"body",
"=",
"(",
"string",
")",
"$",... | Saves new attributes for one or more items
@param \Aimeos\MW\View\Iface $view View that will contain the "data" and "total" properties afterwards
@param \Psr\Http\Message\ServerRequestInterface $request Request object
@param \Psr\Http\Message\ResponseInterface $response Response object
@return \Psr\Http\Message\Respon... | [
"Saves",
"new",
"attributes",
"for",
"one",
"or",
"more",
"items"
] | 8e4dc6528afcd2199e6555b2e7ead4f75b221005 | https://github.com/aimeos/ai-admin-jsonadm/blob/8e4dc6528afcd2199e6555b2e7ead4f75b221005/admin/jsonadm/src/Admin/JsonAdm/Standard.php#L585-L617 |
27,767 | contributte/thepay-api | src/Helper/Merchant.php | Merchant.buildQuery | public function buildQuery(array $args = []): string
{
$out = array_merge(
$this->payment->getArgs(), // Arguments of the payment
$args, // Optional helper arguments
['signature' => $this->payment->getSignature()] // Signature
);
$str = [];
/** @var string|int $val */
foreach ($out as $key => $val)... | php | public function buildQuery(array $args = []): string
{
$out = array_merge(
$this->payment->getArgs(), // Arguments of the payment
$args, // Optional helper arguments
['signature' => $this->payment->getSignature()] // Signature
);
$str = [];
/** @var string|int $val */
foreach ($out as $key => $val)... | [
"public",
"function",
"buildQuery",
"(",
"array",
"$",
"args",
"=",
"[",
"]",
")",
":",
"string",
"{",
"$",
"out",
"=",
"array_merge",
"(",
"$",
"this",
"->",
"payment",
"->",
"getArgs",
"(",
")",
",",
"// Arguments of the payment",
"$",
"args",
",",
"... | Build the query part of the URL from payment data and optional
helper data.
@param array $args Associative array of optional arguments that should
be appended to the URL.
@return string Query part of the URL with all parameters correctly escaped | [
"Build",
"the",
"query",
"part",
"of",
"the",
"URL",
"from",
"payment",
"data",
"and",
"optional",
"helper",
"data",
"."
] | 7e28eaf30ad1880533add93cf9e7296e61c09b8e | https://github.com/contributte/thepay-api/blob/7e28eaf30ad1880533add93cf9e7296e61c09b8e/src/Helper/Merchant.php#L47-L62 |
27,768 | contributte/thepay-api | src/Payment.php | Payment.getArgs | public function getArgs(): array
{
$input = [];
$input['merchantId'] = $this->config->merchantId;
$input['accountId'] = $this->config->accountId;
$value = $this->value;
if ($value !== null) {
$input['value'] = number_format($value, 2, '.', '');
}
if ($this->currency !== null) {
$input['currency'... | php | public function getArgs(): array
{
$input = [];
$input['merchantId'] = $this->config->merchantId;
$input['accountId'] = $this->config->accountId;
$value = $this->value;
if ($value !== null) {
$input['value'] = number_format($value, 2, '.', '');
}
if ($this->currency !== null) {
$input['currency'... | [
"public",
"function",
"getArgs",
"(",
")",
":",
"array",
"{",
"$",
"input",
"=",
"[",
"]",
";",
"$",
"input",
"[",
"'merchantId'",
"]",
"=",
"$",
"this",
"->",
"config",
"->",
"merchantId",
";",
"$",
"input",
"[",
"'accountId'",
"]",
"=",
"$",
"thi... | List arguments to put into the URL. Returns associative array of
arguments that should be contained in the ThePay gate call.
@return mixed[] | [
"List",
"arguments",
"to",
"put",
"into",
"the",
"URL",
".",
"Returns",
"associative",
"array",
"of",
"arguments",
"that",
"should",
"be",
"contained",
"in",
"the",
"ThePay",
"gate",
"call",
"."
] | 7e28eaf30ad1880533add93cf9e7296e61c09b8e | https://github.com/contributte/thepay-api/blob/7e28eaf30ad1880533add93cf9e7296e61c09b8e/src/Payment.php#L323-L384 |
27,769 | contributte/thepay-api | src/Payment.php | Payment.getSignature | public function getSignature(): string
{
$input = $this->getArgs();
$items = [];
foreach ($input as $key => $val) {
$items[] = sprintf('%s=%s', $key, $val);
}
$items[] = 'password=' . $this->getMerchantConfig()->password;
return self::hashFunction(implode('&', $items));
} | php | public function getSignature(): string
{
$input = $this->getArgs();
$items = [];
foreach ($input as $key => $val) {
$items[] = sprintf('%s=%s', $key, $val);
}
$items[] = 'password=' . $this->getMerchantConfig()->password;
return self::hashFunction(implode('&', $items));
} | [
"public",
"function",
"getSignature",
"(",
")",
":",
"string",
"{",
"$",
"input",
"=",
"$",
"this",
"->",
"getArgs",
"(",
")",
";",
"$",
"items",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"input",
"as",
"$",
"key",
"=>",
"$",
"val",
")",
"{",
"$... | Returns signature to authenticate the payment. The signature
consists of hash of all specified parameters and the merchant
password specified in the configuration. So no one can alter the
payment, because the password is not known. | [
"Returns",
"signature",
"to",
"authenticate",
"the",
"payment",
".",
"The",
"signature",
"consists",
"of",
"hash",
"of",
"all",
"specified",
"parameters",
"and",
"the",
"merchant",
"password",
"specified",
"in",
"the",
"configuration",
".",
"So",
"no",
"one",
... | 7e28eaf30ad1880533add93cf9e7296e61c09b8e | https://github.com/contributte/thepay-api/blob/7e28eaf30ad1880533add93cf9e7296e61c09b8e/src/Payment.php#L392-L404 |
27,770 | OXID-eSales/paymorrow-module | core/oxpspaymorrowresponsehandler.php | OxpsPaymorrowResponseHandler.wasAccepted | public function wasAccepted()
{
if ( $this->hasErrors() ) {
return false;
}
$aResponse = $this->getResponse();
if ( !empty( $aResponse['pm_order_status'] ) && $aResponse['pm_order_status'] === 'ACCEPTED' ) {
return true;
}
return false;
... | php | public function wasAccepted()
{
if ( $this->hasErrors() ) {
return false;
}
$aResponse = $this->getResponse();
if ( !empty( $aResponse['pm_order_status'] ) && $aResponse['pm_order_status'] === 'ACCEPTED' ) {
return true;
}
return false;
... | [
"public",
"function",
"wasAccepted",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"hasErrors",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"aResponse",
"=",
"$",
"this",
"->",
"getResponse",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
... | Check of order was accepted with no error codes.
@return bool | [
"Check",
"of",
"order",
"was",
"accepted",
"with",
"no",
"error",
"codes",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowresponsehandler.php#L170-L183 |
27,771 | OXID-eSales/paymorrow-module | core/oxpspaymorrowresponsehandler.php | OxpsPaymorrowResponseHandler.getErrorCodeFromResponseData | public function getErrorCodeFromResponseData( array $aResponseData )
{
foreach ( $aResponseData as $sKey => $iValue ) {
if ( preg_match( '/error_(\d+)_code/', $sKey ) ) {
return (int) $iValue;
}
}
return 999; // UNEXPECTED_ERROR
} | php | public function getErrorCodeFromResponseData( array $aResponseData )
{
foreach ( $aResponseData as $sKey => $iValue ) {
if ( preg_match( '/error_(\d+)_code/', $sKey ) ) {
return (int) $iValue;
}
}
return 999; // UNEXPECTED_ERROR
} | [
"public",
"function",
"getErrorCodeFromResponseData",
"(",
"array",
"$",
"aResponseData",
")",
"{",
"foreach",
"(",
"$",
"aResponseData",
"as",
"$",
"sKey",
"=>",
"$",
"iValue",
")",
"{",
"if",
"(",
"preg_match",
"(",
"'/error_(\\d+)_code/'",
",",
"$",
"sKey",... | Returns first match of client error code.
@param array $aResponseData
@return integer | [
"Returns",
"first",
"match",
"of",
"client",
"error",
"code",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowresponsehandler.php#L192-L201 |
27,772 | OXID-eSales/paymorrow-module | core/oxpspaymorrowresponsehandler.php | OxpsPaymorrowResponseHandler.getDeclinationDataFromResponse | public function getDeclinationDataFromResponse()
{
$aDeclinationData = array();
$aResponse = $this->getResponse();
$aExpectedKeys = array('paymentMethod_name', 'paymentMethod_status', 'paymentMethod_declineType');
foreach ( $aExpectedKeys as $sKey ) {
if ( arra... | php | public function getDeclinationDataFromResponse()
{
$aDeclinationData = array();
$aResponse = $this->getResponse();
$aExpectedKeys = array('paymentMethod_name', 'paymentMethod_status', 'paymentMethod_declineType');
foreach ( $aExpectedKeys as $sKey ) {
if ( arra... | [
"public",
"function",
"getDeclinationDataFromResponse",
"(",
")",
"{",
"$",
"aDeclinationData",
"=",
"array",
"(",
")",
";",
"$",
"aResponse",
"=",
"$",
"this",
"->",
"getResponse",
"(",
")",
";",
"$",
"aExpectedKeys",
"=",
"array",
"(",
"'paymentMethod_name'"... | Collects payment method data from order declination response.
@return array | [
"Collects",
"payment",
"method",
"data",
"from",
"order",
"declination",
"response",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowresponsehandler.php#L208-L221 |
27,773 | OXID-eSales/paymorrow-module | core/oxpspaymorrowresponsehandler.php | OxpsPaymorrowResponseHandler.parseGetConfigurationResponse | public function parseGetConfigurationResponse( array $aResponseData )
{
$aConfigurationData = array();
$iKey = 1;
$iMaxIterations = 10000;
while ( !empty( $aResponseData["pm_configuration_${iKey}_key"] ) and ( $iKey <= $iMaxIterations ) ) {
$aConfigurat... | php | public function parseGetConfigurationResponse( array $aResponseData )
{
$aConfigurationData = array();
$iKey = 1;
$iMaxIterations = 10000;
while ( !empty( $aResponseData["pm_configuration_${iKey}_key"] ) and ( $iKey <= $iMaxIterations ) ) {
$aConfigurat... | [
"public",
"function",
"parseGetConfigurationResponse",
"(",
"array",
"$",
"aResponseData",
")",
"{",
"$",
"aConfigurationData",
"=",
"array",
"(",
")",
";",
"$",
"iKey",
"=",
"1",
";",
"$",
"iMaxIterations",
"=",
"10000",
";",
"while",
"(",
"!",
"empty",
"... | Parse getConfiguration call response for Paymorrow settings.
@param array $aResponseData
@return array Assoc array with key as setting name for each corresponding value. | [
"Parse",
"getConfiguration",
"call",
"response",
"for",
"Paymorrow",
"settings",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowresponsehandler.php#L249-L264 |
27,774 | OXID-eSales/paymorrow-module | core/oxpspaymorrowresponsehandler.php | OxpsPaymorrowResponseHandler.handlePrepareOrderResponseOK | public function handlePrepareOrderResponseOK( $aResponseData )
{
oxRegistry::get( 'OxpsPaymorrowLogger' )->logWithType( $aResponseData, 'PM_handlePrepareOrderResponseOK' );
$this->setResponse( $aResponseData );
// Trigger user profile update using normalized response data
oxRegistry... | php | public function handlePrepareOrderResponseOK( $aResponseData )
{
oxRegistry::get( 'OxpsPaymorrowLogger' )->logWithType( $aResponseData, 'PM_handlePrepareOrderResponseOK' );
$this->setResponse( $aResponseData );
// Trigger user profile update using normalized response data
oxRegistry... | [
"public",
"function",
"handlePrepareOrderResponseOK",
"(",
"$",
"aResponseData",
")",
"{",
"oxRegistry",
"::",
"get",
"(",
"'OxpsPaymorrowLogger'",
")",
"->",
"logWithType",
"(",
"$",
"aResponseData",
",",
"'PM_handlePrepareOrderResponseOK'",
")",
";",
"$",
"this",
... | Order preparation successful response handler.
@param array $aResponseData
@return bool | [
"Order",
"preparation",
"successful",
"response",
"handler",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowresponsehandler.php#L273-L282 |
27,775 | OXID-eSales/paymorrow-module | core/oxpspaymorrowresponsehandler.php | OxpsPaymorrowResponseHandler.handleConfirmOrderResponseOK | public function handleConfirmOrderResponseOK( $responseData )
{
oxRegistry::get( 'OxpsPaymorrowLogger' )->logWithType( $responseData, 'PM_handleConfirmOrderResponseOK' );
$this->setResponse( $responseData );
return true;
} | php | public function handleConfirmOrderResponseOK( $responseData )
{
oxRegistry::get( 'OxpsPaymorrowLogger' )->logWithType( $responseData, 'PM_handleConfirmOrderResponseOK' );
$this->setResponse( $responseData );
return true;
} | [
"public",
"function",
"handleConfirmOrderResponseOK",
"(",
"$",
"responseData",
")",
"{",
"oxRegistry",
"::",
"get",
"(",
"'OxpsPaymorrowLogger'",
")",
"->",
"logWithType",
"(",
"$",
"responseData",
",",
"'PM_handleConfirmOrderResponseOK'",
")",
";",
"$",
"this",
"-... | Order confirmation successful response handler.
@param array $responseData
@return bool | [
"Order",
"confirmation",
"successful",
"response",
"handler",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowresponsehandler.php#L305-L311 |
27,776 | OXID-eSales/paymorrow-module | core/oxpspaymorrowresponsehandler.php | OxpsPaymorrowResponseHandler.handleConfirmOrderResponseError | public function handleConfirmOrderResponseError( $responseData )
{
oxRegistry::get( 'OxpsPaymorrowLogger' )->logWithType( $responseData, 'PM_handleConfirmOrderResponseError' );
$this->setResponse( $responseData );
$this->setErrorCode( $this->getErrorCodeFromResponseData( $responseData ) );
... | php | public function handleConfirmOrderResponseError( $responseData )
{
oxRegistry::get( 'OxpsPaymorrowLogger' )->logWithType( $responseData, 'PM_handleConfirmOrderResponseError' );
$this->setResponse( $responseData );
$this->setErrorCode( $this->getErrorCodeFromResponseData( $responseData ) );
... | [
"public",
"function",
"handleConfirmOrderResponseError",
"(",
"$",
"responseData",
")",
"{",
"oxRegistry",
"::",
"get",
"(",
"'OxpsPaymorrowLogger'",
")",
"->",
"logWithType",
"(",
"$",
"responseData",
",",
"'PM_handleConfirmOrderResponseError'",
")",
";",
"$",
"this"... | Order confirmation error response handler.
@param array $responseData
@return bool | [
"Order",
"confirmation",
"error",
"response",
"handler",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowresponsehandler.php#L320-L327 |
27,777 | moodev/php-weasel | lib/Weasel/JsonMarshaller/Config/ClassAnnotationDriver.php | ClassAnnotationDriver._getSubClassName | protected function _getSubClassName(\ReflectionClass $rClass)
{
$subClassReader = $this->annotationReaderFactory->getReaderForClass($rClass);
/**
* @var Annotations\JsonTypeName $subNameA
*/
$subNameA = $subClassReader->getSingleClassAnnotation($this->annNS . 'JsonTypeName'... | php | protected function _getSubClassName(\ReflectionClass $rClass)
{
$subClassReader = $this->annotationReaderFactory->getReaderForClass($rClass);
/**
* @var Annotations\JsonTypeName $subNameA
*/
$subNameA = $subClassReader->getSingleClassAnnotation($this->annNS . 'JsonTypeName'... | [
"protected",
"function",
"_getSubClassName",
"(",
"\\",
"ReflectionClass",
"$",
"rClass",
")",
"{",
"$",
"subClassReader",
"=",
"$",
"this",
"->",
"annotationReaderFactory",
"->",
"getReaderForClass",
"(",
"$",
"rClass",
")",
";",
"/**\n * @var Annotations\\Js... | Find out what name we should use to referr to one of our subtypes.
@param \ReflectionClass $rClass
@return string | [
"Find",
"out",
"what",
"name",
"we",
"should",
"use",
"to",
"referr",
"to",
"one",
"of",
"our",
"subtypes",
"."
] | fecc7cc06cae719489cb4490f414ed6530e70831 | https://github.com/moodev/php-weasel/blob/fecc7cc06cae719489cb4490f414ed6530e70831/lib/Weasel/JsonMarshaller/Config/ClassAnnotationDriver.php#L343-L356 |
27,778 | moodev/php-weasel | lib/Weasel/JsonMarshaller/Config/ClassAnnotationDriver.php | ClassAnnotationDriver.getConfig | public function getConfig()
{
$this->config = new ClassMarshaller();
$this->config->serialization = new Serialization\ClassSerialization();
$this->config->deserialization = new Deserialization\ClassDeserialization();
$reader = $this->_getAnnotationReader();
/**
* @... | php | public function getConfig()
{
$this->config = new ClassMarshaller();
$this->config->serialization = new Serialization\ClassSerialization();
$this->config->deserialization = new Deserialization\ClassDeserialization();
$reader = $this->_getAnnotationReader();
/**
* @... | [
"public",
"function",
"getConfig",
"(",
")",
"{",
"$",
"this",
"->",
"config",
"=",
"new",
"ClassMarshaller",
"(",
")",
";",
"$",
"this",
"->",
"config",
"->",
"serialization",
"=",
"new",
"Serialization",
"\\",
"ClassSerialization",
"(",
")",
";",
"$",
... | Get the config for the current class.
@return ClassMarshaller A populated ClassMarshaller config object. | [
"Get",
"the",
"config",
"for",
"the",
"current",
"class",
"."
] | fecc7cc06cae719489cb4490f414ed6530e70831 | https://github.com/moodev/php-weasel/blob/fecc7cc06cae719489cb4490f414ed6530e70831/lib/Weasel/JsonMarshaller/Config/ClassAnnotationDriver.php#L543-L605 |
27,779 | OXID-eSales/paymorrow-module | core/oxpspaymorrowrequestcontrollerproxy.php | OxpsPaymorrowRequestControllerProxy.prepareOrder | public function prepareOrder( array $aPostData, $blSettingsUpdated = false )
{
// Update user profile with values user entered to Paymorrow form
$this->_updateUserData( $aPostData );
// Reset payment method in session and basket on its change
$this->_resetPaymentMethod( $aPostData )... | php | public function prepareOrder( array $aPostData, $blSettingsUpdated = false )
{
// Update user profile with values user entered to Paymorrow form
$this->_updateUserData( $aPostData );
// Reset payment method in session and basket on its change
$this->_resetPaymentMethod( $aPostData )... | [
"public",
"function",
"prepareOrder",
"(",
"array",
"$",
"aPostData",
",",
"$",
"blSettingsUpdated",
"=",
"false",
")",
"{",
"// Update user profile with values user entered to Paymorrow form",
"$",
"this",
"->",
"_updateUserData",
"(",
"$",
"aPostData",
")",
";",
"//... | Order preparation call.
Also perform configuration update on error code 900 received and calls the request again one time.
@param array $aPostData
@param bool $blSettingsUpdated If true, then settings update is not called again.
@return string | [
"Order",
"preparation",
"call",
".",
"Also",
"perform",
"configuration",
"update",
"on",
"error",
"code",
"900",
"received",
"and",
"calls",
"the",
"request",
"again",
"one",
"time",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowrequestcontrollerproxy.php#L64-L91 |
27,780 | OXID-eSales/paymorrow-module | core/oxpspaymorrowrequestcontrollerproxy.php | OxpsPaymorrowRequestControllerProxy.validatePendingOrder | public function validatePendingOrder()
{
/** @var OxpsPaymorrowEshopDataProvider $dataProvider */
$dataProvider = oxNew( 'OxpsPaymorrowEshopDataProvider' );
$data = $dataProvider->collectEshopData();
// Combine basket data and payment session data
$session = $this->getConfig... | php | public function validatePendingOrder()
{
/** @var OxpsPaymorrowEshopDataProvider $dataProvider */
$dataProvider = oxNew( 'OxpsPaymorrowEshopDataProvider' );
$data = $dataProvider->collectEshopData();
// Combine basket data and payment session data
$session = $this->getConfig... | [
"public",
"function",
"validatePendingOrder",
"(",
")",
"{",
"/** @var OxpsPaymorrowEshopDataProvider $dataProvider */",
"$",
"dataProvider",
"=",
"oxNew",
"(",
"'OxpsPaymorrowEshopDataProvider'",
")",
";",
"$",
"data",
"=",
"$",
"dataProvider",
"->",
"collectEshopData",
... | Collect current basket data and make verification API call.
Method is independent from JS of front-end forms, so marks terms and conditions as accepted.
It should be used to re-validate already verified order, which user accepted on checkout payment step.
@return bool | [
"Collect",
"current",
"basket",
"data",
"and",
"make",
"verification",
"API",
"call",
".",
"Method",
"is",
"independent",
"from",
"JS",
"of",
"front",
"-",
"end",
"forms",
"so",
"marks",
"terms",
"and",
"conditions",
"as",
"accepted",
".",
"It",
"should",
... | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowrequestcontrollerproxy.php#L100-L120 |
27,781 | OXID-eSales/paymorrow-module | core/oxpspaymorrowrequestcontrollerproxy.php | OxpsPaymorrowRequestControllerProxy._updateUserData | public function _updateUserData( array $aPostData )
{
if ( $oUser = $this->_updateUserProfileData( $aPostData ) ) {
$this->_updateUserActiveShippingAddress( $oUser, $aPostData );
}
} | php | public function _updateUserData( array $aPostData )
{
if ( $oUser = $this->_updateUserProfileData( $aPostData ) ) {
$this->_updateUserActiveShippingAddress( $oUser, $aPostData );
}
} | [
"public",
"function",
"_updateUserData",
"(",
"array",
"$",
"aPostData",
")",
"{",
"if",
"(",
"$",
"oUser",
"=",
"$",
"this",
"->",
"_updateUserProfileData",
"(",
"$",
"aPostData",
")",
")",
"{",
"$",
"this",
"->",
"_updateUserActiveShippingAddress",
"(",
"$... | Update user profile with data posted from Paymorrow form.
@nice-to-have: Adjust unit tests to proxy class and make method protected.
@param array $aPostData | [
"Update",
"user",
"profile",
"with",
"data",
"posted",
"from",
"Paymorrow",
"form",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowrequestcontrollerproxy.php#L145-L150 |
27,782 | OXID-eSales/paymorrow-module | core/oxpspaymorrowrequestcontrollerproxy.php | OxpsPaymorrowRequestControllerProxy._resetPaymentMethod | public function _resetPaymentMethod( array $aPostData )
{
$oSession = oxRegistry::getSession();
if ( $oSession->getVariable( 'paymentid' ) and
array_key_exists( 'paymentid', $aPostData ) and
( $oSession->getVariable( 'paymentid' ) != $aPostData['paymentid'] )
) {
... | php | public function _resetPaymentMethod( array $aPostData )
{
$oSession = oxRegistry::getSession();
if ( $oSession->getVariable( 'paymentid' ) and
array_key_exists( 'paymentid', $aPostData ) and
( $oSession->getVariable( 'paymentid' ) != $aPostData['paymentid'] )
) {
... | [
"public",
"function",
"_resetPaymentMethod",
"(",
"array",
"$",
"aPostData",
")",
"{",
"$",
"oSession",
"=",
"oxRegistry",
"::",
"getSession",
"(",
")",
";",
"if",
"(",
"$",
"oSession",
"->",
"getVariable",
"(",
"'paymentid'",
")",
"and",
"array_key_exists",
... | Reset changed payment method selection in session for payment surcharge calculation to be valid.
If selected method is not the same as in session, it removes session data and adjusts basket calculation.
@param array $aPostData | [
"Reset",
"changed",
"payment",
"method",
"selection",
"in",
"session",
"for",
"payment",
"surcharge",
"calculation",
"to",
"be",
"valid",
".",
"If",
"selected",
"method",
"is",
"not",
"the",
"same",
"as",
"in",
"session",
"it",
"removes",
"session",
"data",
... | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowrequestcontrollerproxy.php#L158-L175 |
27,783 | OXID-eSales/paymorrow-module | core/oxpspaymorrowrequestcontrollerproxy.php | OxpsPaymorrowRequestControllerProxy._updateUserProfileData | protected function _updateUserProfileData( array $aPostData )
{
/** @var OxpsPaymorrowOxUser|oxUser $oUser */
$oUser = $this->getUser();
if ( empty( $oUser ) or !( $oUser instanceof oxUser ) or !$oUser->getId() ) {
return false;
}
$oUser->mapToProfileDataAndUpda... | php | protected function _updateUserProfileData( array $aPostData )
{
/** @var OxpsPaymorrowOxUser|oxUser $oUser */
$oUser = $this->getUser();
if ( empty( $oUser ) or !( $oUser instanceof oxUser ) or !$oUser->getId() ) {
return false;
}
$oUser->mapToProfileDataAndUpda... | [
"protected",
"function",
"_updateUserProfileData",
"(",
"array",
"$",
"aPostData",
")",
"{",
"/** @var OxpsPaymorrowOxUser|oxUser $oUser */",
"$",
"oUser",
"=",
"$",
"this",
"->",
"getUser",
"(",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"oUser",
")",
"or",
"!",... | Get valid, logged in user and update their profile data.
@param array $aPostData
@return bool|OxpsPaymorrowOxUser|oxUser User object if loaded, false otherwise. | [
"Get",
"valid",
"logged",
"in",
"user",
"and",
"update",
"their",
"profile",
"data",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowrequestcontrollerproxy.php#L197-L209 |
27,784 | OXID-eSales/paymorrow-module | core/oxpspaymorrowrequestcontrollerproxy.php | OxpsPaymorrowRequestControllerProxy._updateUserActiveShippingAddress | protected function _updateUserActiveShippingAddress( oxUser $oUser, array $aPostData )
{
/** @var oxAddress $oShippingAddress */
$oShippingAddress = $oUser->getSelectedAddress();
$blShowShippingAddress = (bool) oxRegistry::getSession()->getVariable( 'blshowshipaddress' );
if ( ... | php | protected function _updateUserActiveShippingAddress( oxUser $oUser, array $aPostData )
{
/** @var oxAddress $oShippingAddress */
$oShippingAddress = $oUser->getSelectedAddress();
$blShowShippingAddress = (bool) oxRegistry::getSession()->getVariable( 'blshowshipaddress' );
if ( ... | [
"protected",
"function",
"_updateUserActiveShippingAddress",
"(",
"oxUser",
"$",
"oUser",
",",
"array",
"$",
"aPostData",
")",
"{",
"/** @var oxAddress $oShippingAddress */",
"$",
"oShippingAddress",
"=",
"$",
"oUser",
"->",
"getSelectedAddress",
"(",
")",
";",
"$",
... | Get user active shipping address if it is used in the session and update it.
@param OxpsPaymorrowOxUser|oxUser $oUser
@param array $aPostData
@return bool | [
"Get",
"user",
"active",
"shipping",
"address",
"if",
"it",
"is",
"used",
"in",
"the",
"session",
"and",
"update",
"it",
"."
] | adb5d7f50c2fa5b566abd262161c483c42847b42 | https://github.com/OXID-eSales/paymorrow-module/blob/adb5d7f50c2fa5b566abd262161c483c42847b42/core/oxpspaymorrowrequestcontrollerproxy.php#L219-L231 |
27,785 | hostnet/accessor-generator-plugin-lib | src/Generator/CodeGenerator.php | CodeGenerator.isAliased | private static function isAliased($name, array $imports): bool
{
$aliases = array_keys($imports);
foreach ($aliases as $alias) {
if (strpos($name, $alias) === 0) {
return true;
}
}
return false;
} | php | private static function isAliased($name, array $imports): bool
{
$aliases = array_keys($imports);
foreach ($aliases as $alias) {
if (strpos($name, $alias) === 0) {
return true;
}
}
return false;
} | [
"private",
"static",
"function",
"isAliased",
"(",
"$",
"name",
",",
"array",
"$",
"imports",
")",
":",
"bool",
"{",
"$",
"aliases",
"=",
"array_keys",
"(",
"$",
"imports",
")",
";",
"foreach",
"(",
"$",
"aliases",
"as",
"$",
"alias",
")",
"{",
"if",... | Returns true if the given class name is in an aliased namespace, false
otherwise.
@param string $name
@param string[] $imports
@return bool | [
"Returns",
"true",
"if",
"the",
"given",
"class",
"name",
"is",
"in",
"an",
"aliased",
"namespace",
"false",
"otherwise",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Generator/CodeGenerator.php#L472-L482 |
27,786 | hostnet/accessor-generator-plugin-lib | src/Generator/CodeGenerator.php | CodeGenerator.fqcn | private static function fqcn($name, array $imports): string
{
// Already FQCN
if ($name[0] === '\\') {
return $name;
}
// Aliased
if (array_key_exists($name, $imports)) {
return '\\' . $imports[$name];
}
// Check other imports
... | php | private static function fqcn($name, array $imports): string
{
// Already FQCN
if ($name[0] === '\\') {
return $name;
}
// Aliased
if (array_key_exists($name, $imports)) {
return '\\' . $imports[$name];
}
// Check other imports
... | [
"private",
"static",
"function",
"fqcn",
"(",
"$",
"name",
",",
"array",
"$",
"imports",
")",
":",
"string",
"{",
"// Already FQCN",
"if",
"(",
"$",
"name",
"[",
"0",
"]",
"===",
"'\\\\'",
")",
"{",
"return",
"$",
"name",
";",
"}",
"// Aliased",
"if"... | Return the fully qualified class name based on the use statements in
the current file.
@param string $name
@param string[] $imports
@return string | [
"Return",
"the",
"fully",
"qualified",
"class",
"name",
"based",
"on",
"the",
"use",
"statements",
"in",
"the",
"current",
"file",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Generator/CodeGenerator.php#L508-L527 |
27,787 | hostnet/accessor-generator-plugin-lib | src/Generator/CodeGenerator.php | CodeGenerator.getUniqueImports | private function getUniqueImports(array $imports): array
{
uksort($imports, function ($a, $b) use ($imports) {
$alias_a = is_numeric($a) ? " as $a;" : '';
$alias_b = is_numeric($b) ? " as $b;" : '';
return strcmp($imports[$a] . $alias_a, $imports[$b] . $alias_b);
... | php | private function getUniqueImports(array $imports): array
{
uksort($imports, function ($a, $b) use ($imports) {
$alias_a = is_numeric($a) ? " as $a;" : '';
$alias_b = is_numeric($b) ? " as $b;" : '';
return strcmp($imports[$a] . $alias_a, $imports[$b] . $alias_b);
... | [
"private",
"function",
"getUniqueImports",
"(",
"array",
"$",
"imports",
")",
":",
"array",
"{",
"uksort",
"(",
"$",
"imports",
",",
"function",
"(",
"$",
"a",
",",
"$",
"b",
")",
"use",
"(",
"$",
"imports",
")",
"{",
"$",
"alias_a",
"=",
"is_numeric... | Make sure our use statements are sorted alphabetically and unique. The
array_unique function can not be used because it does not take values
with different array keys into account. This loop does exactly that.
This is useful when a specific class name is imported and aliased as
well.
@param string[] $imports
@return s... | [
"Make",
"sure",
"our",
"use",
"statements",
"are",
"sorted",
"alphabetically",
"and",
"unique",
".",
"The",
"array_unique",
"function",
"can",
"not",
"be",
"used",
"because",
"it",
"does",
"not",
"take",
"values",
"with",
"different",
"array",
"keys",
"into",
... | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Generator/CodeGenerator.php#L664-L693 |
27,788 | hostnet/accessor-generator-plugin-lib | src/Generator/CodeGenerator.php | CodeGenerator.validateEnumEntity | private function validateEnumEntity(string $entity_class): void
{
if (false === \in_array(EnumeratorCompatibleEntityInterface::class, class_implements($entity_class))) {
throw new \LogicException(sprintf(
'The entity "%s" must implement "%s" in order to use it with enumerator acc... | php | private function validateEnumEntity(string $entity_class): void
{
if (false === \in_array(EnumeratorCompatibleEntityInterface::class, class_implements($entity_class))) {
throw new \LogicException(sprintf(
'The entity "%s" must implement "%s" in order to use it with enumerator acc... | [
"private",
"function",
"validateEnumEntity",
"(",
"string",
"$",
"entity_class",
")",
":",
"void",
"{",
"if",
"(",
"false",
"===",
"\\",
"in_array",
"(",
"EnumeratorCompatibleEntityInterface",
"::",
"class",
",",
"class_implements",
"(",
"$",
"entity_class",
")",
... | Ensures the entity class complies to the "standard" for holding parameters.
@param string $entity_class | [
"Ensures",
"the",
"entity",
"class",
"complies",
"to",
"the",
"standard",
"for",
"holding",
"parameters",
"."
] | 0ff78bed5dddb4bec9fd64500f822a28ce987f62 | https://github.com/hostnet/accessor-generator-plugin-lib/blob/0ff78bed5dddb4bec9fd64500f822a28ce987f62/src/Generator/CodeGenerator.php#L700-L709 |
27,789 | techdivision/import-product | src/Subjects/BunchSubject.php | BunchSubject.getVisibilityIdByValue | public function getVisibilityIdByValue($visibility)
{
// query whether or not, the requested visibility is available
if (isset($this->availableVisibilities[$visibility])) {
// load the visibility ID, add the mapping and return the ID
return $this->availableVisibilities[$visi... | php | public function getVisibilityIdByValue($visibility)
{
// query whether or not, the requested visibility is available
if (isset($this->availableVisibilities[$visibility])) {
// load the visibility ID, add the mapping and return the ID
return $this->availableVisibilities[$visi... | [
"public",
"function",
"getVisibilityIdByValue",
"(",
"$",
"visibility",
")",
"{",
"// query whether or not, the requested visibility is available",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"availableVisibilities",
"[",
"$",
"visibility",
"]",
")",
")",
"{",
"// loa... | Return's the visibility key for the passed visibility string.
@param string $visibility The visibility string to return the key for
@return integer The requested visibility key
@throws \Exception Is thrown, if the requested visibility is not available | [
"Return",
"s",
"the",
"visibility",
"key",
"for",
"the",
"passed",
"visibility",
"string",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Subjects/BunchSubject.php#L238-L253 |
27,790 | techdivision/import-product | src/Subjects/BunchSubject.php | BunchSubject.preLoadEntityId | public function preLoadEntityId(array $product)
{
$this->preLoadedEntityIds[$product[MemberNames::SKU]] = $product[MemberNames::ENTITY_ID];
} | php | public function preLoadEntityId(array $product)
{
$this->preLoadedEntityIds[$product[MemberNames::SKU]] = $product[MemberNames::ENTITY_ID];
} | [
"public",
"function",
"preLoadEntityId",
"(",
"array",
"$",
"product",
")",
"{",
"$",
"this",
"->",
"preLoadedEntityIds",
"[",
"$",
"product",
"[",
"MemberNames",
"::",
"SKU",
"]",
"]",
"=",
"$",
"product",
"[",
"MemberNames",
"::",
"ENTITY_ID",
"]",
";",
... | Pre-load the entity ID for the passed product.
@param array $product The product to be pre-loaded
@return void | [
"Pre",
"-",
"load",
"the",
"entity",
"ID",
"for",
"the",
"passed",
"product",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Subjects/BunchSubject.php#L274-L277 |
27,791 | techdivision/import-product | src/Subjects/BunchSubject.php | BunchSubject.getProductCategoryIds | public function getProductCategoryIds()
{
// initialize the array with the product's category IDs
$categoryIds = array();
// query whether or not category IDs are available for the actual product entity
if (isset($this->productCategoryIds[$lastEntityId = $this->getLastEntityId()]))... | php | public function getProductCategoryIds()
{
// initialize the array with the product's category IDs
$categoryIds = array();
// query whether or not category IDs are available for the actual product entity
if (isset($this->productCategoryIds[$lastEntityId = $this->getLastEntityId()]))... | [
"public",
"function",
"getProductCategoryIds",
"(",
")",
"{",
"// initialize the array with the product's category IDs",
"$",
"categoryIds",
"=",
"array",
"(",
")",
";",
"// query whether or not category IDs are available for the actual product entity",
"if",
"(",
"isset",
"(",
... | Return's the list with category IDs the product is related with.
@return array The product's category IDs | [
"Return",
"s",
"the",
"list",
"with",
"category",
"IDs",
"the",
"product",
"is",
"related",
"with",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Subjects/BunchSubject.php#L284-L297 |
27,792 | techdivision/import-product | src/Subjects/BunchSubject.php | BunchSubject.getEntityType | public function getEntityType()
{
// query whether or not the entity type with the passed code is available
if (isset($this->entityTypes[$entityTypeCode = $this->getEntityTypeCode()])) {
return $this->entityTypes[$entityTypeCode];
}
// throw a new exception
thro... | php | public function getEntityType()
{
// query whether or not the entity type with the passed code is available
if (isset($this->entityTypes[$entityTypeCode = $this->getEntityTypeCode()])) {
return $this->entityTypes[$entityTypeCode];
}
// throw a new exception
thro... | [
"public",
"function",
"getEntityType",
"(",
")",
"{",
"// query whether or not the entity type with the passed code is available",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"entityTypes",
"[",
"$",
"entityTypeCode",
"=",
"$",
"this",
"->",
"getEntityTypeCode",
"(",
... | Return's the entity type for the configured entity type code.
@return array The requested entity type
@throws \Exception Is thrown, if the requested entity type is not available | [
"Return",
"s",
"the",
"entity",
"type",
"for",
"the",
"configured",
"entity",
"type",
"code",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Subjects/BunchSubject.php#L305-L319 |
27,793 | contributte/thepay-api | src/Helper/RadioMerchant.php | RadioMerchant.renderRadio | public function renderRadio(): string
{
$gateUrl = $this->config->gateUrl;
$queryArgs = [
'merchantId' => $this->config->merchantId,
'accountId' => $this->config->accountId,
'name' => $this->name,
'value' => $this->value,
'showIcon' => $this->showIcon,
'selected' => !empty($_REQUE... | php | public function renderRadio(): string
{
$gateUrl = $this->config->gateUrl;
$queryArgs = [
'merchantId' => $this->config->merchantId,
'accountId' => $this->config->accountId,
'name' => $this->name,
'value' => $this->value,
'showIcon' => $this->showIcon,
'selected' => !empty($_REQUE... | [
"public",
"function",
"renderRadio",
"(",
")",
":",
"string",
"{",
"$",
"gateUrl",
"=",
"$",
"this",
"->",
"config",
"->",
"gateUrl",
";",
"$",
"queryArgs",
"=",
"[",
"'merchantId'",
"=>",
"$",
"this",
"->",
"config",
"->",
"merchantId",
",",
"'accountId... | Generate HTML code for payment component.
@return string HTML code | [
"Generate",
"HTML",
"code",
"for",
"payment",
"component",
"."
] | 7e28eaf30ad1880533add93cf9e7296e61c09b8e | https://github.com/contributte/thepay-api/blob/7e28eaf30ad1880533add93cf9e7296e61c09b8e/src/Helper/RadioMerchant.php#L165-L209 |
27,794 | contributte/thepay-api | src/Helper/RadioMerchant.php | RadioMerchant.showPaymentInstructions | public function showPaymentInstructions(Payment $payment): string
{
if (empty($_REQUEST['tp_radio_value']) || empty($_REQUEST['tp_radio_is_offline'])) {
return '';
}
$this->clearCookies();
$href = "{$this->config->gateUrl}radiobuttons/style/radiobuttons.css?v=" . time();
$href = Escaper::htmlEntityEncod... | php | public function showPaymentInstructions(Payment $payment): string
{
if (empty($_REQUEST['tp_radio_value']) || empty($_REQUEST['tp_radio_is_offline'])) {
return '';
}
$this->clearCookies();
$href = "{$this->config->gateUrl}radiobuttons/style/radiobuttons.css?v=" . time();
$href = Escaper::htmlEntityEncod... | [
"public",
"function",
"showPaymentInstructions",
"(",
"Payment",
"$",
"payment",
")",
":",
"string",
"{",
"if",
"(",
"empty",
"(",
"$",
"_REQUEST",
"[",
"'tp_radio_value'",
"]",
")",
"||",
"empty",
"(",
"$",
"_REQUEST",
"[",
"'tp_radio_is_offline'",
"]",
")"... | Show instruction for offline payment if ThePay payment method is selected and this method is offline.
Show output of this method somewhere on page with order confirmation.
@return string HTML code with component | [
"Show",
"instruction",
"for",
"offline",
"payment",
"if",
"ThePay",
"payment",
"method",
"is",
"selected",
"and",
"this",
"method",
"is",
"offline",
".",
"Show",
"output",
"of",
"this",
"method",
"somewhere",
"on",
"page",
"with",
"order",
"confirmation",
"."
... | 7e28eaf30ad1880533add93cf9e7296e61c09b8e | https://github.com/contributte/thepay-api/blob/7e28eaf30ad1880533add93cf9e7296e61c09b8e/src/Helper/RadioMerchant.php#L301-L338 |
27,795 | techdivision/import-product | src/Observers/AbstractProductRelationUpdateObserver.php | AbstractProductRelationUpdateObserver.initializeProductRelation | protected function initializeProductRelation(array $attr)
{
// laod child/parent ID
$childId = $attr[MemberNames::CHILD_ID];
$parentId = $attr[MemberNames::PARENT_ID];
// query whether or not the product relation already exists
if ($this->loadProductRelation($parentId, $chi... | php | protected function initializeProductRelation(array $attr)
{
// laod child/parent ID
$childId = $attr[MemberNames::CHILD_ID];
$parentId = $attr[MemberNames::PARENT_ID];
// query whether or not the product relation already exists
if ($this->loadProductRelation($parentId, $chi... | [
"protected",
"function",
"initializeProductRelation",
"(",
"array",
"$",
"attr",
")",
"{",
"// laod child/parent ID",
"$",
"childId",
"=",
"$",
"attr",
"[",
"MemberNames",
"::",
"CHILD_ID",
"]",
";",
"$",
"parentId",
"=",
"$",
"attr",
"[",
"MemberNames",
"::",... | Initialize the product relation with the passed attributes and returns an instance.
@param array $attr The product relation attributes
@return array|null The initialized product relation, or null if the relation already exsist | [
"Initialize",
"the",
"product",
"relation",
"with",
"the",
"passed",
"attributes",
"and",
"returns",
"an",
"instance",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Observers/AbstractProductRelationUpdateObserver.php#L44-L58 |
27,796 | techdivision/import-product | src/Repositories/ProductRepository.php | ProductRepository.findOneBySku | public function findOneBySku($sku)
{
// return the cached result if available
if ($this->isCached($sku)) {
return $this->fromCache($sku);
}
// if not, try to load the product with the passed SKU
$this->productStmt->execute(array(MemberNames::SKU => $sku));
... | php | public function findOneBySku($sku)
{
// return the cached result if available
if ($this->isCached($sku)) {
return $this->fromCache($sku);
}
// if not, try to load the product with the passed SKU
$this->productStmt->execute(array(MemberNames::SKU => $sku));
... | [
"public",
"function",
"findOneBySku",
"(",
"$",
"sku",
")",
"{",
"// return the cached result if available",
"if",
"(",
"$",
"this",
"->",
"isCached",
"(",
"$",
"sku",
")",
")",
"{",
"return",
"$",
"this",
"->",
"fromCache",
"(",
"$",
"sku",
")",
";",
"}... | Return's the product with the passed SKU.
@param string $sku The SKU of the product to return
@return array|null The product | [
"Return",
"s",
"the",
"product",
"with",
"the",
"passed",
"SKU",
"."
] | a596e0c4b0495c918139935a709815c739d61e95 | https://github.com/techdivision/import-product/blob/a596e0c4b0495c918139935a709815c739d61e95/src/Repositories/ProductRepository.php#L97-L119 |
27,797 | RhubarbPHP/Rhubarb | src/Layout/LayoutModule.php | LayoutModule.getLayoutClassName | public static function getLayoutClassName()
{
if (is_callable(self::$layoutClassName)) {
$func = self::$layoutClassName;
return $func();
}
return self::$layoutClassName;
} | php | public static function getLayoutClassName()
{
if (is_callable(self::$layoutClassName)) {
$func = self::$layoutClassName;
return $func();
}
return self::$layoutClassName;
} | [
"public",
"static",
"function",
"getLayoutClassName",
"(",
")",
"{",
"if",
"(",
"is_callable",
"(",
"self",
"::",
"$",
"layoutClassName",
")",
")",
"{",
"$",
"func",
"=",
"self",
"::",
"$",
"layoutClassName",
";",
"return",
"$",
"func",
"(",
")",
";",
... | Returns the class name of the layout that should be used for the current request.
@return string | [
"Returns",
"the",
"class",
"name",
"of",
"the",
"layout",
"that",
"should",
"be",
"used",
"for",
"the",
"current",
"request",
"."
] | 327ff1f05d6a7e651d41c8e771f3551acfac18ae | https://github.com/RhubarbPHP/Rhubarb/blob/327ff1f05d6a7e651d41c8e771f3551acfac18ae/src/Layout/LayoutModule.php#L74-L82 |
27,798 | RhubarbPHP/Rhubarb | src/Sendables/SendableProvider.php | SendableProvider.selectProviderAndSend | public static function selectProviderAndSend(Sendable $sendable)
{
$provider = self::createProviderForSendable($sendable);
$provider->send($sendable);
} | php | public static function selectProviderAndSend(Sendable $sendable)
{
$provider = self::createProviderForSendable($sendable);
$provider->send($sendable);
} | [
"public",
"static",
"function",
"selectProviderAndSend",
"(",
"Sendable",
"$",
"sendable",
")",
"{",
"$",
"provider",
"=",
"self",
"::",
"createProviderForSendable",
"(",
"$",
"sendable",
")",
";",
"$",
"provider",
"->",
"send",
"(",
"$",
"sendable",
")",
";... | Selects the currently registered concrete provider for the sendable's base type of provider and
passes it the sendable for sending.
@param Sendable $sendable | [
"Selects",
"the",
"currently",
"registered",
"concrete",
"provider",
"for",
"the",
"sendable",
"s",
"base",
"type",
"of",
"provider",
"and",
"passes",
"it",
"the",
"sendable",
"for",
"sending",
"."
] | 327ff1f05d6a7e651d41c8e771f3551acfac18ae | https://github.com/RhubarbPHP/Rhubarb/blob/327ff1f05d6a7e651d41c8e771f3551acfac18ae/src/Sendables/SendableProvider.php#L41-L45 |
27,799 | RhubarbPHP/Rhubarb | src/Assets/AssetUrlHandler.php | AssetUrlHandler.getAsset | protected function getAsset()
{
$asset = AssetCatalogueProvider::getAsset($this->token);
if ($this->assetCategory != $asset->getProviderData()["category"]) {
throw new AssetExposureException($this->token);
}
return $asset;
} | php | protected function getAsset()
{
$asset = AssetCatalogueProvider::getAsset($this->token);
if ($this->assetCategory != $asset->getProviderData()["category"]) {
throw new AssetExposureException($this->token);
}
return $asset;
} | [
"protected",
"function",
"getAsset",
"(",
")",
"{",
"$",
"asset",
"=",
"AssetCatalogueProvider",
"::",
"getAsset",
"(",
"$",
"this",
"->",
"token",
")",
";",
"if",
"(",
"$",
"this",
"->",
"assetCategory",
"!=",
"$",
"asset",
"->",
"getProviderData",
"(",
... | Gets the asset for the current URL
@return Asset
@throws AssetExposureException | [
"Gets",
"the",
"asset",
"for",
"the",
"current",
"URL"
] | 327ff1f05d6a7e651d41c8e771f3551acfac18ae | https://github.com/RhubarbPHP/Rhubarb/blob/327ff1f05d6a7e651d41c8e771f3551acfac18ae/src/Assets/AssetUrlHandler.php#L174-L183 |
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.