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,500 | chameleon-system/chameleon-shop | src/ShopWishlistBundle/pkgExtranet/objects/db/TShopWishlistDataExtranetUser.class.php | TShopWishlistDataExtranetUser.AddArticleIdToWishlist | public function AddArticleIdToWishlist($sArticleId, $dAmount = 1)
{
$dNewAmountOnList = 0;
$oWishlist = &$this->GetWishlist(true);
$dNewAmountOnList = $oWishlist->AddArticle($sArticleId, $dAmount);
return $dNewAmountOnList;
} | php | public function AddArticleIdToWishlist($sArticleId, $dAmount = 1)
{
$dNewAmountOnList = 0;
$oWishlist = &$this->GetWishlist(true);
$dNewAmountOnList = $oWishlist->AddArticle($sArticleId, $dAmount);
return $dNewAmountOnList;
} | [
"public",
"function",
"AddArticleIdToWishlist",
"(",
"$",
"sArticleId",
",",
"$",
"dAmount",
"=",
"1",
")",
"{",
"$",
"dNewAmountOnList",
"=",
"0",
";",
"$",
"oWishlist",
"=",
"&",
"$",
"this",
"->",
"GetWishlist",
"(",
"true",
")",
";",
"$",
"dNewAmount... | add an article to the wishlist.
@param string $sArticleId
@param float $dAmount
@return float - new amount on list | [
"add",
"an",
"article",
"to",
"the",
"wishlist",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopWishlistBundle/pkgExtranet/objects/db/TShopWishlistDataExtranetUser.class.php#L22-L29 |
31,501 | chameleon-system/chameleon-shop | src/ShopWishlistBundle/pkgExtranet/objects/db/TShopWishlistDataExtranetUser.class.php | TShopWishlistDataExtranetUser.RemoveArticleFromWishlist | public function RemoveArticleFromWishlist($sPkgShopWishlistArticleId)
{
$oWishlist = &$this->GetWishlist(true);
$oWishlistItem = TdbPkgShopWishlistArticle::GetNewInstance();
/** @var $oWishlistItem TdbPkgShopWishlistArticle */
if ($oWishlistItem->LoadFromFields(array('pkg_shop_wishli... | php | public function RemoveArticleFromWishlist($sPkgShopWishlistArticleId)
{
$oWishlist = &$this->GetWishlist(true);
$oWishlistItem = TdbPkgShopWishlistArticle::GetNewInstance();
/** @var $oWishlistItem TdbPkgShopWishlistArticle */
if ($oWishlistItem->LoadFromFields(array('pkg_shop_wishli... | [
"public",
"function",
"RemoveArticleFromWishlist",
"(",
"$",
"sPkgShopWishlistArticleId",
")",
"{",
"$",
"oWishlist",
"=",
"&",
"$",
"this",
"->",
"GetWishlist",
"(",
"true",
")",
";",
"$",
"oWishlistItem",
"=",
"TdbPkgShopWishlistArticle",
"::",
"GetNewInstance",
... | remove an article form the wishlist.
@param string $sPkgShopWishlistArticleId - the id of the item on the list | [
"remove",
"an",
"article",
"form",
"the",
"wishlist",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopWishlistBundle/pkgExtranet/objects/db/TShopWishlistDataExtranetUser.class.php#L36-L45 |
31,502 | chameleon-system/chameleon-shop | src/ShopWishlistBundle/pkgExtranet/objects/db/TShopWishlistDataExtranetUser.class.php | TShopWishlistDataExtranetUser.& | public function &GetWishlist($bCreateIfNotExists = false)
{
$oWishlist = &$this->GetFromInternalCache('oUserWishlist');
if (is_null($oWishlist)) {
$oWishlists = $this->GetFieldPkgShopWishlistList();
if ($oWishlists->Length() > 0) {
$oWishlist = $oWishlists->Cu... | php | public function &GetWishlist($bCreateIfNotExists = false)
{
$oWishlist = &$this->GetFromInternalCache('oUserWishlist');
if (is_null($oWishlist)) {
$oWishlists = $this->GetFieldPkgShopWishlistList();
if ($oWishlists->Length() > 0) {
$oWishlist = $oWishlists->Cu... | [
"public",
"function",
"&",
"GetWishlist",
"(",
"$",
"bCreateIfNotExists",
"=",
"false",
")",
"{",
"$",
"oWishlist",
"=",
"&",
"$",
"this",
"->",
"GetFromInternalCache",
"(",
"'oUserWishlist'",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"oWishlist",
")",
")"... | return the users wishlist. if no wishlist exists, the method will return
null - unless the option bCreateIfNotExists is set, then we will
create a new on.
@param bool $bCreateIfNotExists
@return TdbPkgShopWishlist | [
"return",
"the",
"users",
"wishlist",
".",
"if",
"no",
"wishlist",
"exists",
"the",
"method",
"will",
"return",
"null",
"-",
"unless",
"the",
"option",
"bCreateIfNotExists",
"is",
"set",
"then",
"we",
"will",
"create",
"a",
"new",
"on",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopWishlistBundle/pkgExtranet/objects/db/TShopWishlistDataExtranetUser.class.php#L56-L77 |
31,503 | chameleon-system/chameleon-shop | src/ImageHotspotBundle/objects/WebModules/MTPkgImageHotspotCore/MTPkgImageHotspotCore.class.php | MTPkgImageHotspotCore.& | protected function &GetNextItem()
{
if (is_null($this->oNextItem)) {
$oActiveItem = &$this->GetActiveItem();
$oItemList = &$this->GetHotspotConfig()->GetFieldPkgImageHotspotItemList();
if ($oItemList->Length() < 2) {
$retValue = null; // write to variable ... | php | protected function &GetNextItem()
{
if (is_null($this->oNextItem)) {
$oActiveItem = &$this->GetActiveItem();
$oItemList = &$this->GetHotspotConfig()->GetFieldPkgImageHotspotItemList();
if ($oItemList->Length() < 2) {
$retValue = null; // write to variable ... | [
"protected",
"function",
"&",
"GetNextItem",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"oNextItem",
")",
")",
"{",
"$",
"oActiveItem",
"=",
"&",
"$",
"this",
"->",
"GetActiveItem",
"(",
")",
";",
"$",
"oItemList",
"=",
"&",
"$",
... | return the hotspot following the current active spot. if the active spot is the
last spot, then we will return the first step.
@return TdbPkgImageHotspotItem|null | [
"return",
"the",
"hotspot",
"following",
"the",
"current",
"active",
"spot",
".",
"if",
"the",
"active",
"spot",
"is",
"the",
"last",
"spot",
"then",
"we",
"will",
"return",
"the",
"first",
"step",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ImageHotspotBundle/objects/WebModules/MTPkgImageHotspotCore/MTPkgImageHotspotCore.class.php#L144-L169 |
31,504 | chameleon-system/chameleon-shop | src/ImageHotspotBundle/objects/WebModules/MTPkgImageHotspotCore/MTPkgImageHotspotCore.class.php | MTPkgImageHotspotCore.& | protected function &GetHotspotConfig()
{
if (is_null($this->oHotspotConfig)) {
$this->oHotspotConfig = TdbPkgImageHotspot::GetNewInstance();
if (!$this->oHotspotConfig->LoadFromField('cms_tpl_module_instance_id', $this->instanceID)) {
$this->oHotspotConfig = null;
... | php | protected function &GetHotspotConfig()
{
if (is_null($this->oHotspotConfig)) {
$this->oHotspotConfig = TdbPkgImageHotspot::GetNewInstance();
if (!$this->oHotspotConfig->LoadFromField('cms_tpl_module_instance_id', $this->instanceID)) {
$this->oHotspotConfig = null;
... | [
"protected",
"function",
"&",
"GetHotspotConfig",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"oHotspotConfig",
")",
")",
"{",
"$",
"this",
"->",
"oHotspotConfig",
"=",
"TdbPkgImageHotspot",
"::",
"GetNewInstance",
"(",
")",
";",
"if",
"("... | return config for the instance.
@return TdbPkgImageHotspot | [
"return",
"config",
"for",
"the",
"instance",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ImageHotspotBundle/objects/WebModules/MTPkgImageHotspotCore/MTPkgImageHotspotCore.class.php#L176-L186 |
31,505 | chameleon-system/chameleon-shop | src/ImageHotspotBundle/objects/WebModules/MTPkgImageHotspotCore/MTPkgImageHotspotCore.class.php | MTPkgImageHotspotCore.& | protected function &GetActiveItem()
{
if (is_null($this->oActiveItem) && !is_null($this->sActiveItemId)) {
$this->oActiveItem = TdbPkgImageHotspotItem::GetNewInstance();
$this->oActiveItem->Load($this->sActiveItemId);
}
return $this->oActiveItem;
} | php | protected function &GetActiveItem()
{
if (is_null($this->oActiveItem) && !is_null($this->sActiveItemId)) {
$this->oActiveItem = TdbPkgImageHotspotItem::GetNewInstance();
$this->oActiveItem->Load($this->sActiveItemId);
}
return $this->oActiveItem;
} | [
"protected",
"function",
"&",
"GetActiveItem",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"oActiveItem",
")",
"&&",
"!",
"is_null",
"(",
"$",
"this",
"->",
"sActiveItemId",
")",
")",
"{",
"$",
"this",
"->",
"oActiveItem",
"=",
"TdbPkg... | return the active item.
@return TdbPkgImageHotspotItem | [
"return",
"the",
"active",
"item",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ImageHotspotBundle/objects/WebModules/MTPkgImageHotspotCore/MTPkgImageHotspotCore.class.php#L193-L201 |
31,506 | chameleon-system/chameleon-shop | src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php | TCMSCronJob_ShopSendBasketLogStatisics._ExecuteCron | protected function _ExecuteCron()
{
$sQuery = "SELECT * FROM `shop_order_basket`
WHERE `shop_order_basket`.`processed` != '1'
ORDER BY `shop_order_basket`.`lastmodified` DESC";
$oOrderBasketList = TdbShopOrderBasketList::GetList($sQuery);
$sStat... | php | protected function _ExecuteCron()
{
$sQuery = "SELECT * FROM `shop_order_basket`
WHERE `shop_order_basket`.`processed` != '1'
ORDER BY `shop_order_basket`.`lastmodified` DESC";
$oOrderBasketList = TdbShopOrderBasketList::GetList($sQuery);
$sStat... | [
"protected",
"function",
"_ExecuteCron",
"(",
")",
"{",
"$",
"sQuery",
"=",
"\"SELECT * FROM `shop_order_basket`\n WHERE `shop_order_basket`.`processed` != '1'\n ORDER BY `shop_order_basket`.`lastmodified` DESC\"",
";",
"$",
"oOrderBasketList",
... | Get all none processed shop baskets and send generated statistics to shop owner. | [
"Get",
"all",
"none",
"processed",
"shop",
"baskets",
"and",
"send",
"generated",
"statistics",
"to",
"shop",
"owner",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php#L26-L42 |
31,507 | chameleon-system/chameleon-shop | src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php | TCMSCronJob_ShopSendBasketLogStatisics.MarkOrderBasketAsProcessed | protected function MarkOrderBasketAsProcessed($oOrderBasket)
{
$oOrderBasket->AllowEditByAll(true);
$oOrderBasket->sqlData['processed'] = 1;
$oOrderBasket->Save();
$oOrderBasket->AllowEditByAll(false);
} | php | protected function MarkOrderBasketAsProcessed($oOrderBasket)
{
$oOrderBasket->AllowEditByAll(true);
$oOrderBasket->sqlData['processed'] = 1;
$oOrderBasket->Save();
$oOrderBasket->AllowEditByAll(false);
} | [
"protected",
"function",
"MarkOrderBasketAsProcessed",
"(",
"$",
"oOrderBasket",
")",
"{",
"$",
"oOrderBasket",
"->",
"AllowEditByAll",
"(",
"true",
")",
";",
"$",
"oOrderBasket",
"->",
"sqlData",
"[",
"'processed'",
"]",
"=",
"1",
";",
"$",
"oOrderBasket",
"-... | Mark order basket as processed. So no statistics for this order basket will be generated next time.
@param TdbShopOrderBasket $oOrderBasket | [
"Mark",
"order",
"basket",
"as",
"processed",
".",
"So",
"no",
"statistics",
"for",
"this",
"order",
"basket",
"will",
"be",
"generated",
"next",
"time",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php#L49-L55 |
31,508 | chameleon-system/chameleon-shop | src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php | TCMSCronJob_ShopSendBasketLogStatisics.GetTotalStatistics | protected function GetTotalStatistics()
{
$sTotalStatistics = "#########################################################\r\n";
$sTotalStatistics .= TGlobal::Translate('chameleon_system_shop.cron_send_basket_stats.headline')."\r\n";
$sTotalStatistics .= "------------------------------------\r... | php | protected function GetTotalStatistics()
{
$sTotalStatistics = "#########################################################\r\n";
$sTotalStatistics .= TGlobal::Translate('chameleon_system_shop.cron_send_basket_stats.headline')."\r\n";
$sTotalStatistics .= "------------------------------------\r... | [
"protected",
"function",
"GetTotalStatistics",
"(",
")",
"{",
"$",
"sTotalStatistics",
"=",
"\"#########################################################\\r\\n\"",
";",
"$",
"sTotalStatistics",
".=",
"TGlobal",
"::",
"Translate",
"(",
"'chameleon_system_shop.cron_send_basket_stats... | Get overfiew statistics of all processed order baskets.
@return string | [
"Get",
"overfiew",
"statistics",
"of",
"all",
"processed",
"order",
"baskets",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php#L62-L93 |
31,509 | chameleon-system/chameleon-shop | src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php | TCMSCronJob_ShopSendBasketLogStatisics.GenerateStatisticsFromOrderBasket | protected function GenerateStatisticsFromOrderBasket($oOrderBasket)
{
$sStatistics = '';
if (empty($oOrderBasket->fieldShopOrderId)) {
$sStatistics = $this->GetCancelBasketInformation($oOrderBasket);
$oUser = TdbDataExtranetUser::GetNewInstance();
$oUser = unseria... | php | protected function GenerateStatisticsFromOrderBasket($oOrderBasket)
{
$sStatistics = '';
if (empty($oOrderBasket->fieldShopOrderId)) {
$sStatistics = $this->GetCancelBasketInformation($oOrderBasket);
$oUser = TdbDataExtranetUser::GetNewInstance();
$oUser = unseria... | [
"protected",
"function",
"GenerateStatisticsFromOrderBasket",
"(",
"$",
"oOrderBasket",
")",
"{",
"$",
"sStatistics",
"=",
"''",
";",
"if",
"(",
"empty",
"(",
"$",
"oOrderBasket",
"->",
"fieldShopOrderId",
")",
")",
"{",
"$",
"sStatistics",
"=",
"$",
"this",
... | Generate user and basket statistics for given order basket.
@param TdbShopOrderBasket $oOrderBasket
@return string | [
"Generate",
"user",
"and",
"basket",
"statistics",
"for",
"given",
"order",
"basket",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php#L102-L123 |
31,510 | chameleon-system/chameleon-shop | src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php | TCMSCronJob_ShopSendBasketLogStatisics.AddCompleteOrderToStatistics | protected function AddCompleteOrderToStatistics()
{
if (array_key_exists(TGlobal::Translate('chameleon_system_shop.cron_send_basket_stats.completed'), $this->aCancelStep)) {
++$this->aCancelStep[TGlobal::Translate('chameleon_system_shop.cron_send_basket_stats.completed')];
} else {
... | php | protected function AddCompleteOrderToStatistics()
{
if (array_key_exists(TGlobal::Translate('chameleon_system_shop.cron_send_basket_stats.completed'), $this->aCancelStep)) {
++$this->aCancelStep[TGlobal::Translate('chameleon_system_shop.cron_send_basket_stats.completed')];
} else {
... | [
"protected",
"function",
"AddCompleteOrderToStatistics",
"(",
")",
"{",
"if",
"(",
"array_key_exists",
"(",
"TGlobal",
"::",
"Translate",
"(",
"'chameleon_system_shop.cron_send_basket_stats.completed'",
")",
",",
"$",
"this",
"->",
"aCancelStep",
")",
")",
"{",
"++",
... | If basket was finished completely add it to overfiew statistics. | [
"If",
"basket",
"was",
"finished",
"completely",
"add",
"it",
"to",
"overfiew",
"statistics",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php#L128-L135 |
31,511 | chameleon-system/chameleon-shop | src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php | TCMSCronJob_ShopSendBasketLogStatisics.GetCancelBasketInformation | protected function GetCancelBasketInformation($oOrderBasket)
{
$sCancelBasketInformation = '';
$sCancelBasketInformation .= TGlobal::Translate('chameleon_system_shop.cron_send_basket_stats.text_general_info')."\r\n";
$sCancelBasketInformation .= "------------------------------------\r\n";
... | php | protected function GetCancelBasketInformation($oOrderBasket)
{
$sCancelBasketInformation = '';
$sCancelBasketInformation .= TGlobal::Translate('chameleon_system_shop.cron_send_basket_stats.text_general_info')."\r\n";
$sCancelBasketInformation .= "------------------------------------\r\n";
... | [
"protected",
"function",
"GetCancelBasketInformation",
"(",
"$",
"oOrderBasket",
")",
"{",
"$",
"sCancelBasketInformation",
"=",
"''",
";",
"$",
"sCancelBasketInformation",
".=",
"TGlobal",
"::",
"Translate",
"(",
"'chameleon_system_shop.cron_send_basket_stats.text_general_in... | Get statistics on which basket step the user canceled.
@param TdbShopOrderBasket $oOrderBasket
@return string | [
"Get",
"statistics",
"on",
"which",
"basket",
"step",
"the",
"user",
"canceled",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php#L144-L158 |
31,512 | chameleon-system/chameleon-shop | src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php | TCMSCronJob_ShopSendBasketLogStatisics.GetUserStatistics | protected function GetUserStatistics($oUser)
{
$sUserStatistics = '';
$sUserStatistics .= "------------------------------------\r\n\r\n";
$sUserStatistics .= TGlobal::Translate('chameleon_system_shop.cron_send_basket_stats.text_user')."\r\n";
$sUserStatistics .= "--------------------... | php | protected function GetUserStatistics($oUser)
{
$sUserStatistics = '';
$sUserStatistics .= "------------------------------------\r\n\r\n";
$sUserStatistics .= TGlobal::Translate('chameleon_system_shop.cron_send_basket_stats.text_user')."\r\n";
$sUserStatistics .= "--------------------... | [
"protected",
"function",
"GetUserStatistics",
"(",
"$",
"oUser",
")",
"{",
"$",
"sUserStatistics",
"=",
"''",
";",
"$",
"sUserStatistics",
".=",
"\"------------------------------------\\r\\n\\r\\n\"",
";",
"$",
"sUserStatistics",
".=",
"TGlobal",
"::",
"Translate",
"(... | Get user statistics for canceled basket step.
@param TdbDataExtranetUser $oUser
@return string | [
"Get",
"user",
"statistics",
"for",
"canceled",
"basket",
"step",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php#L167-L188 |
31,513 | chameleon-system/chameleon-shop | src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php | TCMSCronJob_ShopSendBasketLogStatisics.GetBasketStatistics | protected function GetBasketStatistics($oBasket)
{
$sBasketstatistics = '';
$sBasketstatistics .= "------------------------------------\r\n\r\n";
$sBasketstatistics .= TGlobal::Translate('chameleon_system_shop.cron_send_basket_stats.basket_content')."\r\n";
$sBasketstatistics .= "---... | php | protected function GetBasketStatistics($oBasket)
{
$sBasketstatistics = '';
$sBasketstatistics .= "------------------------------------\r\n\r\n";
$sBasketstatistics .= TGlobal::Translate('chameleon_system_shop.cron_send_basket_stats.basket_content')."\r\n";
$sBasketstatistics .= "---... | [
"protected",
"function",
"GetBasketStatistics",
"(",
"$",
"oBasket",
")",
"{",
"$",
"sBasketstatistics",
"=",
"''",
";",
"$",
"sBasketstatistics",
".=",
"\"------------------------------------\\r\\n\\r\\n\"",
";",
"$",
"sBasketstatistics",
".=",
"TGlobal",
"::",
"Transl... | Get basket statistics for canceled basket step.
@param TShopBasket $oBasket
@return string | [
"Get",
"basket",
"statistics",
"for",
"canceled",
"basket",
"step",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php#L197-L221 |
31,514 | chameleon-system/chameleon-shop | src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php | TCMSCronJob_ShopSendBasketLogStatisics.SendBasketStatistics | protected function SendBasketStatistics($sStatistics)
{
$oMail = TDataMailProfile::GetProfile(self::MAIL_SYSTEM_NAME);
$aMailData = array();
$aMailData['sStatistics'] = $sStatistics;
$oMail->AddDataArray($aMailData);
$oMail->SendUsingObjectView('emails', 'Customer');
} | php | protected function SendBasketStatistics($sStatistics)
{
$oMail = TDataMailProfile::GetProfile(self::MAIL_SYSTEM_NAME);
$aMailData = array();
$aMailData['sStatistics'] = $sStatistics;
$oMail->AddDataArray($aMailData);
$oMail->SendUsingObjectView('emails', 'Customer');
} | [
"protected",
"function",
"SendBasketStatistics",
"(",
"$",
"sStatistics",
")",
"{",
"$",
"oMail",
"=",
"TDataMailProfile",
"::",
"GetProfile",
"(",
"self",
"::",
"MAIL_SYSTEM_NAME",
")",
";",
"$",
"aMailData",
"=",
"array",
"(",
")",
";",
"$",
"aMailData",
"... | Send complete statisticreport to shop owner.
@param string $sStatistics | [
"Send",
"complete",
"statisticreport",
"to",
"shop",
"owner",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/CronJobs/TCMSCronJob_ShopSendBasketLogStatisics.class.php#L228-L235 |
31,515 | edmondscommerce/doctrine-static-meta | src/Entity/Savers/BulkEntityUpdater.php | BulkEntityUpdater.convertExtractedToSqlRow | private function convertExtractedToSqlRow(array $extracted): string
{
if ([] === $extracted) {
throw new \RuntimeException('Extracted array is empty in ' . __METHOD__);
}
$primaryKeyCol = null;
$primaryKey = null;
$sql = "update `{$this->tableName}` s... | php | private function convertExtractedToSqlRow(array $extracted): string
{
if ([] === $extracted) {
throw new \RuntimeException('Extracted array is empty in ' . __METHOD__);
}
$primaryKeyCol = null;
$primaryKey = null;
$sql = "update `{$this->tableName}` s... | [
"private",
"function",
"convertExtractedToSqlRow",
"(",
"array",
"$",
"extracted",
")",
":",
"string",
"{",
"if",
"(",
"[",
"]",
"===",
"$",
"extracted",
")",
"{",
"throw",
"new",
"\\",
"RuntimeException",
"(",
"'Extracted array is empty in '",
".",
"__METHOD__"... | Take the extracted array and build an update query
@param array $extracted
@return string | [
"Take",
"the",
"extracted",
"array",
"and",
"build",
"an",
"update",
"query"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Savers/BulkEntityUpdater.php#L174-L196 |
31,516 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Creation/AbstractCreator.php | AbstractCreator.updateRootDirOnTargetFile | private function updateRootDirOnTargetFile(): void
{
$realTemplateTestsPath = realpath(self::ROOT_TEMPLATE_PATH . self::TEST_DIR);
if (0 === \strpos($this->templateFile->getPath(), $realTemplateTestsPath)) {
$updatedPath = str_replace(
'/src/',
'/tests/',
... | php | private function updateRootDirOnTargetFile(): void
{
$realTemplateTestsPath = realpath(self::ROOT_TEMPLATE_PATH . self::TEST_DIR);
if (0 === \strpos($this->templateFile->getPath(), $realTemplateTestsPath)) {
$updatedPath = str_replace(
'/src/',
'/tests/',
... | [
"private",
"function",
"updateRootDirOnTargetFile",
"(",
")",
":",
"void",
"{",
"$",
"realTemplateTestsPath",
"=",
"realpath",
"(",
"self",
"::",
"ROOT_TEMPLATE_PATH",
".",
"self",
"::",
"TEST_DIR",
")",
";",
"if",
"(",
"0",
"===",
"\\",
"strpos",
"(",
"$",
... | Where the template file is in tests, we need to fix that in the target file | [
"Where",
"the",
"template",
"file",
"is",
"in",
"tests",
"we",
"need",
"to",
"fix",
"that",
"in",
"the",
"target",
"file"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Creation/AbstractCreator.php#L134-L145 |
31,517 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Creation/AbstractCreator.php | AbstractCreator.configurePipeline | protected function configurePipeline(): void
{
$this->pipeline = new Pipeline($this->findReplaceFactory);
$this->registerReplaceName();
$this->registerReplaceProjectRootNamespace();
} | php | protected function configurePipeline(): void
{
$this->pipeline = new Pipeline($this->findReplaceFactory);
$this->registerReplaceName();
$this->registerReplaceProjectRootNamespace();
} | [
"protected",
"function",
"configurePipeline",
"(",
")",
":",
"void",
"{",
"$",
"this",
"->",
"pipeline",
"=",
"new",
"Pipeline",
"(",
"$",
"this",
"->",
"findReplaceFactory",
")",
";",
"$",
"this",
"->",
"registerReplaceName",
"(",
")",
";",
"$",
"this",
... | In this method we register all the process steps that we want to rnu against the file
By default this registers the ReplaceNameProcess which is almost certainly required. Other processes can be
registered as required | [
"In",
"this",
"method",
"we",
"register",
"all",
"the",
"process",
"steps",
"that",
"we",
"want",
"to",
"rnu",
"against",
"the",
"file"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Creation/AbstractCreator.php#L161-L166 |
31,518 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Creation/AbstractCreator.php | AbstractCreator.writeIfNotExists | public function writeIfNotExists(): string
{
if ($this->targetFile->exists()) {
return $this->targetFile->getPath();
}
return $this->write();
} | php | public function writeIfNotExists(): string
{
if ($this->targetFile->exists()) {
return $this->targetFile->getPath();
}
return $this->write();
} | [
"public",
"function",
"writeIfNotExists",
"(",
")",
":",
"string",
"{",
"if",
"(",
"$",
"this",
"->",
"targetFile",
"->",
"exists",
"(",
")",
")",
"{",
"return",
"$",
"this",
"->",
"targetFile",
"->",
"getPath",
"(",
")",
";",
"}",
"return",
"$",
"th... | Write the file only if it doesn't already exist
@return string
@throws \EdmondsCommerce\DoctrineStaticMeta\Exception\DoctrineStaticMetaException | [
"Write",
"the",
"file",
"only",
"if",
"it",
"doesn",
"t",
"already",
"exist"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Creation/AbstractCreator.php#L193-L200 |
31,519 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Creation/AbstractCreator.php | AbstractCreator.write | public function write(): string
{
$this->targetFile->removeIfExists();
return $this->fileWriter->write($this->targetFile);
} | php | public function write(): string
{
$this->targetFile->removeIfExists();
return $this->fileWriter->write($this->targetFile);
} | [
"public",
"function",
"write",
"(",
")",
":",
"string",
"{",
"$",
"this",
"->",
"targetFile",
"->",
"removeIfExists",
"(",
")",
";",
"return",
"$",
"this",
"->",
"fileWriter",
"->",
"write",
"(",
"$",
"this",
"->",
"targetFile",
")",
";",
"}"
] | Write the file and return the generated path
@return string
@throws \EdmondsCommerce\DoctrineStaticMeta\Exception\DoctrineStaticMetaException | [
"Write",
"the",
"file",
"and",
"return",
"the",
"generated",
"path"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Creation/AbstractCreator.php#L208-L213 |
31,520 | comporu/compo-core | src/Compo/Sonata/AdminBundle/Listener/LogRevisionsListenerExtend.php | LogRevisionsListenerExtend.getOriginalEntityData | private function getOriginalEntityData($entity)
{
$class = $this->em->getClassMetadata(\get_class($entity));
$data = $this->uow->getOriginalEntityData($entity);
if ($class->isVersioned) {
$versionField = $class->versionField;
$data[$versionField] = $class->reflFields[... | php | private function getOriginalEntityData($entity)
{
$class = $this->em->getClassMetadata(\get_class($entity));
$data = $this->uow->getOriginalEntityData($entity);
if ($class->isVersioned) {
$versionField = $class->versionField;
$data[$versionField] = $class->reflFields[... | [
"private",
"function",
"getOriginalEntityData",
"(",
"$",
"entity",
")",
"{",
"$",
"class",
"=",
"$",
"this",
"->",
"em",
"->",
"getClassMetadata",
"(",
"\\",
"get_class",
"(",
"$",
"entity",
")",
")",
";",
"$",
"data",
"=",
"$",
"this",
"->",
"uow",
... | get original entity data, including versioned field, if "version" constraint is used.
@param mixed $entity
@return array | [
"get",
"original",
"entity",
"data",
"including",
"versioned",
"field",
"if",
"version",
"constraint",
"is",
"used",
"."
] | ebaa9fe8a4b831506c78fdf637da6b4deadec1e2 | https://github.com/comporu/compo-core/blob/ebaa9fe8a4b831506c78fdf637da6b4deadec1e2/src/Compo/Sonata/AdminBundle/Listener/LogRevisionsListenerExtend.php#L374-L384 |
31,521 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Generator/RelationsGenerator.php | RelationsGenerator.setEntityHasRelationToEntity | public function setEntityHasRelationToEntity(
string $owningEntityFqn,
string $hasType,
string $ownedEntityFqn,
bool $requiredReciprocation = false,
bool $internalUseOnly = true
): void {
$reciprocate = $internalUseOnly;
try {
$this->validateHasTyp... | php | public function setEntityHasRelationToEntity(
string $owningEntityFqn,
string $hasType,
string $ownedEntityFqn,
bool $requiredReciprocation = false,
bool $internalUseOnly = true
): void {
$reciprocate = $internalUseOnly;
try {
$this->validateHasTyp... | [
"public",
"function",
"setEntityHasRelationToEntity",
"(",
"string",
"$",
"owningEntityFqn",
",",
"string",
"$",
"hasType",
",",
"string",
"$",
"ownedEntityFqn",
",",
"bool",
"$",
"requiredReciprocation",
"=",
"false",
",",
"bool",
"$",
"internalUseOnly",
"=",
"tr... | Set a relationship from one Entity to Another Entity.
Also used internally to set the reciprocal side. Uses an undocumented 4th bool parameter to kill recursion.
@param string $owningEntityFqn
@param string $hasType
@param string $ownedEntityFqn
@param bool $requiredReciprocation
You should never pass in this para... | [
"Set",
"a",
"relationship",
"from",
"one",
"Entity",
"to",
"Another",
"Entity",
"."
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Generator/RelationsGenerator.php#L237-L288 |
31,522 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Generator/RelationsGenerator.php | RelationsGenerator.getPathsForOwningTraitsAndInterfaces | protected function getPathsForOwningTraitsAndInterfaces(
string $hasType,
string $ownedEntityFqn
): array {
try {
$ownedHasName = $this->namespaceHelper->getOwnedHasName(
$hasType,
$ownedEntityFqn,
$this->srcSubFolderName,
... | php | protected function getPathsForOwningTraitsAndInterfaces(
string $hasType,
string $ownedEntityFqn
): array {
try {
$ownedHasName = $this->namespaceHelper->getOwnedHasName(
$hasType,
$ownedEntityFqn,
$this->srcSubFolderName,
... | [
"protected",
"function",
"getPathsForOwningTraitsAndInterfaces",
"(",
"string",
"$",
"hasType",
",",
"string",
"$",
"ownedEntityFqn",
")",
":",
"array",
"{",
"try",
"{",
"$",
"ownedHasName",
"=",
"$",
"this",
"->",
"namespaceHelper",
"->",
"getOwnedHasName",
"(",
... | Get the absolute paths for the owning traits and interfaces for the specified relation type
Will ensure that the files exists
@param string $hasType
@param string $ownedEntityFqn
@return array [
$owningTraitPath,
$owningInterfacePath,
$reciprocatingInterfacePath
]
@throws DoctrineStaticMetaException
@SuppressWarnings... | [
"Get",
"the",
"absolute",
"paths",
"for",
"the",
"owning",
"traits",
"and",
"interfaces",
"for",
"the",
"specified",
"relation",
"type",
"Will",
"ensure",
"that",
"the",
"files",
"exists"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Generator/RelationsGenerator.php#L321-L372 |
31,523 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Generator/RelationsGenerator.php | RelationsGenerator.generateRelationCodeForEntity | public function generateRelationCodeForEntity(string $entityFqn): void
{
$invokable = new GenerateRelationCodeForEntity(
$entityFqn,
$this->pathToProjectRoot,
$this->projectRootNamespace,
$this->srcSubFolderName,
$this->namespaceHelper,
... | php | public function generateRelationCodeForEntity(string $entityFqn): void
{
$invokable = new GenerateRelationCodeForEntity(
$entityFqn,
$this->pathToProjectRoot,
$this->projectRootNamespace,
$this->srcSubFolderName,
$this->namespaceHelper,
... | [
"public",
"function",
"generateRelationCodeForEntity",
"(",
"string",
"$",
"entityFqn",
")",
":",
"void",
"{",
"$",
"invokable",
"=",
"new",
"GenerateRelationCodeForEntity",
"(",
"$",
"entityFqn",
",",
"$",
"this",
"->",
"pathToProjectRoot",
",",
"$",
"this",
"-... | Generate the relation traits for specified Entity
This works by copying the template traits folder over and then updating the file contents, name and path
@param string $entityFqn Fully Qualified Name of Entity
@throws DoctrineStaticMetaException
@SuppressWarnings(PHPMD.StaticAccess) | [
"Generate",
"the",
"relation",
"traits",
"for",
"specified",
"Entity"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Generator/RelationsGenerator.php#L401-L413 |
31,524 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Generator/RelationsGenerator.php | RelationsGenerator.getRelativePathRelationsGenerator | public function getRelativePathRelationsGenerator(): \Generator
{
try {
$recursiveIterator = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator(
\realpath(AbstractGenerator::RELATIONS_TEMPLATE_PATH),
\RecursiveDirectoryIterator... | php | public function getRelativePathRelationsGenerator(): \Generator
{
try {
$recursiveIterator = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator(
\realpath(AbstractGenerator::RELATIONS_TEMPLATE_PATH),
\RecursiveDirectoryIterator... | [
"public",
"function",
"getRelativePathRelationsGenerator",
"(",
")",
":",
"\\",
"Generator",
"{",
"try",
"{",
"$",
"recursiveIterator",
"=",
"new",
"\\",
"RecursiveIteratorIterator",
"(",
"new",
"\\",
"RecursiveDirectoryIterator",
"(",
"\\",
"realpath",
"(",
"Abstra... | Generator that yields relative paths of all the files in the relations template path and the SplFileInfo objects
Use a PHP Generator to iterate over a recursive iterator iterator and then yield:
- key: string $relativePath
- value: \SplFileInfo $fileInfo
The `finally` step unsets the recursiveIterator once everything... | [
"Generator",
"that",
"yields",
"relative",
"paths",
"of",
"all",
"the",
"files",
"in",
"the",
"relations",
"template",
"path",
"and",
"the",
"SplFileInfo",
"objects"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Generator/RelationsGenerator.php#L426-L450 |
31,525 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Generator/RelationsGenerator.php | RelationsGenerator.useRelationTraitInClass | protected function useRelationTraitInClass(string $classPath, string $traitPath): void
{
try {
$class = PhpClass::fromFile($classPath);
} catch (Error $e) {
throw new DoctrineStaticMetaException(
'PHP parsing error when loading class ' . $classPath . ': ' . $e... | php | protected function useRelationTraitInClass(string $classPath, string $traitPath): void
{
try {
$class = PhpClass::fromFile($classPath);
} catch (Error $e) {
throw new DoctrineStaticMetaException(
'PHP parsing error when loading class ' . $classPath . ': ' . $e... | [
"protected",
"function",
"useRelationTraitInClass",
"(",
"string",
"$",
"classPath",
",",
"string",
"$",
"traitPath",
")",
":",
"void",
"{",
"try",
"{",
"$",
"class",
"=",
"PhpClass",
"::",
"fromFile",
"(",
"$",
"classPath",
")",
";",
"}",
"catch",
"(",
... | Add the specified trait to the specified class
@param string $classPath
@param string $traitPath
@throws DoctrineStaticMetaException
@SuppressWarnings(PHPMD.StaticAccess) | [
"Add",
"the",
"specified",
"trait",
"to",
"the",
"specified",
"class"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Generator/RelationsGenerator.php#L478-L500 |
31,526 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Generator/RelationsGenerator.php | RelationsGenerator.useRelationInterfaceInEntityInterface | protected function useRelationInterfaceInEntityInterface(string $classPath, string $interfacePath): void
{
$entityFqn = PhpClass::fromFile($classPath)->getQualifiedName();
$entityInterfaceFqn = $this->namespaceHelper->getEntityInterfaceFromEntityFqn($entityFqn);
$entityInterfacePa... | php | protected function useRelationInterfaceInEntityInterface(string $classPath, string $interfacePath): void
{
$entityFqn = PhpClass::fromFile($classPath)->getQualifiedName();
$entityInterfaceFqn = $this->namespaceHelper->getEntityInterfaceFromEntityFqn($entityFqn);
$entityInterfacePa... | [
"protected",
"function",
"useRelationInterfaceInEntityInterface",
"(",
"string",
"$",
"classPath",
",",
"string",
"$",
"interfacePath",
")",
":",
"void",
"{",
"$",
"entityFqn",
"=",
"PhpClass",
"::",
"fromFile",
"(",
"$",
"classPath",
")",
"->",
"getQualifiedName"... | Add the specified interface to the specified entity interface
@param string $classPath
@param string $interfacePath
@throws \ReflectionException
@SuppressWarnings(PHPMD.StaticAccess) | [
"Add",
"the",
"specified",
"interface",
"to",
"the",
"specified",
"entity",
"interface"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Generator/RelationsGenerator.php#L511-L520 |
31,527 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Generator/RelationsGenerator.php | RelationsGenerator.getInverseHasType | protected function getInverseHasType(string $hasType): string
{
switch ($hasType) {
case self::HAS_ONE_TO_ONE:
case self::HAS_REQUIRED_ONE_TO_ONE:
case self::HAS_MANY_TO_MANY:
case self::HAS_REQUIRED_MANY_TO_MANY:
return \str_replace(
... | php | protected function getInverseHasType(string $hasType): string
{
switch ($hasType) {
case self::HAS_ONE_TO_ONE:
case self::HAS_REQUIRED_ONE_TO_ONE:
case self::HAS_MANY_TO_MANY:
case self::HAS_REQUIRED_MANY_TO_MANY:
return \str_replace(
... | [
"protected",
"function",
"getInverseHasType",
"(",
"string",
"$",
"hasType",
")",
":",
"string",
"{",
"switch",
"(",
"$",
"hasType",
")",
"{",
"case",
"self",
"::",
"HAS_ONE_TO_ONE",
":",
"case",
"self",
"::",
"HAS_REQUIRED_ONE_TO_ONE",
":",
"case",
"self",
... | Get the inverse of a hasType
@param string $hasType
@return string
@throws DoctrineStaticMetaException
@SuppressWarnings(PHPMD.CyclomaticComplexity) | [
"Get",
"the",
"inverse",
"of",
"a",
"hasType"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Generator/RelationsGenerator.php#L531-L571 |
31,528 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/Generator/RelationsGenerator.php | RelationsGenerator.updateHasTypeForPossibleRequired | private function updateHasTypeForPossibleRequired(string $relation, bool $required): string
{
$inverseIsRequired = \ts\stringContains($relation, self::PREFIX_REQUIRED);
if (false === $required) {
if (false === $inverseIsRequired) {
return $relation;
}
... | php | private function updateHasTypeForPossibleRequired(string $relation, bool $required): string
{
$inverseIsRequired = \ts\stringContains($relation, self::PREFIX_REQUIRED);
if (false === $required) {
if (false === $inverseIsRequired) {
return $relation;
}
... | [
"private",
"function",
"updateHasTypeForPossibleRequired",
"(",
"string",
"$",
"relation",
",",
"bool",
"$",
"required",
")",
":",
"string",
"{",
"$",
"inverseIsRequired",
"=",
"\\",
"ts",
"\\",
"stringContains",
"(",
"$",
"relation",
",",
"self",
"::",
"PREFI... | Take a relationship and a possibility of being required and ensure it is set as the correct relationship
@param string $relation
@param bool $required
@return string | [
"Take",
"a",
"relationship",
"and",
"a",
"possibility",
"of",
"being",
"required",
"and",
"ensure",
"it",
"is",
"set",
"as",
"the",
"correct",
"relationship"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/Generator/RelationsGenerator.php#L581-L598 |
31,529 | Erebot/Erebot | src/IrcConnection.php | IrcConnection.setURIFactory | public function setURIFactory($factory)
{
$reflector = new \ReflectionClass($factory);
if (!$reflector->implementsInterface('\\Erebot\\URIInterface')) {
throw new \Erebot\InvalidValueException(
'The factory must implement \\Erebot\\URIInterface'
);
}
... | php | public function setURIFactory($factory)
{
$reflector = new \ReflectionClass($factory);
if (!$reflector->implementsInterface('\\Erebot\\URIInterface')) {
throw new \Erebot\InvalidValueException(
'The factory must implement \\Erebot\\URIInterface'
);
}
... | [
"public",
"function",
"setURIFactory",
"(",
"$",
"factory",
")",
"{",
"$",
"reflector",
"=",
"new",
"\\",
"ReflectionClass",
"(",
"$",
"factory",
")",
";",
"if",
"(",
"!",
"$",
"reflector",
"->",
"implementsInterface",
"(",
"'\\\\Erebot\\\\URIInterface'",
")",... | Sets the class to use as a factory
to parse Uniform Resource Identifiers.
\param string $factory
Name of the class to use to parse an URI. | [
"Sets",
"the",
"class",
"to",
"use",
"as",
"a",
"factory",
"to",
"parse",
"Uniform",
"Resource",
"Identifiers",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcConnection.php#L165-L174 |
31,530 | Erebot/Erebot | src/IrcConnection.php | IrcConnection.realLoadModule | protected function realLoadModule(
$module,
$chan,
$flags,
&$plainModules,
&$channelModules
) {
if ($chan !== null) {
if (isset($channelModules[$chan][$module])) {
return $channelModules[$chan][$module];
}
} elseif (isse... | php | protected function realLoadModule(
$module,
$chan,
$flags,
&$plainModules,
&$channelModules
) {
if ($chan !== null) {
if (isset($channelModules[$chan][$module])) {
return $channelModules[$chan][$module];
}
} elseif (isse... | [
"protected",
"function",
"realLoadModule",
"(",
"$",
"module",
",",
"$",
"chan",
",",
"$",
"flags",
",",
"&",
"$",
"plainModules",
",",
"&",
"$",
"channelModules",
")",
"{",
"if",
"(",
"$",
"chan",
"!==",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
... | Load a single module for this connection.
\param string $module
Name of the module to load. If the module
is already loaded, nothing will happen.
\param string|null $chan
Name of the IRC channel for which this module
is being loaded. Pass \b null to load a module
globally (for the whole connection) rather than
for a ... | [
"Load",
"a",
"single",
"module",
"for",
"this",
"connection",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcConnection.php#L621-L666 |
31,531 | Erebot/Erebot | src/IrcConnection.php | IrcConnection.dispatchEvent | protected function dispatchEvent(\Erebot\Interfaces\Event\Base\Generic $event)
{
$logger = \Plop\Plop::getInstance();
$logger->debug(
$this->bot->gettext('Dispatching "%(type)s" event.'),
array('type' => get_class($event))
);
try {
foreach ($this->... | php | protected function dispatchEvent(\Erebot\Interfaces\Event\Base\Generic $event)
{
$logger = \Plop\Plop::getInstance();
$logger->debug(
$this->bot->gettext('Dispatching "%(type)s" event.'),
array('type' => get_class($event))
);
try {
foreach ($this->... | [
"protected",
"function",
"dispatchEvent",
"(",
"\\",
"Erebot",
"\\",
"Interfaces",
"\\",
"Event",
"\\",
"Base",
"\\",
"Generic",
"$",
"event",
")",
"{",
"$",
"logger",
"=",
"\\",
"Plop",
"\\",
"Plop",
"::",
"getInstance",
"(",
")",
";",
"$",
"logger",
... | Dispatches the given event to handlers
which have been registered for this type of event.
\param Erebot::Interfaces::Event::Base::Generic $event
An event to dispatch. | [
"Dispatches",
"the",
"given",
"event",
"to",
"handlers",
"which",
"have",
"been",
"registered",
"for",
"this",
"type",
"of",
"event",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcConnection.php#L755-L773 |
31,532 | Erebot/Erebot | src/IrcConnection.php | IrcConnection.dispatchNumeric | protected function dispatchNumeric(\Erebot\Interfaces\Event\Numeric $numeric)
{
$logger = \Plop\Plop::getInstance();
$logger->debug(
$this->bot->gettext('Dispatching numeric %(code)s.'),
array('code' => sprintf('%03d', $numeric->getCode()))
);
try {
... | php | protected function dispatchNumeric(\Erebot\Interfaces\Event\Numeric $numeric)
{
$logger = \Plop\Plop::getInstance();
$logger->debug(
$this->bot->gettext('Dispatching numeric %(code)s.'),
array('code' => sprintf('%03d', $numeric->getCode()))
);
try {
... | [
"protected",
"function",
"dispatchNumeric",
"(",
"\\",
"Erebot",
"\\",
"Interfaces",
"\\",
"Event",
"\\",
"Numeric",
"$",
"numeric",
")",
"{",
"$",
"logger",
"=",
"\\",
"Plop",
"\\",
"Plop",
"::",
"getInstance",
"(",
")",
";",
"$",
"logger",
"->",
"debug... | Dispatches the given numeric event to handlers
which have been registered for this type of numeric.
\param Erebot::Interfaces::Event::Numeric $numeric
A numeric message to dispatch. | [
"Dispatches",
"the",
"given",
"numeric",
"event",
"to",
"handlers",
"which",
"have",
"been",
"registered",
"for",
"this",
"type",
"of",
"numeric",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcConnection.php#L782-L800 |
31,533 | Erebot/Erebot | src/IrcConnection.php | IrcConnection.handleCapabilities | public function handleCapabilities(
\Erebot\Interfaces\EventHandler $handler,
\Erebot\Event\ServerCapabilities $event
) {
$module = $event->getModule();
$validMappings = array(
// This is already the default value, but we still define it
// in case setCollato... | php | public function handleCapabilities(
\Erebot\Interfaces\EventHandler $handler,
\Erebot\Event\ServerCapabilities $event
) {
$module = $event->getModule();
$validMappings = array(
// This is already the default value, but we still define it
// in case setCollato... | [
"public",
"function",
"handleCapabilities",
"(",
"\\",
"Erebot",
"\\",
"Interfaces",
"\\",
"EventHandler",
"$",
"handler",
",",
"\\",
"Erebot",
"\\",
"Event",
"\\",
"ServerCapabilities",
"$",
"event",
")",
"{",
"$",
"module",
"=",
"$",
"event",
"->",
"getMod... | Handles the "ServerCapabilities" event.
\param Erebot::Interfaces::EventHandler $handler
The event handler responsible for calling
this method.
\param Erebot::Event::ServerCapabilities $event
The "ServerCapabilities" event to process. | [
"Handles",
"the",
"ServerCapabilities",
"event",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcConnection.php#L856-L873 |
31,534 | Erebot/Erebot | src/IrcConnection.php | IrcConnection.handleConnect | public function handleConnect(
\Erebot\Interfaces\EventHandler $handler,
\Erebot\Interfaces\Event\Connect $event
) {
$this->connected = true;
} | php | public function handleConnect(
\Erebot\Interfaces\EventHandler $handler,
\Erebot\Interfaces\Event\Connect $event
) {
$this->connected = true;
} | [
"public",
"function",
"handleConnect",
"(",
"\\",
"Erebot",
"\\",
"Interfaces",
"\\",
"EventHandler",
"$",
"handler",
",",
"\\",
"Erebot",
"\\",
"Interfaces",
"\\",
"Event",
"\\",
"Connect",
"$",
"event",
")",
"{",
"$",
"this",
"->",
"connected",
"=",
"tru... | Handles the "Connect" event.
\param Erebot::Interfaces::EventHandler $handler
The event handler responsible for calling
this method.
\param Erebot::Interfaces::Event::Connect $event
The "Connect" event to process. | [
"Handles",
"the",
"Connect",
"event",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcConnection.php#L885-L890 |
31,535 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php | TShopCategoryTree.LoadChildTreeExecute | protected function LoadChildTreeExecute($sChildCategoryId)
{
$sSelect = $this->GetQuery($sChildCategoryId);
$oChildCategoryList = TdbShopCategoryList::GetList($sSelect);
if ($oChildCategoryList->Length() > 1) {
$this->oChildCategoryTreeList = new TIterator();
}
wh... | php | protected function LoadChildTreeExecute($sChildCategoryId)
{
$sSelect = $this->GetQuery($sChildCategoryId);
$oChildCategoryList = TdbShopCategoryList::GetList($sSelect);
if ($oChildCategoryList->Length() > 1) {
$this->oChildCategoryTreeList = new TIterator();
}
wh... | [
"protected",
"function",
"LoadChildTreeExecute",
"(",
"$",
"sChildCategoryId",
")",
"{",
"$",
"sSelect",
"=",
"$",
"this",
"->",
"GetQuery",
"(",
"$",
"sChildCategoryId",
")",
";",
"$",
"oChildCategoryList",
"=",
"TdbShopCategoryList",
"::",
"GetList",
"(",
"$",... | Loads Category tree from given master category id.
@param $sChildCategoryId | [
"Loads",
"Category",
"tree",
"from",
"given",
"master",
"category",
"id",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php#L81-L106 |
31,536 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php | TShopCategoryTree.GetQuery | protected function GetQuery($sChildCategoryId)
{
$sSelect = "SELECT `shop_category`.*
FROM `shop_category`
WHERE `shop_category`.`shop_category_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($sChildCategoryId)."'
OR `shop_category`.`id` = '".MySql... | php | protected function GetQuery($sChildCategoryId)
{
$sSelect = "SELECT `shop_category`.*
FROM `shop_category`
WHERE `shop_category`.`shop_category_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($sChildCategoryId)."'
OR `shop_category`.`id` = '".MySql... | [
"protected",
"function",
"GetQuery",
"(",
"$",
"sChildCategoryId",
")",
"{",
"$",
"sSelect",
"=",
"\"SELECT `shop_category`.*\n FROM `shop_category`\n WHERE `shop_category`.`shop_category_id` = '\"",
".",
"MySqlLegacySupport",
"::",
"getInstance",
... | Returns query to get all child categories for given category id.
If given category id is empty then returns query to get master categories.
@param $sChildCategoryId
@return string | [
"Returns",
"query",
"to",
"get",
"all",
"child",
"categories",
"for",
"given",
"category",
"id",
".",
"If",
"given",
"category",
"id",
"is",
"empty",
"then",
"returns",
"query",
"to",
"get",
"master",
"categories",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php#L116-L125 |
31,537 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php | TShopCategoryTree.ResetCounter | public function ResetCounter()
{
$this->iAllItemCount = 0;
$this->iItemCount = 0;
if (!is_null($this->oChildCategoryTreeList)) {
$this->oChildCategoryTreeList->GoToStart();
while ($oChildCategoryTree = $this->oChildCategoryTreeList->Next()) {
$oChildCa... | php | public function ResetCounter()
{
$this->iAllItemCount = 0;
$this->iItemCount = 0;
if (!is_null($this->oChildCategoryTreeList)) {
$this->oChildCategoryTreeList->GoToStart();
while ($oChildCategoryTree = $this->oChildCategoryTreeList->Next()) {
$oChildCa... | [
"public",
"function",
"ResetCounter",
"(",
")",
"{",
"$",
"this",
"->",
"iAllItemCount",
"=",
"0",
";",
"$",
"this",
"->",
"iItemCount",
"=",
"0",
";",
"if",
"(",
"!",
"is_null",
"(",
"$",
"this",
"->",
"oChildCategoryTreeList",
")",
")",
"{",
"$",
"... | Resets all item count in all category trees. | [
"Resets",
"all",
"item",
"count",
"in",
"all",
"category",
"trees",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php#L130-L140 |
31,538 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php | TShopCategoryTree.Render | public function Render($sListFilterItemId = false, $bHideEmptyCategories = false, $bShowArticleCount = false, $iLevelCount = 1)
{
$sHtml = '';
$sCategoryNameHtml = '';
if (!is_null($this->oRealCategory)) {
$sCategoryNameHtml = $this->RenderCategoryName($sListFilterItemId, $bShowA... | php | public function Render($sListFilterItemId = false, $bHideEmptyCategories = false, $bShowArticleCount = false, $iLevelCount = 1)
{
$sHtml = '';
$sCategoryNameHtml = '';
if (!is_null($this->oRealCategory)) {
$sCategoryNameHtml = $this->RenderCategoryName($sListFilterItemId, $bShowA... | [
"public",
"function",
"Render",
"(",
"$",
"sListFilterItemId",
"=",
"false",
",",
"$",
"bHideEmptyCategories",
"=",
"false",
",",
"$",
"bShowArticleCount",
"=",
"false",
",",
"$",
"iLevelCount",
"=",
"1",
")",
"{",
"$",
"sHtml",
"=",
"''",
";",
"$",
"sCa... | Renders the category tree.
Function not uses external views. Html was rendered in class for better performance.
If you want to change something on the html overwrite one of the render functions.
@param bool $sListFilterItemId
@param bool $bHideEmptyCategories
@param bool $bShowArticleCount
@param int $iLevelCount
@r... | [
"Renders",
"the",
"category",
"tree",
".",
"Function",
"not",
"uses",
"external",
"views",
".",
"Html",
"was",
"rendered",
"in",
"class",
"for",
"better",
"performance",
".",
"If",
"you",
"want",
"to",
"change",
"something",
"on",
"the",
"html",
"overwrite",... | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php#L154-L186 |
31,539 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php | TShopCategoryTree.RenderChildCategories | public function RenderChildCategories($sListFilterItemId = false, $bHideEmptyCategories = false, $bShowArticleCount = false, $iLevelCount = 1)
{
$sHtml = '';
if (!is_null($this->oChildCategoryTreeList)) {
$this->oChildCategoryTreeList->GoToStart();
while ($oChildCategoryTree ... | php | public function RenderChildCategories($sListFilterItemId = false, $bHideEmptyCategories = false, $bShowArticleCount = false, $iLevelCount = 1)
{
$sHtml = '';
if (!is_null($this->oChildCategoryTreeList)) {
$this->oChildCategoryTreeList->GoToStart();
while ($oChildCategoryTree ... | [
"public",
"function",
"RenderChildCategories",
"(",
"$",
"sListFilterItemId",
"=",
"false",
",",
"$",
"bHideEmptyCategories",
"=",
"false",
",",
"$",
"bShowArticleCount",
"=",
"false",
",",
"$",
"iLevelCount",
"=",
"1",
")",
"{",
"$",
"sHtml",
"=",
"''",
";"... | Renders list of child categories recursively.
@param bool $sListFilterItemId
@param bool $bHideEmptyCategories
@param bool $bShowArticleCount
@param int $iLevelCount
@return string | [
"Renders",
"list",
"of",
"child",
"categories",
"recursively",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php#L198-L209 |
31,540 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php | TShopCategoryTree.RenderCategoryName | protected function RenderCategoryName($sListFilterItemId = false, $bShowArticleCount = false, $iLevelCount = 1)
{
$aClass = array('CategoryName');
if ($this->bIsActive) {
$aClass[] = 'active';
$aClass[] = 'expanded';
}
$sHtml = '<a class="'.implode(' ', $aClas... | php | protected function RenderCategoryName($sListFilterItemId = false, $bShowArticleCount = false, $iLevelCount = 1)
{
$aClass = array('CategoryName');
if ($this->bIsActive) {
$aClass[] = 'active';
$aClass[] = 'expanded';
}
$sHtml = '<a class="'.implode(' ', $aClas... | [
"protected",
"function",
"RenderCategoryName",
"(",
"$",
"sListFilterItemId",
"=",
"false",
",",
"$",
"bShowArticleCount",
"=",
"false",
",",
"$",
"iLevelCount",
"=",
"1",
")",
"{",
"$",
"aClass",
"=",
"array",
"(",
"'CategoryName'",
")",
";",
"if",
"(",
"... | Renders the category name and item count.
@param bool $sListFilterItemId
@param bool $bShowArticleCount
@param int $iLevelCount
@return string | [
"Renders",
"the",
"category",
"name",
"and",
"item",
"count",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php#L220-L235 |
31,541 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php | TShopCategoryTree.GetCategoryURL | protected function GetCategoryURL($sListFilterItemId = false)
{
$sURL = '';
if (!is_null($this->oRealCategory)) {
if ($sListFilterItemId) {
$sURL = $this->GetAddFilterURL($sListFilterItemId);
} else {
$sURL = $this->oRealCategory->GetLink();
... | php | protected function GetCategoryURL($sListFilterItemId = false)
{
$sURL = '';
if (!is_null($this->oRealCategory)) {
if ($sListFilterItemId) {
$sURL = $this->GetAddFilterURL($sListFilterItemId);
} else {
$sURL = $this->oRealCategory->GetLink();
... | [
"protected",
"function",
"GetCategoryURL",
"(",
"$",
"sListFilterItemId",
"=",
"false",
")",
"{",
"$",
"sURL",
"=",
"''",
";",
"if",
"(",
"!",
"is_null",
"(",
"$",
"this",
"->",
"oRealCategory",
")",
")",
"{",
"if",
"(",
"$",
"sListFilterItemId",
")",
... | Returns the URL of the category.
If tree was used as a filter function returns url to filter for the category.
If tree was used as normal category tree then function returns link to category detail page.
@param bool $sListFilterItemId
@return string | [
"Returns",
"the",
"URL",
"of",
"the",
"category",
".",
"If",
"tree",
"was",
"used",
"as",
"a",
"filter",
"function",
"returns",
"url",
"to",
"filter",
"for",
"the",
"category",
".",
"If",
"tree",
"was",
"used",
"as",
"normal",
"category",
"tree",
"then",... | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php#L256-L268 |
31,542 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php | TShopCategoryTree.GetAddFilterURL | public function GetAddFilterURL($sListFilterItemId)
{
$oActiveListFilter = TdbPkgShopListfilter::GetActiveInstance();
$aURLData = $oActiveListFilter->GetCurrentFilterAsArray();
$aURLData = $this->ClearOtherCategoryTreeFilter($aURLData, $sListFilterItemId);
$aURLData[TdbPkgShopListfil... | php | public function GetAddFilterURL($sListFilterItemId)
{
$oActiveListFilter = TdbPkgShopListfilter::GetActiveInstance();
$aURLData = $oActiveListFilter->GetCurrentFilterAsArray();
$aURLData = $this->ClearOtherCategoryTreeFilter($aURLData, $sListFilterItemId);
$aURLData[TdbPkgShopListfil... | [
"public",
"function",
"GetAddFilterURL",
"(",
"$",
"sListFilterItemId",
")",
"{",
"$",
"oActiveListFilter",
"=",
"TdbPkgShopListfilter",
"::",
"GetActiveInstance",
"(",
")",
";",
"$",
"aURLData",
"=",
"$",
"oActiveListFilter",
"->",
"GetCurrentFilterAsArray",
"(",
"... | return url that sets the filter to the current category.
@param string $sValue | [
"return",
"url",
"that",
"sets",
"the",
"filter",
"to",
"the",
"current",
"category",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php#L275-L284 |
31,543 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php | TShopCategoryTree.ClearOtherCategoryTreeFilter | protected function ClearOtherCategoryTreeFilter($aURLData, $sListFilterItemId)
{
if (is_array($aURLData) && array_key_exists(TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA, $aURLData) && is_array($aURLData[TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA]) && array_key_exists($sListFilterItemId, $aU... | php | protected function ClearOtherCategoryTreeFilter($aURLData, $sListFilterItemId)
{
if (is_array($aURLData) && array_key_exists(TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA, $aURLData) && is_array($aURLData[TdbPkgShopListfilterItem::URL_PARAMETER_FILTER_DATA]) && array_key_exists($sListFilterItemId, $aU... | [
"protected",
"function",
"ClearOtherCategoryTreeFilter",
"(",
"$",
"aURLData",
",",
"$",
"sListFilterItemId",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"aURLData",
")",
"&&",
"array_key_exists",
"(",
"TdbPkgShopListfilterItem",
"::",
"URL_PARAMETER_FILTER_DATA",
",",... | Clear active category filter for the filter url.
You can filter onyl for one category.
@param $aURLData
@param $sListFilterItemId
@return array | [
"Clear",
"active",
"category",
"filter",
"for",
"the",
"filter",
"url",
".",
"You",
"can",
"filter",
"onyl",
"for",
"one",
"category",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php#L295-L303 |
31,544 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php | TShopCategoryTree.AddItemCount | public function AddItemCount($sCategoryId, $iArticleCount)
{
$bSet = false;
if (array_key_exists($sCategoryId, $this->aContainingChildCategories)) {
$this->iAllItemCount = $this->iAllItemCount + $iArticleCount;
if (!is_null($this->oChildCategoryTreeList)) {
$t... | php | public function AddItemCount($sCategoryId, $iArticleCount)
{
$bSet = false;
if (array_key_exists($sCategoryId, $this->aContainingChildCategories)) {
$this->iAllItemCount = $this->iAllItemCount + $iArticleCount;
if (!is_null($this->oChildCategoryTreeList)) {
$t... | [
"public",
"function",
"AddItemCount",
"(",
"$",
"sCategoryId",
",",
"$",
"iArticleCount",
")",
"{",
"$",
"bSet",
"=",
"false",
";",
"if",
"(",
"array_key_exists",
"(",
"$",
"sCategoryId",
",",
"$",
"this",
"->",
"aContainingChildCategories",
")",
")",
"{",
... | Add item count to category in tree and add it to all parent categories.
@param $sCategoryId
@param $iArticleCount
@return bool | [
"Add",
"item",
"count",
"to",
"category",
"in",
"tree",
"and",
"add",
"it",
"to",
"all",
"parent",
"categories",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php#L313-L334 |
31,545 | chameleon-system/chameleon-shop | src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php | TShopCategoryTree.MarkActiveCategories | public function MarkActiveCategories($aActiveCategories)
{
$this->bIsActive = false;
if (in_array($this->id, $aActiveCategories)) {
$this->bIsActive = true;
} else {
if (!is_null($this->oChildCategoryTreeList)) {
$this->oChildCategoryTreeList->GoToStar... | php | public function MarkActiveCategories($aActiveCategories)
{
$this->bIsActive = false;
if (in_array($this->id, $aActiveCategories)) {
$this->bIsActive = true;
} else {
if (!is_null($this->oChildCategoryTreeList)) {
$this->oChildCategoryTreeList->GoToStar... | [
"public",
"function",
"MarkActiveCategories",
"(",
"$",
"aActiveCategories",
")",
"{",
"$",
"this",
"->",
"bIsActive",
"=",
"false",
";",
"if",
"(",
"in_array",
"(",
"$",
"this",
"->",
"id",
",",
"$",
"aActiveCategories",
")",
")",
"{",
"$",
"this",
"->"... | mark categories and their parents as active if they are in the array.
@param $aActiveCategories
@return bool | [
"mark",
"categories",
"and",
"their",
"parents",
"as",
"active",
"if",
"they",
"are",
"in",
"the",
"array",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/TShopCategoryTree/TShopCategoryTree.class.php#L343-L359 |
31,546 | edmondscommerce/doctrine-static-meta | src/Entity/Factory/EntityFactory.php | EntityFactory.createFactoryForEntity | public function createFactoryForEntity(string $entityFqn)
{
$this->assertEntityManagerSet();
$factoryFqn = $this->namespaceHelper->getFactoryFqnFromEntityFqn($entityFqn);
return new $factoryFqn($this, $this->entityManager);
} | php | public function createFactoryForEntity(string $entityFqn)
{
$this->assertEntityManagerSet();
$factoryFqn = $this->namespaceHelper->getFactoryFqnFromEntityFqn($entityFqn);
return new $factoryFqn($this, $this->entityManager);
} | [
"public",
"function",
"createFactoryForEntity",
"(",
"string",
"$",
"entityFqn",
")",
"{",
"$",
"this",
"->",
"assertEntityManagerSet",
"(",
")",
";",
"$",
"factoryFqn",
"=",
"$",
"this",
"->",
"namespaceHelper",
"->",
"getFactoryFqnFromEntityFqn",
"(",
"$",
"en... | Get an instance of the specific Entity Factory for a specified Entity
Not type hinting the return because the whole point of this is to have an entity specific method, which we
can't hint for
@param string $entityFqn
@return mixed | [
"Get",
"an",
"instance",
"of",
"the",
"specific",
"Entity",
"Factory",
"for",
"a",
"specified",
"Entity"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Factory/EntityFactory.php#L80-L86 |
31,547 | edmondscommerce/doctrine-static-meta | src/Entity/Factory/EntityFactory.php | EntityFactory.create | public function create(string $entityFqn, DataTransferObjectInterface $dto = null)
{
$this->assertEntityManagerSet();
return $this->createEntity($entityFqn, $dto, true);
} | php | public function create(string $entityFqn, DataTransferObjectInterface $dto = null)
{
$this->assertEntityManagerSet();
return $this->createEntity($entityFqn, $dto, true);
} | [
"public",
"function",
"create",
"(",
"string",
"$",
"entityFqn",
",",
"DataTransferObjectInterface",
"$",
"dto",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"assertEntityManagerSet",
"(",
")",
";",
"return",
"$",
"this",
"->",
"createEntity",
"(",
"$",
"entity... | Build a new entity, optionally pass in a DTO to provide the data that should be used
Optionally pass in an array of property=>value
@param string $entityFqn
@param DataTransferObjectInterface|null $dto
@return mixed
@throws MultipleValidationException
@throws ValidationException | [
"Build",
"a",
"new",
"entity",
"optionally",
"pass",
"in",
"a",
"DTO",
"to",
"provide",
"the",
"data",
"that",
"should",
"be",
"used"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Factory/EntityFactory.php#L115-L120 |
31,548 | edmondscommerce/doctrine-static-meta | src/Entity/Factory/EntityFactory.php | EntityFactory.getNewInstance | private function getNewInstance(string $entityFqn, $id): EntityInterface
{
if (isset(self::$created[$entityFqn][(string)$id])) {
throw new \RuntimeException('Trying to get a new instance when one has already been created for this ID');
}
$reflection = $this->getDoctrineStaticMeta... | php | private function getNewInstance(string $entityFqn, $id): EntityInterface
{
if (isset(self::$created[$entityFqn][(string)$id])) {
throw new \RuntimeException('Trying to get a new instance when one has already been created for this ID');
}
$reflection = $this->getDoctrineStaticMeta... | [
"private",
"function",
"getNewInstance",
"(",
"string",
"$",
"entityFqn",
",",
"$",
"id",
")",
":",
"EntityInterface",
"{",
"if",
"(",
"isset",
"(",
"self",
"::",
"$",
"created",
"[",
"$",
"entityFqn",
"]",
"[",
"(",
"string",
")",
"$",
"id",
"]",
")... | Build a new instance, bypassing PPP protections so that we can call private methods and set the private
transaction property
@param string $entityFqn
@param mixed $id
@return EntityInterface | [
"Build",
"a",
"new",
"instance",
"bypassing",
"PPP",
"protections",
"so",
"that",
"we",
"can",
"call",
"private",
"methods",
"and",
"set",
"the",
"private",
"transaction",
"property"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Factory/EntityFactory.php#L196-L225 |
31,549 | edmondscommerce/doctrine-static-meta | src/Entity/Factory/EntityFactory.php | EntityFactory.initialiseEntity | public function initialiseEntity(EntityInterface $entity): void
{
$entity->ensureMetaDataIsSet($this->entityManager);
$this->addListenerToEntityIfRequired($entity);
$this->entityDependencyInjector->injectEntityDependencies($entity);
$debugInitMethod = $entity::getDoctrineStaticMeta()... | php | public function initialiseEntity(EntityInterface $entity): void
{
$entity->ensureMetaDataIsSet($this->entityManager);
$this->addListenerToEntityIfRequired($entity);
$this->entityDependencyInjector->injectEntityDependencies($entity);
$debugInitMethod = $entity::getDoctrineStaticMeta()... | [
"public",
"function",
"initialiseEntity",
"(",
"EntityInterface",
"$",
"entity",
")",
":",
"void",
"{",
"$",
"entity",
"->",
"ensureMetaDataIsSet",
"(",
"$",
"this",
"->",
"entityManager",
")",
";",
"$",
"this",
"->",
"addListenerToEntityIfRequired",
"(",
"$",
... | Take an already instantiated Entity and perform the final initialisation steps
@param EntityInterface $entity | [
"Take",
"an",
"already",
"instantiated",
"Entity",
"and",
"perform",
"the",
"final",
"initialisation",
"steps"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Factory/EntityFactory.php#L237-L247 |
31,550 | edmondscommerce/doctrine-static-meta | src/Entity/Factory/EntityFactory.php | EntityFactory.addListenerToEntityIfRequired | private function addListenerToEntityIfRequired(EntityInterface $entity): void
{
if (!$entity instanceof NotifyPropertyChanged) {
return;
}
$listener = $this->entityManager->getUnitOfWork();
$entity->addPropertyChangedListener($listener);
} | php | private function addListenerToEntityIfRequired(EntityInterface $entity): void
{
if (!$entity instanceof NotifyPropertyChanged) {
return;
}
$listener = $this->entityManager->getUnitOfWork();
$entity->addPropertyChangedListener($listener);
} | [
"private",
"function",
"addListenerToEntityIfRequired",
"(",
"EntityInterface",
"$",
"entity",
")",
":",
"void",
"{",
"if",
"(",
"!",
"$",
"entity",
"instanceof",
"NotifyPropertyChanged",
")",
"{",
"return",
";",
"}",
"$",
"listener",
"=",
"$",
"this",
"->",
... | Generally DSM Entities are using the Notify change tracking policy.
This ensures that they are fully set up for that
@param EntityInterface $entity | [
"Generally",
"DSM",
"Entities",
"are",
"using",
"the",
"Notify",
"change",
"tracking",
"policy",
".",
"This",
"ensures",
"that",
"they",
"are",
"fully",
"set",
"up",
"for",
"that"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Factory/EntityFactory.php#L255-L262 |
31,551 | edmondscommerce/doctrine-static-meta | src/Entity/Factory/EntityFactory.php | EntityFactory.convertCollectionOfDtosToEntities | private function convertCollectionOfDtosToEntities(Collection $collection)
{
if (0 === $collection->count()) {
return;
}
list($dtoFqn, $collectionEntityFqn) = $this->deriveDtoAndEntityFqnFromCollection($collection);
foreach ($collection as $key => $dto) {
if ... | php | private function convertCollectionOfDtosToEntities(Collection $collection)
{
if (0 === $collection->count()) {
return;
}
list($dtoFqn, $collectionEntityFqn) = $this->deriveDtoAndEntityFqnFromCollection($collection);
foreach ($collection as $key => $dto) {
if ... | [
"private",
"function",
"convertCollectionOfDtosToEntities",
"(",
"Collection",
"$",
"collection",
")",
"{",
"if",
"(",
"0",
"===",
"$",
"collection",
"->",
"count",
"(",
")",
")",
"{",
"return",
";",
"}",
"list",
"(",
"$",
"dtoFqn",
",",
"$",
"collectionEn... | This will take an ArrayCollection of DTO objects and replace them with the Entities
@param Collection $collection
@throws MultipleValidationException
@throws ValidationException | [
"This",
"will",
"take",
"an",
"ArrayCollection",
"of",
"DTO",
"objects",
"and",
"replace",
"them",
"with",
"the",
"Entities"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Factory/EntityFactory.php#L418-L444 |
31,552 | edmondscommerce/doctrine-static-meta | src/Entity/Factory/EntityFactory.php | EntityFactory.deriveDtoAndEntityFqnFromCollection | private function deriveDtoAndEntityFqnFromCollection(Collection $collection): array
{
if (0 === $collection->count()) {
throw new \RuntimeException('Collection is empty');
}
$dtoFqn = null;
$collectionEntityFqn = null;
foreach ($collection as $dto) {
... | php | private function deriveDtoAndEntityFqnFromCollection(Collection $collection): array
{
if (0 === $collection->count()) {
throw new \RuntimeException('Collection is empty');
}
$dtoFqn = null;
$collectionEntityFqn = null;
foreach ($collection as $dto) {
... | [
"private",
"function",
"deriveDtoAndEntityFqnFromCollection",
"(",
"Collection",
"$",
"collection",
")",
":",
"array",
"{",
"if",
"(",
"0",
"===",
"$",
"collection",
"->",
"count",
"(",
")",
")",
"{",
"throw",
"new",
"\\",
"RuntimeException",
"(",
"'Collection... | Loop through a collection and determine the DTO and Entity Fqn it contains
@param Collection $collection
@return array
@SuppressWarnings(PHPMD.NPathComplexity)
@SuppressWarnings(PHPMD.CyclomaticComplexity) | [
"Loop",
"through",
"a",
"collection",
"and",
"determine",
"the",
"DTO",
"and",
"Entity",
"Fqn",
"it",
"contains"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Factory/EntityFactory.php#L455-L496 |
31,553 | edmondscommerce/doctrine-static-meta | src/Entity/Factory/EntityFactory.php | EntityFactory.stopTransaction | private function stopTransaction(): void
{
$validationExceptions = [];
foreach (self::$created as $entities) {
foreach ($entities as $entity) {
$transactionProperty =
$entity::getDoctrineStaticMeta()
->getReflectionClass()
... | php | private function stopTransaction(): void
{
$validationExceptions = [];
foreach (self::$created as $entities) {
foreach ($entities as $entity) {
$transactionProperty =
$entity::getDoctrineStaticMeta()
->getReflectionClass()
... | [
"private",
"function",
"stopTransaction",
"(",
")",
":",
"void",
"{",
"$",
"validationExceptions",
"=",
"[",
"]",
";",
"foreach",
"(",
"self",
"::",
"$",
"created",
"as",
"$",
"entities",
")",
"{",
"foreach",
"(",
"$",
"entities",
"as",
"$",
"entity",
... | Loop through all created entities and reset the transaction running property to false,
then remove the list of created entities
@throws MultipleValidationException | [
"Loop",
"through",
"all",
"created",
"entities",
"and",
"reset",
"the",
"transaction",
"running",
"property",
"to",
"false",
"then",
"remove",
"the",
"list",
"of",
"created",
"entities"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/Entity/Factory/EntityFactory.php#L504-L528 |
31,554 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Model/IdList.php | OffAmazonPaymentsNotifications_Model_IdList.setId | public function setId($Id)
{
if (!$this->_isNumericArray($Id)) {
$Id = array ($Id);
}
$this->fields['Id']['FieldValue'] = $Id;
return $this;
} | php | public function setId($Id)
{
if (!$this->_isNumericArray($Id)) {
$Id = array ($Id);
}
$this->fields['Id']['FieldValue'] = $Id;
return $this;
} | [
"public",
"function",
"setId",
"(",
"$",
"Id",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_isNumericArray",
"(",
"$",
"Id",
")",
")",
"{",
"$",
"Id",
"=",
"array",
"(",
"$",
"Id",
")",
";",
"}",
"$",
"this",
"->",
"fields",
"[",
"'Id'",
"]... | Sets the value of the Id.
@param string|array $Id string or array of string Ids
@return this instance | [
"Sets",
"the",
"value",
"of",
"the",
"Id",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Model/IdList.php#L70-L77 |
31,555 | chameleon-system/chameleon-shop | src/ShopRatingServiceBundle/objects/db/TPkgShopRatingServiceRating.class.php | TPkgShopRatingServiceRating.Render | public function Render($sViewName = 'RatingServiceRating_standard', $sViewSubType = 'pkgShopRatingService/views', $sViewType = 'Customer', $sSpotName = null, $aCallTimeVars = array())
{
$oView = new TViewParser();
$oRatingService = $this->GetFieldPkgShopRatingService();
$oView->AddVar('oRat... | php | public function Render($sViewName = 'RatingServiceRating_standard', $sViewSubType = 'pkgShopRatingService/views', $sViewType = 'Customer', $sSpotName = null, $aCallTimeVars = array())
{
$oView = new TViewParser();
$oRatingService = $this->GetFieldPkgShopRatingService();
$oView->AddVar('oRat... | [
"public",
"function",
"Render",
"(",
"$",
"sViewName",
"=",
"'RatingServiceRating_standard'",
",",
"$",
"sViewSubType",
"=",
"'pkgShopRatingService/views'",
",",
"$",
"sViewType",
"=",
"'Customer'",
",",
"$",
"sSpotName",
"=",
"null",
",",
"$",
"aCallTimeVars",
"=... | Render object.
@param string $sViewName
@param string $sViewSubType
@param string $sViewType
@param null $sSpotName
@param array $aCallTimeVars
@return string | [
"Render",
"object",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopRatingServiceBundle/objects/db/TPkgShopRatingServiceRating.class.php#L25-L43 |
31,556 | PGB-LIV/php-ms | src/Utility/Fragment/FragmentFactory.php | FragmentFactory.getMethodFragments | public static function getMethodFragments($method, ModifiableSequenceInterface $sequence)
{
$fragmentTypes = array();
switch (strtoupper($method)) {
case 'CID':
case 'HCD':
$fragmentTypes['B'] = new BFragment($sequence);
$fragmentTypes... | php | public static function getMethodFragments($method, ModifiableSequenceInterface $sequence)
{
$fragmentTypes = array();
switch (strtoupper($method)) {
case 'CID':
case 'HCD':
$fragmentTypes['B'] = new BFragment($sequence);
$fragmentTypes... | [
"public",
"static",
"function",
"getMethodFragments",
"(",
"$",
"method",
",",
"ModifiableSequenceInterface",
"$",
"sequence",
")",
"{",
"$",
"fragmentTypes",
"=",
"array",
"(",
")",
";",
"switch",
"(",
"strtoupper",
"(",
"$",
"method",
")",
")",
"{",
"case"... | For a specified method, returns the possible fragmentat ion types that may be produced
@param string $method
The method to get fragment types for
@param ModifiableSequenceInterface $sequence
The peptide or protein sequence object to get fragment types for
@return FragmentInterface[] | [
"For",
"a",
"specified",
"method",
"returns",
"the",
"possible",
"fragmentat",
"ion",
"types",
"that",
"may",
"be",
"produced"
] | 091751eb12512f4bc6ada07bda745ce49331e24f | https://github.com/PGB-LIV/php-ms/blob/091751eb12512f4bc6ada07bda745ce49331e24f/src/Utility/Fragment/FragmentFactory.php#L59-L95 |
31,557 | chameleon-system/chameleon-shop | src/ShopArticlePreorderBundle/pkgShop/objects/db/TPkgShopArticlePreorder_ShopArticle.class.php | TPkgShopArticlePreorder_ShopArticle.StockWasUpdatedHook | protected function StockWasUpdatedHook($dOldValue, $dNewValue)
{
$bReturn = parent::StockWasUpdatedHook($dOldValue, $dNewValue);
if ($dOldValue < 1 && $dNewValue > 0) {
$oShopArticlePreorderList = &TdbPkgShopArticlePreorderList::GetListForShopArticleId($this->id);
while ($oSh... | php | protected function StockWasUpdatedHook($dOldValue, $dNewValue)
{
$bReturn = parent::StockWasUpdatedHook($dOldValue, $dNewValue);
if ($dOldValue < 1 && $dNewValue > 0) {
$oShopArticlePreorderList = &TdbPkgShopArticlePreorderList::GetListForShopArticleId($this->id);
while ($oSh... | [
"protected",
"function",
"StockWasUpdatedHook",
"(",
"$",
"dOldValue",
",",
"$",
"dNewValue",
")",
"{",
"$",
"bReturn",
"=",
"parent",
"::",
"StockWasUpdatedHook",
"(",
"$",
"dOldValue",
",",
"$",
"dNewValue",
")",
";",
"if",
"(",
"$",
"dOldValue",
"<",
"1... | hook called when the stock value of the article changed.
@param float $dOldValue
@param float $dNewValue
@return bool | [
"hook",
"called",
"when",
"the",
"stock",
"value",
"of",
"the",
"article",
"changed",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticlePreorderBundle/pkgShop/objects/db/TPkgShopArticlePreorder_ShopArticle.class.php#L22-L33 |
31,558 | Erebot/Erebot | src/IrcParser.php | IrcParser.stripCodes | public static function stripCodes($text, $strip = self::STRIP_ALL)
{
if (!is_int($strip)) {
throw new \Erebot\InvalidValueException("Invalid stripping flags");
}
if ($strip & self::STRIP_BOLD) {
$text = str_replace("\002", '', $text);
}
if ($strip & ... | php | public static function stripCodes($text, $strip = self::STRIP_ALL)
{
if (!is_int($strip)) {
throw new \Erebot\InvalidValueException("Invalid stripping flags");
}
if ($strip & self::STRIP_BOLD) {
$text = str_replace("\002", '', $text);
}
if ($strip & ... | [
"public",
"static",
"function",
"stripCodes",
"(",
"$",
"text",
",",
"$",
"strip",
"=",
"self",
"::",
"STRIP_ALL",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"strip",
")",
")",
"{",
"throw",
"new",
"\\",
"Erebot",
"\\",
"InvalidValueException",
"(",... | Strips IRC styles from a text.
\param string $text
The text from which styles must be stripped.
\param int $strip
A bitwise OR of the codes of the styles we want to strip.
The default is to strip all forms of styles from the text.
See also the Erebot::IrcParser::STRIP_* constants.
\retval string
The text with all th... | [
"Strips",
"IRC",
"styles",
"from",
"a",
"text",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcParser.php#L88-L115 |
31,559 | Erebot/Erebot | src/IrcParser.php | IrcParser.ctcpUnquote | protected static function ctcpUnquote($msg)
{
// CTCP-level unquoting
$quoting = array(
"\\a" => "\001",
"\\\\" => "\\",
"\\" => "", // Ignore quoting character
// for invalid sequences.
);
$msg = strtr($msg, $quo... | php | protected static function ctcpUnquote($msg)
{
// CTCP-level unquoting
$quoting = array(
"\\a" => "\001",
"\\\\" => "\\",
"\\" => "", // Ignore quoting character
// for invalid sequences.
);
$msg = strtr($msg, $quo... | [
"protected",
"static",
"function",
"ctcpUnquote",
"(",
"$",
"msg",
")",
"{",
"// CTCP-level unquoting",
"$",
"quoting",
"=",
"array",
"(",
"\"\\\\a\"",
"=>",
"\"\\001\"",
",",
"\"\\\\\\\\\"",
"=>",
"\"\\\\\"",
",",
"\"\\\\\"",
"=>",
"\"\"",
",",
"// Ignore quoti... | Unquotes a CTCP message.
\param string $msg
Some CTCP message to unquote.
\retval string
The message, with CTCP quoting removed.
\see
http://www.irchelp.org/irchelp/rfc/ctcpspec.html | [
"Unquotes",
"a",
"CTCP",
"message",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcParser.php#L160-L182 |
31,560 | Erebot/Erebot | src/IrcParser.php | IrcParser.noticeOrPrivmsg | protected function noticeOrPrivmsg($origin, $msg, $mapping)
{
// :nick1!ident@host NOTICE <nick2/#chan> :Message
// :nick1!ident@host PRIVMSG <nick2/#chan> :Message
$target = $msg[0];
$msg = $msg[1];
$isChan = (int) $this->connection->isChannel($target);
$len = str... | php | protected function noticeOrPrivmsg($origin, $msg, $mapping)
{
// :nick1!ident@host NOTICE <nick2/#chan> :Message
// :nick1!ident@host PRIVMSG <nick2/#chan> :Message
$target = $msg[0];
$msg = $msg[1];
$isChan = (int) $this->connection->isChannel($target);
$len = str... | [
"protected",
"function",
"noticeOrPrivmsg",
"(",
"$",
"origin",
",",
"$",
"msg",
",",
"$",
"mapping",
")",
"{",
"// :nick1!ident@host NOTICE <nick2/#chan> :Message",
"// :nick1!ident@host PRIVMSG <nick2/#chan> :Message",
"$",
"target",
"=",
"$",
"msg",
"[",
"0",
"]",
... | Process a NOTICE or PRIVMSG message.
\param string $origin
Origin of the message to process.
\param Erebot::Interfaces::IrcTextWrapper $msg
The message to process, wrapped in
a special object that makes it easier
to analyze each token separately.
\param array $mapping
A mapping of types to a list of event names.
Eac... | [
"Process",
"a",
"NOTICE",
"or",
"PRIVMSG",
"message",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcParser.php#L347-L402 |
31,561 | Erebot/Erebot | src/IrcParser.php | IrcParser.handleINVITE | protected function handleINVITE($origin, $msg)
{
// :nick1!ident@host INVITE nick2 :#chan
return $this->connection->dispatch(
$this->makeEvent('!Invite', $msg[1], $origin, $msg[0])
);
} | php | protected function handleINVITE($origin, $msg)
{
// :nick1!ident@host INVITE nick2 :#chan
return $this->connection->dispatch(
$this->makeEvent('!Invite', $msg[1], $origin, $msg[0])
);
} | [
"protected",
"function",
"handleINVITE",
"(",
"$",
"origin",
",",
"$",
"msg",
")",
"{",
"// :nick1!ident@host INVITE nick2 :#chan",
"return",
"$",
"this",
"->",
"connection",
"->",
"dispatch",
"(",
"$",
"this",
"->",
"makeEvent",
"(",
"'!Invite'",
",",
"$",
"m... | Processes a message of type INVITE.
\param string $origin
Origin of the message to process.
\param Erebot::Interfaces::IrcTextWrapper $msg
The message to process, wrapped in
a special object that makes it easier
to analyze each token separately. | [
"Processes",
"a",
"message",
"of",
"type",
"INVITE",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcParser.php#L415-L421 |
31,562 | Erebot/Erebot | src/IrcParser.php | IrcParser.handleJOIN | protected function handleJOIN($origin, $msg)
{
// :nick1!ident@host JOIN :#chan
return $this->connection->dispatch(
$this->makeEvent('!Join', $msg[0], $origin)
);
} | php | protected function handleJOIN($origin, $msg)
{
// :nick1!ident@host JOIN :#chan
return $this->connection->dispatch(
$this->makeEvent('!Join', $msg[0], $origin)
);
} | [
"protected",
"function",
"handleJOIN",
"(",
"$",
"origin",
",",
"$",
"msg",
")",
"{",
"// :nick1!ident@host JOIN :#chan",
"return",
"$",
"this",
"->",
"connection",
"->",
"dispatch",
"(",
"$",
"this",
"->",
"makeEvent",
"(",
"'!Join'",
",",
"$",
"msg",
"[",
... | Processes a message of type JOIN.
\param string $origin
Origin of the message to process.
\param Erebot::Interfaces::IrcTextWrapper $msg
The message to process, wrapped in
a special object that makes it easier
to analyze each token separately. | [
"Processes",
"a",
"message",
"of",
"type",
"JOIN",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcParser.php#L434-L440 |
31,563 | Erebot/Erebot | src/IrcParser.php | IrcParser.handleKICK | protected function handleKICK($origin, $msg)
{
// :nick1!ident@host KICK #chan nick2 :Reason
return $this->connection->dispatch(
$this->makeEvent('!Kick', $msg[0], $origin, $msg[1], $msg[2])
);
} | php | protected function handleKICK($origin, $msg)
{
// :nick1!ident@host KICK #chan nick2 :Reason
return $this->connection->dispatch(
$this->makeEvent('!Kick', $msg[0], $origin, $msg[1], $msg[2])
);
} | [
"protected",
"function",
"handleKICK",
"(",
"$",
"origin",
",",
"$",
"msg",
")",
"{",
"// :nick1!ident@host KICK #chan nick2 :Reason",
"return",
"$",
"this",
"->",
"connection",
"->",
"dispatch",
"(",
"$",
"this",
"->",
"makeEvent",
"(",
"'!Kick'",
",",
"$",
"... | Processes a message of type KICK.
\param string $origin
Origin of the message to process.
\param Erebot::Interfaces::IrcTextWrapper $msg
The message to process, wrapped in
a special object that makes it easier
to analyze each token separately. | [
"Processes",
"a",
"message",
"of",
"type",
"KICK",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcParser.php#L453-L459 |
31,564 | Erebot/Erebot | src/IrcParser.php | IrcParser.handleNICK | protected function handleNICK($origin, $msg)
{
// :oldnick!ident@host NICK newnick
return $this->connection->dispatch(
$this->makeEvent('!Nick', $origin, $msg[0])
);
} | php | protected function handleNICK($origin, $msg)
{
// :oldnick!ident@host NICK newnick
return $this->connection->dispatch(
$this->makeEvent('!Nick', $origin, $msg[0])
);
} | [
"protected",
"function",
"handleNICK",
"(",
"$",
"origin",
",",
"$",
"msg",
")",
"{",
"// :oldnick!ident@host NICK newnick",
"return",
"$",
"this",
"->",
"connection",
"->",
"dispatch",
"(",
"$",
"this",
"->",
"makeEvent",
"(",
"'!Nick'",
",",
"$",
"origin",
... | Processes a message of type NICK.
\param string $origin
Origin of the message to process.
\param Erebot::Interfaces::IrcTextWrapper $msg
The message to process, wrapped in
a special object that makes it easier
to analyze each token separately. | [
"Processes",
"a",
"message",
"of",
"type",
"NICK",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcParser.php#L558-L564 |
31,565 | Erebot/Erebot | src/IrcParser.php | IrcParser.handlePART | protected function handlePART($origin, $msg)
{
// :nick1!ident@host PART #chan [reason]
return $this->connection->dispatch(
$this->makeEvent(
'!Part',
$msg[0],
$origin,
isset($msg[1]) ? $msg[1] : ''
)
);
... | php | protected function handlePART($origin, $msg)
{
// :nick1!ident@host PART #chan [reason]
return $this->connection->dispatch(
$this->makeEvent(
'!Part',
$msg[0],
$origin,
isset($msg[1]) ? $msg[1] : ''
)
);
... | [
"protected",
"function",
"handlePART",
"(",
"$",
"origin",
",",
"$",
"msg",
")",
"{",
"// :nick1!ident@host PART #chan [reason]",
"return",
"$",
"this",
"->",
"connection",
"->",
"dispatch",
"(",
"$",
"this",
"->",
"makeEvent",
"(",
"'!Part'",
",",
"$",
"msg",... | Processes a message of type PART.
\param string $origin
Origin of the message to process.
\param Erebot::Interfaces::IrcTextWrapper $msg
The message to process, wrapped in
a special object that makes it easier
to analyze each token separately. | [
"Processes",
"a",
"message",
"of",
"type",
"PART",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcParser.php#L600-L611 |
31,566 | Erebot/Erebot | src/IrcParser.php | IrcParser.handlePONG | protected function handlePONG($origin, $msg)
{
// :origin PONG origin target
return $this->connection->dispatch(
$this->makeEvent('!Pong', $origin, $msg[1])
);
} | php | protected function handlePONG($origin, $msg)
{
// :origin PONG origin target
return $this->connection->dispatch(
$this->makeEvent('!Pong', $origin, $msg[1])
);
} | [
"protected",
"function",
"handlePONG",
"(",
"$",
"origin",
",",
"$",
"msg",
")",
"{",
"// :origin PONG origin target",
"return",
"$",
"this",
"->",
"connection",
"->",
"dispatch",
"(",
"$",
"this",
"->",
"makeEvent",
"(",
"'!Pong'",
",",
"$",
"origin",
",",
... | Processes a message of type PONG.
\param string $origin
Origin of the message to process.
\param Erebot::Interfaces::IrcTextWrapper $msg
The message to process, wrapped in
a special object that makes it easier
to analyze each token separately. | [
"Processes",
"a",
"message",
"of",
"type",
"PONG",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcParser.php#L643-L649 |
31,567 | Erebot/Erebot | src/IrcParser.php | IrcParser.handleQUIT | protected function handleQUIT($origin, $msg)
{
// :nick1!ident@host QUIT :Reason
return $this->connection->dispatch(
$this->makeEvent('!Quit', $origin, $msg[0])
);
} | php | protected function handleQUIT($origin, $msg)
{
// :nick1!ident@host QUIT :Reason
return $this->connection->dispatch(
$this->makeEvent('!Quit', $origin, $msg[0])
);
} | [
"protected",
"function",
"handleQUIT",
"(",
"$",
"origin",
",",
"$",
"msg",
")",
"{",
"// :nick1!ident@host QUIT :Reason",
"return",
"$",
"this",
"->",
"connection",
"->",
"dispatch",
"(",
"$",
"this",
"->",
"makeEvent",
"(",
"'!Quit'",
",",
"$",
"origin",
"... | Processes a message of type QUIT.
\param string $origin
Origin of the message to process.
\param Erebot::Interfaces::IrcTextWrapper $msg
The message to process, wrapped in
a special object that makes it easier
to analyze each token separately. | [
"Processes",
"a",
"message",
"of",
"type",
"QUIT",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcParser.php#L685-L691 |
31,568 | Erebot/Erebot | src/IrcParser.php | IrcParser.handleTOPIC | protected function handleTOPIC($origin, $msg)
{
// :nick1!ident@host TOPIC #chan :New topic
return $this->connection->dispatch(
$this->makeEvent('!Topic', $msg[0], $origin, $msg[1])
);
} | php | protected function handleTOPIC($origin, $msg)
{
// :nick1!ident@host TOPIC #chan :New topic
return $this->connection->dispatch(
$this->makeEvent('!Topic', $msg[0], $origin, $msg[1])
);
} | [
"protected",
"function",
"handleTOPIC",
"(",
"$",
"origin",
",",
"$",
"msg",
")",
"{",
"// :nick1!ident@host TOPIC #chan :New topic",
"return",
"$",
"this",
"->",
"connection",
"->",
"dispatch",
"(",
"$",
"this",
"->",
"makeEvent",
"(",
"'!Topic'",
",",
"$",
"... | Processes a message of type TOPIC.
\param string $origin
Origin of the message to process.
\param Erebot::Interfaces::IrcTextWrapper $msg
The message to process, wrapped in
a special object that makes it easier
to analyze each token separately. | [
"Processes",
"a",
"message",
"of",
"type",
"TOPIC",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcParser.php#L704-L710 |
31,569 | Erebot/Erebot | src/IrcParser.php | IrcParser.handle255 | protected function handle255($origin, $msg)
{
// \Erebot\Interfaces\Numerics::RPL_LUSERME
/* We can't rely on RPL_WELCOME because we may need
* to detect the server's capabilities first.
* So, we delay detection of the connection for as
* long as we can (while retaining po... | php | protected function handle255($origin, $msg)
{
// \Erebot\Interfaces\Numerics::RPL_LUSERME
/* We can't rely on RPL_WELCOME because we may need
* to detect the server's capabilities first.
* So, we delay detection of the connection for as
* long as we can (while retaining po... | [
"protected",
"function",
"handle255",
"(",
"$",
"origin",
",",
"$",
"msg",
")",
"{",
"// \\Erebot\\Interfaces\\Numerics::RPL_LUSERME",
"/* We can't rely on RPL_WELCOME because we may need\n * to detect the server's capabilities first.\n * So, we delay detection of the connect... | Processes a message with numeric 255.
\param string $origin
Origin of the message to process.
\param Erebot::Interfaces::IrcTextWrapper $msg
The message to process, wrapped in
a special object that makes it easier
to analyze each token separately.
\TODO
Use a NumericEventHandler instead, even though it is less effec... | [
"Processes",
"a",
"message",
"with",
"numeric",
"255",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcParser.php#L726-L736 |
31,570 | Erebot/Erebot | src/IrcParser.php | IrcParser.watchList | protected function watchList($event, $msg)
{
// <bot> <nick> <ident> <host> <timestamp> :<msg>
unset($msg[0]);
$nick = $msg[0];
$ident = $msg[1];
$host = $msg[2];
$timestamp = intval($msg[3], 10);
$timestamp = new \DateTime('@'.$timestamp);
... | php | protected function watchList($event, $msg)
{
// <bot> <nick> <ident> <host> <timestamp> :<msg>
unset($msg[0]);
$nick = $msg[0];
$ident = $msg[1];
$host = $msg[2];
$timestamp = intval($msg[3], 10);
$timestamp = new \DateTime('@'.$timestamp);
... | [
"protected",
"function",
"watchList",
"(",
"$",
"event",
",",
"$",
"msg",
")",
"{",
"// <bot> <nick> <ident> <host> <timestamp> :<msg>",
"unset",
"(",
"$",
"msg",
"[",
"0",
"]",
")",
";",
"$",
"nick",
"=",
"$",
"msg",
"[",
"0",
"]",
";",
"$",
"ident",
... | Processes a message related to the WATCH list.
\param string $event
Interface name for the event to produce.
\param Erebot::Interfaces::IrcTextWrapper $msg
The message to process, wrapped in
a special object that makes it easier
to analyze each token separately. | [
"Processes",
"a",
"message",
"related",
"to",
"the",
"WATCH",
"list",
"."
] | 691fc3fa8bc6f07061ff2b3798fec76bc3a039aa | https://github.com/Erebot/Erebot/blob/691fc3fa8bc6f07061ff2b3798fec76bc3a039aa/src/IrcParser.php#L829-L850 |
31,571 | chameleon-system/chameleon-shop | src/SearchBundle/objects/db/TShopSearchIndexer.class.php | TShopSearchIndexer.CommitProcessData | protected function CommitProcessData()
{
TdbShopSearchFieldWeight::AddQueryBlock(false, null, null);
$sTmp = serialize($this->aTablesToProcess);
$aData = $this->sqlData;
$aData['processdata'] = $sTmp;
$this->LoadFromRow($aData);
$this->AllowEditByAll(true);
$t... | php | protected function CommitProcessData()
{
TdbShopSearchFieldWeight::AddQueryBlock(false, null, null);
$sTmp = serialize($this->aTablesToProcess);
$aData = $this->sqlData;
$aData['processdata'] = $sTmp;
$this->LoadFromRow($aData);
$this->AllowEditByAll(true);
$t... | [
"protected",
"function",
"CommitProcessData",
"(",
")",
"{",
"TdbShopSearchFieldWeight",
"::",
"AddQueryBlock",
"(",
"false",
",",
"null",
",",
"null",
")",
";",
"$",
"sTmp",
"=",
"serialize",
"(",
"$",
"this",
"->",
"aTablesToProcess",
")",
";",
"$",
"aData... | commit processing data to database. | [
"commit",
"processing",
"data",
"to",
"database",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchIndexer.class.php#L63-L72 |
31,572 | chameleon-system/chameleon-shop | src/SearchBundle/objects/db/TShopSearchIndexer.class.php | TShopSearchIndexer.GetRemainingRowCount | protected function GetRemainingRowCount()
{
$aTableList = $this->aTablesToProcess;
$iCount = 0;
foreach ($aTableList as $iWorkId) {
$oIndexQuery = TdbShopSearchQuery::GetNewInstance();
/** @var $oIndexQuery TdbShopSearchQuery */
if ($oIndexQuery->Load($iWo... | php | protected function GetRemainingRowCount()
{
$aTableList = $this->aTablesToProcess;
$iCount = 0;
foreach ($aTableList as $iWorkId) {
$oIndexQuery = TdbShopSearchQuery::GetNewInstance();
/** @var $oIndexQuery TdbShopSearchQuery */
if ($oIndexQuery->Load($iWo... | [
"protected",
"function",
"GetRemainingRowCount",
"(",
")",
"{",
"$",
"aTableList",
"=",
"$",
"this",
"->",
"aTablesToProcess",
";",
"$",
"iCount",
"=",
"0",
";",
"foreach",
"(",
"$",
"aTableList",
"as",
"$",
"iWorkId",
")",
"{",
"$",
"oIndexQuery",
"=",
... | return the number of rows still to process.
@return unknown | [
"return",
"the",
"number",
"of",
"rows",
"still",
"to",
"process",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchIndexer.class.php#L100-L113 |
31,573 | chameleon-system/chameleon-shop | src/SearchBundle/objects/db/TShopSearchIndexer.class.php | TShopSearchIndexer.ProcessNextIndexStep | public function ProcessNextIndexStep($bIndexUsingTicker = true)
{
TCacheManager::SetDisableCaching(true);
// if no index is running, prepare the indexer
$iTickerSize = self::INDEX_SET_SIZE;
if (!$bIndexUsingTicker) {
$iTickerSize = -1;
}
if (!$this->IsRunn... | php | public function ProcessNextIndexStep($bIndexUsingTicker = true)
{
TCacheManager::SetDisableCaching(true);
// if no index is running, prepare the indexer
$iTickerSize = self::INDEX_SET_SIZE;
if (!$bIndexUsingTicker) {
$iTickerSize = -1;
}
if (!$this->IsRunn... | [
"public",
"function",
"ProcessNextIndexStep",
"(",
"$",
"bIndexUsingTicker",
"=",
"true",
")",
"{",
"TCacheManager",
"::",
"SetDisableCaching",
"(",
"true",
")",
";",
"// if no index is running, prepare the indexer",
"$",
"iTickerSize",
"=",
"self",
"::",
"INDEX_SET_SIZ... | performs the next index set.
@param bool $bIndexUsingTicker - if set to true, each call to this method will only index as many rows as defined by INDEX_SET_SIZE | [
"performs",
"the",
"next",
"index",
"set",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchIndexer.class.php#L140-L178 |
31,574 | chameleon-system/chameleon-shop | src/SearchBundle/objects/db/TShopSearchIndexer.class.php | TShopSearchIndexer.InitializeIndexer | public function InitializeIndexer()
{
$bWorkToDo = true;
if (!$this->bRegenerateCompleteIndex) {
// drop index
$query = "UPDATE shop_search_reindex_queue SET `processing` = '1'";
MySqlLegacySupport::getInstance()->query($query);
$query = "SELECT COUNT(... | php | public function InitializeIndexer()
{
$bWorkToDo = true;
if (!$this->bRegenerateCompleteIndex) {
// drop index
$query = "UPDATE shop_search_reindex_queue SET `processing` = '1'";
MySqlLegacySupport::getInstance()->query($query);
$query = "SELECT COUNT(... | [
"public",
"function",
"InitializeIndexer",
"(",
")",
"{",
"$",
"bWorkToDo",
"=",
"true",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"bRegenerateCompleteIndex",
")",
"{",
"// drop index",
"$",
"query",
"=",
"\"UPDATE shop_search_reindex_queue SET `processing` = '1'\"",
... | initialize indexer. | [
"initialize",
"indexer",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchIndexer.class.php#L205-L265 |
31,575 | chameleon-system/chameleon-shop | src/SearchBundle/objects/db/TShopSearchIndexer.class.php | TShopSearchIndexer.& | protected static function &GetShopConfigForIndexer()
{
static $oShop;
if (!isset($oShop)) {
// get first shop we find
$oShops = &TdbShopList::GetList();
$oShop = $oShops->Current();
}
return $oShop;
} | php | protected static function &GetShopConfigForIndexer()
{
static $oShop;
if (!isset($oShop)) {
// get first shop we find
$oShops = &TdbShopList::GetList();
$oShop = $oShops->Current();
}
return $oShop;
} | [
"protected",
"static",
"function",
"&",
"GetShopConfigForIndexer",
"(",
")",
"{",
"static",
"$",
"oShop",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"oShop",
")",
")",
"{",
"// get first shop we find",
"$",
"oShops",
"=",
"&",
"TdbShopList",
"::",
"GetList",
... | get the shop we use for config data for the indexer... for now we just take
the first we find. later we need some way to connect the two.
@return TdbShop | [
"get",
"the",
"shop",
"we",
"use",
"for",
"config",
"data",
"for",
"the",
"indexer",
"...",
"for",
"now",
"we",
"just",
"take",
"the",
"first",
"we",
"find",
".",
"later",
"we",
"need",
"some",
"way",
"to",
"connect",
"the",
"two",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchIndexer.class.php#L273-L283 |
31,576 | chameleon-system/chameleon-shop | src/SearchBundle/objects/db/TShopSearchIndexer.class.php | TShopSearchIndexer.CreateIndexTables | public function CreateIndexTables()
{
$aIndexTableNames = TdbShopSearchIndexer::GetAllIndexTableNames();
$aTmpIndex = array();
foreach ($aIndexTableNames as $sTableName => $length) {
$aTmpIndex['_tmp'.$sTableName] = $length;
}
$aIndexTableNames = $aTmpIndex;
... | php | public function CreateIndexTables()
{
$aIndexTableNames = TdbShopSearchIndexer::GetAllIndexTableNames();
$aTmpIndex = array();
foreach ($aIndexTableNames as $sTableName => $length) {
$aTmpIndex['_tmp'.$sTableName] = $length;
}
$aIndexTableNames = $aTmpIndex;
... | [
"public",
"function",
"CreateIndexTables",
"(",
")",
"{",
"$",
"aIndexTableNames",
"=",
"TdbShopSearchIndexer",
"::",
"GetAllIndexTableNames",
"(",
")",
";",
"$",
"aTmpIndex",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"aIndexTableNames",
"as",
"$",
"sT... | create all index tables for the field and drop tables no longer needed. | [
"create",
"all",
"index",
"tables",
"for",
"the",
"field",
"and",
"drop",
"tables",
"no",
"longer",
"needed",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchIndexer.class.php#L303-L339 |
31,577 | chameleon-system/chameleon-shop | src/SearchBundle/objects/db/TShopSearchIndexer.class.php | TShopSearchIndexer.GetAllIndexTableNames | public static function GetAllIndexTableNames()
{
static $aNames;
if (!isset($aNames)) {
$aNames = array();
$oShop = &TdbShopSearchIndexer::GetShopConfigForIndexer();
for ($i = $oShop->fieldShopSearchMinIndexLength; $i <= $oShop->fieldShopSearchMaxIndexLength; ++$i... | php | public static function GetAllIndexTableNames()
{
static $aNames;
if (!isset($aNames)) {
$aNames = array();
$oShop = &TdbShopSearchIndexer::GetShopConfigForIndexer();
for ($i = $oShop->fieldShopSearchMinIndexLength; $i <= $oShop->fieldShopSearchMaxIndexLength; ++$i... | [
"public",
"static",
"function",
"GetAllIndexTableNames",
"(",
")",
"{",
"static",
"$",
"aNames",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"aNames",
")",
")",
"{",
"$",
"aNames",
"=",
"array",
"(",
")",
";",
"$",
"oShop",
"=",
"&",
"TdbShopSearchIndexer"... | get all index tables for the field.
@return array | [
"get",
"all",
"index",
"tables",
"for",
"the",
"field",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchIndexer.class.php#L451-L463 |
31,578 | chameleon-system/chameleon-shop | src/SearchBundle/objects/db/TShopSearchIndexer.class.php | TShopSearchIndexer.GetWordListQuery | protected static function GetWordListQuery($aTerms, $sLanguageId, $aFieldRestrictions = null, $sTypeOfFieldRestriction = 'OR')
{
$aTableQueries = array();
// get affected tables
$aTableList = array();
foreach ($aTerms as $sTerm) {
$sTableName = TdbShopSearchIndexer::GetIn... | php | protected static function GetWordListQuery($aTerms, $sLanguageId, $aFieldRestrictions = null, $sTypeOfFieldRestriction = 'OR')
{
$aTableQueries = array();
// get affected tables
$aTableList = array();
foreach ($aTerms as $sTerm) {
$sTableName = TdbShopSearchIndexer::GetIn... | [
"protected",
"static",
"function",
"GetWordListQuery",
"(",
"$",
"aTerms",
",",
"$",
"sLanguageId",
",",
"$",
"aFieldRestrictions",
"=",
"null",
",",
"$",
"sTypeOfFieldRestriction",
"=",
"'OR'",
")",
"{",
"$",
"aTableQueries",
"=",
"array",
"(",
")",
";",
"/... | return subquery that searches for the terms in aTerms in all fields defined by aFieldRestriction
if no restrctions are passed, we search in all.
@param array $aTerms
@param string $sLanguage - search in which language?
@param array $aFieldRestrictions
@param string $sTypeOfFieldRestriction - if the fie... | [
"return",
"subquery",
"that",
"searches",
"for",
"the",
"terms",
"in",
"aTerms",
"in",
"all",
"fields",
"defined",
"by",
"aFieldRestriction",
"if",
"no",
"restrctions",
"are",
"passed",
"we",
"search",
"in",
"all",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchIndexer.class.php#L632-L695 |
31,579 | chameleon-system/chameleon-shop | src/SearchBundle/objects/db/TShopSearchIndexer.class.php | TShopSearchIndexer.PrepareSearchWords | public static function PrepareSearchWords($sOrigianlString, $bFilterIgnoreWords = true)
{
$aWords = array();
$sOrigianlString = strip_tags($sOrigianlString);
$sOrigianlString = str_replace(array('/', "\n", '-', '_', '&', '+'), array(' ', ' ', ' ', ' ', ' ', ' '), $sOrigianlString);
$... | php | public static function PrepareSearchWords($sOrigianlString, $bFilterIgnoreWords = true)
{
$aWords = array();
$sOrigianlString = strip_tags($sOrigianlString);
$sOrigianlString = str_replace(array('/', "\n", '-', '_', '&', '+'), array(' ', ' ', ' ', ' ', ' ', ' '), $sOrigianlString);
$... | [
"public",
"static",
"function",
"PrepareSearchWords",
"(",
"$",
"sOrigianlString",
",",
"$",
"bFilterIgnoreWords",
"=",
"true",
")",
"{",
"$",
"aWords",
"=",
"array",
"(",
")",
";",
"$",
"sOrigianlString",
"=",
"strip_tags",
"(",
"$",
"sOrigianlString",
")",
... | splits the search words into an array with prepared search words.
@param string $sWords
@param bool $bFilterIgnoreWords - removes ignore words form the list if set
@return array | [
"splits",
"the",
"search",
"words",
"into",
"an",
"array",
"with",
"prepared",
"search",
"words",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchIndexer.class.php#L705-L722 |
31,580 | chameleon-system/chameleon-shop | src/SearchBundle/objects/db/TShopSearchIndexer.class.php | TShopSearchIndexer.IsIgnoreWord | protected static function IsIgnoreWord($sWord)
{
static $aIgnoreWordCache;
static $bCompleteLoad = null;
// first try to cache all... if we have to many (more than 500) then work an a word base system instead
if (!isset($aIgnoreWordCache)) {
$aIgnoreWordCache = array();
... | php | protected static function IsIgnoreWord($sWord)
{
static $aIgnoreWordCache;
static $bCompleteLoad = null;
// first try to cache all... if we have to many (more than 500) then work an a word base system instead
if (!isset($aIgnoreWordCache)) {
$aIgnoreWordCache = array();
... | [
"protected",
"static",
"function",
"IsIgnoreWord",
"(",
"$",
"sWord",
")",
"{",
"static",
"$",
"aIgnoreWordCache",
";",
"static",
"$",
"bCompleteLoad",
"=",
"null",
";",
"// first try to cache all... if we have to many (more than 500) then work an a word base system instead",
... | return true if the word is in the ignore list.
@param string $sWord
@return bool | [
"return",
"true",
"if",
"the",
"word",
"is",
"in",
"the",
"ignore",
"list",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchIndexer.class.php#L769-L807 |
31,581 | chameleon-system/chameleon-shop | src/SearchBundle/objects/db/TShopSearchIndexer.class.php | TShopSearchIndexer.searchWithAND | public static function searchWithAND()
{
$bUseAnd = false;
$oShop = TdbShop::GetInstance();
if ($oShop && array_key_exists('shop_search_use_boolean_and', $oShop->sqlData)) {
$bUseAnd = ('1' == $oShop->sqlData['shop_search_use_boolean_and']);
}
return $bUseAnd;
... | php | public static function searchWithAND()
{
$bUseAnd = false;
$oShop = TdbShop::GetInstance();
if ($oShop && array_key_exists('shop_search_use_boolean_and', $oShop->sqlData)) {
$bUseAnd = ('1' == $oShop->sqlData['shop_search_use_boolean_and']);
}
return $bUseAnd;
... | [
"public",
"static",
"function",
"searchWithAND",
"(",
")",
"{",
"$",
"bUseAnd",
"=",
"false",
";",
"$",
"oShop",
"=",
"TdbShop",
"::",
"GetInstance",
"(",
")",
";",
"if",
"(",
"$",
"oShop",
"&&",
"array_key_exists",
"(",
"'shop_search_use_boolean_and'",
",",... | returns always true!
non AND searches are disabled currently.
@return bool | [
"returns",
"always",
"true!",
"non",
"AND",
"searches",
"are",
"disabled",
"currently",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/SearchBundle/objects/db/TShopSearchIndexer.class.php#L874-L883 |
31,582 | edmondscommerce/doctrine-static-meta | src/CodeGeneration/PathHelper.php | PathHelper.resolvePath | public function resolvePath(string $relativePath): string
{
$path = [];
$absolute = (strpos($relativePath, '/') === 0);
foreach (explode('/', $relativePath) as $part) {
// ignore parts that have no value
if (empty($part) || $part === '.') {
continu... | php | public function resolvePath(string $relativePath): string
{
$path = [];
$absolute = (strpos($relativePath, '/') === 0);
foreach (explode('/', $relativePath) as $part) {
// ignore parts that have no value
if (empty($part) || $part === '.') {
continu... | [
"public",
"function",
"resolvePath",
"(",
"string",
"$",
"relativePath",
")",
":",
"string",
"{",
"$",
"path",
"=",
"[",
"]",
";",
"$",
"absolute",
"=",
"(",
"strpos",
"(",
"$",
"relativePath",
",",
"'/'",
")",
"===",
"0",
")",
";",
"foreach",
"(",
... | Take a potentially non existent path and resolve the relativeness into a normal path
@param string $relativePath
@return string
@throws \RuntimeException | [
"Take",
"a",
"potentially",
"non",
"existent",
"path",
"and",
"resolve",
"the",
"relativeness",
"into",
"a",
"normal",
"path"
] | c5b1caab0b2e3a84c34082af96529a274f0c3d7e | https://github.com/edmondscommerce/doctrine-static-meta/blob/c5b1caab0b2e3a84c34082af96529a274f0c3d7e/src/CodeGeneration/PathHelper.php#L215-L243 |
31,583 | chameleon-system/chameleon-shop | src/ShopWishlistBundle/objects/WebModules/MTShopBasketCore/MTShopWishlistBasketCore.class.php | MTShopWishlistBasketCore.RemoveFromWishlist | protected function RemoveFromWishlist($sPkgShopWishlistArticleId = null, $sMessageHandler = null, $bIsInternalCall = false)
{
$oGlobal = TGlobal::instance();
$aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER);
if (is_null($sPkgShopWishlistArticleId) && array_key_exists(self::... | php | protected function RemoveFromWishlist($sPkgShopWishlistArticleId = null, $sMessageHandler = null, $bIsInternalCall = false)
{
$oGlobal = TGlobal::instance();
$aRequestData = $oGlobal->GetUserData(self::URL_REQUEST_PARAMETER);
if (is_null($sPkgShopWishlistArticleId) && array_key_exists(self::... | [
"protected",
"function",
"RemoveFromWishlist",
"(",
"$",
"sPkgShopWishlistArticleId",
"=",
"null",
",",
"$",
"sMessageHandler",
"=",
"null",
",",
"$",
"bIsInternalCall",
"=",
"false",
")",
"{",
"$",
"oGlobal",
"=",
"TGlobal",
"::",
"instance",
"(",
")",
";",
... | remove an item from the users wishlist.
@param string $sPkgShopWishlistArticleId - the pkg_shop_wishlist_article_id to remove from the list
@param string $sMessageHandler
@param bool $bIsInternalCall | [
"remove",
"an",
"item",
"from",
"the",
"users",
"wishlist",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopWishlistBundle/objects/WebModules/MTShopBasketCore/MTShopWishlistBasketCore.class.php#L110-L156 |
31,584 | chameleon-system/chameleon-shop | src/ShopBundle/objects/WebModules/MTShopCentralHandlerCore/MTShopCentralHandlerCoreEndPoint.class.php | MTShopCentralHandlerCoreEndPoint.GetArticleView | protected function GetArticleView($sShopArticleId = null, $sViewName = 'standard', $sViewType = 'Customer', $aCallTimeVars = array())
{
$oReturnObject = new stdClass();
$oArticle = TdbShopArticle::GetNewInstance();
$oArticle->Load($sShopArticleId);
if ($oArticle->IsVariant()) {
... | php | protected function GetArticleView($sShopArticleId = null, $sViewName = 'standard', $sViewType = 'Customer', $aCallTimeVars = array())
{
$oReturnObject = new stdClass();
$oArticle = TdbShopArticle::GetNewInstance();
$oArticle->Load($sShopArticleId);
if ($oArticle->IsVariant()) {
... | [
"protected",
"function",
"GetArticleView",
"(",
"$",
"sShopArticleId",
"=",
"null",
",",
"$",
"sViewName",
"=",
"'standard'",
",",
"$",
"sViewType",
"=",
"'Customer'",
",",
"$",
"aCallTimeVars",
"=",
"array",
"(",
")",
")",
"{",
"$",
"oReturnObject",
"=",
... | returns an article view.
@param string $sShopArticleId
@param string $sViewName
@param string $sViewType
@param array $aCallTimeVars
@return stdClass | [
"returns",
"an",
"article",
"view",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/WebModules/MTShopCentralHandlerCore/MTShopCentralHandlerCoreEndPoint.class.php#L45-L62 |
31,585 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/pkgShop/OrderSteps/AmazonAddressStep.php | AmazonAddressStep.Init | public function Init()
{
parent::Init();
$oUser = TdbDataExtranetUser::GetInstance();
$shippingAddress = $oUser->GetShippingAddress();
if (true === $shippingAddress->getIsAmazonShippingAddress()) {
$oUser->resetAmazonAddresses();
$basket = $this->getShopServic... | php | public function Init()
{
parent::Init();
$oUser = TdbDataExtranetUser::GetInstance();
$shippingAddress = $oUser->GetShippingAddress();
if (true === $shippingAddress->getIsAmazonShippingAddress()) {
$oUser->resetAmazonAddresses();
$basket = $this->getShopServic... | [
"public",
"function",
"Init",
"(",
")",
"{",
"parent",
"::",
"Init",
"(",
")",
";",
"$",
"oUser",
"=",
"TdbDataExtranetUser",
"::",
"GetInstance",
"(",
")",
";",
"$",
"shippingAddress",
"=",
"$",
"oUser",
"->",
"GetShippingAddress",
"(",
")",
";",
"if",
... | reset address data because customer choose new in this step. | [
"reset",
"address",
"data",
"because",
"customer",
"choose",
"new",
"in",
"this",
"step",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/pkgShop/OrderSteps/AmazonAddressStep.php#L89-L99 |
31,586 | chameleon-system/chameleon-shop | src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Samples/CancellationResult.php | CancellationResult._waitUntilAuthorizationProcessingIsCompleted | private function _waitUntilAuthorizationProcessingIsCompleted
($amazonAuthorizationId)
{
// Check for the presence of the ipn notification
$this->waitForNotificationToBeProcessedBeforeContinuing(
$amazonAuthorizationId,
"AuthorizationNotification"
);
... | php | private function _waitUntilAuthorizationProcessingIsCompleted
($amazonAuthorizationId)
{
// Check for the presence of the ipn notification
$this->waitForNotificationToBeProcessedBeforeContinuing(
$amazonAuthorizationId,
"AuthorizationNotification"
);
... | [
"private",
"function",
"_waitUntilAuthorizationProcessingIsCompleted",
"(",
"$",
"amazonAuthorizationId",
")",
"{",
"// Check for the presence of the ipn notification",
"$",
"this",
"->",
"waitForNotificationToBeProcessedBeforeContinuing",
"(",
"$",
"amazonAuthorizationId",
",",
"\... | Check that we have received an IPN notification for the authorization
For PHP, there is an IPN handler that will write the contents of the IPN to
a file in the format of
<amazonAuthorizationId>_Authorization.
This method will check for the presnece of this file
and will loop/timeout until the notification has been han... | [
"Check",
"that",
"we",
"have",
"received",
"an",
"IPN",
"notification",
"for",
"the",
"authorization"
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/AmazonPaymentBundle/lib/amazon/OffAmazonPaymentsNotifications/Samples/CancellationResult.php#L161-L182 |
31,587 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopOrderStep/TShopStepBasketCore.class.php | TShopStepBasketCore.& | public function &GetNextStep()
{
static $oNextStep;
if (!$oNextStep) {
$oUsers = TdbDataExtranetUser::GetInstance();
if ($oUsers->IsLoggedIn() && $oUsers->HasData()) {
$oBasket = TShopBasket::GetInstance();
$oBasket->aCompletedOrderStepList['us... | php | public function &GetNextStep()
{
static $oNextStep;
if (!$oNextStep) {
$oUsers = TdbDataExtranetUser::GetInstance();
if ($oUsers->IsLoggedIn() && $oUsers->HasData()) {
$oBasket = TShopBasket::GetInstance();
$oBasket->aCompletedOrderStepList['us... | [
"public",
"function",
"&",
"GetNextStep",
"(",
")",
"{",
"static",
"$",
"oNextStep",
";",
"if",
"(",
"!",
"$",
"oNextStep",
")",
"{",
"$",
"oUsers",
"=",
"TdbDataExtranetUser",
"::",
"GetInstance",
"(",
")",
";",
"if",
"(",
"$",
"oUsers",
"->",
"IsLogg... | overwrite this to jump directly to the payment page for signed in users.
@return TdbShopOrderStep | [
"overwrite",
"this",
"to",
"jump",
"directly",
"to",
"the",
"payment",
"page",
"for",
"signed",
"in",
"users",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopOrderStep/TShopStepBasketCore.class.php#L86-L116 |
31,588 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopOrderStep/TShopStepBasketCore.class.php | TShopStepBasketCore.UpdateBasket | public function UpdateBasket($bInternalCall = false)
{
// we use the existing basket module to do all the work...
$oShop = TdbShop::GetInstance();
$oController = TGlobal::GetController();
$oBasketModule = $oController->moduleLoader->GetPointerToModule($oShop->fieldBasketSpotName);
... | php | public function UpdateBasket($bInternalCall = false)
{
// we use the existing basket module to do all the work...
$oShop = TdbShop::GetInstance();
$oController = TGlobal::GetController();
$oBasketModule = $oController->moduleLoader->GetPointerToModule($oShop->fieldBasketSpotName);
... | [
"public",
"function",
"UpdateBasket",
"(",
"$",
"bInternalCall",
"=",
"false",
")",
"{",
"// we use the existing basket module to do all the work...",
"$",
"oShop",
"=",
"TdbShop",
"::",
"GetInstance",
"(",
")",
";",
"$",
"oController",
"=",
"TGlobal",
"::",
"GetCon... | update current basket.
@param bool $bInternalCall - if set to true, all redirects will be supressed
@return bool | [
"update",
"current",
"basket",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopOrderStep/TShopStepBasketCore.class.php#L125-L139 |
31,589 | chameleon-system/chameleon-shop | src/ShopCurrencyBundle/objects/db/TPkgShopCurrency.class.php | TPkgShopCurrency.GetBaseCurrency | public static function GetBaseCurrency()
{
static $oInstance = null;
if (null === $oInstance) {
$oInstance = TdbPkgShopCurrency::GetNewInstance();
if (false === $oInstance->LoadFromField('is_base_currency', '1')) {
$oInstance = false;
}
}
... | php | public static function GetBaseCurrency()
{
static $oInstance = null;
if (null === $oInstance) {
$oInstance = TdbPkgShopCurrency::GetNewInstance();
if (false === $oInstance->LoadFromField('is_base_currency', '1')) {
$oInstance = false;
}
}
... | [
"public",
"static",
"function",
"GetBaseCurrency",
"(",
")",
"{",
"static",
"$",
"oInstance",
"=",
"null",
";",
"if",
"(",
"null",
"===",
"$",
"oInstance",
")",
"{",
"$",
"oInstance",
"=",
"TdbPkgShopCurrency",
"::",
"GetNewInstance",
"(",
")",
";",
"if",
... | return the base currency relative to which all other currencies are calculated.
@return TdbPkgShopCurrency | [
"return",
"the",
"base",
"currency",
"relative",
"to",
"which",
"all",
"other",
"currencies",
"are",
"calculated",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopCurrencyBundle/objects/db/TPkgShopCurrency.class.php#L115-L126 |
31,590 | chameleon-system/chameleon-shop | src/ShopCurrencyBundle/objects/db/TPkgShopCurrency.class.php | TPkgShopCurrency.SetAsActive | public function SetAsActive()
{
$sCurrencyId = $this->id;
/** @var Request $request */
$request = ServiceLocator::get('request_stack')->getCurrentRequest();
$request->getSession()->set(TdbPkgShopCurrency::SESSION_NAME, $sCurrencyId);
$sDomain = $request->getHost();
... | php | public function SetAsActive()
{
$sCurrencyId = $this->id;
/** @var Request $request */
$request = ServiceLocator::get('request_stack')->getCurrentRequest();
$request->getSession()->set(TdbPkgShopCurrency::SESSION_NAME, $sCurrencyId);
$sDomain = $request->getHost();
... | [
"public",
"function",
"SetAsActive",
"(",
")",
"{",
"$",
"sCurrencyId",
"=",
"$",
"this",
"->",
"id",
";",
"/** @var Request $request */",
"$",
"request",
"=",
"ServiceLocator",
"::",
"get",
"(",
"'request_stack'",
")",
"->",
"getCurrentRequest",
"(",
")",
";"... | set this currency object as the active object. | [
"set",
"this",
"currency",
"object",
"as",
"the",
"active",
"object",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopCurrencyBundle/objects/db/TPkgShopCurrency.class.php#L169-L199 |
31,591 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopModuleArticleListFilter/TShopModuleArticlelistFilterSearch.class.php | TShopModuleArticlelistFilterSearch.ModuleInitHook | public function ModuleInitHook()
{
parent::ModuleInitHook();
$oShop = TdbShop::GetInstance();
if ($oShop->fieldRedirectToNotFoundPageProductSearchOnNoResults) {
// in this case the shop may redirect after running the search. since this occurs in the Execute of the module, we need... | php | public function ModuleInitHook()
{
parent::ModuleInitHook();
$oShop = TdbShop::GetInstance();
if ($oShop->fieldRedirectToNotFoundPageProductSearchOnNoResults) {
// in this case the shop may redirect after running the search. since this occurs in the Execute of the module, we need... | [
"public",
"function",
"ModuleInitHook",
"(",
")",
"{",
"parent",
"::",
"ModuleInitHook",
"(",
")",
";",
"$",
"oShop",
"=",
"TdbShop",
"::",
"GetInstance",
"(",
")",
";",
"if",
"(",
"$",
"oShop",
"->",
"fieldRedirectToNotFoundPageProductSearchOnNoResults",
")",
... | is called when the module initializes. | [
"is",
"called",
"when",
"the",
"module",
"initializes",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopModuleArticleListFilter/TShopModuleArticlelistFilterSearch.class.php#L138-L147 |
31,592 | Firesphere/silverstripe-bootstrapmfa | src/Extensions/SiteConfigExtension.php | SiteConfigExtension.updateCMSFields | public function updateCMSFields(FieldList $fields)
{
$fields->addFieldToTab(
'Root.MFA',
$checkbox = CheckboxField::create(
'EnforceMFA',
_t(self::class . '.ENFORCEMFA', 'Enforce MFA on all users'),
$this->isMFAEnforced()
)
... | php | public function updateCMSFields(FieldList $fields)
{
$fields->addFieldToTab(
'Root.MFA',
$checkbox = CheckboxField::create(
'EnforceMFA',
_t(self::class . '.ENFORCEMFA', 'Enforce MFA on all users'),
$this->isMFAEnforced()
)
... | [
"public",
"function",
"updateCMSFields",
"(",
"FieldList",
"$",
"fields",
")",
"{",
"$",
"fields",
"->",
"addFieldToTab",
"(",
"'Root.MFA'",
",",
"$",
"checkbox",
"=",
"CheckboxField",
"::",
"create",
"(",
"'EnforceMFA'",
",",
"_t",
"(",
"self",
"::",
"class... | Add the checkbox and if enabled the date since enforcement
@param FieldList $fields | [
"Add",
"the",
"checkbox",
"and",
"if",
"enabled",
"the",
"date",
"since",
"enforcement"
] | 8d2d6c6f2f918c8fa157da91550b897816495a4b | https://github.com/Firesphere/silverstripe-bootstrapmfa/blob/8d2d6c6f2f918c8fa157da91550b897816495a4b/src/Extensions/SiteConfigExtension.php#L31-L44 |
31,593 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticlePreviewImage.class.php | TShopArticlePreviewImage.LoadByName | public function LoadByName(&$oArticle, $sInternalName)
{
$bLoaded = false;
$this->oArticle = &$oArticle;
$this->oImageSize = TdbShopArticleImageSize::GetNewInstance();
/** @var $oImageSize TdbShopArticleImageSize */
if ($this->oImageSize->LoadFromField('name_internal', $sInte... | php | public function LoadByName(&$oArticle, $sInternalName)
{
$bLoaded = false;
$this->oArticle = &$oArticle;
$this->oImageSize = TdbShopArticleImageSize::GetNewInstance();
/** @var $oImageSize TdbShopArticleImageSize */
if ($this->oImageSize->LoadFromField('name_internal', $sInte... | [
"public",
"function",
"LoadByName",
"(",
"&",
"$",
"oArticle",
",",
"$",
"sInternalName",
")",
"{",
"$",
"bLoaded",
"=",
"false",
";",
"$",
"this",
"->",
"oArticle",
"=",
"&",
"$",
"oArticle",
";",
"$",
"this",
"->",
"oImageSize",
"=",
"TdbShopArticleIma... | return the image preview object. if the shop did not define one for this size,
then we create a virtual instance based on the first image of the article.
@param TdbShopArticle $oArticle - the article object
@param string $sInternalName - image size name
@return true | [
"return",
"the",
"image",
"preview",
"object",
".",
"if",
"the",
"shop",
"did",
"not",
"define",
"one",
"for",
"this",
"size",
"then",
"we",
"create",
"a",
"virtual",
"instance",
"based",
"on",
"the",
"first",
"image",
"of",
"the",
"article",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticlePreviewImage.class.php#L44-L65 |
31,594 | chameleon-system/chameleon-shop | src/ShopBundle/objects/db/TShopArticlePreviewImage.class.php | TShopArticlePreviewImage.GetImageThumbnailObject | public function GetImageThumbnailObject($aEffects = array())
{
$oImageSize = &$this->GetImageSizeObject();
$oImage = &$this->GetImageObject();
$oThumb = null;
TdbCmsConfigImagemagick::SetEnableEffects(true);
$bEnableEffects = TdbCmsConfigImagemagick::GetEnableEffects();
... | php | public function GetImageThumbnailObject($aEffects = array())
{
$oImageSize = &$this->GetImageSizeObject();
$oImage = &$this->GetImageObject();
$oThumb = null;
TdbCmsConfigImagemagick::SetEnableEffects(true);
$bEnableEffects = TdbCmsConfigImagemagick::GetEnableEffects();
... | [
"public",
"function",
"GetImageThumbnailObject",
"(",
"$",
"aEffects",
"=",
"array",
"(",
")",
")",
"{",
"$",
"oImageSize",
"=",
"&",
"$",
"this",
"->",
"GetImageSizeObject",
"(",
")",
";",
"$",
"oImage",
"=",
"&",
"$",
"this",
"->",
"GetImageObject",
"(... | return thumbnail for current size.
@return TCMSImage | [
"return",
"thumbnail",
"for",
"current",
"size",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopBundle/objects/db/TShopArticlePreviewImage.class.php#L134-L150 |
31,595 | chameleon-system/chameleon-shop | src/ShopWishlistBundle/objects/WebModules/MTPkgShopWishlistCore/MTPkgShopWishlistCore.class.php | MTPkgShopWishlistCore.ExecuteSendFormMode | protected function ExecuteSendFormMode()
{
if (!is_array($this->aUserInput)) {
$this->aUserInput = array('to_name' => '', 'to_mail' => '', 'comment' => '');
}
$this->data['aUserInput'] = $this->aUserInput;
} | php | protected function ExecuteSendFormMode()
{
if (!is_array($this->aUserInput)) {
$this->aUserInput = array('to_name' => '', 'to_mail' => '', 'comment' => '');
}
$this->data['aUserInput'] = $this->aUserInput;
} | [
"protected",
"function",
"ExecuteSendFormMode",
"(",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"this",
"->",
"aUserInput",
")",
")",
"{",
"$",
"this",
"->",
"aUserInput",
"=",
"array",
"(",
"'to_name'",
"=>",
"''",
",",
"'to_mail'",
"=>",
"''",
"... | Execute method called when the module is in the SendForm mode. | [
"Execute",
"method",
"called",
"when",
"the",
"module",
"is",
"in",
"the",
"SendForm",
"mode",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopWishlistBundle/objects/WebModules/MTPkgShopWishlistCore/MTPkgShopWishlistCore.class.php#L73-L79 |
31,596 | chameleon-system/chameleon-shop | src/ShopWishlistBundle/objects/WebModules/MTPkgShopWishlistCore/MTPkgShopWishlistCore.class.php | MTPkgShopWishlistCore.UpdateWishlist | protected function UpdateWishlist()
{
$aInput = $this->global->GetUserData(TdbPkgShopWishlist::URL_PARAMETER_FILTER_DATA);
$sWishListDescription = '';
if (array_key_exists('description', $aInput)) {
$sWishListDescription = $aInput['description'];
}
$oMsgManager = ... | php | protected function UpdateWishlist()
{
$aInput = $this->global->GetUserData(TdbPkgShopWishlist::URL_PARAMETER_FILTER_DATA);
$sWishListDescription = '';
if (array_key_exists('description', $aInput)) {
$sWishListDescription = $aInput['description'];
}
$oMsgManager = ... | [
"protected",
"function",
"UpdateWishlist",
"(",
")",
"{",
"$",
"aInput",
"=",
"$",
"this",
"->",
"global",
"->",
"GetUserData",
"(",
"TdbPkgShopWishlist",
"::",
"URL_PARAMETER_FILTER_DATA",
")",
";",
"$",
"sWishListDescription",
"=",
"''",
";",
"if",
"(",
"arr... | Updates the wishlist comment, the lists item amount an comments using the data from post. | [
"Updates",
"the",
"wishlist",
"comment",
"the",
"lists",
"item",
"amount",
"an",
"comments",
"using",
"the",
"data",
"from",
"post",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopWishlistBundle/objects/WebModules/MTPkgShopWishlistCore/MTPkgShopWishlistCore.class.php#L151-L195 |
31,597 | chameleon-system/chameleon-shop | src/ShopPrimaryNavigationBundle/pkgCmsNavigation/objects/TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category.class.php | TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category.getNodeIconURL | public function getNodeIconURL()
{
$sURL = null;
/** @var $oNode TdbShopCategory */
$oNode = $this->getNodeCopy();
$oImage = $oNode->GetImage(0, 'navi_icon_cms_media_id', $this->dummyImagesAllowed());
if ($oImage) {
$sURL = $oImage->GetRelativeURL();
$... | php | public function getNodeIconURL()
{
$sURL = null;
/** @var $oNode TdbShopCategory */
$oNode = $this->getNodeCopy();
$oImage = $oNode->GetImage(0, 'navi_icon_cms_media_id', $this->dummyImagesAllowed());
if ($oImage) {
$sURL = $oImage->GetRelativeURL();
$... | [
"public",
"function",
"getNodeIconURL",
"(",
")",
"{",
"$",
"sURL",
"=",
"null",
";",
"/** @var $oNode TdbShopCategory */",
"$",
"oNode",
"=",
"$",
"this",
"->",
"getNodeCopy",
"(",
")",
";",
"$",
"oImage",
"=",
"$",
"oNode",
"->",
"GetImage",
"(",
"0",
... | returns the url to an icon for the node - if set.
@return string|null | [
"returns",
"the",
"url",
"to",
"an",
"icon",
"for",
"the",
"node",
"-",
"if",
"set",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopPrimaryNavigationBundle/pkgCmsNavigation/objects/TPkgShopPrimaryNavigation_TPkgCmsNavigationNode_Category.class.php#L134-L146 |
31,598 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/db/TPkgShopArticleReviewShopArticleReview.class.php | TPkgShopArticleReviewShopArticleReview.GetRateURL | public function GetRateURL($bPositiveLink = true, $bUseFullUrl = false)
{
if ($bPositiveLink) {
$bPositiveLink = '1';
} else {
$bPositiveLink = '0';
}
$aParameter = array('bRate' => $bPositiveLink, TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id);
... | php | public function GetRateURL($bPositiveLink = true, $bUseFullUrl = false)
{
if ($bPositiveLink) {
$bPositiveLink = '1';
} else {
$bPositiveLink = '0';
}
$aParameter = array('bRate' => $bPositiveLink, TdbShopArticleReview::URL_PARAM_REVIEW_ID => $this->id);
... | [
"public",
"function",
"GetRateURL",
"(",
"$",
"bPositiveLink",
"=",
"true",
",",
"$",
"bUseFullUrl",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"bPositiveLink",
")",
"{",
"$",
"bPositiveLink",
"=",
"'1'",
";",
"}",
"else",
"{",
"$",
"bPositiveLink",
"=",
... | Returns URL to rate a comment.
@param bool $bPositiveLink Set if you want the url to rate a review positive or negative
@param bool $bUseFullUrl
@return string | [
"Returns",
"URL",
"to",
"rate",
"a",
"comment",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/db/TPkgShopArticleReviewShopArticleReview.class.php#L28-L39 |
31,599 | chameleon-system/chameleon-shop | src/ShopArticleReviewBundle/objects/db/TPkgShopArticleReviewShopArticleReview.class.php | TPkgShopArticleReviewShopArticleReview.RateReview | public function RateReview($bRateUp = true)
{
if (false == $this->ReviewRatedByActiveUser()) {
$sRateString = 'helpful_count';
//helpful_count
//not_helpful_count
if (false == $bRateUp) {
$sRateString = 'not_helpful_count';
}
... | php | public function RateReview($bRateUp = true)
{
if (false == $this->ReviewRatedByActiveUser()) {
$sRateString = 'helpful_count';
//helpful_count
//not_helpful_count
if (false == $bRateUp) {
$sRateString = 'not_helpful_count';
}
... | [
"public",
"function",
"RateReview",
"(",
"$",
"bRateUp",
"=",
"true",
")",
"{",
"if",
"(",
"false",
"==",
"$",
"this",
"->",
"ReviewRatedByActiveUser",
"(",
")",
")",
"{",
"$",
"sRateString",
"=",
"'helpful_count'",
";",
"//helpful_count",
"//not_helpful_count... | vote the review up or down.
@param bool $bRateUp | [
"vote",
"the",
"review",
"up",
"or",
"down",
"."
] | 2e47f4eeab604449605ee1867180c9a37a8c208e | https://github.com/chameleon-system/chameleon-shop/blob/2e47f4eeab604449605ee1867180c9a37a8c208e/src/ShopArticleReviewBundle/objects/db/TPkgShopArticleReviewShopArticleReview.class.php#L56-L86 |
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.