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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
31,900 | PGB-LIV/php-ms | src/Search/MsgfPlusSearch.php | MsgfPlusSearch.executeCommand | private function executeCommand($command)
{
$stdoutPath = tempnam(sys_get_temp_dir(), 'php-msMsgfOut');
$stderrPath = tempnam(sys_get_temp_dir(), 'php-msMsGfErr');
$descriptors = array(
0 => array(
'pipe',
'r'
),
1 ... | php | private function executeCommand($command)
{
$stdoutPath = tempnam(sys_get_temp_dir(), 'php-msMsgfOut');
$stderrPath = tempnam(sys_get_temp_dir(), 'php-msMsGfErr');
$descriptors = array(
0 => array(
'pipe',
'r'
),
1 ... | [
"private",
"function",
"executeCommand",
"(",
"$",
"command",
")",
"{",
"$",
"stdoutPath",
"=",
"tempnam",
"(",
"sys_get_temp_dir",
"(",
")",
",",
"'php-msMsgfOut'",
")",
";",
"$",
"stderrPath",
"=",
"tempnam",
"(",
"sys_get_temp_dir",
"(",
")",
",",
"'php-m... | Executes the MSGF+ Command.
@param string $command
Complete command line argument to execute
@throws \InvalidArgumentException Thrown if MS-GF+ writes anything to stderr
@return string Path to MS-GF+ stdout log file | [
"Executes",
"the",
"MSGF",
"+",
"Command",
"."
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Search/MsgfPlusSearch.php#L145-L175 |
31,901 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/SimpleCheckoutExampleCLI.php | SimpleCheckoutExampleCLI._waitUntilAuthorizationProcessingIsCompleted | private function _waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId)
{
$response
= $this->callStepAndCheckForException(
'waitUntilAuthorizationProcessingIsCompleted',
array($amazonAuthorizationId)
);
printGetAuthorizationDeta... | php | private function _waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId)
{
$response
= $this->callStepAndCheckForException(
'waitUntilAuthorizationProcessingIsCompleted',
array($amazonAuthorizationId)
);
printGetAuthorizationDeta... | [
"private",
"function",
"_waitUntilAuthorizationProcessingIsCompleted",
"(",
"$",
"amazonAuthorizationId",
")",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"callStepAndCheckForException",
"(",
"'waitUntilAuthorizationProcessingIsCompleted'",
",",
"array",
"(",
"$",
"amazon... | Poll the API for the status of the Authorization Request, and continue
once the status has been updated
Throw an error if the status is not equal to Open
@param string $amazonAuthorizationId authorization transaction to query | [
"Poll",
"the",
"API",
"for",
"the",
"status",
"of",
"the",
"Authorization",
"Request",
"and",
"continue",
"once",
"the",
"status",
"has",
"been",
"updated",
"Throw",
"an",
"error",
"if",
"the",
"status",
"is",
"not",
"equal",
"to",
"Open"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/SimpleCheckoutExampleCLI.php#L164-L173 |
31,902 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/SimpleCheckoutExampleCLI.php | SimpleCheckoutExampleCLI._getPreTaxAndShippingOrderAmountFromStdIn | private function _getPreTaxAndShippingOrderAmountFromStdIn()
{
print PHP_EOL . "-------------------------------------------" . PHP_EOL;
print "Enter the pre tax amount to charge for the order" .
"as a number (to 2 decimal places): ";
do {
$orderAmount = trim(fgets... | php | private function _getPreTaxAndShippingOrderAmountFromStdIn()
{
print PHP_EOL . "-------------------------------------------" . PHP_EOL;
print "Enter the pre tax amount to charge for the order" .
"as a number (to 2 decimal places): ";
do {
$orderAmount = trim(fgets... | [
"private",
"function",
"_getPreTaxAndShippingOrderAmountFromStdIn",
"(",
")",
"{",
"print",
"PHP_EOL",
".",
"\"-------------------------------------------\"",
".",
"PHP_EOL",
";",
"print",
"\"Enter the pre tax amount to charge for the order\"",
".",
"\"as a number (to 2 decimal place... | Capture the pre tax order amount from standard input,
making sure that it is a numeric string
@return string total amount of the order before tax and shipping charges | [
"Capture",
"the",
"pre",
"tax",
"order",
"amount",
"from",
"standard",
"input",
"making",
"sure",
"that",
"it",
"is",
"a",
"numeric",
"string"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/SimpleCheckoutExampleCLI.php#L213-L223 |
31,903 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/SimpleCheckoutExampleCLI.php | SimpleCheckoutExampleCLI._getShippingTypeFromStdIn | private function _getShippingTypeFromStdIn()
{
print PHP_EOL . "Select a shipping option for the order:" . PHP_EOL;
print "\t 1 - Overnight shipping" . PHP_EOL;
print "\t 2 - 2-day shipping" . PHP_EOL;
print "\t 3 - 5-day shipping" . PHP_EOL;
print ">>";
do {
... | php | private function _getShippingTypeFromStdIn()
{
print PHP_EOL . "Select a shipping option for the order:" . PHP_EOL;
print "\t 1 - Overnight shipping" . PHP_EOL;
print "\t 2 - 2-day shipping" . PHP_EOL;
print "\t 3 - 5-day shipping" . PHP_EOL;
print ">>";
do {
... | [
"private",
"function",
"_getShippingTypeFromStdIn",
"(",
")",
"{",
"print",
"PHP_EOL",
".",
"\"Select a shipping option for the order:\"",
".",
"PHP_EOL",
";",
"print",
"\"\\t 1 - Overnight shipping\"",
".",
"PHP_EOL",
";",
"print",
"\"\\t 2 - 2-day shipping\"",
".",
"PHP_E... | Capture the shipping type for this order, which determines
the shipping charge
@return number selected shipping type index | [
"Capture",
"the",
"shipping",
"type",
"for",
"this",
"order",
"which",
"determines",
"the",
"shipping",
"charge"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/SimpleCheckoutExampleCLI.php#L231-L245 |
31,904 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/SplitShipmentsCheckoutExampleCLI.php | SplitShipmentsCheckoutExampleCLI._performAuthAndCaptureForOrderShipment | private function _performAuthAndCaptureForOrderShipment($shipmentNumber)
{
$response = $amazonAuthorizationId = $this->_performAuthorizationForShipment($shipmentNumber);
$this->_waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId);
$this->_performCaptureForShipment($shipmentNu... | php | private function _performAuthAndCaptureForOrderShipment($shipmentNumber)
{
$response = $amazonAuthorizationId = $this->_performAuthorizationForShipment($shipmentNumber);
$this->_waitUntilAuthorizationProcessingIsCompleted($amazonAuthorizationId);
$this->_performCaptureForShipment($shipmentNu... | [
"private",
"function",
"_performAuthAndCaptureForOrderShipment",
"(",
"$",
"shipmentNumber",
")",
"{",
"$",
"response",
"=",
"$",
"amazonAuthorizationId",
"=",
"$",
"this",
"->",
"_performAuthorizationForShipment",
"(",
"$",
"shipmentNumber",
")",
";",
"$",
"this",
... | Perform the authorize and capture for a single shipment in the order
@param int $shipmentNumber the shipment to perform transactions on | [
"Perform",
"the",
"authorize",
"and",
"capture",
"for",
"a",
"single",
"shipment",
"in",
"the",
"order"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/SplitShipmentsCheckoutExampleCLI.php#L180-L185 |
31,905 | chameleon-system/chameleon-shop | src/ShopCurrencyBundle/Bridge/Chameleon/Objects/CurrencyBasket.php | CurrencyBasket.SetActivePaymentMethod | public function SetActivePaymentMethod($oShopPayment)
{
$oldActivePaymentMethod = $this->GetActivePaymentMethod();
$isPaymentSet = parent::SetActivePaymentMethod($oShopPayment);
$newActivePaymentMethod = $this->GetActivePaymentMethod();
if (null === $oldActivePaymentMethod || null ==... | php | public function SetActivePaymentMethod($oShopPayment)
{
$oldActivePaymentMethod = $this->GetActivePaymentMethod();
$isPaymentSet = parent::SetActivePaymentMethod($oShopPayment);
$newActivePaymentMethod = $this->GetActivePaymentMethod();
if (null === $oldActivePaymentMethod || null ==... | [
"public",
"function",
"SetActivePaymentMethod",
"(",
"$",
"oShopPayment",
")",
"{",
"$",
"oldActivePaymentMethod",
"=",
"$",
"this",
"->",
"GetActivePaymentMethod",
"(",
")",
";",
"$",
"isPaymentSet",
"=",
"parent",
"::",
"SetActivePaymentMethod",
"(",
"$",
"oShop... | Reloads the active payment method on currency change,
so that the payment method holds the payment charges in the correct currency.
{@inheritdoc} | [
"Reloads",
"the",
"active",
"payment",
"method",
"on",
"currency",
"change",
"so",
"that",
"the",
"payment",
"method",
"holds",
"the",
"payment",
"charges",
"in",
"the",
"correct",
"currency",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopCurrencyBundle/Bridge/Chameleon/Objects/CurrencyBasket.php#L25-L53 |
31,906 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopOrderStep/TShopOrderStepList.class.php | TShopOrderStepList.GetNavigationStepList | public static function GetNavigationStepList(TdbShopOrderStep $oActiveStep)
{
$query = "SELECT *
FROM `shop_order_step`
WHERE `show_in_navigation` = '1'
ORDER BY `position` ASC
";
$oSteps = &TdbShopOrderStepList::GetList($query);
$o... | php | public static function GetNavigationStepList(TdbShopOrderStep $oActiveStep)
{
$query = "SELECT *
FROM `shop_order_step`
WHERE `show_in_navigation` = '1'
ORDER BY `position` ASC
";
$oSteps = &TdbShopOrderStepList::GetList($query);
$o... | [
"public",
"static",
"function",
"GetNavigationStepList",
"(",
"TdbShopOrderStep",
"$",
"oActiveStep",
")",
"{",
"$",
"query",
"=",
"\"SELECT *\n FROM `shop_order_step`\n WHERE `show_in_navigation` = '1'\n ORDER BY `position` ASC\n \""... | returns all navi steps marked as navi steps. the active step will be marked as "is active".
@param TdbShopOrderStep $oActiveStep
@return TdbShopOrderStepList | [
"returns",
"all",
"navi",
"steps",
"marked",
"as",
"navi",
"steps",
".",
"the",
"active",
"step",
"will",
"be",
"marked",
"as",
"is",
"active",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopOrderStep/TShopOrderStepList.class.php#L73-L114 |
31,907 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Action/CreateEntityAction.php | CreateEntityAction.run | public function run(): void
{
$this->entityCreator->createTargetFileObject($this->entityFqn)->write();
$this->abstractEntityFactoryCreator->createTargetFileObject()->writeIfNotExists();
$this->entityFactoryCreator->createTargetFileObject()->write();
$this->entityInterfaceCreator->... | php | public function run(): void
{
$this->entityCreator->createTargetFileObject($this->entityFqn)->write();
$this->abstractEntityFactoryCreator->createTargetFileObject()->writeIfNotExists();
$this->entityFactoryCreator->createTargetFileObject()->write();
$this->entityInterfaceCreator->... | [
"public",
"function",
"run",
"(",
")",
":",
"void",
"{",
"$",
"this",
"->",
"entityCreator",
"->",
"createTargetFileObject",
"(",
"$",
"this",
"->",
"entityFqn",
")",
"->",
"write",
"(",
")",
";",
"$",
"this",
"->",
"abstractEntityFactoryCreator",
"->",
"c... | Create all the Entity related code
@throws \EdmondsCommerce\DoctrineStaticMeta\Exception\DoctrineStaticMetaException | [
"Create",
"all",
"the",
"Entity",
"related",
"code"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Action/CreateEntityAction.php#L182-L215 |
31,908 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Samples/RefundResult.php | RefundResult._waitUntilRefundProcessingIsCompleted | private function _waitUntilRefundProcessingIsCompleted($amazonRefundId)
{
// Check for the presence of the ipn notification
$this->waitForNotificationToBeProcessedBeforeContinuing(
$amazonRefundId,
"RefundNotification"
);
// Notification is present, go and get... | php | private function _waitUntilRefundProcessingIsCompleted($amazonRefundId)
{
// Check for the presence of the ipn notification
$this->waitForNotificationToBeProcessedBeforeContinuing(
$amazonRefundId,
"RefundNotification"
);
// Notification is present, go and get... | [
"private",
"function",
"_waitUntilRefundProcessingIsCompleted",
"(",
"$",
"amazonRefundId",
")",
"{",
"// Check for the presence of the ipn notification",
"$",
"this",
"->",
"waitForNotificationToBeProcessedBeforeContinuing",
"(",
"$",
"amazonRefundId",
",",
"\"RefundNotification\"... | Check that we have received an IPN notification for the refund
For PHP, there is an IPN handler that will write the contents of the IPN to
a file in the format of
<amazonReferenceId>_RefundNotification.txt
This method will check for the presence of this file
and will loop/timeout until the notification has been handle... | [
"Check",
"that",
"we",
"have",
"received",
"an",
"IPN",
"notification",
"for",
"the",
"refund"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Samples/RefundResult.php#L138-L156 |
31,909 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Samples/AutomaticPaymentsSimpleCheckoutResult.php | AutomaticPaymentsSimpleCheckoutResult._getAdditionalInformationForProcessedAuthorization | private function _getAdditionalInformationForProcessedAuthorization ($amazonAuthorizationId)
{
// Notification is present, go and get the full
// information for this notification
$response = $this->callStepAndCheckForException('getAuthorizationDetails',
array(
... | php | private function _getAdditionalInformationForProcessedAuthorization ($amazonAuthorizationId)
{
// Notification is present, go and get the full
// information for this notification
$response = $this->callStepAndCheckForException('getAuthorizationDetails',
array(
... | [
"private",
"function",
"_getAdditionalInformationForProcessedAuthorization",
"(",
"$",
"amazonAuthorizationId",
")",
"{",
"// Notification is present, go and get the full",
"// information for this notification",
"$",
"response",
"=",
"$",
"this",
"->",
"callStepAndCheckForException"... | Display additional information about a completed authorization
Once an IPN has been received to notify the transition of an IPN to
one of the terminal states, the merchant may optionally call
GetAuthorizationDetails to obtain additional information about the authorization.
In countries which require VAT invoicing, th... | [
"Display",
"additional",
"information",
"about",
"a",
"completed",
"authorization"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Samples/AutomaticPaymentsSimpleCheckoutResult.php#L230-L244 |
31,910 | chameleon-system/chameleon-shop | src/ShopPaymentIPNBundle/pkgShop/objects/db/TPkgShopPaymentIPN_TShopOrder.class.php | TPkgShopPaymentIPN_TShopOrder.hasIPNStatusCode | final public function hasIPNStatusCode($sStatusCode)
{
$oStatusCode = TdbPkgShopPaymentIpnMessage::getMessageForOrder($this, $sStatusCode);
$bHasStatusCode = (null !== $oStatusCode);
return $bHasStatusCode;
} | php | final public function hasIPNStatusCode($sStatusCode)
{
$oStatusCode = TdbPkgShopPaymentIpnMessage::getMessageForOrder($this, $sStatusCode);
$bHasStatusCode = (null !== $oStatusCode);
return $bHasStatusCode;
} | [
"final",
"public",
"function",
"hasIPNStatusCode",
"(",
"$",
"sStatusCode",
")",
"{",
"$",
"oStatusCode",
"=",
"TdbPkgShopPaymentIpnMessage",
"::",
"getMessageForOrder",
"(",
"$",
"this",
",",
"$",
"sStatusCode",
")",
";",
"$",
"bHasStatusCode",
"=",
"(",
"null"... | returns true if the status code has been sent as an IPN for the order.
@param $sStatusCode
@return bool | [
"returns",
"true",
"if",
"the",
"status",
"code",
"has",
"been",
"sent",
"as",
"an",
"IPN",
"for",
"the",
"order",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopPaymentIPNBundle/pkgShop/objects/db/TPkgShopPaymentIPN_TShopOrder.class.php#L21-L27 |
31,911 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerPayOne.class.php | TShopPaymentHandlerPayOne.PayOne3dSecure_3dScheck | protected function PayOne3dSecure_3dScheck()
{
$aResponse = array();
$aResponse['success'] = false;
$oGlobal = TGlobal::instance();
$oBasket = TShopBasket::GetInstance();
// load data from POST
$aUserPaymentData = $this->GetUserPaymentData();
// Save to ses... | php | protected function PayOne3dSecure_3dScheck()
{
$aResponse = array();
$aResponse['success'] = false;
$oGlobal = TGlobal::instance();
$oBasket = TShopBasket::GetInstance();
// load data from POST
$aUserPaymentData = $this->GetUserPaymentData();
// Save to ses... | [
"protected",
"function",
"PayOne3dSecure_3dScheck",
"(",
")",
"{",
"$",
"aResponse",
"=",
"array",
"(",
")",
";",
"$",
"aResponse",
"[",
"'success'",
"]",
"=",
"false",
";",
"$",
"oGlobal",
"=",
"TGlobal",
"::",
"instance",
"(",
")",
";",
"$",
"oBasket",... | 3D-Secure - 3dScheck.
@return $response array | [
"3D",
"-",
"Secure",
"-",
"3dScheck",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerPayOne.class.php#L554-L626 |
31,912 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerPayOne.class.php | TShopPaymentHandlerPayOne.ExecuteExternalPayOneCall | protected function ExecuteExternalPayOneCall($fresponse)
{
$oShop = TShop::GetInstance();
$sRedirectURL = $oShop->GetLinkToSystemPage('PayOne3DSecureHelper');
// save 3D Secure Parameter in session to load it in the helper redirect page
$_SESSION['PayOneRedirectParams']['AcsUrl'] = ... | php | protected function ExecuteExternalPayOneCall($fresponse)
{
$oShop = TShop::GetInstance();
$sRedirectURL = $oShop->GetLinkToSystemPage('PayOne3DSecureHelper');
// save 3D Secure Parameter in session to load it in the helper redirect page
$_SESSION['PayOneRedirectParams']['AcsUrl'] = ... | [
"protected",
"function",
"ExecuteExternalPayOneCall",
"(",
"$",
"fresponse",
")",
"{",
"$",
"oShop",
"=",
"TShop",
"::",
"GetInstance",
"(",
")",
";",
"$",
"sRedirectURL",
"=",
"$",
"oShop",
"->",
"GetLinkToSystemPage",
"(",
"'PayOne3DSecureHelper'",
")",
";",
... | perform the API redirect to PayOne using Server-API.
@return array $fresponse - params to handle request/redirect | [
"perform",
"the",
"API",
"redirect",
"to",
"PayOne",
"using",
"Server",
"-",
"API",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerPayOne.class.php#L743-L755 |
31,913 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopStockMessage.class.php | TShopStockMessage.RenderShippingMessageFromTriggerForQuantity | protected function RenderShippingMessageFromTriggerForQuantity($aMessage = array())
{
$sTriggerMessage = $aMessage['oTrigger']->fieldMessage;
$sString = '<span class="'.$this->getCssClassForMessageForQuantity($aMessage).'">'.
TGlobal::Translate(
'chameleon_system_shop.sto... | php | protected function RenderShippingMessageFromTriggerForQuantity($aMessage = array())
{
$sTriggerMessage = $aMessage['oTrigger']->fieldMessage;
$sString = '<span class="'.$this->getCssClassForMessageForQuantity($aMessage).'">'.
TGlobal::Translate(
'chameleon_system_shop.sto... | [
"protected",
"function",
"RenderShippingMessageFromTriggerForQuantity",
"(",
"$",
"aMessage",
"=",
"array",
"(",
")",
")",
"{",
"$",
"sTriggerMessage",
"=",
"$",
"aMessage",
"[",
"'oTrigger'",
"]",
"->",
"fieldMessage",
";",
"$",
"sString",
"=",
"'<span class=\"'"... | renders the trigger message.
@param array $aMessage
@return string | [
"renders",
"the",
"trigger",
"message",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopStockMessage.class.php#L106-L119 |
31,914 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopStockMessage.class.php | TShopStockMessage.& | public function &GetFieldShopStockMessageTrigger()
{
$oShopStockMessageTrigger = $this->GetFromInternalCache('oActive_shop_stock_message_trigger_id');
if (is_null($oShopStockMessageTrigger)) {
$sQuery = "SELECT *
FROM `shop_stock_message_trigger`
... | php | public function &GetFieldShopStockMessageTrigger()
{
$oShopStockMessageTrigger = $this->GetFromInternalCache('oActive_shop_stock_message_trigger_id');
if (is_null($oShopStockMessageTrigger)) {
$sQuery = "SELECT *
FROM `shop_stock_message_trigger`
... | [
"public",
"function",
"&",
"GetFieldShopStockMessageTrigger",
"(",
")",
"{",
"$",
"oShopStockMessageTrigger",
"=",
"$",
"this",
"->",
"GetFromInternalCache",
"(",
"'oActive_shop_stock_message_trigger_id'",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"oShopStockMessageTrig... | The method checks the ShopStockMessageTrigger for the current ShopStockMessage
if there is a Match it will return this matching one in the other case
it will return a null object.
@return TdbShopStockMessageTrigger | [
"The",
"method",
"checks",
"the",
"ShopStockMessageTrigger",
"for",
"the",
"current",
"ShopStockMessage",
"if",
"there",
"is",
"a",
"Match",
"it",
"will",
"return",
"this",
"matching",
"one",
"in",
"the",
"other",
"case",
"it",
"will",
"return",
"a",
"null",
... | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopStockMessage.class.php#L180-L206 |
31,915 | chameleon-system/chameleon-shop | src/ShopWishlistBundle/objects/db/TShopWishlistArticle.class.php | TShopWishlistArticle.GetToWishlistLink | public function GetToWishlistLink($bIncludePortalLink = false, $bRedirectToLoginPage = true)
{
$oShopConfig = TdbShop::GetInstance();
$aParameters = array('module_fnc['.$oShopConfig->GetBasketModuleSpotName().']' => 'AddToWishlist', MTShopBasketCore::URL_ITEM_ID => $this->id, MTShopBasketCore::URL_... | php | public function GetToWishlistLink($bIncludePortalLink = false, $bRedirectToLoginPage = true)
{
$oShopConfig = TdbShop::GetInstance();
$aParameters = array('module_fnc['.$oShopConfig->GetBasketModuleSpotName().']' => 'AddToWishlist', MTShopBasketCore::URL_ITEM_ID => $this->id, MTShopBasketCore::URL_... | [
"public",
"function",
"GetToWishlistLink",
"(",
"$",
"bIncludePortalLink",
"=",
"false",
",",
"$",
"bRedirectToLoginPage",
"=",
"true",
")",
"{",
"$",
"oShopConfig",
"=",
"TdbShop",
"::",
"GetInstance",
"(",
")",
";",
"$",
"aParameters",
"=",
"array",
"(",
"... | return the link that can be used to add the article to the users wishlist.
@param bool $bIncludePortalLink
@return string | [
"return",
"the",
"link",
"that",
"can",
"be",
"used",
"to",
"add",
"the",
"article",
"to",
"the",
"users",
"wishlist",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopWishlistBundle/objects/db/TShopWishlistArticle.class.php#L23-L48 |
31,916 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/AmazonDataConverter.php | AmazonDataConverter.convertAddressLineData | protected function convertAddressLineData($localAddressData, array $address)
{
if ('AT' == $address['CountryCode'] || 'DE' == $address['CountryCode']) {
$addressLine1 = $address['AddressLine1'];
$addressLine2 = $address['AddressLine2'];
$addressLine3 = $address['AddressLi... | php | protected function convertAddressLineData($localAddressData, array $address)
{
if ('AT' == $address['CountryCode'] || 'DE' == $address['CountryCode']) {
$addressLine1 = $address['AddressLine1'];
$addressLine2 = $address['AddressLine2'];
$addressLine3 = $address['AddressLi... | [
"protected",
"function",
"convertAddressLineData",
"(",
"$",
"localAddressData",
",",
"array",
"$",
"address",
")",
"{",
"if",
"(",
"'AT'",
"==",
"$",
"address",
"[",
"'CountryCode'",
"]",
"||",
"'DE'",
"==",
"$",
"address",
"[",
"'CountryCode'",
"]",
")",
... | code from amazon to convert address lines to company postbox and street
for countries AT nad DE only.
@param array $localAddressData
@param array $address
@return array | [
"code",
"from",
"amazon",
"to",
"convert",
"address",
"lines",
"to",
"company",
"postbox",
"and",
"street",
"for",
"countries",
"AT",
"nad",
"DE",
"only",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/AmazonDataConverter.php#L123-L161 |
31,917 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/AmazonDataConverter.php | AmazonDataConverter.isCountryForAddressTypeActive | private function isCountryForAddressTypeActive(TdbDataCountry $country, $targetAddressType)
{
if (self::ORDER_ADDRESS_TYPE_BILLING === $targetAddressType) {
return true;
}
return $country->isActive();
} | php | private function isCountryForAddressTypeActive(TdbDataCountry $country, $targetAddressType)
{
if (self::ORDER_ADDRESS_TYPE_BILLING === $targetAddressType) {
return true;
}
return $country->isActive();
} | [
"private",
"function",
"isCountryForAddressTypeActive",
"(",
"TdbDataCountry",
"$",
"country",
",",
"$",
"targetAddressType",
")",
"{",
"if",
"(",
"self",
"::",
"ORDER_ADDRESS_TYPE_BILLING",
"===",
"$",
"targetAddressType",
")",
"{",
"return",
"true",
";",
"}",
"r... | Check if country is active if address is not a billing address.
@param TdbDataCountry $country
@param int $targetAddressType
@return bool | [
"Check",
"if",
"country",
"is",
"active",
"if",
"address",
"is",
"not",
"a",
"billing",
"address",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/AmazonDataConverter.php#L217-L224 |
31,918 | avto-dev/dev-tools | src/Laravel/VarDumper/VarDumperMiddleware.php | VarDumperMiddleware.handle | public function handle(Request $request, Closure $next)
{
/** @var Response $response */
$response = $next($request);
if ($this->stack->count() > 0) {
$dumped = \implode(\PHP_EOL, $this->stack->all());
$this->stack->clear();
$response->setContent($dumpe... | php | public function handle(Request $request, Closure $next)
{
/** @var Response $response */
$response = $next($request);
if ($this->stack->count() > 0) {
$dumped = \implode(\PHP_EOL, $this->stack->all());
$this->stack->clear();
$response->setContent($dumpe... | [
"public",
"function",
"handle",
"(",
"Request",
"$",
"request",
",",
"Closure",
"$",
"next",
")",
"{",
"/** @var Response $response */",
"$",
"response",
"=",
"$",
"next",
"(",
"$",
"request",
")",
";",
"if",
"(",
"$",
"this",
"->",
"stack",
"->",
"count... | Modify response after the request is handled by the application.
@param Request $request
@param Closure $next
@return mixed | [
"Modify",
"response",
"after",
"the",
"request",
"is",
"handled",
"by",
"the",
"application",
"."
] | 0a9b13f0322878cbfa55f5f73cfb0dc521457373 | https://github.com/avto-dev/dev-tools/blob/0a9b13f0322878cbfa55f5f73cfb0dc521457373/src/Laravel/VarDumper/VarDumperMiddleware.php#L39-L53 |
31,919 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopOrderStep/TShopStepLoginEndPoint.class.php | TShopStepLoginEndPoint.AllowAccessToStep | protected function AllowAccessToStep($bRedirectToPreviousPermittedStep = false)
{
$bAllowAccess = parent::AllowAccessToStep($bRedirectToPreviousPermittedStep);
if ($bAllowAccess && $bRedirectToPreviousPermittedStep) {
$oUser = TdbDataExtranetUser::GetInstance();
if ($oUser->I... | php | protected function AllowAccessToStep($bRedirectToPreviousPermittedStep = false)
{
$bAllowAccess = parent::AllowAccessToStep($bRedirectToPreviousPermittedStep);
if ($bAllowAccess && $bRedirectToPreviousPermittedStep) {
$oUser = TdbDataExtranetUser::GetInstance();
if ($oUser->I... | [
"protected",
"function",
"AllowAccessToStep",
"(",
"$",
"bRedirectToPreviousPermittedStep",
"=",
"false",
")",
"{",
"$",
"bAllowAccess",
"=",
"parent",
"::",
"AllowAccessToStep",
"(",
"$",
"bRedirectToPreviousPermittedStep",
")",
";",
"if",
"(",
"$",
"bAllowAccess",
... | we allow access only if
a) the user is not yet registered.
@param bool $bRedirectToPreviousPermittedStep
@return bool | [
"we",
"allow",
"access",
"only",
"if",
"a",
")",
"the",
"user",
"is",
"not",
"yet",
"registered",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopOrderStep/TShopStepLoginEndPoint.class.php#L28-L39 |
31,920 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Command/CliConfigCommandFactory.php | CliConfigCommandFactory.getCommands | public function getCommands(): array
{
$commands = [
$this->container->get(GenerateRelationsCommand::class),
$this->container->get(GenerateEntityCommand::class),
$this->container->get(SetRelationCommand::class),
$this->container->get(GenerateFieldCom... | php | public function getCommands(): array
{
$commands = [
$this->container->get(GenerateRelationsCommand::class),
$this->container->get(GenerateEntityCommand::class),
$this->container->get(SetRelationCommand::class),
$this->container->get(GenerateFieldCom... | [
"public",
"function",
"getCommands",
"(",
")",
":",
"array",
"{",
"$",
"commands",
"=",
"[",
"$",
"this",
"->",
"container",
"->",
"get",
"(",
"GenerateRelationsCommand",
"::",
"class",
")",
",",
"$",
"this",
"->",
"container",
"->",
"get",
"(",
"Generat... | For use in your project's cli-config.php file
@see /cli-config.php
@return array | [
"For",
"use",
"in",
"your",
"project",
"s",
"cli",
"-",
"config",
".",
"php",
"file"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Command/CliConfigCommandFactory.php#L58-L91 |
31,921 | chameleon-system/chameleon-shop | src/ShopPaymentIPNBundle/objects/db/TPkgShopPaymentIpnMessage.class.php | TPkgShopPaymentIpnMessage.getMessageForOrder | public static function getMessageForOrder(TdbShopOrder $oOrder, $sStatusCode)
{
$oStatus = null;
$oPaymentHandler = $oOrder->GetPaymentHandler();
$query = "SELECT `pkg_shop_payment_ipn_message`.*
FROM `pkg_shop_payment_ipn_message`
INNER JOIN `pkg_shop_payme... | php | public static function getMessageForOrder(TdbShopOrder $oOrder, $sStatusCode)
{
$oStatus = null;
$oPaymentHandler = $oOrder->GetPaymentHandler();
$query = "SELECT `pkg_shop_payment_ipn_message`.*
FROM `pkg_shop_payment_ipn_message`
INNER JOIN `pkg_shop_payme... | [
"public",
"static",
"function",
"getMessageForOrder",
"(",
"TdbShopOrder",
"$",
"oOrder",
",",
"$",
"sStatusCode",
")",
"{",
"$",
"oStatus",
"=",
"null",
";",
"$",
"oPaymentHandler",
"=",
"$",
"oOrder",
"->",
"GetPaymentHandler",
"(",
")",
";",
"$",
"query",... | returns the status object with a specific code for an order.
@param TdbShopOrder $oOrder
@param string $sStatusCode
@return TdbPkgShopPaymentIpnMessage|null | [
"returns",
"the",
"status",
"object",
"with",
"a",
"specific",
"code",
"for",
"an",
"order",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopPaymentIPNBundle/objects/db/TPkgShopPaymentIpnMessage.class.php#L72-L94 |
31,922 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/AmazonPaymentGroupConfig.php | AmazonPaymentGroupConfig.getPayWithAmazonButton | public function getPayWithAmazonButton()
{
$buttonURL = $this->getValue('payWithAmazonButtonURL', null);
if (null !== $buttonURL) {
$buttonURL .= '?sellerId='.urlencode($this->getMerchantId());
}
return $buttonURL;
} | php | public function getPayWithAmazonButton()
{
$buttonURL = $this->getValue('payWithAmazonButtonURL', null);
if (null !== $buttonURL) {
$buttonURL .= '?sellerId='.urlencode($this->getMerchantId());
}
return $buttonURL;
} | [
"public",
"function",
"getPayWithAmazonButton",
"(",
")",
"{",
"$",
"buttonURL",
"=",
"$",
"this",
"->",
"getValue",
"(",
"'payWithAmazonButtonURL'",
",",
"null",
")",
";",
"if",
"(",
"null",
"!==",
"$",
"buttonURL",
")",
"{",
"$",
"buttonURL",
".=",
"'?se... | return buy button url inc. merchant id parameter.
@return string | [
"return",
"buy",
"button",
"url",
"inc",
".",
"merchant",
"id",
"parameter",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/AmazonPaymentGroupConfig.php#L131-L139 |
31,923 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/AmazonPaymentGroupConfig.php | AmazonPaymentGroupConfig.getSellerAuthorizationNote | public function getSellerAuthorizationNote(\TdbShopOrder $order, $amount, $captureNow, array $itemList = array())
{
$text = $this->getValue('sellerAuthorizationNote');
$data = $this->getTemplateDataFromOrder($order);
$data['captureNow'] = $captureNow;
$data['transaction__totalValue']... | php | public function getSellerAuthorizationNote(\TdbShopOrder $order, $amount, $captureNow, array $itemList = array())
{
$text = $this->getValue('sellerAuthorizationNote');
$data = $this->getTemplateDataFromOrder($order);
$data['captureNow'] = $captureNow;
$data['transaction__totalValue']... | [
"public",
"function",
"getSellerAuthorizationNote",
"(",
"\\",
"TdbShopOrder",
"$",
"order",
",",
"$",
"amount",
",",
"$",
"captureNow",
",",
"array",
"$",
"itemList",
"=",
"array",
"(",
")",
")",
"{",
"$",
"text",
"=",
"$",
"this",
"->",
"getValue",
"("... | returns a text displayed on the auth email sent by amazon to the buyer.
@param \TdbShopOrder $order
@param float $amount
@param bool $captureNow
@param array $itemList
@return string | [
"returns",
"a",
"text",
"displayed",
"on",
"the",
"auth",
"email",
"sent",
"by",
"amazon",
"to",
"the",
"buyer",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/AmazonPaymentGroupConfig.php#L204-L213 |
31,924 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/AmazonPaymentGroupConfig.php | AmazonPaymentGroupConfig.getTemplateDataFromOrder | protected function getTemplateDataFromOrder(\TdbShopOrder $order)
{
$data = $order->GetSQLWithTablePrefix($order->table);
$shop = $order->GetFieldShop();
$shopData = $shop->GetSQLWithTablePrefix($shop->table);
$data = array_merge($data, $shopData);
return $data;
} | php | protected function getTemplateDataFromOrder(\TdbShopOrder $order)
{
$data = $order->GetSQLWithTablePrefix($order->table);
$shop = $order->GetFieldShop();
$shopData = $shop->GetSQLWithTablePrefix($shop->table);
$data = array_merge($data, $shopData);
return $data;
} | [
"protected",
"function",
"getTemplateDataFromOrder",
"(",
"\\",
"TdbShopOrder",
"$",
"order",
")",
"{",
"$",
"data",
"=",
"$",
"order",
"->",
"GetSQLWithTablePrefix",
"(",
"$",
"order",
"->",
"table",
")",
";",
"$",
"shop",
"=",
"$",
"order",
"->",
"GetFie... | extract data from oder to be used by text generated via template.
@param \TdbShopOrder $order
@return array | [
"extract",
"data",
"from",
"oder",
"to",
"be",
"used",
"by",
"text",
"generated",
"via",
"template",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/AmazonPaymentGroupConfig.php#L254-L262 |
31,925 | symbiote/silverstripe-cdncontent | code/controllers/CDNSecureFileController.php | CDNSecureFileController.handleRequest | public function handleRequest(SS_HTTPRequest $request, DataModel $model) {
$response = new SS_HTTPResponse();
$filename = $request->getURL();
if (strpos($filename, 'cdnassets') === 0) {
$filename = 'assets/' . substr($filename, strlen('cdnassets/'));
}
... | php | public function handleRequest(SS_HTTPRequest $request, DataModel $model) {
$response = new SS_HTTPResponse();
$filename = $request->getURL();
if (strpos($filename, 'cdnassets') === 0) {
$filename = 'assets/' . substr($filename, strlen('cdnassets/'));
}
... | [
"public",
"function",
"handleRequest",
"(",
"SS_HTTPRequest",
"$",
"request",
",",
"DataModel",
"$",
"model",
")",
"{",
"$",
"response",
"=",
"new",
"SS_HTTPResponse",
"(",
")",
";",
"$",
"filename",
"=",
"$",
"request",
"->",
"getURL",
"(",
")",
";",
"i... | Process all incoming requests passed to this controller, checking
that the file exists and passing the file through if possible. | [
"Process",
"all",
"incoming",
"requests",
"passed",
"to",
"this",
"controller",
"checking",
"that",
"the",
"file",
"exists",
"and",
"passing",
"the",
"file",
"through",
"if",
"possible",
"."
] | a5f82e802e9addaf98d506cf305a621b873a5c9b | https://github.com/symbiote/silverstripe-cdncontent/blob/a5f82e802e9addaf98d506cf305a621b873a5c9b/code/controllers/CDNSecureFileController.php#L17-L73 |
31,926 | symbiote/silverstripe-cdncontent | code/controllers/CDNSecureFileController.php | CDNSecureFileController.sendFile | public function sendFile($file) {
$reader = $file->reader();
if (!$reader || !$reader->isReadable()) {
return;
}
if(class_exists('SapphireTest', false) && SapphireTest::is_running_test()) {
return $reader->read();
}
$type = HTTP::get_mime_type($file->Filename... | php | public function sendFile($file) {
$reader = $file->reader();
if (!$reader || !$reader->isReadable()) {
return;
}
if(class_exists('SapphireTest', false) && SapphireTest::is_running_test()) {
return $reader->read();
}
$type = HTTP::get_mime_type($file->Filename... | [
"public",
"function",
"sendFile",
"(",
"$",
"file",
")",
"{",
"$",
"reader",
"=",
"$",
"file",
"->",
"reader",
"(",
")",
";",
"if",
"(",
"!",
"$",
"reader",
"||",
"!",
"$",
"reader",
"->",
"isReadable",
"(",
")",
")",
"{",
"return",
";",
"}",
"... | Output file to the browser.
For performance reasons, we avoid SS_HTTPResponse and just output the contents instead. | [
"Output",
"file",
"to",
"the",
"browser",
".",
"For",
"performance",
"reasons",
"we",
"avoid",
"SS_HTTPResponse",
"and",
"just",
"output",
"the",
"contents",
"instead",
"."
] | a5f82e802e9addaf98d506cf305a621b873a5c9b | https://github.com/symbiote/silverstripe-cdncontent/blob/a5f82e802e9addaf98d506cf305a621b873a5c9b/code/controllers/CDNSecureFileController.php#L79-L116 |
31,927 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/pkgShop/db/AmazonShopOrder.php | AmazonShopOrder.getAmazonOrderReferenceId | public function getAmazonOrderReferenceId()
{
$paymentHandler = $this->GetPaymentHandler();
if (false === ($paymentHandler instanceof AmazonPaymentHandler)) {
throw new \InvalidArgumentException('order was not paid with amazon payment');
}
/** @var $paymentHandler Amazon... | php | public function getAmazonOrderReferenceId()
{
$paymentHandler = $this->GetPaymentHandler();
if (false === ($paymentHandler instanceof AmazonPaymentHandler)) {
throw new \InvalidArgumentException('order was not paid with amazon payment');
}
/** @var $paymentHandler Amazon... | [
"public",
"function",
"getAmazonOrderReferenceId",
"(",
")",
"{",
"$",
"paymentHandler",
"=",
"$",
"this",
"->",
"GetPaymentHandler",
"(",
")",
";",
"if",
"(",
"false",
"===",
"(",
"$",
"paymentHandler",
"instanceof",
"AmazonPaymentHandler",
")",
")",
"{",
"th... | returns amazon order reference id if the order was paid with amazon. throws an InvalidArgumentException if the
order was not paid with amazon.
@throws \InvalidArgumentException
@return string | [
"returns",
"amazon",
"order",
"reference",
"id",
"if",
"the",
"order",
"was",
"paid",
"with",
"amazon",
".",
"throws",
"an",
"InvalidArgumentException",
"if",
"the",
"order",
"was",
"not",
"paid",
"with",
"amazon",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/pkgShop/db/AmazonShopOrder.php#L27-L37 |
31,928 | chameleon-system/chameleon-shop | src/ShopBundle/objects/WebModules/MTShopOrderWizardCore/MTShopOrderWizardCoreEndPoint.class.php | MTShopOrderWizardCoreEndPoint.GetCallingURL | public static function GetCallingURL()
{
$sURL = '/';
if (array_key_exists(self::SESSION_PARAM_NAME, $_SESSION)) {
$sURL = $_SESSION[self::SESSION_PARAM_NAME];
} else {
$sURL = self::getPageService()->getLinkToPortalHomePageAbsolute();
}
return $sURL;... | php | public static function GetCallingURL()
{
$sURL = '/';
if (array_key_exists(self::SESSION_PARAM_NAME, $_SESSION)) {
$sURL = $_SESSION[self::SESSION_PARAM_NAME];
} else {
$sURL = self::getPageService()->getLinkToPortalHomePageAbsolute();
}
return $sURL;... | [
"public",
"static",
"function",
"GetCallingURL",
"(",
")",
"{",
"$",
"sURL",
"=",
"'/'",
";",
"if",
"(",
"array_key_exists",
"(",
"self",
"::",
"SESSION_PARAM_NAME",
",",
"$",
"_SESSION",
")",
")",
"{",
"$",
"sURL",
"=",
"$",
"_SESSION",
"[",
"self",
"... | return the url to the page that requested the order step.
@return string | [
"return",
"the",
"url",
"to",
"the",
"page",
"that",
"requested",
"the",
"order",
"step",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopOrderWizardCore/MTShopOrderWizardCoreEndPoint.class.php#L130-L140 |
31,929 | chameleon-system/chameleon-shop | src/ShopBundle/objects/WebModules/MTShopOrderWizardCore/MTShopOrderWizardCoreEndPoint.class.php | MTShopOrderWizardCoreEndPoint.GetStepAsAjax | protected function GetStepAsAjax($sStepName = null)
{
$sHTML = '';
if (is_null($sStepName)) {
$sStepName = $this->global->GetUserData('sStepName');
}
$oStep = TdbShopOrderStep::GetStep($sStepName);
if ($oStep) {
$sModuleSpotName = $this->sModuleSpotNam... | php | protected function GetStepAsAjax($sStepName = null)
{
$sHTML = '';
if (is_null($sStepName)) {
$sStepName = $this->global->GetUserData('sStepName');
}
$oStep = TdbShopOrderStep::GetStep($sStepName);
if ($oStep) {
$sModuleSpotName = $this->sModuleSpotNam... | [
"protected",
"function",
"GetStepAsAjax",
"(",
"$",
"sStepName",
"=",
"null",
")",
"{",
"$",
"sHTML",
"=",
"''",
";",
"if",
"(",
"is_null",
"(",
"$",
"sStepName",
")",
")",
"{",
"$",
"sStepName",
"=",
"$",
"this",
"->",
"global",
"->",
"GetUserData",
... | return the step passed as ajax.
@param string $sStepName
@return string | [
"return",
"the",
"step",
"passed",
"as",
"ajax",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopOrderWizardCore/MTShopOrderWizardCoreEndPoint.class.php#L254-L267 |
31,930 | chameleon-system/chameleon-shop | src/ShopBundle/objects/WebModules/MTShopOrderWizardCore/MTShopOrderWizardCoreEndPoint.class.php | MTShopOrderWizardCoreEndPoint.JumpSelectPaymentMethod | protected function JumpSelectPaymentMethod($sPaymentMethodId = null, $sPaymentMethodNameInternal = null)
{
$oPaymentMethod = null;
if (is_null($sPaymentMethodId)) {
$sPaymentMethodId = $this->global->GetUserData('sPaymentMethodId');
}
if (empty($sPaymentMethodId)) {
... | php | protected function JumpSelectPaymentMethod($sPaymentMethodId = null, $sPaymentMethodNameInternal = null)
{
$oPaymentMethod = null;
if (is_null($sPaymentMethodId)) {
$sPaymentMethodId = $this->global->GetUserData('sPaymentMethodId');
}
if (empty($sPaymentMethodId)) {
... | [
"protected",
"function",
"JumpSelectPaymentMethod",
"(",
"$",
"sPaymentMethodId",
"=",
"null",
",",
"$",
"sPaymentMethodNameInternal",
"=",
"null",
")",
"{",
"$",
"oPaymentMethod",
"=",
"null",
";",
"if",
"(",
"is_null",
"(",
"$",
"sPaymentMethodId",
")",
")",
... | executes the post select payment hook for the given payment method. you can pass either the id
or the internal name of the payment method.
@param string $sPaymentMethodId
@param string $sPaymentMethodNameInternal | [
"executes",
"the",
"post",
"select",
"payment",
"hook",
"for",
"the",
"given",
"payment",
"method",
".",
"you",
"can",
"pass",
"either",
"the",
"id",
"or",
"the",
"internal",
"name",
"of",
"the",
"payment",
"method",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopOrderWizardCore/MTShopOrderWizardCoreEndPoint.class.php#L297-L342 |
31,931 | CVO-Technologies/cakephp-github | src/Webservice/GitHubWebservice.php | GitHubWebservice._parseLinks | protected function _parseLinks($links)
{
$links = array_map(function ($value) {
$matches = [];
preg_match('/\<(?P<link>.*)\>\; rel\=\"(?P<rel>.*)\"/', $value, $matches);
return $matches;
}, explode(', ', $links));
return Hash::combine($links, '{n}.rel', ... | php | protected function _parseLinks($links)
{
$links = array_map(function ($value) {
$matches = [];
preg_match('/\<(?P<link>.*)\>\; rel\=\"(?P<rel>.*)\"/', $value, $matches);
return $matches;
}, explode(', ', $links));
return Hash::combine($links, '{n}.rel', ... | [
"protected",
"function",
"_parseLinks",
"(",
"$",
"links",
")",
"{",
"$",
"links",
"=",
"array_map",
"(",
"function",
"(",
"$",
"value",
")",
"{",
"$",
"matches",
"=",
"[",
"]",
";",
"preg_match",
"(",
"'/\\<(?P<link>.*)\\>\\; rel\\=\\\"(?P<rel>.*)\\\"/'",
","... | Parse Link headers from response.
@param array|null $links List of Link headers
@return array | [
"Parse",
"Link",
"headers",
"from",
"response",
"."
] | 43647e53fd87a3ab93fe2f24ce3686b594d36241 | https://github.com/CVO-Technologies/cakephp-github/blob/43647e53fd87a3ab93fe2f24ce3686b594d36241/src/Webservice/GitHubWebservice.php#L147-L157 |
31,932 | edmondscommerce/doctrine-static-meta | src/Entity/Factory/EntityDependencyInjector.php | EntityDependencyInjector.injectEntityDependencies | public function injectEntityDependencies(EntityInterface $entity): void
{
$this->buildEntityInjectMethodsForEntity($entity);
$entityFqn = $this->leadingSlash($entity::getDoctrineStaticMeta()->getReflectionClass()->getName());
$this->injectStatic($entity, $this->entityInjectMethods[$entityFqn... | php | public function injectEntityDependencies(EntityInterface $entity): void
{
$this->buildEntityInjectMethodsForEntity($entity);
$entityFqn = $this->leadingSlash($entity::getDoctrineStaticMeta()->getReflectionClass()->getName());
$this->injectStatic($entity, $this->entityInjectMethods[$entityFqn... | [
"public",
"function",
"injectEntityDependencies",
"(",
"EntityInterface",
"$",
"entity",
")",
":",
"void",
"{",
"$",
"this",
"->",
"buildEntityInjectMethodsForEntity",
"(",
"$",
"entity",
")",
";",
"$",
"entityFqn",
"=",
"$",
"this",
"->",
"leadingSlash",
"(",
... | This method loops over the inject methods for an Entity and then injects the relevant dependencies
We match the method argument type with the dependency to be injected.
@param EntityInterface $entity | [
"This",
"method",
"loops",
"over",
"the",
"inject",
"methods",
"for",
"an",
"Entity",
"and",
"then",
"injects",
"the",
"relevant",
"dependencies"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Factory/EntityDependencyInjector.php#L41-L47 |
31,933 | edmondscommerce/doctrine-static-meta | src/Entity/Factory/EntityDependencyInjector.php | EntityDependencyInjector.buildEntityInjectMethodsForEntity | private function buildEntityInjectMethodsForEntity(EntityInterface $entity): void
{
$reflection = $entity::getDoctrineStaticMeta()->getReflectionClass();
$entityFqn = $this->leadingSlash($reflection->getName());
if (array_key_exists($entityFqn, $this->entityInjectMethods)) {
ret... | php | private function buildEntityInjectMethodsForEntity(EntityInterface $entity): void
{
$reflection = $entity::getDoctrineStaticMeta()->getReflectionClass();
$entityFqn = $this->leadingSlash($reflection->getName());
if (array_key_exists($entityFqn, $this->entityInjectMethods)) {
ret... | [
"private",
"function",
"buildEntityInjectMethodsForEntity",
"(",
"EntityInterface",
"$",
"entity",
")",
":",
"void",
"{",
"$",
"reflection",
"=",
"$",
"entity",
"::",
"getDoctrineStaticMeta",
"(",
")",
"->",
"getReflectionClass",
"(",
")",
";",
"$",
"entityFqn",
... | Build the array of entity methods to dependencies ready to be used for injection
@param EntityInterface $entity
@throws \ReflectionException | [
"Build",
"the",
"array",
"of",
"entity",
"methods",
"to",
"dependencies",
"ready",
"to",
"be",
"used",
"for",
"injection"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Factory/EntityDependencyInjector.php#L56-L78 |
31,934 | edmondscommerce/doctrine-static-meta | src/EntityManager/RetryConnection/PingingAndReconnectingConnection.php | PingingAndReconnectingConnection.ping | public function ping(): bool
{
parent::connect();
if ($this->_conn instanceof Driver\PingableConnection) {
return $this->_conn->ping();
}
try {
parent::query($this->getDatabasePlatform()->getDummySelectSQL());
return true;
} catch (DBALE... | php | public function ping(): bool
{
parent::connect();
if ($this->_conn instanceof Driver\PingableConnection) {
return $this->_conn->ping();
}
try {
parent::query($this->getDatabasePlatform()->getDummySelectSQL());
return true;
} catch (DBALE... | [
"public",
"function",
"ping",
"(",
")",
":",
"bool",
"{",
"parent",
"::",
"connect",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"_conn",
"instanceof",
"Driver",
"\\",
"PingableConnection",
")",
"{",
"return",
"$",
"this",
"->",
"_conn",
"->",
"ping",... | Overriding the ping method so we explicitly call the raw unwrapped methods as required, otherwise we go into
infinite loop
@return bool | [
"Overriding",
"the",
"ping",
"method",
"so",
"we",
"explicitly",
"call",
"the",
"raw",
"unwrapped",
"methods",
"as",
"required",
"otherwise",
"we",
"go",
"into",
"infinite",
"loop"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/EntityManager/RetryConnection/PingingAndReconnectingConnection.php#L87-L102 |
31,935 | edmondscommerce/doctrine-static-meta | src/EntityManager/RetryConnection/PingingAndReconnectingConnection.php | PingingAndReconnectingConnection.resetTransactionNestingLevel | private function resetTransactionNestingLevel(): void
{
if (!$this->selfReflectionNestingLevelProperty instanceof \ReflectionProperty) {
$reflection = new \ts\Reflection\ReflectionClass(Connection::class);
$this->selfReflectionNestingLevelProperty = $ref... | php | private function resetTransactionNestingLevel(): void
{
if (!$this->selfReflectionNestingLevelProperty instanceof \ReflectionProperty) {
$reflection = new \ts\Reflection\ReflectionClass(Connection::class);
$this->selfReflectionNestingLevelProperty = $ref... | [
"private",
"function",
"resetTransactionNestingLevel",
"(",
")",
":",
"void",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"selfReflectionNestingLevelProperty",
"instanceof",
"\\",
"ReflectionProperty",
")",
"{",
"$",
"reflection",
"=",
"new",
"\\",
"ts",
"\\",
"Refl... | This is required because beginTransaction increment _transactionNestingLevel
before the real query is executed, and results incremented also on gone away error.
This should be safe for a new established connection. | [
"This",
"is",
"required",
"because",
"beginTransaction",
"increment",
"_transactionNestingLevel",
"before",
"the",
"real",
"query",
"is",
"executed",
"and",
"results",
"incremented",
"also",
"on",
"gone",
"away",
"error",
".",
"This",
"should",
"be",
"safe",
"for"... | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/EntityManager/RetryConnection/PingingAndReconnectingConnection.php#L110-L119 |
31,936 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopShippingTypeList.class.php | TShopShippingTypeList.& | public static function &GetAvailableTypes($iGroupId)
{
$shippingTypeDataAccess = self::getShippingTypeDataAccess();
$shopService = self::getShopService();
$oUser = self::getExtranetUserProvider()->getActiveUser();
$oShippingAddress = $oUser->GetShippingAddress();
$sActiveShi... | php | public static function &GetAvailableTypes($iGroupId)
{
$shippingTypeDataAccess = self::getShippingTypeDataAccess();
$shopService = self::getShopService();
$oUser = self::getExtranetUserProvider()->getActiveUser();
$oShippingAddress = $oUser->GetShippingAddress();
$sActiveShi... | [
"public",
"static",
"function",
"&",
"GetAvailableTypes",
"(",
"$",
"iGroupId",
")",
"{",
"$",
"shippingTypeDataAccess",
"=",
"self",
"::",
"getShippingTypeDataAccess",
"(",
")",
";",
"$",
"shopService",
"=",
"self",
"::",
"getShopService",
"(",
")",
";",
"$",... | return list of shipping types that match the given group, the current basket,
and the current user.
@param int $iGroupId
@return TdbShopShippingTypeList | [
"return",
"list",
"of",
"shipping",
"types",
"that",
"match",
"the",
"given",
"group",
"the",
"current",
"basket",
"and",
"the",
"current",
"user",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopShippingTypeList.class.php#L53-L91 |
31,937 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopShippingTypeList.class.php | TShopShippingTypeList.& | public static function &GetPublicShippingTypes($iGroupId)
{
$query = "SELECT `shop_shipping_type`.*
FROM `shop_shipping_type`
INNER JOIN `shop_shipping_group_shop_shipping_type_mlt` ON `shop_shipping_type`.`id` = `shop_shipping_group_shop_shipping_type_mlt`.`target_id`
... | php | public static function &GetPublicShippingTypes($iGroupId)
{
$query = "SELECT `shop_shipping_type`.*
FROM `shop_shipping_type`
INNER JOIN `shop_shipping_group_shop_shipping_type_mlt` ON `shop_shipping_type`.`id` = `shop_shipping_group_shop_shipping_type_mlt`.`target_id`
... | [
"public",
"static",
"function",
"&",
"GetPublicShippingTypes",
"(",
"$",
"iGroupId",
")",
"{",
"$",
"query",
"=",
"\"SELECT `shop_shipping_type`.*\n FROM `shop_shipping_type`\n INNER JOIN `shop_shipping_group_shop_shipping_type_mlt` ON `shop_shipping_type`.`id` ... | return all public shipping types for a given shipping group.
@param int $iGroupId
@return TdbShopShippingTypeList | [
"return",
"all",
"public",
"shipping",
"types",
"for",
"a",
"given",
"shipping",
"group",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopShippingTypeList.class.php#L100-L112 |
31,938 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopShippingTypeList.class.php | TShopShippingTypeList.RemoveRestrictedItems | public function RemoveRestrictedItems()
{
// since this is a tcmsrecord list, we need to collect all valid ids, and the reload the list with them
$aValidIds = array();
$this->GoToStart();
while ($oItem = &$this->Next()) {
if ($oItem->IsPublic()) {
$aValidI... | php | public function RemoveRestrictedItems()
{
// since this is a tcmsrecord list, we need to collect all valid ids, and the reload the list with them
$aValidIds = array();
$this->GoToStart();
while ($oItem = &$this->Next()) {
if ($oItem->IsPublic()) {
$aValidI... | [
"public",
"function",
"RemoveRestrictedItems",
"(",
")",
"{",
"// since this is a tcmsrecord list, we need to collect all valid ids, and the reload the list with them",
"$",
"aValidIds",
"=",
"array",
"(",
")",
";",
"$",
"this",
"->",
"GoToStart",
"(",
")",
";",
"while",
... | remove list items that are restricted to some user or user group. | [
"remove",
"list",
"items",
"that",
"are",
"restricted",
"to",
"some",
"user",
"or",
"user",
"group",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopShippingTypeList.class.php#L150-L171 |
31,939 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Samples/NotificationSample.php | OffAmazonPaymentsNotifications_Samples_NotificationSample.logNotification | public function logNotification()
{
try {
$this->logNotificationContents();
$this->ipnLogFile->writeLine("=============================================================================");
$this->ipnLogFile->closeFile();
} catch (Exception $ex){
error_lo... | php | public function logNotification()
{
try {
$this->logNotificationContents();
$this->ipnLogFile->writeLine("=============================================================================");
$this->ipnLogFile->closeFile();
} catch (Exception $ex){
error_lo... | [
"public",
"function",
"logNotification",
"(",
")",
"{",
"try",
"{",
"$",
"this",
"->",
"logNotificationContents",
"(",
")",
";",
"$",
"this",
"->",
"ipnLogFile",
"->",
"writeLine",
"(",
"\"=============================================================================\"",
... | Log the notification to the file
@return void | [
"Log",
"the",
"notification",
"to",
"the",
"file"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Samples/NotificationSample.php#L79-L88 |
31,940 | sylingd/Yesf | src/Connection/Pool.php | Pool.get | public static function get($config = null) {
if (!isset($config['driver'])) {
throw new ConnectionException("Unknown driver");
}
if (!isset($config['host']) || !isset($config['port'])) {
throw new ConnectionException("Host and Port is required");
}
$type = $config['driver'];
$hash = md5($type . ':' . ... | php | public static function get($config = null) {
if (!isset($config['driver'])) {
throw new ConnectionException("Unknown driver");
}
if (!isset($config['host']) || !isset($config['port'])) {
throw new ConnectionException("Host and Port is required");
}
$type = $config['driver'];
$hash = md5($type . ':' . ... | [
"public",
"static",
"function",
"get",
"(",
"$",
"config",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"config",
"[",
"'driver'",
"]",
")",
")",
"{",
"throw",
"new",
"ConnectionException",
"(",
"\"Unknown driver\"",
")",
";",
"}",
"if",
... | Get a connection
@access public
@param mixed $config
@return object | [
"Get",
"a",
"connection"
] | 0fc2b42903bb3519c54c596270c890c826aeb1df | https://github.com/sylingd/Yesf/blob/0fc2b42903bb3519c54c596270c890c826aeb1df/src/Connection/Pool.php#L70-L88 |
31,941 | chameleon-system/chameleon-shop | src/ImageHotspotBundle/objects/db/TPkgImageHotspotItemMarker.class.php | TPkgImageHotspotItemMarker.GetURLForConnectedRecord | public function GetURLForConnectedRecord()
{
$oSpotObject = &$this->GetFieldLinkedRecord();
$oCmsConfig = &TdbCmsConfig::GetInstance();
$sLink = $this->fieldUrl;
if (is_object($oSpotObject)) {
if ($oSpotObject instanceof TdbCmsTplPage) {
$sLink = $this->ge... | php | public function GetURLForConnectedRecord()
{
$oSpotObject = &$this->GetFieldLinkedRecord();
$oCmsConfig = &TdbCmsConfig::GetInstance();
$sLink = $this->fieldUrl;
if (is_object($oSpotObject)) {
if ($oSpotObject instanceof TdbCmsTplPage) {
$sLink = $this->ge... | [
"public",
"function",
"GetURLForConnectedRecord",
"(",
")",
"{",
"$",
"oSpotObject",
"=",
"&",
"$",
"this",
"->",
"GetFieldLinkedRecord",
"(",
")",
";",
"$",
"oCmsConfig",
"=",
"&",
"TdbCmsConfig",
"::",
"GetInstance",
"(",
")",
";",
"$",
"sLink",
"=",
"$"... | fetches the connected record and tries to get a url from that.
@return string | [
"fetches",
"the",
"connected",
"record",
"and",
"tries",
"to",
"get",
"a",
"url",
"from",
"that",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ImageHotspotBundle/objects/db/TPkgImageHotspotItemMarker.class.php#L53-L85 |
31,942 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopUnitOfMeasurement.class.php | TShopUnitOfMeasurement.GetBasePrice | public function GetBasePrice($sourcePrice, $sourceQuantity)
{
if (empty($this->fieldFactor)) {
$factor = 1;
} else {
$factor = $this->fieldFactor;
}
// 4€ = 500ml; 4€ = 500(0,001)L; 4/(500*0,001)€ = 1L; 4/0,5€=1L; 8€ = 1L
$conversionFactor = $sourceQua... | php | public function GetBasePrice($sourcePrice, $sourceQuantity)
{
if (empty($this->fieldFactor)) {
$factor = 1;
} else {
$factor = $this->fieldFactor;
}
// 4€ = 500ml; 4€ = 500(0,001)L; 4/(500*0,001)€ = 1L; 4/0,5€=1L; 8€ = 1L
$conversionFactor = $sourceQua... | [
"public",
"function",
"GetBasePrice",
"(",
"$",
"sourcePrice",
",",
"$",
"sourceQuantity",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"fieldFactor",
")",
")",
"{",
"$",
"factor",
"=",
"1",
";",
"}",
"else",
"{",
"$",
"factor",
"=",
"$",
... | Returns the base price for the source price.
@param float $sourcePrice
@param float $sourceQuantity
@return float | [
"Returns",
"the",
"base",
"price",
"for",
"the",
"source",
"price",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopUnitOfMeasurement.class.php#L25-L41 |
31,943 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.& | public function &GetContributorList($aContributorTypes)
{
if (!is_array($aContributorTypes)) {
$aContributorTypes = array($aContributorTypes);
}
$aContributorTypes = TTools::MysqlRealEscapeArray($aContributorTypes);
$sQuery = "SELECT `shop_contributor`.*
... | php | public function &GetContributorList($aContributorTypes)
{
if (!is_array($aContributorTypes)) {
$aContributorTypes = array($aContributorTypes);
}
$aContributorTypes = TTools::MysqlRealEscapeArray($aContributorTypes);
$sQuery = "SELECT `shop_contributor`.*
... | [
"public",
"function",
"&",
"GetContributorList",
"(",
"$",
"aContributorTypes",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"aContributorTypes",
")",
")",
"{",
"$",
"aContributorTypes",
"=",
"array",
"(",
"$",
"aContributorTypes",
")",
";",
"}",
"$",
"... | Returns Contributors for article for given types.
@param array $aContributorTypes (from field 'identifier')
@return TdbShopContributorList | [
"Returns",
"Contributors",
"for",
"article",
"for",
"given",
"types",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L91-L107 |
31,944 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetBasePrice | public function GetBasePrice()
{
$dBasePrice = $this->GetFromInternalCache('dBasePrice');
if (is_null($dBasePrice)) {
$dBasePrice = false;
$oUnitsOfMeasurement = $this->GetFieldShopUnitOfMeasurement();
if ($oUnitsOfMeasurement) {
$dBasePrice = $oUn... | php | public function GetBasePrice()
{
$dBasePrice = $this->GetFromInternalCache('dBasePrice');
if (is_null($dBasePrice)) {
$dBasePrice = false;
$oUnitsOfMeasurement = $this->GetFieldShopUnitOfMeasurement();
if ($oUnitsOfMeasurement) {
$dBasePrice = $oUn... | [
"public",
"function",
"GetBasePrice",
"(",
")",
"{",
"$",
"dBasePrice",
"=",
"$",
"this",
"->",
"GetFromInternalCache",
"(",
"'dBasePrice'",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"dBasePrice",
")",
")",
"{",
"$",
"dBasePrice",
"=",
"false",
";",
"$",... | return the base price for 1 base unit as defined through the shop_unit_of_measurement and quantity_in_units.
@return float|bool | [
"return",
"the",
"base",
"price",
"for",
"1",
"base",
"unit",
"as",
"defined",
"through",
"the",
"shop_unit_of_measurement",
"and",
"quantity_in_units",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L124-L137 |
31,945 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.& | public function &GetReviewsPublished()
{
$oReviews = $this->GetFromInternalCache('oPublishedReviews');
if (is_null($oReviews)) {
$oReviews = &TdbShopArticleReviewList::GetPublishedReviews($this->id, $this->iLanguageId);
$this->SetInternalCache('oPublishedReviews', $oReviews);... | php | public function &GetReviewsPublished()
{
$oReviews = $this->GetFromInternalCache('oPublishedReviews');
if (is_null($oReviews)) {
$oReviews = &TdbShopArticleReviewList::GetPublishedReviews($this->id, $this->iLanguageId);
$this->SetInternalCache('oPublishedReviews', $oReviews);... | [
"public",
"function",
"&",
"GetReviewsPublished",
"(",
")",
"{",
"$",
"oReviews",
"=",
"$",
"this",
"->",
"GetFromInternalCache",
"(",
"'oPublishedReviews'",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"oReviews",
")",
")",
"{",
"$",
"oReviews",
"=",
"&",
... | return all published reviews for the article.
@return TdbShopArticleReviewList | [
"return",
"all",
"published",
"reviews",
"for",
"the",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L144-L153 |
31,946 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetReviewAverageScore | public function GetReviewAverageScore($bRecount = false)
{
if ($bRecount) {
$oReviews = $this->GetReviewsPublished();
return $oReviews->GetAverageScore();
} else {
return $this->getProductStatsService()->getStats($this->id)->getReviewAverage();
}
} | php | public function GetReviewAverageScore($bRecount = false)
{
if ($bRecount) {
$oReviews = $this->GetReviewsPublished();
return $oReviews->GetAverageScore();
} else {
return $this->getProductStatsService()->getStats($this->id)->getReviewAverage();
}
} | [
"public",
"function",
"GetReviewAverageScore",
"(",
"$",
"bRecount",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"bRecount",
")",
"{",
"$",
"oReviews",
"=",
"$",
"this",
"->",
"GetReviewsPublished",
"(",
")",
";",
"return",
"$",
"oReviews",
"->",
"GetAverageSc... | return the average rating of the article based on the customer reviews for the article.
@param bool $bRecount - force a recount of the actual data
@return float | [
"return",
"the",
"average",
"rating",
"of",
"the",
"article",
"based",
"on",
"the",
"customer",
"reviews",
"for",
"the",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L162-L171 |
31,947 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetVat | public function GetVat()
{
$oVat = $this->GetFromInternalCache('ovat');
if (is_null($oVat)) {
$oVat = $this->getOwnVat();
if (is_null($oVat)) {
// try to fetch from article group
$oArticleGroups = $this->GetArticleGroups();
$oVa... | php | public function GetVat()
{
$oVat = $this->GetFromInternalCache('ovat');
if (is_null($oVat)) {
$oVat = $this->getOwnVat();
if (is_null($oVat)) {
// try to fetch from article group
$oArticleGroups = $this->GetArticleGroups();
$oVa... | [
"public",
"function",
"GetVat",
"(",
")",
"{",
"$",
"oVat",
"=",
"$",
"this",
"->",
"GetFromInternalCache",
"(",
"'ovat'",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"oVat",
")",
")",
"{",
"$",
"oVat",
"=",
"$",
"this",
"->",
"getOwnVat",
"(",
")",
... | return the vat group of the article.
@return TdbShopVat | [
"return",
"the",
"vat",
"group",
"of",
"the",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L196-L222 |
31,948 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.getLink | public function getLink($bAbsolute = false, $sAnchor = null, $aOptionalParameters = array(), \TdbCmsPortal $portal = null, \TdbCmsLanguage $language = null)
{
// if no category is given, fetch the first category of the article
$shopService = $this->getShopService();
$oShop = $shopService->ge... | php | public function getLink($bAbsolute = false, $sAnchor = null, $aOptionalParameters = array(), \TdbCmsPortal $portal = null, \TdbCmsLanguage $language = null)
{
// if no category is given, fetch the first category of the article
$shopService = $this->getShopService();
$oShop = $shopService->ge... | [
"public",
"function",
"getLink",
"(",
"$",
"bAbsolute",
"=",
"false",
",",
"$",
"sAnchor",
"=",
"null",
",",
"$",
"aOptionalParameters",
"=",
"array",
"(",
")",
",",
"\\",
"TdbCmsPortal",
"$",
"portal",
"=",
"null",
",",
"\\",
"TdbCmsLanguage",
"$",
"lan... | return the link to the detail view of the product.
@param bool $bAbsolute set to true to include the domain in the link
@param string|null $sAnchor
@param array $aOptionalParameters supported optional parameters:
TdbShopArticle::CMS_LINKABLE_OBJECT_PARAM_CATEGORY - (strin... | [
"return",
"the",
"link",
"to",
"the",
"detail",
"view",
"of",
"the",
"product",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L258-L312 |
31,949 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetReviewFormLink | public function GetReviewFormLink($bIncludePortalLink = false, $iCategoryId = null)
{
return $this->GetDetailLink($bIncludePortalLink, $iCategoryId).'#review'.TGlobal::OutHTML($this->id);
} | php | public function GetReviewFormLink($bIncludePortalLink = false, $iCategoryId = null)
{
return $this->GetDetailLink($bIncludePortalLink, $iCategoryId).'#review'.TGlobal::OutHTML($this->id);
} | [
"public",
"function",
"GetReviewFormLink",
"(",
"$",
"bIncludePortalLink",
"=",
"false",
",",
"$",
"iCategoryId",
"=",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"GetDetailLink",
"(",
"$",
"bIncludePortalLink",
",",
"$",
"iCategoryId",
")",
".",
"'#review'... | return the link to the review page of the product.
@param bool $bIncludePortalLink - set to true to include the domain in the link
@param int $iCategoryId - pass a category to force a category (only works if the category is assigned to the article)
@return string | [
"return",
"the",
"link",
"to",
"the",
"review",
"page",
"of",
"the",
"product",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L485-L488 |
31,950 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetToBasketLink | public function GetToBasketLink($bIncludePortalLink = false, $bRedirectToBasket = false, $bReplaceBasketContents = false, $bGetAjaxParameter = false, $sMessageConsumer = MTShopBasketCore::MSG_CONSUMER_NAME_MINIBASKET)
{
$sLink = '';
$aParameters = $this->GetToBasketLinkParameters($bRedirectToBasket,... | php | public function GetToBasketLink($bIncludePortalLink = false, $bRedirectToBasket = false, $bReplaceBasketContents = false, $bGetAjaxParameter = false, $sMessageConsumer = MTShopBasketCore::MSG_CONSUMER_NAME_MINIBASKET)
{
$sLink = '';
$aParameters = $this->GetToBasketLinkParameters($bRedirectToBasket,... | [
"public",
"function",
"GetToBasketLink",
"(",
"$",
"bIncludePortalLink",
"=",
"false",
",",
"$",
"bRedirectToBasket",
"=",
"false",
",",
"$",
"bReplaceBasketContents",
"=",
"false",
",",
"$",
"bGetAjaxParameter",
"=",
"false",
",",
"$",
"sMessageConsumer",
"=",
... | generates a link that can be used to add this product to the basket.
@param bool $bIncludePortalLink - include domain in link
@param bool $bRedirectToBasket - redirect to basket page after adding product
@param bool $bReplaceBasketContents - set to true if you want the contents of the basket to be repla... | [
"generates",
"a",
"link",
"that",
"can",
"be",
"used",
"to",
"add",
"this",
"product",
"to",
"the",
"basket",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L501-L515 |
31,951 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.generateLinkForToBasketParameters | protected function generateLinkForToBasketParameters($aParameters = array(), $bIncludePortalLink)
{
$activePage = $this->getActivePageService()->getActivePage();
if (!is_object($activePage)) {
$sLink = '?'.TTools::GetArrayAsURL($aParameters);
if ($bIncludePortalLink) {
... | php | protected function generateLinkForToBasketParameters($aParameters = array(), $bIncludePortalLink)
{
$activePage = $this->getActivePageService()->getActivePage();
if (!is_object($activePage)) {
$sLink = '?'.TTools::GetArrayAsURL($aParameters);
if ($bIncludePortalLink) {
... | [
"protected",
"function",
"generateLinkForToBasketParameters",
"(",
"$",
"aParameters",
"=",
"array",
"(",
")",
",",
"$",
"bIncludePortalLink",
")",
"{",
"$",
"activePage",
"=",
"$",
"this",
"->",
"getActivePageService",
"(",
")",
"->",
"getActivePage",
"(",
")",... | Creates to basket link from given to basket parameters.
@param array $aParameters
@param $bIncludePortalLink
@return string | [
"Creates",
"to",
"basket",
"link",
"from",
"given",
"to",
"basket",
"parameters",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L525-L540 |
31,952 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetToBasketLinkForExternalCalls | public function GetToBasketLinkForExternalCalls()
{
return 'http://'.$this->getPortalDomainService()->getActiveDomain()->getInsecureDomainName().'/'.TdbShopArticle::URL_EXTERNAL_TO_BASKET_REQUEST.'/id/'.urlencode($this->id);
} | php | public function GetToBasketLinkForExternalCalls()
{
return 'http://'.$this->getPortalDomainService()->getActiveDomain()->getInsecureDomainName().'/'.TdbShopArticle::URL_EXTERNAL_TO_BASKET_REQUEST.'/id/'.urlencode($this->id);
} | [
"public",
"function",
"GetToBasketLinkForExternalCalls",
"(",
")",
"{",
"return",
"'http://'",
".",
"$",
"this",
"->",
"getPortalDomainService",
"(",
")",
"->",
"getActiveDomain",
"(",
")",
"->",
"getInsecureDomainName",
"(",
")",
".",
"'/'",
".",
"TdbShopArticle"... | returns a url to place the item in the basket from an external location.
@return string | [
"returns",
"a",
"url",
"to",
"place",
"the",
"item",
"in",
"the",
"basket",
"from",
"an",
"external",
"location",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L547-L550 |
31,953 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetToBasketLinkParameters | public function GetToBasketLinkParameters($bRedirectToBasket = false, $bReplaceBasketContents = false, $bGetAjaxParameter = false, $sMessageConsumer = MTShopBasketCore::MSG_CONSUMER_NAME_MINIBASKET)
{
$aParameters = $this->getToBasketLinkBasketParameters($bRedirectToBasket, $bReplaceBasketContents, $bGetAja... | php | public function GetToBasketLinkParameters($bRedirectToBasket = false, $bReplaceBasketContents = false, $bGetAjaxParameter = false, $sMessageConsumer = MTShopBasketCore::MSG_CONSUMER_NAME_MINIBASKET)
{
$aParameters = $this->getToBasketLinkBasketParameters($bRedirectToBasket, $bReplaceBasketContents, $bGetAja... | [
"public",
"function",
"GetToBasketLinkParameters",
"(",
"$",
"bRedirectToBasket",
"=",
"false",
",",
"$",
"bReplaceBasketContents",
"=",
"false",
",",
"$",
"bGetAjaxParameter",
"=",
"false",
",",
"$",
"sMessageConsumer",
"=",
"MTShopBasketCore",
"::",
"MSG_CONSUMER_NA... | return parameters needed for a to basket call.
@param bool $bRedirectToBasket - redirect to basket page after adding product
@param bool $bReplaceBasketContents - set to true if you want the contents of the basket to be replaced by the product wenn added to basket
@param bool $bGetAjaxParameter - set t... | [
"return",
"parameters",
"needed",
"for",
"a",
"to",
"basket",
"call",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L562-L568 |
31,954 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetToNoticeListLink | public function GetToNoticeListLink($bIncludePortalLink = false, $sMsgConsumerName = false)
{
if (false === $sMsgConsumerName) {
$sMsgConsumerName = $this->GetMessageConsumerName();
}
$oShopConfig = TdbShop::GetInstance();
$aParameters = array(
'module_fnc' =... | php | public function GetToNoticeListLink($bIncludePortalLink = false, $sMsgConsumerName = false)
{
if (false === $sMsgConsumerName) {
$sMsgConsumerName = $this->GetMessageConsumerName();
}
$oShopConfig = TdbShop::GetInstance();
$aParameters = array(
'module_fnc' =... | [
"public",
"function",
"GetToNoticeListLink",
"(",
"$",
"bIncludePortalLink",
"=",
"false",
",",
"$",
"sMsgConsumerName",
"=",
"false",
")",
"{",
"if",
"(",
"false",
"===",
"$",
"sMsgConsumerName",
")",
"{",
"$",
"sMsgConsumerName",
"=",
"$",
"this",
"->",
"G... | generate a link used to add the article to the notice list.
@param bool $bIncludePortalLink - include domain in link
@param bool $sMsgConsumerName
@return string | [
"generate",
"a",
"link",
"used",
"to",
"add",
"the",
"article",
"to",
"the",
"notice",
"list",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L578-L609 |
31,955 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.& | public function &GetPrimaryCategory()
{
$oCategory = null;
// if this is a variant, then we want to take the parent object instead - at least if no data is set for the child
if (!empty($this->fieldShopCategoryId)) {
$oCategory = &$this->GetFieldShopCategory();
if (!is... | php | public function &GetPrimaryCategory()
{
$oCategory = null;
// if this is a variant, then we want to take the parent object instead - at least if no data is set for the child
if (!empty($this->fieldShopCategoryId)) {
$oCategory = &$this->GetFieldShopCategory();
if (!is... | [
"public",
"function",
"&",
"GetPrimaryCategory",
"(",
")",
"{",
"$",
"oCategory",
"=",
"null",
";",
"// if this is a variant, then we want to take the parent object instead - at least if no data is set for the child",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"fieldS... | return the primary category of the article (usually just the first one found.
@return TdbShopCategory | [
"return",
"the",
"primary",
"category",
"of",
"the",
"article",
"(",
"usually",
"just",
"the",
"first",
"one",
"found",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L647-L671 |
31,956 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.& | public function &GetFieldShopCategoryList($sOrderBy = '')
{
$oCategories = &$this->GetFromInternalCache('oCategories');
if (is_null($oCategories)) {
$oCategories = &TdbShopCategoryList::GetArticleCategories($this->id, $this->iLanguageId);
$this->SetInternalCache('oCategories'... | php | public function &GetFieldShopCategoryList($sOrderBy = '')
{
$oCategories = &$this->GetFromInternalCache('oCategories');
if (is_null($oCategories)) {
$oCategories = &TdbShopCategoryList::GetArticleCategories($this->id, $this->iLanguageId);
$this->SetInternalCache('oCategories'... | [
"public",
"function",
"&",
"GetFieldShopCategoryList",
"(",
"$",
"sOrderBy",
"=",
"''",
")",
"{",
"$",
"oCategories",
"=",
"&",
"$",
"this",
"->",
"GetFromInternalCache",
"(",
"'oCategories'",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"oCategories",
")",
"... | return all categories assigned to the article.
@param string $sOrderBy
@return TdbShopCategoryList | [
"return",
"all",
"categories",
"assigned",
"to",
"the",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L680-L689 |
31,957 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.& | public function &GetArticleGroups()
{
$oArticleGroups = &$this->GetFromInternalCache('oArticleGroups');
if (is_null($oArticleGroups)) {
$oArticleGroups = &TdbShopArticleGroupList::GetArticleGroups($this->id);
$this->SetInternalCache('oArticleGroups', $oArticleGroups);
... | php | public function &GetArticleGroups()
{
$oArticleGroups = &$this->GetFromInternalCache('oArticleGroups');
if (is_null($oArticleGroups)) {
$oArticleGroups = &TdbShopArticleGroupList::GetArticleGroups($this->id);
$this->SetInternalCache('oArticleGroups', $oArticleGroups);
... | [
"public",
"function",
"&",
"GetArticleGroups",
"(",
")",
"{",
"$",
"oArticleGroups",
"=",
"&",
"$",
"this",
"->",
"GetFromInternalCache",
"(",
"'oArticleGroups'",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"oArticleGroups",
")",
")",
"{",
"$",
"oArticleGroups... | return all article groups assigend to the article.
@return TdbShopArticleGroupList | [
"return",
"all",
"article",
"groups",
"assigend",
"to",
"the",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L696-L705 |
31,958 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetMessages | protected function GetMessages($aMessageConsumerToCheck)
{
$sMessages = '';
$oMsgManager = TCMSMessageManager::GetInstance();
foreach ($aMessageConsumerToCheck as $sMessageConsumer) {
if ($oMsgManager->ConsumerHasMessages($sMessageConsumer)) {
$sMessages .= $oMsg... | php | protected function GetMessages($aMessageConsumerToCheck)
{
$sMessages = '';
$oMsgManager = TCMSMessageManager::GetInstance();
foreach ($aMessageConsumerToCheck as $sMessageConsumer) {
if ($oMsgManager->ConsumerHasMessages($sMessageConsumer)) {
$sMessages .= $oMsg... | [
"protected",
"function",
"GetMessages",
"(",
"$",
"aMessageConsumerToCheck",
")",
"{",
"$",
"sMessages",
"=",
"''",
";",
"$",
"oMsgManager",
"=",
"TCMSMessageManager",
"::",
"GetInstance",
"(",
")",
";",
"foreach",
"(",
"$",
"aMessageConsumerToCheck",
"as",
"$",... | uses message manager to render messages and return them as string.
@param $aMessageConsumerToCheck
@return string | [
"uses",
"message",
"manager",
"to",
"render",
"messages",
"and",
"return",
"them",
"as",
"string",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L756-L768 |
31,959 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetPrimaryImage | public function GetPrimaryImage()
{
$oPrimaryImage = &$this->GetFromInternalCache('oPrimaryImage');
if (is_null($oPrimaryImage)) {
if (!empty($this->fieldCmsMediaDefaultPreviewImageId) && (!is_numeric($this->fieldCmsMediaDefaultPreviewImageId) || intval($this->fieldCmsMediaDefaultPreview... | php | public function GetPrimaryImage()
{
$oPrimaryImage = &$this->GetFromInternalCache('oPrimaryImage');
if (is_null($oPrimaryImage)) {
if (!empty($this->fieldCmsMediaDefaultPreviewImageId) && (!is_numeric($this->fieldCmsMediaDefaultPreviewImageId) || intval($this->fieldCmsMediaDefaultPreview... | [
"public",
"function",
"GetPrimaryImage",
"(",
")",
"{",
"$",
"oPrimaryImage",
"=",
"&",
"$",
"this",
"->",
"GetFromInternalCache",
"(",
"'oPrimaryImage'",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"oPrimaryImage",
")",
")",
"{",
"if",
"(",
"!",
"empty",
... | return the primary image object of the shop article. this is either the cms_media_default_preview_image_id
or the first image in the image list.
@return TdbShopArticleImage | [
"return",
"the",
"primary",
"image",
"object",
"of",
"the",
"shop",
"article",
".",
"this",
"is",
"either",
"the",
"cms_media_default_preview_image_id",
"or",
"the",
"first",
"image",
"in",
"the",
"image",
"list",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L830-L866 |
31,960 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.IsInArticleGroups | public function IsInArticleGroups($aGroupList)
{
$bIsInGroups = false;
$aArticleGroups = $this->GetMLTIdList('shop_article_group');
$aIntersec = array_intersect($aArticleGroups, $aGroupList);
if (0 == count($aIntersec) && 0 == count($aArticleGroups) && $this->IsVariant()) {
... | php | public function IsInArticleGroups($aGroupList)
{
$bIsInGroups = false;
$aArticleGroups = $this->GetMLTIdList('shop_article_group');
$aIntersec = array_intersect($aArticleGroups, $aGroupList);
if (0 == count($aIntersec) && 0 == count($aArticleGroups) && $this->IsVariant()) {
... | [
"public",
"function",
"IsInArticleGroups",
"(",
"$",
"aGroupList",
")",
"{",
"$",
"bIsInGroups",
"=",
"false",
";",
"$",
"aArticleGroups",
"=",
"$",
"this",
"->",
"GetMLTIdList",
"(",
"'shop_article_group'",
")",
";",
"$",
"aIntersec",
"=",
"array_intersect",
... | return true if the article is in at least one of the groups.
@param array $aGroupList
@return bool | [
"return",
"true",
"if",
"the",
"article",
"is",
"in",
"at",
"least",
"one",
"of",
"the",
"groups",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L937-L953 |
31,961 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetExportObject | public function GetExportObject()
{
$oExportObject = new stdClass();
$oExportObject->id = $this->id;
foreach ($this as $sPropName => $sPropVal) {
if ('field' == substr($sPropName, 0, 5)) {
$oExportObject->{$sPropName} = $sPropVal;
}
}
... | php | public function GetExportObject()
{
$oExportObject = new stdClass();
$oExportObject->id = $this->id;
foreach ($this as $sPropName => $sPropVal) {
if ('field' == substr($sPropName, 0, 5)) {
$oExportObject->{$sPropName} = $sPropVal;
}
}
... | [
"public",
"function",
"GetExportObject",
"(",
")",
"{",
"$",
"oExportObject",
"=",
"new",
"stdClass",
"(",
")",
";",
"$",
"oExportObject",
"->",
"id",
"=",
"$",
"this",
"->",
"id",
";",
"foreach",
"(",
"$",
"this",
"as",
"$",
"sPropName",
"=>",
"$",
... | returns an article object with additional elements needed for exports and
interfaces like full URL image links, attachment links and so on.
When called from CMS BackEnd it WILL use the first portal/shop found
@return stdClass | [
"returns",
"an",
"article",
"object",
"with",
"additional",
"elements",
"needed",
"for",
"exports",
"and",
"interfaces",
"like",
"full",
"URL",
"image",
"links",
"attachment",
"links",
"and",
"so",
"on",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L963-L1021 |
31,962 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.IsInCategory | public function IsInCategory($aCategoryList)
{
$bIsInCategory = false;
if (in_array($this->fieldShopCategoryId, $aCategoryList)) {
$bIsInCategory = true;
} else {
$aArticleCategories = $this->GetMLTIdList('shop_category_mlt');
$aIntersec = array_intersect(... | php | public function IsInCategory($aCategoryList)
{
$bIsInCategory = false;
if (in_array($this->fieldShopCategoryId, $aCategoryList)) {
$bIsInCategory = true;
} else {
$aArticleCategories = $this->GetMLTIdList('shop_category_mlt');
$aIntersec = array_intersect(... | [
"public",
"function",
"IsInCategory",
"(",
"$",
"aCategoryList",
")",
"{",
"$",
"bIsInCategory",
"=",
"false",
";",
"if",
"(",
"in_array",
"(",
"$",
"this",
"->",
"fieldShopCategoryId",
",",
"$",
"aCategoryList",
")",
")",
"{",
"$",
"bIsInCategory",
"=",
"... | return true if the article is in at least one of the categories.
@param array $aCategoryList
@return bool | [
"return",
"true",
"if",
"the",
"article",
"is",
"in",
"at",
"least",
"one",
"of",
"the",
"categories",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1030-L1049 |
31,963 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.UpdateProductViewCount | public function UpdateProductViewCount()
{
if (CMS_SHOP_TRACK_ARTICLE_DETAIL_VIEWS && !is_null($this->id)) {
$this->getProductStatsService()->add($this->id, ProductStatisticsServiceInterface::TYPE_DETAIL_VIEWS, 1);
}
} | php | public function UpdateProductViewCount()
{
if (CMS_SHOP_TRACK_ARTICLE_DETAIL_VIEWS && !is_null($this->id)) {
$this->getProductStatsService()->add($this->id, ProductStatisticsServiceInterface::TYPE_DETAIL_VIEWS, 1);
}
} | [
"public",
"function",
"UpdateProductViewCount",
"(",
")",
"{",
"if",
"(",
"CMS_SHOP_TRACK_ARTICLE_DETAIL_VIEWS",
"&&",
"!",
"is_null",
"(",
"$",
"this",
"->",
"id",
")",
")",
"{",
"$",
"this",
"->",
"getProductStatsService",
"(",
")",
"->",
"add",
"(",
"$",
... | increase the product view counter by one. | [
"increase",
"the",
"product",
"view",
"counter",
"by",
"one",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1054-L1059 |
31,964 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.UpdateStatsReviews | public function UpdateStatsReviews()
{
$sArticleId = $this->id;
if ($this->IsVariant()) {
$sArticleId = $this->fieldVariantParentId;
}
$iCount = $this->GetReviewCount(true);
$dAvrg = $this->GetReviewAverageScore(true);
$this->getProductStatsService()->set(... | php | public function UpdateStatsReviews()
{
$sArticleId = $this->id;
if ($this->IsVariant()) {
$sArticleId = $this->fieldVariantParentId;
}
$iCount = $this->GetReviewCount(true);
$dAvrg = $this->GetReviewAverageScore(true);
$this->getProductStatsService()->set(... | [
"public",
"function",
"UpdateStatsReviews",
"(",
")",
"{",
"$",
"sArticleId",
"=",
"$",
"this",
"->",
"id",
";",
"if",
"(",
"$",
"this",
"->",
"IsVariant",
"(",
")",
")",
"{",
"$",
"sArticleId",
"=",
"$",
"this",
"->",
"fieldVariantParentId",
";",
"}",... | updates the review stats for the article. | [
"updates",
"the",
"review",
"stats",
"for",
"the",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1064-L1075 |
31,965 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetMetaKeywords | public function GetMetaKeywords()
{
if (strlen(trim(strip_tags($this->fieldMetaKeywords))) > 0) {
$aKeywords = explode(',', trim(strip_tags($this->fieldMetaKeywords)));
} else {
$aKeywords = explode(' ', $this->fieldName.' '.strip_tags($this->fieldDescriptionShort));
... | php | public function GetMetaKeywords()
{
if (strlen(trim(strip_tags($this->fieldMetaKeywords))) > 0) {
$aKeywords = explode(',', trim(strip_tags($this->fieldMetaKeywords)));
} else {
$aKeywords = explode(' ', $this->fieldName.' '.strip_tags($this->fieldDescriptionShort));
... | [
"public",
"function",
"GetMetaKeywords",
"(",
")",
"{",
"if",
"(",
"strlen",
"(",
"trim",
"(",
"strip_tags",
"(",
"$",
"this",
"->",
"fieldMetaKeywords",
")",
")",
")",
">",
"0",
")",
"{",
"$",
"aKeywords",
"=",
"explode",
"(",
"','",
",",
"trim",
"(... | return keywords for the meta tag on article detail pages.
@return array | [
"return",
"keywords",
"for",
"the",
"meta",
"tag",
"on",
"article",
"detail",
"pages",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1082-L1091 |
31,966 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.HasVariants | public function HasVariants($bCheckForActiveVariantsOnly = false)
{
if ($this->IsVariant()) {
return false;
}
$sInternalCacheKey = 'bHasVariants';
if ($bCheckForActiveVariantsOnly) {
$sInternalCacheKey .= 'OnlyActive';
}
$bHasVariants = &$this-... | php | public function HasVariants($bCheckForActiveVariantsOnly = false)
{
if ($this->IsVariant()) {
return false;
}
$sInternalCacheKey = 'bHasVariants';
if ($bCheckForActiveVariantsOnly) {
$sInternalCacheKey .= 'OnlyActive';
}
$bHasVariants = &$this-... | [
"public",
"function",
"HasVariants",
"(",
"$",
"bCheckForActiveVariantsOnly",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"IsVariant",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"sInternalCacheKey",
"=",
"'bHasVariants'",
";",
"if",
"(... | return true if the article has variants.
@param bool $bCheckForActiveVariantsOnly
@return bool | [
"return",
"true",
"if",
"the",
"article",
"has",
"variants",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1190-L1210 |
31,967 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.& | public function &GetFieldShopArticleVariantsList($aSelectedTypeValues = array(), $bLoadOnlyActive = true)
{
$sKey = 'oFieldShopArticleVariantsList'.serialize($aSelectedTypeValues);
if ($bLoadOnlyActive) {
$sKey .= 'active';
} else {
$sKey .= 'inactive';
}
... | php | public function &GetFieldShopArticleVariantsList($aSelectedTypeValues = array(), $bLoadOnlyActive = true)
{
$sKey = 'oFieldShopArticleVariantsList'.serialize($aSelectedTypeValues);
if ($bLoadOnlyActive) {
$sKey .= 'active';
} else {
$sKey .= 'inactive';
}
... | [
"public",
"function",
"&",
"GetFieldShopArticleVariantsList",
"(",
"$",
"aSelectedTypeValues",
"=",
"array",
"(",
")",
",",
"$",
"bLoadOnlyActive",
"=",
"true",
")",
"{",
"$",
"sKey",
"=",
"'oFieldShopArticleVariantsList'",
".",
"serialize",
"(",
"$",
"aSelectedTy... | load list of article variants.
@param array $aSelectedTypeValues - restrict list to values matching this preselection (format: array(shop_variant_type_id=>shop_variant_type_value_id,...)
@param bool $bLoadOnlyActive
@return TdbShopArticleList | [
"load",
"list",
"of",
"article",
"variants",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1220-L1271 |
31,968 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetLowestPricedVariant | public function GetLowestPricedVariant()
{
$oLowestPrictedVariant = null;
$oVariants = $this->GetFieldShopArticleVariantsList();
while ($oVariant = $oVariants->Next()) {
if (is_null($oLowestPrictedVariant) || $oVariant->fieldPrice < $oLowestPrictedVariant->fieldPrice) {
... | php | public function GetLowestPricedVariant()
{
$oLowestPrictedVariant = null;
$oVariants = $this->GetFieldShopArticleVariantsList();
while ($oVariant = $oVariants->Next()) {
if (is_null($oLowestPrictedVariant) || $oVariant->fieldPrice < $oLowestPrictedVariant->fieldPrice) {
... | [
"public",
"function",
"GetLowestPricedVariant",
"(",
")",
"{",
"$",
"oLowestPrictedVariant",
"=",
"null",
";",
"$",
"oVariants",
"=",
"$",
"this",
"->",
"GetFieldShopArticleVariantsList",
"(",
")",
";",
"while",
"(",
"$",
"oVariant",
"=",
"$",
"oVariants",
"->... | return variant with the lowest price.
@return TdbShopArticle | [
"return",
"variant",
"with",
"the",
"lowest",
"price",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1278-L1290 |
31,969 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.getVariantIDList | public function getVariantIDList($aSelectedTypeValues = array(), $bLoadActiveOnly = true)
{
$aArticleIdList = array();
$oVariantList = null;
if ($this->IsVariant()) {
$oParent = &$this->GetFieldVariantParent();
$oVariantList = $oParent->GetFieldShopArticleVariantsList... | php | public function getVariantIDList($aSelectedTypeValues = array(), $bLoadActiveOnly = true)
{
$aArticleIdList = array();
$oVariantList = null;
if ($this->IsVariant()) {
$oParent = &$this->GetFieldVariantParent();
$oVariantList = $oParent->GetFieldShopArticleVariantsList... | [
"public",
"function",
"getVariantIDList",
"(",
"$",
"aSelectedTypeValues",
"=",
"array",
"(",
")",
",",
"$",
"bLoadActiveOnly",
"=",
"true",
")",
"{",
"$",
"aArticleIdList",
"=",
"array",
"(",
")",
";",
"$",
"oVariantList",
"=",
"null",
";",
"if",
"(",
"... | returns an array of IDs of all variant articles of this article.
@param array $aSelectedTypeValues - restrict list to values matching this preselection (format: array(shop_variant_type_id=>shop_variant_type_value_id,...)
@param bool $bLoadActiveOnly - set to false if you want to load inactive articles too
@retur... | [
"returns",
"an",
"array",
"of",
"IDs",
"of",
"all",
"variant",
"articles",
"of",
"this",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1322-L1341 |
31,970 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetVariantValuesAvailableForType | public function GetVariantValuesAvailableForType($oVariantType, $aSelectedTypeValues = array())
{
$oVariantValueList = null;
$aArticleIdList = $this->getVariantIDList($aSelectedTypeValues, true);
if (count($aArticleIdList) > 0) {
$query = "SELECT `shop_variant_type_value`.*
... | php | public function GetVariantValuesAvailableForType($oVariantType, $aSelectedTypeValues = array())
{
$oVariantValueList = null;
$aArticleIdList = $this->getVariantIDList($aSelectedTypeValues, true);
if (count($aArticleIdList) > 0) {
$query = "SELECT `shop_variant_type_value`.*
... | [
"public",
"function",
"GetVariantValuesAvailableForType",
"(",
"$",
"oVariantType",
",",
"$",
"aSelectedTypeValues",
"=",
"array",
"(",
")",
")",
"{",
"$",
"oVariantValueList",
"=",
"null",
";",
"$",
"aArticleIdList",
"=",
"$",
"this",
"->",
"getVariantIDList",
... | return all variant values that are available for the given type and this article.
@param TdbShopVariantType $oVariantType
@param array $aSelectedTypeValues - restrict list to values matching this preselection (format: array(shop_variant_type_id=>shop_variant_type_value_id,...)
@return TdbShopVariantTypeV... | [
"return",
"all",
"variant",
"values",
"that",
"are",
"available",
"for",
"the",
"given",
"type",
"and",
"this",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1351-L1370 |
31,971 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetActiveVariantValue | public function GetActiveVariantValue($sVariantTypeIdentifier)
{
$oVariantValueObject = null;
$aVariantValues = &$this->GetFromInternalCache('aActiveVariantValues');
if (is_null($aVariantValues)) {
$query = "SELECT `shop_variant_type_value`.*, `shop_variant_type`.`identifier` AS ... | php | public function GetActiveVariantValue($sVariantTypeIdentifier)
{
$oVariantValueObject = null;
$aVariantValues = &$this->GetFromInternalCache('aActiveVariantValues');
if (is_null($aVariantValues)) {
$query = "SELECT `shop_variant_type_value`.*, `shop_variant_type`.`identifier` AS ... | [
"public",
"function",
"GetActiveVariantValue",
"(",
"$",
"sVariantTypeIdentifier",
")",
"{",
"$",
"oVariantValueObject",
"=",
"null",
";",
"$",
"aVariantValues",
"=",
"&",
"$",
"this",
"->",
"GetFromInternalCache",
"(",
"'aActiveVariantValues'",
")",
";",
"if",
"(... | returns the variant type value for the given identifier.
note: there was a typo in the method name GetActiveVaraintValue
please change your custom code to use the renamed method
(the old method name is redirected, but will be removed in the future)
@param string $sVariantTypeIdentifier
@return TdbShopVariantTypeValu... | [
"returns",
"the",
"variant",
"type",
"value",
"for",
"the",
"given",
"identifier",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1465-L1487 |
31,972 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetVariantTypeActiveValue | public function GetVariantTypeActiveValue($sVariantTypeId)
{
$sValue = false;
$aVariantValueIds = $this->GetFromInternalCache('aActiveVariantValueIds');
if (is_null($aVariantValueIds)) {
$oValueList = &$this->GetFieldShopVariantTypeValueList();
while ($oValue = $oValu... | php | public function GetVariantTypeActiveValue($sVariantTypeId)
{
$sValue = false;
$aVariantValueIds = $this->GetFromInternalCache('aActiveVariantValueIds');
if (is_null($aVariantValueIds)) {
$oValueList = &$this->GetFieldShopVariantTypeValueList();
while ($oValue = $oValu... | [
"public",
"function",
"GetVariantTypeActiveValue",
"(",
"$",
"sVariantTypeId",
")",
"{",
"$",
"sValue",
"=",
"false",
";",
"$",
"aVariantValueIds",
"=",
"$",
"this",
"->",
"GetFromInternalCache",
"(",
"'aActiveVariantValueIds'",
")",
";",
"if",
"(",
"is_null",
"... | returns the id of the active value for the given variant type.
@param string $sVariantTypeId
@return string | [
"returns",
"the",
"id",
"of",
"the",
"active",
"value",
"for",
"the",
"given",
"variant",
"type",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1496-L1513 |
31,973 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.RenderVariantSelection | public function RenderVariantSelection($sViewName = 'vStandard', $sViewType = 'Customer')
{
$sHTML = '';
$oVariantSet = null;
if ($this->IsVariant()) {
$oParent = &$this->GetFieldVariantParent();
$oVariantSet = &$oParent->GetFieldShopVariantSet();
} else {
... | php | public function RenderVariantSelection($sViewName = 'vStandard', $sViewType = 'Customer')
{
$sHTML = '';
$oVariantSet = null;
if ($this->IsVariant()) {
$oParent = &$this->GetFieldVariantParent();
$oVariantSet = &$oParent->GetFieldShopVariantSet();
} else {
... | [
"public",
"function",
"RenderVariantSelection",
"(",
"$",
"sViewName",
"=",
"'vStandard'",
",",
"$",
"sViewType",
"=",
"'Customer'",
")",
"{",
"$",
"sHTML",
"=",
"''",
";",
"$",
"oVariantSet",
"=",
"null",
";",
"if",
"(",
"$",
"this",
"->",
"IsVariant",
... | render the variant selection html using the display handler defined through the variant set.
@param string $sViewName
@param string $sViewType
@return string | [
"render",
"the",
"variant",
"selection",
"html",
"using",
"the",
"display",
"handler",
"defined",
"through",
"the",
"variant",
"set",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1523-L1540 |
31,974 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetVariantFromValues | public function GetVariantFromValues($aTypeValuePairs)
{
$oArticle = null;
if (!$this->IsVariant()) {
$query = "SELECT `shop_article`.*
FROM `shop_article`
INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_article`.`id` = `shop_article_shop_... | php | public function GetVariantFromValues($aTypeValuePairs)
{
$oArticle = null;
if (!$this->IsVariant()) {
$query = "SELECT `shop_article`.*
FROM `shop_article`
INNER JOIN `shop_article_shop_variant_type_value_mlt` ON `shop_article`.`id` = `shop_article_shop_... | [
"public",
"function",
"GetVariantFromValues",
"(",
"$",
"aTypeValuePairs",
")",
"{",
"$",
"oArticle",
"=",
"null",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"IsVariant",
"(",
")",
")",
"{",
"$",
"query",
"=",
"\"SELECT `shop_article`.*\n FROM `s... | return the variant matching the shop_variant_type_value paris.
@param array $aTypeValuePairs
@return TdbShopArticle | [
"return",
"the",
"variant",
"matching",
"the",
"shop_variant_type_value",
"paris",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1549-L1574 |
31,975 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetMessageConsumerName | public function GetMessageConsumerName()
{
$sId = $this->id;
if ($this->IsVariant()) {
$sId = $this->fieldVariantParentId;
}
return TdbShopArticle::MSG_CONSUMER_BASE_NAME.$sId;
} | php | public function GetMessageConsumerName()
{
$sId = $this->id;
if ($this->IsVariant()) {
$sId = $this->fieldVariantParentId;
}
return TdbShopArticle::MSG_CONSUMER_BASE_NAME.$sId;
} | [
"public",
"function",
"GetMessageConsumerName",
"(",
")",
"{",
"$",
"sId",
"=",
"$",
"this",
"->",
"id",
";",
"if",
"(",
"$",
"this",
"->",
"IsVariant",
"(",
")",
")",
"{",
"$",
"sId",
"=",
"$",
"this",
"->",
"fieldVariantParentId",
";",
"}",
"return... | return the message consumer name of this article. note that varaints
always talk through their parents - so if you want to talk to the
variant directly, you will need to overwrite this method.
@return string | [
"return",
"the",
"message",
"consumer",
"name",
"of",
"this",
"article",
".",
"note",
"that",
"varaints",
"always",
"talk",
"through",
"their",
"parents",
"-",
"so",
"if",
"you",
"want",
"to",
"talk",
"to",
"the",
"variant",
"directly",
"you",
"will",
"nee... | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1617-L1625 |
31,976 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.& | public function &GetFieldShopBundleArticleList()
{
$oBundleList = parent::GetFieldShopBundleArticleList();
if (0 == $oBundleList->Length() && $this->IsVariant()) {
$oBundleList = $this->GetFieldVariantParent()->GetFieldShopBundleArticleList();
}
$oBundleList->bAllowItemCa... | php | public function &GetFieldShopBundleArticleList()
{
$oBundleList = parent::GetFieldShopBundleArticleList();
if (0 == $oBundleList->Length() && $this->IsVariant()) {
$oBundleList = $this->GetFieldVariantParent()->GetFieldShopBundleArticleList();
}
$oBundleList->bAllowItemCa... | [
"public",
"function",
"&",
"GetFieldShopBundleArticleList",
"(",
")",
"{",
"$",
"oBundleList",
"=",
"parent",
"::",
"GetFieldShopBundleArticleList",
"(",
")",
";",
"if",
"(",
"0",
"==",
"$",
"oBundleList",
"->",
"Length",
"(",
")",
"&&",
"$",
"this",
"->",
... | Get bundle article list - if we are a variant an no bundle articles are set, the we return the bundles of the parent.
@return TdbShopBundleArticleList | [
"Get",
"bundle",
"article",
"list",
"-",
"if",
"we",
"are",
"a",
"variant",
"an",
"no",
"bundle",
"articles",
"are",
"set",
"the",
"we",
"return",
"the",
"bundles",
"of",
"the",
"parent",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1632-L1641 |
31,977 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetFieldShopAttributeValueList | public function GetFieldShopAttributeValueList($sOrderBy = '')
{
$oAttributeValueList = parent::GetFieldShopAttributeValueList($sOrderBy);
if (0 == $oAttributeValueList->Length() && $this->IsVariant()) {
$oAttributeValueList = $this->GetFieldVariantParent()->GetFieldShopAttributeValueLis... | php | public function GetFieldShopAttributeValueList($sOrderBy = '')
{
$oAttributeValueList = parent::GetFieldShopAttributeValueList($sOrderBy);
if (0 == $oAttributeValueList->Length() && $this->IsVariant()) {
$oAttributeValueList = $this->GetFieldVariantParent()->GetFieldShopAttributeValueLis... | [
"public",
"function",
"GetFieldShopAttributeValueList",
"(",
"$",
"sOrderBy",
"=",
"''",
")",
"{",
"$",
"oAttributeValueList",
"=",
"parent",
"::",
"GetFieldShopAttributeValueList",
"(",
"$",
"sOrderBy",
")",
";",
"if",
"(",
"0",
"==",
"$",
"oAttributeValueList",
... | get article attribute value list - if we are a variant and no attribute values are set, then we return the attribute values of
the parent.
@param string $sOrderBy - an sql order by string (without the order by)
@return TdbShopAttributeValueList | [
"get",
"article",
"attribute",
"value",
"list",
"-",
"if",
"we",
"are",
"a",
"variant",
"and",
"no",
"attribute",
"values",
"are",
"set",
"then",
"we",
"return",
"the",
"attribute",
"values",
"of",
"the",
"parent",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1670-L1679 |
31,978 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.GetSeoPattern | public function GetSeoPattern(&$sPaternIn)
{
//$sPaternIn = "[{PORTAL_NAME}] - [{CATEGORY_NAME}] - [{ARTICLE_NAME}]"; //default
$aPatRepl = null;
if (!empty($this->sqlData['seo_pattern'])) {
$sPaternIn = $this->sqlData['seo_pattern'];
}
$aPatRepl = array();
... | php | public function GetSeoPattern(&$sPaternIn)
{
//$sPaternIn = "[{PORTAL_NAME}] - [{CATEGORY_NAME}] - [{ARTICLE_NAME}]"; //default
$aPatRepl = null;
if (!empty($this->sqlData['seo_pattern'])) {
$sPaternIn = $this->sqlData['seo_pattern'];
}
$aPatRepl = array();
... | [
"public",
"function",
"GetSeoPattern",
"(",
"&",
"$",
"sPaternIn",
")",
"{",
"//$sPaternIn = \"[{PORTAL_NAME}] - [{CATEGORY_NAME}] - [{ARTICLE_NAME}]\"; //default",
"$",
"aPatRepl",
"=",
"null",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"sqlData",
"[",
"... | Get SEO pattern of current article.
@param string $sPaternIn SEO pattern string
@return array SEO pattern replace values | [
"Get",
"SEO",
"pattern",
"of",
"current",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1724-L1750 |
31,979 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.UpdateStock | public function UpdateStock($dNewStockValue, $bNewAmountIsDelta = false, $bUpdateSaleCounter = false, $bForceUpdate = false)
{
if ($this->HasVariants()) {
return false;
}
$oldStock = $this->getAvailableStock();
// NOTE the below comparison always has true as result (compa... | php | public function UpdateStock($dNewStockValue, $bNewAmountIsDelta = false, $bUpdateSaleCounter = false, $bForceUpdate = false)
{
if ($this->HasVariants()) {
return false;
}
$oldStock = $this->getAvailableStock();
// NOTE the below comparison always has true as result (compa... | [
"public",
"function",
"UpdateStock",
"(",
"$",
"dNewStockValue",
",",
"$",
"bNewAmountIsDelta",
"=",
"false",
",",
"$",
"bUpdateSaleCounter",
"=",
"false",
",",
"$",
"bForceUpdate",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"HasVariants",
"(",
... | the methods recalculates the total available stock for a base article based on
the articles variants. You can call this either on the primary article or on
a variant - both calls will result in an update to the parent article.
@param float $dNewStockValue - optional: you can update the stock of the current article... | [
"the",
"methods",
"recalculates",
"the",
"total",
"available",
"stock",
"for",
"a",
"base",
"article",
"based",
"on",
"the",
"articles",
"variants",
".",
"You",
"can",
"call",
"this",
"either",
"on",
"the",
"primary",
"article",
"or",
"on",
"a",
"variant",
... | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1819-L1871 |
31,980 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.CheckActivateOrDeactivate | public function CheckActivateOrDeactivate($dNewStockValue = null)
{
if (null === $dNewStockValue) {
$dNewStockValue = $this->getAvailableStock();
}
$isActive = 0;
if ($this->fieldActive) {
$isActive = 1;
}
$oStockMessage = &$this->GetFieldShopS... | php | public function CheckActivateOrDeactivate($dNewStockValue = null)
{
if (null === $dNewStockValue) {
$dNewStockValue = $this->getAvailableStock();
}
$isActive = 0;
if ($this->fieldActive) {
$isActive = 1;
}
$oStockMessage = &$this->GetFieldShopS... | [
"public",
"function",
"CheckActivateOrDeactivate",
"(",
"$",
"dNewStockValue",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"dNewStockValue",
")",
"{",
"$",
"dNewStockValue",
"=",
"$",
"this",
"->",
"getAvailableStock",
"(",
")",
";",
"}",
"$",
"i... | checks if we would deactivate the article if the stock of the article was dNewStockValue
returns 1 if the article remains active, 0 if it would be deactivated.
@param float $dNewStockValue - the stock we want to check the state of the article for
@return int | [
"checks",
"if",
"we",
"would",
"deactivate",
"the",
"article",
"if",
"the",
"stock",
"of",
"the",
"article",
"was",
"dNewStockValue",
"returns",
"1",
"if",
"the",
"article",
"remains",
"active",
"0",
"if",
"it",
"would",
"be",
"deactivated",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L1973-L1993 |
31,981 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.& | public function &GetFieldShopStockMessage()
{
$oItem = $this->GetFromInternalCache('oLookupshop_stock_message_id');
if (null === $oItem) {
$oItem = $this->getShopStockMessageDataAccess()->getStockMessage($this->fieldShopStockMessageId, $this->iLanguageId);
if (null !== $oItem... | php | public function &GetFieldShopStockMessage()
{
$oItem = $this->GetFromInternalCache('oLookupshop_stock_message_id');
if (null === $oItem) {
$oItem = $this->getShopStockMessageDataAccess()->getStockMessage($this->fieldShopStockMessageId, $this->iLanguageId);
if (null !== $oItem... | [
"public",
"function",
"&",
"GetFieldShopStockMessage",
"(",
")",
"{",
"$",
"oItem",
"=",
"$",
"this",
"->",
"GetFromInternalCache",
"(",
"'oLookupshop_stock_message_id'",
")",
";",
"if",
"(",
"null",
"===",
"$",
"oItem",
")",
"{",
"$",
"oItem",
"=",
"$",
"... | the method gets the shopstockmessage for the current article.
@return TdbShopStockMessage|null | [
"the",
"method",
"gets",
"the",
"shopstockmessage",
"for",
"the",
"current",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L2008-L2026 |
31,982 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticle.class.php | TShopArticle.getToBasketLinkOtherParameters | private function getToBasketLinkOtherParameters($aParameters = array())
{
$aExcludeParameters = TCMSSmartURLData::GetActive()->getSeoURLParameters();
foreach ($aParameters as $sKey => $sVal) {
$aExcludeParameters[] = $sKey;
}
// now add all OTHER parameters
$aOt... | php | private function getToBasketLinkOtherParameters($aParameters = array())
{
$aExcludeParameters = TCMSSmartURLData::GetActive()->getSeoURLParameters();
foreach ($aParameters as $sKey => $sVal) {
$aExcludeParameters[] = $sKey;
}
// now add all OTHER parameters
$aOt... | [
"private",
"function",
"getToBasketLinkOtherParameters",
"(",
"$",
"aParameters",
"=",
"array",
"(",
")",
")",
"{",
"$",
"aExcludeParameters",
"=",
"TCMSSmartURLData",
"::",
"GetActive",
"(",
")",
"->",
"getSeoURLParameters",
"(",
")",
";",
"foreach",
"(",
"$",
... | Get all post and get parameters an add them to parameter list.
@param array $aParameters
@return array | [
"Get",
"all",
"post",
"and",
"get",
"parameters",
"an",
"add",
"them",
"to",
"parameter",
"list",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticle.class.php#L2206-L2221 |
31,983 | PGB-LIV/php-ms | src/Writer/MgfWriter.php | MgfWriter.write | public function write(PrecursorIon $precursor)
{
if (is_null($this->fileHandle)) {
throw new \BadMethodCallException('The file handle is closed. Cannot write after close() has been called.');
}
// TODO: Validate mandatory/optional fields
fwrite($this->fileHandle,... | php | public function write(PrecursorIon $precursor)
{
if (is_null($this->fileHandle)) {
throw new \BadMethodCallException('The file handle is closed. Cannot write after close() has been called.');
}
// TODO: Validate mandatory/optional fields
fwrite($this->fileHandle,... | [
"public",
"function",
"write",
"(",
"PrecursorIon",
"$",
"precursor",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"fileHandle",
")",
")",
"{",
"throw",
"new",
"\\",
"BadMethodCallException",
"(",
"'The file handle is closed. Cannot write after close() ha... | Writes the precursor ion and it's associated fragments to the file associated with this instance
@param PrecursorIon $precursor
The precursor ion to write | [
"Writes",
"the",
"precursor",
"ion",
"and",
"it",
"s",
"associated",
"fragments",
"to",
"the",
"file",
"associated",
"with",
"this",
"instance"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Writer/MgfWriter.php#L55-L96 |
31,984 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopVariantDisplayHandler/TShopVariantDisplayHandler.class.php | TShopVariantDisplayHandler.GetInstance | public static function GetInstance($sId)
{
$oRealObject = null;
$oObject = TdbShopVariantDisplayHandler::GetNewInstance();
/** @var $oObject TdbShopVariantDisplayHandler */
if ($oObject->Load($sId)) {
$sClassName = $oObject->fieldClass;
$oRealObject = new $sCl... | php | public static function GetInstance($sId)
{
$oRealObject = null;
$oObject = TdbShopVariantDisplayHandler::GetNewInstance();
/** @var $oObject TdbShopVariantDisplayHandler */
if ($oObject->Load($sId)) {
$sClassName = $oObject->fieldClass;
$oRealObject = new $sCl... | [
"public",
"static",
"function",
"GetInstance",
"(",
"$",
"sId",
")",
"{",
"$",
"oRealObject",
"=",
"null",
";",
"$",
"oObject",
"=",
"TdbShopVariantDisplayHandler",
"::",
"GetNewInstance",
"(",
")",
";",
"/** @var $oObject TdbShopVariantDisplayHandler */",
"if",
"("... | return an instance of the handler type for the given id.
@param string $sId
@example TdbShopVariantDisplayHandler | [
"return",
"an",
"instance",
"of",
"the",
"handler",
"type",
"for",
"the",
"given",
"id",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopVariantDisplayHandler/TShopVariantDisplayHandler.class.php#L23-L35 |
31,985 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopVariantDisplayHandler/TShopVariantDisplayHandler.class.php | TShopVariantDisplayHandler.GetArticleMatchingCurrentSelection | public static function GetArticleMatchingCurrentSelection(TdbShopArticle &$oParentArticle, $bOnlyIfAPartialSelectionExists = true)
{
$aActiveSelection = TdbShopVariantDisplayHandler::GetActiveVariantTypeSelection(true);
if (!$bOnlyIfAPartialSelectionExists || (is_array($aActiveSelection) && count($a... | php | public static function GetArticleMatchingCurrentSelection(TdbShopArticle &$oParentArticle, $bOnlyIfAPartialSelectionExists = true)
{
$aActiveSelection = TdbShopVariantDisplayHandler::GetActiveVariantTypeSelection(true);
if (!$bOnlyIfAPartialSelectionExists || (is_array($aActiveSelection) && count($a... | [
"public",
"static",
"function",
"GetArticleMatchingCurrentSelection",
"(",
"TdbShopArticle",
"&",
"$",
"oParentArticle",
",",
"$",
"bOnlyIfAPartialSelectionExists",
"=",
"true",
")",
"{",
"$",
"aActiveSelection",
"=",
"TdbShopVariantDisplayHandler",
"::",
"GetActiveVariantT... | return the first article matchin the current selection given a parent article
this can be usefull if a user has selected color but not size for a clothing article and you
want to display the images of the color variant.
@param TdbShopArticle $oParentArticle
@param bool $bOnlyIfAPartialSelectionExists - set t... | [
"return",
"the",
"first",
"article",
"matchin",
"the",
"current",
"selection",
"given",
"a",
"parent",
"article",
"this",
"can",
"be",
"usefull",
"if",
"a",
"user",
"has",
"selected",
"color",
"but",
"not",
"size",
"for",
"a",
"clothing",
"article",
"and",
... | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopVariantDisplayHandler/TShopVariantDisplayHandler.class.php#L127-L135 |
31,986 | PGB-LIV/php-ms | src/Search/Parameters/MsgfPlusSearchParameters.php | MsgfPlusSearchParameters.createModificationFile | public static function createModificationFile(array $modifications, $numMods = 2)
{
// TODO:
// All array must be this class
// NumMods must be uint
$data = 'NumMods=' . $numMods . PHP_EOL;
foreach ($modifications as $modification) {
$entry = $modification->getMo... | php | public static function createModificationFile(array $modifications, $numMods = 2)
{
// TODO:
// All array must be this class
// NumMods must be uint
$data = 'NumMods=' . $numMods . PHP_EOL;
foreach ($modifications as $modification) {
$entry = $modification->getMo... | [
"public",
"static",
"function",
"createModificationFile",
"(",
"array",
"$",
"modifications",
",",
"$",
"numMods",
"=",
"2",
")",
"{",
"// TODO:",
"// All array must be this class",
"// NumMods must be uint",
"$",
"data",
"=",
"'NumMods='",
".",
"$",
"numMods",
".",... | Creates a modification file from an array of modifications
@param Modification[] $modifications
@param number $numMods
Max number of modifications to search per peptide
@return string File path the newly created modification file | [
"Creates",
"a",
"modification",
"file",
"from",
"an",
"array",
"of",
"modifications"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Search/Parameters/MsgfPlusSearchParameters.php#L455-L499 |
31,987 | sylingd/Yesf | src/Config/Adapter/QConf.php | QConf.getKey | protected function getKey($key) {
$key = '/' . $this->environment . '.' . $key;
$key = str_replace('.', '/', $key);
if (!empty($this->appName)) {
$key = '/' . $this->appName . $key;
}
return $key;
} | php | protected function getKey($key) {
$key = '/' . $this->environment . '.' . $key;
$key = str_replace('.', '/', $key);
if (!empty($this->appName)) {
$key = '/' . $this->appName . $key;
}
return $key;
} | [
"protected",
"function",
"getKey",
"(",
"$",
"key",
")",
"{",
"$",
"key",
"=",
"'/'",
".",
"$",
"this",
"->",
"environment",
".",
"'.'",
".",
"$",
"key",
";",
"$",
"key",
"=",
"str_replace",
"(",
"'.'",
",",
"'/'",
",",
"$",
"key",
")",
";",
"i... | Get real key
@access protected
@param string $key original key
@return string | [
"Get",
"real",
"key"
] | 0fc2b42903bb3519c54c596270c890c826aeb1df | https://github.com/sylingd/Yesf/blob/0fc2b42903bb3519c54c596270c890c826aeb1df/src/Config/Adapter/QConf.php#L33-L40 |
31,988 | belgattitude/soluble-dbwrapper | src/Soluble/DbWrapper/Result/Resultset.php | Resultset.append | public function append(array $row): void
{
if ($this->returnType === self::TYPE_ARRAYOBJECT) {
$this->storage[] = new ArrayObject($row);
} else {
$this->storage[] = $row;
}
++$this->count;
} | php | public function append(array $row): void
{
if ($this->returnType === self::TYPE_ARRAYOBJECT) {
$this->storage[] = new ArrayObject($row);
} else {
$this->storage[] = $row;
}
++$this->count;
} | [
"public",
"function",
"append",
"(",
"array",
"$",
"row",
")",
":",
"void",
"{",
"if",
"(",
"$",
"this",
"->",
"returnType",
"===",
"self",
"::",
"TYPE_ARRAYOBJECT",
")",
"{",
"$",
"this",
"->",
"storage",
"[",
"]",
"=",
"new",
"ArrayObject",
"(",
"$... | Append a row to the end of resultset.
@param array $row an associative array | [
"Append",
"a",
"row",
"to",
"the",
"end",
"of",
"resultset",
"."
] | d2ba7b8855521613178246d2b66d8a7287706747 | https://github.com/belgattitude/soluble-dbwrapper/blob/d2ba7b8855521613178246d2b66d8a7287706747/src/Soluble/DbWrapper/Result/Resultset.php#L124-L132 |
31,989 | belgattitude/soluble-dbwrapper | src/Soluble/DbWrapper/Result/Resultset.php | Resultset.getArrayObject | public function getArrayObject(): ArrayObject
{
if ($this->returnType === self::TYPE_ARRAY) {
return new ArrayObject($this->storage);
} else {
/** @var ArrayObject $storageAsArrayObject to silent static code analyzers */
$storageAsArrayObject = $this->storage;
... | php | public function getArrayObject(): ArrayObject
{
if ($this->returnType === self::TYPE_ARRAY) {
return new ArrayObject($this->storage);
} else {
/** @var ArrayObject $storageAsArrayObject to silent static code analyzers */
$storageAsArrayObject = $this->storage;
... | [
"public",
"function",
"getArrayObject",
"(",
")",
":",
"ArrayObject",
"{",
"if",
"(",
"$",
"this",
"->",
"returnType",
"===",
"self",
"::",
"TYPE_ARRAY",
")",
"{",
"return",
"new",
"ArrayObject",
"(",
"$",
"this",
"->",
"storage",
")",
";",
"}",
"else",
... | Return underlying stored resultset as ArrayObject.
Depending on the $returnType Resultset::TYPE_ARRAY|Resultset::TYPE_ARRAYOBJECT you can modify
the internal storage
@return ArrayObject | [
"Return",
"underlying",
"stored",
"resultset",
"as",
"ArrayObject",
"."
] | d2ba7b8855521613178246d2b66d8a7287706747 | https://github.com/belgattitude/soluble-dbwrapper/blob/d2ba7b8855521613178246d2b66d8a7287706747/src/Soluble/DbWrapper/Result/Resultset.php#L187-L197 |
31,990 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Impl/IpnNotificationParser.php | IpnNotificationParser.parseSnsMessage | public static function parseSnsMessage(Message $snsMsg)
{
// Create the message and extract the information we need
$ipnMsg = new Message($snsMsg->getMandatoryField("Message"));
self::_addMetadataToIpnMessage(
$ipnMsg,
$snsMsg->getNotificationMetadata()
);
... | php | public static function parseSnsMessage(Message $snsMsg)
{
// Create the message and extract the information we need
$ipnMsg = new Message($snsMsg->getMandatoryField("Message"));
self::_addMetadataToIpnMessage(
$ipnMsg,
$snsMsg->getNotificationMetadata()
);
... | [
"public",
"static",
"function",
"parseSnsMessage",
"(",
"Message",
"$",
"snsMsg",
")",
"{",
"// Create the message and extract the information we need",
"$",
"ipnMsg",
"=",
"new",
"Message",
"(",
"$",
"snsMsg",
"->",
"getMandatoryField",
"(",
"\"Message\"",
")",
")",
... | Converts a an sns message into a
ipn notification object
@param Messsage $snsMsg snsMessage
@throws OffAmazonPaymentsNotifications if there is an error
@return Message ipn message | [
"Converts",
"a",
"an",
"sns",
"message",
"into",
"a",
"ipn",
"notification",
"object"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Impl/IpnNotificationParser.php#L37-L46 |
31,991 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Impl/IpnNotificationParser.php | IpnNotificationParser._addMetadataToIpnMessage | private static function _addMetadataToIpnMessage (
Message $ipnMsg,
OffAmazonPaymentsNotifications_NotificationMetadata $messageMetadata = null
) {
$ipnMetadata
= new OffAmazonPaymentsNotifications_Model_IPNNotificationMetadata(
$ipnMsg,
$messageMe... | php | private static function _addMetadataToIpnMessage (
Message $ipnMsg,
OffAmazonPaymentsNotifications_NotificationMetadata $messageMetadata = null
) {
$ipnMetadata
= new OffAmazonPaymentsNotifications_Model_IPNNotificationMetadata(
$ipnMsg,
$messageMe... | [
"private",
"static",
"function",
"_addMetadataToIpnMessage",
"(",
"Message",
"$",
"ipnMsg",
",",
"OffAmazonPaymentsNotifications_NotificationMetadata",
"$",
"messageMetadata",
"=",
"null",
")",
"{",
"$",
"ipnMetadata",
"=",
"new",
"OffAmazonPaymentsNotifications_Model_IPNNoti... | Create the metadata object for the ipn message and attach
to the object instance
@param Message $ipnMsg ipn message
@param OffAmazonPaymentsNotifications_NotificationMetadata $messageMetadata parent notification
@return void | [
"Create",
"the",
"metadata",
"object",
"for",
"the",
"ipn",
"message",
"and",
"attach",
"to",
"the",
"object",
"instance"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Impl/IpnNotificationParser.php#L57-L67 |
31,992 | edmondscommerce/doctrine-static-meta | src/Builder/Builder.php | Builder.finaliseBuild | public function finaliseBuild(): self
{
$this->dataTransferObjectsForAllEntitiesAction->run();
$this->entityFormatter->run();
$this->copyPhpstormMeta->run();
return $this;
} | php | public function finaliseBuild(): self
{
$this->dataTransferObjectsForAllEntitiesAction->run();
$this->entityFormatter->run();
$this->copyPhpstormMeta->run();
return $this;
} | [
"public",
"function",
"finaliseBuild",
"(",
")",
":",
"self",
"{",
"$",
"this",
"->",
"dataTransferObjectsForAllEntitiesAction",
"->",
"run",
"(",
")",
";",
"$",
"this",
"->",
"entityFormatter",
"->",
"run",
"(",
")",
";",
"$",
"this",
"->",
"copyPhpstormMet... | Finalise build - run various steps to wrap up the build and tidy up the codebase
@return Builder | [
"Finalise",
"build",
"-",
"run",
"various",
"steps",
"to",
"wrap",
"up",
"the",
"build",
"and",
"tidy",
"up",
"the",
"codebase"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Builder/Builder.php#L182-L189 |
31,993 | Firesphere/silverstripe-bootstrapmfa | src/Extensions/MemberExtension.php | MemberExtension.onBeforeWrite | public function onBeforeWrite()
{
if (!$this->owner->MFAEnabled && SiteConfig::current_site_config()->ForceMFA) {
$this->owner->MFAEnabled = true;
$this->owner->updateMFA = true;
}
if (!$this->owner->BackupCodeSalt || $this->owner->updateMFA) {
$algorithm ... | php | public function onBeforeWrite()
{
if (!$this->owner->MFAEnabled && SiteConfig::current_site_config()->ForceMFA) {
$this->owner->MFAEnabled = true;
$this->owner->updateMFA = true;
}
if (!$this->owner->BackupCodeSalt || $this->owner->updateMFA) {
$algorithm ... | [
"public",
"function",
"onBeforeWrite",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"owner",
"->",
"MFAEnabled",
"&&",
"SiteConfig",
"::",
"current_site_config",
"(",
")",
"->",
"ForceMFA",
")",
"{",
"$",
"this",
"->",
"owner",
"->",
"MFAEnabled",
"... | Force enable MFA on the member if needed | [
"Force",
"enable",
"MFA",
"on",
"the",
"member",
"if",
"needed"
] | 8d2d6c6f2f918c8fa157da91550b897816495a4b | https://github.com/Firesphere/silverstripe-bootstrapmfa/blob/8d2d6c6f2f918c8fa157da91550b897816495a4b/src/Extensions/MemberExtension.php#L95-L109 |
31,994 | Firesphere/silverstripe-bootstrapmfa | src/Extensions/MemberExtension.php | MemberExtension.isInGracePeriod | public function isInGracePeriod()
{
/** @var Member|MemberExtension $member */
$member = $this->owner;
// If MFA is enabled on the member, we're always using it
if ($member->MFAEnabled) {
return false;
}
/** @var SiteConfig|SiteConfigExtension $config */... | php | public function isInGracePeriod()
{
/** @var Member|MemberExtension $member */
$member = $this->owner;
// If MFA is enabled on the member, we're always using it
if ($member->MFAEnabled) {
return false;
}
/** @var SiteConfig|SiteConfigExtension $config */... | [
"public",
"function",
"isInGracePeriod",
"(",
")",
"{",
"/** @var Member|MemberExtension $member */",
"$",
"member",
"=",
"$",
"this",
"->",
"owner",
";",
"// If MFA is enabled on the member, we're always using it",
"if",
"(",
"$",
"member",
"->",
"MFAEnabled",
")",
"{"... | Check if a member is in grace period based on Created, date or enforcement
@return bool
@throws \Exception | [
"Check",
"if",
"a",
"member",
"is",
"in",
"grace",
"period",
"based",
"on",
"Created",
"date",
"or",
"enforcement"
] | 8d2d6c6f2f918c8fa157da91550b897816495a4b | https://github.com/Firesphere/silverstripe-bootstrapmfa/blob/8d2d6c6f2f918c8fa157da91550b897816495a4b/src/Extensions/MemberExtension.php#L132-L160 |
31,995 | PGB-LIV/php-ms | src/Core/AminoAcidMono.php | AminoAcidMono.getMonoisotopicMass | public static function getMonoisotopicMass($acid)
{
$value = @constant('pgb_liv\php_ms\Core\AminoAcidMono::' . $acid);
if (! is_null($value)) {
return $value;
}
if (strlen($acid) > 1) {
throw new \InvalidArgumentException('Value must be a single amino acid. ... | php | public static function getMonoisotopicMass($acid)
{
$value = @constant('pgb_liv\php_ms\Core\AminoAcidMono::' . $acid);
if (! is_null($value)) {
return $value;
}
if (strlen($acid) > 1) {
throw new \InvalidArgumentException('Value must be a single amino acid. ... | [
"public",
"static",
"function",
"getMonoisotopicMass",
"(",
"$",
"acid",
")",
"{",
"$",
"value",
"=",
"@",
"constant",
"(",
"'pgb_liv\\php_ms\\Core\\AminoAcidMono::'",
".",
"$",
"acid",
")",
";",
"if",
"(",
"!",
"is_null",
"(",
"$",
"value",
")",
")",
"{",... | Gets the monoisotopic mass for the provided amino acid.
@param string $acid
Amino acid
@throws \InvalidArgumentException If acid is not a single character or valid amino acid
@return float Monoisotopic mass | [
"Gets",
"the",
"monoisotopic",
"mass",
"for",
"the",
"provided",
"amino",
"acid",
"."
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Core/AminoAcidMono.php#L77-L90 |
31,996 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerPayPalExpress.class.php | TShopPaymentHandlerPayPalExpress.GetUserDataFromPayPalData | protected function GetUserDataFromPayPalData(&$aBilling, &$aShipping)
{
$sCountryIsoCode = 'de';
if (array_key_exists('SHIPTOCOUNTRYCODE', $this->aCheckoutDetails)) {
$sCountryIsoCode = $this->aCheckoutDetails['SHIPTOCOUNTRYCODE'];
}
$oShippingCountry = TdbDataCountry::G... | php | protected function GetUserDataFromPayPalData(&$aBilling, &$aShipping)
{
$sCountryIsoCode = 'de';
if (array_key_exists('SHIPTOCOUNTRYCODE', $this->aCheckoutDetails)) {
$sCountryIsoCode = $this->aCheckoutDetails['SHIPTOCOUNTRYCODE'];
}
$oShippingCountry = TdbDataCountry::G... | [
"protected",
"function",
"GetUserDataFromPayPalData",
"(",
"&",
"$",
"aBilling",
",",
"&",
"$",
"aShipping",
")",
"{",
"$",
"sCountryIsoCode",
"=",
"'de'",
";",
"if",
"(",
"array_key_exists",
"(",
"'SHIPTOCOUNTRYCODE'",
",",
"$",
"this",
"->",
"aCheckoutDetails"... | updates teh aBilling and aShipping arrays with the user billing and shipping
info returned from paypal.
@param array $aBilling
@param array $aShipping | [
"updates",
"teh",
"aBilling",
"and",
"aShipping",
"arrays",
"with",
"the",
"user",
"billing",
"and",
"shipping",
"info",
"returned",
"from",
"paypal",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerPayPalExpress.class.php#L116-L144 |
31,997 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/CLIExample.php | CLIExample.callStepAndCheckForException | protected function callStepAndCheckForException($stepName, $args = array())
{
try {
$response = call_user_func_array(array($this->exampleClass, $stepName), $args);
} catch (OffAmazonPaymentsService_Exception $ex) {
$this->printExceptionToCLI($ex, $stepName);
throw... | php | protected function callStepAndCheckForException($stepName, $args = array())
{
try {
$response = call_user_func_array(array($this->exampleClass, $stepName), $args);
} catch (OffAmazonPaymentsService_Exception $ex) {
$this->printExceptionToCLI($ex, $stepName);
throw... | [
"protected",
"function",
"callStepAndCheckForException",
"(",
"$",
"stepName",
",",
"$",
"args",
"=",
"array",
"(",
")",
")",
"{",
"try",
"{",
"$",
"response",
"=",
"call_user_func_array",
"(",
"array",
"(",
"$",
"this",
"->",
"exampleClass",
",",
"$",
"st... | Call the desired setp and check that it does not throw an
exception
@param string $stepName the name of the step to call on the example class
@return mixed the response object from the step, or an exception if thrown | [
"Call",
"the",
"desired",
"setp",
"and",
"check",
"that",
"it",
"does",
"not",
"throw",
"an",
"exception"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/CLIExample.php#L37-L47 |
31,998 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/CLIExample.php | CLIExample.printExceptionToCLI | protected function printExceptionToCLI(
OffAmazonPaymentsService_Exception $ex,
$stepName
) {
print "Error caught executing step " . $stepName . PHP_EOL;
print "Caught Exception: " . $ex->getMessage() . PHP_EOL;
print "Response Status Code: " . $ex->getStatusCode() . PHP_EOL;... | php | protected function printExceptionToCLI(
OffAmazonPaymentsService_Exception $ex,
$stepName
) {
print "Error caught executing step " . $stepName . PHP_EOL;
print "Caught Exception: " . $ex->getMessage() . PHP_EOL;
print "Response Status Code: " . $ex->getStatusCode() . PHP_EOL;... | [
"protected",
"function",
"printExceptionToCLI",
"(",
"OffAmazonPaymentsService_Exception",
"$",
"ex",
",",
"$",
"stepName",
")",
"{",
"print",
"\"Error caught executing step \"",
".",
"$",
"stepName",
".",
"PHP_EOL",
";",
"print",
"\"Caught Exception: \"",
".",
"$",
"... | Output information about the raised exception to standard output
@param OffAmazonPaymentsService_Exception $ex exception
@param string $stepName step where ex occured
@return no value | [
"Output",
"information",
"about",
"the",
"raised",
"exception",
"to",
"standard",
"output"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/CLIExample.php#L57-L69 |
31,999 | chameleon-system/chameleon-shop | src/ShopListFilterBundle/objects/db/ListfilterItems/TPkgShopListfilterItemVariantDynamic.class.php | TPkgShopListfilterItemVariantDynamic.PostLoadHook | protected function PostLoadHook()
{
parent::PostLoadHook();
$oListFilterItemType = $this->GetFieldPkgShopListfilterItemType();
if ($oListFilterItemType) {
$this->sVariantTypeIdentifier = $this->fieldVariantIdentifier;
}
} | php | protected function PostLoadHook()
{
parent::PostLoadHook();
$oListFilterItemType = $this->GetFieldPkgShopListfilterItemType();
if ($oListFilterItemType) {
$this->sVariantTypeIdentifier = $this->fieldVariantIdentifier;
}
} | [
"protected",
"function",
"PostLoadHook",
"(",
")",
"{",
"parent",
"::",
"PostLoadHook",
"(",
")",
";",
"$",
"oListFilterItemType",
"=",
"$",
"this",
"->",
"GetFieldPkgShopListfilterItemType",
"(",
")",
";",
"if",
"(",
"$",
"oListFilterItemType",
")",
"{",
"$",... | Get variant system name and set it to sVariantTypeIdentifier. | [
"Get",
"variant",
"system",
"name",
"and",
"set",
"it",
"to",
"sVariantTypeIdentifier",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopListFilterBundle/objects/db/ListfilterItems/TPkgShopListfilterItemVariantDynamic.class.php#L24-L31 |
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.