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
partition
stringclasses
1 value
chameleon-system/chameleon-shop
src/ShopBundle/objects/db/TShopOrderStep/TShopStepUserDataV2EndPoint.class.php
TShopStepUserDataV2EndPoint.InitUserData
protected function InitUserData() { $userData = $this->getInputFilterUtil()->getFilteredPostInput('aUser'); if (null === $userData) { $oUser = self::getExtranetUserProvider()->getActiveUser(); $this->SetUserData($oUser->sqlData); } else { $this->SetUserData($userData); $this->bUserDataSubmission = true; } }
php
protected function InitUserData() { $userData = $this->getInputFilterUtil()->getFilteredPostInput('aUser'); if (null === $userData) { $oUser = self::getExtranetUserProvider()->getActiveUser(); $this->SetUserData($oUser->sqlData); } else { $this->SetUserData($userData); $this->bUserDataSubmission = true; } }
[ "protected", "function", "InitUserData", "(", ")", "{", "$", "userData", "=", "$", "this", "->", "getInputFilterUtil", "(", ")", "->", "getFilteredPostInput", "(", "'aUser'", ")", ";", "if", "(", "null", "===", "$", "userData", ")", "{", "$", "oUser", "=...
initialize user data and set the state of UserDataSubmission to true if submitted if no data was submitted the user data will be loaded by the data of the user object.
[ "initialize", "user", "data", "and", "set", "the", "state", "of", "UserDataSubmission", "to", "true", "if", "submitted", "if", "no", "data", "was", "submitted", "the", "user", "data", "will", "be", "loaded", "by", "the", "data", "of", "the", "user", "objec...
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopOrderStep/TShopStepUserDataV2EndPoint.class.php#L186-L196
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/db/TShopOrderStep/TShopStepUserDataV2EndPoint.class.php
TShopStepUserDataV2EndPoint.InitShippingAddress
protected function InitShippingAddress() { $inputFilterUtil = $this->getInputFilterUtil(); $shippingAddressData = $inputFilterUtil->getFilteredPostInput(TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING); if (null !== $shippingAddressData) { $this->SetShippingAddressData($shippingAddressData); $this->bUserDataSubmission = true; } else { $billingAddressData = $inputFilterUtil->getFilteredPostInput(TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING); if (null !== $billingAddressData && TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING == $this->AddressUsedAsPrimaryAddress()) { $this->SetShippingAddressData($this->GetBillingAddressData()); } else { $oUser = self::getExtranetUserProvider()->getActiveUser(); $oShipping = $oUser->GetShippingAddress(); $aShipping = array(); if ($oShipping) { $aShipping = $oShipping->sqlData; } $this->SetShippingAddressData($aShipping); } } }
php
protected function InitShippingAddress() { $inputFilterUtil = $this->getInputFilterUtil(); $shippingAddressData = $inputFilterUtil->getFilteredPostInput(TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING); if (null !== $shippingAddressData) { $this->SetShippingAddressData($shippingAddressData); $this->bUserDataSubmission = true; } else { $billingAddressData = $inputFilterUtil->getFilteredPostInput(TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING); if (null !== $billingAddressData && TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING == $this->AddressUsedAsPrimaryAddress()) { $this->SetShippingAddressData($this->GetBillingAddressData()); } else { $oUser = self::getExtranetUserProvider()->getActiveUser(); $oShipping = $oUser->GetShippingAddress(); $aShipping = array(); if ($oShipping) { $aShipping = $oShipping->sqlData; } $this->SetShippingAddressData($aShipping); } } }
[ "protected", "function", "InitShippingAddress", "(", ")", "{", "$", "inputFilterUtil", "=", "$", "this", "->", "getInputFilterUtil", "(", ")", ";", "$", "shippingAddressData", "=", "$", "inputFilterUtil", "->", "getFilteredPostInput", "(", "TdbDataExtranetUserAddress"...
initialize shipping address data and set the state of UserDataSubmission to true if data was submitted if no data was submitted the shipping address data will be loaded by shipping address of user.
[ "initialize", "shipping", "address", "data", "and", "set", "the", "state", "of", "UserDataSubmission", "to", "true", "if", "data", "was", "submitted", "if", "no", "data", "was", "submitted", "the", "shipping", "address", "data", "will", "be", "loaded", "by", ...
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopOrderStep/TShopStepUserDataV2EndPoint.class.php#L202-L223
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/db/TShopOrderStep/TShopStepUserDataV2EndPoint.class.php
TShopStepUserDataV2EndPoint.InitBillingAddress
protected function InitBillingAddress() { $inputFilterUtil = $this->getInputFilterUtil(); $billingAddressData = $inputFilterUtil->getFilteredPostInput(TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING); if (null !== $billingAddressData) { $this->SetBillingAddressData($billingAddressData); $this->bUserDataSubmission = true; } else { $shippingAddressData = $inputFilterUtil->getFilteredPostInput(TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING); if (null !== $shippingAddressData && TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING == $this->AddressUsedAsPrimaryAddress()) { $this->SetBillingAddressData($this->GetShippingAddressData()); } else { $oUser = self::getExtranetUserProvider()->getActiveUser(); $oBilling = $oUser->GetBillingAddress(); $aBilling = array(); if ($oBilling) { $aBilling = $oBilling->sqlData; } $this->SetBillingAddressData($aBilling); } } }
php
protected function InitBillingAddress() { $inputFilterUtil = $this->getInputFilterUtil(); $billingAddressData = $inputFilterUtil->getFilteredPostInput(TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING); if (null !== $billingAddressData) { $this->SetBillingAddressData($billingAddressData); $this->bUserDataSubmission = true; } else { $shippingAddressData = $inputFilterUtil->getFilteredPostInput(TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING); if (null !== $shippingAddressData && TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING == $this->AddressUsedAsPrimaryAddress()) { $this->SetBillingAddressData($this->GetShippingAddressData()); } else { $oUser = self::getExtranetUserProvider()->getActiveUser(); $oBilling = $oUser->GetBillingAddress(); $aBilling = array(); if ($oBilling) { $aBilling = $oBilling->sqlData; } $this->SetBillingAddressData($aBilling); } } }
[ "protected", "function", "InitBillingAddress", "(", ")", "{", "$", "inputFilterUtil", "=", "$", "this", "->", "getInputFilterUtil", "(", ")", ";", "$", "billingAddressData", "=", "$", "inputFilterUtil", "->", "getFilteredPostInput", "(", "TdbDataExtranetUserAddress", ...
initialize billing address data and set the state of UserDataSubmission to true if data was submitted if no data was submitted the billing address data will be loaded by billing address of user.
[ "initialize", "billing", "address", "data", "and", "set", "the", "state", "of", "UserDataSubmission", "to", "true", "if", "data", "was", "submitted", "if", "no", "data", "was", "submitted", "the", "billing", "address", "data", "will", "be", "loaded", "by", "...
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopOrderStep/TShopStepUserDataV2EndPoint.class.php#L229-L250
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/db/TShopOrderStep/TShopStepUserDataV2EndPoint.class.php
TShopStepUserDataV2EndPoint.ValidateUser
protected function ValidateUser($aUserData) { $bValid = false; $oActiveUser = self::getExtranetUserProvider()->getActiveUser(); if ($oActiveUser && is_array($oActiveUser->sqlData) && array_key_exists('customer_number', $oActiveUser->sqlData)) { $aUserData['customer_number'] = $oActiveUser->sqlData['customer_number']; } $oUser = TdbDataExtranetUser::GetNewInstance($aUserData); $bValid = $oUser->ValidateData(); if ('register' == TShopStepUserDataV2::GetUserMode()) { $bValid = ($oUser->ValidateLoginData($aUserData) && $bValid); } elseif ('guest' == TShopStepUserDataV2::GetUserMode()) { if (TdbDataExtranet::GetInstance()->fieldLoginIsEmail) { $bValid = ($this->validateUserEMail($aUserData['name']) && $bValid); } else { $bValid = ($this->validateUserEMail($aUserData['email']) && $bValid); } } return $bValid; }
php
protected function ValidateUser($aUserData) { $bValid = false; $oActiveUser = self::getExtranetUserProvider()->getActiveUser(); if ($oActiveUser && is_array($oActiveUser->sqlData) && array_key_exists('customer_number', $oActiveUser->sqlData)) { $aUserData['customer_number'] = $oActiveUser->sqlData['customer_number']; } $oUser = TdbDataExtranetUser::GetNewInstance($aUserData); $bValid = $oUser->ValidateData(); if ('register' == TShopStepUserDataV2::GetUserMode()) { $bValid = ($oUser->ValidateLoginData($aUserData) && $bValid); } elseif ('guest' == TShopStepUserDataV2::GetUserMode()) { if (TdbDataExtranet::GetInstance()->fieldLoginIsEmail) { $bValid = ($this->validateUserEMail($aUserData['name']) && $bValid); } else { $bValid = ($this->validateUserEMail($aUserData['email']) && $bValid); } } return $bValid; }
[ "protected", "function", "ValidateUser", "(", "$", "aUserData", ")", "{", "$", "bValid", "=", "false", ";", "$", "oActiveUser", "=", "self", "::", "getExtranetUserProvider", "(", ")", "->", "getActiveUser", "(", ")", ";", "if", "(", "$", "oActiveUser", "&&...
validate the user base data. registration request will also validate user name and password. @param array $aUserData @return bool
[ "validate", "the", "user", "base", "data", ".", "registration", "request", "will", "also", "validate", "user", "name", "and", "password", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopOrderStep/TShopStepUserDataV2EndPoint.class.php#L480-L502
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/db/TShopOrderStep/TShopStepUserDataV2EndPoint.class.php
TShopStepUserDataV2EndPoint.ValidateShippingAddress
protected function ValidateShippingAddress($aAddress) { $oAddress = TdbDataExtranetUserAddress::GetNewInstance($aAddress); return $oAddress->ValidateData(TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING); }
php
protected function ValidateShippingAddress($aAddress) { $oAddress = TdbDataExtranetUserAddress::GetNewInstance($aAddress); return $oAddress->ValidateData(TdbDataExtranetUserAddress::FORM_DATA_NAME_SHIPPING); }
[ "protected", "function", "ValidateShippingAddress", "(", "$", "aAddress", ")", "{", "$", "oAddress", "=", "TdbDataExtranetUserAddress", "::", "GetNewInstance", "(", "$", "aAddress", ")", ";", "return", "$", "oAddress", "->", "ValidateData", "(", "TdbDataExtranetUser...
validate shipping address. @param array $aAddress @return bool
[ "validate", "shipping", "address", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopOrderStep/TShopStepUserDataV2EndPoint.class.php#L523-L528
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/db/TShopOrderStep/TShopStepUserDataV2EndPoint.class.php
TShopStepUserDataV2EndPoint.GetShipToBillingAddress
protected function GetShipToBillingAddress() { if (array_key_exists('bShipToBillingAddress', $this->aUserData)) { return $this->aUserData['bShipToBillingAddress']; } if (array_key_exists('shopstepuserdata_bShipToBillingAddress', $_SESSION)) { return $_SESSION['shopstepuserdata_bShipToBillingAddress']; } else { $oUser = self::getExtranetUserProvider()->getActiveUser(); return $oUser->ShipToBillingAddress() ? (1) : (0); } }
php
protected function GetShipToBillingAddress() { if (array_key_exists('bShipToBillingAddress', $this->aUserData)) { return $this->aUserData['bShipToBillingAddress']; } if (array_key_exists('shopstepuserdata_bShipToBillingAddress', $_SESSION)) { return $_SESSION['shopstepuserdata_bShipToBillingAddress']; } else { $oUser = self::getExtranetUserProvider()->getActiveUser(); return $oUser->ShipToBillingAddress() ? (1) : (0); } }
[ "protected", "function", "GetShipToBillingAddress", "(", ")", "{", "if", "(", "array_key_exists", "(", "'bShipToBillingAddress'", ",", "$", "this", "->", "aUserData", ")", ")", "{", "return", "$", "this", "->", "aUserData", "[", "'bShipToBillingAddress'", "]", "...
return 1 if the user wants to ship to the billing address, else 0. @return int
[ "return", "1", "if", "the", "user", "wants", "to", "ship", "to", "the", "billing", "address", "else", "0", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopOrderStep/TShopStepUserDataV2EndPoint.class.php#L648-L660
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/db/TShopOrderStep/TShopStepUserDataV2EndPoint.class.php
TShopStepUserDataV2EndPoint.GetShippingAddressData
protected function GetShippingAddressData($sReturnThisParameterOnly = null) { $aReturnVal = false; if (array_key_exists('aShipping', $this->aUserData)) { $aAddress = $this->aUserData['aShipping']; if (array_key_exists('id', $aAddress) && !array_key_exists('selectedAddressId', $aAddress)) { $aAddress['selectedAddressId'] = $aAddress['id']; } $oActiveUser = self::getExtranetUserProvider()->getActiveUser(); if ($oActiveUser && !empty($oActiveUser->id)) { $aAddress['data_extranet_user_id'] = $oActiveUser->id; } $aCheckboxFields = $this->GetShippingAddressCheckboxFields(); foreach ($aCheckboxFields as $sFieldName) { if (!array_key_exists($sFieldName, $aAddress)) { $aAddress[$sFieldName] = '0'; } } if (!is_null($sReturnThisParameterOnly)) { if (array_key_exists($sReturnThisParameterOnly, $aAddress)) { $aReturnVal = $aAddress[$sReturnThisParameterOnly]; } } else { $aReturnVal = $aAddress; } } return $aReturnVal; }
php
protected function GetShippingAddressData($sReturnThisParameterOnly = null) { $aReturnVal = false; if (array_key_exists('aShipping', $this->aUserData)) { $aAddress = $this->aUserData['aShipping']; if (array_key_exists('id', $aAddress) && !array_key_exists('selectedAddressId', $aAddress)) { $aAddress['selectedAddressId'] = $aAddress['id']; } $oActiveUser = self::getExtranetUserProvider()->getActiveUser(); if ($oActiveUser && !empty($oActiveUser->id)) { $aAddress['data_extranet_user_id'] = $oActiveUser->id; } $aCheckboxFields = $this->GetShippingAddressCheckboxFields(); foreach ($aCheckboxFields as $sFieldName) { if (!array_key_exists($sFieldName, $aAddress)) { $aAddress[$sFieldName] = '0'; } } if (!is_null($sReturnThisParameterOnly)) { if (array_key_exists($sReturnThisParameterOnly, $aAddress)) { $aReturnVal = $aAddress[$sReturnThisParameterOnly]; } } else { $aReturnVal = $aAddress; } } return $aReturnVal; }
[ "protected", "function", "GetShippingAddressData", "(", "$", "sReturnThisParameterOnly", "=", "null", ")", "{", "$", "aReturnVal", "=", "false", ";", "if", "(", "array_key_exists", "(", "'aShipping'", ",", "$", "this", "->", "aUserData", ")", ")", "{", "$", ...
return shipping address data from user post. @param string $sReturnThisParameterOnly - if set, then only that field of the address is returned. if that field is not found, we return false @return array|bool
[ "return", "shipping", "address", "data", "from", "user", "post", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopOrderStep/TShopStepUserDataV2EndPoint.class.php#L750-L779
train
edmondscommerce/doctrine-static-meta
src/CodeGeneration/Generator/Field/FieldGenerator.php
FieldGenerator.generateField
public function generateField( string $fieldFqn, string $fieldType, ?string $phpType = null, $defaultValue = null, bool $isUnique = false ): string { $this->validateArguments($fieldFqn, $fieldType, $phpType); $this->setupClassProperties($fieldFqn, $fieldType, $phpType, $defaultValue, $isUnique); $this->pathHelper->ensurePathExists($this->fieldsPath); $this->pathHelper->ensurePathExists($this->fieldsInterfacePath); $this->assertFileDoesNotExist($this->getTraitPath(), 'Trait'); $this->assertFileDoesNotExist($this->getInterfacePath(), 'Interface'); if (true === $this->isArchetype) { return $this->createFieldFromArchetype(); } return $this->createDbalField(); }
php
public function generateField( string $fieldFqn, string $fieldType, ?string $phpType = null, $defaultValue = null, bool $isUnique = false ): string { $this->validateArguments($fieldFqn, $fieldType, $phpType); $this->setupClassProperties($fieldFqn, $fieldType, $phpType, $defaultValue, $isUnique); $this->pathHelper->ensurePathExists($this->fieldsPath); $this->pathHelper->ensurePathExists($this->fieldsInterfacePath); $this->assertFileDoesNotExist($this->getTraitPath(), 'Trait'); $this->assertFileDoesNotExist($this->getInterfacePath(), 'Interface'); if (true === $this->isArchetype) { return $this->createFieldFromArchetype(); } return $this->createDbalField(); }
[ "public", "function", "generateField", "(", "string", "$", "fieldFqn", ",", "string", "$", "fieldType", ",", "?", "string", "$", "phpType", "=", "null", ",", "$", "defaultValue", "=", "null", ",", "bool", "$", "isUnique", "=", "false", ")", ":", "string"...
Generate a new Field based on a property name and Doctrine Type or Archetype field FQN @see MappingHelper::ALL_DBAL_TYPES for the full list of Dbal Types @param string $fieldFqn @param string $fieldType @param null|string $phpType @param mixed $defaultValue @param bool $isUnique @return string - The Fully Qualified Name of the generated Field Trait @throws DoctrineStaticMetaException @throws \ReflectionException @SuppressWarnings(PHPMD.StaticAccess) @SuppressWarnings(PHPMD.BooleanArgumentFlag)
[ "Generate", "a", "new", "Field", "based", "on", "a", "property", "name", "and", "Doctrine", "Type", "or", "Archetype", "field", "FQN" ]
c5b1caab0b2e3a84c34082af96529a274f0c3d7e
https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Generator/Field/FieldGenerator.php#L181-L202
train
edmondscommerce/doctrine-static-meta
src/CodeGeneration/Generator/Field/FieldGenerator.php
FieldGenerator.traitFqnLooksLikeField
protected function traitFqnLooksLikeField(string $traitFqn): bool { try { $reflection = new \ts\Reflection\ReflectionClass($traitFqn); } catch (\ReflectionException $e) { throw new \InvalidArgumentException( 'invalid traitFqn ' . $traitFqn . ' does not seem to exist', $e->getCode(), $e ); } if (true !== $reflection->isTrait()) { throw new \InvalidArgumentException('field type is not a trait FQN'); } if ('FieldTrait' !== \substr($traitFqn, -\strlen('FieldTrait'))) { throw new \InvalidArgumentException('traitFqn does not end in FieldTrait'); } return true; }
php
protected function traitFqnLooksLikeField(string $traitFqn): bool { try { $reflection = new \ts\Reflection\ReflectionClass($traitFqn); } catch (\ReflectionException $e) { throw new \InvalidArgumentException( 'invalid traitFqn ' . $traitFqn . ' does not seem to exist', $e->getCode(), $e ); } if (true !== $reflection->isTrait()) { throw new \InvalidArgumentException('field type is not a trait FQN'); } if ('FieldTrait' !== \substr($traitFqn, -\strlen('FieldTrait'))) { throw new \InvalidArgumentException('traitFqn does not end in FieldTrait'); } return true; }
[ "protected", "function", "traitFqnLooksLikeField", "(", "string", "$", "traitFqn", ")", ":", "bool", "{", "try", "{", "$", "reflection", "=", "new", "\\", "ts", "\\", "Reflection", "\\", "ReflectionClass", "(", "$", "traitFqn", ")", ";", "}", "catch", "(",...
Does the specified trait FQN look like a field trait? @param string $traitFqn @return bool @throws \ReflectionException
[ "Does", "the", "specified", "trait", "FQN", "look", "like", "a", "field", "trait?" ]
c5b1caab0b2e3a84c34082af96529a274f0c3d7e
https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Generator/Field/FieldGenerator.php#L252-L271
train
edmondscommerce/doctrine-static-meta
src/CodeGeneration/Generator/Field/FieldGenerator.php
FieldGenerator.setupClassProperties
protected function setupClassProperties( string $fieldFqn, string $fieldType, ?string $phpType, $defaultValue, bool $isUnique ): void { $this->isArchetype = false; $this->fieldType = \strtolower($fieldType); if (true !== \in_array($this->fieldType, MappingHelper::COMMON_TYPES, true)) { $this->isArchetype = true; $this->fieldType = $fieldType; } $this->phpType = $phpType ?? $this->getPhpTypeForDbalType(); $this->defaultValue = $this->typeHelper->normaliseValueToType($defaultValue, $this->phpType); if (null !== $this->defaultValue) { $defaultValueType = $this->typeHelper->getType($this->defaultValue); if ($defaultValueType !== $this->phpType) { throw new \InvalidArgumentException( 'default value ' . $this->defaultValue . ' has the type: ' . $defaultValueType . ' whereas the phpType for this field has been set as ' . $this->phpType . ', these do not match up' ); } } $this->isNullable = (null === $defaultValue); $this->isUnique = $isUnique; if (\substr($fieldFqn, -\strlen(self::FIELD_TRAIT_SUFFIX)) === self::FIELD_TRAIT_SUFFIX) { $fieldFqn = \substr($fieldFqn, 0, -\strlen(self::FIELD_TRAIT_SUFFIX)); } $this->fieldFqn = $fieldFqn; list($className, $traitNamespace, $traitSubDirectories) = $this->parseFullyQualifiedName( $this->fieldFqn, $this->srcSubFolderName ); $this->className = $className; list(, $interfaceNamespace, $interfaceSubDirectories) = $this->parseFullyQualifiedName( \str_replace('Traits', 'Interfaces', $this->fieldFqn), $this->srcSubFolderName ); $this->fieldsPath = $this->pathHelper->resolvePath( $this->pathToProjectRoot . '/' . \implode('/', $traitSubDirectories) ); $this->fieldsInterfacePath = $this->pathHelper->resolvePath( $this->pathToProjectRoot . '/' . \implode('/', $interfaceSubDirectories) ); $this->traitNamespace = $traitNamespace; $this->interfaceNamespace = $interfaceNamespace; }
php
protected function setupClassProperties( string $fieldFqn, string $fieldType, ?string $phpType, $defaultValue, bool $isUnique ): void { $this->isArchetype = false; $this->fieldType = \strtolower($fieldType); if (true !== \in_array($this->fieldType, MappingHelper::COMMON_TYPES, true)) { $this->isArchetype = true; $this->fieldType = $fieldType; } $this->phpType = $phpType ?? $this->getPhpTypeForDbalType(); $this->defaultValue = $this->typeHelper->normaliseValueToType($defaultValue, $this->phpType); if (null !== $this->defaultValue) { $defaultValueType = $this->typeHelper->getType($this->defaultValue); if ($defaultValueType !== $this->phpType) { throw new \InvalidArgumentException( 'default value ' . $this->defaultValue . ' has the type: ' . $defaultValueType . ' whereas the phpType for this field has been set as ' . $this->phpType . ', these do not match up' ); } } $this->isNullable = (null === $defaultValue); $this->isUnique = $isUnique; if (\substr($fieldFqn, -\strlen(self::FIELD_TRAIT_SUFFIX)) === self::FIELD_TRAIT_SUFFIX) { $fieldFqn = \substr($fieldFqn, 0, -\strlen(self::FIELD_TRAIT_SUFFIX)); } $this->fieldFqn = $fieldFqn; list($className, $traitNamespace, $traitSubDirectories) = $this->parseFullyQualifiedName( $this->fieldFqn, $this->srcSubFolderName ); $this->className = $className; list(, $interfaceNamespace, $interfaceSubDirectories) = $this->parseFullyQualifiedName( \str_replace('Traits', 'Interfaces', $this->fieldFqn), $this->srcSubFolderName ); $this->fieldsPath = $this->pathHelper->resolvePath( $this->pathToProjectRoot . '/' . \implode('/', $traitSubDirectories) ); $this->fieldsInterfacePath = $this->pathHelper->resolvePath( $this->pathToProjectRoot . '/' . \implode('/', $interfaceSubDirectories) ); $this->traitNamespace = $traitNamespace; $this->interfaceNamespace = $interfaceNamespace; }
[ "protected", "function", "setupClassProperties", "(", "string", "$", "fieldFqn", ",", "string", "$", "fieldType", ",", "?", "string", "$", "phpType", ",", "$", "defaultValue", ",", "bool", "$", "isUnique", ")", ":", "void", "{", "$", "this", "->", "isArche...
Defining the properties for the field to be generated @param string $fieldFqn @param string $fieldType @param null|string $phpType @param mixed $defaultValue @param bool $isUnique @throws DoctrineStaticMetaException @SuppressWarnings(PHPMD.StaticAccess) @SuppressWarnings(PHPMD.BooleanArgumentFlag)
[ "Defining", "the", "properties", "for", "the", "field", "to", "be", "generated" ]
c5b1caab0b2e3a84c34082af96529a274f0c3d7e
https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Generator/Field/FieldGenerator.php#L286-L345
train
chameleon-system/chameleon-shop
src/SearchBundle/objects/db/TShopSearchCache.class.php
TShopSearchCache.GetCurrentFilter
protected function GetCurrentFilter() { static $aFilter = 'x'; if ('x' == $aFilter) { $oShop = TdbShop::GetInstance(); $aFilter = $oShop->GetActiveFilter(); } return $aFilter; }
php
protected function GetCurrentFilter() { static $aFilter = 'x'; if ('x' == $aFilter) { $oShop = TdbShop::GetInstance(); $aFilter = $oShop->GetActiveFilter(); } return $aFilter; }
[ "protected", "function", "GetCurrentFilter", "(", ")", "{", "static", "$", "aFilter", "=", "'x'", ";", "if", "(", "'x'", "==", "$", "aFilter", ")", "{", "$", "oShop", "=", "TdbShop", "::", "GetInstance", "(", ")", ";", "$", "aFilter", "=", "$", "oSho...
return current filter. @return array
[ "return", "current", "filter", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchCache.class.php#L60-L69
train
chameleon-system/chameleon-shop
src/SearchBundle/objects/db/TShopSearchCache.class.php
TShopSearchCache.GetSearchLink
public function GetSearchLink($aFilterAddition = array(), $aExcludeFilterKeys = array()) { $sLink = ''; $aParams = array(); if (is_array($this->aSearchTerms) && count($this->aSearchTerms) > 0) { $aParams[TShopModuleArticlelistFilterSearch::PARAM_QUERY.'[0]'] = $this->sSearchTerm; reset($this->aSearchTerms); foreach ($this->aSearchTerms as $fieldId => $sVal) { $aParams[TShopModuleArticlelistFilterSearch::PARAM_QUERY."[{$fieldId}]"] = $sVal; } reset($this->aSearchTerms); } else { $aParams[TShopModuleArticlelistFilterSearch::PARAM_QUERY] = $this->sSearchTerm; } $aFilter = $this->GetCurrentFilter(); if (!is_array($aFilter) && count($aFilterAddition) > 0) { $aFilter = array(); } foreach ($aFilterAddition as $sFilterKey => $sFilterValue) { $aFilter[$sFilterKey] = $sFilterValue; } // add filter if (is_array($aFilter) && count($aFilter) > 0) { reset($aFilter); foreach ($aFilter as $sFilterKeyName => $sVal) { if (!in_array($sFilterKeyName, $aExcludeFilterKeys)) { $aParams[TShopModuleArticlelistFilterSearch::URL_FILTER."[{$sFilterKeyName}]"] = $sVal; } } } $oShop = TdbShop::GetInstance(); $sLink = $oShop->GetLinkToSystemPage('search', $aParams); return $sLink; }
php
public function GetSearchLink($aFilterAddition = array(), $aExcludeFilterKeys = array()) { $sLink = ''; $aParams = array(); if (is_array($this->aSearchTerms) && count($this->aSearchTerms) > 0) { $aParams[TShopModuleArticlelistFilterSearch::PARAM_QUERY.'[0]'] = $this->sSearchTerm; reset($this->aSearchTerms); foreach ($this->aSearchTerms as $fieldId => $sVal) { $aParams[TShopModuleArticlelistFilterSearch::PARAM_QUERY."[{$fieldId}]"] = $sVal; } reset($this->aSearchTerms); } else { $aParams[TShopModuleArticlelistFilterSearch::PARAM_QUERY] = $this->sSearchTerm; } $aFilter = $this->GetCurrentFilter(); if (!is_array($aFilter) && count($aFilterAddition) > 0) { $aFilter = array(); } foreach ($aFilterAddition as $sFilterKey => $sFilterValue) { $aFilter[$sFilterKey] = $sFilterValue; } // add filter if (is_array($aFilter) && count($aFilter) > 0) { reset($aFilter); foreach ($aFilter as $sFilterKeyName => $sVal) { if (!in_array($sFilterKeyName, $aExcludeFilterKeys)) { $aParams[TShopModuleArticlelistFilterSearch::URL_FILTER."[{$sFilterKeyName}]"] = $sVal; } } } $oShop = TdbShop::GetInstance(); $sLink = $oShop->GetLinkToSystemPage('search', $aParams); return $sLink; }
[ "public", "function", "GetSearchLink", "(", "$", "aFilterAddition", "=", "array", "(", ")", ",", "$", "aExcludeFilterKeys", "=", "array", "(", ")", ")", "{", "$", "sLink", "=", "''", ";", "$", "aParams", "=", "array", "(", ")", ";", "if", "(", "is_ar...
return a search query based on the current filter. @param array $aExcludeFilterKeys - any filter keys (same as in $this->aFilter) you place in here will be excluded from the link @return string
[ "return", "a", "search", "query", "based", "on", "the", "current", "filter", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchCache.class.php#L79-L118
train
chameleon-system/chameleon-shop
src/SearchBundle/objects/db/TShopSearchCache.class.php
TShopSearchCache.GetSearchResultCategoryHits
public function GetSearchResultCategoryHits($sFilters = '') { $aHits = array(); if (!empty($this->fieldCategoryHits) && empty($sFilters)) { $aHits = unserialize($this->fieldCategoryHits); } else { $aCategoryCount = array(); $sRestrcition = ''; $query = ''; if (!empty($sFilters)) { $query = "SELECT COUNT(DISTINCT `shop_search_cache_item`.`id`) AS shop_search_cache_item_count, `shop_category`.* FROM `shop_search_cache_item` INNER JOIN `shop_article` ON `shop_search_cache_item`.`shop_article_id` = `shop_article`.`id` INNER JOIN `shop_article_shop_category_mlt` ON `shop_search_cache_item`.`shop_article_id` = `shop_article_shop_category_mlt`.`source_id` INNER JOIN `shop_category` ON `shop_article_shop_category_mlt`.`target_id` = `shop_category`.`id` WHERE `shop_search_cache_item`.`shop_search_cache_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."' AND {$sFilters} GROUP BY `shop_category`.`id` "; } else { $query = "SELECT COUNT(DISTINCT `shop_search_cache_item`.`id`) AS shop_search_cache_item_count, `shop_category`.* FROM `shop_search_cache_item` INNER JOIN `shop_article_shop_category_mlt` ON `shop_search_cache_item`.`shop_article_id` = `shop_article_shop_category_mlt`.`source_id` INNER JOIN `shop_category` ON `shop_article_shop_category_mlt`.`target_id` = `shop_category`.`id` WHERE `shop_search_cache_item`.`shop_search_cache_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."' GROUP BY `shop_category`.`id` "; } $oCatList = &TdbShopCategoryList::GetList($query); // now organize list into a tree... we trace back each node untill we reach a root node... in the end we // will have a collection of rows. then we merge these while ($oCat = &$oCatList->Next()) { if (!array_key_exists($oCat->id, $aHits)) { $aHits[$oCat->id] = 0; } $aHits[$oCat->id] += $oCat->sqlData['shop_search_cache_item_count']; // add all children to vector while ($oParent = $oCat->GetParent()) { $oParent->sqlData['shop_search_cache_item_count'] = $oCat->sqlData['shop_search_cache_item_count']; if (!array_key_exists($oParent->id, $aHits)) { $aHits[$oParent->id] = 0; } $aHits[$oParent->id] += $oParent->sqlData['shop_search_cache_item_count']; $oCat = $oParent; } } if (empty($sFilters)) { $this->fieldCategoryHits = serialize($aHits); $this->sqlData['category_hits'] = $this->fieldCategoryHits; $this->AllowEditByAll(true); $this->Save(); } } return $aHits; }
php
public function GetSearchResultCategoryHits($sFilters = '') { $aHits = array(); if (!empty($this->fieldCategoryHits) && empty($sFilters)) { $aHits = unserialize($this->fieldCategoryHits); } else { $aCategoryCount = array(); $sRestrcition = ''; $query = ''; if (!empty($sFilters)) { $query = "SELECT COUNT(DISTINCT `shop_search_cache_item`.`id`) AS shop_search_cache_item_count, `shop_category`.* FROM `shop_search_cache_item` INNER JOIN `shop_article` ON `shop_search_cache_item`.`shop_article_id` = `shop_article`.`id` INNER JOIN `shop_article_shop_category_mlt` ON `shop_search_cache_item`.`shop_article_id` = `shop_article_shop_category_mlt`.`source_id` INNER JOIN `shop_category` ON `shop_article_shop_category_mlt`.`target_id` = `shop_category`.`id` WHERE `shop_search_cache_item`.`shop_search_cache_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."' AND {$sFilters} GROUP BY `shop_category`.`id` "; } else { $query = "SELECT COUNT(DISTINCT `shop_search_cache_item`.`id`) AS shop_search_cache_item_count, `shop_category`.* FROM `shop_search_cache_item` INNER JOIN `shop_article_shop_category_mlt` ON `shop_search_cache_item`.`shop_article_id` = `shop_article_shop_category_mlt`.`source_id` INNER JOIN `shop_category` ON `shop_article_shop_category_mlt`.`target_id` = `shop_category`.`id` WHERE `shop_search_cache_item`.`shop_search_cache_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."' GROUP BY `shop_category`.`id` "; } $oCatList = &TdbShopCategoryList::GetList($query); // now organize list into a tree... we trace back each node untill we reach a root node... in the end we // will have a collection of rows. then we merge these while ($oCat = &$oCatList->Next()) { if (!array_key_exists($oCat->id, $aHits)) { $aHits[$oCat->id] = 0; } $aHits[$oCat->id] += $oCat->sqlData['shop_search_cache_item_count']; // add all children to vector while ($oParent = $oCat->GetParent()) { $oParent->sqlData['shop_search_cache_item_count'] = $oCat->sqlData['shop_search_cache_item_count']; if (!array_key_exists($oParent->id, $aHits)) { $aHits[$oParent->id] = 0; } $aHits[$oParent->id] += $oParent->sqlData['shop_search_cache_item_count']; $oCat = $oParent; } } if (empty($sFilters)) { $this->fieldCategoryHits = serialize($aHits); $this->sqlData['category_hits'] = $this->fieldCategoryHits; $this->AllowEditByAll(true); $this->Save(); } } return $aHits; }
[ "public", "function", "GetSearchResultCategoryHits", "(", "$", "sFilters", "=", "''", ")", "{", "$", "aHits", "=", "array", "(", ")", ";", "if", "(", "!", "empty", "(", "$", "this", "->", "fieldCategoryHits", ")", "&&", "empty", "(", "$", "sFilters", "...
return array with categorie ids and number of hits for that category. @return array
[ "return", "array", "with", "categorie", "ids", "and", "number", "of", "hits", "for", "that", "category", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchCache.class.php#L295-L355
train
chameleon-system/chameleon-shop
src/SearchBundle/objects/db/TShopSearchCache.class.php
TShopSearchCache.GetNumberOfHits
public function GetNumberOfHits() { if ($this->fieldNumberOfRecordsFound < 0) { $query = "SELECT COUNT(*) AS recs FROM `shop_search_cache_item` WHERE `shop_search_cache_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'"; if ($row = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { $this->fieldNumberOfRecordsFound = $row['recs']; $this->sqlData['number_of_records_found'] = $this->fieldNumberOfRecordsFound; $this->AllowEditByAll(true); $this->Save(); } } return $this->fieldNumberOfRecordsFound; }
php
public function GetNumberOfHits() { if ($this->fieldNumberOfRecordsFound < 0) { $query = "SELECT COUNT(*) AS recs FROM `shop_search_cache_item` WHERE `shop_search_cache_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'"; if ($row = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { $this->fieldNumberOfRecordsFound = $row['recs']; $this->sqlData['number_of_records_found'] = $this->fieldNumberOfRecordsFound; $this->AllowEditByAll(true); $this->Save(); } } return $this->fieldNumberOfRecordsFound; }
[ "public", "function", "GetNumberOfHits", "(", ")", "{", "if", "(", "$", "this", "->", "fieldNumberOfRecordsFound", "<", "0", ")", "{", "$", "query", "=", "\"SELECT COUNT(*) AS recs FROM `shop_search_cache_item` WHERE `shop_search_cache_id` = '\"", ".", "MySqlLegacySupport",...
return number of records found. @return int
[ "return", "number", "of", "records", "found", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchCache.class.php#L362-L375
train
chameleon-system/chameleon-shop
src/SearchBundle/objects/db/TShopSearchCache.class.php
TShopSearchCache.CacheIsStale
public function CacheIsStale() { $cachAge = strtotime($this->fieldLastUsedDate); $bIsStale = ((time() - $cachAge) > TdbShopSearchCache::MAX_CACHE_AGE_IN_SECONDS); return $bIsStale; }
php
public function CacheIsStale() { $cachAge = strtotime($this->fieldLastUsedDate); $bIsStale = ((time() - $cachAge) > TdbShopSearchCache::MAX_CACHE_AGE_IN_SECONDS); return $bIsStale; }
[ "public", "function", "CacheIsStale", "(", ")", "{", "$", "cachAge", "=", "strtotime", "(", "$", "this", "->", "fieldLastUsedDate", ")", ";", "$", "bIsStale", "=", "(", "(", "time", "(", ")", "-", "$", "cachAge", ")", ">", "TdbShopSearchCache", "::", "...
return true if the cache has become stale - will remove stale cache entries. @return bool
[ "return", "true", "if", "the", "cache", "has", "become", "stale", "-", "will", "remove", "stale", "cache", "entries", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchCache.class.php#L382-L388
train
chameleon-system/chameleon-shop
src/SearchBundle/objects/db/TShopSearchCache.class.php
TShopSearchCache.ClearCache
public function ClearCache() { $query = "DELETE FROM `shop_search_cache_item` WHERE `shop_search_cache_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."' "; MySqlLegacySupport::getInstance()->query($query); $query = "DELETE FROM `shop_search_cache` WHERE `id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'"; MySqlLegacySupport::getInstance()->query($query); $this->id = null; $this->sqlData['id'] = null; }
php
public function ClearCache() { $query = "DELETE FROM `shop_search_cache_item` WHERE `shop_search_cache_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."' "; MySqlLegacySupport::getInstance()->query($query); $query = "DELETE FROM `shop_search_cache` WHERE `id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'"; MySqlLegacySupport::getInstance()->query($query); $this->id = null; $this->sqlData['id'] = null; }
[ "public", "function", "ClearCache", "(", ")", "{", "$", "query", "=", "\"DELETE FROM `shop_search_cache_item` WHERE `shop_search_cache_id` = '\"", ".", "MySqlLegacySupport", "::", "getInstance", "(", ")", "->", "real_escape_string", "(", "$", "this", "->", "id", ")", ...
clear cache item.
[ "clear", "cache", "item", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchCache.class.php#L393-L401
train
chameleon-system/chameleon-shop
src/SearchBundle/objects/db/TShopSearchQuery.class.php
TShopSearchQuery.CreateIndexTick
public function CreateIndexTick($iNumberOfRowsToProcess) { $iRealNumberProcessed = 0; $oFields = &TdbShopSearchFieldWeightList::GetListForShopSearchQueryId($this->id); if (CMS_SHOP_INDEX_LOAD_DELAY_MILLISECONDS > 0) { usleep(CMS_SHOP_INDEX_LOAD_DELAY_MILLISECONDS * 1000); } // fetch as many rows as we can.... $sLimit = " LIMIT 0,{$iNumberOfRowsToProcess}"; if ($iNumberOfRowsToProcess < 0) { $sLimit = ''; } $query = 'SELECT * FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($this->GetIndexRawTableName())."` {$sLimit}"; $tres = MySqlLegacySupport::getInstance()->query($query); $sError = MySqlLegacySupport::getInstance()->error(); if (!empty($sError)) { trigger_error('SQL Error: '.$sError, E_USER_WARNING); } else { while ($aRow = MySqlLegacySupport::getInstance()->fetch_assoc($tres)) { $oFields->GoToStart(); while ($oField = &$oFields->Next()) { $oField->CreateIndexTick($aRow); } $query = 'DELETE FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($this->GetIndexRawTableName())."` WHERE `sysid` = '".MySqlLegacySupport::getInstance()->real_escape_string($aRow['sysid'])."'"; MySqlLegacySupport::getInstance()->query($query); ++$iRealNumberProcessed; } } if (($iRealNumberProcessed < $iNumberOfRowsToProcess) || ($iNumberOfRowsToProcess < 0)) { $query = 'DROP TABLE `'.MySqlLegacySupport::getInstance()->real_escape_string($this->GetIndexRawTableName()).'`'; MySqlLegacySupport::getInstance()->query($query); } return $iRealNumberProcessed; }
php
public function CreateIndexTick($iNumberOfRowsToProcess) { $iRealNumberProcessed = 0; $oFields = &TdbShopSearchFieldWeightList::GetListForShopSearchQueryId($this->id); if (CMS_SHOP_INDEX_LOAD_DELAY_MILLISECONDS > 0) { usleep(CMS_SHOP_INDEX_LOAD_DELAY_MILLISECONDS * 1000); } // fetch as many rows as we can.... $sLimit = " LIMIT 0,{$iNumberOfRowsToProcess}"; if ($iNumberOfRowsToProcess < 0) { $sLimit = ''; } $query = 'SELECT * FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($this->GetIndexRawTableName())."` {$sLimit}"; $tres = MySqlLegacySupport::getInstance()->query($query); $sError = MySqlLegacySupport::getInstance()->error(); if (!empty($sError)) { trigger_error('SQL Error: '.$sError, E_USER_WARNING); } else { while ($aRow = MySqlLegacySupport::getInstance()->fetch_assoc($tres)) { $oFields->GoToStart(); while ($oField = &$oFields->Next()) { $oField->CreateIndexTick($aRow); } $query = 'DELETE FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($this->GetIndexRawTableName())."` WHERE `sysid` = '".MySqlLegacySupport::getInstance()->real_escape_string($aRow['sysid'])."'"; MySqlLegacySupport::getInstance()->query($query); ++$iRealNumberProcessed; } } if (($iRealNumberProcessed < $iNumberOfRowsToProcess) || ($iNumberOfRowsToProcess < 0)) { $query = 'DROP TABLE `'.MySqlLegacySupport::getInstance()->real_escape_string($this->GetIndexRawTableName()).'`'; MySqlLegacySupport::getInstance()->query($query); } return $iRealNumberProcessed; }
[ "public", "function", "CreateIndexTick", "(", "$", "iNumberOfRowsToProcess", ")", "{", "$", "iRealNumberProcessed", "=", "0", ";", "$", "oFields", "=", "&", "TdbShopSearchFieldWeightList", "::", "GetListForShopSearchQueryId", "(", "$", "this", "->", "id", ")", ";"...
creates index for the number of rows requested. returns the real number of rows processed. @param int $iNumberOfRowsToProcess - if set to -1 we will process all rows @return int
[ "creates", "index", "for", "the", "number", "of", "rows", "requested", ".", "returns", "the", "real", "number", "of", "rows", "processed", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchQuery.class.php#L122-L158
train
chameleon-system/chameleon-shop
src/SearchBundle/objects/db/TShopSearchQuery.class.php
TShopSearchQuery.NumberOfRecordsLeftToIndex
public function NumberOfRecordsLeftToIndex() { $iCount = 0; if ($this->fieldIndexRunning) { $sIndexTableName = $this->GetIndexRawTableName(); $query = "SHOW TABLES LIKE '".MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName)."'"; $tRes = MySqlLegacySupport::getInstance()->query($query); $bTableExists = (MySqlLegacySupport::getInstance()->num_rows($tRes) >= 1); if ($bTableExists) { $query = 'SELECT COUNT(sysid) AS reccount FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName).'`'; if ($trow = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { $iCount = $trow['reccount']; } } if ($iCount < 1) { $this->StopIndex(); } } return $iCount; }
php
public function NumberOfRecordsLeftToIndex() { $iCount = 0; if ($this->fieldIndexRunning) { $sIndexTableName = $this->GetIndexRawTableName(); $query = "SHOW TABLES LIKE '".MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName)."'"; $tRes = MySqlLegacySupport::getInstance()->query($query); $bTableExists = (MySqlLegacySupport::getInstance()->num_rows($tRes) >= 1); if ($bTableExists) { $query = 'SELECT COUNT(sysid) AS reccount FROM `'.MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName).'`'; if ($trow = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) { $iCount = $trow['reccount']; } } if ($iCount < 1) { $this->StopIndex(); } } return $iCount; }
[ "public", "function", "NumberOfRecordsLeftToIndex", "(", ")", "{", "$", "iCount", "=", "0", ";", "if", "(", "$", "this", "->", "fieldIndexRunning", ")", "{", "$", "sIndexTableName", "=", "$", "this", "->", "GetIndexRawTableName", "(", ")", ";", "$", "query...
returns the number of records that still need to be indext for the query will stop the index if no entries are left to index. @return int
[ "returns", "the", "number", "of", "records", "that", "still", "need", "to", "be", "indext", "for", "the", "query", "will", "stop", "the", "index", "if", "no", "entries", "are", "left", "to", "index", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchQuery.class.php#L166-L186
train
chameleon-system/chameleon-shop
src/SearchBundle/objects/db/TShopSearchQuery.class.php
TShopSearchQuery.StopIndex
public function StopIndex() { $sIndexTableName = $this->GetIndexRawTableName(); if (TCMSRecord::TableExists($sIndexTableName)) { $query = 'DROP TABLE `'.MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName).'`'; MySqlLegacySupport::getInstance()->query($query); } $aData = $this->sqlData; $aData['index_running'] = '0'; $aData['index_completed'] = date('Y-m-d H:i:s'); $this->LoadFromRow($aData); $this->AllowEditByAll(true); $this->Save(); }
php
public function StopIndex() { $sIndexTableName = $this->GetIndexRawTableName(); if (TCMSRecord::TableExists($sIndexTableName)) { $query = 'DROP TABLE `'.MySqlLegacySupport::getInstance()->real_escape_string($sIndexTableName).'`'; MySqlLegacySupport::getInstance()->query($query); } $aData = $this->sqlData; $aData['index_running'] = '0'; $aData['index_completed'] = date('Y-m-d H:i:s'); $this->LoadFromRow($aData); $this->AllowEditByAll(true); $this->Save(); }
[ "public", "function", "StopIndex", "(", ")", "{", "$", "sIndexTableName", "=", "$", "this", "->", "GetIndexRawTableName", "(", ")", ";", "if", "(", "TCMSRecord", "::", "TableExists", "(", "$", "sIndexTableName", ")", ")", "{", "$", "query", "=", "'DROP TAB...
stop the current index operation.
[ "stop", "the", "current", "index", "operation", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchQuery.class.php#L191-L205
train
edmondscommerce/doctrine-static-meta
src/Entity/Validation/EntityDataValidatorFactory.php
EntityDataValidatorFactory.buildEntityDataValidator
public function buildEntityDataValidator(): EntityDataValidatorInterface { $builder = Validation::createValidatorBuilder(); $builder->addMethodMapping(self::METHOD_LOAD_VALIDATOR_META_DATA); $builder->setMetadataCache($this->doctrineCache); $builder->setConstraintValidatorFactory($this->factory); $builder->addObjectInitializer($this->initialiser); $validator = $builder->getValidator(); return new EntityDataValidator($validator); }
php
public function buildEntityDataValidator(): EntityDataValidatorInterface { $builder = Validation::createValidatorBuilder(); $builder->addMethodMapping(self::METHOD_LOAD_VALIDATOR_META_DATA); $builder->setMetadataCache($this->doctrineCache); $builder->setConstraintValidatorFactory($this->factory); $builder->addObjectInitializer($this->initialiser); $validator = $builder->getValidator(); return new EntityDataValidator($validator); }
[ "public", "function", "buildEntityDataValidator", "(", ")", ":", "EntityDataValidatorInterface", "{", "$", "builder", "=", "Validation", "::", "createValidatorBuilder", "(", ")", ";", "$", "builder", "->", "addMethodMapping", "(", "self", "::", "METHOD_LOAD_VALIDATOR_...
Build an EntityDataValidatorInterface @return EntityDataValidatorInterface @SuppressWarnings(PHPMD.StaticAccess)
[ "Build", "an", "EntityDataValidatorInterface" ]
c5b1caab0b2e3a84c34082af96529a274f0c3d7e
https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Validation/EntityDataValidatorFactory.php#L63-L73
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/db/TShopOrderItem.class.php
TShopOrderItem.PostInsertHook
protected function PostInsertHook() { parent::PostInsertHook(); $oArticle = &$this->GetFieldShopArticle(); if (!is_null($oArticle)) { $bNewAmountIsDelta = true; $bUpdateSaleCounter = true; $oArticle->UpdateStock(-1 * $this->fieldOrderAmount, $bNewAmountIsDelta, $bUpdateSaleCounter); } }
php
protected function PostInsertHook() { parent::PostInsertHook(); $oArticle = &$this->GetFieldShopArticle(); if (!is_null($oArticle)) { $bNewAmountIsDelta = true; $bUpdateSaleCounter = true; $oArticle->UpdateStock(-1 * $this->fieldOrderAmount, $bNewAmountIsDelta, $bUpdateSaleCounter); } }
[ "protected", "function", "PostInsertHook", "(", ")", "{", "parent", "::", "PostInsertHook", "(", ")", ";", "$", "oArticle", "=", "&", "$", "this", "->", "GetFieldShopArticle", "(", ")", ";", "if", "(", "!", "is_null", "(", "$", "oArticle", ")", ")", "{...
use the method to up the sales count for the article.
[ "use", "the", "method", "to", "up", "the", "sales", "count", "for", "the", "article", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopOrderItem.class.php#L112-L121
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/db/TShopOrderItem.class.php
TShopOrderItem.isDownload
public function isDownload() { $db = \ChameleonSystem\CoreBundle\ServiceLocator::get('database_connection'); $query = 'select COUNT(*) AS matches FROM `shop_order_item_download_cms_document_mlt` WHERE `source_id` = :shopOrderItemId'; $result = $db->fetchAssoc($query, array('shopOrderItemId' => $this->id)); return intval($result['matches']) > 0; }
php
public function isDownload() { $db = \ChameleonSystem\CoreBundle\ServiceLocator::get('database_connection'); $query = 'select COUNT(*) AS matches FROM `shop_order_item_download_cms_document_mlt` WHERE `source_id` = :shopOrderItemId'; $result = $db->fetchAssoc($query, array('shopOrderItemId' => $this->id)); return intval($result['matches']) > 0; }
[ "public", "function", "isDownload", "(", ")", "{", "$", "db", "=", "\\", "ChameleonSystem", "\\", "CoreBundle", "\\", "ServiceLocator", "::", "get", "(", "'database_connection'", ")", ";", "$", "query", "=", "'select COUNT(*) AS matches FROM `shop_order_item_download_...
return true if this is a download product. @return bool
[ "return", "true", "if", "this", "is", "a", "download", "product", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopOrderItem.class.php#L162-L170
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php
MTShopBasketCoreEndpoint.ClearBasket
protected function ClearBasket() { $oBasket = TShopBasket::GetInstance(); if ($oBasket->iTotalNumberOfUniqueArticles > 0) { $oBasket->ClearBasket(); $aParams = $this->global->GetUserData(); if (array_key_exists('basket', $aParams) && is_array($aParams['basket'])) { if (array_key_exists(self::URL_CLEAR_BASKET_NAME, $aParams['basket'])) { unset($aParams['basket'][self::URL_CLEAR_BASKET_NAME]); } } $sURL = $this->getActivePageService()->getLinkToActivePageRelative($aParams, array('pagedef')); $this->getRedirect()->redirect($sURL); } }
php
protected function ClearBasket() { $oBasket = TShopBasket::GetInstance(); if ($oBasket->iTotalNumberOfUniqueArticles > 0) { $oBasket->ClearBasket(); $aParams = $this->global->GetUserData(); if (array_key_exists('basket', $aParams) && is_array($aParams['basket'])) { if (array_key_exists(self::URL_CLEAR_BASKET_NAME, $aParams['basket'])) { unset($aParams['basket'][self::URL_CLEAR_BASKET_NAME]); } } $sURL = $this->getActivePageService()->getLinkToActivePageRelative($aParams, array('pagedef')); $this->getRedirect()->redirect($sURL); } }
[ "protected", "function", "ClearBasket", "(", ")", "{", "$", "oBasket", "=", "TShopBasket", "::", "GetInstance", "(", ")", ";", "if", "(", "$", "oBasket", "->", "iTotalNumberOfUniqueArticles", ">", "0", ")", "{", "$", "oBasket", "->", "ClearBasket", "(", ")...
clear all products from the basket and redirect to active page.
[ "clear", "all", "products", "from", "the", "basket", "and", "redirect", "to", "active", "page", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php#L89-L103
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php
MTShopBasketCoreEndpoint.JumpToBasketPage
public function JumpToBasketPage() { $bJumpAsFarAsPossible = false; if ('1' === $this->getInputFilterUtil()->getFilteredInput('bJumpAsFarAsPossible')) { $bJumpAsFarAsPossible = true; } // save calling url to session $sCallingURL = $this->getCallingUrl(); MTShopOrderWizardCore::SetCallingURL($sCallingURL); $systemPageService = $this->getSystemPageService(); $checkoutSystemPage = $systemPageService->getSystemPage('checkout'); if (null === $checkoutSystemPage) { throw new RouteNotFoundException("No system page with system name 'checkout' found - unable to redirect to the basket."); } $iRequestRedirectNodeId = $checkoutSystemPage->fieldCmsTreeId; $bNeedToRedirect = true; if (false === $bJumpAsFarAsPossible && $this->getActivePageService()->getActivePage()->GetMainTreeId() == $iRequestRedirectNodeId) { // we are already on the $bNeedToRedirect = false; } if (true === $bNeedToRedirect) { $oNode = new TCMSTreeNode(); /** @var $oNode TCMSTreeNode */ if ($oNode->Load($iRequestRedirectNodeId)) { $sURL = null; if ($bJumpAsFarAsPossible) { $oUser = $this->getExtranetUserProvider()->getActiveUser(); $oStep = null; $oBillingAdr = $oUser->GetBillingAddress(); if ($oUser->IsLoggedIn() && !is_null($oBillingAdr) && $oBillingAdr->ValidateData(TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING)) { $oStep = TdbShopOrderStep::GetStep('shipping'); } else { $oStep = TdbShopOrderStep::GetStep('user'); } if (!is_null($oStep)) { $sURL = $oStep->GetStepURL(); } } if (null === $sURL) { $sURL = $systemPageService->getLinkToSystemPageRelative('checkout'); } $this->getRedirect()->redirect($sURL); } else { $this->RedirectToCallingPage(); } } }
php
public function JumpToBasketPage() { $bJumpAsFarAsPossible = false; if ('1' === $this->getInputFilterUtil()->getFilteredInput('bJumpAsFarAsPossible')) { $bJumpAsFarAsPossible = true; } // save calling url to session $sCallingURL = $this->getCallingUrl(); MTShopOrderWizardCore::SetCallingURL($sCallingURL); $systemPageService = $this->getSystemPageService(); $checkoutSystemPage = $systemPageService->getSystemPage('checkout'); if (null === $checkoutSystemPage) { throw new RouteNotFoundException("No system page with system name 'checkout' found - unable to redirect to the basket."); } $iRequestRedirectNodeId = $checkoutSystemPage->fieldCmsTreeId; $bNeedToRedirect = true; if (false === $bJumpAsFarAsPossible && $this->getActivePageService()->getActivePage()->GetMainTreeId() == $iRequestRedirectNodeId) { // we are already on the $bNeedToRedirect = false; } if (true === $bNeedToRedirect) { $oNode = new TCMSTreeNode(); /** @var $oNode TCMSTreeNode */ if ($oNode->Load($iRequestRedirectNodeId)) { $sURL = null; if ($bJumpAsFarAsPossible) { $oUser = $this->getExtranetUserProvider()->getActiveUser(); $oStep = null; $oBillingAdr = $oUser->GetBillingAddress(); if ($oUser->IsLoggedIn() && !is_null($oBillingAdr) && $oBillingAdr->ValidateData(TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING)) { $oStep = TdbShopOrderStep::GetStep('shipping'); } else { $oStep = TdbShopOrderStep::GetStep('user'); } if (!is_null($oStep)) { $sURL = $oStep->GetStepURL(); } } if (null === $sURL) { $sURL = $systemPageService->getLinkToSystemPageRelative('checkout'); } $this->getRedirect()->redirect($sURL); } else { $this->RedirectToCallingPage(); } } }
[ "public", "function", "JumpToBasketPage", "(", ")", "{", "$", "bJumpAsFarAsPossible", "=", "false", ";", "if", "(", "'1'", "===", "$", "this", "->", "getInputFilterUtil", "(", ")", "->", "getFilteredInput", "(", "'bJumpAsFarAsPossible'", ")", ")", "{", "$", ...
call the method to jump to the basket detail page. it will store the calling URL in the session, so that it becomes possible to jump back to this page from the basket. @throws RouteNotFoundException
[ "call", "the", "method", "to", "jump", "to", "the", "basket", "detail", "page", ".", "it", "will", "store", "the", "calling", "URL", "in", "the", "session", "so", "that", "it", "becomes", "possible", "to", "jump", "back", "to", "this", "page", "from", ...
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php#L155-L205
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php
MTShopBasketCoreEndpoint.getCallingUrl
protected function getCallingUrl() { $oGlobal = TGlobal::instance(); $sCallingURL = $oGlobal->GetUserData('sourceurl'); if (true === empty($sCallingURL)) { //the method will most likely be called on a basket page, in this case, ignore it... $activePageService = $this->getActivePageService(); $oActivePage = $activePageService->getActivePage(); $checkoutSystemPage = $this->getSystemPageService()->getSystemPage('checkout'); if (null === $checkoutSystemPage || $checkoutSystemPage->fieldCmsTreeId !== $oActivePage->GetMainTreeId()) { $aExcludeParams = array('module_fnc'); // we may be on a category list or an item page... so ignore those parameters, too $aExcludeParams[] = MTShopArticleCatalogCore::URL_CATEGORY_ID; $aExcludeParams[] = MTShopArticleCatalogCore::URL_ITEM_ID; $aExcludeParams[] = MTShopBasketCore::URL_REQUEST_PARAMETER; $sCallingURL = $activePageService->getLinkToActivePageRelative(array(), $aExcludeParams); } else { //basket, so try to get from session if (isset($_SESSION[MTShopOrderWizardCore::SESSION_PARAM_NAME]) && !empty($_SESSION[MTShopOrderWizardCore::SESSION_PARAM_NAME])) { $sCallingURL = $_SESSION[MTShopOrderWizardCore::SESSION_PARAM_NAME]; } else { $portal = $this->getPortalDomainService()->getActivePortal(); if (null !== $portal) { $sCallingURL = $this->getPageService()->getLinkToPortalHomePageAbsolute(); } else { $sCallingURL = '/'; } } } } return $sCallingURL; }
php
protected function getCallingUrl() { $oGlobal = TGlobal::instance(); $sCallingURL = $oGlobal->GetUserData('sourceurl'); if (true === empty($sCallingURL)) { //the method will most likely be called on a basket page, in this case, ignore it... $activePageService = $this->getActivePageService(); $oActivePage = $activePageService->getActivePage(); $checkoutSystemPage = $this->getSystemPageService()->getSystemPage('checkout'); if (null === $checkoutSystemPage || $checkoutSystemPage->fieldCmsTreeId !== $oActivePage->GetMainTreeId()) { $aExcludeParams = array('module_fnc'); // we may be on a category list or an item page... so ignore those parameters, too $aExcludeParams[] = MTShopArticleCatalogCore::URL_CATEGORY_ID; $aExcludeParams[] = MTShopArticleCatalogCore::URL_ITEM_ID; $aExcludeParams[] = MTShopBasketCore::URL_REQUEST_PARAMETER; $sCallingURL = $activePageService->getLinkToActivePageRelative(array(), $aExcludeParams); } else { //basket, so try to get from session if (isset($_SESSION[MTShopOrderWizardCore::SESSION_PARAM_NAME]) && !empty($_SESSION[MTShopOrderWizardCore::SESSION_PARAM_NAME])) { $sCallingURL = $_SESSION[MTShopOrderWizardCore::SESSION_PARAM_NAME]; } else { $portal = $this->getPortalDomainService()->getActivePortal(); if (null !== $portal) { $sCallingURL = $this->getPageService()->getLinkToPortalHomePageAbsolute(); } else { $sCallingURL = '/'; } } } } return $sCallingURL; }
[ "protected", "function", "getCallingUrl", "(", ")", "{", "$", "oGlobal", "=", "TGlobal", "::", "instance", "(", ")", ";", "$", "sCallingURL", "=", "$", "oGlobal", "->", "GetUserData", "(", "'sourceurl'", ")", ";", "if", "(", "true", "===", "empty", "(", ...
returns the url to the current page. @return string
[ "returns", "the", "url", "to", "the", "current", "page", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php#L212-L245
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php
MTShopBasketCoreEndpoint.RemoveFromNoticeList
public function RemoveFromNoticeList($aArticleIdsToMove = null, $sMessageHandler = null, $bIsInteralCall = false, $bIsAjaxCall = false) { $oGlobal = TGlobal::instance(); $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER); if (is_null($aArticleIdsToMove) && array_key_exists(self::URL_ITEM_ID_NAME, $aRequestData)) { $aArticleIdsToMove = $aRequestData[self::URL_ITEM_ID_NAME]; if (!is_array($aArticleIdsToMove)) { $aArticleIdsToMove = array($aArticleIdsToMove); } } if (is_null($sMessageHandler) && array_key_exists(self::URL_MESSAGE_CONSUMER_NAME, $aRequestData)) { $sMessageHandler = $aRequestData[self::URL_MESSAGE_CONSUMER_NAME]; if (empty($sMessageHandler)) { $sMessageHandler = null; } } if (is_null($sMessageHandler)) { $sMessageHandler = self::MSG_CONSUMER_NAME; } $oMessageManager = TCMSMessageManager::GetInstance(); $oUser = TdbDataExtranetUser::GetInstance(); foreach ($aArticleIdsToMove as $iArticleId) { $oUser->RemoveArticleFromNoticeList($iArticleId); $oArticle = TdbShopArticle::GetNewInstance(); /** @var $oArticle TdbShopArticle */ $oArticle->Load($iArticleId); $aMessageData = array('sArticleLinkStart' => '<a href="'.TGlobal::OutHTML($oArticle->GetDetailLink()).'">', 'sArticleLinkEnd' => '</a>', 'sArticleName' => $oArticle->GetName()); if (!$bIsAjaxCall) { $oMessageManager->AddMessage($sMessageHandler, 'NOTICE-LIST-REMOVED-ITEM', $aMessageData); } } $iRedirectNodeId = null; if (array_key_exists(self::URL_REDIRECT_NODE_ID_NAME, $aRequestData)) { $iRedirectNodeId = $aRequestData[self::URL_REDIRECT_NODE_ID_NAME]; if (empty($iRedirectNodeId)) { $iRedirectNodeId = null; } } if (!$bIsInteralCall) { if ($bIsAjaxCall) { return array('message' => ''); } else { $this->RedirectAfterEvent($iRedirectNodeId); } } }
php
public function RemoveFromNoticeList($aArticleIdsToMove = null, $sMessageHandler = null, $bIsInteralCall = false, $bIsAjaxCall = false) { $oGlobal = TGlobal::instance(); $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER); if (is_null($aArticleIdsToMove) && array_key_exists(self::URL_ITEM_ID_NAME, $aRequestData)) { $aArticleIdsToMove = $aRequestData[self::URL_ITEM_ID_NAME]; if (!is_array($aArticleIdsToMove)) { $aArticleIdsToMove = array($aArticleIdsToMove); } } if (is_null($sMessageHandler) && array_key_exists(self::URL_MESSAGE_CONSUMER_NAME, $aRequestData)) { $sMessageHandler = $aRequestData[self::URL_MESSAGE_CONSUMER_NAME]; if (empty($sMessageHandler)) { $sMessageHandler = null; } } if (is_null($sMessageHandler)) { $sMessageHandler = self::MSG_CONSUMER_NAME; } $oMessageManager = TCMSMessageManager::GetInstance(); $oUser = TdbDataExtranetUser::GetInstance(); foreach ($aArticleIdsToMove as $iArticleId) { $oUser->RemoveArticleFromNoticeList($iArticleId); $oArticle = TdbShopArticle::GetNewInstance(); /** @var $oArticle TdbShopArticle */ $oArticle->Load($iArticleId); $aMessageData = array('sArticleLinkStart' => '<a href="'.TGlobal::OutHTML($oArticle->GetDetailLink()).'">', 'sArticleLinkEnd' => '</a>', 'sArticleName' => $oArticle->GetName()); if (!$bIsAjaxCall) { $oMessageManager->AddMessage($sMessageHandler, 'NOTICE-LIST-REMOVED-ITEM', $aMessageData); } } $iRedirectNodeId = null; if (array_key_exists(self::URL_REDIRECT_NODE_ID_NAME, $aRequestData)) { $iRedirectNodeId = $aRequestData[self::URL_REDIRECT_NODE_ID_NAME]; if (empty($iRedirectNodeId)) { $iRedirectNodeId = null; } } if (!$bIsInteralCall) { if ($bIsAjaxCall) { return array('message' => ''); } else { $this->RedirectAfterEvent($iRedirectNodeId); } } }
[ "public", "function", "RemoveFromNoticeList", "(", "$", "aArticleIdsToMove", "=", "null", ",", "$", "sMessageHandler", "=", "null", ",", "$", "bIsInteralCall", "=", "false", ",", "$", "bIsAjaxCall", "=", "false", ")", "{", "$", "oGlobal", "=", "TGlobal", "::...
remove item from notice list. @param array $aArticleIdsToMove @param string $sMessageHandler @param bool $bIsInteralCall
[ "remove", "item", "from", "notice", "list", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php#L364-L412
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php
MTShopBasketCoreEndpoint.TransferToNoticeList
public function TransferToNoticeList($iArticleId = null, $iAmount = null, $sMessageHandler = null, $bIsInternalCall = false) { $this->RemoveFromBasket($iArticleId, $sMessageHandler, true); $this->AddToNoticeList($iArticleId, $iAmount, $sMessageHandler, $bIsInternalCall); }
php
public function TransferToNoticeList($iArticleId = null, $iAmount = null, $sMessageHandler = null, $bIsInternalCall = false) { $this->RemoveFromBasket($iArticleId, $sMessageHandler, true); $this->AddToNoticeList($iArticleId, $iAmount, $sMessageHandler, $bIsInternalCall); }
[ "public", "function", "TransferToNoticeList", "(", "$", "iArticleId", "=", "null", ",", "$", "iAmount", "=", "null", ",", "$", "sMessageHandler", "=", "null", ",", "$", "bIsInternalCall", "=", "false", ")", "{", "$", "this", "->", "RemoveFromBasket", "(", ...
moves or copies one or more articles from the basket to the notice list. products to be moved must be passed. @param int $iArticleId - if you pass null, it will attempt to fetch the item id from post @param int $iAmount - amount to add @param string $sMessageHandler - info passed to this handler - uses the default message consumer for the shop if non passed (can also be passed via get/post) @param bool $bIsInternalCall
[ "moves", "or", "copies", "one", "or", "more", "articles", "from", "the", "basket", "to", "the", "notice", "list", ".", "products", "to", "be", "moved", "must", "be", "passed", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php#L422-L426
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php
MTShopBasketCoreEndpoint.AddToNoticeList
public function AddToNoticeList($iArticleId = null, $iAmount = null, $sMessageHandler = null, $bIsInternalCall = false) { $oGlobal = TGlobal::instance(); $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER); if (is_null($iArticleId) && array_key_exists(self::URL_ITEM_ID_NAME, $aRequestData)) { $iArticleId = $aRequestData[self::URL_ITEM_ID_NAME]; if (empty($iArticleId)) { $iArticleId = null; } } if (is_null($iAmount) && array_key_exists(self::URL_ITEM_AMOUNT_NAME, $aRequestData)) { $iAmount = $aRequestData[self::URL_ITEM_AMOUNT_NAME]; if (empty($iAmount)) { $iAmount = 1; } } if (is_null($sMessageHandler) && array_key_exists(self::URL_MESSAGE_CONSUMER_NAME, $aRequestData)) { $sMessageHandler = $aRequestData[self::URL_MESSAGE_CONSUMER_NAME]; if (empty($sMessageHandler)) { $sMessageHandler = null; } } if (is_null($sMessageHandler)) { $sMessageHandler = self::MSG_CONSUMER_NAME; } $oMsgManager = TCMSMessageManager::GetInstance(); if (is_null($iArticleId)) { $oMsgManager->AddMessage($sMessageHandler, 'ERROR-SHOP-NOTICE-LIST-ADD-ITEM-NO-ID-GIVEN'); } else { $oItem = TdbShopArticle::GetNewInstance(); /** @var $oItem TdbShopArticle */ if ($oItem->Load($iArticleId)) { $oShop = TdbShop::GetInstance(); // add item to list $oUser = TdbDataExtranetUser::GetInstance(); $dNewAmountOnList = $oUser->AddArticleIdToNoticeList($iArticleId, $iAmount); $aInfoData = array('sLinkNoticeListStart' => '<a href="'.$oShop->GetLinkToSystemPage('noticelist').'">', 'sLinkNoticeListEnd' => '</a>', 'sLinkArticleStart' => '<a href="'.$oItem->GetDetailLink().'">', 'sLinkArticleEnd' => '</a>', 'sArticleName' => TGlobal::OutHTML($oItem->GetName()), 'dAddedAmount' => $iAmount, 'dNewAmount' => $dNewAmountOnList, 'sArticleAddedId' => $oItem->id); if (false === $dNewAmountOnList) { // article was already on notice list... $oMsgManager->AddMessage($sMessageHandler, 'NOTICE-LIST-ITEM-ALREADY-ON-LIST', $aInfoData); } else { $oMsgManager->AddMessage($sMessageHandler, 'NOTICE-LIST-ADDED-ITEM', $aInfoData); } } else { $oMsgManager->AddMessage($sMessageHandler, 'ERROR-SHOP-NOTICE-LIST-INVALID-ITEM-ID'); } } // now redirect either to requested page, or to calling page $iRedirectNodeId = null; if (array_key_exists(self::URL_REDIRECT_NODE_ID_NAME, $aRequestData)) { $iRedirectNodeId = $aRequestData[self::URL_REDIRECT_NODE_ID_NAME]; if (empty($iRedirectNodeId)) { $iRedirectNodeId = null; } } if (!$bIsInternalCall) { $this->RedirectAfterEvent($iRedirectNodeId); } }
php
public function AddToNoticeList($iArticleId = null, $iAmount = null, $sMessageHandler = null, $bIsInternalCall = false) { $oGlobal = TGlobal::instance(); $aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER); if (is_null($iArticleId) && array_key_exists(self::URL_ITEM_ID_NAME, $aRequestData)) { $iArticleId = $aRequestData[self::URL_ITEM_ID_NAME]; if (empty($iArticleId)) { $iArticleId = null; } } if (is_null($iAmount) && array_key_exists(self::URL_ITEM_AMOUNT_NAME, $aRequestData)) { $iAmount = $aRequestData[self::URL_ITEM_AMOUNT_NAME]; if (empty($iAmount)) { $iAmount = 1; } } if (is_null($sMessageHandler) && array_key_exists(self::URL_MESSAGE_CONSUMER_NAME, $aRequestData)) { $sMessageHandler = $aRequestData[self::URL_MESSAGE_CONSUMER_NAME]; if (empty($sMessageHandler)) { $sMessageHandler = null; } } if (is_null($sMessageHandler)) { $sMessageHandler = self::MSG_CONSUMER_NAME; } $oMsgManager = TCMSMessageManager::GetInstance(); if (is_null($iArticleId)) { $oMsgManager->AddMessage($sMessageHandler, 'ERROR-SHOP-NOTICE-LIST-ADD-ITEM-NO-ID-GIVEN'); } else { $oItem = TdbShopArticle::GetNewInstance(); /** @var $oItem TdbShopArticle */ if ($oItem->Load($iArticleId)) { $oShop = TdbShop::GetInstance(); // add item to list $oUser = TdbDataExtranetUser::GetInstance(); $dNewAmountOnList = $oUser->AddArticleIdToNoticeList($iArticleId, $iAmount); $aInfoData = array('sLinkNoticeListStart' => '<a href="'.$oShop->GetLinkToSystemPage('noticelist').'">', 'sLinkNoticeListEnd' => '</a>', 'sLinkArticleStart' => '<a href="'.$oItem->GetDetailLink().'">', 'sLinkArticleEnd' => '</a>', 'sArticleName' => TGlobal::OutHTML($oItem->GetName()), 'dAddedAmount' => $iAmount, 'dNewAmount' => $dNewAmountOnList, 'sArticleAddedId' => $oItem->id); if (false === $dNewAmountOnList) { // article was already on notice list... $oMsgManager->AddMessage($sMessageHandler, 'NOTICE-LIST-ITEM-ALREADY-ON-LIST', $aInfoData); } else { $oMsgManager->AddMessage($sMessageHandler, 'NOTICE-LIST-ADDED-ITEM', $aInfoData); } } else { $oMsgManager->AddMessage($sMessageHandler, 'ERROR-SHOP-NOTICE-LIST-INVALID-ITEM-ID'); } } // now redirect either to requested page, or to calling page $iRedirectNodeId = null; if (array_key_exists(self::URL_REDIRECT_NODE_ID_NAME, $aRequestData)) { $iRedirectNodeId = $aRequestData[self::URL_REDIRECT_NODE_ID_NAME]; if (empty($iRedirectNodeId)) { $iRedirectNodeId = null; } } if (!$bIsInternalCall) { $this->RedirectAfterEvent($iRedirectNodeId); } }
[ "public", "function", "AddToNoticeList", "(", "$", "iArticleId", "=", "null", ",", "$", "iAmount", "=", "null", ",", "$", "sMessageHandler", "=", "null", ",", "$", "bIsInternalCall", "=", "false", ")", "{", "$", "oGlobal", "=", "TGlobal", "::", "instance",...
insert an item into the notice list. @param int $iArticleId - if you pass null, it will attempt to fetch the item id from post @param int $iAmount - amount to add @param string $sMessageHandler - info passed to this handler - uses the default message consumer for the shop if non passed (can also be passed via get/post) @param bool $bIsInternalCall
[ "insert", "an", "item", "into", "the", "notice", "list", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php#L436-L498
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php
MTShopBasketCoreEndpoint.getValidVoucher
protected function getValidVoucher($sShopVoucherCode) { $oValidVoucher = null; /** @var $oVoucher TdbShopVoucher */ $oVoucher = TdbShopVoucher::GetNewInstance(); if (strlen($sShopVoucherCode) >= 3) { if ($oVoucher->LoadFromFields(array('code' => $sShopVoucherCode, 'is_used_up' => '0'))) { $oValidVoucher = $oVoucher; } } return $oValidVoucher; }
php
protected function getValidVoucher($sShopVoucherCode) { $oValidVoucher = null; /** @var $oVoucher TdbShopVoucher */ $oVoucher = TdbShopVoucher::GetNewInstance(); if (strlen($sShopVoucherCode) >= 3) { if ($oVoucher->LoadFromFields(array('code' => $sShopVoucherCode, 'is_used_up' => '0'))) { $oValidVoucher = $oVoucher; } } return $oValidVoucher; }
[ "protected", "function", "getValidVoucher", "(", "$", "sShopVoucherCode", ")", "{", "$", "oValidVoucher", "=", "null", ";", "/** @var $oVoucher TdbShopVoucher */", "$", "oVoucher", "=", "TdbShopVoucher", "::", "GetNewInstance", "(", ")", ";", "if", "(", "strlen", ...
validates the voucher code and tries to load the voucher record. @param $sShopVoucherCode @return TdbShopVoucher|null
[ "validates", "the", "voucher", "code", "and", "tries", "to", "load", "the", "voucher", "record", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php#L560-L573
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php
MTShopBasketCoreEndpoint.RedirectAfterEvent
protected function RedirectAfterEvent($iRequestRedirectNodeId) { if (is_null($iRequestRedirectNodeId)) { $this->RedirectToCallingPage(); } else { $checkoutSystemPage = $this->getSystemPageService()->getSystemPage('checkout'); if (null !== $checkoutSystemPage && $checkoutSystemPage->fieldCmsTreeId == $iRequestRedirectNodeId) { $this->JumpToBasketPage(); } else { $oNode = new TdbCmsTree(); if ($oNode->Load($iRequestRedirectNodeId)) { $url = $this->getTreeService()->getLinkToPageForTreeRelative($oNode); $this->getRedirect()->redirect($url); } else { $this->RedirectToCallingPage(); } } } }
php
protected function RedirectAfterEvent($iRequestRedirectNodeId) { if (is_null($iRequestRedirectNodeId)) { $this->RedirectToCallingPage(); } else { $checkoutSystemPage = $this->getSystemPageService()->getSystemPage('checkout'); if (null !== $checkoutSystemPage && $checkoutSystemPage->fieldCmsTreeId == $iRequestRedirectNodeId) { $this->JumpToBasketPage(); } else { $oNode = new TdbCmsTree(); if ($oNode->Load($iRequestRedirectNodeId)) { $url = $this->getTreeService()->getLinkToPageForTreeRelative($oNode); $this->getRedirect()->redirect($url); } else { $this->RedirectToCallingPage(); } } } }
[ "protected", "function", "RedirectAfterEvent", "(", "$", "iRequestRedirectNodeId", ")", "{", "if", "(", "is_null", "(", "$", "iRequestRedirectNodeId", ")", ")", "{", "$", "this", "->", "RedirectToCallingPage", "(", ")", ";", "}", "else", "{", "$", "checkoutSys...
redirects the user to the requested node after performing some action. @param string|int $iRequestRedirectNodeId
[ "redirects", "the", "user", "to", "the", "requested", "node", "after", "performing", "some", "action", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php#L1005-L1023
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php
MTShopBasketCoreEndpoint._AllowCache
public function _AllowCache() { if (0 != TShopBasket::GetInstance()->iTotalNumberOfUniqueArticles) { return false; } if (true === $this->cacheDisabledBecauseBasketHasMessages()) { return false; } return true; }
php
public function _AllowCache() { if (0 != TShopBasket::GetInstance()->iTotalNumberOfUniqueArticles) { return false; } if (true === $this->cacheDisabledBecauseBasketHasMessages()) { return false; } return true; }
[ "public", "function", "_AllowCache", "(", ")", "{", "if", "(", "0", "!=", "TShopBasket", "::", "GetInstance", "(", ")", "->", "iTotalNumberOfUniqueArticles", ")", "{", "return", "false", ";", "}", "if", "(", "true", "===", "$", "this", "->", "cacheDisabled...
if this function returns true, then the result of the execute function will be cached. @deprecated - use a mapper instead (see getMapper) @return bool
[ "if", "this", "function", "returns", "true", "then", "the", "result", "of", "the", "execute", "function", "will", "be", "cached", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopBasketCore/MTShopBasketCoreEndpoint.class.php#L1050-L1061
train
CVO-Technologies/cakephp-github
src/Webservice/EventsWebservice.php
EventsWebservice._stream
protected function _stream($url, array $queryParameters) { while (true) { $this->_lastTime = time(); $options = []; if ($this->_lastEtag) { $options['headers']['If-None-Match'] = $this->_lastEtag; } /* @var Response $response */ $response = $this->driver()->client()->get($url, $queryParameters, $options); if ((!$response->isOk()) && ($response->statusCode() != 304)) { switch ($response->statusCode()) { case 403: if ($response->header('X-Ratelimit-Remaining') == 0) { var_dump($response); throw new RateLimitExceededException([$response->header('X-Ratelimit-Remaining')]); } } return; } if ($response->statusCode() != 304) { $this->_lastEtag = $response->header('Etag'); $this->_lastPollInterval = $response->header('X-Poll-Interval'); $resources = array_reverse($response->json); foreach ($resources as $resource) { if (in_array($resource['id'], $this->_lastIds)) { continue; } array_unshift($this->_lastIds, $resource['id']); yield $resource; } $this->_lastIds = array_splice($this->_lastIds, 0, 30); } $sleepingTime = $this->_lastPollInterval - (time() - $this->_lastTime); if ($sleepingTime > 0) { sleep($sleepingTime); } } }
php
protected function _stream($url, array $queryParameters) { while (true) { $this->_lastTime = time(); $options = []; if ($this->_lastEtag) { $options['headers']['If-None-Match'] = $this->_lastEtag; } /* @var Response $response */ $response = $this->driver()->client()->get($url, $queryParameters, $options); if ((!$response->isOk()) && ($response->statusCode() != 304)) { switch ($response->statusCode()) { case 403: if ($response->header('X-Ratelimit-Remaining') == 0) { var_dump($response); throw new RateLimitExceededException([$response->header('X-Ratelimit-Remaining')]); } } return; } if ($response->statusCode() != 304) { $this->_lastEtag = $response->header('Etag'); $this->_lastPollInterval = $response->header('X-Poll-Interval'); $resources = array_reverse($response->json); foreach ($resources as $resource) { if (in_array($resource['id'], $this->_lastIds)) { continue; } array_unshift($this->_lastIds, $resource['id']); yield $resource; } $this->_lastIds = array_splice($this->_lastIds, 0, 30); } $sleepingTime = $this->_lastPollInterval - (time() - $this->_lastTime); if ($sleepingTime > 0) { sleep($sleepingTime); } } }
[ "protected", "function", "_stream", "(", "$", "url", ",", "array", "$", "queryParameters", ")", "{", "while", "(", "true", ")", "{", "$", "this", "->", "_lastTime", "=", "time", "(", ")", ";", "$", "options", "=", "[", "]", ";", "if", "(", "$", "...
Stream results from the events endpoint. @param string $url Endpoint to stream events from. @param array $queryParameters Query parameters to send @return \Generator|void
[ "Stream", "results", "from", "the", "events", "endpoint", "." ]
43647e53fd87a3ab93fe2f24ce3686b594d36241
https://github.com/CVO-Technologies/cakephp-github/blob/43647e53fd87a3ab93fe2f24ce3686b594d36241/src/Webservice/EventsWebservice.php#L81-L127
train
CVO-Technologies/cakephp-github
src/Webservice/EventsWebservice.php
EventsWebservice._transformStreamResponses
protected function _transformStreamResponses(Endpoint $endpoint, \Iterator $resources) { foreach ($resources as $resource) { yield $this->_transformResource($endpoint, $resource); } }
php
protected function _transformStreamResponses(Endpoint $endpoint, \Iterator $resources) { foreach ($resources as $resource) { yield $this->_transformResource($endpoint, $resource); } }
[ "protected", "function", "_transformStreamResponses", "(", "Endpoint", "$", "endpoint", ",", "\\", "Iterator", "$", "resources", ")", "{", "foreach", "(", "$", "resources", "as", "$", "resource", ")", "{", "yield", "$", "this", "->", "_transformResource", "(",...
Transforms streamed responses into resources @param \Muffin\Webservice\Model\Endpoint $endpoint Endpoint to use for resource class @param \Iterator $resources Iterator to get responses from @yield \Muffin\Webservice\Model\Resource Webservice resource @return \Generator Resource generator @throws \Exception HTTP exception
[ "Transforms", "streamed", "responses", "into", "resources" ]
43647e53fd87a3ab93fe2f24ce3686b594d36241
https://github.com/CVO-Technologies/cakephp-github/blob/43647e53fd87a3ab93fe2f24ce3686b594d36241/src/Webservice/EventsWebservice.php#L138-L143
train
PGB-LIV/php-ms
src/Utility/Digest/AbstractDigest.php
AbstractDigest.setMaxMissedCleavage
public function setMaxMissedCleavage($maxMissedCleavage) { if (! is_int($maxMissedCleavage)) { throw new \InvalidArgumentException( 'Invalid argument type, integer expected. Received ' . gettype($maxMissedCleavage)); } $this->maxMissedCleavage = $maxMissedCleavage; }
php
public function setMaxMissedCleavage($maxMissedCleavage) { if (! is_int($maxMissedCleavage)) { throw new \InvalidArgumentException( 'Invalid argument type, integer expected. Received ' . gettype($maxMissedCleavage)); } $this->maxMissedCleavage = $maxMissedCleavage; }
[ "public", "function", "setMaxMissedCleavage", "(", "$", "maxMissedCleavage", ")", "{", "if", "(", "!", "is_int", "(", "$", "maxMissedCleavage", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Invalid argument type, integer expected. Received '", ...
Set the maximum number of missed cleavages the algorithm should produce. By default no missed cleavages are produced. @param int $maxMissedCleavage Maximum number of cleavages to account for
[ "Set", "the", "maximum", "number", "of", "missed", "cleavages", "the", "algorithm", "should", "produce", ".", "By", "default", "no", "missed", "cleavages", "are", "produced", "." ]
091751eb12512f4bc6ada07bda745ce49331e24f
https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Utility/Digest/AbstractDigest.php#L58-L66
train
PGB-LIV/php-ms
src/Utility/Digest/AbstractDigest.php
AbstractDigest.setNmeEnabled
public function setNmeEnabled($isNmeEnabled) { if (! is_bool($isNmeEnabled)) { throw new \InvalidArgumentException( 'Invalid argument type, bool expected. Received ' . gettype($isNmeEnabled)); } $this->isNmeEnabled = $isNmeEnabled; }
php
public function setNmeEnabled($isNmeEnabled) { if (! is_bool($isNmeEnabled)) { throw new \InvalidArgumentException( 'Invalid argument type, bool expected. Received ' . gettype($isNmeEnabled)); } $this->isNmeEnabled = $isNmeEnabled; }
[ "public", "function", "setNmeEnabled", "(", "$", "isNmeEnabled", ")", "{", "if", "(", "!", "is_bool", "(", "$", "isNmeEnabled", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Invalid argument type, bool expected. Received '", ".", "gettype",...
Sets whether n-terminal methionine excision should be performed. When enabled any methionine at the n-terminus of a protein will be removed. Both the excised and non-excised peptide will be returned after digestion. Defaults to true. @param bool $isNmeEnabled Set true to enable n-terminal methionine excision
[ "Sets", "whether", "n", "-", "terminal", "methionine", "excision", "should", "be", "performed", ".", "When", "enabled", "any", "methionine", "at", "the", "n", "-", "terminus", "of", "a", "protein", "will", "be", "removed", ".", "Both", "the", "excised", "a...
091751eb12512f4bc6ada07bda745ce49331e24f
https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Utility/Digest/AbstractDigest.php#L87-L95
train
PGB-LIV/php-ms
src/Utility/Digest/AbstractDigest.php
AbstractDigest.performMethionineExcision
private function performMethionineExcision(array $peptides) { $nmePeptides = array(); foreach ($peptides as $peptide) { $entry = $peptide->getProteins()[0]; if ($entry->getStart() > 0) { continue; } $sequence = $peptide->getSequence(); if (strlen($sequence) <= 1) { continue; } if ($sequence[0] != 'M') { continue; } $nmePeptide = new Peptide(); $nmePeptide->setSequence(substr($sequence, 1)); $nmePeptide->addProtein($entry->getProtein(), 1, $entry->getEnd()); $nmePeptide->setMissedCleavageCount($peptide->getMissedCleavageCount()); $nmePeptides[] = $nmePeptide; } return array_merge($peptides, $nmePeptides); }
php
private function performMethionineExcision(array $peptides) { $nmePeptides = array(); foreach ($peptides as $peptide) { $entry = $peptide->getProteins()[0]; if ($entry->getStart() > 0) { continue; } $sequence = $peptide->getSequence(); if (strlen($sequence) <= 1) { continue; } if ($sequence[0] != 'M') { continue; } $nmePeptide = new Peptide(); $nmePeptide->setSequence(substr($sequence, 1)); $nmePeptide->addProtein($entry->getProtein(), 1, $entry->getEnd()); $nmePeptide->setMissedCleavageCount($peptide->getMissedCleavageCount()); $nmePeptides[] = $nmePeptide; } return array_merge($peptides, $nmePeptides); }
[ "private", "function", "performMethionineExcision", "(", "array", "$", "peptides", ")", "{", "$", "nmePeptides", "=", "array", "(", ")", ";", "foreach", "(", "$", "peptides", "as", "$", "peptide", ")", "{", "$", "entry", "=", "$", "peptide", "->", "getPr...
Performs methionine excision on an array of peptides @param Peptide $peptides @return Peptide[]
[ "Performs", "methionine", "excision", "on", "an", "array", "of", "peptides" ]
091751eb12512f4bc6ada07bda745ce49331e24f
https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Utility/Digest/AbstractDigest.php#L131-L160
train
PGB-LIV/php-ms
src/Core/Entry/ProteinEntry.php
ProteinEntry.setStart
public function setStart($position) { if (! is_int($position)) { throw new \InvalidArgumentException( 'Argument 1 must be of type integer. Argument type is ' . gettype($position)); } $this->start = $position; }
php
public function setStart($position) { if (! is_int($position)) { throw new \InvalidArgumentException( 'Argument 1 must be of type integer. Argument type is ' . gettype($position)); } $this->start = $position; }
[ "public", "function", "setStart", "(", "$", "position", ")", "{", "if", "(", "!", "is_int", "(", "$", "position", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Argument 1 must be of type integer. Argument type is '", ".", "gettype", "(", ...
Sets the start position of the parent object inside the protein @param int $position @throws \InvalidArgumentException If argument is non-integer
[ "Sets", "the", "start", "position", "of", "the", "parent", "object", "inside", "the", "protein" ]
091751eb12512f4bc6ada07bda745ce49331e24f
https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Core/Entry/ProteinEntry.php#L78-L86
train
PGB-LIV/php-ms
src/Core/Entry/ProteinEntry.php
ProteinEntry.setEnd
public function setEnd($position) { if (! is_int($position)) { throw new \InvalidArgumentException( 'Argument 1 must be of type integer. Argument type is ' . gettype($position)); } $this->end = $position; }
php
public function setEnd($position) { if (! is_int($position)) { throw new \InvalidArgumentException( 'Argument 1 must be of type integer. Argument type is ' . gettype($position)); } $this->end = $position; }
[ "public", "function", "setEnd", "(", "$", "position", ")", "{", "if", "(", "!", "is_int", "(", "$", "position", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Argument 1 must be of type integer. Argument type is '", ".", "gettype", "(", ...
Sets the end position of the parent object inside the protein @param int $position @throws \InvalidArgumentException If argument is non-integer
[ "Sets", "the", "end", "position", "of", "the", "parent", "object", "inside", "the", "protein" ]
091751eb12512f4bc6ada07bda745ce49331e24f
https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Core/Entry/ProteinEntry.php#L104-L112
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/db/TShopVariantSet.class.php
TShopVariantSet.GetChangableFieldNames
public function GetChangableFieldNames() { $aFieldNames = $this->GetFromInternalCache('aChangableFieldNames'); if (is_null($aFieldNames)) { $aFieldNames = array(); $oFields = $this->GetFieldCmsFieldConfList(); while ($oField = $oFields->Next()) { $aFieldNames[] = $oField->fieldName; } $oFields->GoToStart(); $this->SetInternalCache('aChangableFieldNames', $aFieldNames); } return $aFieldNames; }
php
public function GetChangableFieldNames() { $aFieldNames = $this->GetFromInternalCache('aChangableFieldNames'); if (is_null($aFieldNames)) { $aFieldNames = array(); $oFields = $this->GetFieldCmsFieldConfList(); while ($oField = $oFields->Next()) { $aFieldNames[] = $oField->fieldName; } $oFields->GoToStart(); $this->SetInternalCache('aChangableFieldNames', $aFieldNames); } return $aFieldNames; }
[ "public", "function", "GetChangableFieldNames", "(", ")", "{", "$", "aFieldNames", "=", "$", "this", "->", "GetFromInternalCache", "(", "'aChangableFieldNames'", ")", ";", "if", "(", "is_null", "(", "$", "aFieldNames", ")", ")", "{", "$", "aFieldNames", "=", ...
return an array of fields that may be edited for variants of this set. @return array
[ "return", "an", "array", "of", "fields", "that", "may", "be", "edited", "for", "variants", "of", "this", "set", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopVariantSet.class.php#L19-L33
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/db/TShopVariantSet.class.php
TShopVariantSet.AllowEditOfField
public function AllowEditOfField($sFieldName) { $aFieldsEditable = $this->GetChangableFieldNames(); $sFieldName = str_replace('`', '', $sFieldName); return in_array($sFieldName, $aFieldsEditable); }
php
public function AllowEditOfField($sFieldName) { $aFieldsEditable = $this->GetChangableFieldNames(); $sFieldName = str_replace('`', '', $sFieldName); return in_array($sFieldName, $aFieldsEditable); }
[ "public", "function", "AllowEditOfField", "(", "$", "sFieldName", ")", "{", "$", "aFieldsEditable", "=", "$", "this", "->", "GetChangableFieldNames", "(", ")", ";", "$", "sFieldName", "=", "str_replace", "(", "'`'", ",", "''", ",", "$", "sFieldName", ")", ...
returns true if the field name passed is allowed to be edtited for variants of this set type. @param string $sFieldName @return bool
[ "returns", "true", "if", "the", "field", "name", "passed", "is", "allowed", "to", "be", "edtited", "for", "variants", "of", "this", "set", "type", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopVariantSet.class.php#L42-L48
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/db/TShopVariantSet.class.php
TShopVariantSet.GetVariantTypeForIdentifier
public function GetVariantTypeForIdentifier($sVariantTypeIdentifier) { $oType = &$this->GetFromInternalCache('VariantTypeForIdentifier'.$sVariantTypeIdentifier); if (is_null($oType)) { $oType = TdbShopVariantType::GetNewInstance(); /** @var $oType TdbShopVariantType */ if (!$oType->Loadfromfields(array('shop_variant_set_id' => $this->id, 'identifier' => $sVariantTypeIdentifier))) { $oType = null; } $this->SetInternalCache('VariantTypeForIdentifier'.$sVariantTypeIdentifier, $oType); } return $oType; }
php
public function GetVariantTypeForIdentifier($sVariantTypeIdentifier) { $oType = &$this->GetFromInternalCache('VariantTypeForIdentifier'.$sVariantTypeIdentifier); if (is_null($oType)) { $oType = TdbShopVariantType::GetNewInstance(); /** @var $oType TdbShopVariantType */ if (!$oType->Loadfromfields(array('shop_variant_set_id' => $this->id, 'identifier' => $sVariantTypeIdentifier))) { $oType = null; } $this->SetInternalCache('VariantTypeForIdentifier'.$sVariantTypeIdentifier, $oType); } return $oType; }
[ "public", "function", "GetVariantTypeForIdentifier", "(", "$", "sVariantTypeIdentifier", ")", "{", "$", "oType", "=", "&", "$", "this", "->", "GetFromInternalCache", "(", "'VariantTypeForIdentifier'", ".", "$", "sVariantTypeIdentifier", ")", ";", "if", "(", "is_null...
return the variant type with the identifier. @param string $sVariantTypeIdentifier @return TdbShopVariantType
[ "return", "the", "variant", "type", "with", "the", "identifier", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopVariantSet.class.php#L73-L86
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Model/Constraints.php
OffAmazonPaymentsService_Model_Constraints.setConstraint
public function setConstraint($constraint) { if (!$this->_isNumericArray($constraint)) { $constraint = array ($constraint); } $this->_fields['Constraint']['FieldValue'] = $constraint; return $this; }
php
public function setConstraint($constraint) { if (!$this->_isNumericArray($constraint)) { $constraint = array ($constraint); } $this->_fields['Constraint']['FieldValue'] = $constraint; return $this; }
[ "public", "function", "setConstraint", "(", "$", "constraint", ")", "{", "if", "(", "!", "$", "this", "->", "_isNumericArray", "(", "$", "constraint", ")", ")", "{", "$", "constraint", "=", "array", "(", "$", "constraint", ")", ";", "}", "$", "this", ...
Sets the value of the Constraint. @param mixed Constraint or an array of Constraint Constraint @return this instance
[ "Sets", "the", "value", "of", "the", "Constraint", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Model/Constraints.php#L75-L82
train
PGB-LIV/php-ms
src/Core/Peptide.php
Peptide.getMolecularFormula
public function getMolecularFormula() { $acids = str_split($this->getSequence(), 1); $frequency = array( 'C' => 0, 'H' => 0, 'N' => 0, 'O' => 0, 'S' => 0 ); foreach ($acids as $acid) { $composition = AminoAcidComposition::getFormula($acid); $matches = array(); preg_match_all('/([A-Z][a-z]?)([0-9]*)/', $composition, $matches, PREG_SET_ORDER); foreach ($matches as $match) { $chemical = $match[1]; $count = $match[2]; if (! isset($frequency[$chemical])) { $frequency[$chemical] = 0; } $frequency[$chemical] += $count == '' ? 1 : $count; } } // Remove hydrogen and oxygen from C-TERM $frequency['H'] -= count($acids) - 1; $frequency['O'] -= count($acids) - 1; // Remove hydrogen from N-TERM. $frequency['H'] -= count($acids) - 1; $formula = ''; foreach ($frequency as $chemical => $count) { if ($count == 0) { continue; } $formula .= $chemical; if ($count > 1) { $formula .= $count; } } return $formula; }
php
public function getMolecularFormula() { $acids = str_split($this->getSequence(), 1); $frequency = array( 'C' => 0, 'H' => 0, 'N' => 0, 'O' => 0, 'S' => 0 ); foreach ($acids as $acid) { $composition = AminoAcidComposition::getFormula($acid); $matches = array(); preg_match_all('/([A-Z][a-z]?)([0-9]*)/', $composition, $matches, PREG_SET_ORDER); foreach ($matches as $match) { $chemical = $match[1]; $count = $match[2]; if (! isset($frequency[$chemical])) { $frequency[$chemical] = 0; } $frequency[$chemical] += $count == '' ? 1 : $count; } } // Remove hydrogen and oxygen from C-TERM $frequency['H'] -= count($acids) - 1; $frequency['O'] -= count($acids) - 1; // Remove hydrogen from N-TERM. $frequency['H'] -= count($acids) - 1; $formula = ''; foreach ($frequency as $chemical => $count) { if ($count == 0) { continue; } $formula .= $chemical; if ($count > 1) { $formula .= $count; } } return $formula; }
[ "public", "function", "getMolecularFormula", "(", ")", "{", "$", "acids", "=", "str_split", "(", "$", "this", "->", "getSequence", "(", ")", ",", "1", ")", ";", "$", "frequency", "=", "array", "(", "'C'", "=>", "0", ",", "'H'", "=>", "0", ",", "'N'...
Gets the molecular formula for this peptide string. @return string Molecular formula
[ "Gets", "the", "molecular", "formula", "for", "this", "peptide", "string", "." ]
091751eb12512f4bc6ada07bda745ce49331e24f
https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Core/Peptide.php#L119-L170
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/TCMSSmartURLHandler/TCMSSmartURLHandler_ShopIPayment.class.php
TCMSSmartURLHandler_ShopIPayment.SetStepParameter
protected function SetStepParameter($oStep) { $bParameterSet = false; $oBasket = TShopBasket::GetInstance(); $oGlobal = TGlobal::instance(); $sPaymentMethodId = $oGlobal->GetUserData('shop_payment_method_id'); $oActivePaymentMethod = TdbShopPaymentMethod::GetNewInstance(); if ($oActivePaymentMethod->load($sPaymentMethodId)) { $bParameterSet = $oBasket->SetActivePaymentMethod($oActivePaymentMethod); } return $bParameterSet; }
php
protected function SetStepParameter($oStep) { $bParameterSet = false; $oBasket = TShopBasket::GetInstance(); $oGlobal = TGlobal::instance(); $sPaymentMethodId = $oGlobal->GetUserData('shop_payment_method_id'); $oActivePaymentMethod = TdbShopPaymentMethod::GetNewInstance(); if ($oActivePaymentMethod->load($sPaymentMethodId)) { $bParameterSet = $oBasket->SetActivePaymentMethod($oActivePaymentMethod); } return $bParameterSet; }
[ "protected", "function", "SetStepParameter", "(", "$", "oStep", ")", "{", "$", "bParameterSet", "=", "false", ";", "$", "oBasket", "=", "TShopBasket", "::", "GetInstance", "(", ")", ";", "$", "oGlobal", "=", "TGlobal", "::", "instance", "(", ")", ";", "$...
Set needed parameter for next step like step completed and active payment method. @param TShopOrderStep $oStep @return bool $bParameterSet
[ "Set", "needed", "parameter", "for", "next", "step", "like", "step", "completed", "and", "active", "payment", "method", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TCMSSmartURLHandler/TCMSSmartURLHandler_ShopIPayment.class.php#L62-L74
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/TCMSSmartURLHandler/TCMSSmartURLHandler_ShopIPayment.class.php
TCMSSmartURLHandler_ShopIPayment.DeleteNotExecutedOrder
protected function DeleteNotExecutedOrder($sUniqId) { $oNotExecutedOrder = TdbShopOrder::GetNewInstance(); if ($oNotExecutedOrder->LoadFromField('order_ident', $sUniqId)) { $oNotExecutedOrder->AllowEditByAll(true); $oNotExecutedOrder->Delete(); $oNotExecutedOrder->AllowEditByAll(false); unset($_SESSION[TShopBasket::SESSION_KEY_PROCESSING_BASKET]); } }
php
protected function DeleteNotExecutedOrder($sUniqId) { $oNotExecutedOrder = TdbShopOrder::GetNewInstance(); if ($oNotExecutedOrder->LoadFromField('order_ident', $sUniqId)) { $oNotExecutedOrder->AllowEditByAll(true); $oNotExecutedOrder->Delete(); $oNotExecutedOrder->AllowEditByAll(false); unset($_SESSION[TShopBasket::SESSION_KEY_PROCESSING_BASKET]); } }
[ "protected", "function", "DeleteNotExecutedOrder", "(", "$", "sUniqId", ")", "{", "$", "oNotExecutedOrder", "=", "TdbShopOrder", "::", "GetNewInstance", "(", ")", ";", "if", "(", "$", "oNotExecutedOrder", "->", "LoadFromField", "(", "'order_ident'", ",", "$", "s...
Delete existing order if payment wasnt done correctly. @param string $sUniqId
[ "Delete", "existing", "order", "if", "payment", "wasnt", "done", "correctly", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TCMSSmartURLHandler/TCMSSmartURLHandler_ShopIPayment.class.php#L81-L90
train
sylingd/Yesf
src/Http/Router.php
Router.parseMap
private function parseMap(Request $request) { //解析 $res = explode('/', trim($request->uri, '/'), 3); if (count($res) === 3) { $request->module = $res[0]; $request->controller = $res[1]; $request->action = $res[2]; } else { $request->module = $this->module; $request->controller = $res[0]; $request->action = $res[1]; } return true; }
php
private function parseMap(Request $request) { //解析 $res = explode('/', trim($request->uri, '/'), 3); if (count($res) === 3) { $request->module = $res[0]; $request->controller = $res[1]; $request->action = $res[2]; } else { $request->module = $this->module; $request->controller = $res[0]; $request->action = $res[1]; } return true; }
[ "private", "function", "parseMap", "(", "Request", "$", "request", ")", "{", "//解析", "$", "res", "=", "explode", "(", "'/'", ",", "trim", "(", "$", "request", "->", "uri", ",", "'/'", ")", ",", "3", ")", ";", "if", "(", "count", "(", "$", "res", ...
Parse request in map way @access private @param Request $request @return bool
[ "Parse", "request", "in", "map", "way" ]
0fc2b42903bb3519c54c596270c890c826aeb1df
https://github.com/sylingd/Yesf/blob/0fc2b42903bb3519c54c596270c890c826aeb1df/src/Http/Router.php#L124-L137
train
sylingd/Yesf
src/Http/Router.php
Router.parseBy
private function parseBy($rules, Request $request) { foreach ($rules as $rewrite) { if (isset($rewrite['uri'])) { if ($request->uri === $rewrite['uri']) { $dispatch = $rewrite['dispatch']; break; } } else { if (preg_match($rewrite['regex'], $request->uri, $matches)) { $param = []; unset($matches[0]); //参数 foreach ($rewrite['param'] as $k => $v) { $param[$v] = $matches[$k + 1]; } $dispatch = $rewrite['dispatch']; if ($dispatch instanceof \Closure) { $dispatch = $dispatch($param); if ($dispatch === null) { unset($dispatch); continue; } } break; } } } if (isset($dispatch)) { $request->module = isset($dispatch['module']) ? $dispatch['module'] : $this->module; $request->controller = $dispatch['controller']; $request->action = $dispatch['action']; if (isset($param)) { $request->param = $param; } return true; } return false; }
php
private function parseBy($rules, Request $request) { foreach ($rules as $rewrite) { if (isset($rewrite['uri'])) { if ($request->uri === $rewrite['uri']) { $dispatch = $rewrite['dispatch']; break; } } else { if (preg_match($rewrite['regex'], $request->uri, $matches)) { $param = []; unset($matches[0]); //参数 foreach ($rewrite['param'] as $k => $v) { $param[$v] = $matches[$k + 1]; } $dispatch = $rewrite['dispatch']; if ($dispatch instanceof \Closure) { $dispatch = $dispatch($param); if ($dispatch === null) { unset($dispatch); continue; } } break; } } } if (isset($dispatch)) { $request->module = isset($dispatch['module']) ? $dispatch['module'] : $this->module; $request->controller = $dispatch['controller']; $request->action = $dispatch['action']; if (isset($param)) { $request->param = $param; } return true; } return false; }
[ "private", "function", "parseBy", "(", "$", "rules", ",", "Request", "$", "request", ")", "{", "foreach", "(", "$", "rules", "as", "$", "rewrite", ")", "{", "if", "(", "isset", "(", "$", "rewrite", "[", "'uri'", "]", ")", ")", "{", "if", "(", "$"...
Parse request with given rules @access private @param array $rules @param Request $request @return bool
[ "Parse", "request", "with", "given", "rules" ]
0fc2b42903bb3519c54c596270c890c826aeb1df
https://github.com/sylingd/Yesf/blob/0fc2b42903bb3519c54c596270c890c826aeb1df/src/Http/Router.php#L146-L183
train
sylingd/Yesf
src/Http/Router.php
Router.parse
public function parse(Request $request) { $len = strlen($this->prefix); //路由解析 $uri = $request->server['request_uri']; if (strpos('?', $uri) !== false) { $uri = substr($uri, 0, strpos($uri, '?')); } //去除开头的prefix if ($len > 0 && strpos($uri, $this->prefix) === 0) { $uri = substr($uri, $len); } $request->uri = $uri; $res = false; if (isset($this->routes[$request->server['request_method']])) { $res = $this->parseBy($this->routes[$request->server['request_method']], $request); } if ($res === false && isset($this->routes['any'])) { $res = $this->parseBy($this->routes['any'], $request); } if ($res === false) { if ($this->enable_map) { //为空则读取默认设置 if (empty($uri) || $uri === '/') { $request->module = $this->module; $request->controller = 'index'; $request->action = 'index'; } else { if ($this->enable_extension) { $hasPoint = strrpos($uri, '.'); if ($hasPoint !== false) { $request->extension = substr($uri, $hasPoint + 1); $uri = substr($uri, 0, $hasPoint); $request->uri = $uri; } } $this->parseMap($request); } } } }
php
public function parse(Request $request) { $len = strlen($this->prefix); //路由解析 $uri = $request->server['request_uri']; if (strpos('?', $uri) !== false) { $uri = substr($uri, 0, strpos($uri, '?')); } //去除开头的prefix if ($len > 0 && strpos($uri, $this->prefix) === 0) { $uri = substr($uri, $len); } $request->uri = $uri; $res = false; if (isset($this->routes[$request->server['request_method']])) { $res = $this->parseBy($this->routes[$request->server['request_method']], $request); } if ($res === false && isset($this->routes['any'])) { $res = $this->parseBy($this->routes['any'], $request); } if ($res === false) { if ($this->enable_map) { //为空则读取默认设置 if (empty($uri) || $uri === '/') { $request->module = $this->module; $request->controller = 'index'; $request->action = 'index'; } else { if ($this->enable_extension) { $hasPoint = strrpos($uri, '.'); if ($hasPoint !== false) { $request->extension = substr($uri, $hasPoint + 1); $uri = substr($uri, 0, $hasPoint); $request->uri = $uri; } } $this->parseMap($request); } } } }
[ "public", "function", "parse", "(", "Request", "$", "request", ")", "{", "$", "len", "=", "strlen", "(", "$", "this", "->", "prefix", ")", ";", "//路由解析", "$", "uri", "=", "$", "request", "->", "server", "[", "'request_uri'", "]", ";", "if", "(", "s...
Parse a request @access public @param Request $request
[ "Parse", "a", "request" ]
0fc2b42903bb3519c54c596270c890c826aeb1df
https://github.com/sylingd/Yesf/blob/0fc2b42903bb3519c54c596270c890c826aeb1df/src/Http/Router.php#L206-L245
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.quoteApplicationVersion
private function quoteApplicationVersion($s) { $quotedString = $this->collapseWhitespace($s); $quotedString = preg_replace('/\\\\/', '\\\\\\\\', $quotedString); $quotedString = preg_replace('/\\(/', '\\(', $quotedString); return $quotedString; }
php
private function quoteApplicationVersion($s) { $quotedString = $this->collapseWhitespace($s); $quotedString = preg_replace('/\\\\/', '\\\\\\\\', $quotedString); $quotedString = preg_replace('/\\(/', '\\(', $quotedString); return $quotedString; }
[ "private", "function", "quoteApplicationVersion", "(", "$", "s", ")", "{", "$", "quotedString", "=", "$", "this", "->", "collapseWhitespace", "(", "$", "s", ")", ";", "$", "quotedString", "=", "preg_replace", "(", "'/\\\\\\\\/'", ",", "'\\\\\\\\\\\\\\\\'", ","...
Collapse multiple whitespace characters into a single ' ' and backslash escape '\', and '(' characters from a string. @param $s @return string
[ "Collapse", "multiple", "whitespace", "characters", "into", "a", "single", "and", "backslash", "escape", "\\", "and", "(", "characters", "from", "a", "string", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L259-L265
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.quoteAttributeName
private function quoteAttributeName($s) { $quotedString = $this->collapseWhitespace($s); $quotedString = preg_replace('/\\\\/', '\\\\\\\\', $quotedString); $quotedString = preg_replace('/\\=/', '\\=', $quotedString); return $quotedString; }
php
private function quoteAttributeName($s) { $quotedString = $this->collapseWhitespace($s); $quotedString = preg_replace('/\\\\/', '\\\\\\\\', $quotedString); $quotedString = preg_replace('/\\=/', '\\=', $quotedString); return $quotedString; }
[ "private", "function", "quoteAttributeName", "(", "$", "s", ")", "{", "$", "quotedString", "=", "$", "this", "->", "collapseWhitespace", "(", "$", "s", ")", ";", "$", "quotedString", "=", "preg_replace", "(", "'/\\\\\\\\/'", ",", "'\\\\\\\\\\\\\\\\'", ",", "...
Collapse multiple whitespace characters into a single ' ' and backslash escape '\', and '=' characters from a string. @param $s @return unknown_type
[ "Collapse", "multiple", "whitespace", "characters", "into", "a", "single", "and", "backslash", "escape", "\\", "and", "=", "characters", "from", "a", "string", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L274-L280
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.quoteAttributeValue
private function quoteAttributeValue($s) { $quotedString = $this->collapseWhitespace($s); $quotedString = preg_replace('/\\\\/', '\\\\\\\\', $quotedString); $quotedString = preg_replace('/\\;/', '\\;', $quotedString); $quotedString = preg_replace('/\\)/', '\\)', $quotedString); return $quotedString; }
php
private function quoteAttributeValue($s) { $quotedString = $this->collapseWhitespace($s); $quotedString = preg_replace('/\\\\/', '\\\\\\\\', $quotedString); $quotedString = preg_replace('/\\;/', '\\;', $quotedString); $quotedString = preg_replace('/\\)/', '\\)', $quotedString); return $quotedString; }
[ "private", "function", "quoteAttributeValue", "(", "$", "s", ")", "{", "$", "quotedString", "=", "$", "this", "->", "collapseWhitespace", "(", "$", "s", ")", ";", "$", "quotedString", "=", "preg_replace", "(", "'/\\\\\\\\/'", ",", "'\\\\\\\\\\\\\\\\'", ",", ...
Collapse multiple whitespace characters into a single ' ' and backslash escape ';', '\', and ')' characters from a string. @param $s @return unknown_type
[ "Collapse", "multiple", "whitespace", "characters", "into", "a", "single", "and", "backslash", "escape", ";", "\\", "and", ")", "characters", "from", "a", "string", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L289-L296
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.getRefundDetails
public function getRefundDetails($request) { if (!$request instanceof OffAmazonPaymentsService_Model_GetRefundDetailsRequest) { $request = new OffAmazonPaymentsService_Model_GetRefundDetailsRequest($request); } $httpResponse = $this->_invoke($this->_convertGetRefundDetails($request)); $response = OffAmazonPaymentsService_Model_GetRefundDetailsResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
php
public function getRefundDetails($request) { if (!$request instanceof OffAmazonPaymentsService_Model_GetRefundDetailsRequest) { $request = new OffAmazonPaymentsService_Model_GetRefundDetailsRequest($request); } $httpResponse = $this->_invoke($this->_convertGetRefundDetails($request)); $response = OffAmazonPaymentsService_Model_GetRefundDetailsResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
[ "public", "function", "getRefundDetails", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "OffAmazonPaymentsService_Model_GetRefundDetailsRequest", ")", "{", "$", "request", "=", "new", "OffAmazonPaymentsService_Model_GetRefundDetailsRequest", ...
Get Refund Details @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetRefundDetailsRequest request or OffAmazonPaymentsService_Model_GetRefundDetailsRequest object itself @see OffAmazonPaymentsService_Model_GetRefundDetails @return OffAmazonPaymentsService_Model_GetRefundDetailsResponse OffAmazonPaymentsService_Model_GetRefundDetailsResponse @throws OffAmazonPaymentsService_Exception
[ "Get", "Refund", "Details" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L382-L391
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.getCaptureDetails
public function getCaptureDetails($request) { if (!$request instanceof OffAmazonPaymentsService_Model_GetCaptureDetailsRequest) { $request = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest($request); } $httpResponse = $this->_invoke($this->_convertGetCaptureDetails($request)); $response = OffAmazonPaymentsService_Model_GetCaptureDetailsResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
php
public function getCaptureDetails($request) { if (!$request instanceof OffAmazonPaymentsService_Model_GetCaptureDetailsRequest) { $request = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest($request); } $httpResponse = $this->_invoke($this->_convertGetCaptureDetails($request)); $response = OffAmazonPaymentsService_Model_GetCaptureDetailsResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
[ "public", "function", "getCaptureDetails", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "OffAmazonPaymentsService_Model_GetCaptureDetailsRequest", ")", "{", "$", "request", "=", "new", "OffAmazonPaymentsService_Model_GetCaptureDetailsRequest"...
Get Capture Details @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetCaptureDetailsRequest request or OffAmazonPaymentsService_Model_GetCaptureDetailsRequest object itself @see OffAmazonPaymentsService_Model_GetCaptureDetails @return OffAmazonPaymentsService_Model_GetCaptureDetailsResponse OffAmazonPaymentsService_Model_GetCaptureDetailsResponse @throws OffAmazonPaymentsService_Exception
[ "Get", "Capture", "Details" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L405-L414
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.closeOrderReference
public function closeOrderReference($request) { if (!$request instanceof OffAmazonPaymentsService_Model_CloseOrderReferenceRequest) { $request = new OffAmazonPaymentsService_Model_CloseOrderReferenceRequest($request); }; $httpResponse = $this->_invoke($this->_convertCloseOrderReference($request)); $response = OffAmazonPaymentsService_Model_CloseOrderReferenceResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
php
public function closeOrderReference($request) { if (!$request instanceof OffAmazonPaymentsService_Model_CloseOrderReferenceRequest) { $request = new OffAmazonPaymentsService_Model_CloseOrderReferenceRequest($request); }; $httpResponse = $this->_invoke($this->_convertCloseOrderReference($request)); $response = OffAmazonPaymentsService_Model_CloseOrderReferenceResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
[ "public", "function", "closeOrderReference", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "OffAmazonPaymentsService_Model_CloseOrderReferenceRequest", ")", "{", "$", "request", "=", "new", "OffAmazonPaymentsService_Model_CloseOrderReferenceRe...
Close Order Reference @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseOrderReferenceRequest request or OffAmazonPaymentsService_Model_CloseOrderReferenceRequest object itself @see OffAmazonPaymentsService_Model_CloseOrderReference @return OffAmazonPaymentsService_Model_CloseOrderReferenceResponse OffAmazonPaymentsService_Model_CloseOrderReferenceResponse @throws OffAmazonPaymentsService_Exception
[ "Close", "Order", "Reference" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L428-L437
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.confirmOrderReference
public function confirmOrderReference($request) { if (!$request instanceof OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest) { $request = new OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest($request); } $httpResponse = $this->_invoke($this->_convertConfirmOrderReference($request)); $response = OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
php
public function confirmOrderReference($request) { if (!$request instanceof OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest) { $request = new OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest($request); } $httpResponse = $this->_invoke($this->_convertConfirmOrderReference($request)); $response = OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
[ "public", "function", "confirmOrderReference", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest", ")", "{", "$", "request", "=", "new", "OffAmazonPaymentsService_Model_ConfirmOrderRefer...
Confirm Order Reference @param mixed $request array of parameters for OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest request or OffAmazonPaymentsService_Model_ConfirmOrderReferenceRequest object itself @see OffAmazonPaymentsService_Model_ConfirmOrderReference @return OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse OffAmazonPaymentsService_Model_ConfirmOrderReferenceResponse @throws OffAmazonPaymentsService_Exception
[ "Confirm", "Order", "Reference" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L451-L460
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.getOrderReferenceDetails
public function getOrderReferenceDetails($request) { if (!$request instanceof OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest) { $request = new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest($request); } $httpResponse = $this->_invoke($this->_convertGetOrderReferenceDetails($request)); $response = OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
php
public function getOrderReferenceDetails($request) { if (!$request instanceof OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest) { $request = new OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest($request); } $httpResponse = $this->_invoke($this->_convertGetOrderReferenceDetails($request)); $response = OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
[ "public", "function", "getOrderReferenceDetails", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest", ")", "{", "$", "request", "=", "new", "OffAmazonPaymentsService_Model_GetOrderRef...
Get Order Reference Details @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest request or OffAmazonPaymentsService_Model_GetOrderReferenceDetailsRequest object itself @see OffAmazonPaymentsService_Model_GetOrderReferenceDetails @return OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse OffAmazonPaymentsService_Model_GetOrderReferenceDetailsResponse @throws OffAmazonPaymentsService_Exception
[ "Get", "Order", "Reference", "Details" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L474-L483
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.setOrderReferenceDetails
public function setOrderReferenceDetails($request) { if (!$request instanceof OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest) { $request = new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest($request); } $httpResponse = $this->_invoke($this->_convertSetOrderReferenceDetails($request)); $response = OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
php
public function setOrderReferenceDetails($request) { if (!$request instanceof OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest) { $request = new OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest($request); } $httpResponse = $this->_invoke($this->_convertSetOrderReferenceDetails($request)); $response = OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
[ "public", "function", "setOrderReferenceDetails", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest", ")", "{", "$", "request", "=", "new", "OffAmazonPaymentsService_Model_SetOrderRef...
Set Order Reference Details @param mixed $request array of parameters for OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest request or OffAmazonPaymentsService_Model_SetOrderReferenceDetailsRequest object itself @see OffAmazonPaymentsService_Model_SetOrderReferenceDetails @return OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse OffAmazonPaymentsService_Model_SetOrderReferenceDetailsResponse @throws OffAmazonPaymentsService_Exception
[ "Set", "Order", "Reference", "Details" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L520-L529
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.getAuthorizationDetails
public function getAuthorizationDetails($request) { if (!$request instanceof OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest) { $request = new OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest($request); } $httpResponse = $this->_invoke($this->_convertGetAuthorizationDetails($request)); $response = OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
php
public function getAuthorizationDetails($request) { if (!$request instanceof OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest) { $request = new OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest($request); } $httpResponse = $this->_invoke($this->_convertGetAuthorizationDetails($request)); $response = OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
[ "public", "function", "getAuthorizationDetails", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest", ")", "{", "$", "request", "=", "new", "OffAmazonPaymentsService_Model_GetAuthorizat...
Get Authorization Details @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest request or OffAmazonPaymentsService_Model_GetAuthorizationDetailsRequest object itself @see OffAmazonPaymentsService_Model_GetAuthorizationDetails @return OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse OffAmazonPaymentsService_Model_GetAuthorizationDetailsResponse @throws OffAmazonPaymentsService_Exception
[ "Get", "Authorization", "Details" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L543-L552
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.cancelOrderReference
public function cancelOrderReference($request) { if (!$request instanceof OffAmazonPaymentsService_Model_CancelOrderReferenceRequest) { $request = new OffAmazonPaymentsService_Model_CancelOrderReferenceRequest($request); } $httpResponse = $this->_invoke($this->_convertCancelOrderReference($request)); $response = OffAmazonPaymentsService_Model_CancelOrderReferenceResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
php
public function cancelOrderReference($request) { if (!$request instanceof OffAmazonPaymentsService_Model_CancelOrderReferenceRequest) { $request = new OffAmazonPaymentsService_Model_CancelOrderReferenceRequest($request); } $httpResponse = $this->_invoke($this->_convertCancelOrderReference($request)); $response = OffAmazonPaymentsService_Model_CancelOrderReferenceResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
[ "public", "function", "cancelOrderReference", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "OffAmazonPaymentsService_Model_CancelOrderReferenceRequest", ")", "{", "$", "request", "=", "new", "OffAmazonPaymentsService_Model_CancelOrderReferenc...
Cancel Order Reference @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CancelOrderReferenceRequest request or OffAmazonPaymentsService_Model_CancelOrderReferenceRequest object itself @see OffAmazonPaymentsService_Model_CancelOrderReference @return OffAmazonPaymentsService_Model_CancelOrderReferenceResponse OffAmazonPaymentsService_Model_CancelOrderReferenceResponse @throws OffAmazonPaymentsService_Exception
[ "Cancel", "Order", "Reference" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L566-L575
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.createOrderReferenceForId
public function createOrderReferenceForId($request) { if (!$request instanceof OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest) { $request = new OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest($request); } $httpResponse = $this->_invoke($this->_convertCreateOrderReferenceForId($request)); $response = OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
php
public function createOrderReferenceForId($request) { if (!$request instanceof OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest) { $request = new OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest($request); } $httpResponse = $this->_invoke($this->_convertCreateOrderReferenceForId($request)); $response = OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
[ "public", "function", "createOrderReferenceForId", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest", ")", "{", "$", "request", "=", "new", "OffAmazonPaymentsService_Model_CreateOrd...
Create Order Reference For Id @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest request or OffAmazonPaymentsService_Model_CreateOrderReferenceForIdRequest object itself @see OffAmazonPaymentsService_Model_CreateOrderReferenceForId @return OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse OffAmazonPaymentsService_Model_CreateOrderReferenceForIdResponse @throws OffAmazonPaymentsService_Exception
[ "Create", "Order", "Reference", "For", "Id" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L589-L598
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.getBillingAgreementDetails
public function getBillingAgreementDetails($request) { if (!$request instanceof OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest) { $request = new OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest($request); } $httpResponse = $this->_invoke($this->_convertGetBillingAgreementDetails($request)); $response = OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
php
public function getBillingAgreementDetails($request) { if (!$request instanceof OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest) { $request = new OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest($request); } $httpResponse = $this->_invoke($this->_convertGetBillingAgreementDetails($request)); $response = OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
[ "public", "function", "getBillingAgreementDetails", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest", ")", "{", "$", "request", "=", "new", "OffAmazonPaymentsService_Model_GetBill...
Get Billing Agreement Details @param mixed $request array of parameters for OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest request or OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest object itself @see OffAmazonPaymentsService_Model_GetBillingAgreementDetails @return OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse @throws OffAmazonPaymentsService_Exception
[ "Get", "Billing", "Agreement", "Details" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L612-L621
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.setBillingAgreementDetails
public function setBillingAgreementDetails($request) { if (!$request instanceof OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest) { $request = new OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest($request); } $httpResponse = $this->_invoke($this->_convertSetBillingAgreementDetails($request)); $response = OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
php
public function setBillingAgreementDetails($request) { if (!$request instanceof OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest) { $request = new OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest($request); } $httpResponse = $this->_invoke($this->_convertSetBillingAgreementDetails($request)); $response = OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
[ "public", "function", "setBillingAgreementDetails", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest", ")", "{", "$", "request", "=", "new", "OffAmazonPaymentsService_Model_SetBill...
Set Billing Agreement Details @param mixed $request array of parameters for OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest request or OffAmazonPaymentsService_Model_SetBillingAgreementDetailsRequest object itself @see OffAmazonPaymentsService_Model_SetBillingAgreementDetails @return OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse @throws OffAmazonPaymentsService_Exception
[ "Set", "Billing", "Agreement", "Details" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L635-L644
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.confirmBillingAgreement
public function confirmBillingAgreement($request) { if (!$request instanceof OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest) { $request = new OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest($request); } $httpResponse = $this->_invoke($this->_convertConfirmBillingAgreement($request)); $response = OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
php
public function confirmBillingAgreement($request) { if (!$request instanceof OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest) { $request = new OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest($request); } $httpResponse = $this->_invoke($this->_convertConfirmBillingAgreement($request)); $response = OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
[ "public", "function", "confirmBillingAgreement", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest", ")", "{", "$", "request", "=", "new", "OffAmazonPaymentsService_Model_ConfirmBillin...
Confirm Billing Agreement @param mixed $request array of parameters for OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest request or OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest object itself @see OffAmazonPaymentsService_Model_ConfirmBillingAgreement @return OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse @throws OffAmazonPaymentsService_Exception
[ "Confirm", "Billing", "Agreement" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L658-L667
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.validateBillingAgreement
public function validateBillingAgreement($request) { if (!$request instanceof OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest) { $request = new OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest($request); } $httpResponse = $this->_invoke($this->_convertValidateBillingAgreement($request)); $response = OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
php
public function validateBillingAgreement($request) { if (!$request instanceof OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest) { $request = new OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest($request); } $httpResponse = $this->_invoke($this->_convertValidateBillingAgreement($request)); $response = OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
[ "public", "function", "validateBillingAgreement", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest", ")", "{", "$", "request", "=", "new", "OffAmazonPaymentsService_Model_ValidateBil...
Validate Billing Agreement @param mixed $request array of parameters for OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest request or OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest object itself @see OffAmazonPaymentsService_Model_ValidateBillingAgreement @return OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse @throws OffAmazonPaymentsService_Exception
[ "Validate", "Billing", "Agreement" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L681-L690
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.authorizeOnBillingAgreement
public function authorizeOnBillingAgreement($request) { if (!$request instanceof OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest) { $request = new OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest($request); } $httpResponse = $this->_invoke($this->_convertAuthorizeOnBillingAgreement($request)); $response = OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
php
public function authorizeOnBillingAgreement($request) { if (!$request instanceof OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest) { $request = new OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest($request); } $httpResponse = $this->_invoke($this->_convertAuthorizeOnBillingAgreement($request)); $response = OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
[ "public", "function", "authorizeOnBillingAgreement", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest", ")", "{", "$", "request", "=", "new", "OffAmazonPaymentsService_Model_Autho...
Authorize On Billing Agreement @param mixed $request array of parameters for OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest request or OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest object itself @see OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreement @return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse @throws OffAmazonPaymentsService_Exception
[ "Authorize", "On", "Billing", "Agreement" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L704-L713
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client.closeBillingAgreement
public function closeBillingAgreement($request) { if (!$request instanceof OffAmazonPaymentsService_Model_CloseBillingAgreementRequest) { $request = new OffAmazonPaymentsService_Model_CloseBillingAgreementRequest($request); } $httpResponse = $this->_invoke($this->_convertCloseBillingAgreement($request)); $response = OffAmazonPaymentsService_Model_CloseBillingAgreementResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
php
public function closeBillingAgreement($request) { if (!$request instanceof OffAmazonPaymentsService_Model_CloseBillingAgreementRequest) { $request = new OffAmazonPaymentsService_Model_CloseBillingAgreementRequest($request); } $httpResponse = $this->_invoke($this->_convertCloseBillingAgreement($request)); $response = OffAmazonPaymentsService_Model_CloseBillingAgreementResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
[ "public", "function", "closeBillingAgreement", "(", "$", "request", ")", "{", "if", "(", "!", "$", "request", "instanceof", "OffAmazonPaymentsService_Model_CloseBillingAgreementRequest", ")", "{", "$", "request", "=", "new", "OffAmazonPaymentsService_Model_CloseBillingAgree...
Close Billing Agreement @param mixed $request array of parameters for OffAmazonPaymentsService_Model_CloseBillingAgreementRequest request or OffAmazonPaymentsService_Model_CloseBillingAgreementRequest object itself @see OffAmazonPaymentsService_Model_CloseBillingAgreement @return OffAmazonPaymentsService_Model_CloseBillingAgreementResponse OffAmazonPaymentsService_Model_CloseBillingAgreementResponse @throws OffAmazonPaymentsService_Exception
[ "Close", "Billing", "Agreement" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L727-L736
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._getParametersAsString
private function _getParametersAsString(array $parameters) { $queryParameters = array(); foreach ($parameters as $key => $value) { $queryParameters[] = $key . '=' . $this->_urlencode($value); } return implode('&', $queryParameters); }
php
private function _getParametersAsString(array $parameters) { $queryParameters = array(); foreach ($parameters as $key => $value) { $queryParameters[] = $key . '=' . $this->_urlencode($value); } return implode('&', $queryParameters); }
[ "private", "function", "_getParametersAsString", "(", "array", "$", "parameters", ")", "{", "$", "queryParameters", "=", "array", "(", ")", ";", "foreach", "(", "$", "parameters", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "queryParameters", "[",...
Convert paremeters to Url encoded query string
[ "Convert", "paremeters", "to", "Url", "encoded", "query", "string" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L984-L991
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._calculateStringToSignV2
private function _calculateStringToSignV2(array $parameters) { $data = 'POST'; $data .= "\n"; $endpoint = parse_url ($this->_config['ServiceURL']); $data .= $endpoint['host']; $data .= "\n"; $uri = array_key_exists('path', $endpoint) ? $endpoint['path'] : null; if (!isset ($uri)) { $uri = "/"; } $uriencoded = implode("/", array_map(array($this, "_urlencode"), explode("/", $uri))); $data .= $uriencoded; $data .= "\n"; uksort($parameters, 'strcmp'); $data .= $this->_getParametersAsString($parameters); return $data; }
php
private function _calculateStringToSignV2(array $parameters) { $data = 'POST'; $data .= "\n"; $endpoint = parse_url ($this->_config['ServiceURL']); $data .= $endpoint['host']; $data .= "\n"; $uri = array_key_exists('path', $endpoint) ? $endpoint['path'] : null; if (!isset ($uri)) { $uri = "/"; } $uriencoded = implode("/", array_map(array($this, "_urlencode"), explode("/", $uri))); $data .= $uriencoded; $data .= "\n"; uksort($parameters, 'strcmp'); $data .= $this->_getParametersAsString($parameters); return $data; }
[ "private", "function", "_calculateStringToSignV2", "(", "array", "$", "parameters", ")", "{", "$", "data", "=", "'POST'", ";", "$", "data", ".=", "\"\\n\"", ";", "$", "endpoint", "=", "parse_url", "(", "$", "this", "->", "_config", "[", "'ServiceURL'", "]"...
Calculate String to Sign for SignatureVersion 2 @param array $parameters request parameters @return String to Sign
[ "Calculate", "String", "to", "Sign", "for", "SignatureVersion", "2" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1043-L1059
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._sign
private function _sign($data, $key, $algorithm) { if ($algorithm === 'HmacSHA1') { $hash = 'sha1'; } else if ($algorithm === 'HmacSHA256') { $hash = 'sha256'; } else { throw new Exception ("Non-supported signing method specified"); } return base64_encode( hash_hmac($hash, $data, $key, true) ); }
php
private function _sign($data, $key, $algorithm) { if ($algorithm === 'HmacSHA1') { $hash = 'sha1'; } else if ($algorithm === 'HmacSHA256') { $hash = 'sha256'; } else { throw new Exception ("Non-supported signing method specified"); } return base64_encode( hash_hmac($hash, $data, $key, true) ); }
[ "private", "function", "_sign", "(", "$", "data", ",", "$", "key", ",", "$", "algorithm", ")", "{", "if", "(", "$", "algorithm", "===", "'HmacSHA1'", ")", "{", "$", "hash", "=", "'sha1'", ";", "}", "else", "if", "(", "$", "algorithm", "===", "'Hmac...
Computes RFC 2104-compliant HMAC signature.
[ "Computes", "RFC", "2104", "-", "compliant", "HMAC", "signature", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1069-L1081
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertCapture
private function _convertCapture($request) { $parameters = array(); $parameters['Action'] = 'Capture'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonAuthorizationId()) { $parameters['AmazonAuthorizationId'] = $request->getAmazonAuthorizationId(); } if ($request->isSetCaptureReferenceId()) { $parameters['CaptureReferenceId'] = $request->getCaptureReferenceId(); } if ($request->isSetCaptureAmount()) { $captureAmountcaptureRequest = $request->getCaptureAmount(); if ($captureAmountcaptureRequest->isSetAmount()) { $parameters['CaptureAmount' . '.' . 'Amount'] = $captureAmountcaptureRequest->getAmount(); } if ($captureAmountcaptureRequest->isSetCurrencyCode()) { $parameters['CaptureAmount' . '.' . 'CurrencyCode'] = $captureAmountcaptureRequest->getCurrencyCode(); } } if ($request->isSetSellerCaptureNote()) { $parameters['SellerCaptureNote'] = $request->getSellerCaptureNote(); } if ($request->isSetSoftDescriptor()) { $parameters['SoftDescriptor'] = $request->getSoftDescriptor(); } return $parameters; }
php
private function _convertCapture($request) { $parameters = array(); $parameters['Action'] = 'Capture'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonAuthorizationId()) { $parameters['AmazonAuthorizationId'] = $request->getAmazonAuthorizationId(); } if ($request->isSetCaptureReferenceId()) { $parameters['CaptureReferenceId'] = $request->getCaptureReferenceId(); } if ($request->isSetCaptureAmount()) { $captureAmountcaptureRequest = $request->getCaptureAmount(); if ($captureAmountcaptureRequest->isSetAmount()) { $parameters['CaptureAmount' . '.' . 'Amount'] = $captureAmountcaptureRequest->getAmount(); } if ($captureAmountcaptureRequest->isSetCurrencyCode()) { $parameters['CaptureAmount' . '.' . 'CurrencyCode'] = $captureAmountcaptureRequest->getCurrencyCode(); } } if ($request->isSetSellerCaptureNote()) { $parameters['SellerCaptureNote'] = $request->getSellerCaptureNote(); } if ($request->isSetSoftDescriptor()) { $parameters['SoftDescriptor'] = $request->getSoftDescriptor(); } return $parameters; }
[ "private", "function", "_convertCapture", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'Capture'", ";", "if", "(", "$", "request", "->", "isSetSellerId", "(", ")", ")", "{...
Convert CaptureRequest to name value pairs
[ "Convert", "CaptureRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1106-L1136
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertRefund
private function _convertRefund($request) { $parameters = array(); $parameters['Action'] = 'Refund'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonCaptureId()) { $parameters['AmazonCaptureId'] = $request->getAmazonCaptureId(); } if ($request->isSetRefundReferenceId()) { $parameters['RefundReferenceId'] = $request->getRefundReferenceId(); } if ($request->isSetRefundAmount()) { $refundAmount = $request->getRefundAmount(); if ($refundAmount->isSetAmount()) { $parameters['RefundAmount' . '.' . 'Amount'] = $refundAmount->getAmount(); } if ($refundAmount->isSetCurrencyCode()) { $parameters['RefundAmount' . '.' . 'CurrencyCode'] = $refundAmount->getCurrencyCode(); } } if ($request->isSetSellerRefundNote()) { $parameters['SellerRefundNote'] = $request->getSellerRefundNote(); } if ($request->isSetSoftDescriptor()) { $parameters['SoftDescriptor'] = $request->getSoftDescriptor(); } return $parameters; }
php
private function _convertRefund($request) { $parameters = array(); $parameters['Action'] = 'Refund'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonCaptureId()) { $parameters['AmazonCaptureId'] = $request->getAmazonCaptureId(); } if ($request->isSetRefundReferenceId()) { $parameters['RefundReferenceId'] = $request->getRefundReferenceId(); } if ($request->isSetRefundAmount()) { $refundAmount = $request->getRefundAmount(); if ($refundAmount->isSetAmount()) { $parameters['RefundAmount' . '.' . 'Amount'] = $refundAmount->getAmount(); } if ($refundAmount->isSetCurrencyCode()) { $parameters['RefundAmount' . '.' . 'CurrencyCode'] = $refundAmount->getCurrencyCode(); } } if ($request->isSetSellerRefundNote()) { $parameters['SellerRefundNote'] = $request->getSellerRefundNote(); } if ($request->isSetSoftDescriptor()) { $parameters['SoftDescriptor'] = $request->getSoftDescriptor(); } return $parameters; }
[ "private", "function", "_convertRefund", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'Refund'", ";", "if", "(", "$", "request", "->", "isSetSellerId", "(", ")", ")", "{",...
Convert RefundRequest to name value pairs
[ "Convert", "RefundRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1142-L1172
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertCloseAuthorization
private function _convertCloseAuthorization($request) { $parameters = array(); $parameters['Action'] = 'CloseAuthorization'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonAuthorizationId()) { $parameters['AmazonAuthorizationId'] = $request->getAmazonAuthorizationId(); } if ($request->isSetClosureReason()) { $parameters['ClosureReason'] = $request->getClosureReason(); } return $parameters; }
php
private function _convertCloseAuthorization($request) { $parameters = array(); $parameters['Action'] = 'CloseAuthorization'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonAuthorizationId()) { $parameters['AmazonAuthorizationId'] = $request->getAmazonAuthorizationId(); } if ($request->isSetClosureReason()) { $parameters['ClosureReason'] = $request->getClosureReason(); } return $parameters; }
[ "private", "function", "_convertCloseAuthorization", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'CloseAuthorization'", ";", "if", "(", "$", "request", "->", "isSetSellerId", "...
Convert CloseAuthorizationRequest to name value pairs
[ "Convert", "CloseAuthorizationRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1178-L1193
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertGetRefundDetails
private function _convertGetRefundDetails($request) { $parameters = array(); $parameters['Action'] = 'GetRefundDetails'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonRefundId()) { $parameters['AmazonRefundId'] = $request->getAmazonRefundId(); } return $parameters; }
php
private function _convertGetRefundDetails($request) { $parameters = array(); $parameters['Action'] = 'GetRefundDetails'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonRefundId()) { $parameters['AmazonRefundId'] = $request->getAmazonRefundId(); } return $parameters; }
[ "private", "function", "_convertGetRefundDetails", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'GetRefundDetails'", ";", "if", "(", "$", "request", "->", "isSetSellerId", "(", ...
Convert GetRefundDetailsRequest to name value pairs
[ "Convert", "GetRefundDetailsRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1199-L1211
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertGetCaptureDetails
private function _convertGetCaptureDetails($request) { $parameters = array(); $parameters['Action'] = 'GetCaptureDetails'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonCaptureId()) { $parameters['AmazonCaptureId'] = $request->getAmazonCaptureId(); } return $parameters; }
php
private function _convertGetCaptureDetails($request) { $parameters = array(); $parameters['Action'] = 'GetCaptureDetails'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonCaptureId()) { $parameters['AmazonCaptureId'] = $request->getAmazonCaptureId(); } return $parameters; }
[ "private", "function", "_convertGetCaptureDetails", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'GetCaptureDetails'", ";", "if", "(", "$", "request", "->", "isSetSellerId", "("...
Convert GetCaptureDetailsRequest to name value pairs
[ "Convert", "GetCaptureDetailsRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1217-L1229
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertCloseOrderReference
private function _convertCloseOrderReference($request) { $parameters = array(); $parameters['Action'] = 'CloseOrderReference'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonOrderReferenceId()) { $parameters['AmazonOrderReferenceId'] = $request->getAmazonOrderReferenceId(); } if ($request->isSetClosureReason()) { $parameters['ClosureReason'] = $request->getClosureReason(); } return $parameters; }
php
private function _convertCloseOrderReference($request) { $parameters = array(); $parameters['Action'] = 'CloseOrderReference'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonOrderReferenceId()) { $parameters['AmazonOrderReferenceId'] = $request->getAmazonOrderReferenceId(); } if ($request->isSetClosureReason()) { $parameters['ClosureReason'] = $request->getClosureReason(); } return $parameters; }
[ "private", "function", "_convertCloseOrderReference", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'CloseOrderReference'", ";", "if", "(", "$", "request", "->", "isSetSellerId", ...
Convert CloseOrderReferenceRequest to name value pairs
[ "Convert", "CloseOrderReferenceRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1235-L1250
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertConfirmOrderReference
private function _convertConfirmOrderReference($request) { $parameters = array(); $parameters['Action'] = 'ConfirmOrderReference'; if ($request->isSetAmazonOrderReferenceId()) { $parameters['AmazonOrderReferenceId'] = $request->getAmazonOrderReferenceId(); } if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } return $parameters; }
php
private function _convertConfirmOrderReference($request) { $parameters = array(); $parameters['Action'] = 'ConfirmOrderReference'; if ($request->isSetAmazonOrderReferenceId()) { $parameters['AmazonOrderReferenceId'] = $request->getAmazonOrderReferenceId(); } if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } return $parameters; }
[ "private", "function", "_convertConfirmOrderReference", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'ConfirmOrderReference'", ";", "if", "(", "$", "request", "->", "isSetAmazonOr...
Convert ConfirmOrderReferenceRequest to name value pairs
[ "Convert", "ConfirmOrderReferenceRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1256-L1268
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertGetOrderReferenceDetails
private function _convertGetOrderReferenceDetails($request) { $parameters = array(); $parameters['Action'] = 'GetOrderReferenceDetails'; if ($request->isSetAmazonOrderReferenceId()) { $parameters['AmazonOrderReferenceId'] = $request->getAmazonOrderReferenceId(); } if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAddressConsentToken()) { $parameters['AddressConsentToken'] = $request->getAddressConsentToken(); } return $parameters; }
php
private function _convertGetOrderReferenceDetails($request) { $parameters = array(); $parameters['Action'] = 'GetOrderReferenceDetails'; if ($request->isSetAmazonOrderReferenceId()) { $parameters['AmazonOrderReferenceId'] = $request->getAmazonOrderReferenceId(); } if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAddressConsentToken()) { $parameters['AddressConsentToken'] = $request->getAddressConsentToken(); } return $parameters; }
[ "private", "function", "_convertGetOrderReferenceDetails", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'GetOrderReferenceDetails'", ";", "if", "(", "$", "request", "->", "isSetAm...
Convert GetOrderReferenceDetailsRequest to name value pairs
[ "Convert", "GetOrderReferenceDetailsRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1274-L1289
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertAuthorize
private function _convertAuthorize($request) { $parameters = array(); $parameters['Action'] = 'Authorize'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonOrderReferenceId()) { $parameters['AmazonOrderReferenceId'] = $request->getAmazonOrderReferenceId(); } if ($request->isSetAuthorizationReferenceId()) { $parameters['AuthorizationReferenceId'] = $request->getAuthorizationReferenceId(); } if ($request->isSetAuthorizationAmount()) { $authorizationAmount = $request->getAuthorizationAmount(); if ($authorizationAmount->isSetAmount()) { $parameters['AuthorizationAmount' . '.' . 'Amount'] = $authorizationAmount->getAmount(); } if ($authorizationAmount->isSetCurrencyCode()) { $parameters['AuthorizationAmount' . '.' . 'CurrencyCode'] = $authorizationAmount->getCurrencyCode(); } } if ($request->isSetSellerAuthorizationNote()) { $parameters['SellerAuthorizationNote'] = $request->getSellerAuthorizationNote(); } if ($request->isSetOrderItemCategories()) { $orderItemCategories = $request->getOrderItemCategories(); foreach ($orderItemCategories->getOrderItemCategory() as $orderItemCategoryIndex => $orderItemCategory) { $parameters['OrderItemCategories' . '.' . 'OrderItemCategory' . '.' . ($orderItemCategoryIndex + 1)] = $orderItemCategory; } } if ($request->isSetTransactionTimeout()) { $parameters['TransactionTimeout'] = $request->getTransactionTimeout(); } if ($request->isSetCaptureNow()) { $parameters['CaptureNow'] = $request->getCaptureNow() ? "true" : "false"; } if ($request->isSetSoftDescriptor()) { $parameters['SoftDescriptor'] = $request->getSoftDescriptor(); } return $parameters; }
php
private function _convertAuthorize($request) { $parameters = array(); $parameters['Action'] = 'Authorize'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonOrderReferenceId()) { $parameters['AmazonOrderReferenceId'] = $request->getAmazonOrderReferenceId(); } if ($request->isSetAuthorizationReferenceId()) { $parameters['AuthorizationReferenceId'] = $request->getAuthorizationReferenceId(); } if ($request->isSetAuthorizationAmount()) { $authorizationAmount = $request->getAuthorizationAmount(); if ($authorizationAmount->isSetAmount()) { $parameters['AuthorizationAmount' . '.' . 'Amount'] = $authorizationAmount->getAmount(); } if ($authorizationAmount->isSetCurrencyCode()) { $parameters['AuthorizationAmount' . '.' . 'CurrencyCode'] = $authorizationAmount->getCurrencyCode(); } } if ($request->isSetSellerAuthorizationNote()) { $parameters['SellerAuthorizationNote'] = $request->getSellerAuthorizationNote(); } if ($request->isSetOrderItemCategories()) { $orderItemCategories = $request->getOrderItemCategories(); foreach ($orderItemCategories->getOrderItemCategory() as $orderItemCategoryIndex => $orderItemCategory) { $parameters['OrderItemCategories' . '.' . 'OrderItemCategory' . '.' . ($orderItemCategoryIndex + 1)] = $orderItemCategory; } } if ($request->isSetTransactionTimeout()) { $parameters['TransactionTimeout'] = $request->getTransactionTimeout(); } if ($request->isSetCaptureNow()) { $parameters['CaptureNow'] = $request->getCaptureNow() ? "true" : "false"; } if ($request->isSetSoftDescriptor()) { $parameters['SoftDescriptor'] = $request->getSoftDescriptor(); } return $parameters; }
[ "private", "function", "_convertAuthorize", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'Authorize'", ";", "if", "(", "$", "request", "->", "isSetSellerId", "(", ")", ")", ...
Convert AuthorizeRequest to name value pairs
[ "Convert", "AuthorizeRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1295-L1337
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertSetOrderReferenceDetails
private function _convertSetOrderReferenceDetails($request) { $parameters = array(); $parameters['Action'] = 'SetOrderReferenceDetails'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonOrderReferenceId()) { $parameters['AmazonOrderReferenceId'] = $request->getAmazonOrderReferenceId(); } if ($request->isSetOrderReferenceAttributes()) { $orderReferenceAttributes = $request->getOrderReferenceAttributes(); if ($orderReferenceAttributes->isSetOrderTotal()) { $orderTotal = $orderReferenceAttributes->getOrderTotal(); if ($orderTotal->isSetCurrencyCode()) { $parameters['OrderReferenceAttributes' . '.' . 'OrderTotal' . '.' . 'CurrencyCode'] = $orderTotal->getCurrencyCode(); } if ($orderTotal->isSetAmount()) { $parameters['OrderReferenceAttributes' . '.' . 'OrderTotal' . '.' . 'Amount'] = $orderTotal->getAmount(); } } if ($orderReferenceAttributes->isSetPlatformId()) { $parameters['OrderReferenceAttributes' . '.' . 'PlatformId'] = $orderReferenceAttributes->getPlatformId(); } if ($orderReferenceAttributes->isSetSellerNote()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerNote'] = $orderReferenceAttributes->getSellerNote(); } if ($orderReferenceAttributes->isSetSellerOrderAttributes()) { $sellerOrderAttributes = $orderReferenceAttributes->getSellerOrderAttributes(); if ($sellerOrderAttributes->isSetSellerOrderId()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'SellerOrderId'] = $sellerOrderAttributes->getSellerOrderId(); } if ($sellerOrderAttributes->isSetStoreName()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'StoreName'] = $sellerOrderAttributes->getStoreName(); } if ($sellerOrderAttributes->isSetOrderItemCategories()) { $orderItemCategories = $sellerOrderAttributes->getOrderItemCategories(); foreach ($orderItemCategories->getOrderItemCategory() as $orderItemCategoryIndex => $orderItemCategory) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'OrderItemCategories' . '.' . 'OrderItemCategory' . '.' . ($orderItemCategoryIndex + 1)] = $orderItemCategory; } } if ($sellerOrderAttributes->isSetCustomInformation()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'CustomInformation'] = $sellerOrderAttributes->getCustomInformation(); } } } return $parameters; }
php
private function _convertSetOrderReferenceDetails($request) { $parameters = array(); $parameters['Action'] = 'SetOrderReferenceDetails'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonOrderReferenceId()) { $parameters['AmazonOrderReferenceId'] = $request->getAmazonOrderReferenceId(); } if ($request->isSetOrderReferenceAttributes()) { $orderReferenceAttributes = $request->getOrderReferenceAttributes(); if ($orderReferenceAttributes->isSetOrderTotal()) { $orderTotal = $orderReferenceAttributes->getOrderTotal(); if ($orderTotal->isSetCurrencyCode()) { $parameters['OrderReferenceAttributes' . '.' . 'OrderTotal' . '.' . 'CurrencyCode'] = $orderTotal->getCurrencyCode(); } if ($orderTotal->isSetAmount()) { $parameters['OrderReferenceAttributes' . '.' . 'OrderTotal' . '.' . 'Amount'] = $orderTotal->getAmount(); } } if ($orderReferenceAttributes->isSetPlatformId()) { $parameters['OrderReferenceAttributes' . '.' . 'PlatformId'] = $orderReferenceAttributes->getPlatformId(); } if ($orderReferenceAttributes->isSetSellerNote()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerNote'] = $orderReferenceAttributes->getSellerNote(); } if ($orderReferenceAttributes->isSetSellerOrderAttributes()) { $sellerOrderAttributes = $orderReferenceAttributes->getSellerOrderAttributes(); if ($sellerOrderAttributes->isSetSellerOrderId()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'SellerOrderId'] = $sellerOrderAttributes->getSellerOrderId(); } if ($sellerOrderAttributes->isSetStoreName()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'StoreName'] = $sellerOrderAttributes->getStoreName(); } if ($sellerOrderAttributes->isSetOrderItemCategories()) { $orderItemCategories = $sellerOrderAttributes->getOrderItemCategories(); foreach ($orderItemCategories->getOrderItemCategory() as $orderItemCategoryIndex => $orderItemCategory) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'OrderItemCategories' . '.' . 'OrderItemCategory' . '.' . ($orderItemCategoryIndex + 1)] = $orderItemCategory; } } if ($sellerOrderAttributes->isSetCustomInformation()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'CustomInformation'] = $sellerOrderAttributes->getCustomInformation(); } } } return $parameters; }
[ "private", "function", "_convertSetOrderReferenceDetails", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'SetOrderReferenceDetails'", ";", "if", "(", "$", "request", "->", "isSetSe...
Convert SetOrderReferenceDetailsRequest to name value pairs
[ "Convert", "SetOrderReferenceDetailsRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1343-L1391
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertGetAuthorizationDetails
private function _convertGetAuthorizationDetails($request) { $parameters = array(); $parameters['Action'] = 'GetAuthorizationDetails'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonAuthorizationId()) { $parameters['AmazonAuthorizationId'] = $request->getAmazonAuthorizationId(); } return $parameters; }
php
private function _convertGetAuthorizationDetails($request) { $parameters = array(); $parameters['Action'] = 'GetAuthorizationDetails'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonAuthorizationId()) { $parameters['AmazonAuthorizationId'] = $request->getAmazonAuthorizationId(); } return $parameters; }
[ "private", "function", "_convertGetAuthorizationDetails", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'GetAuthorizationDetails'", ";", "if", "(", "$", "request", "->", "isSetSell...
Convert GetAuthorizationDetailsRequest to name value pairs
[ "Convert", "GetAuthorizationDetailsRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1397-L1409
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertCancelOrderReference
private function _convertCancelOrderReference($request) { $parameters = array(); $parameters['Action'] = 'CancelOrderReference'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonOrderReferenceId()) { $parameters['AmazonOrderReferenceId'] = $request->getAmazonOrderReferenceId(); } if ($request->isSetCancelationReason()) { $parameters['CancelationReason'] = $request->getCancelationReason(); } return $parameters; }
php
private function _convertCancelOrderReference($request) { $parameters = array(); $parameters['Action'] = 'CancelOrderReference'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonOrderReferenceId()) { $parameters['AmazonOrderReferenceId'] = $request->getAmazonOrderReferenceId(); } if ($request->isSetCancelationReason()) { $parameters['CancelationReason'] = $request->getCancelationReason(); } return $parameters; }
[ "private", "function", "_convertCancelOrderReference", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'CancelOrderReference'", ";", "if", "(", "$", "request", "->", "isSetSellerId",...
Convert CancelOrderReferenceRequest to name value pairs
[ "Convert", "CancelOrderReferenceRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1415-L1430
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertCreateOrderReferenceForId
private function _convertCreateOrderReferenceForId($request) { $parameters = array(); $parameters['Action'] = 'CreateOrderReferenceForId'; if ($request->isSetId()) { $parameters['Id'] = $request->getId(); } if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetIdType()) { $parameters['IdType'] = $request->getIdType(); } if ($request->isSetInheritShippingAddress()) { $parameters['InheritShippingAddress'] = $request->getInheritShippingAddress() ? "true" : "false"; } if ($request->isSetConfirmNow()) { $parameters['ConfirmNow'] = $request->getConfirmNow() ? "true" : "false"; } if ($request->isSetOrderReferenceAttributes()) { $orderReferenceAttributescreateOrderReferenceForIdRequest = $request->getOrderReferenceAttributes(); if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetOrderTotal()) { $orderTotalorderReferenceAttributes = $orderReferenceAttributescreateOrderReferenceForIdRequest->getOrderTotal(); if ($orderTotalorderReferenceAttributes->isSetCurrencyCode()) { $parameters['OrderReferenceAttributes' . '.' . 'OrderTotal' . '.' . 'CurrencyCode'] = $orderTotalorderReferenceAttributes->getCurrencyCode(); } if ($orderTotalorderReferenceAttributes->isSetAmount()) { $parameters['OrderReferenceAttributes' . '.' . 'OrderTotal' . '.' . 'Amount'] = $orderTotalorderReferenceAttributes->getAmount(); } } if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetPlatformId()) { $parameters['OrderReferenceAttributes' . '.' . 'PlatformId'] = $orderReferenceAttributescreateOrderReferenceForIdRequest->getPlatformId(); } if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetSellerNote()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerNote'] = $orderReferenceAttributescreateOrderReferenceForIdRequest->getSellerNote(); } if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetSellerOrderAttributes()) { $sellerOrderAttributesorderReferenceAttributes = $orderReferenceAttributescreateOrderReferenceForIdRequest->getSellerOrderAttributes(); if ($sellerOrderAttributesorderReferenceAttributes->isSetSellerOrderId()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'SellerOrderId'] = $sellerOrderAttributesorderReferenceAttributes->getSellerOrderId(); } if ($sellerOrderAttributesorderReferenceAttributes->isSetStoreName()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'StoreName'] = $sellerOrderAttributesorderReferenceAttributes->getStoreName(); } if ($sellerOrderAttributesorderReferenceAttributes->isSetOrderItemCategories()) { $orderItemCategoriessellerOrderAttributes = $sellerOrderAttributesorderReferenceAttributes->getOrderItemCategories(); foreach ($orderItemCategoriessellerOrderAttributes->getOrderItemCategory() as $orderItemCategoryorderItemCategoriesIndex => $orderItemCategoryorderItemCategories) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'OrderItemCategories' . '.' . 'OrderItemCategory' . '.' . ($orderItemCategoryorderItemCategoriesIndex + 1)] = $orderItemCategoryorderItemCategories; } } if ($sellerOrderAttributesorderReferenceAttributes->isSetCustomInformation()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'CustomInformation'] = $sellerOrderAttributesorderReferenceAttributes->getCustomInformation(); } } } return $parameters; }
php
private function _convertCreateOrderReferenceForId($request) { $parameters = array(); $parameters['Action'] = 'CreateOrderReferenceForId'; if ($request->isSetId()) { $parameters['Id'] = $request->getId(); } if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetIdType()) { $parameters['IdType'] = $request->getIdType(); } if ($request->isSetInheritShippingAddress()) { $parameters['InheritShippingAddress'] = $request->getInheritShippingAddress() ? "true" : "false"; } if ($request->isSetConfirmNow()) { $parameters['ConfirmNow'] = $request->getConfirmNow() ? "true" : "false"; } if ($request->isSetOrderReferenceAttributes()) { $orderReferenceAttributescreateOrderReferenceForIdRequest = $request->getOrderReferenceAttributes(); if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetOrderTotal()) { $orderTotalorderReferenceAttributes = $orderReferenceAttributescreateOrderReferenceForIdRequest->getOrderTotal(); if ($orderTotalorderReferenceAttributes->isSetCurrencyCode()) { $parameters['OrderReferenceAttributes' . '.' . 'OrderTotal' . '.' . 'CurrencyCode'] = $orderTotalorderReferenceAttributes->getCurrencyCode(); } if ($orderTotalorderReferenceAttributes->isSetAmount()) { $parameters['OrderReferenceAttributes' . '.' . 'OrderTotal' . '.' . 'Amount'] = $orderTotalorderReferenceAttributes->getAmount(); } } if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetPlatformId()) { $parameters['OrderReferenceAttributes' . '.' . 'PlatformId'] = $orderReferenceAttributescreateOrderReferenceForIdRequest->getPlatformId(); } if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetSellerNote()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerNote'] = $orderReferenceAttributescreateOrderReferenceForIdRequest->getSellerNote(); } if ($orderReferenceAttributescreateOrderReferenceForIdRequest->isSetSellerOrderAttributes()) { $sellerOrderAttributesorderReferenceAttributes = $orderReferenceAttributescreateOrderReferenceForIdRequest->getSellerOrderAttributes(); if ($sellerOrderAttributesorderReferenceAttributes->isSetSellerOrderId()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'SellerOrderId'] = $sellerOrderAttributesorderReferenceAttributes->getSellerOrderId(); } if ($sellerOrderAttributesorderReferenceAttributes->isSetStoreName()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'StoreName'] = $sellerOrderAttributesorderReferenceAttributes->getStoreName(); } if ($sellerOrderAttributesorderReferenceAttributes->isSetOrderItemCategories()) { $orderItemCategoriessellerOrderAttributes = $sellerOrderAttributesorderReferenceAttributes->getOrderItemCategories(); foreach ($orderItemCategoriessellerOrderAttributes->getOrderItemCategory() as $orderItemCategoryorderItemCategoriesIndex => $orderItemCategoryorderItemCategories) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'OrderItemCategories' . '.' . 'OrderItemCategory' . '.' . ($orderItemCategoryorderItemCategoriesIndex + 1)] = $orderItemCategoryorderItemCategories; } } if ($sellerOrderAttributesorderReferenceAttributes->isSetCustomInformation()) { $parameters['OrderReferenceAttributes' . '.' . 'SellerOrderAttributes' . '.' . 'CustomInformation'] = $sellerOrderAttributesorderReferenceAttributes->getCustomInformation(); } } } return $parameters; }
[ "private", "function", "_convertCreateOrderReferenceForId", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'CreateOrderReferenceForId'", ";", "if", "(", "$", "request", "->", "isSet...
Convert CreateOrderReferenceForIdRequest to name value pairs
[ "Convert", "CreateOrderReferenceForIdRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1436-L1493
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertGetBillingAgreementDetails
private function _convertGetBillingAgreementDetails($request) { $parameters = array(); $parameters['Action'] = 'GetBillingAgreementDetails'; if ($request->isSetAmazonBillingAgreementId()) { $parameters['AmazonBillingAgreementId'] = $request->getAmazonBillingAgreementId(); } if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAddressConsentToken()) { $parameters['AddressConsentToken'] = $request->getAddressConsentToken(); } return $parameters; }
php
private function _convertGetBillingAgreementDetails($request) { $parameters = array(); $parameters['Action'] = 'GetBillingAgreementDetails'; if ($request->isSetAmazonBillingAgreementId()) { $parameters['AmazonBillingAgreementId'] = $request->getAmazonBillingAgreementId(); } if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAddressConsentToken()) { $parameters['AddressConsentToken'] = $request->getAddressConsentToken(); } return $parameters; }
[ "private", "function", "_convertGetBillingAgreementDetails", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'GetBillingAgreementDetails'", ";", "if", "(", "$", "request", "->", "isS...
Convert GetBillingAgreementDetailsRequest to name value pairs
[ "Convert", "GetBillingAgreementDetailsRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1499-L1514
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertSetBillingAgreementDetails
private function _convertSetBillingAgreementDetails($request) { $parameters = array(); $parameters['Action'] = 'SetBillingAgreementDetails'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonBillingAgreementId()) { $parameters['AmazonBillingAgreementId'] = $request->getAmazonBillingAgreementId(); } if ($request->isSetBillingAgreementAttributes()) { $billingAgreementAttributessetBillingAgreementDetailsRequest = $request->getBillingAgreementAttributes(); if ($billingAgreementAttributessetBillingAgreementDetailsRequest->isSetPlatformId()) { $parameters['BillingAgreementAttributes' . '.' . 'PlatformId'] = $billingAgreementAttributessetBillingAgreementDetailsRequest->getPlatformId(); } if ($billingAgreementAttributessetBillingAgreementDetailsRequest->isSetSellerNote()) { $parameters['BillingAgreementAttributes' . '.' . 'SellerNote'] = $billingAgreementAttributessetBillingAgreementDetailsRequest->getSellerNote(); } if ($billingAgreementAttributessetBillingAgreementDetailsRequest->isSetSellerBillingAgreementAttributes()) { $sellerBillingAgreementAttributesbillingAgreementAttributes = $billingAgreementAttributessetBillingAgreementDetailsRequest->getSellerBillingAgreementAttributes(); if ($sellerBillingAgreementAttributesbillingAgreementAttributes->isSetSellerBillingAgreementId()) { $parameters['BillingAgreementAttributes' . '.' . 'SellerBillingAgreementAttributes' . '.' . 'SellerBillingAgreementId'] = $sellerBillingAgreementAttributesbillingAgreementAttributes->getSellerBillingAgreementId(); } if ($sellerBillingAgreementAttributesbillingAgreementAttributes->isSetStoreName()) { $parameters['BillingAgreementAttributes' . '.' . 'SellerBillingAgreementAttributes' . '.' . 'StoreName'] = $sellerBillingAgreementAttributesbillingAgreementAttributes->getStoreName(); } if ($sellerBillingAgreementAttributesbillingAgreementAttributes->isSetCustomInformation()) { $parameters['BillingAgreementAttributes' . '.' . 'SellerBillingAgreementAttributes' . '.' . 'CustomInformation'] = $sellerBillingAgreementAttributesbillingAgreementAttributes->getCustomInformation(); } } } return $parameters; }
php
private function _convertSetBillingAgreementDetails($request) { $parameters = array(); $parameters['Action'] = 'SetBillingAgreementDetails'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonBillingAgreementId()) { $parameters['AmazonBillingAgreementId'] = $request->getAmazonBillingAgreementId(); } if ($request->isSetBillingAgreementAttributes()) { $billingAgreementAttributessetBillingAgreementDetailsRequest = $request->getBillingAgreementAttributes(); if ($billingAgreementAttributessetBillingAgreementDetailsRequest->isSetPlatformId()) { $parameters['BillingAgreementAttributes' . '.' . 'PlatformId'] = $billingAgreementAttributessetBillingAgreementDetailsRequest->getPlatformId(); } if ($billingAgreementAttributessetBillingAgreementDetailsRequest->isSetSellerNote()) { $parameters['BillingAgreementAttributes' . '.' . 'SellerNote'] = $billingAgreementAttributessetBillingAgreementDetailsRequest->getSellerNote(); } if ($billingAgreementAttributessetBillingAgreementDetailsRequest->isSetSellerBillingAgreementAttributes()) { $sellerBillingAgreementAttributesbillingAgreementAttributes = $billingAgreementAttributessetBillingAgreementDetailsRequest->getSellerBillingAgreementAttributes(); if ($sellerBillingAgreementAttributesbillingAgreementAttributes->isSetSellerBillingAgreementId()) { $parameters['BillingAgreementAttributes' . '.' . 'SellerBillingAgreementAttributes' . '.' . 'SellerBillingAgreementId'] = $sellerBillingAgreementAttributesbillingAgreementAttributes->getSellerBillingAgreementId(); } if ($sellerBillingAgreementAttributesbillingAgreementAttributes->isSetStoreName()) { $parameters['BillingAgreementAttributes' . '.' . 'SellerBillingAgreementAttributes' . '.' . 'StoreName'] = $sellerBillingAgreementAttributesbillingAgreementAttributes->getStoreName(); } if ($sellerBillingAgreementAttributesbillingAgreementAttributes->isSetCustomInformation()) { $parameters['BillingAgreementAttributes' . '.' . 'SellerBillingAgreementAttributes' . '.' . 'CustomInformation'] = $sellerBillingAgreementAttributesbillingAgreementAttributes->getCustomInformation(); } } } return $parameters; }
[ "private", "function", "_convertSetBillingAgreementDetails", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'SetBillingAgreementDetails'", ";", "if", "(", "$", "request", "->", "isS...
Convert SetBillingAgreementDetailsRequest to name value pairs
[ "Convert", "SetBillingAgreementDetailsRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1520-L1553
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertConfirmBillingAgreement
private function _convertConfirmBillingAgreement($request) { $parameters = array(); $parameters['Action'] = 'ConfirmBillingAgreement'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonBillingAgreementId()) { $parameters['AmazonBillingAgreementId'] = $request->getAmazonBillingAgreementId(); } return $parameters; }
php
private function _convertConfirmBillingAgreement($request) { $parameters = array(); $parameters['Action'] = 'ConfirmBillingAgreement'; if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetAmazonBillingAgreementId()) { $parameters['AmazonBillingAgreementId'] = $request->getAmazonBillingAgreementId(); } return $parameters; }
[ "private", "function", "_convertConfirmBillingAgreement", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'ConfirmBillingAgreement'", ";", "if", "(", "$", "request", "->", "isSetSell...
Convert ConfirmBillingAgreementRequest to name value pairs
[ "Convert", "ConfirmBillingAgreementRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1559-L1571
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertValidateBillingAgreement
private function _convertValidateBillingAgreement($request) { $parameters = array(); $parameters['Action'] = 'ValidateBillingAgreement'; if ($request->isSetAmazonBillingAgreementId()) { $parameters['AmazonBillingAgreementId'] = $request->getAmazonBillingAgreementId(); } if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } return $parameters; }
php
private function _convertValidateBillingAgreement($request) { $parameters = array(); $parameters['Action'] = 'ValidateBillingAgreement'; if ($request->isSetAmazonBillingAgreementId()) { $parameters['AmazonBillingAgreementId'] = $request->getAmazonBillingAgreementId(); } if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } return $parameters; }
[ "private", "function", "_convertValidateBillingAgreement", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'ValidateBillingAgreement'", ";", "if", "(", "$", "request", "->", "isSetAm...
Convert ValidateBillingAgreementRequest to name value pairs
[ "Convert", "ValidateBillingAgreementRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1577-L1589
train
chameleon-system/chameleon-shop
src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php
OffAmazonPaymentsService_Client._convertCloseBillingAgreement
private function _convertCloseBillingAgreement($request) { $parameters = array(); $parameters['Action'] = 'CloseBillingAgreement'; if ($request->isSetAmazonBillingAgreementId()) { $parameters['AmazonBillingAgreementId'] = $request->getAmazonBillingAgreementId(); } if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetClosureReason()) { $parameters['ClosureReason'] = $request->getClosureReason(); } if ($request->isSetReasonCode()) { $parameters['ReasonCode'] = $request->getReasonCode(); } return $parameters; }
php
private function _convertCloseBillingAgreement($request) { $parameters = array(); $parameters['Action'] = 'CloseBillingAgreement'; if ($request->isSetAmazonBillingAgreementId()) { $parameters['AmazonBillingAgreementId'] = $request->getAmazonBillingAgreementId(); } if ($request->isSetSellerId()) { $parameters['SellerId'] = $request->getSellerId(); } if ($request->isSetClosureReason()) { $parameters['ClosureReason'] = $request->getClosureReason(); } if ($request->isSetReasonCode()) { $parameters['ReasonCode'] = $request->getReasonCode(); } return $parameters; }
[ "private", "function", "_convertCloseBillingAgreement", "(", "$", "request", ")", "{", "$", "parameters", "=", "array", "(", ")", ";", "$", "parameters", "[", "'Action'", "]", "=", "'CloseBillingAgreement'", ";", "if", "(", "$", "request", "->", "isSetAmazonBi...
Convert CloseBillingAgreementRequest to name value pairs
[ "Convert", "CloseBillingAgreementRequest", "to", "name", "value", "pairs" ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Client.php#L1664-L1682
train
Erebot/Erebot
src/Event/Match/Chan.php
Chan.setChan
public function setChan($chan) { if (!\Erebot\Utils::stringifiable($chan)) { throw new \Erebot\InvalidValueException('Not a channel'); } $this->chan = $chan; }
php
public function setChan($chan) { if (!\Erebot\Utils::stringifiable($chan)) { throw new \Erebot\InvalidValueException('Not a channel'); } $this->chan = $chan; }
[ "public", "function", "setChan", "(", "$", "chan", ")", "{", "if", "(", "!", "\\", "Erebot", "\\", "Utils", "::", "stringifiable", "(", "$", "chan", ")", ")", "{", "throw", "new", "\\", "Erebot", "\\", "InvalidValueException", "(", "'Not a channel'", ")"...
Sets the channel used in comparisons. \param $chan string|object Channel to match incoming events against. \throw Erebot::InvalidValueException The given chan is invalid.
[ "Sets", "the", "channel", "used", "in", "comparisons", "." ]
691fc3fa8bc6f07061ff2b3798fec76bc3a039aa
https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/Event/Match/Chan.php#L70-L77
train
sylingd/Yesf
src/Connection/PoolTrait.php
PoolTrait.initPool
public function initPool($config) { if (!method_exists($this, 'getMinClient') || !method_exists($this, 'getMaxClient')) { throw new NotFoundException("Method getMinClient or getMaxClient not found"); } $this->wait = new SplQueue; $this->connection = new SplQueue; $this->last_run_out_time = time(); if (isset($config['min'])) { $this->min_client = intval($config['min']); } if (isset($config['max'])) { $this->max_client = intval($config['max']); } //建立最小连接 $count = $this->getMinClient(); while ($count--) { $this->createConnection(); } }
php
public function initPool($config) { if (!method_exists($this, 'getMinClient') || !method_exists($this, 'getMaxClient')) { throw new NotFoundException("Method getMinClient or getMaxClient not found"); } $this->wait = new SplQueue; $this->connection = new SplQueue; $this->last_run_out_time = time(); if (isset($config['min'])) { $this->min_client = intval($config['min']); } if (isset($config['max'])) { $this->max_client = intval($config['max']); } //建立最小连接 $count = $this->getMinClient(); while ($count--) { $this->createConnection(); } }
[ "public", "function", "initPool", "(", "$", "config", ")", "{", "if", "(", "!", "method_exists", "(", "$", "this", ",", "'getMinClient'", ")", "||", "!", "method_exists", "(", "$", "this", ",", "'getMaxClient'", ")", ")", "{", "throw", "new", "NotFoundEx...
Setup connection pool @access public @param array $config
[ "Setup", "connection", "pool" ]
0fc2b42903bb3519c54c596270c890c826aeb1df
https://github.com/sylingd/Yesf/blob/0fc2b42903bb3519c54c596270c890c826aeb1df/src/Connection/PoolTrait.php#L45-L63
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerIPaymentDebit.class.php
TShopPaymentHandlerIPaymentDebit.SetErrorCodesFromResponseToMessageManager
protected function SetErrorCodesFromResponseToMessageManager() { $SReturnMessage = $this->GetErrorCodesFromResponse(); if (!empty($SReturnMessage)) { $oMsgManager = TCMSMessageManager::GetInstance(); $oMsgManager->AddMessage(self::MSG_MANAGER_NAME, 'ERROR-ORDER-REQUEST-PAYMENT-ERROR', array('errorMsg' => $SReturnMessage)); } }
php
protected function SetErrorCodesFromResponseToMessageManager() { $SReturnMessage = $this->GetErrorCodesFromResponse(); if (!empty($SReturnMessage)) { $oMsgManager = TCMSMessageManager::GetInstance(); $oMsgManager->AddMessage(self::MSG_MANAGER_NAME, 'ERROR-ORDER-REQUEST-PAYMENT-ERROR', array('errorMsg' => $SReturnMessage)); } }
[ "protected", "function", "SetErrorCodesFromResponseToMessageManager", "(", ")", "{", "$", "SReturnMessage", "=", "$", "this", "->", "GetErrorCodesFromResponse", "(", ")", ";", "if", "(", "!", "empty", "(", "$", "SReturnMessage", ")", ")", "{", "$", "oMsgManager"...
if request to IPayment was not successfully create a error message.
[ "if", "request", "to", "IPayment", "was", "not", "successfully", "create", "a", "error", "message", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerIPaymentDebit.class.php#L68-L75
train
chameleon-system/chameleon-shop
src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerIPaymentDebit.class.php
TShopPaymentHandlerIPaymentDebit.GetUserAddressData
protected function GetUserAddressData() { $aUserAddressData = parent::GetUserAddressData(); $oActiveUser = TdbDataExtranetUser::GetInstance(); if ($oActiveUser) { $oBillingAddress = $oActiveUser->GetBillingAddress(); if ($oBillingAddress) { $aUserAddressData['addr_name'] = $oBillingAddress->fieldFirstname.' '.$oBillingAddress->fieldLastname; } } return $aUserAddressData; }
php
protected function GetUserAddressData() { $aUserAddressData = parent::GetUserAddressData(); $oActiveUser = TdbDataExtranetUser::GetInstance(); if ($oActiveUser) { $oBillingAddress = $oActiveUser->GetBillingAddress(); if ($oBillingAddress) { $aUserAddressData['addr_name'] = $oBillingAddress->fieldFirstname.' '.$oBillingAddress->fieldLastname; } } return $aUserAddressData; }
[ "protected", "function", "GetUserAddressData", "(", ")", "{", "$", "aUserAddressData", "=", "parent", "::", "GetUserAddressData", "(", ")", ";", "$", "oActiveUser", "=", "TdbDataExtranetUser", "::", "GetInstance", "(", ")", ";", "if", "(", "$", "oActiveUser", ...
Get user address data as array On ELV add user name to parameter. @return array $aUserAddressData
[ "Get", "user", "address", "data", "as", "array", "On", "ELV", "add", "user", "name", "to", "parameter", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerIPaymentDebit.class.php#L83-L95
train
chameleon-system/chameleon-shop
src/ShopBundle/mappers/article/TPkgShopMapper_ArticleOtherCategoriesTeaser.class.php
TPkgShopMapper_ArticleOtherCategoriesTeaser.&
protected function &getCategoryList(TdbShopArticle $oArticle) { /** @var $oCategoryList TdbShopCategoryList */ $oCategoryList = &$oArticle->GetFieldShopCategoryList(); $oCategoryList->GoToStart(); if (0 === $oCategoryList->Length() && $oArticle->IsVariant()) { $oParent = &$oArticle->GetFieldVariantParent(); $oCategoryList = &$oParent->GetFieldShopCategoryList(); $oCategoryList->GoToStart(); } return $oCategoryList; }
php
protected function &getCategoryList(TdbShopArticle $oArticle) { /** @var $oCategoryList TdbShopCategoryList */ $oCategoryList = &$oArticle->GetFieldShopCategoryList(); $oCategoryList->GoToStart(); if (0 === $oCategoryList->Length() && $oArticle->IsVariant()) { $oParent = &$oArticle->GetFieldVariantParent(); $oCategoryList = &$oParent->GetFieldShopCategoryList(); $oCategoryList->GoToStart(); } return $oCategoryList; }
[ "protected", "function", "&", "getCategoryList", "(", "TdbShopArticle", "$", "oArticle", ")", "{", "/** @var $oCategoryList TdbShopCategoryList */", "$", "oCategoryList", "=", "&", "$", "oArticle", "->", "GetFieldShopCategoryList", "(", ")", ";", "$", "oCategoryList", ...
return category list for article or parent article if article is variant and fetched category list is empty. @param TdbShopArticle $oArticle @return TdbShopCategoryList
[ "return", "category", "list", "for", "article", "or", "parent", "article", "if", "article", "is", "variant", "and", "fetched", "category", "list", "is", "empty", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/mappers/article/TPkgShopMapper_ArticleOtherCategoriesTeaser.class.php#L47-L59
train
chameleon-system/chameleon-shop
src/ShopBundle/mappers/article/TPkgShopMapper_ArticleOtherCategoriesTeaser.class.php
TPkgShopMapper_ArticleOtherCategoriesTeaser.getLink
protected function getLink(TdbShopCategory $oCategory, IMapperCacheTriggerRestricted $oCacheTriggerManager, $bCachingEnabled, $bLinkOnlyLastItem = false) { $aLinkParts = array(); $oBreadcrumb = $oCategory->GetBreadcrumb(); /** @var $oBreadcrumbItem TdbShopCategory */ while ($oBreadcrumbItem = $oBreadcrumb->Next()) { if ($bCachingEnabled) { $oCacheTriggerManager->addTrigger($oBreadcrumbItem->table, $oBreadcrumbItem->id); } $aLinkData = array( 'sName' => $oBreadcrumbItem->GetName(), 'sLink' => '', ); if (false === $bLinkOnlyLastItem || (true === $bLinkOnlyLastItem && $oBreadcrumb->IsLast())) { $aLinkData['sLink'] = $oBreadcrumbItem->GetLink(); } $aLinkParts[] = $aLinkData; } return $aLinkParts; }
php
protected function getLink(TdbShopCategory $oCategory, IMapperCacheTriggerRestricted $oCacheTriggerManager, $bCachingEnabled, $bLinkOnlyLastItem = false) { $aLinkParts = array(); $oBreadcrumb = $oCategory->GetBreadcrumb(); /** @var $oBreadcrumbItem TdbShopCategory */ while ($oBreadcrumbItem = $oBreadcrumb->Next()) { if ($bCachingEnabled) { $oCacheTriggerManager->addTrigger($oBreadcrumbItem->table, $oBreadcrumbItem->id); } $aLinkData = array( 'sName' => $oBreadcrumbItem->GetName(), 'sLink' => '', ); if (false === $bLinkOnlyLastItem || (true === $bLinkOnlyLastItem && $oBreadcrumb->IsLast())) { $aLinkData['sLink'] = $oBreadcrumbItem->GetLink(); } $aLinkParts[] = $aLinkData; } return $aLinkParts; }
[ "protected", "function", "getLink", "(", "TdbShopCategory", "$", "oCategory", ",", "IMapperCacheTriggerRestricted", "$", "oCacheTriggerManager", ",", "$", "bCachingEnabled", ",", "$", "bLinkOnlyLastItem", "=", "false", ")", "{", "$", "aLinkParts", "=", "array", "(",...
converts the category into an array with link data. @param TdbShopCategory $oCategory @param IMapperCacheTriggerRestricted $oCacheTriggerManager @param bool $bCachingEnabled @param bool $bLinkOnlyLastItem set to true if only the last category should have a link set otherwise each item has a link set @return array
[ "converts", "the", "category", "into", "an", "array", "with", "link", "data", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/mappers/article/TPkgShopMapper_ArticleOtherCategoriesTeaser.class.php#L71-L93
train
chameleon-system/chameleon-shop
src/ImageHotspotBundle/objects/db/TPkgImageHotspotItem.class.php
TPkgImageHotspotItem.GetNextItem
public function GetNextItem() { $oNextItem = &$this->GetFromInternalCache('oNextItem'); if (is_null($oNextItem)) { $oItemList = TdbPkgImageHotspotItemList::GetListForPkgImageHotspotId($this->fieldPkgImageHotspotId); $oItemList->bAllowItemCache = true; if ($oItemList->Length() > 1) { $oNextItem = null; $oFirst = $oItemList->Current(); while (is_null($oNextItem) && ($oTmpItem = $oItemList->Next())) { if ($oTmpItem->IsSameAs($this)) { $oNextItem = $oItemList->Next(); } } if (false === $oNextItem) { $oNextItem = $oFirst; if ($oNextItem->IsSameAs($this)) { $oNextItem = false; } } } $this->SetInternalCache('oNextItem', $oNextItem); } return $oNextItem; }
php
public function GetNextItem() { $oNextItem = &$this->GetFromInternalCache('oNextItem'); if (is_null($oNextItem)) { $oItemList = TdbPkgImageHotspotItemList::GetListForPkgImageHotspotId($this->fieldPkgImageHotspotId); $oItemList->bAllowItemCache = true; if ($oItemList->Length() > 1) { $oNextItem = null; $oFirst = $oItemList->Current(); while (is_null($oNextItem) && ($oTmpItem = $oItemList->Next())) { if ($oTmpItem->IsSameAs($this)) { $oNextItem = $oItemList->Next(); } } if (false === $oNextItem) { $oNextItem = $oFirst; if ($oNextItem->IsSameAs($this)) { $oNextItem = false; } } } $this->SetInternalCache('oNextItem', $oNextItem); } return $oNextItem; }
[ "public", "function", "GetNextItem", "(", ")", "{", "$", "oNextItem", "=", "&", "$", "this", "->", "GetFromInternalCache", "(", "'oNextItem'", ")", ";", "if", "(", "is_null", "(", "$", "oNextItem", ")", ")", "{", "$", "oItemList", "=", "TdbPkgImageHotspotI...
returns the item next in line relative to this item if the current item is the last in line, the method will return the first item. returns false if no next item exists. @return TdbPkgImageHotspotItem
[ "returns", "the", "item", "next", "in", "line", "relative", "to", "this", "item", "if", "the", "current", "item", "is", "the", "last", "in", "line", "the", "method", "will", "return", "the", "first", "item", ".", "returns", "false", "if", "no", "next", ...
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ImageHotspotBundle/objects/db/TPkgImageHotspotItem.class.php#L81-L106
train
chameleon-system/chameleon-shop
src/ImageHotspotBundle/objects/db/TPkgImageHotspotItem.class.php
TPkgImageHotspotItem.GetPreviousItem
public function GetPreviousItem() { $oPreviousItem = &$this->GetFromInternalCache('oPreviousItem'); if (is_null($oPreviousItem)) { $oItemList = TdbPkgImageHotspotItemList::GetListForPkgImageHotspotId($this->fieldPkgImageHotspotId); $oItemList->bAllowItemCache = true; if ($oItemList->Length() > 1) { $oPreviousItem = null; $oItemList->GoToEnd(); while (is_null($oPreviousItem) && ($oTmpItem = $oItemList->Previous())) { if ($oTmpItem->IsSameAs($this)) { $oPreviousItem = $oItemList->Previous(); } } if (!$oPreviousItem) { $oItemList->GoToEnd(); $oPreviousItem = $oItemList->Previous(); if (!$oPreviousItem || $oPreviousItem->IsSameAs($this)) { $oPreviousItem = false; } } } $this->SetInternalCache('oPreviousItem', $oPreviousItem); } return $oPreviousItem; }
php
public function GetPreviousItem() { $oPreviousItem = &$this->GetFromInternalCache('oPreviousItem'); if (is_null($oPreviousItem)) { $oItemList = TdbPkgImageHotspotItemList::GetListForPkgImageHotspotId($this->fieldPkgImageHotspotId); $oItemList->bAllowItemCache = true; if ($oItemList->Length() > 1) { $oPreviousItem = null; $oItemList->GoToEnd(); while (is_null($oPreviousItem) && ($oTmpItem = $oItemList->Previous())) { if ($oTmpItem->IsSameAs($this)) { $oPreviousItem = $oItemList->Previous(); } } if (!$oPreviousItem) { $oItemList->GoToEnd(); $oPreviousItem = $oItemList->Previous(); if (!$oPreviousItem || $oPreviousItem->IsSameAs($this)) { $oPreviousItem = false; } } } $this->SetInternalCache('oPreviousItem', $oPreviousItem); } return $oPreviousItem; }
[ "public", "function", "GetPreviousItem", "(", ")", "{", "$", "oPreviousItem", "=", "&", "$", "this", "->", "GetFromInternalCache", "(", "'oPreviousItem'", ")", ";", "if", "(", "is_null", "(", "$", "oPreviousItem", ")", ")", "{", "$", "oItemList", "=", "Tdb...
returns the item before this item if the current item is the first in line, the method will return the last item. returns false if no previous item exists. @return TdbPkgImageHotspotItem
[ "returns", "the", "item", "before", "this", "item", "if", "the", "current", "item", "is", "the", "first", "in", "line", "the", "method", "will", "return", "the", "last", "item", ".", "returns", "false", "if", "no", "previous", "item", "exists", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ImageHotspotBundle/objects/db/TPkgImageHotspotItem.class.php#L115-L141
train
chameleon-system/chameleon-shop
src/ImageHotspotBundle/objects/db/TPkgImageHotspotItem.class.php
TPkgImageHotspotItem.GetURLParameterBaseForActiveSpot
public static function GetURLParameterBaseForActiveSpot() { $oGlobal = TGlobal::instance(); $oRunningModule = &$oGlobal->GetExecutingModulePointer(); $sModuleSpotName = $oRunningModule->sModuleSpotName; return TdbPkgImageHotspotItem::URL_NAME_ITEM_ID.$sModuleSpotName; }
php
public static function GetURLParameterBaseForActiveSpot() { $oGlobal = TGlobal::instance(); $oRunningModule = &$oGlobal->GetExecutingModulePointer(); $sModuleSpotName = $oRunningModule->sModuleSpotName; return TdbPkgImageHotspotItem::URL_NAME_ITEM_ID.$sModuleSpotName; }
[ "public", "static", "function", "GetURLParameterBaseForActiveSpot", "(", ")", "{", "$", "oGlobal", "=", "TGlobal", "::", "instance", "(", ")", ";", "$", "oRunningModule", "=", "&", "$", "oGlobal", "->", "GetExecutingModulePointer", "(", ")", ";", "$", "sModule...
returns the url parameter base name for the currently active module spot. @return string
[ "returns", "the", "url", "parameter", "base", "name", "for", "the", "currently", "active", "module", "spot", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ImageHotspotBundle/objects/db/TPkgImageHotspotItem.class.php#L148-L155
train
chameleon-system/chameleon-shop
src/ImageHotspotBundle/objects/db/TPkgImageHotspotItem.class.php
TPkgImageHotspotItem.GetAjaxLink
public function GetAjaxLink($sViewName = 'standard', $sType = 'Core', $aParameter = array()) { $oGlobal = TGlobal::instance(); $oRunningModule = &$oGlobal->GetExecutingModulePointer(); $aParameter['id'] = $this->id; $aParameter['sViewName'] = $sViewName; $aParameter['sType'] = $sType; $aData = array( TdbPkgImageHotspotItem::GetURLParameterBaseForActiveSpot() => $aParameter, 'module_fnc' => array($oRunningModule->sModuleSpotName => 'ExecuteAjaxCall'), '_fnc' => 'AjaxRenderHotspotImage', ); return $this->getActivePageService()->getLinkToActivePageRelative($aData); }
php
public function GetAjaxLink($sViewName = 'standard', $sType = 'Core', $aParameter = array()) { $oGlobal = TGlobal::instance(); $oRunningModule = &$oGlobal->GetExecutingModulePointer(); $aParameter['id'] = $this->id; $aParameter['sViewName'] = $sViewName; $aParameter['sType'] = $sType; $aData = array( TdbPkgImageHotspotItem::GetURLParameterBaseForActiveSpot() => $aParameter, 'module_fnc' => array($oRunningModule->sModuleSpotName => 'ExecuteAjaxCall'), '_fnc' => 'AjaxRenderHotspotImage', ); return $this->getActivePageService()->getLinkToActivePageRelative($aData); }
[ "public", "function", "GetAjaxLink", "(", "$", "sViewName", "=", "'standard'", ",", "$", "sType", "=", "'Core'", ",", "$", "aParameter", "=", "array", "(", ")", ")", "{", "$", "oGlobal", "=", "TGlobal", "::", "instance", "(", ")", ";", "$", "oRunningMo...
return the url request needed to fetch the spot using ajax.
[ "return", "the", "url", "request", "needed", "to", "fetch", "the", "spot", "using", "ajax", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ImageHotspotBundle/objects/db/TPkgImageHotspotItem.class.php#L172-L186
train
chameleon-system/chameleon-shop
src/ShopListFilterBundle/objects/db/TPkgShopListfilterItem.class.php
TPkgShopListfilterItem.OverloadViewSettings
protected function OverloadViewSettings() { if (empty($this->fieldView)) { $oListFilterItemType = $this->GetFieldPkgShopListfilterItemType(); if (!is_null($oListFilterItemType) && !TGlobal::IsCMSMode()) { $this->sqlData['view'] = $oListFilterItemType->fieldView; $this->fieldView = $this->sqlData['view']; $this->sqlData['view_class_type'] = $oListFilterItemType->fieldViewClassType; $this->fieldViewClassType = $this->sqlData['view_class_type']; } } }
php
protected function OverloadViewSettings() { if (empty($this->fieldView)) { $oListFilterItemType = $this->GetFieldPkgShopListfilterItemType(); if (!is_null($oListFilterItemType) && !TGlobal::IsCMSMode()) { $this->sqlData['view'] = $oListFilterItemType->fieldView; $this->fieldView = $this->sqlData['view']; $this->sqlData['view_class_type'] = $oListFilterItemType->fieldViewClassType; $this->fieldViewClassType = $this->sqlData['view_class_type']; } } }
[ "protected", "function", "OverloadViewSettings", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "fieldView", ")", ")", "{", "$", "oListFilterItemType", "=", "$", "this", "->", "GetFieldPkgShopListfilterItemType", "(", ")", ";", "if", "(", "!", ...
overload view settings from filter-type if nothing is set in this filter-item.
[ "overload", "view", "settings", "from", "filter", "-", "type", "if", "nothing", "is", "set", "in", "this", "filter", "-", "item", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopListFilterBundle/objects/db/TPkgShopListfilterItem.class.php#L107-L118
train
chameleon-system/chameleon-shop
src/ShopListFilterBundle/objects/db/TPkgShopListfilterItem.class.php
TPkgShopListfilterItem.GetActiveSettingAsArray
public function GetActiveSettingAsArray() { $aData = array(); if (is_array($this->aActiveFilterData) || !empty($this->aActiveFilterData)) { $aData = array(TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA => array($this->id => $this->aActiveFilterData)); } return $aData; }
php
public function GetActiveSettingAsArray() { $aData = array(); if (is_array($this->aActiveFilterData) || !empty($this->aActiveFilterData)) { $aData = array(TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA => array($this->id => $this->aActiveFilterData)); } return $aData; }
[ "public", "function", "GetActiveSettingAsArray", "(", ")", "{", "$", "aData", "=", "array", "(", ")", ";", "if", "(", "is_array", "(", "$", "this", "->", "aActiveFilterData", ")", "||", "!", "empty", "(", "$", "this", "->", "aActiveFilterData", ")", ")",...
return the settings as an array. @return array
[ "return", "the", "settings", "as", "an", "array", "." ]
2e47f4eeab604449605ee1867180c9a37a8c208e
https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopListFilterBundle/objects/db/TPkgShopListfilterItem.class.php#L145-L153
train
edmondscommerce/doctrine-static-meta
src/CodeGeneration/ReflectionHelper.php
ReflectionHelper.getEntityNamespaceRootFromEntityReflection
public function getEntityNamespaceRootFromEntityReflection( ReflectionClass $entityReflection ): string { return $this->namespaceHelper->tidy( $this->namespaceHelper->getNamespaceRootToDirectoryFromFqn( $entityReflection->getName(), AbstractGenerator::ENTITIES_FOLDER_NAME ) ); }
php
public function getEntityNamespaceRootFromEntityReflection( ReflectionClass $entityReflection ): string { return $this->namespaceHelper->tidy( $this->namespaceHelper->getNamespaceRootToDirectoryFromFqn( $entityReflection->getName(), AbstractGenerator::ENTITIES_FOLDER_NAME ) ); }
[ "public", "function", "getEntityNamespaceRootFromEntityReflection", "(", "ReflectionClass", "$", "entityReflection", ")", ":", "string", "{", "return", "$", "this", "->", "namespaceHelper", "->", "tidy", "(", "$", "this", "->", "namespaceHelper", "->", "getNamespaceRo...
Work out the entity namespace root from a single entity reflection object. @param ReflectionClass $entityReflection @return string
[ "Work", "out", "the", "entity", "namespace", "root", "from", "a", "single", "entity", "reflection", "object", "." ]
c5b1caab0b2e3a84c34082af96529a274f0c3d7e
https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/ReflectionHelper.php#L49-L58
train