repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
willhoffmann/domuserp-php
src/Resources/CommercialSector/CommercialSector.php
CommercialSector.customers
public function customers($id) { $customers = $this->execute( self::HTTP_GET, self::DOMUSERP_API_OPERACIONAL . '/setorcomercial/' . $id . '/clientes' ); return $customers; }
php
public function customers($id) { $customers = $this->execute( self::HTTP_GET, self::DOMUSERP_API_OPERACIONAL . '/setorcomercial/' . $id . '/clientes' ); return $customers; }
[ "public", "function", "customers", "(", "$", "id", ")", "{", "$", "customers", "=", "$", "this", "->", "execute", "(", "self", "::", "HTTP_GET", ",", "self", "::", "DOMUSERP_API_OPERACIONAL", ".", "'/setorcomercial/'", ".", "$", "id", ".", "'/clientes'", "...
Lists all customers linked to the commercial sector @param $id @return string @throws \GuzzleHttp\Exception\GuzzleException
[ "Lists", "all", "customers", "linked", "to", "the", "commercial", "sector" ]
train
https://github.com/willhoffmann/domuserp-php/blob/44e77a4f02b0252bc26cae4c0e6b2b7d578f10a6/src/Resources/CommercialSector/CommercialSector.php#L48-L56
nikolaposa/ZfOpenGraph
src/ZfOpenGraph/View/Helper/OpenGraph.php
OpenGraph.setLocale
public function setLocale($locale, array $alternates = array()) { $this->insertMeta('set', 'locale', $locale); if (!empty($alternates)) { foreach ($alternates as $alternate) { $this->insertStructure('append', 'locale', array( 'alternate' => $alternate...
php
public function setLocale($locale, array $alternates = array()) { $this->insertMeta('set', 'locale', $locale); if (!empty($alternates)) { foreach ($alternates as $alternate) { $this->insertStructure('append', 'locale', array( 'alternate' => $alternate...
[ "public", "function", "setLocale", "(", "$", "locale", ",", "array", "$", "alternates", "=", "array", "(", ")", ")", "{", "$", "this", "->", "insertMeta", "(", "'set'", ",", "'locale'", ",", "$", "locale", ")", ";", "if", "(", "!", "empty", "(", "$...
Set 'locale' property. @param string $locale Default locale @param array $alternates Alternate locales array @return self
[ "Set", "locale", "property", "." ]
train
https://github.com/nikolaposa/ZfOpenGraph/blob/5e1a9b6ff8d2e149dc9d949635f39786f6acc347/src/ZfOpenGraph/View/Helper/OpenGraph.php#L200-L213
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.call
public function call($command, $data = NULL, $format = 'xml') { if ($this->checkStatus()) { $request = array( 'form_params' => [ 'r' => $this->realm, 'p' => $this->password, 'version' => $this->version, 'c' => $command, 'output_format...
php
public function call($command, $data = NULL, $format = 'xml') { if ($this->checkStatus()) { $request = array( 'form_params' => [ 'r' => $this->realm, 'p' => $this->password, 'version' => $this->version, 'c' => $command, 'output_format...
[ "public", "function", "call", "(", "$", "command", ",", "$", "data", "=", "NULL", ",", "$", "format", "=", "'xml'", ")", "{", "if", "(", "$", "this", "->", "checkStatus", "(", ")", ")", "{", "$", "request", "=", "array", "(", "'form_params'", "=>",...
@param $command @param null $data @param string $format @return array|\SimpleXMLElement|string @throws Exception
[ "@param", "$command", "@param", "null", "$data", "@param", "string", "$format" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L151-L203
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.getRealmSettings
public function getRealmSettings() { $xml = $this->call('getrealmsettings'); $realm = new Realm; $realm ->setRealmId((int)$xml->Data->realm_id) ->setUseCustomerKey((string)$xml->Data->use_customer_key) ->setEnableRelationalDatabase((string)$xml->Data->enable_relational_database); return $rea...
php
public function getRealmSettings() { $xml = $this->call('getrealmsettings'); $realm = new Realm; $realm ->setRealmId((int)$xml->Data->realm_id) ->setUseCustomerKey((string)$xml->Data->use_customer_key) ->setEnableRelationalDatabase((string)$xml->Data->enable_relational_database); return $rea...
[ "public", "function", "getRealmSettings", "(", ")", "{", "$", "xml", "=", "$", "this", "->", "call", "(", "'getrealmsettings'", ")", ";", "$", "realm", "=", "new", "Realm", ";", "$", "realm", "->", "setRealmId", "(", "(", "int", ")", "$", "xml", "->"...
@return Realm API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969879
[ "@return", "Realm" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L210-L221
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.showLists
public function showLists() { $form_data = array( 'headers' => 1 ); $data = $this->call('show_lists', $form_data, 'csv'); $csv = new \parseCSV($data); $lists = array(); foreach ($csv->data as $listItem) { $list = new MailingList; $list ->setListId((int)$listItem{'List Number'})// ...
php
public function showLists() { $form_data = array( 'headers' => 1 ); $data = $this->call('show_lists', $form_data, 'csv'); $csv = new \parseCSV($data); $lists = array(); foreach ($csv->data as $listItem) { $list = new MailingList; $list ->setListId((int)$listItem{'List Number'})// ...
[ "public", "function", "showLists", "(", ")", "{", "$", "form_data", "=", "array", "(", "'headers'", "=>", "1", ")", ";", "$", "data", "=", "$", "this", "->", "call", "(", "'show_lists'", ",", "$", "form_data", ",", "'csv'", ")", ";", "$", "csv", "=...
@return array @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669705
[ "@return", "array", "@throws", "Exception" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L229-L250
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.getListById
public function getListById($list_id) { $form_data = array( 'list_id' => $list_id ); $xml = $this->call('getlistbyid', $form_data); $list = new MailingList; $list ->setListId((int)$xml->list_id) ->setListName((string)$xml->list_name) ->setDescription((string)$xml->description) ->se...
php
public function getListById($list_id) { $form_data = array( 'list_id' => $list_id ); $xml = $this->call('getlistbyid', $form_data); $list = new MailingList; $list ->setListId((int)$xml->list_id) ->setListName((string)$xml->list_name) ->setDescription((string)$xml->description) ->se...
[ "public", "function", "getListById", "(", "$", "list_id", ")", "{", "$", "form_data", "=", "array", "(", "'list_id'", "=>", "$", "list_id", ")", ";", "$", "xml", "=", "$", "this", "->", "call", "(", "'getlistbyid'", ",", "$", "form_data", ")", ";", "...
@param $list_id @return MailingList @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669715
[ "@param", "$list_id" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L261-L282
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.exCreateList
public function exCreateList(MailingList &$list) { $form_data = array( 'list_name' => $list->getListName(), 'description' => $list->getDescription(), 'template_id' => $list->getTemplate(), 'from' => $list->getFromAddress(), 'reply_to' => $list->getReplyToAddress(), 'errors_...
php
public function exCreateList(MailingList &$list) { $form_data = array( 'list_name' => $list->getListName(), 'description' => $list->getDescription(), 'template_id' => $list->getTemplate(), 'from' => $list->getFromAddress(), 'reply_to' => $list->getReplyToAddress(), 'errors_...
[ "public", "function", "exCreateList", "(", "MailingList", "&", "$", "list", ")", "{", "$", "form_data", "=", "array", "(", "'list_name'", "=>", "$", "list", "->", "getListName", "(", ")", ",", "'description'", "=>", "$", "list", "->", "getDescription", "("...
@param MailingList $list @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969409
[ "@param", "MailingList", "$list" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L323-L339
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.createList
public function createList(MailingList $list) { $form_data = array( 'list_name' => $list->getListName(), 'description' => $list->getDescription(), 'template_id' => $list->getTemplate(), 'from' => $list->getFromAddress(), 'reply_to' => $list->getReplyToAddress(), 'errors_to'...
php
public function createList(MailingList $list) { $form_data = array( 'list_name' => $list->getListName(), 'description' => $list->getDescription(), 'template_id' => $list->getTemplate(), 'from' => $list->getFromAddress(), 'reply_to' => $list->getReplyToAddress(), 'errors_to'...
[ "public", "function", "createList", "(", "MailingList", "$", "list", ")", "{", "$", "form_data", "=", "array", "(", "'list_name'", "=>", "$", "list", "->", "getListName", "(", ")", ",", "'description'", "=>", "$", "list", "->", "getDescription", "(", ")", ...
@param MailingList $list @return bool @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969409
[ "@param", "MailingList", "$list" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L350-L366
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.findSubscribers
public function findSubscribers(Subscriber $subscriber, $exact_match = FALSE) { $form_data = array( 'email' => $subscriber->getEmail(), 'first' => $subscriber->getFirstName(), 'last' => $subscriber->getLastName(), 'exact' => (int)$exact_match, ); $xml = $this->call('find', $form_data); $...
php
public function findSubscribers(Subscriber $subscriber, $exact_match = FALSE) { $form_data = array( 'email' => $subscriber->getEmail(), 'first' => $subscriber->getFirstName(), 'last' => $subscriber->getLastName(), 'exact' => (int)$exact_match, ); $xml = $this->call('find', $form_data); $...
[ "public", "function", "findSubscribers", "(", "Subscriber", "$", "subscriber", ",", "$", "exact_match", "=", "FALSE", ")", "{", "$", "form_data", "=", "array", "(", "'email'", "=>", "$", "subscriber", "->", "getEmail", "(", ")", ",", "'first'", "=>", "$", ...
@param Subscriber $subscriber @param bool $exact_match @return array @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669925
[ "@param", "Subscriber", "$subscriber", "@param", "bool", "$exact_match" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L405-L429
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.unsubscribe
public function unsubscribe(Subscriber $subscriber, $list_id, $force_optout = FALSE) { $form_data = array( 'list_id' => $list_id, 'force_optout' => $force_optout, 'data' => 'email,first,last^' . $subscriber->getEmail() . ',' . $subscriber->getFirstName() . ',' . $subscriber-...
php
public function unsubscribe(Subscriber $subscriber, $list_id, $force_optout = FALSE) { $form_data = array( 'list_id' => $list_id, 'force_optout' => $force_optout, 'data' => 'email,first,last^' . $subscriber->getEmail() . ',' . $subscriber->getFirstName() . ',' . $subscriber-...
[ "public", "function", "unsubscribe", "(", "Subscriber", "$", "subscriber", ",", "$", "list_id", ",", "$", "force_optout", "=", "FALSE", ")", "{", "$", "form_data", "=", "array", "(", "'list_id'", "=>", "$", "list_id", ",", "'force_optout'", "=>", "$", "for...
@param Subscriber $subscriber @param $list_id @param bool $force_optout @return string @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969639
[ "@param", "Subscriber", "$subscriber", "@param", "$list_id", "@param", "bool", "$force_optout" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L514-L527
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.deleteSubscriber
public function deleteSubscriber(Subscriber $subscriber) { $form_data = array( 'data' => 'email^' . $subscriber->getEmail() ); $xml = $this->call('delete', $form_data); return trim($xml[1]); }
php
public function deleteSubscriber(Subscriber $subscriber) { $form_data = array( 'data' => 'email^' . $subscriber->getEmail() ); $xml = $this->call('delete', $form_data); return trim($xml[1]); }
[ "public", "function", "deleteSubscriber", "(", "Subscriber", "$", "subscriber", ")", "{", "$", "form_data", "=", "array", "(", "'data'", "=>", "'email^'", ".", "$", "subscriber", "->", "getEmail", "(", ")", ")", ";", "$", "xml", "=", "$", "this", "->", ...
@param Subscriber $subscriber @return string @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669915
[ "@param", "Subscriber", "$subscriber" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L538-L546
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.deleteSubscribers
public function deleteSubscribers(Array $subscribers) { $form_data = array( 'data' => 'email^' . implode("^", $subscribers) ); $xml = $this->call('delete', $form_data); return trim($xml[1]); }
php
public function deleteSubscribers(Array $subscribers) { $form_data = array( 'data' => 'email^' . implode("^", $subscribers) ); $xml = $this->call('delete', $form_data); return trim($xml[1]); }
[ "public", "function", "deleteSubscribers", "(", "Array", "$", "subscribers", ")", "{", "$", "form_data", "=", "array", "(", "'data'", "=>", "'email^'", ".", "implode", "(", "\"^\"", ",", "$", "subscribers", ")", ")", ";", "$", "xml", "=", "$", "this", ...
@param array $subscribers @return string @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669915
[ "@param", "array", "$subscribers" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L556-L565
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.showSubscriber
public function showSubscriber($subscriber_id) { $form_data = array( 'subscriber_id' => $subscriber_id ); $xml = $this->call('detail', $form_data); $subscriber_data = $xml->subscriber; $subscriber = new Subscriber; $subscriber ->setSubscriberId((int)$subscriber_data->subscriber_id) ->se...
php
public function showSubscriber($subscriber_id) { $form_data = array( 'subscriber_id' => $subscriber_id ); $xml = $this->call('detail', $form_data); $subscriber_data = $xml->subscriber; $subscriber = new Subscriber; $subscriber ->setSubscriberId((int)$subscriber_data->subscriber_id) ->se...
[ "public", "function", "showSubscriber", "(", "$", "subscriber_id", ")", "{", "$", "form_data", "=", "array", "(", "'subscriber_id'", "=>", "$", "subscriber_id", ")", ";", "$", "xml", "=", "$", "this", "->", "call", "(", "'detail'", ",", "$", "form_data", ...
@param $subscriber_id @return Subscriber @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969659
[ "@param", "$subscriber_id" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L575-L616
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.updateSubscriber
public function updateSubscriber(Subscriber $subscriber) { $form_data = array( 'list_id' => $subscriber->getListId(), 'identity_field' => 'email', 'data' => 'email,first,last,address_1,address_2,city,state,zip,country,phone,fax,company^' . $subscriber->getEmail() . ',' . $sub...
php
public function updateSubscriber(Subscriber $subscriber) { $form_data = array( 'list_id' => $subscriber->getListId(), 'identity_field' => 'email', 'data' => 'email,first,last,address_1,address_2,city,state,zip,country,phone,fax,company^' . $subscriber->getEmail() . ',' . $sub...
[ "public", "function", "updateSubscriber", "(", "Subscriber", "$", "subscriber", ")", "{", "$", "form_data", "=", "array", "(", "'list_id'", "=>", "$", "subscriber", "->", "getListId", "(", ")", ",", "'identity_field'", "=>", "'email'", ",", "'data'", "=>", "...
@param Subscriber $subscriber @return string @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969619
[ "@param", "Subscriber", "$subscriber" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L627-L649
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.changeEmailAddress
public function changeEmailAddress(Subscriber &$subscriber, $new_email) { $form_data = array( 'email' => $subscriber->getEmail(), 'email_new' => $new_email ); $this->call('change', $form_data); $subscriber->setEmail($new_email); }
php
public function changeEmailAddress(Subscriber &$subscriber, $new_email) { $form_data = array( 'email' => $subscriber->getEmail(), 'email_new' => $new_email ); $this->call('change', $form_data); $subscriber->setEmail($new_email); }
[ "public", "function", "changeEmailAddress", "(", "Subscriber", "&", "$", "subscriber", ",", "$", "new_email", ")", "{", "$", "form_data", "=", "array", "(", "'email'", "=>", "$", "subscriber", "->", "getEmail", "(", ")", ",", "'email_new'", "=>", "$", "new...
@param Subscriber $subscriber @param $new_email @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969629
[ "@param", "Subscriber", "$subscriber", "@param", "$new_email" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L659-L668
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.addSubscriberToLifecycleCampaign
public function addSubscriberToLifecycleCampaign(Subscriber $subscriber, $lc_campaign_name) { $form_data = array( 'lc_campaign_name' => $lc_campaign_name, 'data' => 'email,first^' . $subscriber->getEmail() . ',' . $subscriber->getFirstName() . ',' ); $xml = $this->call('addtolif...
php
public function addSubscriberToLifecycleCampaign(Subscriber $subscriber, $lc_campaign_name) { $form_data = array( 'lc_campaign_name' => $lc_campaign_name, 'data' => 'email,first^' . $subscriber->getEmail() . ',' . $subscriber->getFirstName() . ',' ); $xml = $this->call('addtolif...
[ "public", "function", "addSubscriberToLifecycleCampaign", "(", "Subscriber", "$", "subscriber", ",", "$", "lc_campaign_name", ")", "{", "$", "form_data", "=", "array", "(", "'lc_campaign_name'", "=>", "$", "lc_campaign_name", ",", "'data'", "=>", "'email,first^'", "...
@param Subscriber $subscriber @param $lc_campaign_name @return string @throws Exception API documentation: https://support.whatcounts.com/hc/en-us/articles/203969779
[ "@param", "Subscriber", "$subscriber", "@param", "$lc_campaign_name" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L679-L690
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.showSegmentationRules
public function showSegmentationRules() { $form_data = array( 'headers' => 1 ); $data = $this->call('show_seg', $form_data, 'csv'); $csv = new \parseCSV($data); $rules = array(); var_dump($csv); foreach ($csv->data as $ruleItem) { $rule = new SegmentationRule; //$rule->setListId($...
php
public function showSegmentationRules() { $form_data = array( 'headers' => 1 ); $data = $this->call('show_seg', $form_data, 'csv'); $csv = new \parseCSV($data); $rules = array(); var_dump($csv); foreach ($csv->data as $ruleItem) { $rule = new SegmentationRule; //$rule->setListId($...
[ "public", "function", "showSegmentationRules", "(", ")", "{", "$", "form_data", "=", "array", "(", "'headers'", "=>", "1", ")", ";", "$", "data", "=", "$", "this", "->", "call", "(", "'show_seg'", ",", "$", "form_data", ",", "'csv'", ")", ";", "$", "...
@return array @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969439
[ "@return", "array", "@throws", "Exception" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L698-L719
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.createSegmentationRule
public function createSegmentationRule(SegmentationRule $segmentation_rule) { $form_data = array( 'segmentation_name' => $segmentation_rule->getName(), 'segmentation_type' => $segmentation_rule->getType(), 'list_id' => $segmentation_rule->getListId(), 'rules' => $segmentation_rule->getRules(), ...
php
public function createSegmentationRule(SegmentationRule $segmentation_rule) { $form_data = array( 'segmentation_name' => $segmentation_rule->getName(), 'segmentation_type' => $segmentation_rule->getType(), 'list_id' => $segmentation_rule->getListId(), 'rules' => $segmentation_rule->getRules(), ...
[ "public", "function", "createSegmentationRule", "(", "SegmentationRule", "$", "segmentation_rule", ")", "{", "$", "form_data", "=", "array", "(", "'segmentation_name'", "=>", "$", "segmentation_rule", "->", "getName", "(", ")", ",", "'segmentation_type'", "=>", "$",...
@param SegmentationRule $segmentation_rule @return SegmentationRule @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669735
[ "@param", "SegmentationRule", "$segmentation_rule" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L729-L743
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.updateSegmentationRule
public function updateSegmentationRule(SegmentationRule &$segmentation_rule) { $form_data = array( 'segmentation_id' => $segmentation_rule->getId(), 'segmentation_name' => $segmentation_rule->getName(), 'segmentation_type' => $segmentation_rule->getType(), 'list_id' => $segmentation_rule->getListId...
php
public function updateSegmentationRule(SegmentationRule &$segmentation_rule) { $form_data = array( 'segmentation_id' => $segmentation_rule->getId(), 'segmentation_name' => $segmentation_rule->getName(), 'segmentation_type' => $segmentation_rule->getType(), 'list_id' => $segmentation_rule->getListId...
[ "public", "function", "updateSegmentationRule", "(", "SegmentationRule", "&", "$", "segmentation_rule", ")", "{", "$", "form_data", "=", "array", "(", "'segmentation_id'", "=>", "$", "segmentation_rule", "->", "getId", "(", ")", ",", "'segmentation_name'", "=>", "...
@param SegmentationRule $segmentation_rule @return SegmentationRule @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669745
[ "@param", "SegmentationRule", "$segmentation_rule" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L753-L766
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.deleteSegmentationRule
public function deleteSegmentationRule(SegmentationRule $segmentation_rule) { $form_data = array( 'segmentation_id' => $segmentation_rule->getId() ); $xml = $this->call('deleteseg', $form_data); return trim($xml[1]); }
php
public function deleteSegmentationRule(SegmentationRule $segmentation_rule) { $form_data = array( 'segmentation_id' => $segmentation_rule->getId() ); $xml = $this->call('deleteseg', $form_data); return trim($xml[1]); }
[ "public", "function", "deleteSegmentationRule", "(", "SegmentationRule", "$", "segmentation_rule", ")", "{", "$", "form_data", "=", "array", "(", "'segmentation_id'", "=>", "$", "segmentation_rule", "->", "getId", "(", ")", ")", ";", "$", "xml", "=", "$", "thi...
@param SegmentationRule $segmentation_rule @return SegmentationRule @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969459
[ "@param", "SegmentationRule", "$segmentation_rule" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L776-L784
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.showTemplates
public function showTemplates() { $form_data = array( 'headers' => 1 ); $data = $this->call('show_templates', $form_data, 'csv'); $csv = new \parseCSV($data); $templates = array(); foreach ($csv->data as $template_item) { $template = new Template; $template ->setTemplateId((int)$t...
php
public function showTemplates() { $form_data = array( 'headers' => 1 ); $data = $this->call('show_templates', $form_data, 'csv'); $csv = new \parseCSV($data); $templates = array(); foreach ($csv->data as $template_item) { $template = new Template; $template ->setTemplateId((int)$t...
[ "public", "function", "showTemplates", "(", ")", "{", "$", "form_data", "=", "array", "(", "'headers'", "=>", "1", ")", ";", "$", "data", "=", "$", "this", "->", "call", "(", "'show_templates'", ",", "$", "form_data", ",", "'csv'", ")", ";", "$", "cs...
@return array @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969479
[ "@return", "array", "@throws", "Exception" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L811-L831
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.getTemplateById
public function getTemplateById($template_id) { $form_data = array( 'template_id' => $template_id ); $xml = $this->call('gettemplatebyid', $form_data); $template = new Template; $template ->setFolderId((int)$xml->folder_id) ->setTemplateId((int)$xml->template_id) ->setName((string)$xml...
php
public function getTemplateById($template_id) { $form_data = array( 'template_id' => $template_id ); $xml = $this->call('gettemplatebyid', $form_data); $template = new Template; $template ->setFolderId((int)$xml->folder_id) ->setTemplateId((int)$xml->template_id) ->setName((string)$xml...
[ "public", "function", "getTemplateById", "(", "$", "template_id", ")", "{", "$", "form_data", "=", "array", "(", "'template_id'", "=>", "$", "template_id", ")", ";", "$", "xml", "=", "$", "this", "->", "call", "(", "'gettemplatebyid'", ",", "$", "form_data...
@param $template_id @return Template @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969489
[ "@param", "$template_id" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L841-L859
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.createTemplate
public function createTemplate(Template &$template) { $form_data = array( 'template_name' => $template->getName(), 'template_subject' => $template->getSubject(), 'template_body_plain' => $template->getBodyPlain(), 'template_body_html' => $template->getBodyHtml(), 'template_body_mobile' => $temp...
php
public function createTemplate(Template &$template) { $form_data = array( 'template_name' => $template->getName(), 'template_subject' => $template->getSubject(), 'template_body_plain' => $template->getBodyPlain(), 'template_body_html' => $template->getBodyHtml(), 'template_body_mobile' => $temp...
[ "public", "function", "createTemplate", "(", "Template", "&", "$", "template", ")", "{", "$", "form_data", "=", "array", "(", "'template_name'", "=>", "$", "template", "->", "getName", "(", ")", ",", "'template_subject'", "=>", "$", "template", "->", "getSub...
@param Template $template @return Template @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969469
[ "@param", "Template", "$template" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L897-L914
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.previewTemplate
public function previewTemplate(Template $template, $template_type) { $form_data = array( 'template_name' => $template->getName(), 'template_type' => $template_type ); $data = $this->call('templatepreview', $form_data); return $data; }
php
public function previewTemplate(Template $template, $template_type) { $form_data = array( 'template_name' => $template->getName(), 'template_type' => $template_type ); $data = $this->call('templatepreview', $form_data); return $data; }
[ "public", "function", "previewTemplate", "(", "Template", "$", "template", ",", "$", "template_type", ")", "{", "$", "form_data", "=", "array", "(", "'template_name'", "=>", "$", "template", "->", "getName", "(", ")", ",", "'template_type'", "=>", "$", "temp...
@param Template $template @param $template_type @return Template @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669775
[ "@param", "Template", "$template", "@param", "$template_type" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L950-L959
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.showArticles
public function showArticles() { $form_data = array( 'headers' => 1 ); $data = $this->call('showarticlelist', $form_data, 'csv'); $csv = new \parseCSV($data); $articles = array(); foreach ($csv->data as $article_item) { $article = new Article; $article ->setId((int)$article_item['...
php
public function showArticles() { $form_data = array( 'headers' => 1 ); $data = $this->call('showarticlelist', $form_data, 'csv'); $csv = new \parseCSV($data); $articles = array(); foreach ($csv->data as $article_item) { $article = new Article; $article ->setId((int)$article_item['...
[ "public", "function", "showArticles", "(", ")", "{", "$", "form_data", "=", "array", "(", "'headers'", "=>", "1", ")", ";", "$", "data", "=", "$", "this", "->", "call", "(", "'showarticlelist'", ",", "$", "form_data", ",", "'csv'", ")", ";", "$", "cs...
@return array @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969509
[ "@return", "array", "@throws", "Exception" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L967-L988
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.getArticleById
public function getArticleById(Article &$article) { $form_data = array( 'article_id' => $article->getId() ); $xml = $this->call('getarticlewithid', $form_data); $article ->setName((string)$xml->name) ->setTitle((string)$xml->title) ->setDescription((string)$xml->article_description) -...
php
public function getArticleById(Article &$article) { $form_data = array( 'article_id' => $article->getId() ); $xml = $this->call('getarticlewithid', $form_data); $article ->setName((string)$xml->name) ->setTitle((string)$xml->title) ->setDescription((string)$xml->article_description) -...
[ "public", "function", "getArticleById", "(", "Article", "&", "$", "article", ")", "{", "$", "form_data", "=", "array", "(", "'article_id'", "=>", "$", "article", "->", "getId", "(", ")", ")", ";", "$", "xml", "=", "$", "this", "->", "call", "(", "'ge...
@param Article $article @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669805
[ "@param", "Article", "$article" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L997-L1017
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.getArticleByName
public function getArticleByName(Article &$article) { $form_data = array( 'article_name' => $article->getName() ); $xml = $this->call('getarticlewithname', $form_data); $article ->setId((int)$xml->article_id) ->setTitle((string)$xml->title) ->setDescription((string)$xml->article_descripti...
php
public function getArticleByName(Article &$article) { $form_data = array( 'article_name' => $article->getName() ); $xml = $this->call('getarticlewithname', $form_data); $article ->setId((int)$xml->article_id) ->setTitle((string)$xml->title) ->setDescription((string)$xml->article_descripti...
[ "public", "function", "getArticleByName", "(", "Article", "&", "$", "article", ")", "{", "$", "form_data", "=", "array", "(", "'article_name'", "=>", "$", "article", "->", "getName", "(", ")", ")", ";", "$", "xml", "=", "$", "this", "->", "call", "(", ...
@param Article $article @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669805
[ "@param", "Article", "$article" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1026-L1046
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.copyArticle
public function copyArticle($article_name, $destination_article_name) { $form_data = array( 'article_name' => $article_name, 'dst_article_name' => $destination_article_name ); $data = $this->call('copyarticle', $form_data); return trim($data[1]); }
php
public function copyArticle($article_name, $destination_article_name) { $form_data = array( 'article_name' => $article_name, 'dst_article_name' => $destination_article_name ); $data = $this->call('copyarticle', $form_data); return trim($data[1]); }
[ "public", "function", "copyArticle", "(", "$", "article_name", ",", "$", "destination_article_name", ")", "{", "$", "form_data", "=", "array", "(", "'article_name'", "=>", "$", "article_name", ",", "'dst_article_name'", "=>", "$", "destination_article_name", ")", ...
@param $article_name @param $destination_article_name @return string @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669815
[ "@param", "$article_name", "@param", "$destination_article_name" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1057-L1066
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.createBlankArticle
public function createBlankArticle(Article &$article) { $form_data = array( 'article_name' => $article->getName() ); $data = $this->call('createblankarticle', $form_data); $article->setId((int)trim($data[1])); }
php
public function createBlankArticle(Article &$article) { $form_data = array( 'article_name' => $article->getName() ); $data = $this->call('createblankarticle', $form_data); $article->setId((int)trim($data[1])); }
[ "public", "function", "createBlankArticle", "(", "Article", "&", "$", "article", ")", "{", "$", "form_data", "=", "array", "(", "'article_name'", "=>", "$", "article", "->", "getName", "(", ")", ")", ";", "$", "data", "=", "$", "this", "->", "call", "(...
@param Article $article @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969499
[ "@param", "Article", "$article" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1075-L1083
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.createArticle
public function createArticle(Article &$article) { $form_data = array( 'article_name' => $article->getName(), 'article_title' => $article->getTitle(), 'article_description' => $article->getDescription(), 'deck' => $article->getDeck(), 'callout' => $article->getCallout(), 'author_name' => $a...
php
public function createArticle(Article &$article) { $form_data = array( 'article_name' => $article->getName(), 'article_title' => $article->getTitle(), 'article_description' => $article->getDescription(), 'deck' => $article->getDeck(), 'callout' => $article->getCallout(), 'author_name' => $a...
[ "public", "function", "createArticle", "(", "Article", "&", "$", "article", ")", "{", "$", "form_data", "=", "array", "(", "'article_name'", "=>", "$", "article", "->", "getName", "(", ")", ",", "'article_title'", "=>", "$", "article", "->", "getTitle", "(...
@param Article $article @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969499
[ "@param", "Article", "$article" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1092-L1109
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.updateArticle
public function updateArticle(Article $article) { $form_data = array( 'article_id' => $article->getId(), 'article_name' => $article->getName(), 'article_title' => $article->getTitle(), 'article_description' => $article->getDescription(), 'deck' => $article->getDeck(), 'callout' => $article-...
php
public function updateArticle(Article $article) { $form_data = array( 'article_id' => $article->getId(), 'article_name' => $article->getName(), 'article_title' => $article->getTitle(), 'article_description' => $article->getDescription(), 'deck' => $article->getDeck(), 'callout' => $article-...
[ "public", "function", "updateArticle", "(", "Article", "$", "article", ")", "{", "$", "form_data", "=", "array", "(", "'article_id'", "=>", "$", "article", "->", "getId", "(", ")", ",", "'article_name'", "=>", "$", "article", "->", "getName", "(", ")", "...
@param Article $article @return boolean @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969519
[ "@param", "Article", "$article" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1119-L1137
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.showABDefinitions
public function showABDefinitions() { $xml = $this->call('show_abdefinitions'); $ab_tests = array(); foreach ($xml->Data as $ab_test_item) { $ab_test = new ABTest; $is_testing_subject = $ab_test_item->test_subject == '1' ? TRUE : FALSE; $is_testing_from_address = $ab_test_item->test_from_addre...
php
public function showABDefinitions() { $xml = $this->call('show_abdefinitions'); $ab_tests = array(); foreach ($xml->Data as $ab_test_item) { $ab_test = new ABTest; $is_testing_subject = $ab_test_item->test_subject == '1' ? TRUE : FALSE; $is_testing_from_address = $ab_test_item->test_from_addre...
[ "public", "function", "showABDefinitions", "(", ")", "{", "$", "xml", "=", "$", "this", "->", "call", "(", "'show_abdefinitions'", ")", ";", "$", "ab_tests", "=", "array", "(", ")", ";", "foreach", "(", "$", "xml", "->", "Data", "as", "$", "ab_test_ite...
@return array @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204670035
[ "@return", "array", "@throws", "Exception" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1163-L1198
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.getABDefinition
public function getABDefinition(&$ab_definition) { $form_data = array( 'ab_definition_id' => $ab_definition->getId() ); $xml = $this->call('getabdefinitionbyid', $form_data); $xml = $xml->Data; $is_testing_subject = $xml->test_subject == '1' ? TRUE : FALSE; $is_testing_from_address = $xml->tes...
php
public function getABDefinition(&$ab_definition) { $form_data = array( 'ab_definition_id' => $ab_definition->getId() ); $xml = $this->call('getabdefinitionbyid', $form_data); $xml = $xml->Data; $is_testing_subject = $xml->test_subject == '1' ? TRUE : FALSE; $is_testing_from_address = $xml->tes...
[ "public", "function", "getABDefinition", "(", "&", "$", "ab_definition", ")", "{", "$", "form_data", "=", "array", "(", "'ab_definition_id'", "=>", "$", "ab_definition", "->", "getId", "(", ")", ")", ";", "$", "xml", "=", "$", "this", "->", "call", "(", ...
@param $ab_definition @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969789
[ "@param", "$ab_definition" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1207-L1238
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.chooseABWinner
public function chooseABWinner($ab_definition_id) { $form_data = array( 'ab_definition_id' => $ab_definition_id ); $xml = $this->call('abmailwinner', $form_data); $ab_test_statistics = new ABTestStatistics; return TRUE; }
php
public function chooseABWinner($ab_definition_id) { $form_data = array( 'ab_definition_id' => $ab_definition_id ); $xml = $this->call('abmailwinner', $form_data); $ab_test_statistics = new ABTestStatistics; return TRUE; }
[ "public", "function", "chooseABWinner", "(", "$", "ab_definition_id", ")", "{", "$", "form_data", "=", "array", "(", "'ab_definition_id'", "=>", "$", "ab_definition_id", ")", ";", "$", "xml", "=", "$", "this", "->", "call", "(", "'abmailwinner'", ",", "$", ...
@param $ab_definition_id @return bool @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204670055 @todo Find out how to get $ab_definition_id @todo Create test in examples/
[ "@param", "$ab_definition_id" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1343-L1353
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.createCustomField
public function createCustomField(Field $field) { $form_data = array( 'fieldname' => $field->getName(), 'fieldtype' => $field->getType(), 'description' => $field->getDescription() ); $this->call('customfieldcreate', $form_data); return TRUE; }
php
public function createCustomField(Field $field) { $form_data = array( 'fieldname' => $field->getName(), 'fieldtype' => $field->getType(), 'description' => $field->getDescription() ); $this->call('customfieldcreate', $form_data); return TRUE; }
[ "public", "function", "createCustomField", "(", "Field", "$", "field", ")", "{", "$", "form_data", "=", "array", "(", "'fieldname'", "=>", "$", "field", "->", "getName", "(", ")", ",", "'fieldtype'", "=>", "$", "field", "->", "getType", "(", ")", ",", ...
@param Field $field @return boolean @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669835
[ "@param", "Field", "$field" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1363-L1373
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.deleteCustomField
public function deleteCustomField(Field $field) { $form_data = array( 'fieldname' => $field->getName() ); $this->call('customfielddelete', $form_data); return TRUE; }
php
public function deleteCustomField(Field $field) { $form_data = array( 'fieldname' => $field->getName() ); $this->call('customfielddelete', $form_data); return TRUE; }
[ "public", "function", "deleteCustomField", "(", "Field", "$", "field", ")", "{", "$", "form_data", "=", "array", "(", "'fieldname'", "=>", "$", "field", "->", "getName", "(", ")", ")", ";", "$", "this", "->", "call", "(", "'customfielddelete'", ",", "$",...
@param Field $field @return boolean @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669845
[ "@param", "Field", "$field" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1383-L1391
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.getSocialProviders
public function getSocialProviders() { $xml = $this->call('getsocialproviders'); $social_providers = array(); foreach ($xml->Data as $social_provider_item) { $social_provider = new SocialProvider; $social_provider ->setProviderId((int)$social_provider_item->social_provider_id) ->setProvid...
php
public function getSocialProviders() { $xml = $this->call('getsocialproviders'); $social_providers = array(); foreach ($xml->Data as $social_provider_item) { $social_provider = new SocialProvider; $social_provider ->setProviderId((int)$social_provider_item->social_provider_id) ->setProvid...
[ "public", "function", "getSocialProviders", "(", ")", "{", "$", "xml", "=", "$", "this", "->", "call", "(", "'getsocialproviders'", ")", ";", "$", "social_providers", "=", "array", "(", ")", ";", "foreach", "(", "$", "xml", "->", "Data", "as", "$", "so...
@return array @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969549
[ "@return", "array", "@throws", "Exception" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1399-L1415
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.getSocialProviderById
public function getSocialProviderById(SocialProvider &$social_provider) { $form_data = array( 'social_provider_id' => $social_provider->getProviderId() ); $xml = $this->call('getsocialproviderbyid', $form_data); $xml = $xml->Data; $social_provider ->setProviderName((string)$xml->provider) ...
php
public function getSocialProviderById(SocialProvider &$social_provider) { $form_data = array( 'social_provider_id' => $social_provider->getProviderId() ); $xml = $this->call('getsocialproviderbyid', $form_data); $xml = $xml->Data; $social_provider ->setProviderName((string)$xml->provider) ...
[ "public", "function", "getSocialProviderById", "(", "SocialProvider", "&", "$", "social_provider", ")", "{", "$", "form_data", "=", "array", "(", "'social_provider_id'", "=>", "$", "social_provider", "->", "getProviderId", "(", ")", ")", ";", "$", "xml", "=", ...
@param SocialProvider $social_provider @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669885
[ "@param", "SocialProvider", "$social_provider" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1424-L1435
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.getSocialProviderByUserName
public function getSocialProviderByUserName(SocialProvider &$social_provider) { $form_data = array( 'username' => $social_provider->getUsername(), 'provider' => $social_provider->getProviderName() ); $xml = $this->call('getsocialproviderbyusername', $form_data); $xml = $xml->Data; $social_prov...
php
public function getSocialProviderByUserName(SocialProvider &$social_provider) { $form_data = array( 'username' => $social_provider->getUsername(), 'provider' => $social_provider->getProviderName() ); $xml = $this->call('getsocialproviderbyusername', $form_data); $xml = $xml->Data; $social_prov...
[ "public", "function", "getSocialProviderByUserName", "(", "SocialProvider", "&", "$", "social_provider", ")", "{", "$", "form_data", "=", "array", "(", "'username'", "=>", "$", "social_provider", "->", "getUsername", "(", ")", ",", "'provider'", "=>", "$", "soci...
@param SocialProvider $social_provider @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969559
[ "@param", "SocialProvider", "$social_provider" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1444-L1455
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.deleteSocialProviderById
public function deleteSocialProviderById(SocialProvider $social_provider) { $form_data = array( 'social_provider_id' => $social_provider->getProviderId() ); $this->call('deletesocialproviderbyid', $form_data); return TRUE; }
php
public function deleteSocialProviderById(SocialProvider $social_provider) { $form_data = array( 'social_provider_id' => $social_provider->getProviderId() ); $this->call('deletesocialproviderbyid', $form_data); return TRUE; }
[ "public", "function", "deleteSocialProviderById", "(", "SocialProvider", "$", "social_provider", ")", "{", "$", "form_data", "=", "array", "(", "'social_provider_id'", "=>", "$", "social_provider", "->", "getProviderId", "(", ")", ")", ";", "$", "this", "->", "c...
@param SocialProvider $social_provider @return bool @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969569
[ "@param", "SocialProvider", "$social_provider" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1465-L1473
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.deleteSocialProviderByUserName
public function deleteSocialProviderByUserName(SocialProvider $social_provider) { $form_data = array( 'provider' => $social_provider->getProviderName(), 'username' => $social_provider->getUsername() ); $this->call('deletesocialproviderbyusername', $form_data); return TRUE; }
php
public function deleteSocialProviderByUserName(SocialProvider $social_provider) { $form_data = array( 'provider' => $social_provider->getProviderName(), 'username' => $social_provider->getUsername() ); $this->call('deletesocialproviderbyusername', $form_data); return TRUE; }
[ "public", "function", "deleteSocialProviderByUserName", "(", "SocialProvider", "$", "social_provider", ")", "{", "$", "form_data", "=", "array", "(", "'provider'", "=>", "$", "social_provider", "->", "getProviderName", "(", ")", ",", "'username'", "=>", "$", "soci...
@param SocialProvider $social_provider @return bool @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969579
[ "@param", "SocialProvider", "$social_provider" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1483-L1492
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.setSocialPostForTemplate
public function setSocialPostForTemplate(Template $template, SocialProvider $social_provider, SocialPost $social_post) { $form_data = array( 'template_id' => $template->getTemplateId(), 'provider' => $social_provider->getProviderName(), 'post' => $social_post->getPost() ); $this->call('setsocialp...
php
public function setSocialPostForTemplate(Template $template, SocialProvider $social_provider, SocialPost $social_post) { $form_data = array( 'template_id' => $template->getTemplateId(), 'provider' => $social_provider->getProviderName(), 'post' => $social_post->getPost() ); $this->call('setsocialp...
[ "public", "function", "setSocialPostForTemplate", "(", "Template", "$", "template", ",", "SocialProvider", "$", "social_provider", ",", "SocialPost", "$", "social_post", ")", "{", "$", "form_data", "=", "array", "(", "'template_id'", "=>", "$", "template", "->", ...
@param Template $template @param SocialProvider $social_provider @param SocialPost $social_post @return bool @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969589
[ "@param", "Template", "$template", "@param", "SocialProvider", "$social_provider", "@param", "SocialPost", "$social_post" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1504-L1514
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.getSocialPostsByTemplateId
public function getSocialPostsByTemplateId(Template $template) { $form_data = array( 'template_id' => $template->getTemplateId() ); $xml = $this->call('getsocialpostsfortemplatebyid', $form_data); $social_posts = array(); foreach ($xml->Data as $social_post_item) { $social_post = new SocialPo...
php
public function getSocialPostsByTemplateId(Template $template) { $form_data = array( 'template_id' => $template->getTemplateId() ); $xml = $this->call('getsocialpostsfortemplatebyid', $form_data); $social_posts = array(); foreach ($xml->Data as $social_post_item) { $social_post = new SocialPo...
[ "public", "function", "getSocialPostsByTemplateId", "(", "Template", "$", "template", ")", "{", "$", "form_data", "=", "array", "(", "'template_id'", "=>", "$", "template", "->", "getTemplateId", "(", ")", ")", ";", "$", "xml", "=", "$", "this", "->", "cal...
@param Template $template @return array @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969599
[ "@param", "Template", "$template" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1524-L1543
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.sendOneOffMessage
public function sendOneOffMessage(Mail $message) { $form_data = array( 'list_id' => $message->getListId(), 'from' => $message->getFromAddress(), 'reply_to_address' => $message->getReplyToAddress(), 'errors_to' => $message->getBounceAddress(), 'sender' => $message->getSenderAddress(), 'to' =...
php
public function sendOneOffMessage(Mail $message) { $form_data = array( 'list_id' => $message->getListId(), 'from' => $message->getFromAddress(), 'reply_to_address' => $message->getReplyToAddress(), 'errors_to' => $message->getBounceAddress(), 'sender' => $message->getSenderAddress(), 'to' =...
[ "public", "function", "sendOneOffMessage", "(", "Mail", "$", "message", ")", "{", "$", "form_data", "=", "array", "(", "'list_id'", "=>", "$", "message", "->", "getListId", "(", ")", ",", "'from'", "=>", "$", "message", "->", "getFromAddress", "(", ")", ...
@param Mail $message @return string @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969749
[ "@param", "Mail", "$message" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1582-L1608
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.launchCampaign
public function launchCampaign(Campaign &$campaign) { $form_data = array( 'list_id' => $campaign->getListId(), 'template_id' => $campaign->getTemplateId(), 'subject' => $campaign->getSubject(), 'seed_list_id' => $campaign->getSeedListId(), 'segmentation_id' => $campaign->getSegmentationId(), ...
php
public function launchCampaign(Campaign &$campaign) { $form_data = array( 'list_id' => $campaign->getListId(), 'template_id' => $campaign->getTemplateId(), 'subject' => $campaign->getSubject(), 'seed_list_id' => $campaign->getSeedListId(), 'segmentation_id' => $campaign->getSegmentationId(), ...
[ "public", "function", "launchCampaign", "(", "Campaign", "&", "$", "campaign", ")", "{", "$", "form_data", "=", "array", "(", "'list_id'", "=>", "$", "campaign", "->", "getListId", "(", ")", ",", "'template_id'", "=>", "$", "campaign", "->", "getTemplateId",...
@param Campaign $campaign @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669985
[ "@param", "Campaign", "$campaign" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1653-L1678
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.scheduleCampaign
public function scheduleCampaign(Campaign &$campaign) { $form_data = array( 'list_id' => $campaign->getListId(), 'template_id' => $campaign->getTemplateId(), 'format' => $campaign->getFormat(), 'segmentation_id' => $campaign->getSegmentationId(), 'seed_list_id' => $campaign->getSeedListId(), ...
php
public function scheduleCampaign(Campaign &$campaign) { $form_data = array( 'list_id' => $campaign->getListId(), 'template_id' => $campaign->getTemplateId(), 'format' => $campaign->getFormat(), 'segmentation_id' => $campaign->getSegmentationId(), 'seed_list_id' => $campaign->getSeedListId(), ...
[ "public", "function", "scheduleCampaign", "(", "Campaign", "&", "$", "campaign", ")", "{", "$", "form_data", "=", "array", "(", "'list_id'", "=>", "$", "campaign", "->", "getListId", "(", ")", ",", "'template_id'", "=>", "$", "campaign", "->", "getTemplateId...
@param Campaign $campaign @return bool @throws Exception @todo Create test in examples/ API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204669995
[ "@param", "Campaign", "$campaign" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1690-L1740
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.processSpringbotAbandonedCart
public function processSpringbotAbandonedCart($from, $data) { $form_data = array( 'from' => $from, 'data' => $data ); $this->call('springbot_process_abandoned_cart', $form_data); return TRUE; }
php
public function processSpringbotAbandonedCart($from, $data) { $form_data = array( 'from' => $from, 'data' => $data ); $this->call('springbot_process_abandoned_cart', $form_data); return TRUE; }
[ "public", "function", "processSpringbotAbandonedCart", "(", "$", "from", ",", "$", "data", ")", "{", "$", "form_data", "=", "array", "(", "'from'", "=>", "$", "from", ",", "'data'", "=>", "$", "data", ")", ";", "$", "this", "->", "call", "(", "'springb...
@param $from @param $data @return bool @throws Exception @todo Create test in examples/ API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204670005
[ "@param", "$from", "@param", "$data" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1753-L1762
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.showCampaigns
public function showCampaigns($count) { $form_data = array( 'count' => $count, 'headers' => 1 ); $data = $this->call('show_campaigns', $form_data, 'csv'); $csv = new \parseCSV($data); $campaigns = array(); foreach ($csv->data as $campaign_item) { $campaign = new Report(); $campaign...
php
public function showCampaigns($count) { $form_data = array( 'count' => $count, 'headers' => 1 ); $data = $this->call('show_campaigns', $form_data, 'csv'); $csv = new \parseCSV($data); $campaigns = array(); foreach ($csv->data as $campaign_item) { $campaign = new Report(); $campaign...
[ "public", "function", "showCampaigns", "(", "$", "count", ")", "{", "$", "form_data", "=", "array", "(", "'count'", "=>", "$", "count", ",", "'headers'", "=>", "1", ")", ";", "$", "data", "=", "$", "this", "->", "call", "(", "'show_campaigns'", ",", ...
@param $count @return array @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969759
[ "@param", "$count" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1772-L1795
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.reportCampaignList
public function reportCampaignList($start_date, $end_date, $show_hidden) { $form_data = array( 'from_date' => $start_date, 'to_date' => $end_date, 'show_hidden' => $show_hidden ); $xml = $this->call('rpt_campaign_list', $form_data); $campaigns = array(); foreach ($xml->Data as $campaign_i...
php
public function reportCampaignList($start_date, $end_date, $show_hidden) { $form_data = array( 'from_date' => $start_date, 'to_date' => $end_date, 'show_hidden' => $show_hidden ); $xml = $this->call('rpt_campaign_list', $form_data); $campaigns = array(); foreach ($xml->Data as $campaign_i...
[ "public", "function", "reportCampaignList", "(", "$", "start_date", ",", "$", "end_date", ",", "$", "show_hidden", ")", "{", "$", "form_data", "=", "array", "(", "'from_date'", "=>", "$", "start_date", ",", "'to_date'", "=>", "$", "end_date", ",", "'show_hid...
@param $start_date @param $end_date @param $show_hidden @return array|\SimpleXMLElement|string @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969769
[ "@param", "$start_date", "@param", "$end_date", "@param", "$show_hidden" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1807-L1832
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.showCampaignStatistics
public function showCampaignStatistics(Report &$campaign_statistics) { $form_data = array( 'campaign_id' => $campaign_statistics->getCampaignId() ); $xml = $this->call('show_campaign_stats', $form_data); $campaign_statistics ->setTaskId((int)$xml->task_id) ->setListName((string)$xml->list_nam...
php
public function showCampaignStatistics(Report &$campaign_statistics) { $form_data = array( 'campaign_id' => $campaign_statistics->getCampaignId() ); $xml = $this->call('show_campaign_stats', $form_data); $campaign_statistics ->setTaskId((int)$xml->task_id) ->setListName((string)$xml->list_nam...
[ "public", "function", "showCampaignStatistics", "(", "Report", "&", "$", "campaign_statistics", ")", "{", "$", "form_data", "=", "array", "(", "'campaign_id'", "=>", "$", "campaign_statistics", "->", "getCampaignId", "(", ")", ")", ";", "$", "xml", "=", "$", ...
@param Report $campaign_statistics @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969799
[ "@param", "Report", "$campaign_statistics" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1841-L1942
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.showMultipleCampaginStatistics
public function showMultipleCampaginStatistics($campaign_ids) { $form_data = array( 'campaigns' => implode(',', $campaign_ids), 'headers' => 1 ); $data = $this->call('show_campaign_stats_multi', $form_data, 'csv'); $csv = new \parseCSV($data); $campaign_statistics = array(); foreach ($csv-...
php
public function showMultipleCampaginStatistics($campaign_ids) { $form_data = array( 'campaigns' => implode(',', $campaign_ids), 'headers' => 1 ); $data = $this->call('show_campaign_stats_multi', $form_data, 'csv'); $csv = new \parseCSV($data); $campaign_statistics = array(); foreach ($csv-...
[ "public", "function", "showMultipleCampaginStatistics", "(", "$", "campaign_ids", ")", "{", "$", "form_data", "=", "array", "(", "'campaigns'", "=>", "implode", "(", "','", ",", "$", "campaign_ids", ")", ",", "'headers'", "=>", "1", ")", ";", "$", "data", ...
@param $campaign_ids @return array @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969809
[ "@param", "$campaign_ids" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L1952-L2029
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.reportCampaignClicks
public function reportCampaignClicks($campaign_id) { $form_data = array( 'campaign_id' => $campaign_id ); $xml = $this->call('rpt_click_overview', $form_data); $campaigns_clicks = array(); foreach ($xml->Data as $campaign_clicks_item) { $campaign_clicks = new CampaignClicks(); $campaig...
php
public function reportCampaignClicks($campaign_id) { $form_data = array( 'campaign_id' => $campaign_id ); $xml = $this->call('rpt_click_overview', $form_data); $campaigns_clicks = array(); foreach ($xml->Data as $campaign_clicks_item) { $campaign_clicks = new CampaignClicks(); $campaig...
[ "public", "function", "reportCampaignClicks", "(", "$", "campaign_id", ")", "{", "$", "form_data", "=", "array", "(", "'campaign_id'", "=>", "$", "campaign_id", ")", ";", "$", "xml", "=", "$", "this", "->", "call", "(", "'rpt_click_overview'", ",", "$", "f...
@param $campaign_id @return array @throws Exception API documentation: https://support.whatcounts.com/hc/en-us/articles/204670075
[ "@param", "$campaign_id" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L2039-L2060
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.reportSubscriberClicks
public function reportSubscriberClicks($campaign_id, $url, $is_exact, $is_unique) { $form_data = array( 'campaign_id' => $campaign_id, 'url' => $url, 'exact' => $this->booleanToBit($is_exact), 'is_unique' => $this->booleanToBit($is_unique) ); $xml = $this->call('rpt_clicked_on', $form_data); ...
php
public function reportSubscriberClicks($campaign_id, $url, $is_exact, $is_unique) { $form_data = array( 'campaign_id' => $campaign_id, 'url' => $url, 'exact' => $this->booleanToBit($is_exact), 'is_unique' => $this->booleanToBit($is_unique) ); $xml = $this->call('rpt_clicked_on', $form_data); ...
[ "public", "function", "reportSubscriberClicks", "(", "$", "campaign_id", ",", "$", "url", ",", "$", "is_exact", ",", "$", "is_unique", ")", "{", "$", "form_data", "=", "array", "(", "'campaign_id'", "=>", "$", "campaign_id", ",", "'url'", "=>", "$", "url",...
@param $campaign_id @param $url @param $is_exact @param $is_unique @return array @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204670085
[ "@param", "$campaign_id", "@param", "$url", "@param", "$is_exact", "@param", "$is_unique" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L2073-L2097
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.reportDailyStatistics
public function reportDailyStatistics($campaign_id, $start_date, $end_date) { $form_data = array( 'campaign_id' => $campaign_id, 'from_date' => $start_date, 'to_date' => $end_date ); $xml = $this->call('rpt_daily_stats', $form_data); $reports = array(); foreach ($xml->Data as $daily_repor...
php
public function reportDailyStatistics($campaign_id, $start_date, $end_date) { $form_data = array( 'campaign_id' => $campaign_id, 'from_date' => $start_date, 'to_date' => $end_date ); $xml = $this->call('rpt_daily_stats', $form_data); $reports = array(); foreach ($xml->Data as $daily_repor...
[ "public", "function", "reportDailyStatistics", "(", "$", "campaign_id", ",", "$", "start_date", ",", "$", "end_date", ")", "{", "$", "form_data", "=", "array", "(", "'campaign_id'", "=>", "$", "campaign_id", ",", "'from_date'", "=>", "$", "start_date", ",", ...
@param $campaign_id @param $start_date @param $end_date @return array @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204670095
[ "@param", "$campaign_id", "@param", "$start_date", "@param", "$end_date" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L2109-L2140
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.reportBrowserInfo
public function reportBrowserInfo($campaign_id, $by_subscriber=0, $os_name, $browser, $client_type) { $form_data = array( 'campaign_id' => $campaign_id, 'by_subscriber' => $by_subscriber, 'os_name' => $os_name, 'browser' => $browser, 'client_type' => $client_type ); $xml = $this->call('rp...
php
public function reportBrowserInfo($campaign_id, $by_subscriber=0, $os_name, $browser, $client_type) { $form_data = array( 'campaign_id' => $campaign_id, 'by_subscriber' => $by_subscriber, 'os_name' => $os_name, 'browser' => $browser, 'client_type' => $client_type ); $xml = $this->call('rp...
[ "public", "function", "reportBrowserInfo", "(", "$", "campaign_id", ",", "$", "by_subscriber", "=", "0", ",", "$", "os_name", ",", "$", "browser", ",", "$", "client_type", ")", "{", "$", "form_data", "=", "array", "(", "'campaign_id'", "=>", "$", "campaign...
@param $campaign_id @param int $by_subscriber @param $os_name @param $browser @param $client_type @return array|\SimpleXMLElement|string @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969819
[ "@param", "$campaign_id", "@param", "int", "$by_subscriber", "@param", "$os_name", "@param", "$browser", "@param", "$client_type" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L2154-L2166
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.reportBounceStatistics
public function reportBounceStatistics($campaign_id, $bounce_type, $start_date, $end_date) { $form_data = array( 'campaign_id' => $campaign_id, 'bounce_type' => $bounce_type, 'from_date' => $start_date, 'to_date' => $end_date, 'headers' => 1 ); $data = $this->call('rpt_bounce_stats', $for...
php
public function reportBounceStatistics($campaign_id, $bounce_type, $start_date, $end_date) { $form_data = array( 'campaign_id' => $campaign_id, 'bounce_type' => $bounce_type, 'from_date' => $start_date, 'to_date' => $end_date, 'headers' => 1 ); $data = $this->call('rpt_bounce_stats', $for...
[ "public", "function", "reportBounceStatistics", "(", "$", "campaign_id", ",", "$", "bounce_type", ",", "$", "start_date", ",", "$", "end_date", ")", "{", "$", "form_data", "=", "array", "(", "'campaign_id'", "=>", "$", "campaign_id", ",", "'bounce_type'", "=>"...
@param $campaign_id @param $bounce_type @param $start_date @param $end_date @return array @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204670105
[ "@param", "$campaign_id", "@param", "$bounce_type", "@param", "$start_date", "@param", "$end_date" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L2179-L2193
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.reportTrackedEvents
public function reportTrackedEvents($event_type, $start_datetime, $end_datetime, $offset=0) { $form_data = array( 'event_type' => $event_type, 'start_datetime' => $start_datetime, 'end_datetime' => $end_datetime, 'offset' => $offset ); $xml = $this->call('rpt_tracked_events', $form_data); ...
php
public function reportTrackedEvents($event_type, $start_datetime, $end_datetime, $offset=0) { $form_data = array( 'event_type' => $event_type, 'start_datetime' => $start_datetime, 'end_datetime' => $end_datetime, 'offset' => $offset ); $xml = $this->call('rpt_tracked_events', $form_data); ...
[ "public", "function", "reportTrackedEvents", "(", "$", "event_type", ",", "$", "start_datetime", ",", "$", "end_datetime", ",", "$", "offset", "=", "0", ")", "{", "$", "form_data", "=", "array", "(", "'event_type'", "=>", "$", "event_type", ",", "'start_date...
@param $event_type @param $start_datetime @param $end_datetime @param $offset @return mixed @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969829
[ "@param", "$event_type", "@param", "$start_datetime", "@param", "$end_datetime", "@param", "$offset" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L2206-L2217
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.reportTrackedEventsByCampaign
public function reportTrackedEventsByCampaign($campaign_id, $event_type, $start_datetime, $end_datetime, $offset=0) { $form_data = array( 'campaign_id' => $campaign_id, 'event_type' => $event_type, 'start_datetime' => $start_datetime, 'end_datetime' => $end_datetime, 'offset' => $offset ); ...
php
public function reportTrackedEventsByCampaign($campaign_id, $event_type, $start_datetime, $end_datetime, $offset=0) { $form_data = array( 'campaign_id' => $campaign_id, 'event_type' => $event_type, 'start_datetime' => $start_datetime, 'end_datetime' => $end_datetime, 'offset' => $offset ); ...
[ "public", "function", "reportTrackedEventsByCampaign", "(", "$", "campaign_id", ",", "$", "event_type", ",", "$", "start_datetime", ",", "$", "end_datetime", ",", "$", "offset", "=", "0", ")", "{", "$", "form_data", "=", "array", "(", "'campaign_id'", "=>", ...
@param $campaign_id @param $event_type @param $start_datetime @param $end_datetime @param $offset @return mixed @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969839
[ "@param", "$campaign_id", "@param", "$event_type", "@param", "$start_datetime", "@param", "$end_datetime", "@param", "$offset" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L2231-L2243
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.showUserEvents
public function showUserEvents(Subscriber $subscriber) { $form_data = array( 'subscriber_id' => $subscriber->getSubscriberId(), 'headers' => 1 ); $data = $this->call('show_user_events', $form_data, 'csv'); $csv = new \parseCSV($data); $reports = array(); foreach ($csv->data as $reportItem)...
php
public function showUserEvents(Subscriber $subscriber) { $form_data = array( 'subscriber_id' => $subscriber->getSubscriberId(), 'headers' => 1 ); $data = $this->call('show_user_events', $form_data, 'csv'); $csv = new \parseCSV($data); $reports = array(); foreach ($csv->data as $reportItem)...
[ "public", "function", "showUserEvents", "(", "Subscriber", "$", "subscriber", ")", "{", "$", "form_data", "=", "array", "(", "'subscriber_id'", "=>", "$", "subscriber", "->", "getSubscriberId", "(", ")", ",", "'headers'", "=>", "1", ")", ";", "$", "data", ...
@param Subscriber $subscriber @return array @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969849
[ "@param", "Subscriber", "$subscriber" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L2253-L2276
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.reportSubscriberEvents
public function reportSubscriberEvents(Subscriber $subscriber, $event_type = NULL) { $form_data = array( 'subscriber_id' => $subscriber->getSubscriberId(), 'event_type' => $event_type, ); $xml = $this->call('rpt_subscriber_events', $form_data); $reports = array(); foreach ($xml->Data as $rep...
php
public function reportSubscriberEvents(Subscriber $subscriber, $event_type = NULL) { $form_data = array( 'subscriber_id' => $subscriber->getSubscriberId(), 'event_type' => $event_type, ); $xml = $this->call('rpt_subscriber_events', $form_data); $reports = array(); foreach ($xml->Data as $rep...
[ "public", "function", "reportSubscriberEvents", "(", "Subscriber", "$", "subscriber", ",", "$", "event_type", "=", "NULL", ")", "{", "$", "form_data", "=", "array", "(", "'subscriber_id'", "=>", "$", "subscriber", "->", "getSubscriberId", "(", ")", ",", "'even...
@param Subscriber $subscriber @param null $event_type @return array|\SimpleXMLElement|string @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204670115
[ "@param", "Subscriber", "$subscriber", "@param", "null", "$event_type" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L2287-L2310
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.reportUnsubscribes
public function reportUnsubscribes($list_id = NULL, $campaign_id = NULL) { $form_data = array( 'list_id' => $list_id, 'campaign_id' => $campaign_id ); $xml = $this->call('rpt_unsubscribe', $form_data); return json_decode(json_encode($xml), TRUE); }
php
public function reportUnsubscribes($list_id = NULL, $campaign_id = NULL) { $form_data = array( 'list_id' => $list_id, 'campaign_id' => $campaign_id ); $xml = $this->call('rpt_unsubscribe', $form_data); return json_decode(json_encode($xml), TRUE); }
[ "public", "function", "reportUnsubscribes", "(", "$", "list_id", "=", "NULL", ",", "$", "campaign_id", "=", "NULL", ")", "{", "$", "form_data", "=", "array", "(", "'list_id'", "=>", "$", "list_id", ",", "'campaign_id'", "=>", "$", "campaign_id", ")", ";", ...
@param null $list_id @param null $campaign_id @return array|\SimpleXMLElement|string @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204670125
[ "@param", "null", "$list_id", "@param", "null", "$campaign_id" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L2321-L2330
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.showOptouts
public function showOptouts($list_id, $days = 30) { $form_data = array( 'list_id' => $list_id, 'days' => $days ); $xml = $this->call('show_optout', $form_data); return $xml; }
php
public function showOptouts($list_id, $days = 30) { $form_data = array( 'list_id' => $list_id, 'days' => $days ); $xml = $this->call('show_optout', $form_data); return $xml; }
[ "public", "function", "showOptouts", "(", "$", "list_id", ",", "$", "days", "=", "30", ")", "{", "$", "form_data", "=", "array", "(", "'list_id'", "=>", "$", "list_id", ",", "'days'", "=>", "$", "days", ")", ";", "$", "xml", "=", "$", "this", "->",...
@param $list_id @param int $days @return array|\SimpleXMLElement|string @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204670135
[ "@param", "$list_id", "@param", "int", "$days" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L2341-L2350
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.showHardBounces
public function showHardBounces($list_id, $days = 30) { $form_data = array( 'list_id' => $list_id, 'days' => $days ); $xml = $this->call('show_hard', $form_data); return json_decode(json_encode($xml->email), TRUE); }
php
public function showHardBounces($list_id, $days = 30) { $form_data = array( 'list_id' => $list_id, 'days' => $days ); $xml = $this->call('show_hard', $form_data); return json_decode(json_encode($xml->email), TRUE); }
[ "public", "function", "showHardBounces", "(", "$", "list_id", ",", "$", "days", "=", "30", ")", "{", "$", "form_data", "=", "array", "(", "'list_id'", "=>", "$", "list_id", ",", "'days'", "=>", "$", "days", ")", ";", "$", "xml", "=", "$", "this", "...
@param $list_id @param int $days @return mixed @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/204670145
[ "@param", "$list_id", "@param", "int", "$days" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L2379-L2388
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.reportSubscriberByUpdate
public function reportSubscriberByUpdate($list_id, $start_datetime, $end_datetime) { $form_data = array( 'list_id' => $list_id, 'start_datetime' => $start_datetime, 'end_datetime' => $end_datetime ); $xml = $this->call('rpt_sub_by_update_datetime', $form_data); return json_decode(json_encode(...
php
public function reportSubscriberByUpdate($list_id, $start_datetime, $end_datetime) { $form_data = array( 'list_id' => $list_id, 'start_datetime' => $start_datetime, 'end_datetime' => $end_datetime ); $xml = $this->call('rpt_sub_by_update_datetime', $form_data); return json_decode(json_encode(...
[ "public", "function", "reportSubscriberByUpdate", "(", "$", "list_id", ",", "$", "start_datetime", ",", "$", "end_datetime", ")", "{", "$", "form_data", "=", "array", "(", "'list_id'", "=>", "$", "list_id", ",", "'start_datetime'", "=>", "$", "start_datetime", ...
@param $list_id @param $start_datetime @param $end_datetime @return mixed @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969669
[ "@param", "$list_id", "@param", "$start_datetime", "@param", "$end_datetime" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L2460-L2470
ZayconFoods/whatcounts
src/ZayconWhatCounts/WhatCounts.php
WhatCounts.reportSubscribersInList
public function reportSubscribersInList($list_id, $offset=0) { $form_data = array( 'list_id' => $list_id, 'offset' => $offset ); $xml = $this->call('rpt_subscribers_in_list', $form_data); return json_decode(json_encode($xml), TRUE); }
php
public function reportSubscribersInList($list_id, $offset=0) { $form_data = array( 'list_id' => $list_id, 'offset' => $offset ); $xml = $this->call('rpt_subscribers_in_list', $form_data); return json_decode(json_encode($xml), TRUE); }
[ "public", "function", "reportSubscribersInList", "(", "$", "list_id", ",", "$", "offset", "=", "0", ")", "{", "$", "form_data", "=", "array", "(", "'list_id'", "=>", "$", "list_id", ",", "'offset'", "=>", "$", "offset", ")", ";", "$", "xml", "=", "$", ...
@param $list_id @param int $offset @return mixed @throws Exception API documentation: https://whatcounts.zendesk.com/hc/en-us/articles/203969429
[ "@param", "$list_id", "@param", "int", "$offset" ]
train
https://github.com/ZayconFoods/whatcounts/blob/ff18491fc152571a72e4b558f8102f4fbb9bb7fd/src/ZayconWhatCounts/WhatCounts.php#L2481-L2490
php-lug/lug
src/Bundle/GridBundle/Form/EventSubscriber/Batch/Doctrine/MongoDB/GridBatchSubscriber.php
GridBatchSubscriber.findChoices
protected function findChoices(GridInterface $grid, RepositoryInterface $repository, array $choices) { $result = $repository ->createQueryBuilderForCollection() ->field($repository->getProperty($grid->getResource()->getIdPropertyPath())) ->in($choices) ->getQu...
php
protected function findChoices(GridInterface $grid, RepositoryInterface $repository, array $choices) { $result = $repository ->createQueryBuilderForCollection() ->field($repository->getProperty($grid->getResource()->getIdPropertyPath())) ->in($choices) ->getQu...
[ "protected", "function", "findChoices", "(", "GridInterface", "$", "grid", ",", "RepositoryInterface", "$", "repository", ",", "array", "$", "choices", ")", "{", "$", "result", "=", "$", "repository", "->", "createQueryBuilderForCollection", "(", ")", "->", "fie...
{@inheritdoc}
[ "{" ]
train
https://github.com/php-lug/lug/blob/81c109f187eba0a60f17e8cc59984ebb31841db7/src/Bundle/GridBundle/Form/EventSubscriber/Batch/Doctrine/MongoDB/GridBatchSubscriber.php#L26-L37
yuncms/yii2-authentication
frontend/controllers/AuthenticationController.php
AuthenticationController.actionIndex
public function actionIndex() { if (($model = Authentication::findOne(['user_id' => Yii::$app->user->id])) == null) { return $this->redirect(['create']); } return $this->render('index', [ 'model' => $model ]); }
php
public function actionIndex() { if (($model = Authentication::findOne(['user_id' => Yii::$app->user->id])) == null) { return $this->redirect(['create']); } return $this->render('index', [ 'model' => $model ]); }
[ "public", "function", "actionIndex", "(", ")", "{", "if", "(", "(", "$", "model", "=", "Authentication", "::", "findOne", "(", "[", "'user_id'", "=>", "Yii", "::", "$", "app", "->", "user", "->", "id", "]", ")", ")", "==", "null", ")", "{", "return...
认证首页 @return string
[ "认证首页" ]
train
https://github.com/yuncms/yii2-authentication/blob/02b70f7d2587480edb6dcc18ce256db662f1ed0d/frontend/controllers/AuthenticationController.php#L59-L67
yuncms/yii2-authentication
frontend/controllers/AuthenticationController.php
AuthenticationController.actionCreate
public function actionCreate() { if ((Authentication::findOne(['user_id' => Yii::$app->user->id])) != null || Authentication::isAuthentication(Yii::$app->user->id)) { return $this->redirect(['index']); } $model = new Authentication(); $model->scenario = Authentication::SC...
php
public function actionCreate() { if ((Authentication::findOne(['user_id' => Yii::$app->user->id])) != null || Authentication::isAuthentication(Yii::$app->user->id)) { return $this->redirect(['index']); } $model = new Authentication(); $model->scenario = Authentication::SC...
[ "public", "function", "actionCreate", "(", ")", "{", "if", "(", "(", "Authentication", "::", "findOne", "(", "[", "'user_id'", "=>", "Yii", "::", "$", "app", "->", "user", "->", "id", "]", ")", ")", "!=", "null", "||", "Authentication", "::", "isAuthen...
提交实名认证 @return string|Response
[ "提交实名认证" ]
train
https://github.com/yuncms/yii2-authentication/blob/02b70f7d2587480edb6dcc18ce256db662f1ed0d/frontend/controllers/AuthenticationController.php#L73-L86
yuncms/yii2-authentication
frontend/controllers/AuthenticationController.php
AuthenticationController.actionUpdate
public function actionUpdate() { /** @var Authentication $model */ if (($model = Authentication::findOne(['user_id' => Yii::$app->user->id])) == null) { return $this->redirect(['create']); } $model->scenario = Authentication::SCENARIO_UPDATE; if ($model->load(Yii:...
php
public function actionUpdate() { /** @var Authentication $model */ if (($model = Authentication::findOne(['user_id' => Yii::$app->user->id])) == null) { return $this->redirect(['create']); } $model->scenario = Authentication::SCENARIO_UPDATE; if ($model->load(Yii:...
[ "public", "function", "actionUpdate", "(", ")", "{", "/** @var Authentication $model */", "if", "(", "(", "$", "model", "=", "Authentication", "::", "findOne", "(", "[", "'user_id'", "=>", "Yii", "::", "$", "app", "->", "user", "->", "id", "]", ")", ")", ...
更新实名认证 @return string|Response
[ "更新实名认证" ]
train
https://github.com/yuncms/yii2-authentication/blob/02b70f7d2587480edb6dcc18ce256db662f1ed0d/frontend/controllers/AuthenticationController.php#L92-L105
ShaoZeMing/laravel-merchant
src/Controllers/AuthController.php
AuthController.postRegister
public function postRegister(Request $request) { $credentials = $request->only(['mobile', 'password']); $validator = Validator::make($credentials, [ 'mobile' => 'required', 'password' => 'required', ]); if ($validator->fails()) { return Redirect::back()->wit...
php
public function postRegister(Request $request) { $credentials = $request->only(['mobile', 'password']); $validator = Validator::make($credentials, [ 'mobile' => 'required', 'password' => 'required', ]); if ($validator->fails()) { return Redirect::back()->wit...
[ "public", "function", "postRegister", "(", "Request", "$", "request", ")", "{", "$", "credentials", "=", "$", "request", "->", "only", "(", "[", "'mobile'", ",", "'password'", "]", ")", ";", "$", "validator", "=", "Validator", "::", "make", "(", "$", "...
@param Request $request @return mixed
[ "@param", "Request", "$request" ]
train
https://github.com/ShaoZeMing/laravel-merchant/blob/20801b1735e7832a6e58b37c2c391328f8d626fa/src/Controllers/AuthController.php#L40-L56
ShaoZeMing/laravel-merchant
src/Controllers/AuthController.php
AuthController.postLogin
public function postLogin(Request $request) { $credentials = $request->only(['mobile', 'password']); $validator = Validator::make($credentials, [ 'mobile' => 'required', 'password' => 'required', ]); if ($validator->fails()) { return Redirect::back()->withIn...
php
public function postLogin(Request $request) { $credentials = $request->only(['mobile', 'password']); $validator = Validator::make($credentials, [ 'mobile' => 'required', 'password' => 'required', ]); if ($validator->fails()) { return Redirect::back()->withIn...
[ "public", "function", "postLogin", "(", "Request", "$", "request", ")", "{", "$", "credentials", "=", "$", "request", "->", "only", "(", "[", "'mobile'", ",", "'password'", "]", ")", ";", "$", "validator", "=", "Validator", "::", "make", "(", "$", "cre...
@param Request $request @return mixed
[ "@param", "Request", "$request" ]
train
https://github.com/ShaoZeMing/laravel-merchant/blob/20801b1735e7832a6e58b37c2c391328f8d626fa/src/Controllers/AuthController.php#L123-L142
ShaoZeMing/laravel-merchant
src/Controllers/AuthController.php
AuthController.settingForm
protected function settingForm() { return Administrator::form(function (Form $form) { $form->display('mobile', trans('merchant.mobile'))->rules('required'); $form->email('email', trans('merchant.email'))->rules('required'); $form->text('name', trans('merchant.name'))->rul...
php
protected function settingForm() { return Administrator::form(function (Form $form) { $form->display('mobile', trans('merchant.mobile'))->rules('required'); $form->email('email', trans('merchant.email'))->rules('required'); $form->text('name', trans('merchant.name'))->rul...
[ "protected", "function", "settingForm", "(", ")", "{", "return", "Administrator", "::", "form", "(", "function", "(", "Form", "$", "form", ")", "{", "$", "form", "->", "display", "(", "'mobile'", ",", "trans", "(", "'merchant.mobile'", ")", ")", "->", "r...
Model-form for user setting. @return Form
[ "Model", "-", "form", "for", "user", "setting", "." ]
train
https://github.com/ShaoZeMing/laravel-merchant/blob/20801b1735e7832a6e58b37c2c391328f8d626fa/src/Controllers/AuthController.php#L193-L221
znck/countries
src/Translator.php
Translator.get
public function get(string $key, string $locale = null) { list($country) = $this->parseKey($key); $locale = $locale ?? $this->fallbackLocale; $this->load($locale); if ($this->has($locale, $country)) { return $this->loaded[$locale][$country]; } return $...
php
public function get(string $key, string $locale = null) { list($country) = $this->parseKey($key); $locale = $locale ?? $this->fallbackLocale; $this->load($locale); if ($this->has($locale, $country)) { return $this->loaded[$locale][$country]; } return $...
[ "public", "function", "get", "(", "string", "$", "key", ",", "string", "$", "locale", "=", "null", ")", "{", "list", "(", "$", "country", ")", "=", "$", "this", "->", "parseKey", "(", "$", "key", ")", ";", "$", "locale", "=", "$", "locale", "??",...
@param string $key @param string|null $locale @return string
[ "@param", "string", "$key", "@param", "string|null", "$locale" ]
train
https://github.com/znck/countries/blob/a78a2b302dfa8eacab8fe0c06127dbb37fa98fd3/src/Translator.php#L60-L73
znck/countries
src/Translator.php
Translator.getName
public function getName(string $key, string $locale = null) { return $this->get($key, $locale); }
php
public function getName(string $key, string $locale = null) { return $this->get($key, $locale); }
[ "public", "function", "getName", "(", "string", "$", "key", ",", "string", "$", "locale", "=", "null", ")", "{", "return", "$", "this", "->", "get", "(", "$", "key", ",", "$", "locale", ")", ";", "}" ]
@param string $key @param string|null $locale @return string
[ "@param", "string", "$key", "@param", "string|null", "$locale" ]
train
https://github.com/znck/countries/blob/a78a2b302dfa8eacab8fe0c06127dbb37fa98fd3/src/Translator.php#L81-L84
znck/countries
src/Translator.php
Translator.has
protected function has(string $locale, string $country) { return isset($this->loaded[$locale][$country]); }
php
protected function has(string $locale, string $country) { return isset($this->loaded[$locale][$country]); }
[ "protected", "function", "has", "(", "string", "$", "locale", ",", "string", "$", "country", ")", "{", "return", "isset", "(", "$", "this", "->", "loaded", "[", "$", "locale", "]", "[", "$", "country", "]", ")", ";", "}" ]
@param string $locale @param string $country @return bool
[ "@param", "string", "$locale", "@param", "string", "$country" ]
train
https://github.com/znck/countries/blob/a78a2b302dfa8eacab8fe0c06127dbb37fa98fd3/src/Translator.php#L104-L107
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Main.onRequestTerminate
public function onRequestTerminate() { // lets see if there were unhandled fatal errors $lasterror=error_get_last(); if(!is_null($lasterror)){ if($lasterror['type'] & (E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR)){ // fatal error occured ...
php
public function onRequestTerminate() { // lets see if there were unhandled fatal errors $lasterror=error_get_last(); if(!is_null($lasterror)){ if($lasterror['type'] & (E_ERROR | E_PARSE | E_CORE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR)){ // fatal error occured ...
[ "public", "function", "onRequestTerminate", "(", ")", "{", "// lets see if there were unhandled fatal errors\r", "$", "lasterror", "=", "error_get_last", "(", ")", ";", "if", "(", "!", "is_null", "(", "$", "lasterror", ")", ")", "{", "if", "(", "$", "lasterror",...
Gets executed when request terminates WARNING: do not call exit() or errorhandling will break
[ "Gets", "executed", "when", "request", "terminates" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L508-L529
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Main.debugLog
public function debugLog($message) { if($this->DebugAddTime){ // adding datetime to message (useful when DebugMethod=='echoplain') if($this->DebugMultiLine){ // multiline is enabled, so add the time for each line in the $message $message_changed=''; foreach(explode("\n",...
php
public function debugLog($message) { if($this->DebugAddTime){ // adding datetime to message (useful when DebugMethod=='echoplain') if($this->DebugMultiLine){ // multiline is enabled, so add the time for each line in the $message $message_changed=''; foreach(explode("\n",...
[ "public", "function", "debugLog", "(", "$", "message", ")", "{", "if", "(", "$", "this", "->", "DebugAddTime", ")", "{", "// adding datetime to message (useful when DebugMethod=='echoplain')\r", "if", "(", "$", "this", "->", "DebugMultiLine", ")", "{", "// multiline...
Log the debug message to STDOUT (html) or STDERR Automaticly adds BR and newline when outputting to STDOUT. depends on config key 'debugmethod' which can be 'echo' or 'echoplain' or 'error_log' @param string $message
[ "Log", "the", "debug", "message", "to", "STDOUT", "(", "html", ")", "or", "STDERR", "Automaticly", "adds", "BR", "and", "newline", "when", "outputting", "to", "STDOUT", "." ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L588-L633
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Main.error_log_wrap
public static function error_log_wrap($message) { // msglen is the remain length of the message that needs to be written. $msglen=strlen($message); $i=0; while($msglen>0){ if($msglen>8000){ // the remaining message that needs to be written is still longer than 8000 bytes ...
php
public static function error_log_wrap($message) { // msglen is the remain length of the message that needs to be written. $msglen=strlen($message); $i=0; while($msglen>0){ if($msglen>8000){ // the remaining message that needs to be written is still longer than 8000 bytes ...
[ "public", "static", "function", "error_log_wrap", "(", "$", "message", ")", "{", "// msglen is the remain length of the message that needs to be written.\r", "$", "msglen", "=", "strlen", "(", "$", "message", ")", ";", "$", "i", "=", "0", ";", "while", "(", "$", ...
Log the message to the error_log, but wrap at 8000 bytes to prevent automatic cutoff by the PHP error_log function @param string $message
[ "Log", "the", "message", "to", "the", "error_log", "but", "wrap", "at", "8000", "bytes", "to", "prevent", "automatic", "cutoff", "by", "the", "PHP", "error_log", "function" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L641-L659
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Main.debugLogCPU
public function debugLogCPU($message='') { // get resource usage $dat = getrusage(); $message.='[u:'.substr(($dat["ru_utime.tv_sec"]*1e6+$dat["ru_utime.tv_usec"])-$this->startUserCPU,0,-3).'ms / s:'.substr(($dat["ru_stime.tv_sec"]*1e6+$dat["ru_stime.tv_usec"])-$this->startSystemCPU,0,-3).'ms]'; $...
php
public function debugLogCPU($message='') { // get resource usage $dat = getrusage(); $message.='[u:'.substr(($dat["ru_utime.tv_sec"]*1e6+$dat["ru_utime.tv_usec"])-$this->startUserCPU,0,-3).'ms / s:'.substr(($dat["ru_stime.tv_sec"]*1e6+$dat["ru_stime.tv_usec"])-$this->startSystemCPU,0,-3).'ms]'; $...
[ "public", "function", "debugLogCPU", "(", "$", "message", "=", "''", ")", "{", "// get resource usage\r", "$", "dat", "=", "getrusage", "(", ")", ";", "$", "message", ".=", "'[u:'", ".", "substr", "(", "(", "$", "dat", "[", "\"ru_utime.tv_sec\"", "]", "*...
Debug log the CPU used by the script Please note its only updated every 10ms. output: <user message>[u: <user time>ms / s:<system time>ms] @param string $message [optional message to prepend]
[ "Debug", "log", "the", "CPU", "used", "by", "the", "script" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L684-L690
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Main.getGlobalStorage
public function getGlobalStorage($name) { if (!$this->GlobalStorageExists($name)) { return false; } return $this->global_data->get($name); }
php
public function getGlobalStorage($name) { if (!$this->GlobalStorageExists($name)) { return false; } return $this->global_data->get($name); }
[ "public", "function", "getGlobalStorage", "(", "$", "name", ")", "{", "if", "(", "!", "$", "this", "->", "GlobalStorageExists", "(", "$", "name", ")", ")", "{", "return", "false", ";", "}", "return", "$", "this", "->", "global_data", "->", "get", "(", ...
Retrieve from Global storage @param string $name @return mixed pointer to Plugin or false when not found
[ "Retrieve", "from", "Global", "storage" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L721-L726
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Main.globalStorageExists
final public function globalStorageExists($classname) { if (!isset($this->global_data)) { throw new Exception("Global storare is not initialised, can't check if object ".$classname." exists, forget to load parent::__construct?"); } return $this->global_data->offsetExists($classname); }
php
final public function globalStorageExists($classname) { if (!isset($this->global_data)) { throw new Exception("Global storare is not initialised, can't check if object ".$classname." exists, forget to load parent::__construct?"); } return $this->global_data->offsetExists($classname); }
[ "final", "public", "function", "globalStorageExists", "(", "$", "classname", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "global_data", ")", ")", "{", "throw", "new", "Exception", "(", "\"Global storare is not initialised, can't check if object \"", ...
Checks if $name exists in Global Storage @param string $name @return boolean
[ "Checks", "if", "$name", "exists", "in", "Global", "Storage" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L744-L749
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Main.includeClass
public static function includeClass($classname, $loadscheme='Web2All', $package='', $set_includedir=false) { // $path will be the relative path to the classfile by exploding the namespace $path = ''; $filename = $classname; // support namespaces if(strpos($classname,'\\')){ // ok, contai...
php
public static function includeClass($classname, $loadscheme='Web2All', $package='', $set_includedir=false) { // $path will be the relative path to the classfile by exploding the namespace $path = ''; $filename = $classname; // support namespaces if(strpos($classname,'\\')){ // ok, contai...
[ "public", "static", "function", "includeClass", "(", "$", "classname", ",", "$", "loadscheme", "=", "'Web2All'", ",", "$", "package", "=", "''", ",", "$", "set_includedir", "=", "false", ")", "{", "// $path will be the relative path to the classfile by exploding the n...
Load the classfile for the given class This method will blindly include the first php file which it finds for the given classname. It will not throw exceptions and won't indicate if the operation succeeded. It is used by both the autoloader and the loadClass() method, which is historically the method used to load a cl...
[ "Load", "the", "classfile", "for", "the", "given", "class" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L764-L829
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Main.loadClass
public static function loadClass($classname, $loadscheme='Web2All', $package='', $set_includedir=false) { $class_exists=class_exists($classname) || interface_exists($classname); if ($class_exists && !$set_includedir) { // if class already exists, we don't need to do a thing // but one CAVEAT: if...
php
public static function loadClass($classname, $loadscheme='Web2All', $package='', $set_includedir=false) { $class_exists=class_exists($classname) || interface_exists($classname); if ($class_exists && !$set_includedir) { // if class already exists, we don't need to do a thing // but one CAVEAT: if...
[ "public", "static", "function", "loadClass", "(", "$", "classname", ",", "$", "loadscheme", "=", "'Web2All'", ",", "$", "package", "=", "''", ",", "$", "set_includedir", "=", "false", ")", "{", "$", "class_exists", "=", "class_exists", "(", "$", "classname...
Include php file for Web2All_Manager_Plugin @param string $classname @param string $loadscheme [optional (Web2All|PEAR|INC|PLAIN) defaults to Web2All] @param string $package [optional packagename] @param boolean $set_includedir [optional bool, set true to add the package dir to include path]
[ "Include", "php", "file", "for", "Web2All_Manager_Plugin" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L839-L849
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Main.initClass
public function initClass($classname,$arguments=array(),$isplugin=true) { // when we no longer have any PHP 5.2 we can replace below with static::loadClass($classname); // we cannot use self::loadClass($classname); because it will break extending Main classes which // redefine the loadClass method. (...
php
public function initClass($classname,$arguments=array(),$isplugin=true) { // when we no longer have any PHP 5.2 we can replace below with static::loadClass($classname); // we cannot use self::loadClass($classname); because it will break extending Main classes which // redefine the loadClass method. (...
[ "public", "function", "initClass", "(", "$", "classname", ",", "$", "arguments", "=", "array", "(", ")", ",", "$", "isplugin", "=", "true", ")", "{", "// when we no longer have any PHP 5.2 we can replace below with static::loadClass($classname);\r", "// we cannot use self::...
Initialize Web2All_Manager_Plugin returns Web2All_Manager_Plugin object @param string $classname @param array $arguments @param boolean $isplugin Force the first constructor param to be the Web2All_Manager_Main object. Set false for automatically detection if this is required. @return object
[ "Initialize", "Web2All_Manager_Plugin", "returns", "Web2All_Manager_Plugin", "object" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L862-L897
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Main.getIP
public function getIP() { if ($this->ManagerConfig['get_ip_from_xforwarded'] && isset($_SERVER["HTTP_X_FORWARDED_FOR"]) && trim(strtolower($_SERVER["HTTP_X_FORWARDED_FOR"]))!='unknown' ) { // When viewed through an anonymous proxy, the address string can contain multiple ip's separated by commas. /...
php
public function getIP() { if ($this->ManagerConfig['get_ip_from_xforwarded'] && isset($_SERVER["HTTP_X_FORWARDED_FOR"]) && trim(strtolower($_SERVER["HTTP_X_FORWARDED_FOR"]))!='unknown' ) { // When viewed through an anonymous proxy, the address string can contain multiple ip's separated by commas. /...
[ "public", "function", "getIP", "(", ")", "{", "if", "(", "$", "this", "->", "ManagerConfig", "[", "'get_ip_from_xforwarded'", "]", "&&", "isset", "(", "$", "_SERVER", "[", "\"HTTP_X_FORWARDED_FOR\"", "]", ")", "&&", "trim", "(", "strtolower", "(", "$", "_S...
Returns the IP address from which the user is viewing the current page. Defaults to $_SERVER['REMOTE_ADDR'], unless the get_ip_from_xforwarded config is set to true, then $ _SERVER["HTTP_X_FORWARDED_FOR"] is used if available. Use get_ip_from_xforwarded only in a situation where we can trust HTTP_X_FORWARDED_FOR. Like...
[ "Returns", "the", "IP", "address", "from", "which", "the", "user", "is", "viewing", "the", "current", "page", ".", "Defaults", "to", "$_SERVER", "[", "REMOTE_ADDR", "]", "unless", "the", "get_ip_from_xforwarded", "config", "is", "set", "to", "true", "then", ...
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L928-L953
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Main.newInstance
public static function newInstance($includefile='include.php') { // throws compile error if not found require_once(dirname(__FILE__).'/../../'.$includefile); if(!defined('WEB2ALL_CONFIG_CLASS')){ throw new Exception('WEB2ALL_CONFIG_CLASS not defined!'); } // load config cl...
php
public static function newInstance($includefile='include.php') { // throws compile error if not found require_once(dirname(__FILE__).'/../../'.$includefile); if(!defined('WEB2ALL_CONFIG_CLASS')){ throw new Exception('WEB2ALL_CONFIG_CLASS not defined!'); } // load config cl...
[ "public", "static", "function", "newInstance", "(", "$", "includefile", "=", "'include.php'", ")", "{", "// throws compile error if not found\r", "require_once", "(", "dirname", "(", "__FILE__", ")", ".", "'/../../'", ".", "$", "includefile", ")", ";", "if", "(", ...
Instantiates Web2All_Manager_Main This shorthand instantiation has a few prequisites: - the include file /include/include.php must exist - this include file must have the WEB2ALL_CONFIG_CLASS constant defined - the WEB2ALL_CONFIG_CLASS constant must contain the classname of a config class which extends Web2All_Manager...
[ "Instantiates", "Web2All_Manager_Main" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L977-L995
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Main.registerIncludeRoot
public static function registerIncludeRoot($root=null) { if(is_null($root)){ $root = dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR; } if(!in_array($root, self::$frameworkRoots)){ self::$frameworkRoots[] = $root; return true; } re...
php
public static function registerIncludeRoot($root=null) { if(is_null($root)){ $root = dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR; } if(!in_array($root, self::$frameworkRoots)){ self::$frameworkRoots[] = $root; return true; } re...
[ "public", "static", "function", "registerIncludeRoot", "(", "$", "root", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "root", ")", ")", "{", "$", "root", "=", "dirname", "(", "__FILE__", ")", ".", "DIRECTORY_SEPARATOR", ".", "'..'", ".", "DIR...
Registers an include root directory Used by autoloader and loadClass() @param string $root directory path @return boolean was the directory added
[ "Registers", "an", "include", "root", "directory" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L1005-L1015
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Main.unregisterIncludeRoot
public static function unregisterIncludeRoot($root) { $found_key=array_search($root, self::$frameworkRoots, true); if($found_key!==false){ unset(self::$frameworkRoots[$found_key]); return true; } return false; }
php
public static function unregisterIncludeRoot($root) { $found_key=array_search($root, self::$frameworkRoots, true); if($found_key!==false){ unset(self::$frameworkRoots[$found_key]); return true; } return false; }
[ "public", "static", "function", "unregisterIncludeRoot", "(", "$", "root", ")", "{", "$", "found_key", "=", "array_search", "(", "$", "root", ",", "self", "::", "$", "frameworkRoots", ",", "true", ")", ";", "if", "(", "$", "found_key", "!==", "false", ")...
Unregisters an include root directory @param string $root directory path @return boolean was the directory removed
[ "Unregisters", "an", "include", "root", "directory" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L1023-L1031
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Main.registerAutoloader
public static function registerAutoloader($root=null) { self::registerIncludeRoot($root); if(!self::$autoloaderAdded){ self::$autoloaderAdded = true; return spl_autoload_register(array('Web2All_Manager_Main','loadClass')); } return true; }
php
public static function registerAutoloader($root=null) { self::registerIncludeRoot($root); if(!self::$autoloaderAdded){ self::$autoloaderAdded = true; return spl_autoload_register(array('Web2All_Manager_Main','loadClass')); } return true; }
[ "public", "static", "function", "registerAutoloader", "(", "$", "root", "=", "null", ")", "{", "self", "::", "registerIncludeRoot", "(", "$", "root", ")", ";", "if", "(", "!", "self", "::", "$", "autoloaderAdded", ")", "{", "self", "::", "$", "autoloader...
Registers an autoloader for the Web2All framework it will call the Web2All_Manager_Main::loadClass @return boolean
[ "Registers", "an", "autoloader", "for", "the", "Web2All", "framework" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L1050-L1058
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_ErrorObserverable.notifyObservers
public function notifyObservers() { /** * restore original error handler, to avoid problems when errors occurres * in handling other errors */ $this->Web2All->restoreErrorHandlers(); foreach($this->observers as $observer) { $observer->update($this); } foreach($this->obs...
php
public function notifyObservers() { /** * restore original error handler, to avoid problems when errors occurres * in handling other errors */ $this->Web2All->restoreErrorHandlers(); foreach($this->observers as $observer) { $observer->update($this); } foreach($this->obs...
[ "public", "function", "notifyObservers", "(", ")", "{", "/**\r\n * restore original error handler, to avoid problems when errors occurres\r\n * in handling other errors\r\n */", "$", "this", "->", "Web2All", "->", "restoreErrorHandlers", "(", ")", ";", "foreach", "(", ...
If this object has changed, as indicated by the hasChanged method, then start observers as needed and notify them, and then call the clearChanged method to indicate that this object has no longer changed.
[ "If", "this", "object", "has", "changed", "as", "indicated", "by", "the", "hasChanged", "method", "then", "start", "observers", "as", "needed", "and", "notify", "them", "and", "then", "call", "the", "clearChanged", "method", "to", "indicate", "that", "this", ...
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L1173-L1187
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_ErrorObserverable.flushEmailErrors
public function flushEmailErrors() { foreach($this->observers as $observer) { if(get_class($observer)=='Web2All_ErrorObserver_Email'){ $observer->flushErrors(); } } foreach($this->observer_names as $classname) { if($classname=='Web2All_ErrorObserver_Email'){ $this->...
php
public function flushEmailErrors() { foreach($this->observers as $observer) { if(get_class($observer)=='Web2All_ErrorObserver_Email'){ $observer->flushErrors(); } } foreach($this->observer_names as $classname) { if($classname=='Web2All_ErrorObserver_Email'){ $this->...
[ "public", "function", "flushEmailErrors", "(", ")", "{", "foreach", "(", "$", "this", "->", "observers", "as", "$", "observer", ")", "{", "if", "(", "get_class", "(", "$", "observer", ")", "==", "'Web2All_ErrorObserver_Email'", ")", "{", "$", "observer", "...
flush e-mail errors if any If there are any errors queued for emailing they will be e-mailed and the errorstate will be reset. This is useful for long running processes like daemons.
[ "flush", "e", "-", "mail", "errors", "if", "any" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L1195-L1206
web2all/framework
src/Web2All/Manager/Main.class.php
Countable.getInstance
public static function getInstance() { if(self::$DebugLevel >= Web2All_Manager_Main::DEBUGLEVEL_FULL) { echo "[Vraag een instantie van de Web2All_Manager_Registry Class op]<br />\n"; } if (!Web2All_Manager_Registry::$instance) { Web2All_Manager_Registry::$instance = new Web2All_Manager_Regi...
php
public static function getInstance() { if(self::$DebugLevel >= Web2All_Manager_Main::DEBUGLEVEL_FULL) { echo "[Vraag een instantie van de Web2All_Manager_Registry Class op]<br />\n"; } if (!Web2All_Manager_Registry::$instance) { Web2All_Manager_Registry::$instance = new Web2All_Manager_Regi...
[ "public", "static", "function", "getInstance", "(", ")", "{", "if", "(", "self", "::", "$", "DebugLevel", ">=", "Web2All_Manager_Main", "::", "DEBUGLEVEL_FULL", ")", "{", "echo", "\"[Vraag een instantie van de Web2All_Manager_Registry Class op]<br />\\n\"", ";", "}", "i...
factory method to return the singleton instance @return Web2All_Manager_Registry object
[ "factory", "method", "to", "return", "the", "singleton", "instance" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L1486-L1494
web2all/framework
src/Web2All/Manager/Main.class.php
Countable.offsetGet
public function offsetGet($offset) { if (!$this->offsetExists($offset)) { throw new RangeException("Var $offset doesn't exists in Web2All_Manager_Registry"); return false; } return $this->vars[$offset]; }
php
public function offsetGet($offset) { if (!$this->offsetExists($offset)) { throw new RangeException("Var $offset doesn't exists in Web2All_Manager_Registry"); return false; } return $this->vars[$offset]; }
[ "public", "function", "offsetGet", "(", "$", "offset", ")", "{", "if", "(", "!", "$", "this", "->", "offsetExists", "(", "$", "offset", ")", ")", "{", "throw", "new", "RangeException", "(", "\"Var $offset doesn't exists in Web2All_Manager_Registry\"", ")", ";", ...
-- ArrayAccess Get value for registry $key, returns false if not found @param string $offset @return unknown
[ "--", "ArrayAccess", "Get", "value", "for", "registry", "$key", "returns", "false", "if", "not", "found" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L1582-L1588
web2all/framework
src/Web2All/Manager/Main.class.php
Countable.offsetSet
public function offsetSet($offset,$value) { if ($this->offsetExists($offset)) { throw new RangeException("Var $offset allready exists in Web2All_Manager_Registry"); return false; } $this->vars[$offset]=&$value; return true; }
php
public function offsetSet($offset,$value) { if ($this->offsetExists($offset)) { throw new RangeException("Var $offset allready exists in Web2All_Manager_Registry"); return false; } $this->vars[$offset]=&$value; return true; }
[ "public", "function", "offsetSet", "(", "$", "offset", ",", "$", "value", ")", "{", "if", "(", "$", "this", "->", "offsetExists", "(", "$", "offset", ")", ")", "{", "throw", "new", "RangeException", "(", "\"Var $offset allready exists in Web2All_Manager_Registry...
-- ArrayAccess Set registry variable $offset whith value $var Returns if succeeded or not @param string $offset @param unknown_type $value @return boolean
[ "--", "ArrayAccess", "Set", "registry", "variable", "$offset", "whith", "value", "$var", "Returns", "if", "succeeded", "or", "not" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L1599-L1606
web2all/framework
src/Web2All/Manager/Main.class.php
Countable.offsetUnset
public function offsetUnset($offset) { if (!$this->offsetExists($offset)) { throw new RangeException("Var $offset doesn't exists in Web2All_Manager_Registry"); return false; } unset($this->vars[$offset]); return true; }
php
public function offsetUnset($offset) { if (!$this->offsetExists($offset)) { throw new RangeException("Var $offset doesn't exists in Web2All_Manager_Registry"); return false; } unset($this->vars[$offset]); return true; }
[ "public", "function", "offsetUnset", "(", "$", "offset", ")", "{", "if", "(", "!", "$", "this", "->", "offsetExists", "(", "$", "offset", ")", ")", "{", "throw", "new", "RangeException", "(", "\"Var $offset doesn't exists in Web2All_Manager_Registry\"", ")", ";"...
Remove variable $key from registry, returns false if not found @param unknown_type $var @return boolean
[ "Remove", "variable", "$key", "from", "registry", "returns", "false", "if", "not", "found" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L1614-L1621
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Config.makeConfig
public function makeConfig($pluginname,$defaultpluginconfig,$overrulingconfig=null) { $pluginconfig=array(); $customconfig=array(); if (isset($this->$pluginname) && is_array($this->$pluginname)) { $customconfig=$this->$pluginname; } $pluginconfig=array_merge($defaultpluginconfig...
php
public function makeConfig($pluginname,$defaultpluginconfig,$overrulingconfig=null) { $pluginconfig=array(); $customconfig=array(); if (isset($this->$pluginname) && is_array($this->$pluginname)) { $customconfig=$this->$pluginname; } $pluginconfig=array_merge($defaultpluginconfig...
[ "public", "function", "makeConfig", "(", "$", "pluginname", ",", "$", "defaultpluginconfig", ",", "$", "overrulingconfig", "=", "null", ")", "{", "$", "pluginconfig", "=", "array", "(", ")", ";", "$", "customconfig", "=", "array", "(", ")", ";", "if", "(...
Build a config array for a specific plugin, if config settings are not set, use the default config value. All keys in $overrulingconfig will always override the values in this config and the defaultconfig. @param string $pluginname @param array $defaultpluginconfig @param array $overrulingconfig [optional] all key/va...
[ "Build", "a", "config", "array", "for", "a", "specific", "plugin", "if", "config", "settings", "are", "not", "set", "use", "the", "default", "config", "value", ".", "All", "keys", "in", "$overrulingconfig", "will", "always", "override", "the", "values", "in"...
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L1742-L1758
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Config.validateConfig
function validateConfig($pluginname,$requiredconfig=array(),$overrulingconfig=null) { // first check if the pluginconfig is available at all if (!(isset($this->$pluginname) && is_array($this->$pluginname))) { throw new Exception('No config defined for plugin '.$pluginname); } // then for e...
php
function validateConfig($pluginname,$requiredconfig=array(),$overrulingconfig=null) { // first check if the pluginconfig is available at all if (!(isset($this->$pluginname) && is_array($this->$pluginname))) { throw new Exception('No config defined for plugin '.$pluginname); } // then for e...
[ "function", "validateConfig", "(", "$", "pluginname", ",", "$", "requiredconfig", "=", "array", "(", ")", ",", "$", "overrulingconfig", "=", "null", ")", "{", "// first check if the pluginconfig is available at all\r", "if", "(", "!", "(", "isset", "(", "$", "th...
Validate a specific plugin config against the given array with config keys. The pluginconfig must exist and each configkey in requiredconfig must exist also. When not valid, an exception will be thrown (can be catched in calling method) @param string $pluginname @param array $requiredconfig @param array $overrulingcon...
[ "Validate", "a", "specific", "plugin", "config", "against", "the", "given", "array", "with", "config", "keys", ".", "The", "pluginconfig", "must", "exist", "and", "each", "configkey", "in", "requiredconfig", "must", "exist", "also", ".", "When", "not", "valid"...
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L1771-L1788
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_Error.getInstance
public static function getInstance() { if(self::$instance && self::$instance->Web2All->DebugLevel >= Web2All_Manager_Main::DEBUGLEVEL_FULL) { // we can only log if $instance is set, because this a static method and // we don't have a reference to the web2all class. self::$instance->Web2All->de...
php
public static function getInstance() { if(self::$instance && self::$instance->Web2All->DebugLevel >= Web2All_Manager_Main::DEBUGLEVEL_FULL) { // we can only log if $instance is set, because this a static method and // we don't have a reference to the web2all class. self::$instance->Web2All->de...
[ "public", "static", "function", "getInstance", "(", ")", "{", "if", "(", "self", "::", "$", "instance", "&&", "self", "::", "$", "instance", "->", "Web2All", "->", "DebugLevel", ">=", "Web2All_Manager_Main", "::", "DEBUGLEVEL_FULL", ")", "{", "// we can only l...
factory method to return the singleton instance @return Web2All_Manager_Error object
[ "factory", "method", "to", "return", "the", "singleton", "instance" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L1837-L1844
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_Manager_ClassInclude.loadClassname
public static function loadClassname($classname,$loadscheme='Web2All', $package='', $set_includedir=false) { Web2All_Manager_Main::loadClass($classname,$loadscheme,$package,$set_includedir); }
php
public static function loadClassname($classname,$loadscheme='Web2All', $package='', $set_includedir=false) { Web2All_Manager_Main::loadClass($classname,$loadscheme,$package,$set_includedir); }
[ "public", "static", "function", "loadClassname", "(", "$", "classname", ",", "$", "loadscheme", "=", "'Web2All'", ",", "$", "package", "=", "''", ",", "$", "set_includedir", "=", "false", ")", "{", "Web2All_Manager_Main", "::", "loadClass", "(", "$", "classn...
Include php file @param string $classname @param string $loadscheme [optional (Web2All|PEAR|INC|PLAIN) defaults to Web2All] @param string $package [optional packagename] @param boolean $set_includedir [optional bool, set true to add the package dir to include path]
[ "Include", "php", "file" ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L2035-L2037
web2all/framework
src/Web2All/Manager/Main.class.php
Web2All_PHP_INI.getBytes
public static function getBytes($size_str) { switch (substr ($size_str, -1)) { case 'M': case 'm': return (int)$size_str * 1048576; case 'K': case 'k': return (int)$size_str * 1024; case 'G': case 'g': return (int)$size_str * 1073741824; default: return $size_str; } }
php
public static function getBytes($size_str) { switch (substr ($size_str, -1)) { case 'M': case 'm': return (int)$size_str * 1048576; case 'K': case 'k': return (int)$size_str * 1024; case 'G': case 'g': return (int)$size_str * 1073741824; default: return $size_str; } }
[ "public", "static", "function", "getBytes", "(", "$", "size_str", ")", "{", "switch", "(", "substr", "(", "$", "size_str", ",", "-", "1", ")", ")", "{", "case", "'M'", ":", "case", "'m'", ":", "return", "(", "int", ")", "$", "size_str", "*", "10485...
converts possible shorthand notations from the php ini to bytes. see: http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes original code from: http://nl2.php.net/manual/en/function.ini-get.php#96996 @return int
[ "converts", "possible", "shorthand", "notations", "from", "the", "php", "ini", "to", "bytes", "." ]
train
https://github.com/web2all/framework/blob/6990dc3700efad3207ec6e710124f7ba18891b31/src/Web2All/Manager/Main.class.php#L2106-L2115