id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
191,400
goetas/twital
src/TwitalLoader.php
TwitalLoader.getSourceAdapter
public function getSourceAdapter($name) { foreach (array_reverse($this->sourceAdapters) as $pattern => $adapter) { if (preg_match($pattern, $name)) { return $adapter; } } return null; }
php
public function getSourceAdapter($name) { foreach (array_reverse($this->sourceAdapters) as $pattern => $adapter) { if (preg_match($pattern, $name)) { return $adapter; } } return null; }
[ "public", "function", "getSourceAdapter", "(", "$", "name", ")", "{", "foreach", "(", "array_reverse", "(", "$", "this", "->", "sourceAdapters", ")", "as", "$", "pattern", "=>", "$", "adapter", ")", "{", "if", "(", "preg_match", "(", "$", "pattern", ",",...
Decide if a template is twital-compilable or not. @param string $name @return SourceAdapter
[ "Decide", "if", "a", "template", "is", "twital", "-", "compilable", "or", "not", "." ]
a65afad379f78d95d9bc9749c13de4e65ee19a90
https://github.com/goetas/twital/blob/a65afad379f78d95d9bc9749c13de4e65ee19a90/src/TwitalLoader.php#L110-L119
191,401
markus-perl/gender-api-client
src/GenderApi/Client/CountryList.php
CountryList.getCountryCodeByName
public function getCountryCodeByName($name) { if (isset($this->countryList[$name])) { return $this->countryList[$name]; } //nothing found we try case insensitive $name = strtolower($name); foreach ($this->countryList as $countryName => $countryCode) { ...
php
public function getCountryCodeByName($name) { if (isset($this->countryList[$name])) { return $this->countryList[$name]; } //nothing found we try case insensitive $name = strtolower($name); foreach ($this->countryList as $countryName => $countryCode) { ...
[ "public", "function", "getCountryCodeByName", "(", "$", "name", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "countryList", "[", "$", "name", "]", ")", ")", "{", "return", "$", "this", "->", "countryList", "[", "$", "name", "]", ";", "}", ...
Get the country code by country name @param string $name @return null|string
[ "Get", "the", "country", "code", "by", "country", "name" ]
4082deeb0118d275e7669e2951bcdbbc518150e3
https://github.com/markus-perl/gender-api-client/blob/4082deeb0118d275e7669e2951bcdbbc518150e3/src/GenderApi/Client/CountryList.php#L298-L313
191,402
markus-perl/gender-api-client
src/GenderApi/Client/CountryList.php
CountryList.isValidLocale
public function isValidLocale($locale) { $locale = strtoupper($locale); if (substr_count($locale, '_')) { $locale = substr($locale, strpos($locale, '_') + 1); } if (substr_count($locale, '-')) { $locale = substr($locale, strpos($locale, '-') + 1); } ...
php
public function isValidLocale($locale) { $locale = strtoupper($locale); if (substr_count($locale, '_')) { $locale = substr($locale, strpos($locale, '_') + 1); } if (substr_count($locale, '-')) { $locale = substr($locale, strpos($locale, '-') + 1); } ...
[ "public", "function", "isValidLocale", "(", "$", "locale", ")", "{", "$", "locale", "=", "strtoupper", "(", "$", "locale", ")", ";", "if", "(", "substr_count", "(", "$", "locale", ",", "'_'", ")", ")", "{", "$", "locale", "=", "substr", "(", "$", "...
return true if the locale is valid @param string $locale @return bool
[ "return", "true", "if", "the", "locale", "is", "valid" ]
4082deeb0118d275e7669e2951bcdbbc518150e3
https://github.com/markus-perl/gender-api-client/blob/4082deeb0118d275e7669e2951bcdbbc518150e3/src/GenderApi/Client/CountryList.php#L332-L344
191,403
php-quartz/quartz
Triggers/DailyTimeIntervalTrigger.php
DailyTimeIntervalTrigger.setStartTimeOfDay
public function setStartTimeOfDay(\DateTime $startTimeOfDay) { $startTimeOfDay = clone $startTimeOfDay; $startTimeOfDay->setDate(1970, 1, 1); // zero date if ($this->getEndTimeOfDay() && $this->getEndTimeOfDay() < $startTimeOfDay) { throw new \InvalidArgumentException('End time ...
php
public function setStartTimeOfDay(\DateTime $startTimeOfDay) { $startTimeOfDay = clone $startTimeOfDay; $startTimeOfDay->setDate(1970, 1, 1); // zero date if ($this->getEndTimeOfDay() && $this->getEndTimeOfDay() < $startTimeOfDay) { throw new \InvalidArgumentException('End time ...
[ "public", "function", "setStartTimeOfDay", "(", "\\", "DateTime", "$", "startTimeOfDay", ")", "{", "$", "startTimeOfDay", "=", "clone", "$", "startTimeOfDay", ";", "$", "startTimeOfDay", "->", "setDate", "(", "1970", ",", "1", ",", "1", ")", ";", "// zero da...
The time of day to complete firing at the given interval. @param \DateTime $startTimeOfDay only time part is relevant
[ "The", "time", "of", "day", "to", "complete", "firing", "at", "the", "given", "interval", "." ]
a8ea9d5153cce188c7f9f2b84c4e252397e535a5
https://github.com/php-quartz/quartz/blob/a8ea9d5153cce188c7f9f2b84c4e252397e535a5/Triggers/DailyTimeIntervalTrigger.php#L198-L208
191,404
php-quartz/quartz
Triggers/DailyTimeIntervalTrigger.php
DailyTimeIntervalTrigger.advanceToNextDayOfWeekIfNecessary
private function advanceToNextDayOfWeekIfNecessary(\DateTime $fireTime, $forceToAdvanceNextDay) { // a. Advance or adjust to next dayOfWeek if need to first, starting next day with startTimeOfDay. $sTimeOfDay = $this->getStartTimeOfDay(); $fireTimeStartDate = $this->getTimeOfDayForDate($fire...
php
private function advanceToNextDayOfWeekIfNecessary(\DateTime $fireTime, $forceToAdvanceNextDay) { // a. Advance or adjust to next dayOfWeek if need to first, starting next day with startTimeOfDay. $sTimeOfDay = $this->getStartTimeOfDay(); $fireTimeStartDate = $this->getTimeOfDayForDate($fire...
[ "private", "function", "advanceToNextDayOfWeekIfNecessary", "(", "\\", "DateTime", "$", "fireTime", ",", "$", "forceToAdvanceNextDay", ")", "{", "// a. Advance or adjust to next dayOfWeek if need to first, starting next day with startTimeOfDay.", "$", "sTimeOfDay", "=", "$", "thi...
Given fireTime time determine if it is on a valid day of week. If so, simply return it unaltered, if not, advance to the next valid week day, and set the time of day to the start time of day @param \DateTime $fireTime - given next fireTime. @param bool $forceToAdvanceNextDay - flag to whether to advance day witho...
[ "Given", "fireTime", "time", "determine", "if", "it", "is", "on", "a", "valid", "day", "of", "week", ".", "If", "so", "simply", "return", "it", "unaltered", "if", "not", "advance", "to", "the", "next", "valid", "week", "day", "and", "set", "the", "time...
a8ea9d5153cce188c7f9f2b84c4e252397e535a5
https://github.com/php-quartz/quartz/blob/a8ea9d5153cce188c7f9f2b84c4e252397e535a5/Triggers/DailyTimeIntervalTrigger.php#L490-L519
191,405
php-quartz/quartz
Core/DailyTimeIntervalScheduleBuilder.php
DailyTimeIntervalScheduleBuilder.onDaysOfTheWeek
public function onDaysOfTheWeek(array $onDaysOfWeek) { if(false == $onDaysOfWeek) { throw new \InvalidArgumentException('Days of week must be an non-empty set.'); } foreach ($onDaysOfWeek as $day) { DateBuilder::validateDayOfWeek($day); } $this->days...
php
public function onDaysOfTheWeek(array $onDaysOfWeek) { if(false == $onDaysOfWeek) { throw new \InvalidArgumentException('Days of week must be an non-empty set.'); } foreach ($onDaysOfWeek as $day) { DateBuilder::validateDayOfWeek($day); } $this->days...
[ "public", "function", "onDaysOfTheWeek", "(", "array", "$", "onDaysOfWeek", ")", "{", "if", "(", "false", "==", "$", "onDaysOfWeek", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Days of week must be an non-empty set.'", ")", ";", "}", "foreac...
Set the trigger to fire on the given days of the week. @param array $onDaysOfWeek a Set containing the integers representing the days of the week, per the values 1-7 as defined by {@link DateBuilder::SUNDAY} - {@link DateBuilder::SATURDAY}. @return DailyTimeIntervalScheduleBuilder
[ "Set", "the", "trigger", "to", "fire", "on", "the", "given", "days", "of", "the", "week", "." ]
a8ea9d5153cce188c7f9f2b84c4e252397e535a5
https://github.com/php-quartz/quartz/blob/a8ea9d5153cce188c7f9f2b84c4e252397e535a5/Core/DailyTimeIntervalScheduleBuilder.php#L215-L228
191,406
php-quartz/quartz
Core/DailyTimeIntervalScheduleBuilder.php
DailyTimeIntervalScheduleBuilder.onMondayThroughFriday
public function onMondayThroughFriday() { $this->daysOfWeek = [ DateBuilder::MONDAY, DateBuilder::THURSDAY, DateBuilder::WEDNESDAY, DateBuilder::THURSDAY, DateBuilder::FRIDAY ]; return $this; }
php
public function onMondayThroughFriday() { $this->daysOfWeek = [ DateBuilder::MONDAY, DateBuilder::THURSDAY, DateBuilder::WEDNESDAY, DateBuilder::THURSDAY, DateBuilder::FRIDAY ]; return $this; }
[ "public", "function", "onMondayThroughFriday", "(", ")", "{", "$", "this", "->", "daysOfWeek", "=", "[", "DateBuilder", "::", "MONDAY", ",", "DateBuilder", "::", "THURSDAY", ",", "DateBuilder", "::", "WEDNESDAY", ",", "DateBuilder", "::", "THURSDAY", ",", "Dat...
Set the trigger to fire on the days from Monday through Friday. @return DailyTimeIntervalScheduleBuilder
[ "Set", "the", "trigger", "to", "fire", "on", "the", "days", "from", "Monday", "through", "Friday", "." ]
a8ea9d5153cce188c7f9f2b84c4e252397e535a5
https://github.com/php-quartz/quartz/blob/a8ea9d5153cce188c7f9f2b84c4e252397e535a5/Core/DailyTimeIntervalScheduleBuilder.php#L235-L246
191,407
php-quartz/quartz
Core/DailyTimeIntervalScheduleBuilder.php
DailyTimeIntervalScheduleBuilder.endingDailyAfterCount
public function endingDailyAfterCount($count) { if (false == is_int($count) || $count <= 0) { throw new \InvalidArgumentException('Ending daily after count must be a positive number!'); } if (null == $this->startTimeOfDay) { throw new \InvalidArgumentException('You m...
php
public function endingDailyAfterCount($count) { if (false == is_int($count) || $count <= 0) { throw new \InvalidArgumentException('Ending daily after count must be a positive number!'); } if (null == $this->startTimeOfDay) { throw new \InvalidArgumentException('You m...
[ "public", "function", "endingDailyAfterCount", "(", "$", "count", ")", "{", "if", "(", "false", "==", "is_int", "(", "$", "count", ")", "||", "$", "count", "<=", "0", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Ending daily after count...
Calculate and set the endTimeOfDay using count, interval and starTimeOfDay. This means that these must be set before this method is call. @param int $count @return DailyTimeIntervalScheduleBuilder
[ "Calculate", "and", "set", "the", "endTimeOfDay", "using", "count", "interval", "and", "starTimeOfDay", ".", "This", "means", "that", "these", "must", "be", "set", "before", "this", "method", "is", "call", "." ]
a8ea9d5153cce188c7f9f2b84c4e252397e535a5
https://github.com/php-quartz/quartz/blob/a8ea9d5153cce188c7f9f2b84c4e252397e535a5/Core/DailyTimeIntervalScheduleBuilder.php#L311-L356
191,408
Level-2/Maphper
Maphper/Lib/Sql/WhereBuilder.php
WhereBuilder.fixDuplicateArgs
private function fixDuplicateArgs($origArgs, $result) { $duplicates = array_intersect_key($result['args'], $origArgs); // Holds all keys in results already in the args if (count($duplicates) === 0) return $result; foreach ($duplicates as $argKey => $argVal) { $valHash = substr(md5($...
php
private function fixDuplicateArgs($origArgs, $result) { $duplicates = array_intersect_key($result['args'], $origArgs); // Holds all keys in results already in the args if (count($duplicates) === 0) return $result; foreach ($duplicates as $argKey => $argVal) { $valHash = substr(md5($...
[ "private", "function", "fixDuplicateArgs", "(", "$", "origArgs", ",", "$", "result", ")", "{", "$", "duplicates", "=", "array_intersect_key", "(", "$", "result", "[", "'args'", "]", ",", "$", "origArgs", ")", ";", "// Holds all keys in results already in the args"...
Returns result with duplicate issues removed
[ "Returns", "result", "with", "duplicate", "issues", "removed" ]
453afa22848b4163e8236625a2147609792fce98
https://github.com/Level-2/Maphper/blob/453afa22848b4163e8236625a2147609792fce98/Maphper/Lib/Sql/WhereBuilder.php#L41-L56
191,409
php-quartz/quartz
Core/CalendarIntervalScheduleBuilder.php
CalendarIntervalScheduleBuilder.withIntervalInSeconds
public function withIntervalInSeconds($intervalInSeconds) { $this->validateInterval($intervalInSeconds); $this->interval = $intervalInSeconds; $this->intervalUnit = IntervalUnit::SECOND; return $this; }
php
public function withIntervalInSeconds($intervalInSeconds) { $this->validateInterval($intervalInSeconds); $this->interval = $intervalInSeconds; $this->intervalUnit = IntervalUnit::SECOND; return $this; }
[ "public", "function", "withIntervalInSeconds", "(", "$", "intervalInSeconds", ")", "{", "$", "this", "->", "validateInterval", "(", "$", "intervalInSeconds", ")", ";", "$", "this", "->", "interval", "=", "$", "intervalInSeconds", ";", "$", "this", "->", "inter...
Specify an interval in the IntervalUnit.SECOND that the produced Trigger will repeat at. @param int $intervalInSeconds the number of seconds at which the trigger should repeat. @return CalendarIntervalScheduleBuilder
[ "Specify", "an", "interval", "in", "the", "IntervalUnit", ".", "SECOND", "that", "the", "produced", "Trigger", "will", "repeat", "at", "." ]
a8ea9d5153cce188c7f9f2b84c4e252397e535a5
https://github.com/php-quartz/quartz/blob/a8ea9d5153cce188c7f9f2b84c4e252397e535a5/Core/CalendarIntervalScheduleBuilder.php#L131-L139
191,410
php-quartz/quartz
Core/CalendarIntervalScheduleBuilder.php
CalendarIntervalScheduleBuilder.withIntervalInMinutes
public function withIntervalInMinutes($intervalInMinutes) { $this->validateInterval($intervalInMinutes); $this->interval = $intervalInMinutes; $this->intervalUnit = IntervalUnit::MINUTE; return $this; }
php
public function withIntervalInMinutes($intervalInMinutes) { $this->validateInterval($intervalInMinutes); $this->interval = $intervalInMinutes; $this->intervalUnit = IntervalUnit::MINUTE; return $this; }
[ "public", "function", "withIntervalInMinutes", "(", "$", "intervalInMinutes", ")", "{", "$", "this", "->", "validateInterval", "(", "$", "intervalInMinutes", ")", ";", "$", "this", "->", "interval", "=", "$", "intervalInMinutes", ";", "$", "this", "->", "inter...
Specify an interval in the IntervalUnit.MINUTE that the produced Trigger will repeat at. @param int $intervalInMinutes the number of minutes at which the trigger should repeat. @return CalendarIntervalScheduleBuilder
[ "Specify", "an", "interval", "in", "the", "IntervalUnit", ".", "MINUTE", "that", "the", "produced", "Trigger", "will", "repeat", "at", "." ]
a8ea9d5153cce188c7f9f2b84c4e252397e535a5
https://github.com/php-quartz/quartz/blob/a8ea9d5153cce188c7f9f2b84c4e252397e535a5/Core/CalendarIntervalScheduleBuilder.php#L149-L156
191,411
php-quartz/quartz
Core/CalendarIntervalScheduleBuilder.php
CalendarIntervalScheduleBuilder.withIntervalInHours
public function withIntervalInHours($intervalInHours) { $this->validateInterval($intervalInHours); $this->interval = $intervalInHours; $this->intervalUnit = IntervalUnit::HOUR; return $this; }
php
public function withIntervalInHours($intervalInHours) { $this->validateInterval($intervalInHours); $this->interval = $intervalInHours; $this->intervalUnit = IntervalUnit::HOUR; return $this; }
[ "public", "function", "withIntervalInHours", "(", "$", "intervalInHours", ")", "{", "$", "this", "->", "validateInterval", "(", "$", "intervalInHours", ")", ";", "$", "this", "->", "interval", "=", "$", "intervalInHours", ";", "$", "this", "->", "intervalUnit"...
Specify an interval in the IntervalUnit.HOUR that the produced Trigger will repeat at. @param int $intervalInHours the number of hours at which the trigger should repeat. @return CalendarIntervalScheduleBuilder
[ "Specify", "an", "interval", "in", "the", "IntervalUnit", ".", "HOUR", "that", "the", "produced", "Trigger", "will", "repeat", "at", "." ]
a8ea9d5153cce188c7f9f2b84c4e252397e535a5
https://github.com/php-quartz/quartz/blob/a8ea9d5153cce188c7f9f2b84c4e252397e535a5/Core/CalendarIntervalScheduleBuilder.php#L166-L173
191,412
php-quartz/quartz
Core/CalendarIntervalScheduleBuilder.php
CalendarIntervalScheduleBuilder.withIntervalInDays
public function withIntervalInDays($intervalInDays) { $this->validateInterval($intervalInDays); $this->interval = $intervalInDays; $this->intervalUnit = IntervalUnit::DAY; return $this; }
php
public function withIntervalInDays($intervalInDays) { $this->validateInterval($intervalInDays); $this->interval = $intervalInDays; $this->intervalUnit = IntervalUnit::DAY; return $this; }
[ "public", "function", "withIntervalInDays", "(", "$", "intervalInDays", ")", "{", "$", "this", "->", "validateInterval", "(", "$", "intervalInDays", ")", ";", "$", "this", "->", "interval", "=", "$", "intervalInDays", ";", "$", "this", "->", "intervalUnit", ...
Specify an interval in the IntervalUnit.DAY that the produced Trigger will repeat at. @param int $intervalInDays the number of days at which the trigger should repeat. @return CalendarIntervalScheduleBuilder
[ "Specify", "an", "interval", "in", "the", "IntervalUnit", ".", "DAY", "that", "the", "produced", "Trigger", "will", "repeat", "at", "." ]
a8ea9d5153cce188c7f9f2b84c4e252397e535a5
https://github.com/php-quartz/quartz/blob/a8ea9d5153cce188c7f9f2b84c4e252397e535a5/Core/CalendarIntervalScheduleBuilder.php#L183-L190
191,413
php-quartz/quartz
Core/CalendarIntervalScheduleBuilder.php
CalendarIntervalScheduleBuilder.withIntervalInWeeks
public function withIntervalInWeeks($intervalInWeeks) { $this->validateInterval($intervalInWeeks); $this->interval = $intervalInWeeks; $this->intervalUnit = IntervalUnit::WEEK; return $this; }
php
public function withIntervalInWeeks($intervalInWeeks) { $this->validateInterval($intervalInWeeks); $this->interval = $intervalInWeeks; $this->intervalUnit = IntervalUnit::WEEK; return $this; }
[ "public", "function", "withIntervalInWeeks", "(", "$", "intervalInWeeks", ")", "{", "$", "this", "->", "validateInterval", "(", "$", "intervalInWeeks", ")", ";", "$", "this", "->", "interval", "=", "$", "intervalInWeeks", ";", "$", "this", "->", "intervalUnit"...
Specify an interval in the IntervalUnit.WEEK that the produced Trigger will repeat at. @param int $intervalInWeeks the number of weeks at which the trigger should repeat. @return CalendarIntervalScheduleBuilder
[ "Specify", "an", "interval", "in", "the", "IntervalUnit", ".", "WEEK", "that", "the", "produced", "Trigger", "will", "repeat", "at", "." ]
a8ea9d5153cce188c7f9f2b84c4e252397e535a5
https://github.com/php-quartz/quartz/blob/a8ea9d5153cce188c7f9f2b84c4e252397e535a5/Core/CalendarIntervalScheduleBuilder.php#L200-L207
191,414
php-quartz/quartz
Core/CalendarIntervalScheduleBuilder.php
CalendarIntervalScheduleBuilder.withIntervalInMonths
public function withIntervalInMonths($intervalInMonths) { $this->validateInterval($intervalInMonths); $this->interval = $intervalInMonths; $this->intervalUnit = IntervalUnit::MONTH; return $this; }
php
public function withIntervalInMonths($intervalInMonths) { $this->validateInterval($intervalInMonths); $this->interval = $intervalInMonths; $this->intervalUnit = IntervalUnit::MONTH; return $this; }
[ "public", "function", "withIntervalInMonths", "(", "$", "intervalInMonths", ")", "{", "$", "this", "->", "validateInterval", "(", "$", "intervalInMonths", ")", ";", "$", "this", "->", "interval", "=", "$", "intervalInMonths", ";", "$", "this", "->", "intervalU...
Specify an interval in the IntervalUnit.MONTH that the produced Trigger will repeat at. @param int $intervalInMonths the number of months at which the trigger should repeat. @return CalendarIntervalScheduleBuilder
[ "Specify", "an", "interval", "in", "the", "IntervalUnit", ".", "MONTH", "that", "the", "produced", "Trigger", "will", "repeat", "at", "." ]
a8ea9d5153cce188c7f9f2b84c4e252397e535a5
https://github.com/php-quartz/quartz/blob/a8ea9d5153cce188c7f9f2b84c4e252397e535a5/Core/CalendarIntervalScheduleBuilder.php#L217-L224
191,415
php-quartz/quartz
Core/CalendarIntervalScheduleBuilder.php
CalendarIntervalScheduleBuilder.withIntervalInYears
public function withIntervalInYears($intervalInYears) { $this->validateInterval($intervalInYears); $this->interval = $intervalInYears; $this->intervalUnit = IntervalUnit::YEAR; return $this; }
php
public function withIntervalInYears($intervalInYears) { $this->validateInterval($intervalInYears); $this->interval = $intervalInYears; $this->intervalUnit = IntervalUnit::YEAR; return $this; }
[ "public", "function", "withIntervalInYears", "(", "$", "intervalInYears", ")", "{", "$", "this", "->", "validateInterval", "(", "$", "intervalInYears", ")", ";", "$", "this", "->", "interval", "=", "$", "intervalInYears", ";", "$", "this", "->", "intervalUnit"...
Specify an interval in the IntervalUnit.YEAR that the produced Trigger will repeat at. @param int $intervalInYears the number of years at which the trigger should repeat. @return CalendarIntervalScheduleBuilder
[ "Specify", "an", "interval", "in", "the", "IntervalUnit", ".", "YEAR", "that", "the", "produced", "Trigger", "will", "repeat", "at", "." ]
a8ea9d5153cce188c7f9f2b84c4e252397e535a5
https://github.com/php-quartz/quartz/blob/a8ea9d5153cce188c7f9f2b84c4e252397e535a5/Core/CalendarIntervalScheduleBuilder.php#L234-L241
191,416
stephweb/daw-php-pagination
src/DawPhpPagination/Pagination.php
Pagination.paginate
public function paginate(int $count) { $this->count = $count; $this->treatmentPerPage(); if ($this->perPage !== null) { $this->nbPages = ceil($this->count / $this->perPage); } else { $this->nbPages = 1; } ...
php
public function paginate(int $count) { $this->count = $count; $this->treatmentPerPage(); if ($this->perPage !== null) { $this->nbPages = ceil($this->count / $this->perPage); } else { $this->nbPages = 1; } ...
[ "public", "function", "paginate", "(", "int", "$", "count", ")", "{", "$", "this", "->", "count", "=", "$", "count", ";", "$", "this", "->", "treatmentPerPage", "(", ")", ";", "if", "(", "$", "this", "->", "perPage", "!==", "null", ")", "{", "$", ...
Active la pagination @param int $count - Nombre d'éléments à paginer
[ "Active", "la", "pagination" ]
60108cd2f130db26f5bbb1b8cbc7e15fa3cc7f85
https://github.com/stephweb/daw-php-pagination/blob/60108cd2f130db26f5bbb1b8cbc7e15fa3cc7f85/src/DawPhpPagination/Pagination.php#L184-L203
191,417
stephweb/daw-php-pagination
src/DawPhpPagination/Pagination.php
Pagination.setLimitAndSetOffset
private function setLimitAndSetOffset() { if ($this->perPage === null) { $this->offset = null; $this->limit = null; } else { $this->offset = ($this->currentPage - 1) * $this->perPage; $this->limit = $this->perPage; } }
php
private function setLimitAndSetOffset() { if ($this->perPage === null) { $this->offset = null; $this->limit = null; } else { $this->offset = ($this->currentPage - 1) * $this->perPage; $this->limit = $this->perPage; } }
[ "private", "function", "setLimitAndSetOffset", "(", ")", "{", "if", "(", "$", "this", "->", "perPage", "===", "null", ")", "{", "$", "this", "->", "offset", "=", "null", ";", "$", "this", "->", "limit", "=", "null", ";", "}", "else", "{", "$", "thi...
Pour "setter" le limit et le offset
[ "Pour", "setter", "le", "limit", "et", "le", "offset" ]
60108cd2f130db26f5bbb1b8cbc7e15fa3cc7f85
https://github.com/stephweb/daw-php-pagination/blob/60108cd2f130db26f5bbb1b8cbc7e15fa3cc7f85/src/DawPhpPagination/Pagination.php#L229-L238
191,418
stephweb/daw-php-pagination
src/DawPhpPagination/Pagination.php
Pagination.render
public function render($ifIssetGet = null): string { $this->setPageStart()->setPageEnd(); return $this->htmlRenderer->render($ifIssetGet); }
php
public function render($ifIssetGet = null): string { $this->setPageStart()->setPageEnd(); return $this->htmlRenderer->render($ifIssetGet); }
[ "public", "function", "render", "(", "$", "ifIssetGet", "=", "null", ")", ":", "string", "{", "$", "this", "->", "setPageStart", "(", ")", "->", "setPageEnd", "(", ")", ";", "return", "$", "this", "->", "htmlRenderer", "->", "render", "(", "$", "ifIsse...
Rendre le rendu de la pagination au format HTML @param array|string|null $ifIssetGet - Si il y a déjà des GET dans l'URL, les cumuler avec les liens @return string
[ "Rendre", "le", "rendu", "de", "la", "pagination", "au", "format", "HTML" ]
60108cd2f130db26f5bbb1b8cbc7e15fa3cc7f85
https://github.com/stephweb/daw-php-pagination/blob/60108cd2f130db26f5bbb1b8cbc7e15fa3cc7f85/src/DawPhpPagination/Pagination.php#L472-L477
191,419
stephweb/daw-php-pagination
src/DawPhpPagination/Pagination.php
Pagination.perPage
public function perPage(string $action = null): string { return $this->htmlRenderer->perPage($this->request, $action); }
php
public function perPage(string $action = null): string { return $this->htmlRenderer->perPage($this->request, $action); }
[ "public", "function", "perPage", "(", "string", "$", "action", "=", "null", ")", ":", "string", "{", "return", "$", "this", "->", "htmlRenderer", "->", "perPage", "(", "$", "this", "->", "request", ",", "$", "action", ")", ";", "}" ]
Rendre le rendu du per page au format HTML @param null|string $action - Pour l'action du form @return string
[ "Rendre", "le", "rendu", "du", "per", "page", "au", "format", "HTML" ]
60108cd2f130db26f5bbb1b8cbc7e15fa3cc7f85
https://github.com/stephweb/daw-php-pagination/blob/60108cd2f130db26f5bbb1b8cbc7e15fa3cc7f85/src/DawPhpPagination/Pagination.php#L517-L520
191,420
radnan/rdn-csv
src/RdnCsv/Controller/Plugin/CsvExport.php
CsvExport.setContent
public function setContent($records, callable $callback = null) { $this->content = $records; $this->callback = $callback; return $this; }
php
public function setContent($records, callable $callback = null) { $this->content = $records; $this->callback = $callback; return $this; }
[ "public", "function", "setContent", "(", "$", "records", ",", "callable", "$", "callback", "=", "null", ")", "{", "$", "this", "->", "content", "=", "$", "records", ";", "$", "this", "->", "callback", "=", "$", "callback", ";", "return", "$", "this", ...
Set the content records along with an optional callback to render them into CSV fields @param array|\Traversable $records @param callable $callback @return CsvExport
[ "Set", "the", "content", "records", "along", "with", "an", "optional", "callback", "to", "render", "them", "into", "CSV", "fields" ]
1c21ddbcc777bba2a6f584fb0ce41c6963fd6494
https://github.com/radnan/rdn-csv/blob/1c21ddbcc777bba2a6f584fb0ce41c6963fd6494/src/RdnCsv/Controller/Plugin/CsvExport.php#L110-L115
191,421
radnan/rdn-csv
src/RdnCsv/Controller/Plugin/CsvExport.php
CsvExport.setControls
public function setControls($delimiter, $enclosure) { $this->delimiter = $delimiter; $this->enclosure = $enclosure; return $this; }
php
public function setControls($delimiter, $enclosure) { $this->delimiter = $delimiter; $this->enclosure = $enclosure; return $this; }
[ "public", "function", "setControls", "(", "$", "delimiter", ",", "$", "enclosure", ")", "{", "$", "this", "->", "delimiter", "=", "$", "delimiter", ";", "$", "this", "->", "enclosure", "=", "$", "enclosure", ";", "return", "$", "this", ";", "}" ]
Set the CSV controls @param string $delimiter @param string $enclosure @return CsvExport
[ "Set", "the", "CSV", "controls" ]
1c21ddbcc777bba2a6f584fb0ce41c6963fd6494
https://github.com/radnan/rdn-csv/blob/1c21ddbcc777bba2a6f584fb0ce41c6963fd6494/src/RdnCsv/Controller/Plugin/CsvExport.php#L125-L130
191,422
radnan/rdn-csv
src/RdnCsv/Controller/Plugin/CsvExport.php
CsvExport.getResponse
public function getResponse() { if (method_exists($this->controller, 'getResponse')) { /** @var HttpResponse $response */ $response = $this->controller->getResponse(); } else { $response = new HttpResponse; } $fp = fopen('php://output', 'w'); ob_start(); fputcsv($fp, $this->header, $this->d...
php
public function getResponse() { if (method_exists($this->controller, 'getResponse')) { /** @var HttpResponse $response */ $response = $this->controller->getResponse(); } else { $response = new HttpResponse; } $fp = fopen('php://output', 'w'); ob_start(); fputcsv($fp, $this->header, $this->d...
[ "public", "function", "getResponse", "(", ")", "{", "if", "(", "method_exists", "(", "$", "this", "->", "controller", ",", "'getResponse'", ")", ")", "{", "/** @var HttpResponse $response */", "$", "response", "=", "$", "this", "->", "controller", "->", "getRe...
Prepare the response with the CSV export and return it @return HttpResponse @throws \Exception if any exceptions are thrown within the content callback
[ "Prepare", "the", "response", "with", "the", "CSV", "export", "and", "return", "it" ]
1c21ddbcc777bba2a6f584fb0ce41c6963fd6494
https://github.com/radnan/rdn-csv/blob/1c21ddbcc777bba2a6f584fb0ce41c6963fd6494/src/RdnCsv/Controller/Plugin/CsvExport.php#L138-L179
191,423
php-quartz/quartz
Core/SimpleScheduleBuilder.php
SimpleScheduleBuilder.repeatMinutelyForTotalCount
public static function repeatMinutelyForTotalCount($count, $minutes = 1) { if($count < 1) { throw new \InvalidArgumentException(sprintf('Total count of firings must be at least one! Given count: "%s"', $count)); } return static::simpleSchedule() ->withIntervalInMinut...
php
public static function repeatMinutelyForTotalCount($count, $minutes = 1) { if($count < 1) { throw new \InvalidArgumentException(sprintf('Total count of firings must be at least one! Given count: "%s"', $count)); } return static::simpleSchedule() ->withIntervalInMinut...
[ "public", "static", "function", "repeatMinutelyForTotalCount", "(", "$", "count", ",", "$", "minutes", "=", "1", ")", "{", "if", "(", "$", "count", "<", "1", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "sprintf", "(", "'Total count of fi...
Create a SimpleScheduleBuilder set to repeat the given number of times - 1 with an interval of the given number of minutes. <p>Note: Total count = 1 (at start time) + repeat count</p> @param int $count @param int $minutes @return SimpleScheduleBuilder
[ "Create", "a", "SimpleScheduleBuilder", "set", "to", "repeat", "the", "given", "number", "of", "times", "-", "1", "with", "an", "interval", "of", "the", "given", "number", "of", "minutes", "." ]
a8ea9d5153cce188c7f9f2b84c4e252397e535a5
https://github.com/php-quartz/quartz/blob/a8ea9d5153cce188c7f9f2b84c4e252397e535a5/Core/SimpleScheduleBuilder.php#L125-L134
191,424
php-quartz/quartz
Core/SimpleScheduleBuilder.php
SimpleScheduleBuilder.repeatSecondlyForTotalCount
public static function repeatSecondlyForTotalCount($count, $seconds = 1) { if($count < 1) { throw new \InvalidArgumentException(sprintf('Total count of firings must be at least one! Given count: "%s"', $count)); } return static::simpleSchedule() ->withIntervalInSeconds($...
php
public static function repeatSecondlyForTotalCount($count, $seconds = 1) { if($count < 1) { throw new \InvalidArgumentException(sprintf('Total count of firings must be at least one! Given count: "%s"', $count)); } return static::simpleSchedule() ->withIntervalInSeconds($...
[ "public", "static", "function", "repeatSecondlyForTotalCount", "(", "$", "count", ",", "$", "seconds", "=", "1", ")", "{", "if", "(", "$", "count", "<", "1", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "sprintf", "(", "'Total count of fi...
Create a SimpleScheduleBuilder set to repeat the given number of times - 1 with an interval of the given number of seconds. <p>Note: Total count = 1 (at start time) + repeat count</p> @param int $count @param int $seconds @return SimpleScheduleBuilder
[ "Create", "a", "SimpleScheduleBuilder", "set", "to", "repeat", "the", "given", "number", "of", "times", "-", "1", "with", "an", "interval", "of", "the", "given", "number", "of", "seconds", "." ]
a8ea9d5153cce188c7f9f2b84c4e252397e535a5
https://github.com/php-quartz/quartz/blob/a8ea9d5153cce188c7f9f2b84c4e252397e535a5/Core/SimpleScheduleBuilder.php#L147-L155
191,425
php-quartz/quartz
Core/SimpleScheduleBuilder.php
SimpleScheduleBuilder.repeatHourlyForTotalCount
public static function repeatHourlyForTotalCount($count, $hours = 1) { if($count < 1) { throw new \InvalidArgumentException(sprintf('Total count of firings must be at least one! Given count: "%s"', $count)); } return static::simpleSchedule() ->withIntervalInHours($hours)...
php
public static function repeatHourlyForTotalCount($count, $hours = 1) { if($count < 1) { throw new \InvalidArgumentException(sprintf('Total count of firings must be at least one! Given count: "%s"', $count)); } return static::simpleSchedule() ->withIntervalInHours($hours)...
[ "public", "static", "function", "repeatHourlyForTotalCount", "(", "$", "count", ",", "$", "hours", "=", "1", ")", "{", "if", "(", "$", "count", "<", "1", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "sprintf", "(", "'Total count of firing...
Create a SimpleScheduleBuilder set to repeat the given number of times - 1 with an interval of the given number of hours. <p>Note: Total count = 1 (at start time) + repeat count</p> @param int $count @param int $hours @return SimpleScheduleBuilder
[ "Create", "a", "SimpleScheduleBuilder", "set", "to", "repeat", "the", "given", "number", "of", "times", "-", "1", "with", "an", "interval", "of", "the", "given", "number", "of", "hours", "." ]
a8ea9d5153cce188c7f9f2b84c4e252397e535a5
https://github.com/php-quartz/quartz/blob/a8ea9d5153cce188c7f9f2b84c4e252397e535a5/Core/SimpleScheduleBuilder.php#L168-L176
191,426
makinacorpus/php-bloom
BloomFilter.php
BloomFilter.set
public function set($element) { if (!is_scalar($element)) { $element = serialize($element); } $hashes = $this->hash($element); foreach ($hashes as $hash) { $offset = (int)floor($hash / 8); $bit = (int)($hash % 8); $this->filter[$offse...
php
public function set($element) { if (!is_scalar($element)) { $element = serialize($element); } $hashes = $this->hash($element); foreach ($hashes as $hash) { $offset = (int)floor($hash / 8); $bit = (int)($hash % 8); $this->filter[$offse...
[ "public", "function", "set", "(", "$", "element", ")", "{", "if", "(", "!", "is_scalar", "(", "$", "element", ")", ")", "{", "$", "element", "=", "serialize", "(", "$", "element", ")", ";", "}", "$", "hashes", "=", "$", "this", "->", "hash", "(",...
Set element in the filter @param mixed $element
[ "Set", "element", "in", "the", "filter" ]
41b0385e0a1cce06cb16073254570f88a3a098d1
https://github.com/makinacorpus/php-bloom/blob/41b0385e0a1cce06cb16073254570f88a3a098d1/BloomFilter.php#L116-L131
191,427
makinacorpus/php-bloom
BloomFilter.php
BloomFilter.check
public function check($element) { if (!is_scalar($element)) { $element = serialize($element); } $hashes = $this->hash($element); foreach ($hashes as $hash) { $offset = (int)floor($hash / 8); $bit = (int)($hash % 8); if (!(ord($this-...
php
public function check($element) { if (!is_scalar($element)) { $element = serialize($element); } $hashes = $this->hash($element); foreach ($hashes as $hash) { $offset = (int)floor($hash / 8); $bit = (int)($hash % 8); if (!(ord($this-...
[ "public", "function", "check", "(", "$", "element", ")", "{", "if", "(", "!", "is_scalar", "(", "$", "element", ")", ")", "{", "$", "element", "=", "serialize", "(", "$", "element", ")", ";", "}", "$", "hashes", "=", "$", "this", "->", "hash", "(...
Is element in the hash @param mixed $element @return boolean Beware that a strict false means strict false, while a strict true means "probably with a X% probably" where X is the value you built the filter with.
[ "Is", "element", "in", "the", "hash" ]
41b0385e0a1cce06cb16073254570f88a3a098d1
https://github.com/makinacorpus/php-bloom/blob/41b0385e0a1cce06cb16073254570f88a3a098d1/BloomFilter.php#L143-L162
191,428
thephpleague/omnipay-payflow
src/Message/Response.php
Response.decodeData
public function decodeData($data) { $output = array(); while (strlen($data) > 0) { preg_match('/(\w+)(\[(\d+)\])?=/', $data, $matches); $key = $matches[1]; $data = substr($data, strlen($matches[0])); if (isset($matches[3])) { $value = ...
php
public function decodeData($data) { $output = array(); while (strlen($data) > 0) { preg_match('/(\w+)(\[(\d+)\])?=/', $data, $matches); $key = $matches[1]; $data = substr($data, strlen($matches[0])); if (isset($matches[3])) { $value = ...
[ "public", "function", "decodeData", "(", "$", "data", ")", "{", "$", "output", "=", "array", "(", ")", ";", "while", "(", "strlen", "(", "$", "data", ")", ">", "0", ")", "{", "preg_match", "(", "'/(\\w+)(\\[(\\d+)\\])?=/'", ",", "$", "data", ",", "$"...
Decode absurd name value pair format
[ "Decode", "absurd", "name", "value", "pair", "format" ]
7c8a840924a383fec2ac50530c06c125ab5bab6c
https://github.com/thephpleague/omnipay-payflow/blob/7c8a840924a383fec2ac50530c06c125ab5bab6c/src/Message/Response.php#L28-L48
191,429
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Subscription.php
Subscription.cancelImmediately
public function cancelImmediately($id) { $service = $this->getService(); $rawData = !empty($this->_params) ? $this->getRawData(array('subscription' => $this->_params)) : null; $response = $service->request('subscriptions/' . (int)$id, 'DELETE', $rawData); $re...
php
public function cancelImmediately($id) { $service = $this->getService(); $rawData = !empty($this->_params) ? $this->getRawData(array('subscription' => $this->_params)) : null; $response = $service->request('subscriptions/' . (int)$id, 'DELETE', $rawData); $re...
[ "public", "function", "cancelImmediately", "(", "$", "id", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "rawData", "=", "!", "empty", "(", "$", "this", "->", "_params", ")", "?", "$", "this", "->", "getRawData",...
Set the given subscription ID to be canceled immediately @param int $id @return Subscription @see Subscription::setCancellationMessage()
[ "Set", "the", "given", "subscription", "ID", "to", "be", "canceled", "immediately" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Subscription.php#L434-L451
191,430
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Subscription.php
Subscription.cancelDelayed
public function cancelDelayed($id) { $this->setCancelAtEndOfPeriod(true); $service = $this->getService(); $rawData = $this->getRawData(array('subscription' => $this->_params)); $response = $service->request('subscriptions/' . (int)$id, 'PUT', $rawData); $responseArray = $thi...
php
public function cancelDelayed($id) { $this->setCancelAtEndOfPeriod(true); $service = $this->getService(); $rawData = $this->getRawData(array('subscription' => $this->_params)); $response = $service->request('subscriptions/' . (int)$id, 'PUT', $rawData); $responseArray = $thi...
[ "public", "function", "cancelDelayed", "(", "$", "id", ")", "{", "$", "this", "->", "setCancelAtEndOfPeriod", "(", "true", ")", ";", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "rawData", "=", "$", "this", "->", "getRawDat...
Set the subscription to be canceled at the end of the current billing period. @param int $id @return Subscription @see Subscription::setCancelAtEndOfPeriod() @see Subscription::setCancellationMessage()
[ "Set", "the", "subscription", "to", "be", "canceled", "at", "the", "end", "of", "the", "current", "billing", "period", "." ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Subscription.php#L462-L478
191,431
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Subscription.php
Subscription.reactivate
public function reactivate($id) { $service = $this->getService(); // this PUT request accepts a query string of 'include_trial' $params = array(); $includeTrial = $this->getParam('include_trial'); if (is_int($includeTrial)) { $params['include_trial'] = $includeTr...
php
public function reactivate($id) { $service = $this->getService(); // this PUT request accepts a query string of 'include_trial' $params = array(); $includeTrial = $this->getParam('include_trial'); if (is_int($includeTrial)) { $params['include_trial'] = $includeTr...
[ "public", "function", "reactivate", "(", "$", "id", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "// this PUT request accepts a query string of 'include_trial'", "$", "params", "=", "array", "(", ")", ";", "$", "includeTrial", ...
Reactivate the given subscription ID @param int $id @return Subscription @see Subscription::setIncludeTrial()
[ "Reactivate", "the", "given", "subscription", "ID" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Subscription.php#L488-L522
191,432
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Subscription.php
Subscription.resetBalance
public function resetBalance($subscriptionId) { $service = $this->getService(); $response = $service->request('subscriptions/' . (int)$subscriptionId . '/reset_balance', 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $this->_data = ...
php
public function resetBalance($subscriptionId) { $service = $this->getService(); $response = $service->request('subscriptions/' . (int)$subscriptionId . '/reset_balance', 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $this->_data = ...
[ "public", "function", "resetBalance", "(", "$", "subscriptionId", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "response", "=", "$", "service", "->", "request", "(", "'subscriptions/'", ".", "(", "int", ")", "$", ...
Chargify offers the ability to easily reset the balance of a subscription to zero. If a subscription has a positive balance, this API call will issue a credit to the subscription for the outstanding balance. This is particularly helpful if you want to reactivate a canceled subscription without charging the customer for...
[ "Chargify", "offers", "the", "ability", "to", "easily", "reset", "the", "balance", "of", "a", "subscription", "to", "zero", ".", "If", "a", "subscription", "has", "a", "positive", "balance", "this", "API", "call", "will", "issue", "a", "credit", "to", "the...
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Subscription.php#L535-L548
191,433
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Subscription.php
Subscription.listByCustomer
public function listByCustomer($customerId) { $service = $this->getService(); $response = $service->request('customers/' . (int)$customerId . '/subscriptions', 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $this->_data = $this->_no...
php
public function listByCustomer($customerId) { $service = $this->getService(); $response = $service->request('customers/' . (int)$customerId . '/subscriptions', 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $this->_data = $this->_no...
[ "public", "function", "listByCustomer", "(", "$", "customerId", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "response", "=", "$", "service", "->", "request", "(", "'customers/'", ".", "(", "int", ")", "$", "custo...
List subscriptions by customer ID @param int $customerId @return Subscription @see Subscription::setCustomerId()
[ "List", "subscriptions", "by", "customer", "ID" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Subscription.php#L646-L659
191,434
jameslkingsley/laravel-mentions
src/Collections/MentionCollection.php
MentionCollection.notify
public function notify($notify_class = '') { $this->each(function ($mention) use ($notify_class) { $mention->notify($notify_class); }); return $this; }
php
public function notify($notify_class = '') { $this->each(function ($mention) use ($notify_class) { $mention->notify($notify_class); }); return $this; }
[ "public", "function", "notify", "(", "$", "notify_class", "=", "''", ")", "{", "$", "this", "->", "each", "(", "function", "(", "$", "mention", ")", "use", "(", "$", "notify_class", ")", "{", "$", "mention", "->", "notify", "(", "$", "notify_class", ...
Notifies all mentions in the collection. @return any
[ "Notifies", "all", "mentions", "in", "the", "collection", "." ]
5db4e63d035e3fbe8d2ba9f582289365cf99abb8
https://github.com/jameslkingsley/laravel-mentions/blob/5db4e63d035e3fbe8d2ba9f582289365cf99abb8/src/Collections/MentionCollection.php#L33-L40
191,435
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Stats.php
Stats.getStats
public function getStats() { $service = $this->getService(); // stats for a site $response = $service->request('stats', 'GET', NULL, $this->getParams()); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $this->_data = $responseArray...
php
public function getStats() { $service = $this->getService(); // stats for a site $response = $service->request('stats', 'GET', NULL, $this->getParams()); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $this->_data = $responseArray...
[ "public", "function", "getStats", "(", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "// stats for a site", "$", "response", "=", "$", "service", "->", "request", "(", "'stats'", ",", "'GET'", ",", "NULL", ",", "$", "th...
Get stats for a site @return Stats
[ "Get", "stats", "for", "a", "site" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Stats.php#L28-L44
191,436
chargely/chargify-sdk-php
src/Crucial/Service/ChargifyV2/Direct.php
Direct.setData
public function setData($data = array()) { /** * Since we base our signature off of the secure[data] parameter it cannot * be changed once the signature has been generated. */ if (isset($this->requestSignature)) { throw new BadMethodCallException('The signature...
php
public function setData($data = array()) { /** * Since we base our signature off of the secure[data] parameter it cannot * be changed once the signature has been generated. */ if (isset($this->requestSignature)) { throw new BadMethodCallException('The signature...
[ "public", "function", "setData", "(", "$", "data", "=", "array", "(", ")", ")", "{", "/**\n * Since we base our signature off of the secure[data] parameter it cannot\n * be changed once the signature has been generated.\n */", "if", "(", "isset", "(", "$", ...
Tamper-proof data that you want to send to Chargify @param array $data
[ "Tamper", "-", "proof", "data", "that", "you", "want", "to", "send", "to", "Chargify" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/ChargifyV2/Direct.php#L127-L139
191,437
chargely/chargify-sdk-php
src/Crucial/Service/ChargifyV2/Direct.php
Direct.setRedirect
public function setRedirect($redirect) { /** * Changing the redirect also changes the secure[data] parameter. Since we * base our signature off of this it cannot be changed once the signature * has been generated. */ if (isset($this->requestSignature)) { ...
php
public function setRedirect($redirect) { /** * Changing the redirect also changes the secure[data] parameter. Since we * base our signature off of this it cannot be changed once the signature * has been generated. */ if (isset($this->requestSignature)) { ...
[ "public", "function", "setRedirect", "(", "$", "redirect", ")", "{", "/**\n * Changing the redirect also changes the secure[data] parameter. Since we\n * base our signature off of this it cannot be changed once the signature\n * has been generated.\n */", "if", "(...
Set the URI where Chargify should redirect @return void
[ "Set", "the", "URI", "where", "Chargify", "should", "redirect" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/ChargifyV2/Direct.php#L187-L200
191,438
chargely/chargify-sdk-php
src/Crucial/Service/ChargifyV2/Direct.php
Direct.generateNonce
protected function generateNonce() { // generate a random string $bits = 256; $bytes = ceil($bits / 8); $string = ''; for ($i = 0; $i < $bytes; $i++) { $string .= chr(mt_rand(0, 255)); } // sha1 hash return hash('sha1', $string); }
php
protected function generateNonce() { // generate a random string $bits = 256; $bytes = ceil($bits / 8); $string = ''; for ($i = 0; $i < $bytes; $i++) { $string .= chr(mt_rand(0, 255)); } // sha1 hash return hash('sha1', $string); }
[ "protected", "function", "generateNonce", "(", ")", "{", "// generate a random string", "$", "bits", "=", "256", ";", "$", "bytes", "=", "ceil", "(", "$", "bits", "/", "8", ")", ";", "$", "string", "=", "''", ";", "for", "(", "$", "i", "=", "0", ";...
Get a 40 character string to use as a nonce This is the sha1 of a random string. sha1 gives us 40 characters which is the length required by Chargify Direct. @return string
[ "Get", "a", "40", "character", "string", "to", "use", "as", "a", "nonce" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/ChargifyV2/Direct.php#L223-L235
191,439
chargely/chargify-sdk-php
src/Crucial/Service/ChargifyV2/Direct.php
Direct.getRequestSignature
public function getRequestSignature() { if (empty($this->requestSignature)) { $string = $this->getApiId() . $this->getTimeStamp() . $this->getNonce() . $this->getDataString(); $this->requestSignature = hash_hmac('sha1', $string, $this...
php
public function getRequestSignature() { if (empty($this->requestSignature)) { $string = $this->getApiId() . $this->getTimeStamp() . $this->getNonce() . $this->getDataString(); $this->requestSignature = hash_hmac('sha1', $string, $this...
[ "public", "function", "getRequestSignature", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "requestSignature", ")", ")", "{", "$", "string", "=", "$", "this", "->", "getApiId", "(", ")", ".", "$", "this", "->", "getTimeStamp", "(", ")", ...
Calculate the hmac-sha1 signature of the request This will be sent as secure[signature] in the request @return string
[ "Calculate", "the", "hmac", "-", "sha1", "signature", "of", "the", "request" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/ChargifyV2/Direct.php#L274-L287
191,440
chargely/chargify-sdk-php
src/Crucial/Service/ChargifyV2/Direct.php
Direct.getResponseSignature
public function getResponseSignature($apiId, $timestamp, $nonce, $statusCode, $resultCode, $callId) { $string = $apiId . $timestamp . $nonce . $statusCode . $resultCode . $callId; return hash_hmac('sha1', $string, $this->getService()->getA...
php
public function getResponseSignature($apiId, $timestamp, $nonce, $statusCode, $resultCode, $callId) { $string = $apiId . $timestamp . $nonce . $statusCode . $resultCode . $callId; return hash_hmac('sha1', $string, $this->getService()->getA...
[ "public", "function", "getResponseSignature", "(", "$", "apiId", ",", "$", "timestamp", ",", "$", "nonce", ",", "$", "statusCode", ",", "$", "resultCode", ",", "$", "callId", ")", "{", "$", "string", "=", "$", "apiId", ".", "$", "timestamp", ".", "$", ...
Calculate the hmac-sha1 signature of the response We will use this calculation to compare against the signature we receive back from Chargify after the redirect. @param string $apiId From $_GET['api_id'] @param string $timestamp From $_GET['timestamp'] @param string $nonce From $_GET['nonce'] @param string...
[ "Calculate", "the", "hmac", "-", "sha1", "signature", "of", "the", "response" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/ChargifyV2/Direct.php#L305-L315
191,441
chargely/chargify-sdk-php
src/Crucial/Service/ChargifyV2/Direct.php
Direct.isValidResponseSignature
public function isValidResponseSignature($signature, $apiId, $timestamp, $nonce, $statusCode, $resultCode, $callId) { return ($signature == $this->getResponseSignature($apiId, $timestamp, $nonce, $statusCode, $resultCode, $callId)); }
php
public function isValidResponseSignature($signature, $apiId, $timestamp, $nonce, $statusCode, $resultCode, $callId) { return ($signature == $this->getResponseSignature($apiId, $timestamp, $nonce, $statusCode, $resultCode, $callId)); }
[ "public", "function", "isValidResponseSignature", "(", "$", "signature", ",", "$", "apiId", ",", "$", "timestamp", ",", "$", "nonce", ",", "$", "statusCode", ",", "$", "resultCode", ",", "$", "callId", ")", "{", "return", "(", "$", "signature", "==", "$"...
Test if response signature matches what we expect This should be called after the redirect from Chargify to verify the response signature. The signature to compare against will be available in the query string $_GET['signature'] @param string $signature Signature to compare against, from $_GET['signature'] @param st...
[ "Test", "if", "response", "signature", "matches", "what", "we", "expect" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/ChargifyV2/Direct.php#L335-L338
191,442
chargely/chargify-sdk-php
src/Crucial/Service/ChargifyV2/Direct.php
Direct.getHiddenFields
public function getHiddenFields() { $apiId = '<input type="hidden" name="secure[api_id]" value="' . $this->getApiId() . '" />'; $timestamp = '<input type="hidden" name="secure[timestamp]" value="' . $this->getTimeStamp() . '" />'; $nonce = '<input type="hidden" name="secure[nonce]...
php
public function getHiddenFields() { $apiId = '<input type="hidden" name="secure[api_id]" value="' . $this->getApiId() . '" />'; $timestamp = '<input type="hidden" name="secure[timestamp]" value="' . $this->getTimeStamp() . '" />'; $nonce = '<input type="hidden" name="secure[nonce]...
[ "public", "function", "getHiddenFields", "(", ")", "{", "$", "apiId", "=", "'<input type=\"hidden\" name=\"secure[api_id]\" value=\"'", ".", "$", "this", "->", "getApiId", "(", ")", ".", "'\" />'", ";", "$", "timestamp", "=", "'<input type=\"hidden\" name=\"secure[ti...
Get the html for all hidden fields @return string
[ "Get", "the", "html", "for", "all", "hidden", "fields" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/ChargifyV2/Direct.php#L367-L376
191,443
flownative/flow-aws-s3
Classes/S3Target.php
S3Target.initializeObject
public function initializeObject() { $clientOptions = $this->s3DefaultProfile; $this->s3Client = new S3Client($clientOptions); $this->s3Client->registerStreamWrapper(); }
php
public function initializeObject() { $clientOptions = $this->s3DefaultProfile; $this->s3Client = new S3Client($clientOptions); $this->s3Client->registerStreamWrapper(); }
[ "public", "function", "initializeObject", "(", ")", "{", "$", "clientOptions", "=", "$", "this", "->", "s3DefaultProfile", ";", "$", "this", "->", "s3Client", "=", "new", "S3Client", "(", "$", "clientOptions", ")", ";", "$", "this", "->", "s3Client", "->",...
Initialize the S3 Client @return void
[ "Initialize", "the", "S3", "Client" ]
396aa1b6426319eb05b9c8396686a68ec6b200ff
https://github.com/flownative/flow-aws-s3/blob/396aa1b6426319eb05b9c8396686a68ec6b200ff/Classes/S3Target.php#L136-L142
191,444
chargely/chargify-sdk-php
src/Crucial/Service/Chargify.php
Chargify.request
public function request($path, $method, $rawData = null, $params = []) { $method = strtoupper($method); $path = ltrim($path, '/'); $path = $path . '.' . $this->format; $client = $this->getHttpClient(); $method = strtoupper($method); $options = [ '...
php
public function request($path, $method, $rawData = null, $params = []) { $method = strtoupper($method); $path = ltrim($path, '/'); $path = $path . '.' . $this->format; $client = $this->getHttpClient(); $method = strtoupper($method); $options = [ '...
[ "public", "function", "request", "(", "$", "path", ",", "$", "method", ",", "$", "rawData", "=", "null", ",", "$", "params", "=", "[", "]", ")", "{", "$", "method", "=", "strtoupper", "(", "$", "method", ")", ";", "$", "path", "=", "ltrim", "(", ...
Send the request to Chargify @param string $path URL path we are requesting such as: /subscriptions/<subscription_id>/adjustments @param string $method GET, POST, PUT, DELETE @param string $rawData @param array $params @return Response|FALSE Response object or FALSE if there was no response (networking error, time...
[ "Send", "the", "request", "to", "Chargify" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify.php#L171-L208
191,445
jarektkaczyk/laravel-global-scope
examples/PublishedScope.php
PublishedScope.apply
public function apply(Builder $builder, Model $model) { $column = $model->getQualifiedPublishedAtColumn(); $builder->where($column, '=', 1); $this->addWithDrafts($builder); }
php
public function apply(Builder $builder, Model $model) { $column = $model->getQualifiedPublishedAtColumn(); $builder->where($column, '=', 1); $this->addWithDrafts($builder); }
[ "public", "function", "apply", "(", "Builder", "$", "builder", ",", "Model", "$", "model", ")", "{", "$", "column", "=", "$", "model", "->", "getQualifiedPublishedAtColumn", "(", ")", ";", "$", "builder", "->", "where", "(", "$", "column", ",", "'='", ...
This remains unchanged - it's the only method that needs to be implemented
[ "This", "remains", "unchanged", "-", "it", "s", "the", "only", "method", "that", "needs", "to", "be", "implemented" ]
8a5881892eaa24bbca97f2584d3c92e5254b2d88
https://github.com/jarektkaczyk/laravel-global-scope/blob/8a5881892eaa24bbca97f2584d3c92e5254b2d88/examples/PublishedScope.php#L14-L21
191,446
jarektkaczyk/laravel-global-scope
examples/PublishedScope.php
PublishedScope.addWithDrafts
protected function addWithDrafts(Builder $builder) { $builder->macro('withDrafts', function (Builder $builder) { $this->remove($builder, $builder->getModel()); return $builder; }); }
php
protected function addWithDrafts(Builder $builder) { $builder->macro('withDrafts', function (Builder $builder) { $this->remove($builder, $builder->getModel()); return $builder; }); }
[ "protected", "function", "addWithDrafts", "(", "Builder", "$", "builder", ")", "{", "$", "builder", "->", "macro", "(", "'withDrafts'", ",", "function", "(", "Builder", "$", "builder", ")", "{", "$", "this", "->", "remove", "(", "$", "builder", ",", "$",...
Remains unchanged - it's just a helper method
[ "Remains", "unchanged", "-", "it", "s", "just", "a", "helper", "method" ]
8a5881892eaa24bbca97f2584d3c92e5254b2d88
https://github.com/jarektkaczyk/laravel-global-scope/blob/8a5881892eaa24bbca97f2584d3c92e5254b2d88/examples/PublishedScope.php#L24-L31
191,447
jarektkaczyk/laravel-global-scope
src/GlobalScope.php
GlobalScope.getScopeConstraints
protected function getScopeConstraints(Model $model) { $builder = $model->newQueryWithoutScopes(); $this->apply($builder, $model); return (array) $builder->getQuery()->wheres; }
php
protected function getScopeConstraints(Model $model) { $builder = $model->newQueryWithoutScopes(); $this->apply($builder, $model); return (array) $builder->getQuery()->wheres; }
[ "protected", "function", "getScopeConstraints", "(", "Model", "$", "model", ")", "{", "$", "builder", "=", "$", "model", "->", "newQueryWithoutScopes", "(", ")", ";", "$", "this", "->", "apply", "(", "$", "builder", ",", "$", "model", ")", ";", "return",...
Get an array of the constraints applied by the scope. @param \Illuminate\Database\Eloquent\Model $model @return array
[ "Get", "an", "array", "of", "the", "constraints", "applied", "by", "the", "scope", "." ]
8a5881892eaa24bbca97f2584d3c92e5254b2d88
https://github.com/jarektkaczyk/laravel-global-scope/blob/8a5881892eaa24bbca97f2584d3c92e5254b2d88/src/GlobalScope.php#L60-L67
191,448
jarektkaczyk/laravel-global-scope
src/GlobalScope.php
GlobalScope.removeBindings
protected function removeBindings(Query $query, $key, $count) { $bindings = $query->getRawBindings()['where']; array_splice($bindings, $key, $count); $query->setBindings($bindings, 'where'); }
php
protected function removeBindings(Query $query, $key, $count) { $bindings = $query->getRawBindings()['where']; array_splice($bindings, $key, $count); $query->setBindings($bindings, 'where'); }
[ "protected", "function", "removeBindings", "(", "Query", "$", "query", ",", "$", "key", ",", "$", "count", ")", "{", "$", "bindings", "=", "$", "query", "->", "getRawBindings", "(", ")", "[", "'where'", "]", ";", "array_splice", "(", "$", "bindings", "...
Remove bindings from the query builder. @param \Illuminate\Database\Query\Builder $query @param integer $key @param integer $count @return void
[ "Remove", "bindings", "from", "the", "query", "builder", "." ]
8a5881892eaa24bbca97f2584d3c92e5254b2d88
https://github.com/jarektkaczyk/laravel-global-scope/blob/8a5881892eaa24bbca97f2584d3c92e5254b2d88/src/GlobalScope.php#L89-L96
191,449
camspiers/statistical-classifier
src/Camspiers/StatisticalClassifier/DataSource/DataArray.php
DataArray.prepare
protected function prepare() { if (!is_array($this->data) || count($this->data) == 0) { $this->setData($this->read()); } }
php
protected function prepare() { if (!is_array($this->data) || count($this->data) == 0) { $this->setData($this->read()); } }
[ "protected", "function", "prepare", "(", ")", "{", "if", "(", "!", "is_array", "(", "$", "this", "->", "data", ")", "||", "count", "(", "$", "this", "->", "data", ")", "==", "0", ")", "{", "$", "this", "->", "setData", "(", "$", "this", "->", "...
Read the data and set it
[ "Read", "the", "data", "and", "set", "it" ]
53f4cbf25d3c96d133add865ce57777ce9fc36d2
https://github.com/camspiers/statistical-classifier/blob/53f4cbf25d3c96d133add865ce57777ce9fc36d2/src/Camspiers/StatisticalClassifier/DataSource/DataArray.php#L183-L188
191,450
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Coupon.php
Coupon.show
public function show($productFamilyId, $couponId) { $service = $this->getService(); $response = $service->request('product_families/' . $productFamilyId . '/coupons/' . $couponId, 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { ...
php
public function show($productFamilyId, $couponId) { $service = $this->getService(); $response = $service->request('product_families/' . $productFamilyId . '/coupons/' . $couponId, 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { ...
[ "public", "function", "show", "(", "$", "productFamilyId", ",", "$", "couponId", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "response", "=", "$", "service", "->", "request", "(", "'product_families/'", ".", "$", ...
You can retrieve a coupon via the API with the show method. Retrieving a coupon via the API will allow you to determine whether or not the coupon is valid. @param int $productFamilyId @param int $couponId @return Coupon
[ "You", "can", "retrieve", "a", "coupon", "via", "the", "API", "with", "the", "show", "method", ".", "Retrieving", "a", "coupon", "via", "the", "API", "will", "allow", "you", "to", "determine", "whether", "or", "not", "the", "coupon", "is", "valid", "." ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Coupon.php#L46-L60
191,451
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Coupon.php
Coupon.find
public function find($productFamilyId) { $service = $this->getService(); $response = $service->request('product_families/' . $productFamilyId . '/coupons/find', 'GET', NULL, $this->_params); $responseArray = $this->getResponseArray($response); // status code must be 200, ...
php
public function find($productFamilyId) { $service = $this->getService(); $response = $service->request('product_families/' . $productFamilyId . '/coupons/find', 'GET', NULL, $this->_params); $responseArray = $this->getResponseArray($response); // status code must be 200, ...
[ "public", "function", "find", "(", "$", "productFamilyId", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "response", "=", "$", "service", "->", "request", "(", "'product_families/'", ".", "$", "productFamilyId", ".", ...
You can search for a coupon via the API with the find method. By passing a code parameter, the find record will attempt to locate a coupon that matches that code. This method is useful for validating coupon codes that are entered by a customer. If no coupon is found, a 404 is returned. @param int $productFamilyId @re...
[ "You", "can", "search", "for", "a", "coupon", "via", "the", "API", "with", "the", "find", "method", ".", "By", "passing", "a", "code", "parameter", "the", "find", "record", "will", "attempt", "to", "locate", "a", "coupon", "that", "matches", "that", "cod...
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Coupon.php#L74-L88
191,452
hannesvdvreken/guzzle-debugbar
src/Support/Laravel/ServiceProvider.php
ServiceProvider.register
public function register() { // Configuring all guzzle clients. $this->app->bind(ClientInterface::class, function () { // Guzzle client return new Client(['handler' => $this->app->make(HandlerStack::class)]); }); $this->app->alias(ClientInterface::class, Clie...
php
public function register() { // Configuring all guzzle clients. $this->app->bind(ClientInterface::class, function () { // Guzzle client return new Client(['handler' => $this->app->make(HandlerStack::class)]); }); $this->app->alias(ClientInterface::class, Clie...
[ "public", "function", "register", "(", ")", "{", "// Configuring all guzzle clients.", "$", "this", "->", "app", "->", "bind", "(", "ClientInterface", "::", "class", ",", "function", "(", ")", "{", "// Guzzle client", "return", "new", "Client", "(", "[", "'han...
Register method.
[ "Register", "method", "." ]
724e10ae6da90b2084e10f7e4d5b2aeb514d8da4
https://github.com/hannesvdvreken/guzzle-debugbar/blob/724e10ae6da90b2084e10f7e4d5b2aeb514d8da4/src/Support/Laravel/ServiceProvider.php#L36-L81
191,453
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Event.php
Event.setPagination
public function setPagination($page, $perPage) { $this->setParam('page', $page); $this->setParam('per_page', $perPage); return $this; }
php
public function setPagination($page, $perPage) { $this->setParam('page', $page); $this->setParam('per_page', $perPage); return $this; }
[ "public", "function", "setPagination", "(", "$", "page", ",", "$", "perPage", ")", "{", "$", "this", "->", "setParam", "(", "'page'", ",", "$", "page", ")", ";", "$", "this", "->", "setParam", "(", "'per_page'", ",", "$", "perPage", ")", ";", "return...
The page number and number of results used for pagination. By default results are paginated 30 per page. @param int $page @param int $perPage @return Event
[ "The", "page", "number", "and", "number", "of", "results", "used", "for", "pagination", ".", "By", "default", "results", "are", "paginated", "30", "per", "page", "." ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Event.php#L31-L37
191,454
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Event.php
Event.forSubscription
public function forSubscription($subscriptionId) { $service = $this->getService(); // events for a subscription $response = $service->request('subscriptions/' . $subscriptionId . '/events', 'GET', NULL, $this->getParams()); $responseArray = $this->getResponseArray($response); ...
php
public function forSubscription($subscriptionId) { $service = $this->getService(); // events for a subscription $response = $service->request('subscriptions/' . $subscriptionId . '/events', 'GET', NULL, $this->getParams()); $responseArray = $this->getResponseArray($response); ...
[ "public", "function", "forSubscription", "(", "$", "subscriptionId", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "// events for a subscription", "$", "response", "=", "$", "service", "->", "request", "(", "'subscriptions/'", ...
Return events for the given subscription @param int $subscriptionId @return Event @see Event::setPagination() @see Event::setSinceId() @see Event::setMaxId() @see Event::setDirection()
[ "Return", "events", "for", "the", "given", "subscription" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Event.php#L123-L139
191,455
thephpleague/omnipay-payflow
src/Message/AuthorizeRequest.php
AuthorizeRequest.encodeData
public function encodeData(array $data) { $output = array(); foreach ($data as $key => $value) { $output[] = $key.'['.strlen($value).']='.$value; } return implode('&', $output); }
php
public function encodeData(array $data) { $output = array(); foreach ($data as $key => $value) { $output[] = $key.'['.strlen($value).']='.$value; } return implode('&', $output); }
[ "public", "function", "encodeData", "(", "array", "$", "data", ")", "{", "$", "output", "=", "array", "(", ")", ";", "foreach", "(", "$", "data", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "output", "[", "]", "=", "$", "key", ".", "'[...
Encode absurd name value pair format
[ "Encode", "absurd", "name", "value", "pair", "format" ]
7c8a840924a383fec2ac50530c06c125ab5bab6c
https://github.com/thephpleague/omnipay-payflow/blob/7c8a840924a383fec2ac50530c06c125ab5bab6c/src/Message/AuthorizeRequest.php#L298-L306
191,456
jameslkingsley/laravel-mentions
src/Repositories/MentionRepository.php
MentionRepository.encoded
public function encoded() { $mentions = $this->get(); $encoded = collect(); foreach ($mentions as $mention) { $pool = $this->mention->pool($mention); $encoded->push("{$pool->key}:{$mention->getKey()}"); } return $encoded->implode(','); }
php
public function encoded() { $mentions = $this->get(); $encoded = collect(); foreach ($mentions as $mention) { $pool = $this->mention->pool($mention); $encoded->push("{$pool->key}:{$mention->getKey()}"); } return $encoded->implode(','); }
[ "public", "function", "encoded", "(", ")", "{", "$", "mentions", "=", "$", "this", "->", "get", "(", ")", ";", "$", "encoded", "=", "collect", "(", ")", ";", "foreach", "(", "$", "mentions", "as", "$", "mention", ")", "{", "$", "pool", "=", "$", ...
Gets the mentions as an encoded string for use in form fields. @return any
[ "Gets", "the", "mentions", "as", "an", "encoded", "string", "for", "use", "in", "form", "fields", "." ]
5db4e63d035e3fbe8d2ba9f582289365cf99abb8
https://github.com/jameslkingsley/laravel-mentions/blob/5db4e63d035e3fbe8d2ba9f582289365cf99abb8/src/Repositories/MentionRepository.php#L42-L53
191,457
jameslkingsley/laravel-mentions
src/Repositories/MentionRepository.php
MentionRepository.parse
public function parse(string $list) { if (!$list) { return $list; } $list = collect(explode(',', $list)); return $list->map(function ($item) { $parts = explode(':', $item); $model = app()->make(config('mentions.pools.'.$parts[0].'.model')); ...
php
public function parse(string $list) { if (!$list) { return $list; } $list = collect(explode(',', $list)); return $list->map(function ($item) { $parts = explode(':', $item); $model = app()->make(config('mentions.pools.'.$parts[0].'.model')); ...
[ "public", "function", "parse", "(", "string", "$", "list", ")", "{", "if", "(", "!", "$", "list", ")", "{", "return", "$", "list", ";", "}", "$", "list", "=", "collect", "(", "explode", "(", "','", ",", "$", "list", ")", ")", ";", "return", "$"...
Parses the encoded string and returns a collection of models. @return Collection Model
[ "Parses", "the", "encoded", "string", "and", "returns", "a", "collection", "of", "models", "." ]
5db4e63d035e3fbe8d2ba9f582289365cf99abb8
https://github.com/jameslkingsley/laravel-mentions/blob/5db4e63d035e3fbe8d2ba9f582289365cf99abb8/src/Repositories/MentionRepository.php#L60-L73
191,458
jameslkingsley/laravel-mentions
src/Repositories/MentionRepository.php
MentionRepository.create
public function create(Model $recipient, $notify = true) { $mention = $this->mention->create([ 'model_type' => get_class($this->model), 'model_id' => $this->model->getKey(), 'recipient_type' => get_class($recipient), 'recipient_id' => $recipient->getKey() ...
php
public function create(Model $recipient, $notify = true) { $mention = $this->mention->create([ 'model_type' => get_class($this->model), 'model_id' => $this->model->getKey(), 'recipient_type' => get_class($recipient), 'recipient_id' => $recipient->getKey() ...
[ "public", "function", "create", "(", "Model", "$", "recipient", ",", "$", "notify", "=", "true", ")", "{", "$", "mention", "=", "$", "this", "->", "mention", "->", "create", "(", "[", "'model_type'", "=>", "get_class", "(", "$", "this", "->", "model", ...
Creates a mention record. @return any
[ "Creates", "a", "mention", "record", "." ]
5db4e63d035e3fbe8d2ba9f582289365cf99abb8
https://github.com/jameslkingsley/laravel-mentions/blob/5db4e63d035e3fbe8d2ba9f582289365cf99abb8/src/Repositories/MentionRepository.php#L80-L96
191,459
jameslkingsley/laravel-mentions
src/Repositories/MentionRepository.php
MentionRepository.destroy
public function destroy(Model $model) { $this->mention->where('model_type', get_class($this->model)) ->where('model_id', $this->model->getKey()) ->where('recipient_type', get_class($model)) ->where('recipient_id', $model->getKey()) ->delete(); }
php
public function destroy(Model $model) { $this->mention->where('model_type', get_class($this->model)) ->where('model_id', $this->model->getKey()) ->where('recipient_type', get_class($model)) ->where('recipient_id', $model->getKey()) ->delete(); }
[ "public", "function", "destroy", "(", "Model", "$", "model", ")", "{", "$", "this", "->", "mention", "->", "where", "(", "'model_type'", ",", "get_class", "(", "$", "this", "->", "model", ")", ")", "->", "where", "(", "'model_id'", ",", "$", "this", ...
Destroys all mentions for the given model. @return any
[ "Destroys", "all", "mentions", "for", "the", "given", "model", "." ]
5db4e63d035e3fbe8d2ba9f582289365cf99abb8
https://github.com/jameslkingsley/laravel-mentions/blob/5db4e63d035e3fbe8d2ba9f582289365cf99abb8/src/Repositories/MentionRepository.php#L103-L110
191,460
camspiers/statistical-classifier
src/Camspiers/StatisticalClassifier/Classifier/SVM.php
SVM.prepareDocument
protected function prepareDocument($document, SVMModel $model) { $tokenMap = $model->getTokenMap(); $data = array(); if ($this->documentNormalizer) { $document = $this->documentNormalizer->normalize($document); } $tokens = $this->tokenizer->tokenize($document);...
php
protected function prepareDocument($document, SVMModel $model) { $tokenMap = $model->getTokenMap(); $data = array(); if ($this->documentNormalizer) { $document = $this->documentNormalizer->normalize($document); } $tokens = $this->tokenizer->tokenize($document);...
[ "protected", "function", "prepareDocument", "(", "$", "document", ",", "SVMModel", "$", "model", ")", "{", "$", "tokenMap", "=", "$", "model", "->", "getTokenMap", "(", ")", ";", "$", "data", "=", "array", "(", ")", ";", "if", "(", "$", "this", "->",...
Formats the document for use in \SVMModel @param string $document @param \Camspiers\StatisticalClassifier\Model\SVMModel $model @return array
[ "Formats", "the", "document", "for", "use", "in", "\\", "SVMModel" ]
53f4cbf25d3c96d133add865ce57777ce9fc36d2
https://github.com/camspiers/statistical-classifier/blob/53f4cbf25d3c96d133add865ce57777ce9fc36d2/src/Camspiers/StatisticalClassifier/Classifier/SVM.php#L225-L252
191,461
camspiers/statistical-classifier
src/Camspiers/StatisticalClassifier/Classifier/SVM.php
SVM.setThreshold
public function setThreshold($threshold) { if (is_numeric($threshold)) { $this->threshold = $threshold; $this->svm->setOptions( array( \SVM::OPT_PROBABILITY => true ) ); if ($this->model->isPrepared()) { ...
php
public function setThreshold($threshold) { if (is_numeric($threshold)) { $this->threshold = $threshold; $this->svm->setOptions( array( \SVM::OPT_PROBABILITY => true ) ); if ($this->model->isPrepared()) { ...
[ "public", "function", "setThreshold", "(", "$", "threshold", ")", "{", "if", "(", "is_numeric", "(", "$", "threshold", ")", ")", "{", "$", "this", "->", "threshold", "=", "$", "threshold", ";", "$", "this", "->", "svm", "->", "setOptions", "(", "array"...
Set the threshold probability a classifier document must meet @param float $threshold float value between 0-1 @throws \InvalidArgumentException
[ "Set", "the", "threshold", "probability", "a", "classifier", "document", "must", "meet" ]
53f4cbf25d3c96d133add865ce57777ce9fc36d2
https://github.com/camspiers/statistical-classifier/blob/53f4cbf25d3c96d133add865ce57777ce9fc36d2/src/Camspiers/StatisticalClassifier/Classifier/SVM.php#L258-L273
191,462
camspiers/statistical-classifier
src/Camspiers/StatisticalClassifier/Classifier/SVM.php
SVM.getProbabilities
public function getProbabilities($document) { if ($this->hasThreshold()) { $model = $this->preparedModel(); $data = $this->prepareDocument($document, $model); $probabilities = array(); $model->getModel()->predict_probability($data, $probabilities); ...
php
public function getProbabilities($document) { if ($this->hasThreshold()) { $model = $this->preparedModel(); $data = $this->prepareDocument($document, $model); $probabilities = array(); $model->getModel()->predict_probability($data, $probabilities); ...
[ "public", "function", "getProbabilities", "(", "$", "document", ")", "{", "if", "(", "$", "this", "->", "hasThreshold", "(", ")", ")", "{", "$", "model", "=", "$", "this", "->", "preparedModel", "(", ")", ";", "$", "data", "=", "$", "this", "->", "...
Returns the probabilities of the document being in each category @param string $document @return array
[ "Returns", "the", "probabilities", "of", "the", "document", "being", "in", "each", "category" ]
53f4cbf25d3c96d133add865ce57777ce9fc36d2
https://github.com/camspiers/statistical-classifier/blob/53f4cbf25d3c96d133add865ce57777ce9fc36d2/src/Camspiers/StatisticalClassifier/Classifier/SVM.php#L279-L289
191,463
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/AbstractEntity.php
AbstractEntity.getParam
public function getParam($paramName) { return !empty($this->_params[$paramName]) ? $this->_params[$paramName] : NULL; }
php
public function getParam($paramName) { return !empty($this->_params[$paramName]) ? $this->_params[$paramName] : NULL; }
[ "public", "function", "getParam", "(", "$", "paramName", ")", "{", "return", "!", "empty", "(", "$", "this", "->", "_params", "[", "$", "paramName", "]", ")", "?", "$", "this", "->", "_params", "[", "$", "paramName", "]", ":", "NULL", ";", "}" ]
Get a single parameter. @param string $paramName @return string|array
[ "Get", "a", "single", "parameter", "." ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/AbstractEntity.php#L95-L98
191,464
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/AbstractEntity.php
AbstractEntity.arrayToObject
public function arrayToObject($array) { $object = new \stdClass(); foreach ($array as $k => $v) { if (is_array($v)) { // load nested elements $v = $this->arrayToObject($v); } $object->{$k} = $v; } return $object; ...
php
public function arrayToObject($array) { $object = new \stdClass(); foreach ($array as $k => $v) { if (is_array($v)) { // load nested elements $v = $this->arrayToObject($v); } $object->{$k} = $v; } return $object; ...
[ "public", "function", "arrayToObject", "(", "$", "array", ")", "{", "$", "object", "=", "new", "\\", "stdClass", "(", ")", ";", "foreach", "(", "$", "array", "as", "$", "k", "=>", "$", "v", ")", "{", "if", "(", "is_array", "(", "$", "v", ")", "...
Assmbles an object from given array @param array $array @return \stdClass
[ "Assmbles", "an", "object", "from", "given", "array" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/AbstractEntity.php#L117-L129
191,465
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/AbstractEntity.php
AbstractEntity.offsetGet
public function offsetGet($offset) { return isset($this->_data[$offset]) ? $this->_data[$offset] : NULL; }
php
public function offsetGet($offset) { return isset($this->_data[$offset]) ? $this->_data[$offset] : NULL; }
[ "public", "function", "offsetGet", "(", "$", "offset", ")", "{", "return", "isset", "(", "$", "this", "->", "_data", "[", "$", "offset", "]", ")", "?", "$", "this", "->", "_data", "[", "$", "offset", "]", ":", "NULL", ";", "}" ]
For \ArrayAccess interface @param mixed $offset @return bool
[ "For", "\\", "ArrayAccess", "interface" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/AbstractEntity.php#L263-L266
191,466
LeaseWeb/LswApiCallerBundle
Call/CurlCall.php
CurlCall.parseCurlOptions
protected function parseCurlOptions($config) { $options = array(); $prefix = 'CURLOPT_'; foreach ($config as $key => $value) { $constantName = $prefix . strtoupper($key); if (!defined($constantName)) { $messageTemplate = "Invalid option '%s' in apical...
php
protected function parseCurlOptions($config) { $options = array(); $prefix = 'CURLOPT_'; foreach ($config as $key => $value) { $constantName = $prefix . strtoupper($key); if (!defined($constantName)) { $messageTemplate = "Invalid option '%s' in apical...
[ "protected", "function", "parseCurlOptions", "(", "$", "config", ")", "{", "$", "options", "=", "array", "(", ")", ";", "$", "prefix", "=", "'CURLOPT_'", ";", "foreach", "(", "$", "config", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "consta...
Private method to parse cURL options from the bundle config. If some option is not defined an exception will be thrown. @param array $config ApiCallerBundle configuration @throws \Exception Specified cURL option can't be found @return array
[ "Private", "method", "to", "parse", "cURL", "options", "from", "the", "bundle", "config", ".", "If", "some", "option", "is", "not", "defined", "an", "exception", "will", "be", "thrown", "." ]
dcd3c09940f3f07fa71e5c3fcd5319a048cb7b9b
https://github.com/LeaseWeb/LswApiCallerBundle/blob/dcd3c09940f3f07fa71e5c3fcd5319a048cb7b9b/Call/CurlCall.php#L214-L230
191,467
camspiers/statistical-classifier
src/Camspiers/StatisticalClassifier/DataSource/Converter.php
Converter.run
public function run() { $this->convertTo->setData($this->convertFrom->getData()); $this->convertTo->write(); }
php
public function run() { $this->convertTo->setData($this->convertFrom->getData()); $this->convertTo->write(); }
[ "public", "function", "run", "(", ")", "{", "$", "this", "->", "convertTo", "->", "setData", "(", "$", "this", "->", "convertFrom", "->", "getData", "(", ")", ")", ";", "$", "this", "->", "convertTo", "->", "write", "(", ")", ";", "}" ]
run the conversion @return null
[ "run", "the", "conversion" ]
53f4cbf25d3c96d133add865ce57777ce9fc36d2
https://github.com/camspiers/statistical-classifier/blob/53f4cbf25d3c96d133add865ce57777ce9fc36d2/src/Camspiers/StatisticalClassifier/DataSource/Converter.php#L44-L48
191,468
LeaseWeb/LswApiCallerBundle
Caller/LoggingApiCaller.php
LoggingApiCaller.call
public function call(ApiCallInterface $call) { if ($call instanceof CurlCall) { if ($this->freshConnect || $this->engine === null || !($this->engine instanceof Curl)) { $this->engine = new Curl(); } } else { if ($this->freshConnect || $this->engine...
php
public function call(ApiCallInterface $call) { if ($call instanceof CurlCall) { if ($this->freshConnect || $this->engine === null || !($this->engine instanceof Curl)) { $this->engine = new Curl(); } } else { if ($this->freshConnect || $this->engine...
[ "public", "function", "call", "(", "ApiCallInterface", "$", "call", ")", "{", "if", "(", "$", "call", "instanceof", "CurlCall", ")", "{", "if", "(", "$", "this", "->", "freshConnect", "||", "$", "this", "->", "engine", "===", "null", "||", "!", "(", ...
Execute an API call using a certain method @param ApiCallInterface $call The API call @return string The parsed response of the API call
[ "Execute", "an", "API", "call", "using", "a", "certain", "method" ]
dcd3c09940f3f07fa71e5c3fcd5319a048cb7b9b
https://github.com/LeaseWeb/LswApiCallerBundle/blob/dcd3c09940f3f07fa71e5c3fcd5319a048cb7b9b/Caller/LoggingApiCaller.php#L55-L83
191,469
SmoDav/ipay
src/iPay/Cashier.php
Cashier.withCustomer
public function withCustomer($telephone, $email = null, $sendEmail = false) { $this->customer = [ 'telephoneNumber' => $telephone, 'email' => $email, 'sendEmail' => $sendEmail ? 1 : 0, ]; return $this; }
php
public function withCustomer($telephone, $email = null, $sendEmail = false) { $this->customer = [ 'telephoneNumber' => $telephone, 'email' => $email, 'sendEmail' => $sendEmail ? 1 : 0, ]; return $this; }
[ "public", "function", "withCustomer", "(", "$", "telephone", ",", "$", "email", "=", "null", ",", "$", "sendEmail", "=", "false", ")", "{", "$", "this", "->", "customer", "=", "[", "'telephoneNumber'", "=>", "$", "telephone", ",", "'email'", "=>", "$", ...
Set the customer details to be used during the transaction. @param $telephone @param null $email @param bool $sendEmail @return $this
[ "Set", "the", "customer", "details", "to", "be", "used", "during", "the", "transaction", "." ]
000a8f151ff83b7a2d757531fe28e050b4bc48c0
https://github.com/SmoDav/ipay/blob/000a8f151ff83b7a2d757531fe28e050b4bc48c0/src/iPay/Cashier.php#L228-L237
191,470
SmoDav/ipay
src/iPay/Cashier.php
Cashier.usingVendorId
public function usingVendorId($vendorId, $hash) { $this->vendorId = $vendorId; $this->hashKey = $hash; return $this; }
php
public function usingVendorId($vendorId, $hash) { $this->vendorId = $vendorId; $this->hashKey = $hash; return $this; }
[ "public", "function", "usingVendorId", "(", "$", "vendorId", ",", "$", "hash", ")", "{", "$", "this", "->", "vendorId", "=", "$", "vendorId", ";", "$", "this", "->", "hashKey", "=", "$", "hash", ";", "return", "$", "this", ";", "}" ]
Set up the vendor details. @param $vendorId @param $hash @return $this
[ "Set", "up", "the", "vendor", "details", "." ]
000a8f151ff83b7a2d757531fe28e050b4bc48c0
https://github.com/SmoDav/ipay/blob/000a8f151ff83b7a2d757531fe28e050b4bc48c0/src/iPay/Cashier.php#L246-L252
191,471
SmoDav/ipay
src/iPay/Cashier.php
Cashier.withPayloads
public function withPayloads($first, $second, $third, $fourth) { $this->payloads = [ 'payload1' => $first, 'payload2' => $second, 'payload3' => $third, 'payload4' => $fourth, ]; return $this; }
php
public function withPayloads($first, $second, $third, $fourth) { $this->payloads = [ 'payload1' => $first, 'payload2' => $second, 'payload3' => $third, 'payload4' => $fourth, ]; return $this; }
[ "public", "function", "withPayloads", "(", "$", "first", ",", "$", "second", ",", "$", "third", ",", "$", "fourth", ")", "{", "$", "this", "->", "payloads", "=", "[", "'payload1'", "=>", "$", "first", ",", "'payload2'", "=>", "$", "second", ",", "'pa...
Set up the additional parameters to go with the request. @param $first @param $second @param $third @param $fourth @return $this
[ "Set", "up", "the", "additional", "parameters", "to", "go", "with", "the", "request", "." ]
000a8f151ff83b7a2d757531fe28e050b4bc48c0
https://github.com/SmoDav/ipay/blob/000a8f151ff83b7a2d757531fe28e050b4bc48c0/src/iPay/Cashier.php#L287-L297
191,472
SmoDav/ipay
src/iPay/Cashier.php
Cashier.withCallback
public function withCallback($successCallback, $failedCallback = null, $callbackMode = self::CALLBACK_MODE_HTTP) { $this->callback = $successCallback; $this->failedCallback = $failedCallback; $this->callbackMode = $callbackMode; return $this; }
php
public function withCallback($successCallback, $failedCallback = null, $callbackMode = self::CALLBACK_MODE_HTTP) { $this->callback = $successCallback; $this->failedCallback = $failedCallback; $this->callbackMode = $callbackMode; return $this; }
[ "public", "function", "withCallback", "(", "$", "successCallback", ",", "$", "failedCallback", "=", "null", ",", "$", "callbackMode", "=", "self", "::", "CALLBACK_MODE_HTTP", ")", "{", "$", "this", "->", "callback", "=", "$", "successCallback", ";", "$", "th...
Set up the callbacks. @param $successCallback @param null $failedCallback @param int $callbackMode @return $this
[ "Set", "up", "the", "callbacks", "." ]
000a8f151ff83b7a2d757531fe28e050b4bc48c0
https://github.com/SmoDav/ipay/blob/000a8f151ff83b7a2d757531fe28e050b4bc48c0/src/iPay/Cashier.php#L307-L314
191,473
SmoDav/ipay
src/iPay/Cashier.php
Cashier.transact
public function transact($amount, $orderId, $invoiceNumber = null) { $this->transaction = [ 'amount' => $amount, 'orderId' => $orderId, 'invoiceNumber' => $invoiceNumber ?: $orderId, ]; return $this->initiateTransaction(); }
php
public function transact($amount, $orderId, $invoiceNumber = null) { $this->transaction = [ 'amount' => $amount, 'orderId' => $orderId, 'invoiceNumber' => $invoiceNumber ?: $orderId, ]; return $this->initiateTransaction(); }
[ "public", "function", "transact", "(", "$", "amount", ",", "$", "orderId", ",", "$", "invoiceNumber", "=", "null", ")", "{", "$", "this", "->", "transaction", "=", "[", "'amount'", "=>", "$", "amount", ",", "'orderId'", "=>", "$", "orderId", ",", "'inv...
Set up the transaction details and forward the request to be handled. @param $amount @param $orderId @param null $invoiceNumber @return string
[ "Set", "up", "the", "transaction", "details", "and", "forward", "the", "request", "to", "be", "handled", "." ]
000a8f151ff83b7a2d757531fe28e050b4bc48c0
https://github.com/SmoDav/ipay/blob/000a8f151ff83b7a2d757531fe28e050b4bc48c0/src/iPay/Cashier.php#L324-L333
191,474
SmoDav/ipay
src/iPay/Cashier.php
Cashier.initiateTransaction
private function initiateTransaction() { $params = [ "live" => $this->isLive, "oid" => $this->transaction['orderId'], "inv" => $this->transaction['invoiceNumber'] ?: $this->transaction['orderId'], "ttl" => $this->transaction['amount'], "tel" => $th...
php
private function initiateTransaction() { $params = [ "live" => $this->isLive, "oid" => $this->transaction['orderId'], "inv" => $this->transaction['invoiceNumber'] ?: $this->transaction['orderId'], "ttl" => $this->transaction['amount'], "tel" => $th...
[ "private", "function", "initiateTransaction", "(", ")", "{", "$", "params", "=", "[", "\"live\"", "=>", "$", "this", "->", "isLive", ",", "\"oid\"", "=>", "$", "this", "->", "transaction", "[", "'orderId'", "]", ",", "\"inv\"", "=>", "$", "this", "->", ...
Initiate the transaction and send the information to IPay. @return string
[ "Initiate", "the", "transaction", "and", "send", "the", "information", "to", "IPay", "." ]
000a8f151ff83b7a2d757531fe28e050b4bc48c0
https://github.com/SmoDav/ipay/blob/000a8f151ff83b7a2d757531fe28e050b4bc48c0/src/iPay/Cashier.php#L340-L381
191,475
SmoDav/ipay
src/iPay/Cashier.php
Cashier.generateInitialHash
private function generateInitialHash() { $mergedString = $this->isLive . $this->transaction['orderId'] . $this->transaction['invoiceNumber'] . $this->transaction['amount'] . $this->customer['telephoneNumber'] . $this->customer['email'] . $this->vendorId . $this->currency . $this->pay...
php
private function generateInitialHash() { $mergedString = $this->isLive . $this->transaction['orderId'] . $this->transaction['invoiceNumber'] . $this->transaction['amount'] . $this->customer['telephoneNumber'] . $this->customer['email'] . $this->vendorId . $this->currency . $this->pay...
[ "private", "function", "generateInitialHash", "(", ")", "{", "$", "mergedString", "=", "$", "this", "->", "isLive", ".", "$", "this", "->", "transaction", "[", "'orderId'", "]", ".", "$", "this", "->", "transaction", "[", "'invoiceNumber'", "]", ".", "$", ...
Generate the hash from the data to be sent. @return string
[ "Generate", "the", "hash", "from", "the", "data", "to", "be", "sent", "." ]
000a8f151ff83b7a2d757531fe28e050b4bc48c0
https://github.com/SmoDav/ipay/blob/000a8f151ff83b7a2d757531fe28e050b4bc48c0/src/iPay/Cashier.php#L388-L397
191,476
hannesvdvreken/guzzle-debugbar
src/Profiler.php
Profiler.getParameters
protected function getParameters(RequestInterface $request, ResponseInterface $response = null) { $params = []; $result = ''; $keys = array_intersect($this->context, $this->availableParameters); foreach ($keys as $key) { switch ($key) { case 'method': ...
php
protected function getParameters(RequestInterface $request, ResponseInterface $response = null) { $params = []; $result = ''; $keys = array_intersect($this->context, $this->availableParameters); foreach ($keys as $key) { switch ($key) { case 'method': ...
[ "protected", "function", "getParameters", "(", "RequestInterface", "$", "request", ",", "ResponseInterface", "$", "response", "=", "null", ")", "{", "$", "params", "=", "[", "]", ";", "$", "result", "=", "''", ";", "$", "keys", "=", "array_intersect", "(",...
Get context fields to add to the time-line entry. @param \Psr\Http\Message\RequestInterface $request @param \Psr\Http\Message\ResponseInterface $response @return array
[ "Get", "context", "fields", "to", "add", "to", "the", "time", "-", "line", "entry", "." ]
724e10ae6da90b2084e10f7e4d5b2aeb514d8da4
https://github.com/hannesvdvreken/guzzle-debugbar/blob/724e10ae6da90b2084e10f7e4d5b2aeb514d8da4/src/Profiler.php#L63-L102
191,477
flownative/flow-aws-s3
Classes/S3Storage.php
S3Storage.deleteResource
public function deleteResource(PersistentResource $resource) { $this->s3Client->deleteObject(array( 'Bucket' => $this->bucketName, 'Key' => $this->keyPrefix . $resource->getSha1() )); return true; }
php
public function deleteResource(PersistentResource $resource) { $this->s3Client->deleteObject(array( 'Bucket' => $this->bucketName, 'Key' => $this->keyPrefix . $resource->getSha1() )); return true; }
[ "public", "function", "deleteResource", "(", "PersistentResource", "$", "resource", ")", "{", "$", "this", "->", "s3Client", "->", "deleteObject", "(", "array", "(", "'Bucket'", "=>", "$", "this", "->", "bucketName", ",", "'Key'", "=>", "$", "this", "->", ...
Deletes the storage data related to the given Resource object @param \Neos\Flow\ResourceManagement\PersistentResource $resource The Resource to delete the storage data of @return boolean TRUE if removal was successful @api
[ "Deletes", "the", "storage", "data", "related", "to", "the", "given", "Resource", "object" ]
396aa1b6426319eb05b9c8396686a68ec6b200ff
https://github.com/flownative/flow-aws-s3/blob/396aa1b6426319eb05b9c8396686a68ec6b200ff/Classes/S3Storage.php#L282-L289
191,478
flownative/flow-aws-s3
Classes/Command/S3CommandController.php
S3CommandController.listBucketsCommand
public function listBucketsCommand() { try { $s3Client = new S3Client($this->s3DefaultProfile); $result = $s3Client->listBuckets(); } catch (\Exception $e) { $this->outputLine($e->getMessage()); $this->quit(1); exit; } if (...
php
public function listBucketsCommand() { try { $s3Client = new S3Client($this->s3DefaultProfile); $result = $s3Client->listBuckets(); } catch (\Exception $e) { $this->outputLine($e->getMessage()); $this->quit(1); exit; } if (...
[ "public", "function", "listBucketsCommand", "(", ")", "{", "try", "{", "$", "s3Client", "=", "new", "S3Client", "(", "$", "this", "->", "s3DefaultProfile", ")", ";", "$", "result", "=", "$", "s3Client", "->", "listBuckets", "(", ")", ";", "}", "catch", ...
Displays a list of buckets This command outputs a list of all buckets from the currently configured S3 account. @return void
[ "Displays", "a", "list", "of", "buckets" ]
396aa1b6426319eb05b9c8396686a68ec6b200ff
https://github.com/flownative/flow-aws-s3/blob/396aa1b6426319eb05b9c8396686a68ec6b200ff/Classes/Command/S3CommandController.php#L87-L110
191,479
flownative/flow-aws-s3
Classes/Command/S3CommandController.php
S3CommandController.flushBucketCommand
public function flushBucketCommand($bucket) { try { $s3Client = new S3Client($this->s3DefaultProfile); $batchDelete = BatchDelete::fromListObjects($s3Client, ['Bucket' => $bucket]); $promise = $batchDelete->promise(); } catch (\Exception $e) { $this->o...
php
public function flushBucketCommand($bucket) { try { $s3Client = new S3Client($this->s3DefaultProfile); $batchDelete = BatchDelete::fromListObjects($s3Client, ['Bucket' => $bucket]); $promise = $batchDelete->promise(); } catch (\Exception $e) { $this->o...
[ "public", "function", "flushBucketCommand", "(", "$", "bucket", ")", "{", "try", "{", "$", "s3Client", "=", "new", "S3Client", "(", "$", "this", "->", "s3DefaultProfile", ")", ";", "$", "batchDelete", "=", "BatchDelete", "::", "fromListObjects", "(", "$", ...
Removes all objects from a bucket This command deletes all objects (files) of the given bucket. @param string $bucket Name of the bucket @return void
[ "Removes", "all", "objects", "from", "a", "bucket" ]
396aa1b6426319eb05b9c8396686a68ec6b200ff
https://github.com/flownative/flow-aws-s3/blob/396aa1b6426319eb05b9c8396686a68ec6b200ff/Classes/Command/S3CommandController.php#L120-L133
191,480
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Component.php
Component.listSubscription
public function listSubscription($id) { $service = $this->getService(); $response = $service->request('subscriptions/' . (int)$id . '/components', 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $this->_data = $this->_normalize...
php
public function listSubscription($id) { $service = $this->getService(); $response = $service->request('subscriptions/' . (int)$id . '/components', 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $this->_data = $this->_normalize...
[ "public", "function", "listSubscription", "(", "$", "id", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "response", "=", "$", "service", "->", "request", "(", "'subscriptions/'", ".", "(", "int", ")", "$", "id", ...
List components for a subscription @param int $id @return Component
[ "List", "components", "for", "a", "subscription" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Component.php#L164-L178
191,481
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Component.php
Component.readSubscription
public function readSubscription($subscriptionId, $componentId) { $service = $this->getService(); $response = $service->request('subscriptions/' . (int)$subscriptionId . '/components/' . (int)$componentId, 'GET'); $responseArray = $this->getResponseArray($response); if (!$this...
php
public function readSubscription($subscriptionId, $componentId) { $service = $this->getService(); $response = $service->request('subscriptions/' . (int)$subscriptionId . '/components/' . (int)$componentId, 'GET'); $responseArray = $this->getResponseArray($response); if (!$this...
[ "public", "function", "readSubscription", "(", "$", "subscriptionId", ",", "$", "componentId", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "response", "=", "$", "service", "->", "request", "(", "'subscriptions/'", "....
Read component for a subscription @param int $subscriptionId @param int $componentId @return Component
[ "Read", "component", "for", "a", "subscription" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Component.php#L188-L202
191,482
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Component.php
Component.setQuantityAllocation
public function setQuantityAllocation($subscriptionId, $componentId) { $service = $this->getService(); $rawData = $this->getRawData(array('component' => $this->_params)); $response = $service->request('subscriptions/' . (int)$subscriptionId . '/components/' . (int)$component...
php
public function setQuantityAllocation($subscriptionId, $componentId) { $service = $this->getService(); $rawData = $this->getRawData(array('component' => $this->_params)); $response = $service->request('subscriptions/' . (int)$subscriptionId . '/components/' . (int)$component...
[ "public", "function", "setQuantityAllocation", "(", "$", "subscriptionId", ",", "$", "componentId", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "rawData", "=", "$", "this", "->", "getRawData", "(", "array", "(", "'...
Set quantity of Quantity Based Components for a subscription @param int $subscriptionId @param int $componentId @return Component @see Component::setAllocatedQuantity()
[ "Set", "quantity", "of", "Quantity", "Based", "Components", "for", "a", "subscription" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Component.php#L213-L227
191,483
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Component.php
Component.listProductFamily
public function listProductFamily($productFamilyId) { $service = $this->getService(); $response = $service->request('product_families/' . (int)$productFamilyId . '/components', 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $t...
php
public function listProductFamily($productFamilyId) { $service = $this->getService(); $response = $service->request('product_families/' . (int)$productFamilyId . '/components', 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $t...
[ "public", "function", "listProductFamily", "(", "$", "productFamilyId", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "response", "=", "$", "service", "->", "request", "(", "'product_families/'", ".", "(", "int", ")", ...
List components for a product family @param int $productFamilyId @return Component
[ "List", "components", "for", "a", "product", "family" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Component.php#L289-L303
191,484
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Component.php
Component.readProductFamily
public function readProductFamily($productFamilyId, $componentId) { $service = $this->getService(); $response = $service->request('product_families/' . (int)$productFamilyId . '/components/' . (int)$componentId, 'GET'); $responseArray = $this->getResponseArray($response); if (...
php
public function readProductFamily($productFamilyId, $componentId) { $service = $this->getService(); $response = $service->request('product_families/' . (int)$productFamilyId . '/components/' . (int)$componentId, 'GET'); $responseArray = $this->getResponseArray($response); if (...
[ "public", "function", "readProductFamily", "(", "$", "productFamilyId", ",", "$", "componentId", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "response", "=", "$", "service", "->", "request", "(", "'product_families/'",...
Read a component belonging to a product family @param int $productFamilyId @param int $componentId @return Component
[ "Read", "a", "component", "belonging", "to", "a", "product", "family" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Component.php#L313-L327
191,485
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Component.php
Component.createComponent
public function createComponent($productFamilyId, $componentType) { $service = $this->getService(); $rawDataKey = ''; switch ($componentType) { case 'metered_components': $rawDataKey = 'metered_component'; break; case 'quantity_based_c...
php
public function createComponent($productFamilyId, $componentType) { $service = $this->getService(); $rawDataKey = ''; switch ($componentType) { case 'metered_components': $rawDataKey = 'metered_component'; break; case 'quantity_based_c...
[ "public", "function", "createComponent", "(", "$", "productFamilyId", ",", "$", "componentType", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "rawDataKey", "=", "''", ";", "switch", "(", "$", "componentType", ")", "...
Create a component @param int $productFamilyId @param string $componentType ; one of the following: - metered_components - quantity_based_components - on_off_components @return Component @see Component::setName() @see Component::setUnitName() @see Component::setUnitPrice() @see Component::setPricingScheme() @see C...
[ "Create", "a", "component" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Component.php#L345-L375
191,486
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Customer.php
Customer.update
public function update($id) { $service = $this->getService(); $rawData = $this->getRawData(array('customer' => $this->getParams())); $response = $service->request('customers/' . (int)$id, 'PUT', $rawData); $responseArray = $this->getResponseArray($response); if (...
php
public function update($id) { $service = $this->getService(); $rawData = $this->getRawData(array('customer' => $this->getParams())); $response = $service->request('customers/' . (int)$id, 'PUT', $rawData); $responseArray = $this->getResponseArray($response); if (...
[ "public", "function", "update", "(", "$", "id", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "rawData", "=", "$", "this", "->", "getRawData", "(", "array", "(", "'customer'", "=>", "$", "this", "->", "getParams"...
Update the customer record in Chargify. @param int $id @return Customer @see Customer::setFirstName() @see Customer::setLastName() @see Customer::setEmail() @see Customer::setOrganization() @see Customer::setPhone() @see Customer::setAddress() @see Customer::setAddress2() @see Customer::setCity() @see Customer::setSt...
[ "Update", "the", "customer", "record", "in", "Chargify", "." ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Customer.php#L328-L343
191,487
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Product.php
Product.listProducts
public function listProducts() { $service = $this->getService(); $response = $service->request('products', 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $this->_data = $this->_normalizeResponseArray($responseArray); }...
php
public function listProducts() { $service = $this->getService(); $response = $service->request('products', 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $this->_data = $this->_normalizeResponseArray($responseArray); }...
[ "public", "function", "listProducts", "(", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "response", "=", "$", "service", "->", "request", "(", "'products'", ",", "'GET'", ")", ";", "$", "responseArray", "=", "$", ...
List all products for your site @return Product
[ "List", "all", "products", "for", "your", "site" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Product.php#L27-L41
191,488
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Product.php
Product.readByChargifyId
public function readByChargifyId($id) { $service = $this->getService(); $response = $service->request('products/' . $id, 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $this->_data = $responseArray['product']; } else {...
php
public function readByChargifyId($id) { $service = $this->getService(); $response = $service->request('products/' . $id, 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $this->_data = $responseArray['product']; } else {...
[ "public", "function", "readByChargifyId", "(", "$", "id", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "response", "=", "$", "service", "->", "request", "(", "'products/'", ".", "$", "id", ",", "'GET'", ")", ";"...
Get product details by Chargify ID @param int $id @return Product
[ "Get", "product", "details", "by", "Chargify", "ID" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Product.php#L50-L64
191,489
chargely/chargify-sdk-php
src/Crucial/Service/Chargify/Product.php
Product.readByHandle
public function readByHandle($handle) { $service = $this->getService(); $response = $service->request('products/handle/' . $handle, 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $this->_data = $responseArray['product']; ...
php
public function readByHandle($handle) { $service = $this->getService(); $response = $service->request('products/handle/' . $handle, 'GET'); $responseArray = $this->getResponseArray($response); if (!$this->isError()) { $this->_data = $responseArray['product']; ...
[ "public", "function", "readByHandle", "(", "$", "handle", ")", "{", "$", "service", "=", "$", "this", "->", "getService", "(", ")", ";", "$", "response", "=", "$", "service", "->", "request", "(", "'products/handle/'", ".", "$", "handle", ",", "'GET'", ...
Get product details by API handle @param string $handle @return Product
[ "Get", "product", "details", "by", "API", "handle" ]
51aed15a8f33012c8f4339920905325a1e65be2c
https://github.com/chargely/chargify-sdk-php/blob/51aed15a8f33012c8f4339920905325a1e65be2c/src/Crucial/Service/Chargify/Product.php#L73-L87
191,490
gushphp/gush
src/Command/Issue/IssueCopyCommand.php
IssueCopyCommand.buildIssueAdapter
protected function buildIssueAdapter($name) { $issueAdapter = $this ->getApplication() ->getAdapterFactory() ->createIssueTracker( $name, $this->getConfig()->get( ['adapters', $name], \Gush\Config::CO...
php
protected function buildIssueAdapter($name) { $issueAdapter = $this ->getApplication() ->getAdapterFactory() ->createIssueTracker( $name, $this->getConfig()->get( ['adapters', $name], \Gush\Config::CO...
[ "protected", "function", "buildIssueAdapter", "(", "$", "name", ")", "{", "$", "issueAdapter", "=", "$", "this", "->", "getApplication", "(", ")", "->", "getAdapterFactory", "(", ")", "->", "createIssueTracker", "(", "$", "name", ",", "$", "this", "->", "g...
Build a valid IssueTracker instance. @param string $name Adapter name to build @return Gush\Adapter\IssueTracker
[ "Build", "a", "valid", "IssueTracker", "instance", "." ]
957940ac27c1734e112c4b1b3cbc905a2c97e701
https://github.com/gushphp/gush/blob/957940ac27c1734e112c4b1b3cbc905a2c97e701/src/Command/Issue/IssueCopyCommand.php#L155-L171
191,491
okamos/php-ses
src/ses-envelope.php
SimpleEmailServiceEnvelope.addAttachmentFromFile
public function addAttachmentFromFile($name, $path, $mimeType = 'application/octet-stream', $contentId = null) { if (file_exists($path) && is_file($path) && is_readable($path)) { $this->addAttachmentFromData($name, file_get_contents($path), $mimeType, $contentId); } }
php
public function addAttachmentFromFile($name, $path, $mimeType = 'application/octet-stream', $contentId = null) { if (file_exists($path) && is_file($path) && is_readable($path)) { $this->addAttachmentFromData($name, file_get_contents($path), $mimeType, $contentId); } }
[ "public", "function", "addAttachmentFromFile", "(", "$", "name", ",", "$", "path", ",", "$", "mimeType", "=", "'application/octet-stream'", ",", "$", "contentId", "=", "null", ")", "{", "if", "(", "file_exists", "(", "$", "path", ")", "&&", "is_file", "(",...
Add email attachment via file path @param string $name The name of the file. @param string $path Path to the attachment file. @param string $mimeType The specify MIME type. @param string $contentId Content ID. @return boolean
[ "Add", "email", "attachment", "via", "file", "path" ]
7acd9eed7b1ac0546f579f0ccb775a5816a2979f
https://github.com/okamos/php-ses/blob/7acd9eed7b1ac0546f579f0ccb775a5816a2979f/src/ses-envelope.php#L154-L159
191,492
okamos/php-ses
src/ses-envelope.php
SimpleEmailServiceEnvelope.validate
public function validate() { if (count($this->_to) == 0 && count($this->_cc) == 0 && count($this->_bcc) == 0 ) { return new SimpleEmailServiceError('Destination'); } if (strlen($this->_source) == 0) { return new SimpleEmailServiceError...
php
public function validate() { if (count($this->_to) == 0 && count($this->_cc) == 0 && count($this->_bcc) == 0 ) { return new SimpleEmailServiceError('Destination'); } if (strlen($this->_source) == 0) { return new SimpleEmailServiceError...
[ "public", "function", "validate", "(", ")", "{", "if", "(", "count", "(", "$", "this", "->", "_to", ")", "==", "0", "&&", "count", "(", "$", "this", "->", "_cc", ")", "==", "0", "&&", "count", "(", "$", "this", "->", "_bcc", ")", "==", "0", "...
Validates instance. This is used before attempting a SendEmail or SendRawEmail. @return Error or boolean
[ "Validates", "instance", ".", "This", "is", "used", "before", "attempting", "a", "SendEmail", "or", "SendRawEmail", "." ]
7acd9eed7b1ac0546f579f0ccb775a5816a2979f
https://github.com/okamos/php-ses/blob/7acd9eed7b1ac0546f579f0ccb775a5816a2979f/src/ses-envelope.php#L167-L188
191,493
okamos/php-ses
src/ses-envelope.php
SimpleEmailServiceEnvelope.buildParameters
public function buildParameters() { $params = array(); if (!empty($this->_attachments)) { $this->action = 'SendRawEmail'; $params['RawMessage.Data'] = $this->_buildRaw(); return $params; } $i = 1; foreach ($this->_to as $to) { ...
php
public function buildParameters() { $params = array(); if (!empty($this->_attachments)) { $this->action = 'SendRawEmail'; $params['RawMessage.Data'] = $this->_buildRaw(); return $params; } $i = 1; foreach ($this->_to as $to) { ...
[ "public", "function", "buildParameters", "(", ")", "{", "$", "params", "=", "array", "(", ")", ";", "if", "(", "!", "empty", "(", "$", "this", "->", "_attachments", ")", ")", "{", "$", "this", "->", "action", "=", "'SendRawEmail'", ";", "$", "params"...
Build parameters for sendEmail. @return object
[ "Build", "parameters", "for", "sendEmail", "." ]
7acd9eed7b1ac0546f579f0ccb775a5816a2979f
https://github.com/okamos/php-ses/blob/7acd9eed7b1ac0546f579f0ccb775a5816a2979f/src/ses-envelope.php#L195-L248
191,494
okamos/php-ses
src/ses-envelope.php
SimpleEmailServiceEnvelope._buildRaw
private function _buildRaw() { $boundary = md5(uniqid(rand(), true)); $raw_message = 'From: ' . $this->_encodeHeader($this->_source) . "\n"; if (!empty($this->_to)) { $raw_message .= 'To: ' . $this->_encodeHeader($this->_to) . "\n"; } if (!empty($this->_cc)) { ...
php
private function _buildRaw() { $boundary = md5(uniqid(rand(), true)); $raw_message = 'From: ' . $this->_encodeHeader($this->_source) . "\n"; if (!empty($this->_to)) { $raw_message .= 'To: ' . $this->_encodeHeader($this->_to) . "\n"; } if (!empty($this->_cc)) { ...
[ "private", "function", "_buildRaw", "(", ")", "{", "$", "boundary", "=", "md5", "(", "uniqid", "(", "rand", "(", ")", ",", "true", ")", ")", ";", "$", "raw_message", "=", "'From: '", ".", "$", "this", "->", "_encodeHeader", "(", "$", "this", "->", ...
Build raw envelope. @return string
[ "Build", "raw", "envelope", "." ]
7acd9eed7b1ac0546f579f0ccb775a5816a2979f
https://github.com/okamos/php-ses/blob/7acd9eed7b1ac0546f579f0ccb775a5816a2979f/src/ses-envelope.php#L255-L305
191,495
okamos/php-ses
src/ses-envelope.php
SimpleEmailServiceEnvelope._encodeHeader
private function _encodeHeader($val) { if (is_array($val)) { return join(', ', array_map(array($this, '_encodeHeader'), $val)); } // if name matched encode Base64 if (preg_match("/(.*)<(.*)>/", $val, $match)) { return '=?' . $this->_charset . '?B?' . base64_en...
php
private function _encodeHeader($val) { if (is_array($val)) { return join(', ', array_map(array($this, '_encodeHeader'), $val)); } // if name matched encode Base64 if (preg_match("/(.*)<(.*)>/", $val, $match)) { return '=?' . $this->_charset . '?B?' . base64_en...
[ "private", "function", "_encodeHeader", "(", "$", "val", ")", "{", "if", "(", "is_array", "(", "$", "val", ")", ")", "{", "return", "join", "(", "', '", ",", "array_map", "(", "array", "(", "$", "this", ",", "'_encodeHeader'", ")", ",", "$", "val", ...
Encode header field body, and return it. @param string $val Header Field(s) body. @return string
[ "Encode", "header", "field", "body", "and", "return", "it", "." ]
7acd9eed7b1ac0546f579f0ccb775a5816a2979f
https://github.com/okamos/php-ses/blob/7acd9eed7b1ac0546f579f0ccb775a5816a2979f/src/ses-envelope.php#L314-L324
191,496
pravednik/xmlBundle
Model/XmlGenerator.php
XmlGenerator.generateFromArray
public function generateFromArray(array $data) { $xml = $this->processGenerate($this->rootName, $data); $this->createPiNode(); $this->getDomDocument()->appendChild($xml); $xml = $this->getDomDocument()->saveXML(); $this->flush(); return $xml; }
php
public function generateFromArray(array $data) { $xml = $this->processGenerate($this->rootName, $data); $this->createPiNode(); $this->getDomDocument()->appendChild($xml); $xml = $this->getDomDocument()->saveXML(); $this->flush(); return $xml; }
[ "public", "function", "generateFromArray", "(", "array", "$", "data", ")", "{", "$", "xml", "=", "$", "this", "->", "processGenerate", "(", "$", "this", "->", "rootName", ",", "$", "data", ")", ";", "$", "this", "->", "createPiNode", "(", ")", ";", "...
Process convert array to XML @param array $data @return string
[ "Process", "convert", "array", "to", "XML" ]
fa3a0852097209eb6840ef01224b4ddb004790b5
https://github.com/pravednik/xmlBundle/blob/fa3a0852097209eb6840ef01224b4ddb004790b5/Model/XmlGenerator.php#L233-L243
191,497
pravednik/xmlBundle
Model/XmlGenerator.php
XmlGenerator.createPiNode
protected function createPiNode() { $piNode = $this->getPiNode(); if(0 !== count($piNode)) { foreach($piNode as $target => $data) { $xslt = $this->getDomDocument()->createProcessingInstruction($target, $data); $this->getDomDocument()->...
php
protected function createPiNode() { $piNode = $this->getPiNode(); if(0 !== count($piNode)) { foreach($piNode as $target => $data) { $xslt = $this->getDomDocument()->createProcessingInstruction($target, $data); $this->getDomDocument()->...
[ "protected", "function", "createPiNode", "(", ")", "{", "$", "piNode", "=", "$", "this", "->", "getPiNode", "(", ")", ";", "if", "(", "0", "!==", "count", "(", "$", "piNode", ")", ")", "{", "foreach", "(", "$", "piNode", "as", "$", "target", "=>", ...
Creates new PI node
[ "Creates", "new", "PI", "node" ]
fa3a0852097209eb6840ef01224b4ddb004790b5
https://github.com/pravednik/xmlBundle/blob/fa3a0852097209eb6840ef01224b4ddb004790b5/Model/XmlGenerator.php#L248-L260
191,498
pravednik/xmlBundle
Model/XmlGenerator.php
XmlGenerator.processGenerate
protected function processGenerate($element, $data) { $this->prepareElementName($element); /** setRootName(null) support */ if('' === (string) $element) { $element = array_keys($data)[0]; return $this->processGenerate($element, $data[$element]); } ...
php
protected function processGenerate($element, $data) { $this->prepareElementName($element); /** setRootName(null) support */ if('' === (string) $element) { $element = array_keys($data)[0]; return $this->processGenerate($element, $data[$element]); } ...
[ "protected", "function", "processGenerate", "(", "$", "element", ",", "$", "data", ")", "{", "$", "this", "->", "prepareElementName", "(", "$", "element", ")", ";", "/** setRootName(null) support */", "if", "(", "''", "===", "(", "string", ")", "$", "element...
Recursive creation of XML @param string $element The child's name @param string|array $data Element value @return \DOMElement @throws InvalidArgumentException
[ "Recursive", "creation", "of", "XML" ]
fa3a0852097209eb6840ef01224b4ddb004790b5
https://github.com/pravednik/xmlBundle/blob/fa3a0852097209eb6840ef01224b4ddb004790b5/Model/XmlGenerator.php#L272-L346
191,499
pravednik/xmlBundle
Model/XmlGenerator.php
XmlGenerator.applyValue
protected function applyValue(&$data, &$node) { $data['@value'] = $this->getBooleanAsString($data['@value']); if(is_array($data['@value'])) { $this->processGenerate(key($data['@value']), $data['@value']); } else { $node->appendChild($this->get...
php
protected function applyValue(&$data, &$node) { $data['@value'] = $this->getBooleanAsString($data['@value']); if(is_array($data['@value'])) { $this->processGenerate(key($data['@value']), $data['@value']); } else { $node->appendChild($this->get...
[ "protected", "function", "applyValue", "(", "&", "$", "data", ",", "&", "$", "node", ")", "{", "$", "data", "[", "'@value'", "]", "=", "$", "this", "->", "getBooleanAsString", "(", "$", "data", "[", "'@value'", "]", ")", ";", "if", "(", "is_array", ...
Adding element value @param array $data @param \DOMElement $node @return void
[ "Adding", "element", "value" ]
fa3a0852097209eb6840ef01224b4ddb004790b5
https://github.com/pravednik/xmlBundle/blob/fa3a0852097209eb6840ef01224b4ddb004790b5/Model/XmlGenerator.php#L398-L412