id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
31,800 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticleList.class.php | TShopArticleList.RestorePagingInfoFromSession | public function RestorePagingInfoFromSession($iStartRecord, $iPageSize)
{
$identKey = $this->GetListIdentKey();
$aTmpData = TdbShopArticleList::GetInstanceDataFromSession($identKey);
$bPagingWasRestoredFromSession = false;
if (!is_null($aTmpData)) {
$bPagingWasRestoredFro... | php | public function RestorePagingInfoFromSession($iStartRecord, $iPageSize)
{
$identKey = $this->GetListIdentKey();
$aTmpData = TdbShopArticleList::GetInstanceDataFromSession($identKey);
$bPagingWasRestoredFromSession = false;
if (!is_null($aTmpData)) {
$bPagingWasRestoredFro... | [
"public",
"function",
"RestorePagingInfoFromSession",
"(",
"$",
"iStartRecord",
",",
"$",
"iPageSize",
")",
"{",
"$",
"identKey",
"=",
"$",
"this",
"->",
"GetListIdentKey",
"(",
")",
";",
"$",
"aTmpData",
"=",
"TdbShopArticleList",
"::",
"GetInstanceDataFromSessio... | set the paging info from session.. if no value is set in session, use the passed values.
@param int $iStartRecord
@param int $iPageSize | [
"set",
"the",
"paging",
"info",
"from",
"session",
"..",
"if",
"no",
"value",
"is",
"set",
"in",
"session",
"use",
"the",
"passed",
"values",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticleList.class.php#L364-L392 |
31,801 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticleList.class.php | TShopArticleList.GetNextPageLink | public function GetNextPageLink()
{
$sLink = false;
if ($this->HasNextPage()) {
$oGlobal = TGlobal::instance();
$oExecutingModule = &$oGlobal->GetExecutingModulePointer();
$aAdditionalParameters = array('module_fnc['.$oExecutingModule->sModuleSpotName.']' => 'Chan... | php | public function GetNextPageLink()
{
$sLink = false;
if ($this->HasNextPage()) {
$oGlobal = TGlobal::instance();
$oExecutingModule = &$oGlobal->GetExecutingModulePointer();
$aAdditionalParameters = array('module_fnc['.$oExecutingModule->sModuleSpotName.']' => 'Chan... | [
"public",
"function",
"GetNextPageLink",
"(",
")",
"{",
"$",
"sLink",
"=",
"false",
";",
"if",
"(",
"$",
"this",
"->",
"HasNextPage",
"(",
")",
")",
"{",
"$",
"oGlobal",
"=",
"TGlobal",
"::",
"instance",
"(",
")",
";",
"$",
"oExecutingModule",
"=",
"... | return link to next page, or false if there is no next page.
@return string | [
"return",
"link",
"to",
"next",
"page",
"or",
"false",
"if",
"there",
"is",
"no",
"next",
"page",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticleList.class.php#L399-L410 |
31,802 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticleList.class.php | TShopArticleList.GetNextPageLinkAsAJAXCall | public function GetNextPageLinkAsAJAXCall($bGetAsJSFunction = true)
{
$sLink = false;
if ($this->HasNextPage()) {
$oGlobal = TGlobal::instance();
$oExecutingModule = &$oGlobal->GetExecutingModulePointer();
$aAdditionalParameters = array('module_fnc['.$oExecutingMo... | php | public function GetNextPageLinkAsAJAXCall($bGetAsJSFunction = true)
{
$sLink = false;
if ($this->HasNextPage()) {
$oGlobal = TGlobal::instance();
$oExecutingModule = &$oGlobal->GetExecutingModulePointer();
$aAdditionalParameters = array('module_fnc['.$oExecutingMo... | [
"public",
"function",
"GetNextPageLinkAsAJAXCall",
"(",
"$",
"bGetAsJSFunction",
"=",
"true",
")",
"{",
"$",
"sLink",
"=",
"false",
";",
"if",
"(",
"$",
"this",
"->",
"HasNextPage",
"(",
")",
")",
"{",
"$",
"oGlobal",
"=",
"TGlobal",
"::",
"instance",
"(... | returns the javascript call to fetch the items for the next page.
@param bool $bGetAsJSFunction - set to false if you just want the link
@return string | [
"returns",
"the",
"javascript",
"call",
"to",
"fetch",
"the",
"items",
"for",
"the",
"next",
"page",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticleList.class.php#L419-L434 |
31,803 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticleList.class.php | TShopArticleList.HandleURLRequest | public function HandleURLRequest($sRequest, $bCheckIdentKey = false)
{
$bAllowRequest = true;
if ($bCheckIdentKey) {
$currentListKey = $this->GetListIdentKey();
$oGlobal = TGlobal::instance();
$callingIdentKey = $oGlobal->GetUserData(TdbShopArticleList::URL_LIST_K... | php | public function HandleURLRequest($sRequest, $bCheckIdentKey = false)
{
$bAllowRequest = true;
if ($bCheckIdentKey) {
$currentListKey = $this->GetListIdentKey();
$oGlobal = TGlobal::instance();
$callingIdentKey = $oGlobal->GetUserData(TdbShopArticleList::URL_LIST_K... | [
"public",
"function",
"HandleURLRequest",
"(",
"$",
"sRequest",
",",
"$",
"bCheckIdentKey",
"=",
"false",
")",
"{",
"$",
"bAllowRequest",
"=",
"true",
";",
"if",
"(",
"$",
"bCheckIdentKey",
")",
"{",
"$",
"currentListKey",
"=",
"$",
"this",
"->",
"GetListI... | process any request made for this item.
@param string $sRequest
@param bool $bCheckIdentKey | [
"process",
"any",
"request",
"made",
"for",
"this",
"item",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticleList.class.php#L538-L569 |
31,804 | PGB-LIV/php-ms | src/Reader/MzIdentMlReader1r1.php | MzIdentMlReader1r1.getEnzyme | private function getEnzyme(\SimpleXMLElement $xmlEnzyme)
{
$enzyme = array();
foreach ($xmlEnzyme->attributes() as $attribute => $value) {
switch ($attribute) {
case 'cTermGain':
$enzyme['cTermGain'] = (string) $value;
break;
... | php | private function getEnzyme(\SimpleXMLElement $xmlEnzyme)
{
$enzyme = array();
foreach ($xmlEnzyme->attributes() as $attribute => $value) {
switch ($attribute) {
case 'cTermGain':
$enzyme['cTermGain'] = (string) $value;
break;
... | [
"private",
"function",
"getEnzyme",
"(",
"\\",
"SimpleXMLElement",
"$",
"xmlEnzyme",
")",
"{",
"$",
"enzyme",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"xmlEnzyme",
"->",
"attributes",
"(",
")",
"as",
"$",
"attribute",
"=>",
"$",
"value",
")",
... | The details of an individual cleavage enzyme should be provided by giving a regular expression or a CV term if a "standard" enzyme cleavage has been
performed.
@param \SimpleXMLElement $xmlEnzyme
The XML element
@return string[]|number[]|boolean[]|NULL[]|string[][] | [
"The",
"details",
"of",
"an",
"individual",
"cleavage",
"enzyme",
"should",
"be",
"provided",
"by",
"giving",
"a",
"regular",
"expression",
"or",
"a",
"CV",
"term",
"if",
"a",
"standard",
"enzyme",
"cleavage",
"has",
"been",
"performed",
"."
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Reader/MzIdentMlReader1r1.php#L304-L342 |
31,805 | PGB-LIV/php-ms | src/Reader/MzIdentMlReader1r1.php | MzIdentMlReader1r1.getEnzymes | protected function getEnzymes(\SimpleXMLElement $xml)
{
$enzymes = array();
foreach ($xml->Enzyme as $xmlEnzyme) {
$enzyme = $this->getEnzyme($xmlEnzyme);
if (isset($enzyme['id'])) {
$enzymes[$enzyme['id']] = $enzyme;
continue;
}
... | php | protected function getEnzymes(\SimpleXMLElement $xml)
{
$enzymes = array();
foreach ($xml->Enzyme as $xmlEnzyme) {
$enzyme = $this->getEnzyme($xmlEnzyme);
if (isset($enzyme['id'])) {
$enzymes[$enzyme['id']] = $enzyme;
continue;
}
... | [
"protected",
"function",
"getEnzymes",
"(",
"\\",
"SimpleXMLElement",
"$",
"xml",
")",
"{",
"$",
"enzymes",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"xml",
"->",
"Enzyme",
"as",
"$",
"xmlEnzyme",
")",
"{",
"$",
"enzyme",
"=",
"$",
"this",
"-... | The list of enzymes used in experiment
@param \SimpleXMLElement $xml
@return array | [
"The",
"list",
"of",
"enzymes",
"used",
"in",
"experiment"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Reader/MzIdentMlReader1r1.php#L359-L375 |
31,806 | PGB-LIV/php-ms | src/Reader/MzIdentMlReader1r1.php | MzIdentMlReader1r1.getFileFormat | private function getFileFormat(\SimpleXMLElement $xml)
{
$formats = array();
foreach ($xml->cvParam as $xmlCvParam) {
$cvParam = $this->getCvParam($xmlCvParam);
$formats[] = $cvParam[PsiVerb::CV_ACCESSION];
}
return $formats;
} | php | private function getFileFormat(\SimpleXMLElement $xml)
{
$formats = array();
foreach ($xml->cvParam as $xmlCvParam) {
$cvParam = $this->getCvParam($xmlCvParam);
$formats[] = $cvParam[PsiVerb::CV_ACCESSION];
}
return $formats;
} | [
"private",
"function",
"getFileFormat",
"(",
"\\",
"SimpleXMLElement",
"$",
"xml",
")",
"{",
"$",
"formats",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"xml",
"->",
"cvParam",
"as",
"$",
"xmlCvParam",
")",
"{",
"$",
"cvParam",
"=",
"$",
"this",
... | The format of the ExternalData file, for example "tiff" for image files.
@param \SimpleXMLElement $xml
XML to parse | [
"The",
"format",
"of",
"the",
"ExternalData",
"file",
"for",
"example",
"tiff",
"for",
"image",
"files",
"."
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Reader/MzIdentMlReader1r1.php#L393-L404 |
31,807 | PGB-LIV/php-ms | src/Reader/MzIdentMlReader1r1.php | MzIdentMlReader1r1.getPeptideHypothesis | private function getPeptideHypothesis(\SimpleXMLElement $xml)
{
$hypothesis = array();
$ref = (string) $xml->attributes()->peptideEvidence_ref;
$hypothesis['peptide'] = $ref;
$hypothesis['spectra'] = array();
// TODO: Nothing we can currently do with this data - yet
... | php | private function getPeptideHypothesis(\SimpleXMLElement $xml)
{
$hypothesis = array();
$ref = (string) $xml->attributes()->peptideEvidence_ref;
$hypothesis['peptide'] = $ref;
$hypothesis['spectra'] = array();
// TODO: Nothing we can currently do with this data - yet
... | [
"private",
"function",
"getPeptideHypothesis",
"(",
"\\",
"SimpleXMLElement",
"$",
"xml",
")",
"{",
"$",
"hypothesis",
"=",
"array",
"(",
")",
";",
"$",
"ref",
"=",
"(",
"string",
")",
"$",
"xml",
"->",
"attributes",
"(",
")",
"->",
"peptideEvidence_ref",
... | Peptide evidence on which this ProteinHypothesis is based by reference to a PeptideEvidence element.
@param \SimpleXMLElement $xml
XML to parse | [
"Peptide",
"evidence",
"on",
"which",
"this",
"ProteinHypothesis",
"is",
"based",
"by",
"reference",
"to",
"a",
"PeptideEvidence",
"element",
"."
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Reader/MzIdentMlReader1r1.php#L612-L626 |
31,808 | PGB-LIV/php-ms | src/Reader/MzIdentMlReader1r1.php | MzIdentMlReader1r1.getProteinAmbiguityGroup | private function getProteinAmbiguityGroup(\SimpleXMLElement $xml)
{
$hypos = array();
foreach ($xml->ProteinDetectionHypothesis as $proteinDetectionHypothesis) {
$hypo = $this->getProteinDetectionHypothesis($proteinDetectionHypothesis);
$hypos[$hypo['id']] = $hypo;
}
... | php | private function getProteinAmbiguityGroup(\SimpleXMLElement $xml)
{
$hypos = array();
foreach ($xml->ProteinDetectionHypothesis as $proteinDetectionHypothesis) {
$hypo = $this->getProteinDetectionHypothesis($proteinDetectionHypothesis);
$hypos[$hypo['id']] = $hypo;
}
... | [
"private",
"function",
"getProteinAmbiguityGroup",
"(",
"\\",
"SimpleXMLElement",
"$",
"xml",
")",
"{",
"$",
"hypos",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"xml",
"->",
"ProteinDetectionHypothesis",
"as",
"$",
"proteinDetectionHypothesis",
")",
"{",
... | A set of logically related results from a protein detection, for example to represent conflicting assignments of peptides to proteins.
@param \SimpleXMLElement $xml
XML to parse | [
"A",
"set",
"of",
"logically",
"related",
"results",
"from",
"a",
"protein",
"detection",
"for",
"example",
"to",
"represent",
"conflicting",
"assignments",
"of",
"peptides",
"to",
"proteins",
"."
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Reader/MzIdentMlReader1r1.php#L644-L653 |
31,809 | PGB-LIV/php-ms | src/Reader/MzIdentMlReader1r1.php | MzIdentMlReader1r1.getProteinDetectionList | public function getProteinDetectionList()
{
$this->getSequenceCollection();
$groups = array();
if (! isset($this->xmlReader->DataCollection->AnalysisData->ProteinDetectionList->ProteinAmbiguityGroup)) {
return null;
}
foreach ($this->xmlReader->DataCollection->... | php | public function getProteinDetectionList()
{
$this->getSequenceCollection();
$groups = array();
if (! isset($this->xmlReader->DataCollection->AnalysisData->ProteinDetectionList->ProteinAmbiguityGroup)) {
return null;
}
foreach ($this->xmlReader->DataCollection->... | [
"public",
"function",
"getProteinDetectionList",
"(",
")",
"{",
"$",
"this",
"->",
"getSequenceCollection",
"(",
")",
";",
"$",
"groups",
"=",
"array",
"(",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"xmlReader",
"->",
"DataCollection",
"... | The protein list resulting from a protein detection process. | [
"The",
"protein",
"list",
"resulting",
"from",
"a",
"protein",
"detection",
"process",
"."
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Reader/MzIdentMlReader1r1.php#L702-L728 |
31,810 | PGB-LIV/php-ms | src/Reader/MzIdentMlReader1r1.php | MzIdentMlReader1r1.getSpectrumIdFormat | private function getSpectrumIdFormat(\SimpleXMLElement $xml)
{
$cvParam = $this->getCvParam($xml->cvParam);
return $cvParam[PsiVerb::CV_ACCESSION];
} | php | private function getSpectrumIdFormat(\SimpleXMLElement $xml)
{
$cvParam = $this->getCvParam($xml->cvParam);
return $cvParam[PsiVerb::CV_ACCESSION];
} | [
"private",
"function",
"getSpectrumIdFormat",
"(",
"\\",
"SimpleXMLElement",
"$",
"xml",
")",
"{",
"$",
"cvParam",
"=",
"$",
"this",
"->",
"getCvParam",
"(",
"$",
"xml",
"->",
"cvParam",
")",
";",
"return",
"$",
"cvParam",
"[",
"PsiVerb",
"::",
"CV_ACCESSI... | The format of the spectrum identifier within the source file.
@param \SimpleXMLElement $xml
XML to parse
@return string | [
"The",
"format",
"of",
"the",
"spectrum",
"identifier",
"within",
"the",
"source",
"file",
"."
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Reader/MzIdentMlReader1r1.php#L997-L1002 |
31,811 | PGB-LIV/php-ms | src/Core/ProteinTrait.php | ProteinTrait.addProtein | public function addProtein(Protein $protein, $start = null, $end = null)
{
$entry = new ProteinEntry($protein);
if (! is_null($start)) {
$entry->setStart($start);
}
if (! is_null($end)) {
$entry->setEnd($end);
}
$this->addProteinEntry($entry)... | php | public function addProtein(Protein $protein, $start = null, $end = null)
{
$entry = new ProteinEntry($protein);
if (! is_null($start)) {
$entry->setStart($start);
}
if (! is_null($end)) {
$entry->setEnd($end);
}
$this->addProteinEntry($entry)... | [
"public",
"function",
"addProtein",
"(",
"Protein",
"$",
"protein",
",",
"$",
"start",
"=",
"null",
",",
"$",
"end",
"=",
"null",
")",
"{",
"$",
"entry",
"=",
"new",
"ProteinEntry",
"(",
"$",
"protein",
")",
";",
"if",
"(",
"!",
"is_null",
"(",
"$"... | Add a new protein mapping to this object.
Start and end positions on the protein sequence can be specified
@param Protein $protein
The protein to map to
@param int $start
The start position of this peptide in the sequence
@param int $end
The end position this peptide in the sequence | [
"Add",
"a",
"new",
"protein",
"mapping",
"to",
"this",
"object",
".",
"Start",
"and",
"end",
"positions",
"on",
"the",
"protein",
"sequence",
"can",
"be",
"specified"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Core/ProteinTrait.php#L47-L59 |
31,812 | chameleon-system/chameleon-shop | src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php | TShopDataExtranetUser.PostInsertHook | protected function PostInsertHook()
{
parent::PostInsertHook();
// we need to add an customer number to the order... since generation of this number may differ
// from shop to shop, we have added the method to fetch a new customer number to the shop class
if (empty($this->sqlData['c... | php | protected function PostInsertHook()
{
parent::PostInsertHook();
// we need to add an customer number to the order... since generation of this number may differ
// from shop to shop, we have added the method to fetch a new customer number to the shop class
if (empty($this->sqlData['c... | [
"protected",
"function",
"PostInsertHook",
"(",
")",
"{",
"parent",
"::",
"PostInsertHook",
"(",
")",
";",
"// we need to add an customer number to the order... since generation of this number may differ",
"// from shop to shop, we have added the method to fetch a new customer number to th... | we use the post insert hook to set the customer number. | [
"we",
"use",
"the",
"post",
"insert",
"hook",
"to",
"set",
"the",
"customer",
"number",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php#L39-L59 |
31,813 | chameleon-system/chameleon-shop | src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php | TShopDataExtranetUser.GetCustomerNumber | public function GetCustomerNumber()
{
$sCustNr = parent::GetCustomerNumber();
if (empty($sCustNr)) {
$oShop = TdbShop::GetInstance();
$sCustNr = $oShop->GetNextFreeCustomerNumber();
$aData = $this->sqlData;
$aData['customer_number'] = $sCustNr;
... | php | public function GetCustomerNumber()
{
$sCustNr = parent::GetCustomerNumber();
if (empty($sCustNr)) {
$oShop = TdbShop::GetInstance();
$sCustNr = $oShop->GetNextFreeCustomerNumber();
$aData = $this->sqlData;
$aData['customer_number'] = $sCustNr;
... | [
"public",
"function",
"GetCustomerNumber",
"(",
")",
"{",
"$",
"sCustNr",
"=",
"parent",
"::",
"GetCustomerNumber",
"(",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"sCustNr",
")",
")",
"{",
"$",
"oShop",
"=",
"TdbShop",
"::",
"GetInstance",
"(",
")",
";",... | returns the users customer number, if set.
@return string | [
"returns",
"the",
"users",
"customer",
"number",
"if",
"set",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php#L108-L120 |
31,814 | chameleon-system/chameleon-shop | src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php | TShopDataExtranetUser.PostLoginHookMergeTemporaryHistoryWithDatabaseHistory | protected function PostLoginHookMergeTemporaryHistoryWithDatabaseHistory()
{
// merge current data with user data
$aHistory = $this->GetArticleViewHistory();
$aTmpList = array_reverse($aHistory, true);
foreach (array_keys($aTmpList) as $histKey) {
if (is_null($aTmpList[$h... | php | protected function PostLoginHookMergeTemporaryHistoryWithDatabaseHistory()
{
// merge current data with user data
$aHistory = $this->GetArticleViewHistory();
$aTmpList = array_reverse($aHistory, true);
foreach (array_keys($aTmpList) as $histKey) {
if (is_null($aTmpList[$h... | [
"protected",
"function",
"PostLoginHookMergeTemporaryHistoryWithDatabaseHistory",
"(",
")",
"{",
"// merge current data with user data",
"$",
"aHistory",
"=",
"$",
"this",
"->",
"GetArticleViewHistory",
"(",
")",
";",
"$",
"aTmpList",
"=",
"array_reverse",
"(",
"$",
"aH... | takes the article view history from session and merges it with the data
in the database. this is done when the user logs in to make the history permanent. | [
"takes",
"the",
"article",
"view",
"history",
"from",
"session",
"and",
"merges",
"it",
"with",
"the",
"data",
"in",
"the",
"database",
".",
"this",
"is",
"done",
"when",
"the",
"user",
"logs",
"in",
"to",
"make",
"the",
"history",
"permanent",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php#L136-L158 |
31,815 | chameleon-system/chameleon-shop | src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php | TShopDataExtranetUser.PostLoginHookMergeTemporaryNoticeListWithDatabaseHistory | protected function PostLoginHookMergeTemporaryNoticeListWithDatabaseHistory()
{
// merge current notice list with existing notice list
$aNoticeList = $this->GetNoticeListArticles();
$aTmpList = array_reverse($aNoticeList, true);
foreach (array_keys($aTmpList) as $iArticleId) {
... | php | protected function PostLoginHookMergeTemporaryNoticeListWithDatabaseHistory()
{
// merge current notice list with existing notice list
$aNoticeList = $this->GetNoticeListArticles();
$aTmpList = array_reverse($aNoticeList, true);
foreach (array_keys($aTmpList) as $iArticleId) {
... | [
"protected",
"function",
"PostLoginHookMergeTemporaryNoticeListWithDatabaseHistory",
"(",
")",
"{",
"// merge current notice list with existing notice list",
"$",
"aNoticeList",
"=",
"$",
"this",
"->",
"GetNoticeListArticles",
"(",
")",
";",
"$",
"aTmpList",
"=",
"array_rever... | takes the notice list from session and merges it with the data
in the database. this is done when the user logs in to make the notice list permanent. | [
"takes",
"the",
"notice",
"list",
"from",
"session",
"and",
"merges",
"it",
"with",
"the",
"data",
"in",
"the",
"database",
".",
"this",
"is",
"done",
"when",
"the",
"user",
"logs",
"in",
"to",
"make",
"the",
"notice",
"list",
"permanent",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php#L164-L191 |
31,816 | chameleon-system/chameleon-shop | src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php | TShopDataExtranetUser.GetUserAlias | public function GetUserAlias()
{
$sAlias = trim($this->fieldAliasName);
if (empty($sAlias)) {
$sAlias = $this->fieldFirstname.' '.mb_substr($this->fieldLastname, 0, 1).'.';
}
return $sAlias;
} | php | public function GetUserAlias()
{
$sAlias = trim($this->fieldAliasName);
if (empty($sAlias)) {
$sAlias = $this->fieldFirstname.' '.mb_substr($this->fieldLastname, 0, 1).'.';
}
return $sAlias;
} | [
"public",
"function",
"GetUserAlias",
"(",
")",
"{",
"$",
"sAlias",
"=",
"trim",
"(",
"$",
"this",
"->",
"fieldAliasName",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"sAlias",
")",
")",
"{",
"$",
"sAlias",
"=",
"$",
"this",
"->",
"fieldFirstname",
".",
... | return alias for the user.
@return string | [
"return",
"alias",
"for",
"the",
"user",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php#L198-L206 |
31,817 | chameleon-system/chameleon-shop | src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php | TShopDataExtranetUser.GetArticleViewHistory | public function GetArticleViewHistory()
{
if (is_null($this->aArticleViewHistory)) {
$this->aArticleViewHistory = array();
$iMaxQueueLength = 100;
$shop = $this->getShopService()->getActiveShop();
if ($shop->fieldDataExtranetUserShopArticleHistoryMaxArticleCou... | php | public function GetArticleViewHistory()
{
if (is_null($this->aArticleViewHistory)) {
$this->aArticleViewHistory = array();
$iMaxQueueLength = 100;
$shop = $this->getShopService()->getActiveShop();
if ($shop->fieldDataExtranetUserShopArticleHistoryMaxArticleCou... | [
"public",
"function",
"GetArticleViewHistory",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"aArticleViewHistory",
")",
")",
"{",
"$",
"this",
"->",
"aArticleViewHistory",
"=",
"array",
"(",
")",
";",
"$",
"iMaxQueueLength",
"=",
"100",
";"... | returns the ids of up to the last 100 articles viewed.
@return array | [
"returns",
"the",
"ids",
"of",
"up",
"to",
"the",
"last",
"100",
"articles",
"viewed",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php#L330-L371 |
31,818 | chameleon-system/chameleon-shop | src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php | TShopDataExtranetUser.AddArticleIdToNoticeList | public function AddArticleIdToNoticeList($iArticleId, $iAmount = 1)
{
$dNewAmountOnList = 0;
if (is_null($this->aNoticeList)) {
$this->GetNoticeListArticles();
}
// check if the item being pushed is already in the end of the queue
$iMaxQueueLength = 1000;
... | php | public function AddArticleIdToNoticeList($iArticleId, $iAmount = 1)
{
$dNewAmountOnList = 0;
if (is_null($this->aNoticeList)) {
$this->GetNoticeListArticles();
}
// check if the item being pushed is already in the end of the queue
$iMaxQueueLength = 1000;
... | [
"public",
"function",
"AddArticleIdToNoticeList",
"(",
"$",
"iArticleId",
",",
"$",
"iAmount",
"=",
"1",
")",
"{",
"$",
"dNewAmountOnList",
"=",
"0",
";",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"aNoticeList",
")",
")",
"{",
"$",
"this",
"->",
"G... | add an article to the notice list.
@param int $iArticleId
@param float $iAmount
@return float - new amount on list | [
"add",
"an",
"article",
"to",
"the",
"notice",
"list",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php#L427-L473 |
31,819 | chameleon-system/chameleon-shop | src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php | TShopDataExtranetUser.CommitNoticeListToCookie | protected function CommitNoticeListToCookie()
{
$aNoticeList = array();
reset($this->aNoticeList);
foreach (array_keys($this->aNoticeList) as $iItemId) {
$aNoticeList[$iItemId] = $this->aNoticeList[$iItemId];
}
$sNoticeList = json_encode($aNoticeList);
$sN... | php | protected function CommitNoticeListToCookie()
{
$aNoticeList = array();
reset($this->aNoticeList);
foreach (array_keys($this->aNoticeList) as $iItemId) {
$aNoticeList[$iItemId] = $this->aNoticeList[$iItemId];
}
$sNoticeList = json_encode($aNoticeList);
$sN... | [
"protected",
"function",
"CommitNoticeListToCookie",
"(",
")",
"{",
"$",
"aNoticeList",
"=",
"array",
"(",
")",
";",
"reset",
"(",
"$",
"this",
"->",
"aNoticeList",
")",
";",
"foreach",
"(",
"array_keys",
"(",
"$",
"this",
"->",
"aNoticeList",
")",
"as",
... | save user notice list to cookie. | [
"save",
"user",
"notice",
"list",
"to",
"cookie",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php#L478-L498 |
31,820 | chameleon-system/chameleon-shop | src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php | TShopDataExtranetUser.RemoveArticleFromNoticeList | public function RemoveArticleFromNoticeList($sArticleId)
{
$this->GetNoticeListArticles();
if (array_key_exists($sArticleId, $this->aNoticeList)) {
unset($this->aNoticeList[$sArticleId]);
if ($this->IsLoggedIn()) {
$noticeListItemObject = TdbShopUserNoticeList... | php | public function RemoveArticleFromNoticeList($sArticleId)
{
$this->GetNoticeListArticles();
if (array_key_exists($sArticleId, $this->aNoticeList)) {
unset($this->aNoticeList[$sArticleId]);
if ($this->IsLoggedIn()) {
$noticeListItemObject = TdbShopUserNoticeList... | [
"public",
"function",
"RemoveArticleFromNoticeList",
"(",
"$",
"sArticleId",
")",
"{",
"$",
"this",
"->",
"GetNoticeListArticles",
"(",
")",
";",
"if",
"(",
"array_key_exists",
"(",
"$",
"sArticleId",
",",
"$",
"this",
"->",
"aNoticeList",
")",
")",
"{",
"un... | remove an article form the notice list.
@param string $sArticleId | [
"remove",
"an",
"article",
"form",
"the",
"notice",
"list",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php#L505-L524 |
31,821 | chameleon-system/chameleon-shop | src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php | TShopDataExtranetUser.ValidateData | public function ValidateData($sFormDataName = null)
{
if (is_null($sFormDataName)) {
$sFormDataName = TdbDataExtranetUser::MSG_FORM_FIELD;
}
$bIsValid = parent::ValidateData($sFormDataName);
$oMsgManager = TCMSMessageManager::GetInstance();
// check postal code f... | php | public function ValidateData($sFormDataName = null)
{
if (is_null($sFormDataName)) {
$sFormDataName = TdbDataExtranetUser::MSG_FORM_FIELD;
}
$bIsValid = parent::ValidateData($sFormDataName);
$oMsgManager = TCMSMessageManager::GetInstance();
// check postal code f... | [
"public",
"function",
"ValidateData",
"(",
"$",
"sFormDataName",
"=",
"null",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"sFormDataName",
")",
")",
"{",
"$",
"sFormDataName",
"=",
"TdbDataExtranetUser",
"::",
"MSG_FORM_FIELD",
";",
"}",
"$",
"bIsValid",
"=",
... | validates the user data.
@param string $sFormDataName - the array name used for the form. send error messages here
@return bool | [
"validates",
"the",
"user",
"data",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php#L533-L556 |
31,822 | chameleon-system/chameleon-shop | src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php | TShopDataExtranetUser.GetTotalOrderValue | public function GetTotalOrderValue($sStartDate = null, $sEndDate = null)
{
$query = "SELECT SUM(value_total) AS ordervalue
FROM `shop_order`
WHERE `data_extranet_user_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'
AND (`shop... | php | public function GetTotalOrderValue($sStartDate = null, $sEndDate = null)
{
$query = "SELECT SUM(value_total) AS ordervalue
FROM `shop_order`
WHERE `data_extranet_user_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'
AND (`shop... | [
"public",
"function",
"GetTotalOrderValue",
"(",
"$",
"sStartDate",
"=",
"null",
",",
"$",
"sEndDate",
"=",
"null",
")",
"{",
"$",
"query",
"=",
"\"SELECT SUM(value_total) AS ordervalue\n FROM `shop_order`\n WHERE `data_extranet_user_id` = '\"",
... | return the total order value of the customer.
@param string|null $sStartDate
@param string|null $sEndDate
@return float | [
"return",
"the",
"total",
"order",
"value",
"of",
"the",
"customer",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php#L566-L586 |
31,823 | chameleon-system/chameleon-shop | src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php | TShopDataExtranetUser.Logout | public function Logout()
{
$oBasket = TShopBasket::GetInstance();
if (is_array($oBasket->aCompletedOrderStepList)) {
reset($oBasket->aCompletedOrderStepList);
foreach ($oBasket->aCompletedOrderStepList as $sStepName => $bValue) {
$oBasket->aCompletedOrderStepL... | php | public function Logout()
{
$oBasket = TShopBasket::GetInstance();
if (is_array($oBasket->aCompletedOrderStepList)) {
reset($oBasket->aCompletedOrderStepList);
foreach ($oBasket->aCompletedOrderStepList as $sStepName => $bValue) {
$oBasket->aCompletedOrderStepL... | [
"public",
"function",
"Logout",
"(",
")",
"{",
"$",
"oBasket",
"=",
"TShopBasket",
"::",
"GetInstance",
"(",
")",
";",
"if",
"(",
"is_array",
"(",
"$",
"oBasket",
"->",
"aCompletedOrderStepList",
")",
")",
"{",
"reset",
"(",
"$",
"oBasket",
"->",
"aCompl... | logs the user out. | [
"logs",
"the",
"user",
"out",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/pkgExtranet/objects/db/TShopDataExtranetUser.class.php#L605-L622 |
31,824 | chameleon-system/chameleon-shop | src/ShopBundle/Payment/PaymentConfig/ShopPaymentConfigLoader.php | ShopPaymentConfigLoader.isApplicable | private function isApplicable(ShopPaymentConfigRawValue $value, $environment, $portalId)
{
return (($environment === $value->getEnvironment()) || (IPkgShopOrderPaymentConfig::ENVIRONMENT_COMMON === $value->getEnvironment()))
&& (($portalId === $value->getPortalId()) || ('' === $value->getPortalI... | php | private function isApplicable(ShopPaymentConfigRawValue $value, $environment, $portalId)
{
return (($environment === $value->getEnvironment()) || (IPkgShopOrderPaymentConfig::ENVIRONMENT_COMMON === $value->getEnvironment()))
&& (($portalId === $value->getPortalId()) || ('' === $value->getPortalI... | [
"private",
"function",
"isApplicable",
"(",
"ShopPaymentConfigRawValue",
"$",
"value",
",",
"$",
"environment",
",",
"$",
"portalId",
")",
"{",
"return",
"(",
"(",
"$",
"environment",
"===",
"$",
"value",
"->",
"getEnvironment",
"(",
")",
")",
"||",
"(",
"... | Returns true if the given config value can be applied, i.e. the environment and portal do match.
@param ShopPaymentConfigRawValue $value
@param string $environment one of IPkgShopOrderPaymentConfig::ENVIRONMENT_*
@param string $portalId
@return bool | [
"Returns",
"true",
"if",
"the",
"given",
"config",
"value",
"can",
"be",
"applied",
"i",
".",
"e",
".",
"the",
"environment",
"and",
"portal",
"do",
"match",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/Payment/PaymentConfig/ShopPaymentConfigLoader.php#L301-L305 |
31,825 | chameleon-system/chameleon-shop | src/ShopBundle/Payment/PaymentConfig/ShopPaymentConfigLoader.php | ShopPaymentConfigLoader.hasHigherPriority | private function hasHigherPriority(
ShopPaymentConfigRawValue $value1,
ShopPaymentConfigRawValue $value2,
$environment,
$portalId
) {
if ($this->hasHigherSourcePriority($value1, $value2)) {
return true;
}
if ($this->hasHigherPortalPriority($value1,... | php | private function hasHigherPriority(
ShopPaymentConfigRawValue $value1,
ShopPaymentConfigRawValue $value2,
$environment,
$portalId
) {
if ($this->hasHigherSourcePriority($value1, $value2)) {
return true;
}
if ($this->hasHigherPortalPriority($value1,... | [
"private",
"function",
"hasHigherPriority",
"(",
"ShopPaymentConfigRawValue",
"$",
"value1",
",",
"ShopPaymentConfigRawValue",
"$",
"value2",
",",
"$",
"environment",
",",
"$",
"portalId",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"hasHigherSourcePriority",
"(",
"$"... | Returns true if value1 has a higher priority than value2.
@param ShopPaymentConfigRawValue $value1
@param ShopPaymentConfigRawValue $value2
@param string $environment one of IPkgShopOrderPaymentConfig::ENVIRONMENT_*
@param string $portalId
@return bool | [
"Returns",
"true",
"if",
"value1",
"has",
"a",
"higher",
"priority",
"than",
"value2",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/Payment/PaymentConfig/ShopPaymentConfigLoader.php#L317-L334 |
31,826 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Samples/WebServerExample.php | WebServerExample.waitForNotificationToBeProcessedBeforeContinuing | protected function waitForNotificationToBeProcessedBeforeContinuing(
$identifier,
$notificationType
) {
$fileName = $this->folderPath . $identifier . "_" . $notificationType . ".txt";
// timeout after 1 minute
$totalChecks = 0;
while (!file_exists($fileName) && $tota... | php | protected function waitForNotificationToBeProcessedBeforeContinuing(
$identifier,
$notificationType
) {
$fileName = $this->folderPath . $identifier . "_" . $notificationType . ".txt";
// timeout after 1 minute
$totalChecks = 0;
while (!file_exists($fileName) && $tota... | [
"protected",
"function",
"waitForNotificationToBeProcessedBeforeContinuing",
"(",
"$",
"identifier",
",",
"$",
"notificationType",
")",
"{",
"$",
"fileName",
"=",
"$",
"this",
"->",
"folderPath",
".",
"$",
"identifier",
".",
"\"_\"",
".",
"$",
"notificationType",
... | Check that we have received an IPN notification for the defined event
For PHP, there is an IPN handler that will write the contents of the IPN to
a file in the format of
<amazonOrderReferenceId>_<amazonAuthorizationId>_Authorization.
This method will check for the presnece of this file
and will loop/timeout until the ... | [
"Check",
"that",
"we",
"have",
"received",
"an",
"IPN",
"notification",
"for",
"the",
"defined",
"event"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Samples/WebServerExample.php#L105-L122 |
31,827 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Samples/WebServerExample.php | WebServerExample.printResponseToWebpage | protected function printResponseToWebpage($stepName, $arg=array())
{
ob_start();
call_user_func_array($stepName, $arg);
$result = ob_get_contents();
ob_clean();
$result = preg_replace("/(\\n)/", HTML_LB, $result);
$result = preg_replace("/(\\s)/", " ", $result);
... | php | protected function printResponseToWebpage($stepName, $arg=array())
{
ob_start();
call_user_func_array($stepName, $arg);
$result = ob_get_contents();
ob_clean();
$result = preg_replace("/(\\n)/", HTML_LB, $result);
$result = preg_replace("/(\\s)/", " ", $result);
... | [
"protected",
"function",
"printResponseToWebpage",
"(",
"$",
"stepName",
",",
"$",
"arg",
"=",
"array",
"(",
")",
")",
"{",
"ob_start",
"(",
")",
";",
"call_user_func_array",
"(",
"$",
"stepName",
",",
"$",
"arg",
")",
";",
"$",
"result",
"=",
"ob_get_co... | Invoke the passed in function and print the results out in
html format to the output buffer
@param string $stepName Name of the function to call
@param array $arg Function arguments
@return void | [
"Invoke",
"the",
"passed",
"in",
"function",
"and",
"print",
"the",
"results",
"out",
"in",
"html",
"format",
"to",
"the",
"output",
"buffer"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Samples/WebServerExample.php#L160-L169 |
31,828 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php | AutomaticPaymentsSimpleCheckoutExample.getBillingAgreementDetails | public function getBillingAgreementDetails ()
{
$getBillingAgreementDetailsRequest = new OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest();
$getBillingAgreementDetailsRequest->setSellerId($this->_sellerId);
$getBillingAgreementDetailsRequest->setAmazonBillingAgreementId(
... | php | public function getBillingAgreementDetails ()
{
$getBillingAgreementDetailsRequest = new OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest();
$getBillingAgreementDetailsRequest->setSellerId($this->_sellerId);
$getBillingAgreementDetailsRequest->setAmazonBillingAgreementId(
... | [
"public",
"function",
"getBillingAgreementDetails",
"(",
")",
"{",
"$",
"getBillingAgreementDetailsRequest",
"=",
"new",
"OffAmazonPaymentsService_Model_GetBillingAgreementDetailsRequest",
"(",
")",
";",
"$",
"getBillingAgreementDetailsRequest",
"->",
"setSellerId",
"(",
"$",
... | Use the billing agreement object to query the automatic payment
information, including the current physical delivery address as selected
by the buyer
@return OffAmazonPaymentsService_Model_GetBillingAgreementDetailsResponse
service response | [
"Use",
"the",
"billing",
"agreement",
"object",
"to",
"query",
"the",
"automatic",
"payment",
"information",
"including",
"the",
"current",
"physical",
"delivery",
"address",
"as",
"selected",
"by",
"the",
"buyer"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php#L87-L95 |
31,829 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php | AutomaticPaymentsSimpleCheckoutExample.calculatePaymentAmountBasedOnBuyerDetails | public function calculatePaymentAmountBasedOnBuyerDetails ($BillingAgreementDetails,
$orderAmountPreTaxAndShipping, $shippingType)
{
return $this->_shippingAndTaxCostHelper->calculateTotalAmount($BillingAgreementDetails,
$orderAmountPreTaxAndShipping, $shippingType);
} | php | public function calculatePaymentAmountBasedOnBuyerDetails ($BillingAgreementDetails,
$orderAmountPreTaxAndShipping, $shippingType)
{
return $this->_shippingAndTaxCostHelper->calculateTotalAmount($BillingAgreementDetails,
$orderAmountPreTaxAndShipping, $shippingType);
} | [
"public",
"function",
"calculatePaymentAmountBasedOnBuyerDetails",
"(",
"$",
"BillingAgreementDetails",
",",
"$",
"orderAmountPreTaxAndShipping",
",",
"$",
"shippingType",
")",
"{",
"return",
"$",
"this",
"->",
"_shippingAndTaxCostHelper",
"->",
"calculateTotalAmount",
"(",... | Calculate the amount to charge the buyer for each payment, based on the
buyer destination address
Note that until the billing agreement is confirmed, the name & address
fields will not be returned to the client.
@param OffAmazonPaymentsService_Model_BillingAgreementDetails $BillingAgreementDetails
response
@param str... | [
"Calculate",
"the",
"amount",
"to",
"charge",
"the",
"buyer",
"for",
"each",
"payment",
"based",
"on",
"the",
"buyer",
"destination",
"address"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php#L113-L118 |
31,830 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php | AutomaticPaymentsSimpleCheckoutExample.addSellerInformationToBillingAgreement | public function addSellerInformationToBillingAgreement ()
{
$sellerBillingAgreementAttributes = new OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes();
$sellerBillingAgreementAttributes->setSellerBillingAgreementId(
$this->_amazonBillingAgreementId);
$sellerBil... | php | public function addSellerInformationToBillingAgreement ()
{
$sellerBillingAgreementAttributes = new OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes();
$sellerBillingAgreementAttributes->setSellerBillingAgreementId(
$this->_amazonBillingAgreementId);
$sellerBil... | [
"public",
"function",
"addSellerInformationToBillingAgreement",
"(",
")",
"{",
"$",
"sellerBillingAgreementAttributes",
"=",
"new",
"OffAmazonPaymentsService_Model_SellerBillingAgreementAttributes",
"(",
")",
";",
"$",
"sellerBillingAgreementAttributes",
"->",
"setSellerBillingAgre... | Set seller specific information to the billing agreement details.
@return OffAmazonPaymentsService_Model_SetBillingAgreementDetailsResponse
service response | [
"Set",
"seller",
"specific",
"information",
"to",
"the",
"billing",
"agreement",
"details",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php#L126-L148 |
31,831 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php | AutomaticPaymentsSimpleCheckoutExample.confirmBillingAgreement | public function confirmBillingAgreement ()
{
$confirmBillingAgreementRequest = new OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest();
$confirmBillingAgreementRequest->setAmazonBillingAgreementId(
$this->_amazonBillingAgreementId);
$confirmBillingAgreementRequest... | php | public function confirmBillingAgreement ()
{
$confirmBillingAgreementRequest = new OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest();
$confirmBillingAgreementRequest->setAmazonBillingAgreementId(
$this->_amazonBillingAgreementId);
$confirmBillingAgreementRequest... | [
"public",
"function",
"confirmBillingAgreement",
"(",
")",
"{",
"$",
"confirmBillingAgreementRequest",
"=",
"new",
"OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest",
"(",
")",
";",
"$",
"confirmBillingAgreementRequest",
"->",
"setAmazonBillingAgreementId",
"(",
"$... | Confirm the billing agreement information, allowing for authorizations
and captures to be created
@return OffAmazonPaymentsService_Model_ConfirmBillingAgreementResponse
service response | [
"Confirm",
"the",
"billing",
"agreement",
"information",
"allowing",
"for",
"authorizations",
"and",
"captures",
"to",
"be",
"created"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php#L157-L165 |
31,832 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php | AutomaticPaymentsSimpleCheckoutExample.validateBillingAgreement | public function validateBillingAgreement ()
{
$validateBillingAgreementRequest = new OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest();
$validateBillingAgreementRequest->setAmazonBillingAgreementId(
$this->_amazonBillingAgreementId);
$validateBillingAgreementRe... | php | public function validateBillingAgreement ()
{
$validateBillingAgreementRequest = new OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest();
$validateBillingAgreementRequest->setAmazonBillingAgreementId(
$this->_amazonBillingAgreementId);
$validateBillingAgreementRe... | [
"public",
"function",
"validateBillingAgreement",
"(",
")",
"{",
"$",
"validateBillingAgreementRequest",
"=",
"new",
"OffAmazonPaymentsService_Model_ValidateBillingAgreementRequest",
"(",
")",
";",
"$",
"validateBillingAgreementRequest",
"->",
"setAmazonBillingAgreementId",
"(",
... | Check that the billing agreement is in valid status and the selected payment
method is also valid.
@return OffAmazonPaymentsService_Model_ValidateBillingAgreementResponse
service response | [
"Check",
"that",
"the",
"billing",
"agreement",
"is",
"in",
"valid",
"status",
"and",
"the",
"selected",
"payment",
"method",
"is",
"also",
"valid",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php#L174-L182 |
31,833 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php | AutomaticPaymentsSimpleCheckoutExample.authorizePaymentAmount | public function authorizePaymentAmount ($authorizationAmount, $authorizationReferenceId)
{
$authorizeOnBillingAgreementRequest = $this->_createAuthorizeOnBillingAgreementRequest(
$authorizationAmount, $authorizationReferenceId, false);
return $this->_service->authorizeOnBillingAgreem... | php | public function authorizePaymentAmount ($authorizationAmount, $authorizationReferenceId)
{
$authorizeOnBillingAgreementRequest = $this->_createAuthorizeOnBillingAgreementRequest(
$authorizationAmount, $authorizationReferenceId, false);
return $this->_service->authorizeOnBillingAgreem... | [
"public",
"function",
"authorizePaymentAmount",
"(",
"$",
"authorizationAmount",
",",
"$",
"authorizationReferenceId",
")",
"{",
"$",
"authorizeOnBillingAgreementRequest",
"=",
"$",
"this",
"->",
"_createAuthorizeOnBillingAgreementRequest",
"(",
"$",
"authorizationAmount",
... | Perform the authorize call on the billing agreement
@param float $authorizationAmount
amount to authorize from the buyer
@param string $authorizationReferenceId
seller provided authorization reference id
@return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse
service response | [
"Perform",
"the",
"authorize",
"call",
"on",
"the",
"billing",
"agreement"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php#L196-L201 |
31,834 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php | AutomaticPaymentsSimpleCheckoutExample.authorizePaymentAmountWithCaptureNow | public function authorizePaymentAmountWithCaptureNow ($authorizationAmount,
$authorizationReferenceId)
{
$authorizeOnBillingAgreementRequest = $this->_createAuthorizeOnBillingAgreementRequest(
$authorizationAmount, $authorizationReferenceId, true);
return $this->_service... | php | public function authorizePaymentAmountWithCaptureNow ($authorizationAmount,
$authorizationReferenceId)
{
$authorizeOnBillingAgreementRequest = $this->_createAuthorizeOnBillingAgreementRequest(
$authorizationAmount, $authorizationReferenceId, true);
return $this->_service... | [
"public",
"function",
"authorizePaymentAmountWithCaptureNow",
"(",
"$",
"authorizationAmount",
",",
"$",
"authorizationReferenceId",
")",
"{",
"$",
"authorizeOnBillingAgreementRequest",
"=",
"$",
"this",
"->",
"_createAuthorizeOnBillingAgreementRequest",
"(",
"$",
"authorizat... | Authorize on the billing agreement with auto capture
@param float $authorizationAmount
amount to authorize from the buyer
@param string $authorizationReferenceId
seller provided authorization reference id
@return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementResponse
service response | [
"Authorize",
"on",
"the",
"billing",
"agreement",
"with",
"auto",
"capture"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php#L215-L221 |
31,835 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php | AutomaticPaymentsSimpleCheckoutExample._createAuthorizeOnBillingAgreementRequest | private function _createAuthorizeOnBillingAgreementRequest ($authorizationAmount,
$authorizationReferenceId, $CaptureNow)
{
$authorizeOnBillingAgreementRequest = new OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest();
$authorizeOnBillingAgreementRequest->setAmazonBillin... | php | private function _createAuthorizeOnBillingAgreementRequest ($authorizationAmount,
$authorizationReferenceId, $CaptureNow)
{
$authorizeOnBillingAgreementRequest = new OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest();
$authorizeOnBillingAgreementRequest->setAmazonBillin... | [
"private",
"function",
"_createAuthorizeOnBillingAgreementRequest",
"(",
"$",
"authorizationAmount",
",",
"$",
"authorizationReferenceId",
",",
"$",
"CaptureNow",
")",
"{",
"$",
"authorizeOnBillingAgreementRequest",
"=",
"new",
"OffAmazonPaymentsService_Model_AuthorizeOnBillingAg... | Create AuthorizeOnBillingAgreement request
@param float $authorizationAmount
@param string $authorizationReferenceId
@param bool $CaptureNow
@return OffAmazonPaymentsService_Model_AuthorizeOnBillingAgreementRequest | [
"Create",
"AuthorizeOnBillingAgreement",
"request"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php#L232-L249 |
31,836 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php | AutomaticPaymentsSimpleCheckoutExample.getCaptureDetails | public function getCaptureDetails ($amazonCaptureId)
{
$captureDetailsRequest = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest();
$captureDetailsRequest->setSellerId($this->_sellerId);
$captureDetailsRequest->setAmazonCaptureId($amazonCaptureId);
return $this->_... | php | public function getCaptureDetails ($amazonCaptureId)
{
$captureDetailsRequest = new OffAmazonPaymentsService_Model_GetCaptureDetailsRequest();
$captureDetailsRequest->setSellerId($this->_sellerId);
$captureDetailsRequest->setAmazonCaptureId($amazonCaptureId);
return $this->_... | [
"public",
"function",
"getCaptureDetails",
"(",
"$",
"amazonCaptureId",
")",
"{",
"$",
"captureDetailsRequest",
"=",
"new",
"OffAmazonPaymentsService_Model_GetCaptureDetailsRequest",
"(",
")",
";",
"$",
"captureDetailsRequest",
"->",
"setSellerId",
"(",
"$",
"this",
"->... | Perform the get capture details call for the order
@param string $amazonCaptureId
capture it to get details for
@return OffAmazonPaymentsService_Model_CaptureResponse service response | [
"Perform",
"the",
"get",
"capture",
"details",
"call",
"for",
"the",
"order"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php#L338-L345 |
31,837 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php | AutomaticPaymentsSimpleCheckoutExample.closeBillingAgreement | public function closeBillingAgreement ()
{
$closeBillingAgreementRequest = new OffAmazonPaymentsService_Model_CloseBillingAgreementRequest();
$closeBillingAgreementRequest->setSellerId($this->_sellerId);
$closeBillingAgreementRequest->setAmazonBillingAgreementId($this->_amazonBillingAgreemen... | php | public function closeBillingAgreement ()
{
$closeBillingAgreementRequest = new OffAmazonPaymentsService_Model_CloseBillingAgreementRequest();
$closeBillingAgreementRequest->setSellerId($this->_sellerId);
$closeBillingAgreementRequest->setAmazonBillingAgreementId($this->_amazonBillingAgreemen... | [
"public",
"function",
"closeBillingAgreement",
"(",
")",
"{",
"$",
"closeBillingAgreementRequest",
"=",
"new",
"OffAmazonPaymentsService_Model_CloseBillingAgreementRequest",
"(",
")",
";",
"$",
"closeBillingAgreementRequest",
"->",
"setSellerId",
"(",
"$",
"this",
"->",
"... | Close this billing agreement to indicate that the billing agreement is
complete, and
no further authorizations and captures will be performed on this billing
agreement.
@return OffAmazonPaymentsService_Model_CloseBillingAgreementResponse
service response | [
"Close",
"this",
"billing",
"agreement",
"to",
"indicate",
"that",
"the",
"billing",
"agreement",
"is",
"complete",
"and",
"no",
"further",
"authorizations",
"and",
"captures",
"will",
"be",
"performed",
"on",
"this",
"billing",
"agreement",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Samples/AutomaticPaymentsSimpleCheckoutExample.php#L356-L364 |
31,838 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopCategoryList.class.php | TShopCategoryList.& | public static function &GetArticleCategories($iArticleId, $sLanguageID = null)
{
$oList = null;
$sCategoryRestriction = TdbShopCategoryList::GetActiveCategoryQueryRestriction();
if (!empty($sCategoryRestriction)) {
$sCategoryRestriction = ' AND '.$sCategoryRestriction;
}
... | php | public static function &GetArticleCategories($iArticleId, $sLanguageID = null)
{
$oList = null;
$sCategoryRestriction = TdbShopCategoryList::GetActiveCategoryQueryRestriction();
if (!empty($sCategoryRestriction)) {
$sCategoryRestriction = ' AND '.$sCategoryRestriction;
}
... | [
"public",
"static",
"function",
"&",
"GetArticleCategories",
"(",
"$",
"iArticleId",
",",
"$",
"sLanguageID",
"=",
"null",
")",
"{",
"$",
"oList",
"=",
"null",
";",
"$",
"sCategoryRestriction",
"=",
"TdbShopCategoryList",
"::",
"GetActiveCategoryQueryRestriction",
... | return all categories connected to the article
Add main category from article to list on first position.
@param int $iArticleId
@param string $sLanguageID
@return TdbShopCategoryList | [
"return",
"all",
"categories",
"connected",
"to",
"the",
"article",
"Add",
"main",
"category",
"from",
"article",
"to",
"list",
"on",
"first",
"position",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopCategoryList.class.php#L29-L57 |
31,839 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopCategoryList.class.php | TShopCategoryList.& | public static function &GetRootCategoryList($sLanguageID = null)
{
if (null === $sLanguageID) {
$sLanguageID = self::getMyLanguageService()->getActiveLanguageId();
}
$sRestriction = "(`shop_category`.`shop_category_id` = '0' OR `shop_category`.`shop_category_id` = '')";
$... | php | public static function &GetRootCategoryList($sLanguageID = null)
{
if (null === $sLanguageID) {
$sLanguageID = self::getMyLanguageService()->getActiveLanguageId();
}
$sRestriction = "(`shop_category`.`shop_category_id` = '0' OR `shop_category`.`shop_category_id` = '')";
$... | [
"public",
"static",
"function",
"&",
"GetRootCategoryList",
"(",
"$",
"sLanguageID",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"sLanguageID",
")",
"{",
"$",
"sLanguageID",
"=",
"self",
"::",
"getMyLanguageService",
"(",
")",
"->",
"getActiveLangu... | return root category list.
@param string|null $sLanguageID
@return TdbShopCategoryList | [
"return",
"root",
"category",
"list",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopCategoryList.class.php#L66-L79 |
31,840 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopCategoryList.class.php | TShopCategoryList.& | public static function &GetDefaultCategory()
{
static $oCategory;
if (!$oCategory) {
$oRootCategories = &TdbShopCategoryList::GetChildCategories();
if ($oRootCategories->Length() > 0) {
$oCategory = &$oRootCategories->Current();
}
}
... | php | public static function &GetDefaultCategory()
{
static $oCategory;
if (!$oCategory) {
$oRootCategories = &TdbShopCategoryList::GetChildCategories();
if ($oRootCategories->Length() > 0) {
$oCategory = &$oRootCategories->Current();
}
}
... | [
"public",
"static",
"function",
"&",
"GetDefaultCategory",
"(",
")",
"{",
"static",
"$",
"oCategory",
";",
"if",
"(",
"!",
"$",
"oCategory",
")",
"{",
"$",
"oRootCategories",
"=",
"&",
"TdbShopCategoryList",
"::",
"GetChildCategories",
"(",
")",
";",
"if",
... | returns the shops default article category.
@return TdbShopCategory | [
"returns",
"the",
"shops",
"default",
"article",
"category",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopCategoryList.class.php#L111-L122 |
31,841 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopCategoryList.class.php | TShopCategoryList.& | public static function &GetChildCategories($iParentId = null, $aFilter = null, $sLanguageID = null)
{
$sActiveSnippetRestriction = TdbShopCategoryList::GetActiveCategoryQueryRestriction();
if (is_null($iParentId)) {
$iParentId = '';
}
$parameters = array(
'par... | php | public static function &GetChildCategories($iParentId = null, $aFilter = null, $sLanguageID = null)
{
$sActiveSnippetRestriction = TdbShopCategoryList::GetActiveCategoryQueryRestriction();
if (is_null($iParentId)) {
$iParentId = '';
}
$parameters = array(
'par... | [
"public",
"static",
"function",
"&",
"GetChildCategories",
"(",
"$",
"iParentId",
"=",
"null",
",",
"$",
"aFilter",
"=",
"null",
",",
"$",
"sLanguageID",
"=",
"null",
")",
"{",
"$",
"sActiveSnippetRestriction",
"=",
"TdbShopCategoryList",
"::",
"GetActiveCategor... | returns the child categories of the category identified by iParentId
if no parent id is given, then the root categories will be returned.
@param string|null $iParentId
@param array $aFilter - an optional filter list for the category
@param string|null $sLanguageID
@return TdbShopCategoryList | [
"returns",
"the",
"child",
"categories",
"of",
"the",
"category",
"identified",
"by",
"iParentId",
"if",
"no",
"parent",
"id",
"is",
"given",
"then",
"the",
"root",
"categories",
"will",
"be",
"returned",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopCategoryList.class.php#L167-L198 |
31,842 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopCategoryList.class.php | TShopCategoryList.& | public static function &GetCategoryPath($iEndNodeId, $iStartNodeId = null, $sLanguageID = null)
{
if (null === $sLanguageID) {
$sLanguageID = self::getLanguageService()->getActiveLanguageId();
}
$bDone = false;
$iCurrentCatId = $iEndNodeId;
$aTmpList = array(); /... | php | public static function &GetCategoryPath($iEndNodeId, $iStartNodeId = null, $sLanguageID = null)
{
if (null === $sLanguageID) {
$sLanguageID = self::getLanguageService()->getActiveLanguageId();
}
$bDone = false;
$iCurrentCatId = $iEndNodeId;
$aTmpList = array(); /... | [
"public",
"static",
"function",
"&",
"GetCategoryPath",
"(",
"$",
"iEndNodeId",
",",
"$",
"iStartNodeId",
"=",
"null",
",",
"$",
"sLanguageID",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"sLanguageID",
")",
"{",
"$",
"sLanguageID",
"=",
"self"... | return category path from iEndNodeId to iStartNodeId. if not start node is given,
the path will start at the root category.
@param int $iStartNodeId
@param int $iEndNodeId
@param string $sLanguageID
@return TIterator | [
"return",
"category",
"path",
"from",
"iEndNodeId",
"to",
"iStartNodeId",
".",
"if",
"not",
"start",
"node",
"is",
"given",
"the",
"path",
"will",
"start",
"at",
"the",
"root",
"category",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopCategoryList.class.php#L233-L270 |
31,843 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopCategoryList.class.php | TShopCategoryList.getParentCategoryList | public static function getParentCategoryList($categoryId)
{
$categoryList = new TIterator();
$aTmpList = array(); // we store the list in a tmp array so we can reverse the order
$currentCategoryId = $categoryId;
$bDone = false;
$requestInfoService = self::getRequestInfoServic... | php | public static function getParentCategoryList($categoryId)
{
$categoryList = new TIterator();
$aTmpList = array(); // we store the list in a tmp array so we can reverse the order
$currentCategoryId = $categoryId;
$bDone = false;
$requestInfoService = self::getRequestInfoServic... | [
"public",
"static",
"function",
"getParentCategoryList",
"(",
"$",
"categoryId",
")",
"{",
"$",
"categoryList",
"=",
"new",
"TIterator",
"(",
")",
";",
"$",
"aTmpList",
"=",
"array",
"(",
")",
";",
"// we store the list in a tmp array so we can reverse the order",
"... | return all parent categories from the tree.
@param string $categoryId
@return TIterator | [
"return",
"all",
"parent",
"categories",
"from",
"the",
"tree",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopCategoryList.class.php#L313-L349 |
31,844 | comporu/compo-core | src/Compo/Sonata/AdminBundle/Form/FormMapper.php | FormMapper.tab | public function tab($name, array $options = [])
{
if (!isset($options['label'])) {
$options['label'] = 'form.tab_' . $name;
}
return parent::tab($name, $options);
} | php | public function tab($name, array $options = [])
{
if (!isset($options['label'])) {
$options['label'] = 'form.tab_' . $name;
}
return parent::tab($name, $options);
} | [
"public",
"function",
"tab",
"(",
"$",
"name",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"options",
"[",
"'label'",
"]",
")",
")",
"{",
"$",
"options",
"[",
"'label'",
"]",
"=",
"'form.tab_'",
".",
... | Add new tab.
@param string $name
@param array $options
@return BaseGroupedMapper | [
"Add",
"new",
"tab",
"."
] | ebaa9fe8a4b831506c78fdf637da6b4deadec1e2 | https://github.com/comporu/compo-core/blob/ebaa9fe8a4b831506c78fdf637da6b4deadec1e2/src/Compo/Sonata/AdminBundle/Form/FormMapper.php#L27-L34 |
31,845 | PGB-LIV/php-ms | src/Core/ModifiableSequenceTrait.php | ModifiableSequenceTrait.removeModification | public function removeModification(Modification $searchModification)
{
foreach ($this->modifications as $key => $modification) {
if ($modification !== $searchModification) {
continue;
}
unset($this->modifications[$key]);
}
} | php | public function removeModification(Modification $searchModification)
{
foreach ($this->modifications as $key => $modification) {
if ($modification !== $searchModification) {
continue;
}
unset($this->modifications[$key]);
}
} | [
"public",
"function",
"removeModification",
"(",
"Modification",
"$",
"searchModification",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"modifications",
"as",
"$",
"key",
"=>",
"$",
"modification",
")",
"{",
"if",
"(",
"$",
"modification",
"!==",
"$",
"sear... | Remove a modification | [
"Remove",
"a",
"modification"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Core/ModifiableSequenceTrait.php#L121-L130 |
31,846 | PGB-LIV/php-ms | src/Core/ModifiableSequenceTrait.php | ModifiableSequenceTrait.getMonoisotopicMass | public function getMonoisotopicMass()
{
$acids = str_split($this->getSequence(), 1);
$mass = ChemicalConstants::HYDROGEN_MASS + ChemicalConstants::HYDROGEN_MASS + ChemicalConstants::OXYGEN_MASS;
foreach ($acids as $acid) {
switch ($acid) {
case 'X':
... | php | public function getMonoisotopicMass()
{
$acids = str_split($this->getSequence(), 1);
$mass = ChemicalConstants::HYDROGEN_MASS + ChemicalConstants::HYDROGEN_MASS + ChemicalConstants::OXYGEN_MASS;
foreach ($acids as $acid) {
switch ($acid) {
case 'X':
... | [
"public",
"function",
"getMonoisotopicMass",
"(",
")",
"{",
"$",
"acids",
"=",
"str_split",
"(",
"$",
"this",
"->",
"getSequence",
"(",
")",
",",
"1",
")",
";",
"$",
"mass",
"=",
"ChemicalConstants",
"::",
"HYDROGEN_MASS",
"+",
"ChemicalConstants",
"::",
"... | Gets the theoretical monoisotopic neutral mass for this sequence and it's modifications
@return float The neutral mass of the sequence | [
"Gets",
"the",
"theoretical",
"monoisotopic",
"neutral",
"mass",
"for",
"this",
"sequence",
"and",
"it",
"s",
"modifications"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Core/ModifiableSequenceTrait.php#L193-L253 |
31,847 | edmondscommerce/doctrine-static-meta | codeTemplates/src/Entity/Relations/TemplateEntity/Traits/HasRequiredTemplateEntitiesAbstract.php | HasRequiredTemplateEntitiesAbstract.initTemplateEntities | private function initTemplateEntities(): self
{
if (null !== $this->templateEntities) {
return $this;
}
$this->templateEntities = new ArrayCollection();
return $this;
} | php | private function initTemplateEntities(): self
{
if (null !== $this->templateEntities) {
return $this;
}
$this->templateEntities = new ArrayCollection();
return $this;
} | [
"private",
"function",
"initTemplateEntities",
"(",
")",
":",
"self",
"{",
"if",
"(",
"null",
"!==",
"$",
"this",
"->",
"templateEntities",
")",
"{",
"return",
"$",
"this",
";",
"}",
"$",
"this",
"->",
"templateEntities",
"=",
"new",
"ArrayCollection",
"("... | Initialise the templateEntities property as a Doctrine ArrayCollection
@return $this
@SuppressWarnings(PHPMD.UnusedPrivateMethod) | [
"Initialise",
"the",
"templateEntities",
"property",
"as",
"a",
"Doctrine",
"ArrayCollection"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/codeTemplates/src/Entity/Relations/TemplateEntity/Traits/HasRequiredTemplateEntitiesAbstract.php#L138-L146 |
31,848 | edmondscommerce/doctrine-static-meta | src/Entity/Traits/AlwaysValidTrait.php | AlwaysValidTrait.injectEntityDataValidator | public function injectEntityDataValidator(EntityDataValidatorInterface $entityDataValidator)
{
$this->entityDataValidator = $entityDataValidator;
$this->entityDataValidator->setEntity($this);
} | php | public function injectEntityDataValidator(EntityDataValidatorInterface $entityDataValidator)
{
$this->entityDataValidator = $entityDataValidator;
$this->entityDataValidator->setEntity($this);
} | [
"public",
"function",
"injectEntityDataValidator",
"(",
"EntityDataValidatorInterface",
"$",
"entityDataValidator",
")",
"{",
"$",
"this",
"->",
"entityDataValidator",
"=",
"$",
"entityDataValidator",
";",
"$",
"this",
"->",
"entityDataValidator",
"->",
"setEntity",
"("... | This method is called automatically by the EntityFactory when initialisig the Entity, by way of the
EntityDependencyInjector
@param EntityDataValidatorInterface $entityDataValidator | [
"This",
"method",
"is",
"called",
"automatically",
"by",
"the",
"EntityFactory",
"when",
"initialisig",
"the",
"Entity",
"by",
"way",
"of",
"the",
"EntityDependencyInjector"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Traits/AlwaysValidTrait.php#L129-L133 |
31,849 | edmondscommerce/doctrine-static-meta | src/Entity/Traits/ImplementNotifyChangeTrackingPolicy.php | ImplementNotifyChangeTrackingPolicy.ensureMetaDataIsSet | public function ensureMetaDataIsSet(EntityManagerInterface $entityManager): void
{
self::getDoctrineStaticMeta()->setMetaData($entityManager->getClassMetadata(self::class));
} | php | public function ensureMetaDataIsSet(EntityManagerInterface $entityManager): void
{
self::getDoctrineStaticMeta()->setMetaData($entityManager->getClassMetadata(self::class));
} | [
"public",
"function",
"ensureMetaDataIsSet",
"(",
"EntityManagerInterface",
"$",
"entityManager",
")",
":",
"void",
"{",
"self",
"::",
"getDoctrineStaticMeta",
"(",
")",
"->",
"setMetaData",
"(",
"$",
"entityManager",
"->",
"getClassMetadata",
"(",
"self",
"::",
"... | The meta data is set to the entity when the meta data is loaded, however if metadata is cached that wont happen
This call ensures that the meta data is set
@param EntityManagerInterface $entityManager | [
"The",
"meta",
"data",
"is",
"set",
"to",
"the",
"entity",
"when",
"the",
"meta",
"data",
"is",
"loaded",
"however",
"if",
"metadata",
"is",
"cached",
"that",
"wont",
"happen",
"This",
"call",
"ensures",
"that",
"the",
"meta",
"data",
"is",
"set"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Traits/ImplementNotifyChangeTrackingPolicy.php#L52-L55 |
31,850 | edmondscommerce/doctrine-static-meta | src/Entity/Traits/ImplementNotifyChangeTrackingPolicy.php | ImplementNotifyChangeTrackingPolicy.notifyEmbeddablePrefixedProperties | public function notifyEmbeddablePrefixedProperties(
string $embeddablePropertyName,
?string $propName = null,
$oldValue = null,
$newValue = null
): void {
if ($oldValue !== null && $oldValue === $newValue) {
return;
}
/**
* @var ClassMetad... | php | public function notifyEmbeddablePrefixedProperties(
string $embeddablePropertyName,
?string $propName = null,
$oldValue = null,
$newValue = null
): void {
if ($oldValue !== null && $oldValue === $newValue) {
return;
}
/**
* @var ClassMetad... | [
"public",
"function",
"notifyEmbeddablePrefixedProperties",
"(",
"string",
"$",
"embeddablePropertyName",
",",
"?",
"string",
"$",
"propName",
"=",
"null",
",",
"$",
"oldValue",
"=",
"null",
",",
"$",
"newValue",
"=",
"null",
")",
":",
"void",
"{",
"if",
"("... | This notifies the embeddable properties on the owning Entity
@param string $embeddablePropertyName
@param null|string $propName
@param null $oldValue
@param null $newValue | [
"This",
"notifies",
"the",
"embeddable",
"properties",
"on",
"the",
"owning",
"Entity"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Traits/ImplementNotifyChangeTrackingPolicy.php#L65-L91 |
31,851 | edmondscommerce/doctrine-static-meta | src/Entity/Traits/ImplementNotifyChangeTrackingPolicy.php | ImplementNotifyChangeTrackingPolicy.updatePropertyValue | private function updatePropertyValue(string $propName, $newValue): void
{
if ($this->$propName === $newValue) {
return;
}
$oldValue = $this->$propName;
$this->$propName = $newValue;
foreach ($this->notifyChangeTrackingListeners as $listener) {
$... | php | private function updatePropertyValue(string $propName, $newValue): void
{
if ($this->$propName === $newValue) {
return;
}
$oldValue = $this->$propName;
$this->$propName = $newValue;
foreach ($this->notifyChangeTrackingListeners as $listener) {
$... | [
"private",
"function",
"updatePropertyValue",
"(",
"string",
"$",
"propName",
",",
"$",
"newValue",
")",
":",
"void",
"{",
"if",
"(",
"$",
"this",
"->",
"$",
"propName",
"===",
"$",
"newValue",
")",
"{",
"return",
";",
"}",
"$",
"oldValue",
"=",
"$",
... | To be called from all set methods
This method updates the property value, then it runs this through validation
If validation fails, it sets the old value back and throws the caught exception
If validation passes, it then performs the Doctrine notification for property change
@param string $propName
@param mixed $new... | [
"To",
"be",
"called",
"from",
"all",
"set",
"methods"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Traits/ImplementNotifyChangeTrackingPolicy.php#L106-L116 |
31,852 | chameleon-system/chameleon-shop | src/ShopListFilterBundle/pkgShop/objects/db/TPkgShopListfilter_TShopCategory.class.php | TPkgShopListfilter_TShopCategory.GetFieldPkgShopListfilterIdRecursive | public function GetFieldPkgShopListfilterIdRecursive()
{
$sFilterId = $this->GetFromInternalCache('sActingFilterForCategory');
if (null !== $sFilterId) {
return $sFilterId;
}
if (isset($this->sqlData['lft']) && isset($this->sqlData['rgt'])) {
$sFilterId = $th... | php | public function GetFieldPkgShopListfilterIdRecursive()
{
$sFilterId = $this->GetFromInternalCache('sActingFilterForCategory');
if (null !== $sFilterId) {
return $sFilterId;
}
if (isset($this->sqlData['lft']) && isset($this->sqlData['rgt'])) {
$sFilterId = $th... | [
"public",
"function",
"GetFieldPkgShopListfilterIdRecursive",
"(",
")",
"{",
"$",
"sFilterId",
"=",
"$",
"this",
"->",
"GetFromInternalCache",
"(",
"'sActingFilterForCategory'",
")",
";",
"if",
"(",
"null",
"!==",
"$",
"sFilterId",
")",
"{",
"return",
"$",
"sFil... | returns the ID of the Listfilter for that is set for this category or one of its ancestors. | [
"returns",
"the",
"ID",
"of",
"the",
"Listfilter",
"for",
"that",
"is",
"set",
"for",
"this",
"category",
"or",
"one",
"of",
"its",
"ancestors",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopListFilterBundle/pkgShop/objects/db/TPkgShopListfilter_TShopCategory.class.php#L17-L41 |
31,853 | PGB-LIV/php-ms | src/Core/Spectra/PrecursorIon.php | PrecursorIon.setScan | public function setScan($scan)
{
if (! (is_int($scan) || is_float($scan))) {
throw new \InvalidArgumentException(
'Argument 1 must be of type int or float. Value is of type ' . gettype($scan));
}
$this->scan = $scan;
} | php | public function setScan($scan)
{
if (! (is_int($scan) || is_float($scan))) {
throw new \InvalidArgumentException(
'Argument 1 must be of type int or float. Value is of type ' . gettype($scan));
}
$this->scan = $scan;
} | [
"public",
"function",
"setScan",
"(",
"$",
"scan",
")",
"{",
"if",
"(",
"!",
"(",
"is_int",
"(",
"$",
"scan",
")",
"||",
"is_float",
"(",
"$",
"scan",
")",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Argument 1 must be of type... | Sets the scan number for this precursor
@param int|float $scan
Scan number to set
@throws \InvalidArgumentException | [
"Sets",
"the",
"scan",
"number",
"for",
"this",
"precursor"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Core/Spectra/PrecursorIon.php#L112-L120 |
31,854 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopModuleArticlelistOrderbyList.class.php | TShopModuleArticlelistOrderbyList.& | public static function &GetListForIds($aIdList, $iLanguageId = null)
{
$aIdList = TTools::MysqlRealEscapeArray($aIdList);
$sQuery = self::GetDefaultQuery($iLanguageId, "`id` IN ('".implode("', '", $aIdList)."') ");
return TdbShopModuleArticlelistOrderbyList::GetList($sQuery, $iLanguageId);
... | php | public static function &GetListForIds($aIdList, $iLanguageId = null)
{
$aIdList = TTools::MysqlRealEscapeArray($aIdList);
$sQuery = self::GetDefaultQuery($iLanguageId, "`id` IN ('".implode("', '", $aIdList)."') ");
return TdbShopModuleArticlelistOrderbyList::GetList($sQuery, $iLanguageId);
... | [
"public",
"static",
"function",
"&",
"GetListForIds",
"(",
"$",
"aIdList",
",",
"$",
"iLanguageId",
"=",
"null",
")",
"{",
"$",
"aIdList",
"=",
"TTools",
"::",
"MysqlRealEscapeArray",
"(",
"$",
"aIdList",
")",
";",
"$",
"sQuery",
"=",
"self",
"::",
"GetD... | return list for a set of ids.
@param array $aIdList
@param int $iLanguageId
@return TdbShopModuleArticlelistOrderbyList | [
"return",
"list",
"for",
"a",
"set",
"of",
"ids",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopModuleArticlelistOrderbyList.class.php#L26-L32 |
31,855 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/CodeHelper.php | CodeHelper.replaceTypeHintsInFile | public function replaceTypeHintsInFile(
string $filePath,
string $type,
string $dbalType,
bool $isNullable
): void {
$contents = \ts\file_get_contents($filePath);
$search = [
': string;',
'(string $',
': string {',
'@va... | php | public function replaceTypeHintsInFile(
string $filePath,
string $type,
string $dbalType,
bool $isNullable
): void {
$contents = \ts\file_get_contents($filePath);
$search = [
': string;',
'(string $',
': string {',
'@va... | [
"public",
"function",
"replaceTypeHintsInFile",
"(",
"string",
"$",
"filePath",
",",
"string",
"$",
"type",
",",
"string",
"$",
"dbalType",
",",
"bool",
"$",
"isNullable",
")",
":",
"void",
"{",
"$",
"contents",
"=",
"\\",
"ts",
"\\",
"file_get_contents",
... | We use the string type hint as our default in templates
This method will then replace those with the updated type
@param string $filePath
@param string $type
@param string $dbalType
@param bool $isNullable | [
"We",
"use",
"the",
"string",
"type",
"hint",
"as",
"our",
"default",
"in",
"templates"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/CodeHelper.php#L82-L140 |
31,856 | chameleon-system/chameleon-shop | src/ShopListFilterBundle/objects/db/TPkgShopListfilterItemList.class.php | TPkgShopListfilterItemList.GetQueryRestriction | public function GetQueryRestriction($oExcludeItem = null, $bReturnAsArray = false)
{
$sQuery = '';
$aQueryItems = array();
$iPointer = $this->getItemPointer();
$this->GoToStart();
while ($oItem = $this->Next()) {
if (is_null($oExcludeItem) || !$oExcludeItem->IsSam... | php | public function GetQueryRestriction($oExcludeItem = null, $bReturnAsArray = false)
{
$sQuery = '';
$aQueryItems = array();
$iPointer = $this->getItemPointer();
$this->GoToStart();
while ($oItem = $this->Next()) {
if (is_null($oExcludeItem) || !$oExcludeItem->IsSam... | [
"public",
"function",
"GetQueryRestriction",
"(",
"$",
"oExcludeItem",
"=",
"null",
",",
"$",
"bReturnAsArray",
"=",
"false",
")",
"{",
"$",
"sQuery",
"=",
"''",
";",
"$",
"aQueryItems",
"=",
"array",
"(",
")",
";",
"$",
"iPointer",
"=",
"$",
"this",
"... | return sql condition for the current filter list. optionaly excluding the element passed.
@param TdbPkgShopListfilterItem $oExcludeItem
@param bool $bReturnAsArray - set to true if you want an array with the query parts instead of a string
@return string | [
"return",
"sql",
"condition",
"for",
"the",
"current",
"filter",
"list",
".",
"optionaly",
"excluding",
"the",
"element",
"passed",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopListFilterBundle/objects/db/TPkgShopListfilterItemList.class.php#L34-L58 |
31,857 | PGB-LIV/php-ms | src/Reader/MzIdentMlReaderFactory.php | MzIdentMlReaderFactory.getReader | public static function getReader($filePath)
{
$xmlReader = new \SimpleXMLElement($filePath, null, true);
switch ($xmlReader->attributes()->version) {
case '1.1.0':
return new MzIdentMlReader1r1($filePath);
case '1.2.0':
return new MzId... | php | public static function getReader($filePath)
{
$xmlReader = new \SimpleXMLElement($filePath, null, true);
switch ($xmlReader->attributes()->version) {
case '1.1.0':
return new MzIdentMlReader1r1($filePath);
case '1.2.0':
return new MzId... | [
"public",
"static",
"function",
"getReader",
"(",
"$",
"filePath",
")",
"{",
"$",
"xmlReader",
"=",
"new",
"\\",
"SimpleXMLElement",
"(",
"$",
"filePath",
",",
"null",
",",
"true",
")",
";",
"switch",
"(",
"$",
"xmlReader",
"->",
"attributes",
"(",
")",
... | Parses the XML file to identify the specification version and then returns the appropriate reader
@param string $filePath
Path to the location of the mzIdentML file
@return MzIdentMlReader1Interface | [
"Parses",
"the",
"XML",
"file",
"to",
"identify",
"the",
"specification",
"version",
"and",
"then",
"returns",
"the",
"appropriate",
"reader"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Reader/MzIdentMlReaderFactory.php#L33-L45 |
31,858 | sylingd/Yesf | src/Http/Request.php | Request.file | public function file() {
static $res = null;
if ($res === null) {
$res = [];
foreach ($this->files as $v) {
$res[] = new File($v);
}
}
return $res;
} | php | public function file() {
static $res = null;
if ($res === null) {
$res = [];
foreach ($this->files as $v) {
$res[] = new File($v);
}
}
return $res;
} | [
"public",
"function",
"file",
"(",
")",
"{",
"static",
"$",
"res",
"=",
"null",
";",
"if",
"(",
"$",
"res",
"===",
"null",
")",
"{",
"$",
"res",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"files",
"as",
"$",
"v",
")",
"{",
"$",
... | Get uploaded files
@access public
@return array | [
"Get",
"uploaded",
"files"
] | 0fc2b42903bb3519c54c596270c890c826aeb1df | https://github.com/sylingd/Yesf/blob/0fc2b42903bb3519c54c596270c890c826aeb1df/src/Http/Request.php#L88-L97 |
31,859 | sylingd/Yesf | src/Http/Request.php | Request.end | public function end() {
$this->get = null;
$this->post = null;
$this->server = null;
$this->header = null;
$this->cookie = null;
$this->files = null;
$this->sw_request = null;
if ($this->session !== null) {
$handler = Container::getInstance()->get(Dispatcher::class)->getSessionHandler();
$handler-... | php | public function end() {
$this->get = null;
$this->post = null;
$this->server = null;
$this->header = null;
$this->cookie = null;
$this->files = null;
$this->sw_request = null;
if ($this->session !== null) {
$handler = Container::getInstance()->get(Dispatcher::class)->getSessionHandler();
$handler-... | [
"public",
"function",
"end",
"(",
")",
"{",
"$",
"this",
"->",
"get",
"=",
"null",
";",
"$",
"this",
"->",
"post",
"=",
"null",
";",
"$",
"this",
"->",
"server",
"=",
"null",
";",
"$",
"this",
"->",
"header",
"=",
"null",
";",
"$",
"this",
"->"... | Finish request, release resources
@access public | [
"Finish",
"request",
"release",
"resources"
] | 0fc2b42903bb3519c54c596270c890c826aeb1df | https://github.com/sylingd/Yesf/blob/0fc2b42903bb3519c54c596270c890c826aeb1df/src/Http/Request.php#L182-L195 |
31,860 | chameleon-system/chameleon-shop | src/ShopProductExportBundle/objects/TPkgShopProductExportCSVEndPoint.class.php | TPkgShopProductExportCSVEndPoint.getLine | private function getLine(array $fields): string
{
$fields = $this->quoteFields($fields);
return $this->sEnclosure.implode($this->sEnclosure.$this->sDelimiter.$this->sEnclosure, $fields).$this->sEnclosure;
} | php | private function getLine(array $fields): string
{
$fields = $this->quoteFields($fields);
return $this->sEnclosure.implode($this->sEnclosure.$this->sDelimiter.$this->sEnclosure, $fields).$this->sEnclosure;
} | [
"private",
"function",
"getLine",
"(",
"array",
"$",
"fields",
")",
":",
"string",
"{",
"$",
"fields",
"=",
"$",
"this",
"->",
"quoteFields",
"(",
"$",
"fields",
")",
";",
"return",
"$",
"this",
"->",
"sEnclosure",
".",
"implode",
"(",
"$",
"this",
"... | Returns a CSV line from the given field data. This line does not end with line break characters.
@param string[] $fields
@return string | [
"Returns",
"a",
"CSV",
"line",
"from",
"the",
"given",
"field",
"data",
".",
"This",
"line",
"does",
"not",
"end",
"with",
"line",
"break",
"characters",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopProductExportBundle/objects/TPkgShopProductExportCSVEndPoint.class.php#L63-L68 |
31,861 | chameleon-system/chameleon-shop | src/ShopProductExportBundle/objects/TPkgShopProductExportCSVEndPoint.class.php | TPkgShopProductExportCSVEndPoint.quoteFields | protected function quoteFields(array $fields): array
{
if ('"' !== $this->sEnclosure) {
return $fields;
}
return array_map(function ($element) {
return \str_replace('"', '""', $element);
}, $fields);
} | php | protected function quoteFields(array $fields): array
{
if ('"' !== $this->sEnclosure) {
return $fields;
}
return array_map(function ($element) {
return \str_replace('"', '""', $element);
}, $fields);
} | [
"protected",
"function",
"quoteFields",
"(",
"array",
"$",
"fields",
")",
":",
"array",
"{",
"if",
"(",
"'\"'",
"!==",
"$",
"this",
"->",
"sEnclosure",
")",
"{",
"return",
"$",
"fields",
";",
"}",
"return",
"array_map",
"(",
"function",
"(",
"$",
"elem... | Quotes occurrences of the enclosure character within the passed fields.
@param string[] $fields
@return string[] | [
"Quotes",
"occurrences",
"of",
"the",
"enclosure",
"character",
"within",
"the",
"passed",
"fields",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopProductExportBundle/objects/TPkgShopProductExportCSVEndPoint.class.php#L77-L86 |
31,862 | chameleon-system/chameleon-shop | src/ShopProductExportBundle/objects/TPkgShopProductExportCSVEndPoint.class.php | TPkgShopProductExportCSVEndPoint.HandleArticleList | protected function HandleArticleList()
{
$aFields = $this->GetFields();
$oArticleList = $this->GetArticleList();
$iCount = 0;
if (!is_null($oArticleList)) {
/** @var $oArticle TdbShopArticle */
while ($oArticle = &$oArticleList->Next() && !$this->BreakUp($iCou... | php | protected function HandleArticleList()
{
$aFields = $this->GetFields();
$oArticleList = $this->GetArticleList();
$iCount = 0;
if (!is_null($oArticleList)) {
/** @var $oArticle TdbShopArticle */
while ($oArticle = &$oArticleList->Next() && !$this->BreakUp($iCou... | [
"protected",
"function",
"HandleArticleList",
"(",
")",
"{",
"$",
"aFields",
"=",
"$",
"this",
"->",
"GetFields",
"(",
")",
";",
"$",
"oArticleList",
"=",
"$",
"this",
"->",
"GetArticleList",
"(",
")",
";",
"$",
"iCount",
"=",
"0",
";",
"if",
"(",
"!... | loop through the article list and handle each article. | [
"loop",
"through",
"the",
"article",
"list",
"and",
"handle",
"each",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopProductExportBundle/objects/TPkgShopProductExportCSVEndPoint.class.php#L91-L106 |
31,863 | chameleon-system/chameleon-shop | src/ShopProductExportBundle/objects/TPkgShopProductExportCSVEndPoint.class.php | TPkgShopProductExportCSVEndPoint.HandleArticle | protected function HandleArticle(&$oArticle, &$aFields)
{
/**
* @var $logger LoggerInterface
*/
$logger = ServiceLocator::get('logger');
$iStart = microtime(true);
static $iCount = 0;
static $sMemUsageBeforeArticleProcessed = null;
static $sMemUsage... | php | protected function HandleArticle(&$oArticle, &$aFields)
{
/**
* @var $logger LoggerInterface
*/
$logger = ServiceLocator::get('logger');
$iStart = microtime(true);
static $iCount = 0;
static $sMemUsageBeforeArticleProcessed = null;
static $sMemUsage... | [
"protected",
"function",
"HandleArticle",
"(",
"&",
"$",
"oArticle",
",",
"&",
"$",
"aFields",
")",
"{",
"/**\n * @var $logger LoggerInterface\n */",
"$",
"logger",
"=",
"ServiceLocator",
"::",
"get",
"(",
"'logger'",
")",
";",
"$",
"iStart",
"=",
... | do work for one article
loops through the available fields and calls GetFieldValue method for each field.
@param TdbShopArticle $oArticle
@param array $aFields
@return string | [
"do",
"work",
"for",
"one",
"article",
"loops",
"through",
"the",
"available",
"fields",
"and",
"calls",
"GetFieldValue",
"method",
"for",
"each",
"field",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopProductExportBundle/objects/TPkgShopProductExportCSVEndPoint.class.php#L117-L169 |
31,864 | chameleon-system/chameleon-shop | src/ShopProductExportBundle/objects/TPkgShopProductExportCSVEndPoint.class.php | TPkgShopProductExportCSVEndPoint.CleanContent | protected function CleanContent($sValue)
{
$sValue = parent::CleanContent($sValue);
$sValue = preg_replace('/\ +/', ' ', $sValue);
if ('"' === $this->sEnclosure) {
return $sValue;
}
if (true === \in_array($this->sDelimiter, [',', "\t", "\n"], true)) {
... | php | protected function CleanContent($sValue)
{
$sValue = parent::CleanContent($sValue);
$sValue = preg_replace('/\ +/', ' ', $sValue);
if ('"' === $this->sEnclosure) {
return $sValue;
}
if (true === \in_array($this->sDelimiter, [',', "\t", "\n"], true)) {
... | [
"protected",
"function",
"CleanContent",
"(",
"$",
"sValue",
")",
"{",
"$",
"sValue",
"=",
"parent",
"::",
"CleanContent",
"(",
"$",
"sValue",
")",
";",
"$",
"sValue",
"=",
"preg_replace",
"(",
"'/\\ +/'",
",",
"' '",
",",
"$",
"sValue",
")",
";",
"if"... | Clean double blanks in content and replace delimiter to avoid errors.
@param $sValue
@return string | [
"Clean",
"double",
"blanks",
"in",
"content",
"and",
"replace",
"delimiter",
"to",
"avoid",
"errors",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopProductExportBundle/objects/TPkgShopProductExportCSVEndPoint.class.php#L192-L208 |
31,865 | PGB-LIV/php-ms | src/Core/Identification.php | Identification.getScore | public function getScore($key)
{
if (! array_key_exists($key, $this->scores)) {
throw new \OutOfBoundsException('The key "' . $key . ' was not found.');
}
return $this->scores[$key];
} | php | public function getScore($key)
{
if (! array_key_exists($key, $this->scores)) {
throw new \OutOfBoundsException('The key "' . $key . ' was not found.');
}
return $this->scores[$key];
} | [
"public",
"function",
"getScore",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"key",
",",
"$",
"this",
"->",
"scores",
")",
")",
"{",
"throw",
"new",
"\\",
"OutOfBoundsException",
"(",
"'The key \"'",
".",
"$",
"key",
".",
... | Gets the value for a score identified by the key that was set when setScore was called.
@param string $key
The key to retrieve the value for
@throws \OutOfBoundsException If the key was not found on this identification
@return mixed | [
"Gets",
"the",
"value",
"for",
"a",
"score",
"identified",
"by",
"the",
"key",
"that",
"was",
"set",
"when",
"setScore",
"was",
"called",
"."
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Core/Identification.php#L131-L138 |
31,866 | PGB-LIV/php-ms | src/Core/Identification.php | Identification.setIonsMatched | public function setIonsMatched($ionsMatched)
{
if (! is_int($ionsMatched)) {
throw new \InvalidArgumentException(
'Argument 1 must be an int value. Valued passed is of type ' . gettype($ionsMatched));
}
$this->ionsMatched = $ionsMatched;
} | php | public function setIonsMatched($ionsMatched)
{
if (! is_int($ionsMatched)) {
throw new \InvalidArgumentException(
'Argument 1 must be an int value. Valued passed is of type ' . gettype($ionsMatched));
}
$this->ionsMatched = $ionsMatched;
} | [
"public",
"function",
"setIonsMatched",
"(",
"$",
"ionsMatched",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"ionsMatched",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Argument 1 must be an int value. Valued passed is of type '",
".",
"... | Sets the the number of fragment ions matched
@param int $ionsMatched
The number of ions matched
@throws \InvalidArgumentException If the arguments do not match the data types | [
"Sets",
"the",
"the",
"number",
"of",
"fragment",
"ions",
"matched"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Core/Identification.php#L155-L163 |
31,867 | PGB-LIV/php-ms | src/Core/Identification.php | Identification.setRank | public function setRank($rank)
{
if (! is_int($rank)) {
throw new \InvalidArgumentException(
'Argument 1 must be an int value. Valued passed is of type ' . gettype($rank));
}
$this->rank = $rank;
} | php | public function setRank($rank)
{
if (! is_int($rank)) {
throw new \InvalidArgumentException(
'Argument 1 must be an int value. Valued passed is of type ' . gettype($rank));
}
$this->rank = $rank;
} | [
"public",
"function",
"setRank",
"(",
"$",
"rank",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"rank",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Argument 1 must be an int value. Valued passed is of type '",
".",
"gettype",
"(",
"$... | Sets the rank for this instance
@param int $rank
Rank value to set too | [
"Sets",
"the",
"rank",
"for",
"this",
"instance"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Core/Identification.php#L181-L189 |
31,868 | chameleon-system/chameleon-shop | src/ShopPaymentTransactionBundle/objects/TPkgShopPaymentTransactionDataEndPoint.class.php | TPkgShopPaymentTransactionDataEndPoint.getTotalValueForItemType | public function getTotalValueForItemType($sType)
{
$dTotal = 0;
reset($this->items);
/** @var TPkgShopPaymentTransactionItemData $oItem */
foreach ($this->items as $oItem) {
if ($sType !== $oItem->getType()) {
continue;
}
$dTotal = ... | php | public function getTotalValueForItemType($sType)
{
$dTotal = 0;
reset($this->items);
/** @var TPkgShopPaymentTransactionItemData $oItem */
foreach ($this->items as $oItem) {
if ($sType !== $oItem->getType()) {
continue;
}
$dTotal = ... | [
"public",
"function",
"getTotalValueForItemType",
"(",
"$",
"sType",
")",
"{",
"$",
"dTotal",
"=",
"0",
";",
"reset",
"(",
"$",
"this",
"->",
"items",
")",
";",
"/** @var TPkgShopPaymentTransactionItemData $oItem */",
"foreach",
"(",
"$",
"this",
"->",
"items",
... | return the total value of all items with the given item type.
@param $sType - must be one of TPkgShopPaymentTransactionItemData::TYPE_*
@return int | [
"return",
"the",
"total",
"value",
"of",
"all",
"items",
"with",
"the",
"given",
"item",
"type",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopPaymentTransactionBundle/objects/TPkgShopPaymentTransactionDataEndPoint.class.php#L243-L256 |
31,869 | edmondscommerce/doctrine-static-meta | src/Entity/Fields/Traits/String/EnumFieldTrait.php | EnumFieldTrait.setEnum | private function setEnum(string $enum): self
{
$this->updatePropertyValue(
EnumFieldInterface::PROP_ENUM,
$enum
);
return $this;
} | php | private function setEnum(string $enum): self
{
$this->updatePropertyValue(
EnumFieldInterface::PROP_ENUM,
$enum
);
return $this;
} | [
"private",
"function",
"setEnum",
"(",
"string",
"$",
"enum",
")",
":",
"self",
"{",
"$",
"this",
"->",
"updatePropertyValue",
"(",
"EnumFieldInterface",
"::",
"PROP_ENUM",
",",
"$",
"enum",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Uses the Symfony Validator and fails back to basic in_array validation with exception
@param string $enum
@return self | [
"Uses",
"the",
"Symfony",
"Validator",
"and",
"fails",
"back",
"to",
"basic",
"in_array",
"validation",
"with",
"exception"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Fields/Traits/String/EnumFieldTrait.php#L88-L96 |
31,870 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Model/IdList.php | OffAmazonPaymentsService_Model_IdList.setmember | public function setmember($member)
{
if (!$this->_isNumericArray($member)) {
$member = array ($member);
}
$this->_fields['member']['FieldValue'] = $member;
return $this;
} | php | public function setmember($member)
{
if (!$this->_isNumericArray($member)) {
$member = array ($member);
}
$this->_fields['member']['FieldValue'] = $member;
return $this;
} | [
"public",
"function",
"setmember",
"(",
"$",
"member",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_isNumericArray",
"(",
"$",
"member",
")",
")",
"{",
"$",
"member",
"=",
"array",
"(",
"$",
"member",
")",
";",
"}",
"$",
"this",
"->",
"_fields",
... | Sets the value of the member.
@param string or an array of string member
@return this instance | [
"Sets",
"the",
"value",
"of",
"the",
"member",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsService/Model/IdList.php#L75-L82 |
31,871 | CVO-Technologies/cakephp-github | src/Model/Resource/Event.php | Event.describe | public function describe()
{
var_dump($this);
var_dump($this->type);
return $this->id . ' - ' . $this->type . ' - ' . $this->actor->login;
} | php | public function describe()
{
var_dump($this);
var_dump($this->type);
return $this->id . ' - ' . $this->type . ' - ' . $this->actor->login;
} | [
"public",
"function",
"describe",
"(",
")",
"{",
"var_dump",
"(",
"$",
"this",
")",
";",
"var_dump",
"(",
"$",
"this",
"->",
"type",
")",
";",
"return",
"$",
"this",
"->",
"id",
".",
"' - '",
".",
"$",
"this",
"->",
"type",
".",
"' - '",
".",
"$"... | Return a text description of a event.
@return string description of a event. | [
"Return",
"a",
"text",
"description",
"of",
"a",
"event",
"."
] | 43647e53fd87a3ab93fe2f24ce3686b594d36241 | https://github.com/CVO-Technologies/cakephp-github/blob/43647e53fd87a3ab93fe2f24ce3686b594d36241/src/Model/Resource/Event.php#L17-L23 |
31,872 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketDiscountCoreList.class.php | TShopBasketDiscountCoreList.GetDiscountValue | public function GetDiscountValue()
{
$dValue = 0;
$iTmpPointer = $this->getItemPointer();
$this->GoToStart();
while ($oDiscount = $this->Next()) {
$dValue += $oDiscount->GetValue();
}
$this->setItemPointer($iTmpPointer);
return $dValue;
} | php | public function GetDiscountValue()
{
$dValue = 0;
$iTmpPointer = $this->getItemPointer();
$this->GoToStart();
while ($oDiscount = $this->Next()) {
$dValue += $oDiscount->GetValue();
}
$this->setItemPointer($iTmpPointer);
return $dValue;
} | [
"public",
"function",
"GetDiscountValue",
"(",
")",
"{",
"$",
"dValue",
"=",
"0",
";",
"$",
"iTmpPointer",
"=",
"$",
"this",
"->",
"getItemPointer",
"(",
")",
";",
"$",
"this",
"->",
"GoToStart",
"(",
")",
";",
"while",
"(",
"$",
"oDiscount",
"=",
"$... | return the total discount value for all active discounts. note that the method will fetch the current basket
using the baskets singleton factory.
@return float | [
"return",
"the",
"total",
"discount",
"value",
"for",
"all",
"active",
"discounts",
".",
"note",
"that",
"the",
"method",
"will",
"fetch",
"the",
"current",
"basket",
"using",
"the",
"baskets",
"singleton",
"factory",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketDiscountCoreList.class.php#L28-L40 |
31,873 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketDiscountCoreList.class.php | TShopBasketDiscountCoreList.RemoveInvalidDiscounts | public function RemoveInvalidDiscounts($sMessangerName = null)
{
// since the min value of the basket for which a discount may work is affected by other discounts,
// we need to remove the discounts first, and then add them one by one back to the basket
// we suppress the add messages, but k... | php | public function RemoveInvalidDiscounts($sMessangerName = null)
{
// since the min value of the basket for which a discount may work is affected by other discounts,
// we need to remove the discounts first, and then add them one by one back to the basket
// we suppress the add messages, but k... | [
"public",
"function",
"RemoveInvalidDiscounts",
"(",
"$",
"sMessangerName",
"=",
"null",
")",
"{",
"// since the min value of the basket for which a discount may work is affected by other discounts,",
"// we need to remove the discounts first, and then add them one by one back to the basket",
... | Removes all discounts from the basket, that are not valid based on the contents of the basket and the current user
Returns the number of discounts removed.
@param string $sMessangerName - optional message manager to which we output why a discount was removed
@return int | [
"Removes",
"all",
"discounts",
"from",
"the",
"basket",
"that",
"are",
"not",
"valid",
"based",
"on",
"the",
"contents",
"of",
"the",
"basket",
"and",
"the",
"current",
"user",
"Returns",
"the",
"number",
"of",
"discounts",
"removed",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketDiscountCoreList.class.php#L50-L75 |
31,874 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Generator/Embeddable/ArchetypeEmbeddableGenerator.php | ArchetypeEmbeddableGenerator.getNewEmbeddableFqnFromClassName | private function getNewEmbeddableFqnFromClassName(string $className): string
{
return $this->namespaceHelper->tidy(
$this->projectRootNamespace . '\\'
. implode('\\', \array_slice($this->archetypeObjectSubDirectories, 1))
. '\\' . $className
);
} | php | private function getNewEmbeddableFqnFromClassName(string $className): string
{
return $this->namespaceHelper->tidy(
$this->projectRootNamespace . '\\'
. implode('\\', \array_slice($this->archetypeObjectSubDirectories, 1))
. '\\' . $className
);
} | [
"private",
"function",
"getNewEmbeddableFqnFromClassName",
"(",
"string",
"$",
"className",
")",
":",
"string",
"{",
"return",
"$",
"this",
"->",
"namespaceHelper",
"->",
"tidy",
"(",
"$",
"this",
"->",
"projectRootNamespace",
".",
"'\\\\'",
".",
"implode",
"(",... | Get the Fully Qualified name for the new embeddable object based upon the project root names
@param string $className
@return string | [
"Get",
"the",
"Fully",
"Qualified",
"name",
"for",
"the",
"new",
"embeddable",
"object",
"based",
"upon",
"the",
"project",
"root",
"names"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Generator/Embeddable/ArchetypeEmbeddableGenerator.php#L348-L355 |
31,875 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Generator/Embeddable/ArchetypeEmbeddableGenerator.php | ArchetypeEmbeddableGenerator.getNewPathFromArchetypePath | private function getNewPathFromArchetypePath(string $archetypePath): string
{
$rootArchetypePath = substr($archetypePath, 0, \ts\strpos($archetypePath, '/src/Entity/Embeddable'));
$path = \str_replace($rootArchetypePath, $this->pathToProjectRoot, $archetypePath);
$pattern = '%^(.*?)/([... | php | private function getNewPathFromArchetypePath(string $archetypePath): string
{
$rootArchetypePath = substr($archetypePath, 0, \ts\strpos($archetypePath, '/src/Entity/Embeddable'));
$path = \str_replace($rootArchetypePath, $this->pathToProjectRoot, $archetypePath);
$pattern = '%^(.*?)/([... | [
"private",
"function",
"getNewPathFromArchetypePath",
"(",
"string",
"$",
"archetypePath",
")",
":",
"string",
"{",
"$",
"rootArchetypePath",
"=",
"substr",
"(",
"$",
"archetypePath",
",",
"0",
",",
"\\",
"ts",
"\\",
"strpos",
"(",
"$",
"archetypePath",
",",
... | Calculate the new path by doing a preg replace on the corresponding archetype path
@param string $archetypePath
@return null|string|string[] | [
"Calculate",
"the",
"new",
"path",
"by",
"doing",
"a",
"preg",
"replace",
"on",
"the",
"corresponding",
"archetype",
"path"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Generator/Embeddable/ArchetypeEmbeddableGenerator.php#L364-L379 |
31,876 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.SetActiveShippingGroup | public function SetActiveShippingGroup($oShippingGroup)
{
$bGroupAssigned = false;
if (!is_null($oShippingGroup)) {
$oAvailableShippingGroups = $this->GetAvailableShippingGroups();
if (!is_null($oAvailableShippingGroups) && $oAvailableShippingGroups->IsInList($oShippingGroup-... | php | public function SetActiveShippingGroup($oShippingGroup)
{
$bGroupAssigned = false;
if (!is_null($oShippingGroup)) {
$oAvailableShippingGroups = $this->GetAvailableShippingGroups();
if (!is_null($oAvailableShippingGroups) && $oAvailableShippingGroups->IsInList($oShippingGroup-... | [
"public",
"function",
"SetActiveShippingGroup",
"(",
"$",
"oShippingGroup",
")",
"{",
"$",
"bGroupAssigned",
"=",
"false",
";",
"if",
"(",
"!",
"is_null",
"(",
"$",
"oShippingGroup",
")",
")",
"{",
"$",
"oAvailableShippingGroups",
"=",
"$",
"this",
"->",
"Ge... | set the active shipping group - return false, if an invalid group is selected.
@param TdbShopShippingGroup $oShippingGroup
@return bool | [
"set",
"the",
"active",
"shipping",
"group",
"-",
"return",
"false",
"if",
"an",
"invalid",
"group",
"is",
"selected",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L304-L325 |
31,877 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.& | public function &GetActiveShippingGroup()
{
if (is_null($this->oActiveShippingGroup)) {
// fetch the one from the shop
$oShopConfig = TdbShop::GetInstance();
$oActiveShippingGroup = $oShopConfig->GetFieldShopShippingGroup();
if (false == $this->SetActiveShippi... | php | public function &GetActiveShippingGroup()
{
if (is_null($this->oActiveShippingGroup)) {
// fetch the one from the shop
$oShopConfig = TdbShop::GetInstance();
$oActiveShippingGroup = $oShopConfig->GetFieldShopShippingGroup();
if (false == $this->SetActiveShippi... | [
"public",
"function",
"&",
"GetActiveShippingGroup",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"oActiveShippingGroup",
")",
")",
"{",
"// fetch the one from the shop",
"$",
"oShopConfig",
"=",
"TdbShop",
"::",
"GetInstance",
"(",
")",
";",
"... | return the active shipping group - will set the shipping group to the default group, if none is set.
@return TdbShopShippingGroup | [
"return",
"the",
"active",
"shipping",
"group",
"-",
"will",
"set",
"the",
"shipping",
"group",
"to",
"the",
"default",
"group",
"if",
"none",
"is",
"set",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L332-L350 |
31,878 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.GetAvailablePaymentMethods | public function GetAvailablePaymentMethods()
{
$oList = null;
if ($this->GetActiveShippingGroup()) {
$oList = $this->GetActiveShippingGroup()->GetValidPaymentMethods();
}
return $oList;
} | php | public function GetAvailablePaymentMethods()
{
$oList = null;
if ($this->GetActiveShippingGroup()) {
$oList = $this->GetActiveShippingGroup()->GetValidPaymentMethods();
}
return $oList;
} | [
"public",
"function",
"GetAvailablePaymentMethods",
"(",
")",
"{",
"$",
"oList",
"=",
"null",
";",
"if",
"(",
"$",
"this",
"->",
"GetActiveShippingGroup",
"(",
")",
")",
"{",
"$",
"oList",
"=",
"$",
"this",
"->",
"GetActiveShippingGroup",
"(",
")",
"->",
... | return all payment methods for the active shipping group.
@return TdbShopPaymentMethodList | [
"return",
"all",
"payment",
"methods",
"for",
"the",
"active",
"shipping",
"group",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L375-L383 |
31,879 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.GetValidPaymentMethodsSelectableByTheUser | public function GetValidPaymentMethodsSelectableByTheUser()
{
$oList = null;
if ($this->GetActiveShippingGroup()) {
$oList = $this->GetActiveShippingGroup()->GetValidPaymentMethodsSelectableByTheUser();
}
return $oList;
} | php | public function GetValidPaymentMethodsSelectableByTheUser()
{
$oList = null;
if ($this->GetActiveShippingGroup()) {
$oList = $this->GetActiveShippingGroup()->GetValidPaymentMethodsSelectableByTheUser();
}
return $oList;
} | [
"public",
"function",
"GetValidPaymentMethodsSelectableByTheUser",
"(",
")",
"{",
"$",
"oList",
"=",
"null",
";",
"if",
"(",
"$",
"this",
"->",
"GetActiveShippingGroup",
"(",
")",
")",
"{",
"$",
"oList",
"=",
"$",
"this",
"->",
"GetActiveShippingGroup",
"(",
... | return all payment methods for the active shipping group that are selectable by the user.
@return TdbShopPaymentMethodList | [
"return",
"all",
"payment",
"methods",
"for",
"the",
"active",
"shipping",
"group",
"that",
"are",
"selectable",
"by",
"the",
"user",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L390-L398 |
31,880 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.ClearBasket | public function ClearBasket()
{
$this->UnlockBasket();
/** @var Request $request */
$request = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest();
$request->getSession()->remove(self::SESSION_KEY_NAME);
$event = new \ChameleonSystem\ShopBun... | php | public function ClearBasket()
{
$this->UnlockBasket();
/** @var Request $request */
$request = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest();
$request->getSession()->remove(self::SESSION_KEY_NAME);
$event = new \ChameleonSystem\ShopBun... | [
"public",
"function",
"ClearBasket",
"(",
")",
"{",
"$",
"this",
"->",
"UnlockBasket",
"(",
")",
";",
"/** @var Request $request */",
"$",
"request",
"=",
"\\",
"ChameleonSystem",
"\\",
"CoreBundle",
"\\",
"ServiceLocator",
"::",
"get",
"(",
"'request_stack'",
"... | deletes contents of basket. | [
"deletes",
"contents",
"of",
"basket",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L443-L455 |
31,881 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.BasketInSession | public static function BasketInSession()
{
/** @var Request $request */
$request = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest();
return $request->getSession()->has(self::SESSION_KEY_NAME);
} | php | public static function BasketInSession()
{
/** @var Request $request */
$request = \ChameleonSystem\CoreBundle\ServiceLocator::get('request_stack')->getCurrentRequest();
return $request->getSession()->has(self::SESSION_KEY_NAME);
} | [
"public",
"static",
"function",
"BasketInSession",
"(",
")",
"{",
"/** @var Request $request */",
"$",
"request",
"=",
"\\",
"ChameleonSystem",
"\\",
"CoreBundle",
"\\",
"ServiceLocator",
"::",
"get",
"(",
"'request_stack'",
")",
"->",
"getCurrentRequest",
"(",
")",... | return true if the basket item is stored in session.
@return bool | [
"return",
"true",
"if",
"the",
"basket",
"item",
"is",
"stored",
"in",
"session",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L482-L488 |
31,882 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.CommitToSession | public function CommitToSession($bForce = false)
{
// save copy to session
if (TShopBasket::BasketInSession()) {
$oTmp = TShopBasket::GetInstance();
if (true === $bForce || $oTmp == $this) {
$oUser = TdbDataExtranetUser::GetInstance();
$oUser->... | php | public function CommitToSession($bForce = false)
{
// save copy to session
if (TShopBasket::BasketInSession()) {
$oTmp = TShopBasket::GetInstance();
if (true === $bForce || $oTmp == $this) {
$oUser = TdbDataExtranetUser::GetInstance();
$oUser->... | [
"public",
"function",
"CommitToSession",
"(",
"$",
"bForce",
"=",
"false",
")",
"{",
"// save copy to session",
"if",
"(",
"TShopBasket",
"::",
"BasketInSession",
"(",
")",
")",
"{",
"$",
"oTmp",
"=",
"TShopBasket",
"::",
"GetInstance",
"(",
")",
";",
"if",
... | commits the basket to session, AND unregisters itself als an observer from
oUser - this method is called through the register_shutdown_function and should
not be called directly.
@param bool $bForce - overwrite session with basket data even if this is not the correct basket instance
if you use this to replace the bask... | [
"commits",
"the",
"basket",
"to",
"session",
"AND",
"unregisters",
"itself",
"als",
"an",
"observer",
"from",
"oUser",
"-",
"this",
"method",
"is",
"called",
"through",
"the",
"register_shutdown_function",
"and",
"should",
"not",
"be",
"called",
"directly",
"."
... | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L528-L544 |
31,883 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.GetBasketSumForVoucher | public function GetBasketSumForVoucher(TShopVoucher &$oVoucher)
{
$value = $this->GetBasketArticles()->GetBasketSumForVoucher($oVoucher);
if (true === $oVoucher->IsSponsored()) {
$value += $this->dCostShipping;
}
return $value;
} | php | public function GetBasketSumForVoucher(TShopVoucher &$oVoucher)
{
$value = $this->GetBasketArticles()->GetBasketSumForVoucher($oVoucher);
if (true === $oVoucher->IsSponsored()) {
$value += $this->dCostShipping;
}
return $value;
} | [
"public",
"function",
"GetBasketSumForVoucher",
"(",
"TShopVoucher",
"&",
"$",
"oVoucher",
")",
"{",
"$",
"value",
"=",
"$",
"this",
"->",
"GetBasketArticles",
"(",
")",
"->",
"GetBasketSumForVoucher",
"(",
"$",
"oVoucher",
")",
";",
"if",
"(",
"true",
"==="... | exposes the GetBasketSumForVoucher method in TShopBasketArticleList.
@param TShopVoucher $oVoucher
@return float | [
"exposes",
"the",
"GetBasketSumForVoucher",
"method",
"in",
"TShopBasketArticleList",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L553-L561 |
31,884 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.RecalculateShipping | protected function RecalculateShipping()
{
$this->dCostShipping = 0;
// validate shipping group - reset if not valid
if (null !== $this->GetActiveShippingGroup()) {
if (false === $this->SetActiveShippingGroup($this->GetActiveShippingGroup())) {
$this->SetActiveSh... | php | protected function RecalculateShipping()
{
$this->dCostShipping = 0;
// validate shipping group - reset if not valid
if (null !== $this->GetActiveShippingGroup()) {
if (false === $this->SetActiveShippingGroup($this->GetActiveShippingGroup())) {
$this->SetActiveSh... | [
"protected",
"function",
"RecalculateShipping",
"(",
")",
"{",
"$",
"this",
"->",
"dCostShipping",
"=",
"0",
";",
"// validate shipping group - reset if not valid",
"if",
"(",
"null",
"!==",
"$",
"this",
"->",
"GetActiveShippingGroup",
"(",
")",
")",
"{",
"if",
... | fetches the shipping costs from the active shipping group. | [
"fetches",
"the",
"shipping",
"costs",
"from",
"the",
"active",
"shipping",
"group",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L804-L821 |
31,885 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.& | public function &GetActiveVATList()
{
if (is_null($this->oActiveVatList)) {
$this->oActiveVatList = TdbShopVatList::GetList();
$this->oActiveVatList->bAllowItemCache = true;
$this->oActiveVatList->GoToStart();
}
return $this->oActiveVatList;
} | php | public function &GetActiveVATList()
{
if (is_null($this->oActiveVatList)) {
$this->oActiveVatList = TdbShopVatList::GetList();
$this->oActiveVatList->bAllowItemCache = true;
$this->oActiveVatList->GoToStart();
}
return $this->oActiveVatList;
} | [
"public",
"function",
"&",
"GetActiveVATList",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"oActiveVatList",
")",
")",
"{",
"$",
"this",
"->",
"oActiveVatList",
"=",
"TdbShopVatList",
"::",
"GetList",
"(",
")",
";",
"$",
"this",
"->",
... | return copy of active vat group list.
@return TdbShopVatList | [
"return",
"copy",
"of",
"active",
"vat",
"group",
"list",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L895-L904 |
31,886 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.GetLargestVATObject | public function GetLargestVATObject()
{
$oActiveVatList = $this->GetActiveVATList();
/** @var $oMaxItem TdbShopVat */
$oMaxItem = null;
if (is_object($oActiveVatList)) {
$oMaxItem = $oActiveVatList->GetMaxItem();
}
return $oMaxItem;
} | php | public function GetLargestVATObject()
{
$oActiveVatList = $this->GetActiveVATList();
/** @var $oMaxItem TdbShopVat */
$oMaxItem = null;
if (is_object($oActiveVatList)) {
$oMaxItem = $oActiveVatList->GetMaxItem();
}
return $oMaxItem;
} | [
"public",
"function",
"GetLargestVATObject",
"(",
")",
"{",
"$",
"oActiveVatList",
"=",
"$",
"this",
"->",
"GetActiveVATList",
"(",
")",
";",
"/** @var $oMaxItem TdbShopVat */",
"$",
"oMaxItem",
"=",
"null",
";",
"if",
"(",
"is_object",
"(",
"$",
"oActiveVatList... | return the largest vat object from the active vat group.
@return TdbShopVat | [
"return",
"the",
"largest",
"vat",
"object",
"from",
"the",
"active",
"vat",
"group",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L911-L921 |
31,887 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.RecalculateNoneSponsoredVouchers | protected function RecalculateNoneSponsoredVouchers()
{
if (!is_null($this->GetActiveVouchers())) {
$this->dCostNoneSponsoredVouchers = 0;
$this->GetActiveVouchers()->RemoveInvalidVouchers(MTShopBasketCore::MSG_CONSUMER_NAME, $this);
$this->dCostNoneSponsoredVouchers = $... | php | protected function RecalculateNoneSponsoredVouchers()
{
if (!is_null($this->GetActiveVouchers())) {
$this->dCostNoneSponsoredVouchers = 0;
$this->GetActiveVouchers()->RemoveInvalidVouchers(MTShopBasketCore::MSG_CONSUMER_NAME, $this);
$this->dCostNoneSponsoredVouchers = $... | [
"protected",
"function",
"RecalculateNoneSponsoredVouchers",
"(",
")",
"{",
"if",
"(",
"!",
"is_null",
"(",
"$",
"this",
"->",
"GetActiveVouchers",
"(",
")",
")",
")",
"{",
"$",
"this",
"->",
"dCostNoneSponsoredVouchers",
"=",
"0",
";",
"$",
"this",
"->",
... | calculates the value of NONE sponsored vouchers. The article prices for each item in the
basket affected by a voucher is reduced by the value calculated for the item. | [
"calculates",
"the",
"value",
"of",
"NONE",
"sponsored",
"vouchers",
".",
"The",
"article",
"prices",
"for",
"each",
"item",
"in",
"the",
"basket",
"affected",
"by",
"a",
"voucher",
"is",
"reduced",
"by",
"the",
"value",
"calculated",
"for",
"the",
"item",
... | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L962-L975 |
31,888 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.redirectToPaymentStep | protected function redirectToPaymentStep()
{
if (defined('CMS_PAYMENT_REDIRECT_ON_FAILURE') && CMS_PAYMENT_REDIRECT_ON_FAILURE != '') {
$oOrderStep = TdbShopOrderStep::GetStep(CMS_PAYMENT_REDIRECT_ON_FAILURE);
if ($oOrderStep) {
$oOrderStep->JumpToStep($oOrderStep);
... | php | protected function redirectToPaymentStep()
{
if (defined('CMS_PAYMENT_REDIRECT_ON_FAILURE') && CMS_PAYMENT_REDIRECT_ON_FAILURE != '') {
$oOrderStep = TdbShopOrderStep::GetStep(CMS_PAYMENT_REDIRECT_ON_FAILURE);
if ($oOrderStep) {
$oOrderStep->JumpToStep($oOrderStep);
... | [
"protected",
"function",
"redirectToPaymentStep",
"(",
")",
"{",
"if",
"(",
"defined",
"(",
"'CMS_PAYMENT_REDIRECT_ON_FAILURE'",
")",
"&&",
"CMS_PAYMENT_REDIRECT_ON_FAILURE",
"!=",
"''",
")",
"{",
"$",
"oOrderStep",
"=",
"TdbShopOrderStep",
"::",
"GetStep",
"(",
"CM... | if CMS_PAYMENT_REDIRECT_ON_FAILURE is defined with correct order step system name do redirect
to defined step.
This step should contain payment selection. | [
"if",
"CMS_PAYMENT_REDIRECT_ON_FAILURE",
"is",
"defined",
"with",
"correct",
"order",
"step",
"system",
"name",
"do",
"redirect",
"to",
"defined",
"step",
".",
"This",
"step",
"should",
"contain",
"payment",
"selection",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L1131-L1139 |
31,889 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.& | public static function &GetLastCreatedOrder($bResetValue = false)
{
$oOrder = null;
if (array_key_exists(self::SESSION_KEY_LAST_CREATED_ORDER_ID, $_SESSION)) {
$oOrder = TdbShopOrder::GetNewInstance();
/** @var $oOrder TdbShopOrder */
if ($oOrder->Load($_SESSION[s... | php | public static function &GetLastCreatedOrder($bResetValue = false)
{
$oOrder = null;
if (array_key_exists(self::SESSION_KEY_LAST_CREATED_ORDER_ID, $_SESSION)) {
$oOrder = TdbShopOrder::GetNewInstance();
/** @var $oOrder TdbShopOrder */
if ($oOrder->Load($_SESSION[s... | [
"public",
"static",
"function",
"&",
"GetLastCreatedOrder",
"(",
"$",
"bResetValue",
"=",
"false",
")",
"{",
"$",
"oOrder",
"=",
"null",
";",
"if",
"(",
"array_key_exists",
"(",
"self",
"::",
"SESSION_KEY_LAST_CREATED_ORDER_ID",
",",
"$",
"_SESSION",
")",
")",... | returns the order object created last within the current session of the user.
@param bool $bResetValue - set to true if you want to reset the session item
@return TdbShopOrder | [
"returns",
"the",
"order",
"object",
"created",
"last",
"within",
"the",
"current",
"session",
"of",
"the",
"user",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L1259-L1284 |
31,890 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.CreateOrderAllowCreation | protected function CreateOrderAllowCreation($sMessageConsumer, $bSkipPaymentValidation = false)
{
$oMsgManager = TCMSMessageManager::GetInstance();
$bAllowCreation = true;
if ($bAllowCreation) {
if ($this->LockIsActive()) {
// the order has already been created..... | php | protected function CreateOrderAllowCreation($sMessageConsumer, $bSkipPaymentValidation = false)
{
$oMsgManager = TCMSMessageManager::GetInstance();
$bAllowCreation = true;
if ($bAllowCreation) {
if ($this->LockIsActive()) {
// the order has already been created..... | [
"protected",
"function",
"CreateOrderAllowCreation",
"(",
"$",
"sMessageConsumer",
",",
"$",
"bSkipPaymentValidation",
"=",
"false",
")",
"{",
"$",
"oMsgManager",
"=",
"TCMSMessageManager",
"::",
"GetInstance",
"(",
")",
";",
"$",
"bAllowCreation",
"=",
"true",
";... | return true if the basket may be saved as an order, false if we want to prevent saving the order.
@param string $sMessageConsumer - message manager who we want to send errors to
@param bool $bSkipPaymentValidation - set to true if you want to skip the validation of the selected payment method
@return bool | [
"return",
"true",
"if",
"the",
"basket",
"may",
"be",
"saved",
"as",
"an",
"order",
"false",
"if",
"we",
"want",
"to",
"prevent",
"saving",
"the",
"order",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L1308-L1380 |
31,891 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.HasValidShippingGroup | protected function HasValidShippingGroup()
{
$bHasValidShippingGroup = false;
$oShipping = $this->GetActiveShippingGroup();
if (!is_null($oShipping) && $oShipping->IsAvailable()) {
$bHasValidShippingGroup = true;
}
return $bHasValidShippingGroup;
} | php | protected function HasValidShippingGroup()
{
$bHasValidShippingGroup = false;
$oShipping = $this->GetActiveShippingGroup();
if (!is_null($oShipping) && $oShipping->IsAvailable()) {
$bHasValidShippingGroup = true;
}
return $bHasValidShippingGroup;
} | [
"protected",
"function",
"HasValidShippingGroup",
"(",
")",
"{",
"$",
"bHasValidShippingGroup",
"=",
"false",
";",
"$",
"oShipping",
"=",
"$",
"this",
"->",
"GetActiveShippingGroup",
"(",
")",
";",
"if",
"(",
"!",
"is_null",
"(",
"$",
"oShipping",
")",
"&&",... | return true if the basket as a valid shipping group selected.
@return bool | [
"return",
"true",
"if",
"the",
"basket",
"as",
"a",
"valid",
"shipping",
"group",
"selected",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L1387-L1396 |
31,892 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.HasValidPaymentMethod | protected function HasValidPaymentMethod()
{
$bHasValidPaymentMethod = false;
$oPayment = $this->GetActivePaymentMethod();
if (!is_null($oPayment) && $oPayment->IsAvailable()) {
$bHasValidPaymentMethod = true;
}
return $bHasValidPaymentMethod;
} | php | protected function HasValidPaymentMethod()
{
$bHasValidPaymentMethod = false;
$oPayment = $this->GetActivePaymentMethod();
if (!is_null($oPayment) && $oPayment->IsAvailable()) {
$bHasValidPaymentMethod = true;
}
return $bHasValidPaymentMethod;
} | [
"protected",
"function",
"HasValidPaymentMethod",
"(",
")",
"{",
"$",
"bHasValidPaymentMethod",
"=",
"false",
";",
"$",
"oPayment",
"=",
"$",
"this",
"->",
"GetActivePaymentMethod",
"(",
")",
";",
"if",
"(",
"!",
"is_null",
"(",
"$",
"oPayment",
")",
"&&",
... | return true if the basket as a valid payment method selected.
@return bool | [
"return",
"true",
"if",
"the",
"basket",
"as",
"a",
"valid",
"payment",
"method",
"selected",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L1403-L1412 |
31,893 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.RemoveVoucher | public function RemoveVoucher($sBasketVoucherKey, $sMessageHandler)
{
$bRemoved = $this->GetActiveVouchers()->RemoveItem('sBasketVoucherKey', $sBasketVoucherKey);
$oMessageManager = TCMSMessageManager::GetInstance();
if ($bRemoved) {
$oMessageManager->AddMessage($sMessageHandler,... | php | public function RemoveVoucher($sBasketVoucherKey, $sMessageHandler)
{
$bRemoved = $this->GetActiveVouchers()->RemoveItem('sBasketVoucherKey', $sBasketVoucherKey);
$oMessageManager = TCMSMessageManager::GetInstance();
if ($bRemoved) {
$oMessageManager->AddMessage($sMessageHandler,... | [
"public",
"function",
"RemoveVoucher",
"(",
"$",
"sBasketVoucherKey",
",",
"$",
"sMessageHandler",
")",
"{",
"$",
"bRemoved",
"=",
"$",
"this",
"->",
"GetActiveVouchers",
"(",
")",
"->",
"RemoveItem",
"(",
"'sBasketVoucherKey'",
",",
"$",
"sBasketVoucherKey",
")... | remove the voucher with the given basket key from the voucher list. Results will be sent to sMessageHandler.
@param string $sBasketVoucherKey - The basket key of the voucher
@param string $sMessageHandler
@return bool | [
"remove",
"the",
"voucher",
"with",
"the",
"given",
"basket",
"key",
"from",
"the",
"voucher",
"list",
".",
"Results",
"will",
"be",
"sent",
"to",
"sMessageHandler",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L1543-L1555 |
31,894 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.CheckBasketVoucherAvailable | protected function CheckBasketVoucherAvailable($sMessageConsumer)
{
$bBasketVoucherAvailable = true;
$oVoucherList = $this->GetVoucherList();
$oMessageManager = TCMSMessageManager::GetInstance();
if ($oVoucherList) {
if ($oVoucherList->Length() > 0) {
$oVo... | php | protected function CheckBasketVoucherAvailable($sMessageConsumer)
{
$bBasketVoucherAvailable = true;
$oVoucherList = $this->GetVoucherList();
$oMessageManager = TCMSMessageManager::GetInstance();
if ($oVoucherList) {
if ($oVoucherList->Length() > 0) {
$oVo... | [
"protected",
"function",
"CheckBasketVoucherAvailable",
"(",
"$",
"sMessageConsumer",
")",
"{",
"$",
"bBasketVoucherAvailable",
"=",
"true",
";",
"$",
"oVoucherList",
"=",
"$",
"this",
"->",
"GetVoucherList",
"(",
")",
";",
"$",
"oMessageManager",
"=",
"TCMSMessag... | Check all vouchers in basket and check if voucher was not in use by other order.
If one voucher was used in other order try to get another one with in the same series and voucher code.
@param string $sMessageConsumer
@return bool | [
"Check",
"all",
"vouchers",
"in",
"basket",
"and",
"check",
"if",
"voucher",
"was",
"not",
"in",
"use",
"by",
"other",
"order",
".",
"If",
"one",
"voucher",
"was",
"used",
"in",
"other",
"order",
"try",
"to",
"get",
"another",
"one",
"with",
"in",
"the... | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L1839-L1878 |
31,895 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.GetNextAvailableVoucher | protected function GetNextAvailableVoucher($sVoucherCode, $sSeriesId, $sMessageConsumer)
{
$oNextAvailableVoucher = null;
$oVoucher = TdbShopVoucher::GetNewInstance();
if ($oVoucher->LoadFromFields(array('code' => $sVoucherCode, 'is_used_up' => '0', 'shop_voucher_series_id' => $sSeriesId))) ... | php | protected function GetNextAvailableVoucher($sVoucherCode, $sSeriesId, $sMessageConsumer)
{
$oNextAvailableVoucher = null;
$oVoucher = TdbShopVoucher::GetNewInstance();
if ($oVoucher->LoadFromFields(array('code' => $sVoucherCode, 'is_used_up' => '0', 'shop_voucher_series_id' => $sSeriesId))) ... | [
"protected",
"function",
"GetNextAvailableVoucher",
"(",
"$",
"sVoucherCode",
",",
"$",
"sSeriesId",
",",
"$",
"sMessageConsumer",
")",
"{",
"$",
"oNextAvailableVoucher",
"=",
"null",
";",
"$",
"oVoucher",
"=",
"TdbShopVoucher",
"::",
"GetNewInstance",
"(",
")",
... | Get next available voucher for whith given vocuehr code and series id.
Was used after deleting vouchers used in other order.
@param string $sVoucherCode
@param string $sSeriesId
@param string $sMessageConsumer
@return TdbShopVoucher | [
"Get",
"next",
"available",
"voucher",
"for",
"whith",
"given",
"vocuehr",
"code",
"and",
"series",
"id",
".",
"Was",
"used",
"after",
"deleting",
"vouchers",
"used",
"in",
"other",
"order",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L1890-L1899 |
31,896 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.OnBasketItemUpdateEvent | public function OnBasketItemUpdateEvent($oBasketItemChanged)
{
$event = new \ChameleonSystem\ShopBundle\objects\TShopBasket\BasketItemEvent(
TdbDataExtranetUser::GetInstance(),
$this,
$oBasketItemChanged
);
$this->getEventDispatcher()->dispatch(\ChameleonS... | php | public function OnBasketItemUpdateEvent($oBasketItemChanged)
{
$event = new \ChameleonSystem\ShopBundle\objects\TShopBasket\BasketItemEvent(
TdbDataExtranetUser::GetInstance(),
$this,
$oBasketItemChanged
);
$this->getEventDispatcher()->dispatch(\ChameleonS... | [
"public",
"function",
"OnBasketItemUpdateEvent",
"(",
"$",
"oBasketItemChanged",
")",
"{",
"$",
"event",
"=",
"new",
"\\",
"ChameleonSystem",
"\\",
"ShopBundle",
"\\",
"objects",
"\\",
"TShopBasket",
"\\",
"BasketItemEvent",
"(",
"TdbDataExtranetUser",
"::",
"GetIns... | the hook is triggered when the basket item list contained in the basket changed an article.
@param TShopBasketArticle $oBasketItemChanged | [
"the",
"hook",
"is",
"triggered",
"when",
"the",
"basket",
"item",
"list",
"contained",
"in",
"the",
"basket",
"changed",
"an",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L1939-L1947 |
31,897 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php | TShopBasketCore.OnBasketItemDeleteEvent | public function OnBasketItemDeleteEvent($oBasketItemRemoved)
{
$event = new \ChameleonSystem\ShopBundle\objects\TShopBasket\BasketItemEvent(
TdbDataExtranetUser::GetInstance(),
$this,
$oBasketItemRemoved
);
$this->getEventDispatcher()->dispatch(\ChameleonS... | php | public function OnBasketItemDeleteEvent($oBasketItemRemoved)
{
$event = new \ChameleonSystem\ShopBundle\objects\TShopBasket\BasketItemEvent(
TdbDataExtranetUser::GetInstance(),
$this,
$oBasketItemRemoved
);
$this->getEventDispatcher()->dispatch(\ChameleonS... | [
"public",
"function",
"OnBasketItemDeleteEvent",
"(",
"$",
"oBasketItemRemoved",
")",
"{",
"$",
"event",
"=",
"new",
"\\",
"ChameleonSystem",
"\\",
"ShopBundle",
"\\",
"objects",
"\\",
"TShopBasket",
"\\",
"BasketItemEvent",
"(",
"TdbDataExtranetUser",
"::",
"GetIns... | the hook is triggered when the basket item list contained in the basket deletes an article.
@param TShopBasketArticle $oBasketItemRemoved | [
"the",
"hook",
"is",
"triggered",
"when",
"the",
"basket",
"item",
"list",
"contained",
"in",
"the",
"basket",
"deletes",
"an",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopBasket/TShopBasketCore.class.php#L1954-L1962 |
31,898 | chameleon-system/chameleon-shop | src/ShopBundle/mappers/order/TPkgShopMapper_OrderUserData.class.php | TPkgShopMapper_OrderUserData.getAddress | protected function getAddress(TdbShopOrder $oOrder, $iAddressType, IMapperCacheTriggerRestricted $oCacheTriggerManager, $bCachingEnabled)
{
$aAddress = array();
if (self::ADDRESS_TYPE_BILLING === $iAddressType) {
$oSalutation = $oOrder->GetFieldAdrBillingSalutation();
if ($o... | php | protected function getAddress(TdbShopOrder $oOrder, $iAddressType, IMapperCacheTriggerRestricted $oCacheTriggerManager, $bCachingEnabled)
{
$aAddress = array();
if (self::ADDRESS_TYPE_BILLING === $iAddressType) {
$oSalutation = $oOrder->GetFieldAdrBillingSalutation();
if ($o... | [
"protected",
"function",
"getAddress",
"(",
"TdbShopOrder",
"$",
"oOrder",
",",
"$",
"iAddressType",
",",
"IMapperCacheTriggerRestricted",
"$",
"oCacheTriggerManager",
",",
"$",
"bCachingEnabled",
")",
"{",
"$",
"aAddress",
"=",
"array",
"(",
")",
";",
"if",
"("... | get the value map for one address type can be defined by using the class constants.
@param TdbShopOrder $oOrder
@param int $iAddressType use constants of the class to define the type to be fetched from
@return array | [
"get",
"the",
"value",
"map",
"for",
"one",
"address",
"type",
"can",
"be",
"defined",
"by",
"using",
"the",
"class",
"constants",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/mappers/order/TPkgShopMapper_OrderUserData.class.php#L52-L107 |
31,899 | PGB-LIV/php-ms | src/Search/MsgfPlusSearch.php | MsgfPlusSearch.search | public function search(SearchParametersInterface $parameters)
{
if (! is_a($parameters, 'pgb_liv\php_ms\Search\Parameters\MsgfPlusSearchParameters')) {
throw new \InvalidArgumentException('Argument 1 expected to be of type MsgfPlusSearchParameters');
}
if (is_null($param... | php | public function search(SearchParametersInterface $parameters)
{
if (! is_a($parameters, 'pgb_liv\php_ms\Search\Parameters\MsgfPlusSearchParameters')) {
throw new \InvalidArgumentException('Argument 1 expected to be of type MsgfPlusSearchParameters');
}
if (is_null($param... | [
"public",
"function",
"search",
"(",
"SearchParametersInterface",
"$",
"parameters",
")",
"{",
"if",
"(",
"!",
"is_a",
"(",
"$",
"parameters",
",",
"'pgb_liv\\php_ms\\Search\\Parameters\\MsgfPlusSearchParameters'",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgument... | Perform the MS-GF+ search using the specified parameters.
Any paramaters not specified will use the MS-GF+ defaults.
@param SearchParametersInterface $parameters
Paramaters object for any arguments to send to MS-GF+
@throws \InvalidArgumentException Thrown if any of the required properties are missing
@return string P... | [
"Perform",
"the",
"MS",
"-",
"GF",
"+",
"search",
"using",
"the",
"specified",
"parameters",
".",
"Any",
"paramaters",
"not",
"specified",
"will",
"use",
"the",
"MS",
"-",
"GF",
"+",
"defaults",
"."
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Search/MsgfPlusSearch.php#L58-L82 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.