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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
189,500 | croscon/commissionjunction-php | lib/CROSCON/CommissionJunction/Client.php | Client.api | public function api($subdomain, $resource, array $parameters = array(), $version = 'v2') {
$ch = $this->getCurl();
$url = sprintf($this->domain, $subdomain, $version, $resource);
if (!empty($parameters))
$url .= "?" . http_build_query($parameters);
curl_setopt_array... | php | public function api($subdomain, $resource, array $parameters = array(), $version = 'v2') {
$ch = $this->getCurl();
$url = sprintf($this->domain, $subdomain, $version, $resource);
if (!empty($parameters))
$url .= "?" . http_build_query($parameters);
curl_setopt_array... | [
"public",
"function",
"api",
"(",
"$",
"subdomain",
",",
"$",
"resource",
",",
"array",
"$",
"parameters",
"=",
"array",
"(",
")",
",",
"$",
"version",
"=",
"'v2'",
")",
"{",
"$",
"ch",
"=",
"$",
"this",
"->",
"getCurl",
"(",
")",
";",
"$",
"url"... | Generic method to fire API requests at Commission Junctions servers
@param string $subdomain The subomdain portion of the REST API url
@param string $resource The resource portion of the REST API url (e.g. /v2/RESOURCE)
@param array $parameters GET request parameters to be appended to the url
@param string $version Th... | [
"Generic",
"method",
"to",
"fire",
"API",
"requests",
"at",
"Commission",
"Junctions",
"servers"
] | 2512e142982bd6cb0b22e3348b1090084173351b | https://github.com/croscon/commissionjunction-php/blob/2512e142982bd6cb0b22e3348b1090084173351b/lib/CROSCON/CommissionJunction/Client.php#L111-L142 |
189,501 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.eachReference | public static function eachReference(& $list, callable $iterator, $context = null)
{
if ($list === null)
return $list;
static::associate($iterator, $context);
if (!static::isTraversable($list))
throw new \InvalidArgumentException("canot iterate over " . stat... | php | public static function eachReference(& $list, callable $iterator, $context = null)
{
if ($list === null)
return $list;
static::associate($iterator, $context);
if (!static::isTraversable($list))
throw new \InvalidArgumentException("canot iterate over " . stat... | [
"public",
"static",
"function",
"eachReference",
"(",
"&",
"$",
"list",
",",
"callable",
"$",
"iterator",
",",
"$",
"context",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"list",
"===",
"null",
")",
"return",
"$",
"list",
";",
"static",
"::",
"associate",
... | Does the very same job as each but provide a reference of every list item to the iterator function.
@category Collection Functions
@param traversable $list the list to iterate over
@param callable $iterator the iteration function
@param object $context optional, if provided will become the context of $iterator
@thro... | [
"Does",
"the",
"very",
"same",
"job",
"as",
"each",
"but",
"provide",
"a",
"reference",
"of",
"every",
"list",
"item",
"to",
"the",
"iterator",
"function",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L75-L93 |
189,502 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.reduceRight | public static function reduceRight($list, callable $iterator, $memo, $context = null)
{
return static::reduce(array_reverse(static::toArray($list)), $iterator, $memo, $context);
} | php | public static function reduceRight($list, callable $iterator, $memo, $context = null)
{
return static::reduce(array_reverse(static::toArray($list)), $iterator, $memo, $context);
} | [
"public",
"static",
"function",
"reduceRight",
"(",
"$",
"list",
",",
"callable",
"$",
"iterator",
",",
"$",
"memo",
",",
"$",
"context",
"=",
"null",
")",
"{",
"return",
"static",
"::",
"reduce",
"(",
"array_reverse",
"(",
"static",
"::",
"toArray",
"("... | The right-associative version of reduce.
@category Collection Functions
@param traversable $list the list of items to reduce
@param callable $iterator the reduction function
@param mixed $memo The initial reduction state
@param object $context optional, if provided will become the context of $iterator
@return mixed | [
"The",
"right",
"-",
"associative",
"version",
"of",
"reduce",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L190-L193 |
189,503 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.every | public static function every($list, callable $iterator = null, $context = null)
{
static::associate($iterator, $context);
!$iterator && $iterator = function ($item) {
return static::identity($item);
};
$result = true;
static::each($list, function ($item... | php | public static function every($list, callable $iterator = null, $context = null)
{
static::associate($iterator, $context);
!$iterator && $iterator = function ($item) {
return static::identity($item);
};
$result = true;
static::each($list, function ($item... | [
"public",
"static",
"function",
"every",
"(",
"$",
"list",
",",
"callable",
"$",
"iterator",
"=",
"null",
",",
"$",
"context",
"=",
"null",
")",
"{",
"static",
"::",
"associate",
"(",
"$",
"iterator",
",",
"$",
"context",
")",
";",
"!",
"$",
"iterato... | Returns true if all of the values in the list pass the iterator truth test. Short-circuits and stops traversing
the list if a false element is found.
@category Collection Functions
@param traversable $list the list of items to filter
@param callable $iterator the truth-test function
@param object $context optional, i... | [
"Returns",
"true",
"if",
"all",
"of",
"the",
"values",
"in",
"the",
"list",
"pass",
"the",
"iterator",
"truth",
"test",
".",
"Short",
"-",
"circuits",
"and",
"stops",
"traversing",
"the",
"list",
"if",
"a",
"false",
"element",
"is",
"found",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L346-L363 |
189,504 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.some | public static function some($list, callable $iterator = null, $context = null)
{
static::associate($iterator, $context);
!$iterator && $iterator = function ($item) {
return static::identity($item);
};
return !static::every($list, function ($item) use ($iterator)... | php | public static function some($list, callable $iterator = null, $context = null)
{
static::associate($iterator, $context);
!$iterator && $iterator = function ($item) {
return static::identity($item);
};
return !static::every($list, function ($item) use ($iterator)... | [
"public",
"static",
"function",
"some",
"(",
"$",
"list",
",",
"callable",
"$",
"iterator",
"=",
"null",
",",
"$",
"context",
"=",
"null",
")",
"{",
"static",
"::",
"associate",
"(",
"$",
"iterator",
",",
"$",
"context",
")",
";",
"!",
"$",
"iterator... | Returns true if any of the values in the list pass the iterator truth test. Short-circuits and stops traversing
the list if a true element is found.
@category Collection Functions
@param traversable $list the list of items to filter
@param callable $iterator the truth-test function
@param object $context optional, if... | [
"Returns",
"true",
"if",
"any",
"of",
"the",
"values",
"in",
"the",
"list",
"pass",
"the",
"iterator",
"truth",
"test",
".",
"Short",
"-",
"circuits",
"and",
"stops",
"traversing",
"the",
"list",
"if",
"a",
"true",
"element",
"is",
"found",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L385-L396 |
189,505 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.contains | public static function contains($list, $value, $strict = false)
{
return static::some($list, function ($item) use ($value, $strict) {
return $strict ? $item === $value : $item == $value;
});
} | php | public static function contains($list, $value, $strict = false)
{
return static::some($list, function ($item) use ($value, $strict) {
return $strict ? $item === $value : $item == $value;
});
} | [
"public",
"static",
"function",
"contains",
"(",
"$",
"list",
",",
"$",
"value",
",",
"$",
"strict",
"=",
"false",
")",
"{",
"return",
"static",
"::",
"some",
"(",
"$",
"list",
",",
"function",
"(",
"$",
"item",
")",
"use",
"(",
"$",
"value",
",",
... | Returns true if the value is present in the list.
@category Collection Functions
@param traversable $list the list of items
@param mixed $value the value to look for
@param boolean $strict type of value is also used in coparision
@return array | [
"Returns",
"true",
"if",
"the",
"value",
"is",
"present",
"in",
"the",
"list",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L417-L422 |
189,506 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.max | public static function max($list, callable $iterator = null, $context = null)
{
static::associate($iterator, $context);
!$iterator && $iterator = function ($item) {
return static::identity($item);
};
$max = null;
$result = null;
static::each($l... | php | public static function max($list, callable $iterator = null, $context = null)
{
static::associate($iterator, $context);
!$iterator && $iterator = function ($item) {
return static::identity($item);
};
$max = null;
$result = null;
static::each($l... | [
"public",
"static",
"function",
"max",
"(",
"$",
"list",
",",
"callable",
"$",
"iterator",
"=",
"null",
",",
"$",
"context",
"=",
"null",
")",
"{",
"static",
"::",
"associate",
"(",
"$",
"iterator",
",",
"$",
"context",
")",
";",
"!",
"$",
"iterator"... | Returns the maximum value in list. If iterator is passed, it will be used on each value to generate the
criterion by which the value is ranked.
@category Collection Functions
@param traversable $list the list of items
@param callable $iterator optional, the comparision function
@param object $context optional, if pro... | [
"Returns",
"the",
"maximum",
"value",
"in",
"list",
".",
"If",
"iterator",
"is",
"passed",
"it",
"will",
"be",
"used",
"on",
"each",
"value",
"to",
"generate",
"the",
"criterion",
"by",
"which",
"the",
"value",
"is",
"ranked",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L494-L511 |
189,507 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.groupBy | public static function groupBy($list, $iterator, $context = null)
{
static::associate($iterator, $context);
$result = [];
static::each($list, function ($item) use ($iterator, & $result) {
static::isScalar($iterator)
? $result[static::get($item, $iterator)]... | php | public static function groupBy($list, $iterator, $context = null)
{
static::associate($iterator, $context);
$result = [];
static::each($list, function ($item) use ($iterator, & $result) {
static::isScalar($iterator)
? $result[static::get($item, $iterator)]... | [
"public",
"static",
"function",
"groupBy",
"(",
"$",
"list",
",",
"$",
"iterator",
",",
"$",
"context",
"=",
"null",
")",
"{",
"static",
"::",
"associate",
"(",
"$",
"iterator",
",",
"$",
"context",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"sta... | Splits a collection into sets, grouped by the result of running each value through iterator. If iterator is a
string instead of a function, groups by the property named by iterator on each of the values.
@category Collection Functions
@param traversable $list the list of items to group
@param callable,scalar $iterato... | [
"Splits",
"a",
"collection",
"into",
"sets",
"grouped",
"by",
"the",
"result",
"of",
"running",
"each",
"value",
"through",
"iterator",
".",
"If",
"iterator",
"is",
"a",
"string",
"instead",
"of",
"a",
"function",
"groups",
"by",
"the",
"property",
"named",
... | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L610-L622 |
189,508 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.countBy | public static function countBy($list, $iterator, $context = null)
{
return static::map(static::groupBy($list, $iterator, $context), function ($item) {
return static::size($item);
});
} | php | public static function countBy($list, $iterator, $context = null)
{
return static::map(static::groupBy($list, $iterator, $context), function ($item) {
return static::size($item);
});
} | [
"public",
"static",
"function",
"countBy",
"(",
"$",
"list",
",",
"$",
"iterator",
",",
"$",
"context",
"=",
"null",
")",
"{",
"return",
"static",
"::",
"map",
"(",
"static",
"::",
"groupBy",
"(",
"$",
"list",
",",
"$",
"iterator",
",",
"$",
"context... | Sorts a list into groups and returns a count for the number of objects in each group. Similar to groupBy, but
instead of returning a list of values, returns a count for the number of values in that group.
@category Collection Functions
@param traversable $list the list of items to group and count
@param callable,scal... | [
"Sorts",
"a",
"list",
"into",
"groups",
"and",
"returns",
"a",
"count",
"for",
"the",
"number",
"of",
"objects",
"in",
"each",
"group",
".",
"Similar",
"to",
"groupBy",
"but",
"instead",
"of",
"returning",
"a",
"list",
"of",
"values",
"returns",
"a",
"co... | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L636-L641 |
189,509 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.sample | public static function sample($list, $n = 1)
{
return $n == 1
? static::get($list, static::keys($list)[static::random(static::size($list) -1)])
: array_slice(static::shuffle($list), 0, $n);
} | php | public static function sample($list, $n = 1)
{
return $n == 1
? static::get($list, static::keys($list)[static::random(static::size($list) -1)])
: array_slice(static::shuffle($list), 0, $n);
} | [
"public",
"static",
"function",
"sample",
"(",
"$",
"list",
",",
"$",
"n",
"=",
"1",
")",
"{",
"return",
"$",
"n",
"==",
"1",
"?",
"static",
"::",
"get",
"(",
"$",
"list",
",",
"static",
"::",
"keys",
"(",
"$",
"list",
")",
"[",
"static",
"::",... | Produce a random sample from the list. Pass a number to return n random elements from the list. Otherwise a
single random item will be returned.
@category Collection Functions
@param traversable $list the list of items
@param int $n optional, the number of items to pick
@return array | [
"Produce",
"a",
"random",
"sample",
"from",
"the",
"list",
".",
"Pass",
"a",
"number",
"to",
"return",
"n",
"random",
"elements",
"from",
"the",
"list",
".",
"Otherwise",
"a",
"single",
"random",
"item",
"will",
"be",
"returned",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L669-L674 |
189,510 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.size | public static function size($list)
{
if ($list === null)
return 0;
if (is_scalar($list) || is_resource($list))
return 1;
if (is_array($list) || $list instanceof \Countable)
return count($list);
if ($list instanceof \Traversable)
... | php | public static function size($list)
{
if ($list === null)
return 0;
if (is_scalar($list) || is_resource($list))
return 1;
if (is_array($list) || $list instanceof \Countable)
return count($list);
if ($list instanceof \Traversable)
... | [
"public",
"static",
"function",
"size",
"(",
"$",
"list",
")",
"{",
"if",
"(",
"$",
"list",
"===",
"null",
")",
"return",
"0",
";",
"if",
"(",
"is_scalar",
"(",
"$",
"list",
")",
"||",
"is_resource",
"(",
"$",
"list",
")",
")",
"return",
"1",
";"... | Return the number of values in the list. This method will also accept scalars such as string, number and even
null or resources but will return 1 in that case.
@category Collection Functions
@param traversable $list the list of items
@return int | [
"Return",
"the",
"number",
"of",
"values",
"in",
"the",
"list",
".",
"This",
"method",
"will",
"also",
"accept",
"scalars",
"such",
"as",
"string",
"number",
"and",
"even",
"null",
"or",
"resources",
"but",
"will",
"return",
"1",
"in",
"that",
"case",
".... | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L714-L731 |
189,511 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.first | public static function first($array, $n = 1, $guard = false)
{
if (empty($array))
return;
if ($n <= 0)
throw new \UnexpectedValueException("invalid number of items $n");
$result = [];
static::each($array, function ($item) use (& $n, & $result) {
... | php | public static function first($array, $n = 1, $guard = false)
{
if (empty($array))
return;
if ($n <= 0)
throw new \UnexpectedValueException("invalid number of items $n");
$result = [];
static::each($array, function ($item) use (& $n, & $result) {
... | [
"public",
"static",
"function",
"first",
"(",
"$",
"array",
",",
"$",
"n",
"=",
"1",
",",
"$",
"guard",
"=",
"false",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"array",
")",
")",
"return",
";",
"if",
"(",
"$",
"n",
"<=",
"0",
")",
"throw",
"new... | Returns the first element of an array. Passing n will return the first n elements of the array. Passing guard
will force the returned value to be an array.
@category Array Functions
@param traversable $array the list of items
@param int $n optional, the number of items to pick
@param bool $guard optional, true to alw... | [
"Returns",
"the",
"first",
"element",
"of",
"an",
"array",
".",
"Passing",
"n",
"will",
"return",
"the",
"first",
"n",
"elements",
"of",
"the",
"array",
".",
"Passing",
"guard",
"will",
"force",
"the",
"returned",
"value",
"to",
"be",
"an",
"array",
"."
... | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L789-L806 |
189,512 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.last | public static function last($array, $n = 1, $guard = false)
{
$array = static::toArray($array);
$result = array_values(array_slice($array, -$n));
return $guard || isset($result[1]) ? $result : $result[0];
} | php | public static function last($array, $n = 1, $guard = false)
{
$array = static::toArray($array);
$result = array_values(array_slice($array, -$n));
return $guard || isset($result[1]) ? $result : $result[0];
} | [
"public",
"static",
"function",
"last",
"(",
"$",
"array",
",",
"$",
"n",
"=",
"1",
",",
"$",
"guard",
"=",
"false",
")",
"{",
"$",
"array",
"=",
"static",
"::",
"toArray",
"(",
"$",
"array",
")",
";",
"$",
"result",
"=",
"array_values",
"(",
"ar... | Returns the last element of an array. Passing n will return the last n elements of the array. Passing guard
will force the returned value to be an array.
@category Array Functions
@param traversabel $array the list of items
@param int $n optional, the number of items to pick
@param bool $guard optional, true to alway... | [
"Returns",
"the",
"last",
"element",
"of",
"an",
"array",
".",
"Passing",
"n",
"will",
"return",
"the",
"last",
"n",
"elements",
"of",
"the",
"array",
".",
"Passing",
"guard",
"will",
"force",
"the",
"returned",
"value",
"to",
"be",
"an",
"array",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L837-L842 |
189,513 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.intersection | public static function intersection($array)
{
if ($array == null)
return [];
$args = func_get_args();
$argsLength = func_num_args();
if ($argsLength == 1)
return $array;
if (static::every($args, 'is_array'))
return array_valu... | php | public static function intersection($array)
{
if ($array == null)
return [];
$args = func_get_args();
$argsLength = func_num_args();
if ($argsLength == 1)
return $array;
if (static::every($args, 'is_array'))
return array_valu... | [
"public",
"static",
"function",
"intersection",
"(",
"$",
"array",
")",
"{",
"if",
"(",
"$",
"array",
"==",
"null",
")",
"return",
"[",
"]",
";",
"$",
"args",
"=",
"func_get_args",
"(",
")",
";",
"$",
"argsLength",
"=",
"func_num_args",
"(",
")",
";"... | Computes the list of values that are the intersection of all the arrays. Each value in the result is present in
each of the arrays.
@category Array Functions
@param traversable $array multiple, the arrays to intersect
@return array | [
"Computes",
"the",
"list",
"of",
"values",
"that",
"are",
"the",
"intersection",
"of",
"all",
"the",
"arrays",
".",
"Each",
"value",
"in",
"the",
"result",
"is",
"present",
"in",
"each",
"of",
"the",
"arrays",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L1029-L1058 |
189,514 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.difference | public static function difference($array)
{
if (empty($array))
return [];
if (func_num_args() == 1)
return $array;
$args = func_get_args();
if (static::every($args, 'is_array'))
return array_values(call_user_func_array('array_diff', $... | php | public static function difference($array)
{
if (empty($array))
return [];
if (func_num_args() == 1)
return $array;
$args = func_get_args();
if (static::every($args, 'is_array'))
return array_values(call_user_func_array('array_diff', $... | [
"public",
"static",
"function",
"difference",
"(",
"$",
"array",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"array",
")",
")",
"return",
"[",
"]",
";",
"if",
"(",
"func_num_args",
"(",
")",
"==",
"1",
")",
"return",
"$",
"array",
";",
"$",
"args",
"... | Similar to without, but returns the values from array that are not present in the other arrays.
@category Array Functions
@param traversable $array multiple, the arrays to difference
@return array | [
"Similar",
"to",
"without",
"but",
"returns",
"the",
"values",
"from",
"array",
"that",
"are",
"not",
"present",
"in",
"the",
"other",
"arrays",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L1069-L1086 |
189,515 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.zip | public static function zip()
{
$arguments = func_get_args();
$length = func_num_args();
$result = [];
for ($i=0; $i<$length; $i++)
$result[$i] = static::pluck($arguments, $i);
return $result;
} | php | public static function zip()
{
$arguments = func_get_args();
$length = func_num_args();
$result = [];
for ($i=0; $i<$length; $i++)
$result[$i] = static::pluck($arguments, $i);
return $result;
} | [
"public",
"static",
"function",
"zip",
"(",
")",
"{",
"$",
"arguments",
"=",
"func_get_args",
"(",
")",
";",
"$",
"length",
"=",
"func_num_args",
"(",
")",
";",
"$",
"result",
"=",
"[",
"]",
";",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"$",
"i",
"... | Merges together the values of each of the arrays with the values at the corresponding position. Useful when you
have separate data sources that are coordinated through matching array indexes.
@category Array Functions
@param traversable $array multiple, the arrays to zip
@return array | [
"Merges",
"together",
"the",
"values",
"of",
"each",
"of",
"the",
"arrays",
"with",
"the",
"values",
"at",
"the",
"corresponding",
"position",
".",
"Useful",
"when",
"you",
"have",
"separate",
"data",
"sources",
"that",
"are",
"coordinated",
"through",
"matchi... | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L1098-L1107 |
189,516 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.indexOf | public static function indexOf($array, $item)
{
if (is_array($array))
return ($key = array_search($item, $array)) !== false ? $key : -1;
$found = -1;
$search = $item;
static::each($array, function($item, $key) use ($search, & $found) {
if ($item == $s... | php | public static function indexOf($array, $item)
{
if (is_array($array))
return ($key = array_search($item, $array)) !== false ? $key : -1;
$found = -1;
$search = $item;
static::each($array, function($item, $key) use ($search, & $found) {
if ($item == $s... | [
"public",
"static",
"function",
"indexOf",
"(",
"$",
"array",
",",
"$",
"item",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"array",
")",
")",
"return",
"(",
"$",
"key",
"=",
"array_search",
"(",
"$",
"item",
",",
"$",
"array",
")",
")",
"!==",
"f... | Returns the index at which value can be found in the array, or -1 if value is not present in the array. This
method uses array_search internally and is not optimized for long array binary search.
@category Array Functions
@param traversable $array the list of items
@param mixed $item the value to look for
@return mi... | [
"Returns",
"the",
"index",
"at",
"which",
"value",
"can",
"be",
"found",
"in",
"the",
"array",
"or",
"-",
"1",
"if",
"value",
"is",
"not",
"present",
"in",
"the",
"array",
".",
"This",
"method",
"uses",
"array_search",
"internally",
"and",
"is",
"not",
... | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L1147-L1162 |
189,517 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.lastIndexOf | public static function lastIndexOf($array, $item)
{
if (is_array($array))
return ($keys = array_keys($array, $item, false)) ? array_pop($keys) : -1;
$found = -1;
$search = $item;
static::each($array, function($item, $key) use ($search, & $found) {
if ... | php | public static function lastIndexOf($array, $item)
{
if (is_array($array))
return ($keys = array_keys($array, $item, false)) ? array_pop($keys) : -1;
$found = -1;
$search = $item;
static::each($array, function($item, $key) use ($search, & $found) {
if ... | [
"public",
"static",
"function",
"lastIndexOf",
"(",
"$",
"array",
",",
"$",
"item",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"array",
")",
")",
"return",
"(",
"$",
"keys",
"=",
"array_keys",
"(",
"$",
"array",
",",
"$",
"item",
",",
"false",
")",... | Returns the index of the last occurrence of value in the array, or -1 if value is not present. This method uses
array_keys internally and is not optimized for long array binary search.
@category Array Functions
@param traversable $array the list of items
@param mixed $item the value to look for
@return mixed | [
"Returns",
"the",
"index",
"of",
"the",
"last",
"occurrence",
"of",
"value",
"in",
"the",
"array",
"or",
"-",
"1",
"if",
"value",
"is",
"not",
"present",
".",
"This",
"method",
"uses",
"array_keys",
"internally",
"and",
"is",
"not",
"optimized",
"for",
"... | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L1175-L1188 |
189,518 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.partial | public static function partial(callable $function, $arguments)
{
if (!is_array($arguments))
$arguments = array_slice(func_get_args(), 1);
return function () use ($function, $arguments) {
return call_user_func_array($function, array_merge(func_get_args(), $arguments));
... | php | public static function partial(callable $function, $arguments)
{
if (!is_array($arguments))
$arguments = array_slice(func_get_args(), 1);
return function () use ($function, $arguments) {
return call_user_func_array($function, array_merge(func_get_args(), $arguments));
... | [
"public",
"static",
"function",
"partial",
"(",
"callable",
"$",
"function",
",",
"$",
"arguments",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"arguments",
")",
")",
"$",
"arguments",
"=",
"array_slice",
"(",
"func_get_args",
"(",
")",
",",
"1",
"... | Partially apply a function by filling in any number of its arguments. Not all the arguments have to be present
on the partial construction.
@category Function (uh, ahem) Functions
@param callable $function the function
@param array,mixed $arguments multiple, the arguments
@return closure | [
"Partially",
"apply",
"a",
"function",
"by",
"filling",
"in",
"any",
"number",
"of",
"its",
"arguments",
".",
"Not",
"all",
"the",
"arguments",
"have",
"to",
"be",
"present",
"on",
"the",
"partial",
"construction",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L1385-L1393 |
189,519 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.bindClass | public static function bindClass(\Closure $function, $class)
{
if (!class_exists($class))
throw new \InvalidArgumentException("no such class $class");
// assigning a class context for a closure is never an issue
$function = \Closure::bind($function, null, $class);
... | php | public static function bindClass(\Closure $function, $class)
{
if (!class_exists($class))
throw new \InvalidArgumentException("no such class $class");
// assigning a class context for a closure is never an issue
$function = \Closure::bind($function, null, $class);
... | [
"public",
"static",
"function",
"bindClass",
"(",
"\\",
"Closure",
"$",
"function",
",",
"$",
"class",
")",
"{",
"if",
"(",
"!",
"class_exists",
"(",
"$",
"class",
")",
")",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"\"no such class $class\"",
"... | Bind a function to a class, meaning that whenever the function is called, the value of self or static will be
the class. Optionally, pass arguments to the function to pre-fill them, also known as partial application.
@category Function (uh, ahem) Functions
@param closure $function the function
@param object,string $c... | [
"Bind",
"a",
"function",
"to",
"a",
"class",
"meaning",
"that",
"whenever",
"the",
"function",
"is",
"called",
"the",
"value",
"of",
"self",
"or",
"static",
"will",
"be",
"the",
"class",
".",
"Optionally",
"pass",
"arguments",
"to",
"the",
"function",
"to"... | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L1445-L1458 |
189,520 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.throttle | public static function throttle(callable $function, $wait)
{
return function () use ($function, $wait) {
static $pretime;
$curtime = microtime(true);
if (!$pretime || ($curtime - $pretime) >= ($wait / 1000)) {
$pretime = $curtime;
... | php | public static function throttle(callable $function, $wait)
{
return function () use ($function, $wait) {
static $pretime;
$curtime = microtime(true);
if (!$pretime || ($curtime - $pretime) >= ($wait / 1000)) {
$pretime = $curtime;
... | [
"public",
"static",
"function",
"throttle",
"(",
"callable",
"$",
"function",
",",
"$",
"wait",
")",
"{",
"return",
"function",
"(",
")",
"use",
"(",
"$",
"function",
",",
"$",
"wait",
")",
"{",
"static",
"$",
"pretime",
";",
"$",
"curtime",
"=",
"mi... | Creates and returns a new, throttled version of the passed function, that, when invoked repeatedly, will only
actually call the original function at most once per every wait milliseconds. Useful for rate-limiting events
that occur faster than you can keep up with.
@category Function (uh, ahem) Functions
@param callab... | [
"Creates",
"and",
"returns",
"a",
"new",
"throttled",
"version",
"of",
"the",
"passed",
"function",
"that",
"when",
"invoked",
"repeatedly",
"will",
"only",
"actually",
"call",
"the",
"original",
"function",
"at",
"most",
"once",
"per",
"every",
"wait",
"milli... | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L1533-L1544 |
189,521 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.keys | public static function keys($object)
{
if ($object instanceof \stdClass)
$object = (array)$object;
if (is_array($object))
return array_keys($object);
$result = [];
static::each($object, function ($item, $key) use (& $result) {
$result[]... | php | public static function keys($object)
{
if ($object instanceof \stdClass)
$object = (array)$object;
if (is_array($object))
return array_keys($object);
$result = [];
static::each($object, function ($item, $key) use (& $result) {
$result[]... | [
"public",
"static",
"function",
"keys",
"(",
"$",
"object",
")",
"{",
"if",
"(",
"$",
"object",
"instanceof",
"\\",
"stdClass",
")",
"$",
"object",
"=",
"(",
"array",
")",
"$",
"object",
";",
"if",
"(",
"is_array",
"(",
"$",
"object",
")",
")",
"re... | Retrieve all the names of the object's properties.
@category Object Functions
@param traversable $object the list from which the keys are extracted
@return array | [
"Retrieve",
"all",
"the",
"names",
"of",
"the",
"object",
"s",
"properties",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L1597-L1611 |
189,522 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.values | public static function values($object)
{
if ($object instanceof \stdClass)
$object = (array)$object;
if (is_array($object))
return array_values($object);
$result = [];
static::each($object, function ($item) use (& $result) {
$result[] =... | php | public static function values($object)
{
if ($object instanceof \stdClass)
$object = (array)$object;
if (is_array($object))
return array_values($object);
$result = [];
static::each($object, function ($item) use (& $result) {
$result[] =... | [
"public",
"static",
"function",
"values",
"(",
"$",
"object",
")",
"{",
"if",
"(",
"$",
"object",
"instanceof",
"\\",
"stdClass",
")",
"$",
"object",
"=",
"(",
"array",
")",
"$",
"object",
";",
"if",
"(",
"is_array",
"(",
"$",
"object",
")",
")",
"... | Return all of the values of the object's properties.
@category Object Functions
@param traversable $object the list from which the values are extracted
@return array | [
"Return",
"all",
"of",
"the",
"values",
"of",
"the",
"object",
"s",
"properties",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L1622-L1636 |
189,523 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.invert | public static function invert($object)
{
if (!is_array($object))
$castDown = (boolean)$object = static::toArray($object);
return !empty($castDown) ? (object)array_flip($object) : array_flip($object);
} | php | public static function invert($object)
{
if (!is_array($object))
$castDown = (boolean)$object = static::toArray($object);
return !empty($castDown) ? (object)array_flip($object) : array_flip($object);
} | [
"public",
"static",
"function",
"invert",
"(",
"$",
"object",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"object",
")",
")",
"$",
"castDown",
"=",
"(",
"boolean",
")",
"$",
"object",
"=",
"static",
"::",
"toArray",
"(",
"$",
"object",
")",
";"... | Returns a copy of the object where the keys have become the values and the values the keys. For this to work,
all of your object's values should be unique and string serializable.
@category Object Functions
@param traversable $object the object to invert
@return object,array | [
"Returns",
"a",
"copy",
"of",
"the",
"object",
"where",
"the",
"keys",
"have",
"become",
"the",
"values",
"and",
"the",
"values",
"the",
"keys",
".",
"For",
"this",
"to",
"work",
"all",
"of",
"your",
"object",
"s",
"values",
"should",
"be",
"unique",
"... | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L1667-L1673 |
189,524 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.extend | public static function extend($destination, $sources)
{
$sources = array_slice(func_get_args(), 1);
static::each($sources, function ($source) use (& $destination) {
static::each($source, function ($value, $name) use (& $destination) {
static::set($destination, $nam... | php | public static function extend($destination, $sources)
{
$sources = array_slice(func_get_args(), 1);
static::each($sources, function ($source) use (& $destination) {
static::each($source, function ($value, $name) use (& $destination) {
static::set($destination, $nam... | [
"public",
"static",
"function",
"extend",
"(",
"$",
"destination",
",",
"$",
"sources",
")",
"{",
"$",
"sources",
"=",
"array_slice",
"(",
"func_get_args",
"(",
")",
",",
"1",
")",
";",
"static",
"::",
"each",
"(",
"$",
"sources",
",",
"function",
"(",... | Copy all of the properties in the source objects over to the destination object, and return the destination
object. It's in-order, so the last source will override properties of the same name in previous arguments.
@category Object Functions
@param object,array $destination the destination object
@param object,array ... | [
"Copy",
"all",
"of",
"the",
"properties",
"in",
"the",
"source",
"objects",
"over",
"to",
"the",
"destination",
"object",
"and",
"return",
"the",
"destination",
"object",
".",
"It",
"s",
"in",
"-",
"order",
"so",
"the",
"last",
"source",
"will",
"override"... | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L1715-L1726 |
189,525 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.defaults | public static function defaults($object, $defaults)
{
$defaults = array_slice(func_get_args(), 1);
if ($object instanceof \stdClass) {
$object = (array)$object;
$castDown = true;
}
$result = $object;
$isArray = is_array($object);
s... | php | public static function defaults($object, $defaults)
{
$defaults = array_slice(func_get_args(), 1);
if ($object instanceof \stdClass) {
$object = (array)$object;
$castDown = true;
}
$result = $object;
$isArray = is_array($object);
s... | [
"public",
"static",
"function",
"defaults",
"(",
"$",
"object",
",",
"$",
"defaults",
")",
"{",
"$",
"defaults",
"=",
"array_slice",
"(",
"func_get_args",
"(",
")",
",",
"1",
")",
";",
"if",
"(",
"$",
"object",
"instanceof",
"\\",
"stdClass",
")",
"{",... | Fill in null properties in object with values from the defaults objects, and return the object. As soon as the
property is filled, further defaults will have no effect.
@category Object Functions
@param traversable $object the object to fill
@param traversable $defaults multiple, the objects or array that will fill o... | [
"Fill",
"in",
"null",
"properties",
"in",
"object",
"with",
"values",
"from",
"the",
"defaults",
"objects",
"and",
"return",
"the",
"object",
".",
"As",
"soon",
"as",
"the",
"property",
"is",
"filled",
"further",
"defaults",
"will",
"have",
"no",
"effect",
... | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L1799-L1824 |
189,526 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.get | public static function get($object, $key, $default = null)
{
if (!static::has($object, $key))
return $default;
if (static::isArray($object))
return $object[$key];
if (static::isObject($object))
return $object->$key;
return $object;
... | php | public static function get($object, $key, $default = null)
{
if (!static::has($object, $key))
return $default;
if (static::isArray($object))
return $object[$key];
if (static::isObject($object))
return $object->$key;
return $object;
... | [
"public",
"static",
"function",
"get",
"(",
"$",
"object",
",",
"$",
"key",
",",
"$",
"default",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"static",
"::",
"has",
"(",
"$",
"object",
",",
"$",
"key",
")",
")",
"return",
"$",
"default",
";",
"if",
"... | Get the object's key value. If such keys doesn't exists, the default value is returned. If object is neither
Array nor an Object, the object itself is returned.
@category Object Functions
@param object,array $object the object
@param scalar $key the key
@param mixed $default optional, the default value to return in c... | [
"Get",
"the",
"object",
"s",
"key",
"value",
".",
"If",
"such",
"keys",
"doesn",
"t",
"exists",
"the",
"default",
"value",
"is",
"returned",
".",
"If",
"object",
"is",
"neither",
"Array",
"nor",
"an",
"Object",
"the",
"object",
"itself",
"is",
"returned"... | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L1947-L1959 |
189,527 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.set | public static function set(& $object, $key, $value)
{
if (static::isArray($object))
$object[$key] = $value;
if (static::isObject($object))
$object->$key = $value;
return $object;
} | php | public static function set(& $object, $key, $value)
{
if (static::isArray($object))
$object[$key] = $value;
if (static::isObject($object))
$object->$key = $value;
return $object;
} | [
"public",
"static",
"function",
"set",
"(",
"&",
"$",
"object",
",",
"$",
"key",
",",
"$",
"value",
")",
"{",
"if",
"(",
"static",
"::",
"isArray",
"(",
"$",
"object",
")",
")",
"$",
"object",
"[",
"$",
"key",
"]",
"=",
"$",
"value",
";",
"if",... | Set object's key value. If object is neither Array nor an Object, the object itself is returned.
@category Object Functions
@param mixed $object reference, the object
@param scalar $key the key
@param mixed $value the value to set
@return mixed | [
"Set",
"object",
"s",
"key",
"value",
".",
"If",
"object",
"is",
"neither",
"Array",
"nor",
"an",
"Object",
"the",
"object",
"itself",
"is",
"returned",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L1972-L1981 |
189,528 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.isArray | public static function isArray($object, $native = false)
{
return $native
? is_array($object)
: is_array($object) || $object instanceof \ArrayAccess;
} | php | public static function isArray($object, $native = false)
{
return $native
? is_array($object)
: is_array($object) || $object instanceof \ArrayAccess;
} | [
"public",
"static",
"function",
"isArray",
"(",
"$",
"object",
",",
"$",
"native",
"=",
"false",
")",
"{",
"return",
"$",
"native",
"?",
"is_array",
"(",
"$",
"object",
")",
":",
"is_array",
"(",
"$",
"object",
")",
"||",
"$",
"object",
"instanceof",
... | Returns true if object is an array or usable like an array. If the optionnal native parameter is set to true, it
will only return true if object is a native array.
@category Object Functions
@param mixed $object the object
@param bool $native optional, if true will no consider instances of ArrayAccess as arrays
@ret... | [
"Returns",
"true",
"if",
"object",
"is",
"an",
"array",
"or",
"usable",
"like",
"an",
"array",
".",
"If",
"the",
"optionnal",
"native",
"parameter",
"is",
"set",
"to",
"true",
"it",
"will",
"only",
"return",
"true",
"if",
"object",
"is",
"a",
"native",
... | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L2052-L2057 |
189,529 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.isInteger | public static function isInteger($object, $native = false)
{
return $native
? is_int($object)
: is_int($object) || $object instanceof \SplInt;
} | php | public static function isInteger($object, $native = false)
{
return $native
? is_int($object)
: is_int($object) || $object instanceof \SplInt;
} | [
"public",
"static",
"function",
"isInteger",
"(",
"$",
"object",
",",
"$",
"native",
"=",
"false",
")",
"{",
"return",
"$",
"native",
"?",
"is_int",
"(",
"$",
"object",
")",
":",
"is_int",
"(",
"$",
"object",
")",
"||",
"$",
"object",
"instanceof",
"... | Returns true if the object is an integer. If the optional native parameter is set to true, it will only return
true if object is a native int.
@category Object Functions
@param mixed $object the object
@param bool $native optional, if true will not consider instances of SplInt as integers
@return bool | [
"Returns",
"true",
"if",
"the",
"object",
"is",
"an",
"integer",
".",
"If",
"the",
"optional",
"native",
"parameter",
"is",
"set",
"to",
"true",
"it",
"will",
"only",
"return",
"true",
"if",
"object",
"is",
"a",
"native",
"int",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L2145-L2150 |
189,530 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.isFloat | public static function isFloat($object, $native = false)
{
return $native
? is_float($object)
: is_float($object) || $object instanceof \SplFloat;
} | php | public static function isFloat($object, $native = false)
{
return $native
? is_float($object)
: is_float($object) || $object instanceof \SplFloat;
} | [
"public",
"static",
"function",
"isFloat",
"(",
"$",
"object",
",",
"$",
"native",
"=",
"false",
")",
"{",
"return",
"$",
"native",
"?",
"is_float",
"(",
"$",
"object",
")",
":",
"is_float",
"(",
"$",
"object",
")",
"||",
"$",
"object",
"instanceof",
... | Returns true if the object is a float. If the optional native parameter is set to true, it will only return true
if object is a native float.
@category Object Functions
@param mixed $object the object
@param bool $native optional, if true will not consider instances of SplFloat as integers
@return bool | [
"Returns",
"true",
"if",
"the",
"object",
"is",
"a",
"float",
".",
"If",
"the",
"optional",
"native",
"parameter",
"is",
"set",
"to",
"true",
"it",
"will",
"only",
"return",
"true",
"if",
"object",
"is",
"a",
"native",
"float",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L2163-L2168 |
189,531 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.isDate | public static function isDate($object)
{
return $object instanceof \DateTime || (static::isString($object) && strtotime((string)$object) !== false);
} | php | public static function isDate($object)
{
return $object instanceof \DateTime || (static::isString($object) && strtotime((string)$object) !== false);
} | [
"public",
"static",
"function",
"isDate",
"(",
"$",
"object",
")",
"{",
"return",
"$",
"object",
"instanceof",
"\\",
"DateTime",
"||",
"(",
"static",
"::",
"isString",
"(",
"$",
"object",
")",
"&&",
"strtotime",
"(",
"(",
"string",
")",
"$",
"object",
... | Returns true if object is a DateTime instance. Everything the strtotime function can understand is also
considered a date.
@category Object Functions
@param mixed $object the object
@return bool | [
"Returns",
"true",
"if",
"object",
"is",
"a",
"DateTime",
"instance",
".",
"Everything",
"the",
"strtotime",
"function",
"can",
"understand",
"is",
"also",
"considered",
"a",
"date",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L2199-L2202 |
189,532 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.isBoolean | public static function isBoolean($object, $native = false)
{
return $native
? is_bool($object)
: is_bool($object) || $object instanceof \SplBool;
} | php | public static function isBoolean($object, $native = false)
{
return $native
? is_bool($object)
: is_bool($object) || $object instanceof \SplBool;
} | [
"public",
"static",
"function",
"isBoolean",
"(",
"$",
"object",
",",
"$",
"native",
"=",
"false",
")",
"{",
"return",
"$",
"native",
"?",
"is_bool",
"(",
"$",
"object",
")",
":",
"is_bool",
"(",
"$",
"object",
")",
"||",
"$",
"object",
"instanceof",
... | Returns true if object is a Boolean. If the optionnal native parameter is set to true, it will only return true
if object is a native boolean.
@category Object Functions
@param mixed $object the object
@param bool $native optional, if true will not consider instances of SplBool as integers
@return bool | [
"Returns",
"true",
"if",
"object",
"is",
"a",
"Boolean",
".",
"If",
"the",
"optionnal",
"native",
"parameter",
"is",
"set",
"to",
"true",
"it",
"will",
"only",
"return",
"true",
"if",
"object",
"is",
"a",
"native",
"boolean",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L2265-L2270 |
189,533 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.times | public static function times($n, callable $iterator, $context = null)
{
static::associate($iterator, $context);
$n = max(0, $n);
$accum = [];
for ($i=0; $i<$n; $i++)
$accum[] = $iterator($i);
return $accum;
} | php | public static function times($n, callable $iterator, $context = null)
{
static::associate($iterator, $context);
$n = max(0, $n);
$accum = [];
for ($i=0; $i<$n; $i++)
$accum[] = $iterator($i);
return $accum;
} | [
"public",
"static",
"function",
"times",
"(",
"$",
"n",
",",
"callable",
"$",
"iterator",
",",
"$",
"context",
"=",
"null",
")",
"{",
"static",
"::",
"associate",
"(",
"$",
"iterator",
",",
"$",
"context",
")",
";",
"$",
"n",
"=",
"max",
"(",
"0",
... | Invokes the given iterator function n times. Each invocation of iterator is called with an index argument.
Produces an array of the returned values.
@category Utility Functions
@param int $n the number of time $iterator will be run
@param callable $iterator the iterator function
@param object $context optional, if pr... | [
"Invokes",
"the",
"given",
"iterator",
"function",
"n",
"times",
".",
"Each",
"invocation",
"of",
"iterator",
"is",
"called",
"with",
"an",
"index",
"argument",
".",
"Produces",
"an",
"array",
"of",
"the",
"returned",
"values",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L2445-L2455 |
189,534 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.random | public static function random($min, $max = null)
{
if ($max === null)
list($min, $max) = [0, $min];
return mt_rand($min, $max);
} | php | public static function random($min, $max = null)
{
if ($max === null)
list($min, $max) = [0, $min];
return mt_rand($min, $max);
} | [
"public",
"static",
"function",
"random",
"(",
"$",
"min",
",",
"$",
"max",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"max",
"===",
"null",
")",
"list",
"(",
"$",
"min",
",",
"$",
"max",
")",
"=",
"[",
"0",
",",
"$",
"min",
"]",
";",
"return",
... | Returns a random integer between min and max, inclusive. If you only pass one argument, it will return a number
between 0 and that number.
@category Utility Functions
@param int $min the lower bound (or the max if $max is null, the min being 0 then)
@param int $max optional the upper bound
@return int | [
"Returns",
"a",
"random",
"integer",
"between",
"min",
"and",
"max",
"inclusive",
".",
"If",
"you",
"only",
"pass",
"one",
"argument",
"it",
"will",
"return",
"a",
"number",
"between",
"0",
"and",
"that",
"number",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L2468-L2474 |
189,535 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.result | public static function result($object, $property)
{
$value = static::get($object, $property);
if (static::isFunction($value)) {
static::associate($value, $object);
return $value();
}
return $value;
} | php | public static function result($object, $property)
{
$value = static::get($object, $property);
if (static::isFunction($value)) {
static::associate($value, $object);
return $value();
}
return $value;
} | [
"public",
"static",
"function",
"result",
"(",
"$",
"object",
",",
"$",
"property",
")",
"{",
"$",
"value",
"=",
"static",
"::",
"get",
"(",
"$",
"object",
",",
"$",
"property",
")",
";",
"if",
"(",
"static",
"::",
"isFunction",
"(",
"$",
"value",
... | If the value of the named property is a function then invoke it with the object as context; otherwise, return
it.
@category Utility Functions
@param object,array $object the object or array
@param scalar $property the property to get
@return mixed | [
"If",
"the",
"value",
"of",
"the",
"named",
"property",
"is",
"a",
"function",
"then",
"invoke",
"it",
"with",
"the",
"object",
"as",
"context",
";",
"otherwise",
"return",
"it",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L2564-L2574 |
189,536 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.getListfilter | protected static function getListfilter($properties)
{
return function ($item) use ($properties) {
foreach ($properties as $property => $value)
if (static::get($item, $property) != $value)
return false;
return true;
};
} | php | protected static function getListfilter($properties)
{
return function ($item) use ($properties) {
foreach ($properties as $property => $value)
if (static::get($item, $property) != $value)
return false;
return true;
};
} | [
"protected",
"static",
"function",
"getListfilter",
"(",
"$",
"properties",
")",
"{",
"return",
"function",
"(",
"$",
"item",
")",
"use",
"(",
"$",
"properties",
")",
"{",
"foreach",
"(",
"$",
"properties",
"as",
"$",
"property",
"=>",
"$",
"value",
")",... | Returns an iterator that matches a list item against properties.
@category Internal Functions
@param array $properties the properties to filter on
@return closure | [
"Returns",
"an",
"iterator",
"that",
"matches",
"a",
"list",
"item",
"against",
"properties",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L2835-L2843 |
189,537 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.getLookupIterator | protected static function getLookupIterator($value)
{
return is_callable($value) ? $value : function ($object) use ($value) {
return static::get($object, $value);
};
} | php | protected static function getLookupIterator($value)
{
return is_callable($value) ? $value : function ($object) use ($value) {
return static::get($object, $value);
};
} | [
"protected",
"static",
"function",
"getLookupIterator",
"(",
"$",
"value",
")",
"{",
"return",
"is_callable",
"(",
"$",
"value",
")",
"?",
"$",
"value",
":",
"function",
"(",
"$",
"object",
")",
"use",
"(",
"$",
"value",
")",
"{",
"return",
"static",
"... | An internal function to generate lookup iterators.
@category Internal Functions
@param mixed $value the value to iterate with
@return mixed,closure | [
"An",
"internal",
"function",
"to",
"generate",
"lookup",
"iterators",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L2854-L2859 |
189,538 | bdelespierre/php-underscore | src/Underscore/Underscore.php | Underscore.equal | protected static function equal($a, $b, $aStack, $bStack)
{
// Unwrap any wrapped object.
$a instanceof self && $a = $a->_wrapped;
$b instanceof self && $b = $b->_wrapped;
if ($a === null && $b === null)
return true;
// Two resources are always consider... | php | protected static function equal($a, $b, $aStack, $bStack)
{
// Unwrap any wrapped object.
$a instanceof self && $a = $a->_wrapped;
$b instanceof self && $b = $b->_wrapped;
if ($a === null && $b === null)
return true;
// Two resources are always consider... | [
"protected",
"static",
"function",
"equal",
"(",
"$",
"a",
",",
"$",
"b",
",",
"$",
"aStack",
",",
"$",
"bStack",
")",
"{",
"// Unwrap any wrapped object.\r",
"$",
"a",
"instanceof",
"self",
"&&",
"$",
"a",
"=",
"$",
"a",
"->",
"_wrapped",
";",
"$",
... | Tells if two objects are equals.
@category Internal Functions
@param mixed $a the first value
@param mixed $b the second $value
@param array $aStack the first recursion stack
@param array $bStack the second recursion stack
@return bool | [
"Tells",
"if",
"two",
"objects",
"are",
"equals",
"."
] | 639041f28224b52fd0cb3f0cc3000fb63f7cce48 | https://github.com/bdelespierre/php-underscore/blob/639041f28224b52fd0cb3f0cc3000fb63f7cce48/src/Underscore/Underscore.php#L2873-L2933 |
189,539 | joomla/joomla-framework | src/Joomla/Cache/Memcached.php | Memcached.connect | private function connect()
{
// We want to only create the driver once.
if ($this->driver)
{
return;
}
$pool = $this->options['memcache.pool'];
if ($pool)
{
$this->driver = new \Memcached($pool);
}
else
{
$this->driver = new \Memcached;
}
$this->driver->setOption(\Memcached::OPT_COM... | php | private function connect()
{
// We want to only create the driver once.
if ($this->driver)
{
return;
}
$pool = $this->options['memcache.pool'];
if ($pool)
{
$this->driver = new \Memcached($pool);
}
else
{
$this->driver = new \Memcached;
}
$this->driver->setOption(\Memcached::OPT_COM... | [
"private",
"function",
"connect",
"(",
")",
"{",
"// We want to only create the driver once.",
"if",
"(",
"$",
"this",
"->",
"driver",
")",
"{",
"return",
";",
"}",
"$",
"pool",
"=",
"$",
"this",
"->",
"options",
"[",
"'memcache.pool'",
"]",
";",
"if",
"("... | Connect to the Memcached servers if the connection does not already exist.
@return void
@since 1.0 | [
"Connect",
"to",
"the",
"Memcached",
"servers",
"if",
"the",
"connection",
"does",
"not",
"already",
"exist",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Cache/Memcached.php#L168-L201 |
189,540 | joomla/joomla-framework | src/Joomla/Google/Data/Picasa/Photo.php | Photo.delete | public function delete($match = '*')
{
if ($this->isAuthenticated())
{
$url = $this->getLink();
if ($match === true)
{
$match = $this->xml->xpath('./@gd:etag');
$match = $match[0];
}
try
{
$jdata = $this->query($url, null, array('GData-Version' => 2, 'If-Match' => $match), 'delete')... | php | public function delete($match = '*')
{
if ($this->isAuthenticated())
{
$url = $this->getLink();
if ($match === true)
{
$match = $this->xml->xpath('./@gd:etag');
$match = $match[0];
}
try
{
$jdata = $this->query($url, null, array('GData-Version' => 2, 'If-Match' => $match), 'delete')... | [
"public",
"function",
"delete",
"(",
"$",
"match",
"=",
"'*'",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isAuthenticated",
"(",
")",
")",
"{",
"$",
"url",
"=",
"$",
"this",
"->",
"getLink",
"(",
")",
";",
"if",
"(",
"$",
"match",
"===",
"true",
... | Method to delete a Picasa photo
@param mixed $match Check for most up to date photo
@return boolean Success or failure.
@since 1.0
@throws \Exception
@throws \RuntimeException
@throws \UnexpectedValueException | [
"Method",
"to",
"delete",
"a",
"Picasa",
"photo"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Google/Data/Picasa/Photo.php#L61-L100 |
189,541 | joomla/joomla-framework | src/Joomla/Google/Data/Picasa/Photo.php | Photo.getLink | public function getLink($type = 'edit')
{
$links = $this->xml->link;
foreach ($links as $link)
{
if ($link->attributes()->rel == $type)
{
return (string) $link->attributes()->href;
}
}
return false;
} | php | public function getLink($type = 'edit')
{
$links = $this->xml->link;
foreach ($links as $link)
{
if ($link->attributes()->rel == $type)
{
return (string) $link->attributes()->href;
}
}
return false;
} | [
"public",
"function",
"getLink",
"(",
"$",
"type",
"=",
"'edit'",
")",
"{",
"$",
"links",
"=",
"$",
"this",
"->",
"xml",
"->",
"link",
";",
"foreach",
"(",
"$",
"links",
"as",
"$",
"link",
")",
"{",
"if",
"(",
"$",
"link",
"->",
"attributes",
"("... | Method to get the photo link
@param string $type Type of link to return
@return string Link or false on failure
@since 1.0 | [
"Method",
"to",
"get",
"the",
"photo",
"link"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Google/Data/Picasa/Photo.php#L111-L124 |
189,542 | joomla/joomla-framework | src/Joomla/Google/Data/Picasa/Photo.php | Photo.getThumbnails | public function getThumbnails()
{
$thumbs = array();
foreach ($this->xml->children('media', true)->group->thumbnail as $item)
{
$url = (string) $item->attributes()->url;
$width = (int) $item->attributes()->width;
$height = (int) $item->attributes()->height;
$thumbs[$width] = array('url' => $url, 'w'... | php | public function getThumbnails()
{
$thumbs = array();
foreach ($this->xml->children('media', true)->group->thumbnail as $item)
{
$url = (string) $item->attributes()->url;
$width = (int) $item->attributes()->width;
$height = (int) $item->attributes()->height;
$thumbs[$width] = array('url' => $url, 'w'... | [
"public",
"function",
"getThumbnails",
"(",
")",
"{",
"$",
"thumbs",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"xml",
"->",
"children",
"(",
"'media'",
",",
"true",
")",
"->",
"group",
"->",
"thumbnail",
"as",
"$",
"item",
")",
... | Method to get the photo's thumbnails
@return array An array of thumbnails
@since 1.0 | [
"Method",
"to",
"get",
"the",
"photo",
"s",
"thumbnails"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Google/Data/Picasa/Photo.php#L145-L158 |
189,543 | joomla/joomla-framework | src/Joomla/Github/Package/Repositories/Commits.php | Commits.getList | public function getList($user, $repo, $sha = '', $path = '', $author = '', Date $since = null, Date $until = null)
{
// Build the request path.
$rPath = '/repos/' . $user . '/' . $repo . '/commits?';
$rPath .= ($sha) ? '&sha=' . $sha : '';
$rPath .= ($path) ? '&path=' . $path : '';
$rPath .= ($author) ? '&a... | php | public function getList($user, $repo, $sha = '', $path = '', $author = '', Date $since = null, Date $until = null)
{
// Build the request path.
$rPath = '/repos/' . $user . '/' . $repo . '/commits?';
$rPath .= ($sha) ? '&sha=' . $sha : '';
$rPath .= ($path) ? '&path=' . $path : '';
$rPath .= ($author) ? '&a... | [
"public",
"function",
"getList",
"(",
"$",
"user",
",",
"$",
"repo",
",",
"$",
"sha",
"=",
"''",
",",
"$",
"path",
"=",
"''",
",",
"$",
"author",
"=",
"''",
",",
"Date",
"$",
"since",
"=",
"null",
",",
"Date",
"$",
"until",
"=",
"null",
")",
... | Method to list commits for a repository.
A special note on pagination: Due to the way Git works, commits are paginated based on SHA
instead of page number.
Please follow the link headers as outlined in the pagination overview instead of constructing
page links yourself.
@param string $user The name of the owner... | [
"Method",
"to",
"list",
"commits",
"for",
"a",
"repository",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Repositories/Commits.php#L44-L67 |
189,544 | joomla/joomla-framework | src/Joomla/Github/Package/Repositories/Commits.php | Commits.compare | public function compare($user, $repo, $base, $head)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/compare/' . $base . '...' . $head;
// Send the request.
return $this->processResponse(
$this->client->get($this->fetchUrl($path))
);
} | php | public function compare($user, $repo, $base, $head)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/compare/' . $base . '...' . $head;
// Send the request.
return $this->processResponse(
$this->client->get($this->fetchUrl($path))
);
} | [
"public",
"function",
"compare",
"(",
"$",
"user",
",",
"$",
"repo",
",",
"$",
"base",
",",
"$",
"head",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/repos/'",
".",
"$",
"user",
".",
"'/'",
".",
"$",
"repo",
".",
"'/compare/'",
".",
"... | Method to get a diff for two commits.
@param string $user The name of the owner of the GitHub repository.
@param string $repo The name of the GitHub repository.
@param string $base The base of the diff, either a commit SHA or branch.
@param string $head The head of the diff, either a commit SHA or bran... | [
"Method",
"to",
"get",
"a",
"diff",
"for",
"two",
"commits",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Repositories/Commits.php#L112-L121 |
189,545 | joomla/joomla-framework | src/Joomla/Uri/AbstractUri.php | AbstractUri.toString | public function toString(array $parts = array('scheme', 'user', 'pass', 'host', 'port', 'path', 'query', 'fragment'))
{
// Make sure the query is created
$query = $this->getQuery();
$uri = '';
$uri .= in_array('scheme', $parts) ? (!empty($this->scheme) ? $this->scheme . '://' : '') : '';
$uri .= in_array('u... | php | public function toString(array $parts = array('scheme', 'user', 'pass', 'host', 'port', 'path', 'query', 'fragment'))
{
// Make sure the query is created
$query = $this->getQuery();
$uri = '';
$uri .= in_array('scheme', $parts) ? (!empty($this->scheme) ? $this->scheme . '://' : '') : '';
$uri .= in_array('u... | [
"public",
"function",
"toString",
"(",
"array",
"$",
"parts",
"=",
"array",
"(",
"'scheme'",
",",
"'user'",
",",
"'pass'",
",",
"'host'",
",",
"'port'",
",",
"'path'",
",",
"'query'",
",",
"'fragment'",
")",
")",
"{",
"// Make sure the query is created",
"$"... | Returns full uri string.
@param array $parts An array specifying the parts to render.
@return string The rendered URI string.
@since 1.0 | [
"Returns",
"full",
"uri",
"string",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Uri/AbstractUri.php#L119-L135 |
189,546 | joomla/joomla-framework | src/Joomla/Linkedin/Communications.php | Communications.sendMessage | public function sendMessage($recipient, $subject, $body)
{
$token = $this->oauth->getToken();
// Set parameters.
$parameters = array(
'oauth_token' => $token['key']
);
// Set the success response code.
$this->oauth->setOption('success_code', 201);
// Set the API base.
$base = '/v1/people/~/mailbo... | php | public function sendMessage($recipient, $subject, $body)
{
$token = $this->oauth->getToken();
// Set parameters.
$parameters = array(
'oauth_token' => $token['key']
);
// Set the success response code.
$this->oauth->setOption('success_code', 201);
// Set the API base.
$base = '/v1/people/~/mailbo... | [
"public",
"function",
"sendMessage",
"(",
"$",
"recipient",
",",
"$",
"subject",
",",
"$",
"body",
")",
"{",
"$",
"token",
"=",
"$",
"this",
"->",
"oauth",
"->",
"getToken",
"(",
")",
";",
"// Set parameters.",
"$",
"parameters",
"=",
"array",
"(",
"'o... | Method used to send messages via LinkedIn between two or more individuals connected to the member sending the message.
@param mixed $recipient A string containing the member id or an array of ids.
@param string $subject The subject of the message that will be sent to the recipient
@param string $body ... | [
"Method",
"used",
"to",
"send",
"messages",
"via",
"LinkedIn",
"between",
"two",
"or",
"more",
"individuals",
"connected",
"to",
"the",
"member",
"sending",
"the",
"message",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Linkedin/Communications.php#L178-L221 |
189,547 | joomla/joomla-framework | src/Joomla/Github/Package/Meta.php | Meta.getMeta | public function getMeta()
{
// Build the request path.
$path = '/meta';
return $this->processResponse($this->client->get($this->fetchUrl($path)), 200);
} | php | public function getMeta()
{
// Build the request path.
$path = '/meta';
return $this->processResponse($this->client->get($this->fetchUrl($path)), 200);
} | [
"public",
"function",
"getMeta",
"(",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/meta'",
";",
"return",
"$",
"this",
"->",
"processResponse",
"(",
"$",
"this",
"->",
"client",
"->",
"get",
"(",
"$",
"this",
"->",
"fetchUrl",
"(",
"$",
"... | Method to get the authorized IP addresses for services
@return array Authorized IP addresses in CIDR format
@since 1.0 | [
"Method",
"to",
"get",
"the",
"authorized",
"IP",
"addresses",
"for",
"services"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Meta.php#L27-L33 |
189,548 | joomla/joomla-framework | src/Joomla/Log/Logger/Formattedtext.php | Formattedtext.generateFileHeader | protected function generateFileHeader()
{
$head = array();
// Build the log file header.
// If the no php flag is not set add the php die statement.
if (empty($this->options['text_file_no_php']))
{
// Blank line to prevent information disclose: https://bugs.php.net/bug.php?id=60677
$head[] = '#';
... | php | protected function generateFileHeader()
{
$head = array();
// Build the log file header.
// If the no php flag is not set add the php die statement.
if (empty($this->options['text_file_no_php']))
{
// Blank line to prevent information disclose: https://bugs.php.net/bug.php?id=60677
$head[] = '#';
... | [
"protected",
"function",
"generateFileHeader",
"(",
")",
"{",
"$",
"head",
"=",
"array",
"(",
")",
";",
"// Build the log file header.",
"// If the no php flag is not set add the php die statement.",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"options",
"[",
"'text_f... | Method to generate the log file header.
@return string The log file header
@since 1.0 | [
"Method",
"to",
"generate",
"the",
"log",
"file",
"header",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Log/Logger/Formattedtext.php#L182-L204 |
189,549 | joomla/joomla-framework | src/Joomla/Log/Logger/Formattedtext.php | Formattedtext.initFile | protected function initFile()
{
// If the file doesn't already exist we need to create it and generate the file header.
if (!is_file($this->path))
{
// Make sure the folder exists in which to create the log file.
Folder::create(dirname($this->path));
// Build the log file header.
$head = $this->gene... | php | protected function initFile()
{
// If the file doesn't already exist we need to create it and generate the file header.
if (!is_file($this->path))
{
// Make sure the folder exists in which to create the log file.
Folder::create(dirname($this->path));
// Build the log file header.
$head = $this->gene... | [
"protected",
"function",
"initFile",
"(",
")",
"{",
"// If the file doesn't already exist we need to create it and generate the file header.",
"if",
"(",
"!",
"is_file",
"(",
"$",
"this",
"->",
"path",
")",
")",
"{",
"// Make sure the folder exists in which to create the log fi... | Method to initialise the log file. This will create the folder path to the file if it doesn't already
exist and also get a new file header if the file doesn't already exist. If the file already exists it
will simply open it for writing.
@return void
@since 1.0
@throws \RuntimeException | [
"Method",
"to",
"initialise",
"the",
"log",
"file",
".",
"This",
"will",
"create",
"the",
"folder",
"path",
"to",
"the",
"file",
"if",
"it",
"doesn",
"t",
"already",
"exist",
"and",
"also",
"get",
"a",
"new",
"file",
"header",
"if",
"the",
"file",
"doe... | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Log/Logger/Formattedtext.php#L216-L245 |
189,550 | joomla/joomla-framework | src/Joomla/Database/Sqlsrv/SqlsrvDriver.php | SqlsrvDriver.getTableConstraints | protected function getTableConstraints($tableName)
{
$this->connect();
$this->setQuery(
'SELECT CONSTRAINT_NAME FROM' . ' INFORMATION_SCHEMA.TABLE_CONSTRAINTS' . ' WHERE TABLE_NAME = ' . $this->quote($tableName)
);
return $this->loadColumn();
} | php | protected function getTableConstraints($tableName)
{
$this->connect();
$this->setQuery(
'SELECT CONSTRAINT_NAME FROM' . ' INFORMATION_SCHEMA.TABLE_CONSTRAINTS' . ' WHERE TABLE_NAME = ' . $this->quote($tableName)
);
return $this->loadColumn();
} | [
"protected",
"function",
"getTableConstraints",
"(",
"$",
"tableName",
")",
"{",
"$",
"this",
"->",
"connect",
"(",
")",
";",
"$",
"this",
"->",
"setQuery",
"(",
"'SELECT CONSTRAINT_NAME FROM'",
".",
"' INFORMATION_SCHEMA.TABLE_CONSTRAINTS'",
".",
"' WHERE TABLE_NAME ... | Get table constraints
@param string $tableName The name of the database table.
@return array Any constraints available for the table.
@since 1.0 | [
"Get",
"table",
"constraints"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Database/Sqlsrv/SqlsrvDriver.php#L175-L184 |
189,551 | joomla/joomla-framework | src/Joomla/Data/DataObject.php | DataObject.dump | public function dump($depth = 3, \SplObjectStorage $dumped = null)
{
// Check if we should initialise the recursion tracker.
if ($dumped === null)
{
$dumped = new \SplObjectStorage;
}
// Add this object to the dumped stack.
$dumped->attach($this);
// Setup a container.
$dump = new \stdClass;
//... | php | public function dump($depth = 3, \SplObjectStorage $dumped = null)
{
// Check if we should initialise the recursion tracker.
if ($dumped === null)
{
$dumped = new \SplObjectStorage;
}
// Add this object to the dumped stack.
$dumped->attach($this);
// Setup a container.
$dump = new \stdClass;
//... | [
"public",
"function",
"dump",
"(",
"$",
"depth",
"=",
"3",
",",
"\\",
"SplObjectStorage",
"$",
"dumped",
"=",
"null",
")",
"{",
"// Check if we should initialise the recursion tracker.",
"if",
"(",
"$",
"dumped",
"===",
"null",
")",
"{",
"$",
"dumped",
"=",
... | Dumps the data properties into a stdClass object, recursively if appropriate.
@param integer $depth The maximum depth of recursion (default = 3).
For example, a depth of 0 will return a stdClass with all the properties in native
form. A depth of 1 will recurse into the first level of properties only.
@p... | [
"Dumps",
"the",
"data",
"properties",
"into",
"a",
"stdClass",
"object",
"recursively",
"if",
"appropriate",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Data/DataObject.php#L176-L198 |
189,552 | joomla/joomla-framework | src/Joomla/Data/DataObject.php | DataObject.getProperty | protected function getProperty($property)
{
// Get the raw value.
$value = array_key_exists($property, $this->properties) ? $this->properties[$property] : null;
return $value;
} | php | protected function getProperty($property)
{
// Get the raw value.
$value = array_key_exists($property, $this->properties) ? $this->properties[$property] : null;
return $value;
} | [
"protected",
"function",
"getProperty",
"(",
"$",
"property",
")",
"{",
"// Get the raw value.",
"$",
"value",
"=",
"array_key_exists",
"(",
"$",
"property",
",",
"$",
"this",
"->",
"properties",
")",
"?",
"$",
"this",
"->",
"properties",
"[",
"$",
"property... | Gets a data property.
@param string $property The name of the data property.
@return mixed The value of the data property.
@see DataObject::__get()
@since 1.0 | [
"Gets",
"a",
"data",
"property",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Data/DataObject.php#L282-L288 |
189,553 | joomla/joomla-framework | src/Joomla/Github/Package/Pulls.php | Pulls.create | public function create($user, $repo, $title, $base, $head, $body = '')
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/pulls';
// Build the request data.
$data = json_encode(
array(
'title' => $title,
'base' => $base,
'head' => $head,
'body' => $body
)
);
//... | php | public function create($user, $repo, $title, $base, $head, $body = '')
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/pulls';
// Build the request data.
$data = json_encode(
array(
'title' => $title,
'base' => $base,
'head' => $head,
'body' => $body
)
);
//... | [
"public",
"function",
"create",
"(",
"$",
"user",
",",
"$",
"repo",
",",
"$",
"title",
",",
"$",
"base",
",",
"$",
"head",
",",
"$",
"body",
"=",
"''",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/repos/'",
".",
"$",
"user",
".",
"'... | Method to create a pull request.
@param string $user The name of the owner of the GitHub repository.
@param string $repo The name of the GitHub repository.
@param string $title The title of the new pull request.
@param string $base The branch (or git ref) you want your changes pulled into. This
shou... | [
"Method",
"to",
"create",
"a",
"pull",
"request",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Pulls.php#L40-L67 |
189,554 | joomla/joomla-framework | src/Joomla/Github/Package/Pulls.php | Pulls.edit | public function edit($user, $repo, $pullId, $title = null, $body = null, $state = null)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId;
// Craete the data object.
$data = new \stdClass;
// If a title is set add it to the data object.
if (isset($title))
... | php | public function edit($user, $repo, $pullId, $title = null, $body = null, $state = null)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId;
// Craete the data object.
$data = new \stdClass;
// If a title is set add it to the data object.
if (isset($title))
... | [
"public",
"function",
"edit",
"(",
"$",
"user",
",",
"$",
"repo",
",",
"$",
"pullId",
",",
"$",
"title",
"=",
"null",
",",
"$",
"body",
"=",
"null",
",",
"$",
"state",
"=",
"null",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/repos/'"... | Method to update a pull request.
@param string $user The name of the owner of the GitHub repository.
@param string $repo The name of the GitHub repository.
@param integer $pullId The pull request number.
@param string $title The optional new title for the pull request.
@param string $body ... | [
"Method",
"to",
"update",
"a",
"pull",
"request",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Pulls.php#L129-L170 |
189,555 | joomla/joomla-framework | src/Joomla/Github/Package/Pulls.php | Pulls.merge | public function merge($user, $repo, $pullId, $message = '')
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId . '/merge';
// Build the request data.
$data = json_encode(
array(
'commit_message' => $message
)
);
// Send the request.
$response = $t... | php | public function merge($user, $repo, $pullId, $message = '')
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/pulls/' . (int) $pullId . '/merge';
// Build the request data.
$data = json_encode(
array(
'commit_message' => $message
)
);
// Send the request.
$response = $t... | [
"public",
"function",
"merge",
"(",
"$",
"user",
",",
"$",
"repo",
",",
"$",
"pullId",
",",
"$",
"message",
"=",
"''",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/repos/'",
".",
"$",
"user",
".",
"'/'",
".",
"$",
"repo",
".",
"'/pull... | Method to merge a pull request.
@param string $user The name of the owner of the GitHub repository.
@param string $repo The name of the GitHub repository.
@param integer $pullId The pull request number.
@param string $message The message that will be used for the merge commit.
@return objec... | [
"Method",
"to",
"merge",
"a",
"pull",
"request",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Pulls.php#L358-L382 |
189,556 | joomla/joomla-framework | src/Joomla/Cache/Redis.php | Redis.connect | private function connect()
{
// We want to only create the driver once.
if (isset($this->driver))
{
return;
}
$host = isset($this->options['redis.host'])? $this->options['redis.host'] : self::REDIS_HOST;
$port = isset($this->options['redis.port'])? $this->options['redis.port'] : self::REDIS_PORT;
$t... | php | private function connect()
{
// We want to only create the driver once.
if (isset($this->driver))
{
return;
}
$host = isset($this->options['redis.host'])? $this->options['redis.host'] : self::REDIS_HOST;
$port = isset($this->options['redis.port'])? $this->options['redis.port'] : self::REDIS_PORT;
$t... | [
"private",
"function",
"connect",
"(",
")",
"{",
"// We want to only create the driver once.",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"driver",
")",
")",
"{",
"return",
";",
"}",
"$",
"host",
"=",
"isset",
"(",
"$",
"this",
"->",
"options",
"[",
"'r... | Connect to the Redis servers if the connection does not already exist.
@return void
@since 1.0 | [
"Connect",
"to",
"the",
"Redis",
"servers",
"if",
"the",
"connection",
"does",
"not",
"already",
"exist",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Cache/Redis.php#L165-L186 |
189,557 | dudapiotr/ZfTable | src/ZfTable/AbstractElement.php | AbstractElement.addVarAttr | public function addVarAttr($name, $value)
{
if (!in_array($name, $this->varAttr)) {
$this->varAttr[$name] = $value;
}
return $this;
} | php | public function addVarAttr($name, $value)
{
if (!in_array($name, $this->varAttr)) {
$this->varAttr[$name] = $value;
}
return $this;
} | [
"public",
"function",
"addVarAttr",
"(",
"$",
"name",
",",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"name",
",",
"$",
"this",
"->",
"varAttr",
")",
")",
"{",
"$",
"this",
"->",
"varAttr",
"[",
"$",
"name",
"]",
"=",
"$",
"v... | Add new var class to element
@param $name
@param $value
@return $this | [
"Add",
"new",
"var",
"class",
"to",
"element"
] | 8c7750c10d16137208d055345ca81c7d845e59d2 | https://github.com/dudapiotr/ZfTable/blob/8c7750c10d16137208d055345ca81c7d845e59d2/src/ZfTable/AbstractElement.php#L97-L103 |
189,558 | dudapiotr/ZfTable | src/ZfTable/AbstractElement.php | AbstractElement.addAttr | public function addAttr($name, $value)
{
if (!in_array($name, $this->attributes)) {
$this->attributes[$name] = $value;
}
return $this;
} | php | public function addAttr($name, $value)
{
if (!in_array($name, $this->attributes)) {
$this->attributes[$name] = $value;
}
return $this;
} | [
"public",
"function",
"addAttr",
"(",
"$",
"name",
",",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"name",
",",
"$",
"this",
"->",
"attributes",
")",
")",
"{",
"$",
"this",
"->",
"attributes",
"[",
"$",
"name",
"]",
"=",
"$",
... | Add new attribute to table, header, column or rowset
@param string $name
@param string $value
@return mixed | [
"Add",
"new",
"attribute",
"to",
"table",
"header",
"column",
"or",
"rowset"
] | 8c7750c10d16137208d055345ca81c7d845e59d2 | https://github.com/dudapiotr/ZfTable/blob/8c7750c10d16137208d055345ca81c7d845e59d2/src/ZfTable/AbstractElement.php#L112-L118 |
189,559 | dudapiotr/ZfTable | src/ZfTable/AbstractElement.php | AbstractElement.getClassName | public function getClassName()
{
$className = '';
if (count($this->class)) {
$className = implode(' ', array_values($this->class));
}
if (count($this->varClass)) {
$className .= ' ';
$className .= implode(' ', array_values($this->varClass));
... | php | public function getClassName()
{
$className = '';
if (count($this->class)) {
$className = implode(' ', array_values($this->class));
}
if (count($this->varClass)) {
$className .= ' ';
$className .= implode(' ', array_values($this->varClass));
... | [
"public",
"function",
"getClassName",
"(",
")",
"{",
"$",
"className",
"=",
"''",
";",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"class",
")",
")",
"{",
"$",
"className",
"=",
"implode",
"(",
"' '",
",",
"array_values",
"(",
"$",
"this",
"->",
"c... | Get string class from array
@return string | [
"Get",
"string",
"class",
"from",
"array"
] | 8c7750c10d16137208d055345ca81c7d845e59d2 | https://github.com/dudapiotr/ZfTable/blob/8c7750c10d16137208d055345ca81c7d845e59d2/src/ZfTable/AbstractElement.php#L124-L137 |
189,560 | dudapiotr/ZfTable | src/ZfTable/AbstractElement.php | AbstractElement.getAttributes | public function getAttributes()
{
$ret = array();
if (count($this->attributes)) {
foreach ($this->attributes as $name => $value) {
$ret[] = sprintf($name . '="%s"', $value);
}
}
if (count($this->varAttr)) {
foreach ($this->varAttr... | php | public function getAttributes()
{
$ret = array();
if (count($this->attributes)) {
foreach ($this->attributes as $name => $value) {
$ret[] = sprintf($name . '="%s"', $value);
}
}
if (count($this->varAttr)) {
foreach ($this->varAttr... | [
"public",
"function",
"getAttributes",
"(",
")",
"{",
"$",
"ret",
"=",
"array",
"(",
")",
";",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"attributes",
")",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"attributes",
"as",
"$",
"name",
"=>",
"$",
... | Get attributes as a string
@return null|string | [
"Get",
"attributes",
"as",
"a",
"string"
] | 8c7750c10d16137208d055345ca81c7d845e59d2 | https://github.com/dudapiotr/ZfTable/blob/8c7750c10d16137208d055345ca81c7d845e59d2/src/ZfTable/AbstractElement.php#L144-L164 |
189,561 | joomla/joomla-framework | src/Joomla/Github/Package/Search.php | Search.email | public function email($email)
{
// Build the request path.
$path = '/legacy/user/email/' . $email;
// Send the request.
return $this->processResponse(
$this->client->get($this->fetchUrl($path))
);
} | php | public function email($email)
{
// Build the request path.
$path = '/legacy/user/email/' . $email;
// Send the request.
return $this->processResponse(
$this->client->get($this->fetchUrl($path))
);
} | [
"public",
"function",
"email",
"(",
"$",
"email",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/legacy/user/email/'",
".",
"$",
"email",
";",
"// Send the request.",
"return",
"$",
"this",
"->",
"processResponse",
"(",
"$",
"this",
"->",
"client",... | Email search.
This API call is added for compatibility reasons only. There’s no guarantee
that full email searches will always be available. The @ character in the
address must be left unencoded. Searches only against public email addresses
(as configured on the user’s GitHub profile).
@param string $email The em... | [
"Email",
"search",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Search.php#L120-L129 |
189,562 | joomla/joomla-framework | src/Joomla/Facebook/User.php | User.getHome | public function getHome($user, $filter = null, $location = false, $limit = 0, $offset = 0, $until = null, $since = null)
{
$extra_fields = '';
if ($filter != null)
{
$extra_fields = '?filter=' . $filter;
}
if ($location == true)
{
$extra_fields .= (strpos($extra_fields, '?') === false) ? '?with=loc... | php | public function getHome($user, $filter = null, $location = false, $limit = 0, $offset = 0, $until = null, $since = null)
{
$extra_fields = '';
if ($filter != null)
{
$extra_fields = '?filter=' . $filter;
}
if ($location == true)
{
$extra_fields .= (strpos($extra_fields, '?') === false) ? '?with=loc... | [
"public",
"function",
"getHome",
"(",
"$",
"user",
",",
"$",
"filter",
"=",
"null",
",",
"$",
"location",
"=",
"false",
",",
"$",
"limit",
"=",
"0",
",",
"$",
"offset",
"=",
"0",
",",
"$",
"until",
"=",
"null",
",",
"$",
"since",
"=",
"null",
"... | Method to get the user's news feed. Requires authentication and read_stream permission.
@param mixed $user Either an integer containing the user ID or a string containing the username.
@param string $filter User's stream filter.
@param boolean $location Retreive only posts with a location attached... | [
"Method",
"to",
"get",
"the",
"user",
"s",
"news",
"feed",
".",
"Requires",
"authentication",
"and",
"read_stream",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/User.php#L118-L133 |
189,563 | joomla/joomla-framework | src/Joomla/Facebook/User.php | User.getNotifications | public function getNotifications($user, $read = null, $limit = 0, $offset = 0, $until = null, $since = null)
{
if ($read == true)
{
$read = '?include_read=1';
}
// Send the request.
return $this->getConnection($user, 'notifications', $read, $limit, $offset, $until, $since);
} | php | public function getNotifications($user, $read = null, $limit = 0, $offset = 0, $until = null, $since = null)
{
if ($read == true)
{
$read = '?include_read=1';
}
// Send the request.
return $this->getConnection($user, 'notifications', $read, $limit, $offset, $until, $since);
} | [
"public",
"function",
"getNotifications",
"(",
"$",
"user",
",",
"$",
"read",
"=",
"null",
",",
"$",
"limit",
"=",
"0",
",",
"$",
"offset",
"=",
"0",
",",
"$",
"until",
"=",
"null",
",",
"$",
"since",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"rea... | Method to get the user's notifications. Requires authentication and manage_notifications permission.
@param mixed $user Either an integer containing the user ID or a string containing the username.
@param boolean $read Enables you to see notifications that the user has already read.
@param integer $li... | [
"Method",
"to",
"get",
"the",
"user",
"s",
"notifications",
".",
"Requires",
"authentication",
"and",
"manage_notifications",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/User.php#L225-L234 |
189,564 | joomla/joomla-framework | src/Joomla/Facebook/User.php | User.createAlbum | public function createAlbum($user, $name, $description = null, $privacy = null)
{
// Set POST request parameters.
$data = array();
$data['name'] = $name;
$data['description'] = $description;
$data['privacy'] = $privacy;
return $this->createConnection($user, 'albums', $data);
} | php | public function createAlbum($user, $name, $description = null, $privacy = null)
{
// Set POST request parameters.
$data = array();
$data['name'] = $name;
$data['description'] = $description;
$data['privacy'] = $privacy;
return $this->createConnection($user, 'albums', $data);
} | [
"public",
"function",
"createAlbum",
"(",
"$",
"user",
",",
"$",
"name",
",",
"$",
"description",
"=",
"null",
",",
"$",
"privacy",
"=",
"null",
")",
"{",
"// Set POST request parameters.",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"data",
"[",
"'... | Method to create an album for a user. Requires authentication and publish_stream permission.
@param mixed $user Either an integer containing the user ID or a string containing the username.
@param string $name Album name.
@param string $description Album description.
@param string $priva... | [
"Method",
"to",
"create",
"an",
"album",
"for",
"a",
"user",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/User.php#L313-L322 |
189,565 | joomla/joomla-framework | src/Joomla/Facebook/User.php | User.createCheckin | public function createCheckin($user, $place, $coordinates, $tags = null, $message = null, $link = null, $picture = null)
{
// Set POST request parameters.
$data = array();
$data['place'] = $place;
$data['coordinates'] = $coordinates;
$data['tags'] = $tags;
$data['message'] = $message;
$data['link'] = $li... | php | public function createCheckin($user, $place, $coordinates, $tags = null, $message = null, $link = null, $picture = null)
{
// Set POST request parameters.
$data = array();
$data['place'] = $place;
$data['coordinates'] = $coordinates;
$data['tags'] = $tags;
$data['message'] = $message;
$data['link'] = $li... | [
"public",
"function",
"createCheckin",
"(",
"$",
"user",
",",
"$",
"place",
",",
"$",
"coordinates",
",",
"$",
"tags",
"=",
"null",
",",
"$",
"message",
"=",
"null",
",",
"$",
"link",
"=",
"null",
",",
"$",
"picture",
"=",
"null",
")",
"{",
"// Set... | Method to create a checkin for a user. Requires authentication and publish_checkins permission.
@param mixed $user Either an integer containing the user ID or a string containing the username.
@param string $place Id of the Place Page.
@param string $coordinates A JSON-encoded string containi... | [
"Method",
"to",
"create",
"a",
"checkin",
"for",
"a",
"user",
".",
"Requires",
"authentication",
"and",
"publish_checkins",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/User.php#L357-L369 |
189,566 | joomla/joomla-framework | src/Joomla/Facebook/User.php | User.createLink | public function createLink($user, $link, $message = null)
{
// Set POST request parameters.
$data = array();
$data['link'] = $link;
$data['message'] = $message;
return $this->createConnection($user, 'feed', $data);
} | php | public function createLink($user, $link, $message = null)
{
// Set POST request parameters.
$data = array();
$data['link'] = $link;
$data['message'] = $message;
return $this->createConnection($user, 'feed', $data);
} | [
"public",
"function",
"createLink",
"(",
"$",
"user",
",",
"$",
"link",
",",
"$",
"message",
"=",
"null",
")",
"{",
"// Set POST request parameters.",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"data",
"[",
"'link'",
"]",
"=",
"$",
"link",
";",
"... | Method to post a link on user's feed. Requires authentication and publish_stream permission.
@param mixed $user Either an integer containing the user ID or a string containing the username.
@param string $link Link URL.
@param string $message Link message.
@return mixed The decoded JSON response... | [
"Method",
"to",
"post",
"a",
"link",
"on",
"user",
"s",
"feed",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/User.php#L545-L553 |
189,567 | joomla/joomla-framework | src/Joomla/Facebook/User.php | User.createNote | public function createNote($user, $subject, $message)
{
// Set POST request parameters.
$data = array();
$data['subject'] = $subject;
$data['message'] = $message;
return $this->createConnection($user, 'notes', $data);
} | php | public function createNote($user, $subject, $message)
{
// Set POST request parameters.
$data = array();
$data['subject'] = $subject;
$data['message'] = $message;
return $this->createConnection($user, 'notes', $data);
} | [
"public",
"function",
"createNote",
"(",
"$",
"user",
",",
"$",
"subject",
",",
"$",
"message",
")",
"{",
"// Set POST request parameters.",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"data",
"[",
"'subject'",
"]",
"=",
"$",
"subject",
";",
"$",
"d... | Method to create a note on the behalf of the user.
Requires authentication and publish_stream permission, user_groups or friends_groups permission.
@param mixed $user Either an integer containing the user ID or a string containing the username.
@param string $subject The subject of the note.
@param strin... | [
"Method",
"to",
"create",
"a",
"note",
"on",
"the",
"behalf",
"of",
"the",
"user",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"permission",
"user_groups",
"or",
"friends_groups",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/User.php#L599-L607 |
189,568 | joomla/joomla-framework | src/Joomla/Facebook/User.php | User.getPosts | public function getPosts($user, $location = false, $limit = 0, $offset = 0, $until = null, $since = null)
{
if ($location == true)
{
$location = '?with=location';
}
// Send the request.
return $this->getConnection($user, 'posts', $location, $limit, $offset, $until, $since);
} | php | public function getPosts($user, $location = false, $limit = 0, $offset = 0, $until = null, $since = null)
{
if ($location == true)
{
$location = '?with=location';
}
// Send the request.
return $this->getConnection($user, 'posts', $location, $limit, $offset, $until, $since);
} | [
"public",
"function",
"getPosts",
"(",
"$",
"user",
",",
"$",
"location",
"=",
"false",
",",
"$",
"limit",
"=",
"0",
",",
"$",
"offset",
"=",
"0",
",",
"$",
"until",
"=",
"null",
",",
"$",
"since",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"locati... | Method to get the user's posts. Requires authentication and read_stream permission for non-public posts.
@param mixed $user Either an integer containing the user ID or a string containing the username.
@param boolean $location Retreive only posts with a location attached.
@param integer $limit The... | [
"Method",
"to",
"get",
"the",
"user",
"s",
"posts",
".",
"Requires",
"authentication",
"and",
"read_stream",
"permission",
"for",
"non",
"-",
"public",
"posts",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/User.php#L667-L676 |
189,569 | joomla/joomla-framework | src/Joomla/Facebook/User.php | User.createPost | public function createPost($user, $message = null, $link = null, $picture = null, $name = null, $caption = null,
$description = null, $actions = null, $place = null, $tags = null, $privacy = null, $object_attachment = null)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
$data... | php | public function createPost($user, $message = null, $link = null, $picture = null, $name = null, $caption = null,
$description = null, $actions = null, $place = null, $tags = null, $privacy = null, $object_attachment = null)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
$data... | [
"public",
"function",
"createPost",
"(",
"$",
"user",
",",
"$",
"message",
"=",
"null",
",",
"$",
"link",
"=",
"null",
",",
"$",
"picture",
"=",
"null",
",",
"$",
"name",
"=",
"null",
",",
"$",
"caption",
"=",
"null",
",",
"$",
"description",
"=",
... | Method to post on a user's wall. Message or link parameter is required. Requires authentication and publish_stream permission.
@param mixed $user Either an integer containing the user ID or a string containing the username.
@param string $message Post message.
@param string $link ... | [
"Method",
"to",
"post",
"on",
"a",
"user",
"s",
"wall",
".",
"Message",
"or",
"link",
"parameter",
"is",
"required",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/User.php#L701-L719 |
189,570 | joomla/joomla-framework | src/Joomla/Facebook/User.php | User.createStatus | public function createStatus($user, $message)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
return $this->createConnection($user, 'feed', $data);
} | php | public function createStatus($user, $message)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
return $this->createConnection($user, 'feed', $data);
} | [
"public",
"function",
"createStatus",
"(",
"$",
"user",
",",
"$",
"message",
")",
"{",
"// Set POST request parameters.",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"data",
"[",
"'message'",
"]",
"=",
"$",
"message",
";",
"return",
"$",
"this",
"->",... | Method to post a status message on behalf of the user. Requires authentication publish_stream permission.
@param mixed $user Either an integer containing the user ID or a string containing the username.
@param string $message Status message content.
@return mixed The decoded JSON response or false if t... | [
"Method",
"to",
"post",
"a",
"status",
"message",
"on",
"behalf",
"of",
"the",
"user",
".",
"Requires",
"authentication",
"publish_stream",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/User.php#L763-L770 |
189,571 | joomla/joomla-framework | src/Joomla/Github/Package/Data/Refs.php | Refs.create | public function create($user, $repo, $ref, $sha)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/git/refs';
// Build the request data.
$data = json_encode(
array(
'ref' => $ref,
'sha' => $sha
)
);
// Send the request.
$response = $this->client->post($this->fetchUr... | php | public function create($user, $repo, $ref, $sha)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/git/refs';
// Build the request data.
$data = json_encode(
array(
'ref' => $ref,
'sha' => $sha
)
);
// Send the request.
$response = $this->client->post($this->fetchUr... | [
"public",
"function",
"create",
"(",
"$",
"user",
",",
"$",
"repo",
",",
"$",
"ref",
",",
"$",
"sha",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/repos/'",
".",
"$",
"user",
".",
"'/'",
".",
"$",
"repo",
".",
"'/git/refs'",
";",
"// ... | Method to create a ref.
@param string $user The name of the owner of the GitHub repository.
@param string $repo The name of the GitHub repository.
@param string $ref The name of the fully qualified reference.
@param string $sha The SHA1 value to set this reference to.
@throws DomainException
@since ... | [
"Method",
"to",
"create",
"a",
"ref",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Data/Refs.php#L100-L125 |
189,572 | joomla/joomla-framework | src/Joomla/Github/Package/Data/Refs.php | Refs.edit | public function edit($user, $repo, $ref, $sha, $force = false)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/git/refs/' . $ref;
// Craete the data object.
$data = new \stdClass;
// If a title is set add it to the data object.
if ($force)
{
$data->force = true;
}
$data... | php | public function edit($user, $repo, $ref, $sha, $force = false)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/git/refs/' . $ref;
// Craete the data object.
$data = new \stdClass;
// If a title is set add it to the data object.
if ($force)
{
$data->force = true;
}
$data... | [
"public",
"function",
"edit",
"(",
"$",
"user",
",",
"$",
"repo",
",",
"$",
"ref",
",",
"$",
"sha",
",",
"$",
"force",
"=",
"false",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/repos/'",
".",
"$",
"user",
".",
"'/'",
".",
"$",
"rep... | Method to update a reference.
@param string $user The name of the owner of the GitHub repository.
@param string $repo The name of the GitHub repository.
@param string $ref The reference to update.
@param string $sha The SHA1 value to set the reference to.
@param boolean $force Whether the... | [
"Method",
"to",
"update",
"a",
"reference",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Data/Refs.php#L141-L172 |
189,573 | joomla/joomla-framework | src/Joomla/OAuth1/Client.php | Client._generateAccessToken | private function _generateAccessToken()
{
// Set the parameters.
$parameters = array(
'oauth_token' => $this->token['key']
);
if (strcmp($this->version, '1.0a') === 0)
{
$parameters = array_merge($parameters, array('oauth_verifier' => $this->token['verifier']));
}
// Make an OAuth request for the... | php | private function _generateAccessToken()
{
// Set the parameters.
$parameters = array(
'oauth_token' => $this->token['key']
);
if (strcmp($this->version, '1.0a') === 0)
{
$parameters = array_merge($parameters, array('oauth_verifier' => $this->token['verifier']));
}
// Make an OAuth request for the... | [
"private",
"function",
"_generateAccessToken",
"(",
")",
"{",
"// Set the parameters.",
"$",
"parameters",
"=",
"array",
"(",
"'oauth_token'",
"=>",
"$",
"this",
"->",
"token",
"[",
"'key'",
"]",
")",
";",
"if",
"(",
"strcmp",
"(",
"$",
"this",
"->",
"vers... | Method used to get an access token.
@return void
@since 1.0 | [
"Method",
"used",
"to",
"get",
"an",
"access",
"token",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/OAuth1/Client.php#L223-L242 |
189,574 | joomla/joomla-framework | src/Joomla/Database/Postgresql/PostgresqlDriver.php | PostgresqlDriver.insertid | public function insertid()
{
$this->connect();
$insertQuery = $this->getQuery(false, true);
$table = $insertQuery->__get('insert')->getElements();
/* find sequence column name */
$colNameQuery = $this->getQuery(true);
$colNameQuery->select('column_default')
->from('information_schema.columns')
->whe... | php | public function insertid()
{
$this->connect();
$insertQuery = $this->getQuery(false, true);
$table = $insertQuery->__get('insert')->getElements();
/* find sequence column name */
$colNameQuery = $this->getQuery(true);
$colNameQuery->select('column_default')
->from('information_schema.columns')
->whe... | [
"public",
"function",
"insertid",
"(",
")",
"{",
"$",
"this",
"->",
"connect",
"(",
")",
";",
"$",
"insertQuery",
"=",
"$",
"this",
"->",
"getQuery",
"(",
"false",
",",
"true",
")",
";",
"$",
"table",
"=",
"$",
"insertQuery",
"->",
"__get",
"(",
"'... | Method to get the auto-incremented value from the last INSERT statement.
To be called after the INSERT statement, it's MANDATORY to have a sequence on
every primary key table.
To get the auto incremented value it's possible to call this function after
INSERT INTO query, or use INSERT INTO with RETURNING clause.
@exam... | [
"Method",
"to",
"get",
"the",
"auto",
"-",
"incremented",
"value",
"from",
"the",
"last",
"INSERT",
"statement",
".",
"To",
"be",
"called",
"after",
"the",
"INSERT",
"statement",
"it",
"s",
"MANDATORY",
"to",
"have",
"a",
"sequence",
"on",
"every",
"primar... | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Database/Postgresql/PostgresqlDriver.php#L609-L636 |
189,575 | joomla/joomla-framework | build/changelog.php | Changelog.help | public function help()
{
$this->out();
$this->out('Joomla Framework Changelog');
$this->out('-------------------------');
$this->out();
$this->out('Usage: ./changelog [-l]');
$this->out();
$this->out(' -l Build the changelog for the latest version only.');
$this->out(' -d Debug mode. Test one issue... | php | public function help()
{
$this->out();
$this->out('Joomla Framework Changelog');
$this->out('-------------------------');
$this->out();
$this->out('Usage: ./changelog [-l]');
$this->out();
$this->out(' -l Build the changelog for the latest version only.');
$this->out(' -d Debug mode. Test one issue... | [
"public",
"function",
"help",
"(",
")",
"{",
"$",
"this",
"->",
"out",
"(",
")",
";",
"$",
"this",
"->",
"out",
"(",
"'Joomla Framework Changelog'",
")",
";",
"$",
"this",
"->",
"out",
"(",
"'-------------------------'",
")",
";",
"$",
"this",
"->",
"o... | Display the help text for the app.
@return void
@since 12.1 | [
"Display",
"the",
"help",
"text",
"for",
"the",
"app",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/build/changelog.php#L246-L259 |
189,576 | joomla/joomla-framework | build/changelog.php | Changelog.getIssues | protected function getIssues($page)
{
$this->out(sprintf('Getting issues page #%02d.', $page));
$this->out(str_pad('', 40, '-'));
$issues = $this->api->issues
->getListByRepository('joomla', 'joomla-framework', null, 'closed', null, null, null, 'updated', 'desc', null, $page, 100);
$this->out(sprintf('Got... | php | protected function getIssues($page)
{
$this->out(sprintf('Getting issues page #%02d.', $page));
$this->out(str_pad('', 40, '-'));
$issues = $this->api->issues
->getListByRepository('joomla', 'joomla-framework', null, 'closed', null, null, null, 'updated', 'desc', null, $page, 100);
$this->out(sprintf('Got... | [
"protected",
"function",
"getIssues",
"(",
"$",
"page",
")",
"{",
"$",
"this",
"->",
"out",
"(",
"sprintf",
"(",
"'Getting issues page #%02d.'",
",",
"$",
"page",
")",
")",
";",
"$",
"this",
"->",
"out",
"(",
"str_pad",
"(",
"''",
",",
"40",
",",
"'-... | Get a page of issue data.
@param integer $page The page number.
@return array
@since 12.1 | [
"Get",
"a",
"page",
"of",
"issue",
"data",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/build/changelog.php#L291-L302 |
189,577 | joomla/joomla-framework | build/changelog.php | Changelog.getPull | protected function getPull($id)
{
$this->out(sprintf('Getting info for pull %6d', $id), false);
return $this->api->pulls->get('joomla', 'joomla-framework', $id);
} | php | protected function getPull($id)
{
$this->out(sprintf('Getting info for pull %6d', $id), false);
return $this->api->pulls->get('joomla', 'joomla-framework', $id);
} | [
"protected",
"function",
"getPull",
"(",
"$",
"id",
")",
"{",
"$",
"this",
"->",
"out",
"(",
"sprintf",
"(",
"'Getting info for pull %6d'",
",",
"$",
"id",
")",
",",
"false",
")",
";",
"return",
"$",
"this",
"->",
"api",
"->",
"pulls",
"->",
"get",
"... | Get information about a specific pull request.
@param integer $id The GitHub pull request number.
@return object
@since 12.1 | [
"Get",
"information",
"about",
"a",
"specific",
"pull",
"request",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/build/changelog.php#L313-L318 |
189,578 | joomla/joomla-framework | build/changelog.php | Changelog.render | protected function render(array $versions)
{
$html = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Joomla Framework pull request log</title>
</head>
<... | php | protected function render(array $versions)
{
$html = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Joomla Framework pull request log</title>
</head>
<... | [
"protected",
"function",
"render",
"(",
"array",
"$",
"versions",
")",
"{",
"$",
"html",
"=",
"'<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n\t\t<html>\n\t\t\t<head>\n\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html;... | Renders the output.
@param array $versions An array of the versions to render.
@return string
@since 12.1 | [
"Renders",
"the",
"output",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/build/changelog.php#L329-L406 |
189,579 | joomla/joomla-framework | build/changelog.php | Changelog.setBuffer | protected function setBuffer($name, $text, $append = true)
{
if (!isset($this->buffers[$name]))
{
$this->buffers[$name] = array();
}
if (is_array($text) || !$append)
{
$this->buffers[$name] = $text;
}
else
{
$this->buffers[$name][] = $text;
}
} | php | protected function setBuffer($name, $text, $append = true)
{
if (!isset($this->buffers[$name]))
{
$this->buffers[$name] = array();
}
if (is_array($text) || !$append)
{
$this->buffers[$name] = $text;
}
else
{
$this->buffers[$name][] = $text;
}
} | [
"protected",
"function",
"setBuffer",
"(",
"$",
"name",
",",
"$",
"text",
",",
"$",
"append",
"=",
"true",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"buffers",
"[",
"$",
"name",
"]",
")",
")",
"{",
"$",
"this",
"->",
"buffers",
... | Sets a named buffer.
@param string $name The name of the buffer.
@param mixed $text The text to put into/append to the buffer.
@param boolean $append Append to the array buffer.
@return void
@since 12.1 | [
"Sets",
"a",
"named",
"buffer",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/build/changelog.php#L419-L434 |
189,580 | engrnvd/laravel-crud-generator | src/Form.php | Form.input | public static function input( $name, $type = 'text' )
{
$elem = static::createElement($name,'input');
$elem->attributes['type'] = $type;
return $elem;
} | php | public static function input( $name, $type = 'text' )
{
$elem = static::createElement($name,'input');
$elem->attributes['type'] = $type;
return $elem;
} | [
"public",
"static",
"function",
"input",
"(",
"$",
"name",
",",
"$",
"type",
"=",
"'text'",
")",
"{",
"$",
"elem",
"=",
"static",
"::",
"createElement",
"(",
"$",
"name",
",",
"'input'",
")",
";",
"$",
"elem",
"->",
"attributes",
"[",
"'type'",
"]",
... | only for select element | [
"only",
"for",
"select",
"element"
] | 48ac7e879221c22e1ca8435b7edee7b621975ecc | https://github.com/engrnvd/laravel-crud-generator/blob/48ac7e879221c22e1ca8435b7edee7b621975ecc/src/Form.php#L36-L41 |
189,581 | joomla/joomla-framework | src/Joomla/Facebook/Group.php | Group.getFeed | public function getFeed($group, $limit = 0, $offset = 0, $until = null, $since = null)
{
return $this->getConnection($group, 'feed', '', $limit, $offset, $until, $since);
} | php | public function getFeed($group, $limit = 0, $offset = 0, $until = null, $since = null)
{
return $this->getConnection($group, 'feed', '', $limit, $offset, $until, $since);
} | [
"public",
"function",
"getFeed",
"(",
"$",
"group",
",",
"$",
"limit",
"=",
"0",
",",
"$",
"offset",
"=",
"0",
",",
"$",
"until",
"=",
"null",
",",
"$",
"since",
"=",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"getConnection",
"(",
"$",
"grou... | Method to get the group's wall. Requires authentication and user_groups or friends_groups permission for non-public groups.
@param string $group The group id.
@param integer $limit The number of objects per page.
@param integer $offset The object's number on the page.
@param string $until A unix t... | [
"Method",
"to",
"get",
"the",
"group",
"s",
"wall",
".",
"Requires",
"authentication",
"and",
"user_groups",
"or",
"friends_groups",
"permission",
"for",
"non",
"-",
"public",
"groups",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/Group.php#L46-L49 |
189,582 | joomla/joomla-framework | src/Joomla/Facebook/Group.php | Group.getPicture | public function getPicture($group, $type = null)
{
if ($type)
{
$type = '?type=' . $type;
}
return $this->getConnection($group, 'picture', $type);
} | php | public function getPicture($group, $type = null)
{
if ($type)
{
$type = '?type=' . $type;
}
return $this->getConnection($group, 'picture', $type);
} | [
"public",
"function",
"getPicture",
"(",
"$",
"group",
",",
"$",
"type",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"type",
")",
"{",
"$",
"type",
"=",
"'?type='",
".",
"$",
"type",
";",
"}",
"return",
"$",
"this",
"->",
"getConnection",
"(",
"$",
"g... | Method to get the groups's picture. Requires authentication and user_groups or friends_groups permission.
@param string $group The group id.
@param string $type To request a different photo use square | small | normal | large.
@return string The URL to the group's picture.
@since 1.0 | [
"Method",
"to",
"get",
"the",
"groups",
"s",
"picture",
".",
"Requires",
"authentication",
"and",
"user_groups",
"or",
"friends_groups",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/Group.php#L95-L103 |
189,583 | joomla/joomla-framework | src/Joomla/Facebook/Group.php | Group.createLink | public function createLink($group, $link, $message = null)
{
// Set POST request parameters.
$data = array();
$data['link'] = $link;
if ($message)
{
$data['message'] = $message;
}
return $this->createConnection($group, 'feed', $data);
} | php | public function createLink($group, $link, $message = null)
{
// Set POST request parameters.
$data = array();
$data['link'] = $link;
if ($message)
{
$data['message'] = $message;
}
return $this->createConnection($group, 'feed', $data);
} | [
"public",
"function",
"createLink",
"(",
"$",
"group",
",",
"$",
"link",
",",
"$",
"message",
"=",
"null",
")",
"{",
"// Set POST request parameters.",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"data",
"[",
"'link'",
"]",
"=",
"$",
"link",
";",
... | Method to post a link on group's wall. Requires authentication and publish_stream permission.
@param string $group The group id.
@param string $link Link URL.
@param string $message Link message.
@return mixed The decoded JSON response or false if the client is not authenticated.
@since 1.0 | [
"Method",
"to",
"post",
"a",
"link",
"on",
"group",
"s",
"wall",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/Group.php#L116-L128 |
189,584 | joomla/joomla-framework | src/Joomla/Facebook/Group.php | Group.createPost | public function createPost($group, $message = null, $link = null, $picture = null, $name = null, $caption = null,
$description = null, $actions = null)
{
// Set POST request parameters.
if ($message)
{
$data['message'] = $message;
}
if ($link)
{
$data['link'] = $link;
}
if ($name)
{
$dat... | php | public function createPost($group, $message = null, $link = null, $picture = null, $name = null, $caption = null,
$description = null, $actions = null)
{
// Set POST request parameters.
if ($message)
{
$data['message'] = $message;
}
if ($link)
{
$data['link'] = $link;
}
if ($name)
{
$dat... | [
"public",
"function",
"createPost",
"(",
"$",
"group",
",",
"$",
"message",
"=",
"null",
",",
"$",
"link",
"=",
"null",
",",
"$",
"picture",
"=",
"null",
",",
"$",
"name",
"=",
"null",
",",
"$",
"caption",
"=",
"null",
",",
"$",
"description",
"=",... | Method to post on group's wall. Message or link parameter is required. Requires authentication and publish_stream permission.
@param string $group The group id.
@param string $message Post message.
@param string $link Post URL.
@param string $picture Post thumbnail image (can only ... | [
"Method",
"to",
"post",
"on",
"group",
"s",
"wall",
".",
"Message",
"or",
"link",
"parameter",
"is",
"required",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/Group.php#L160-L200 |
189,585 | joomla/joomla-framework | src/Joomla/Facebook/Group.php | Group.createStatus | public function createStatus($group, $message)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
return $this->createConnection($group, 'feed', $data);
} | php | public function createStatus($group, $message)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
return $this->createConnection($group, 'feed', $data);
} | [
"public",
"function",
"createStatus",
"(",
"$",
"group",
",",
"$",
"message",
")",
"{",
"// Set POST request parameters.",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"data",
"[",
"'message'",
"]",
"=",
"$",
"message",
";",
"return",
"$",
"this",
"->"... | Method to post a status message on behalf of the user on the group's wall. Requires authentication and publish_stream permission.
@param string $group The group id.
@param string $message Status message content.
@return mixed The decoded JSON response or false if the client is not authenticated.
@since ... | [
"Method",
"to",
"post",
"a",
"status",
"message",
"on",
"behalf",
"of",
"the",
"user",
"on",
"the",
"group",
"s",
"wall",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/Group.php#L226-L233 |
189,586 | joomla/joomla-framework | src/Joomla/Github/Package/Gists/Comments.php | Comments.create | public function create($gistId, $body)
{
// Build the request path.
$path = '/gists/' . (int) $gistId . '/comments';
// Build the request data.
$data = json_encode(
array(
'body' => $body,
)
);
// Send the request.
$response = $this->client->post($this->fetchUrl($path), $data);
// Validate... | php | public function create($gistId, $body)
{
// Build the request path.
$path = '/gists/' . (int) $gistId . '/comments';
// Build the request data.
$data = json_encode(
array(
'body' => $body,
)
);
// Send the request.
$response = $this->client->post($this->fetchUrl($path), $data);
// Validate... | [
"public",
"function",
"create",
"(",
"$",
"gistId",
",",
"$",
"body",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/gists/'",
".",
"(",
"int",
")",
"$",
"gistId",
".",
"'/comments'",
";",
"// Build the request data.",
"$",
"data",
"=",
"json_e... | Method to create a comment on a gist.
@param integer $gistId The gist number.
@param string $body The comment body text.
@throws \DomainException
@since 1.0
@return object | [
"Method",
"to",
"create",
"a",
"comment",
"on",
"a",
"gist",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Gists/Comments.php#L33-L57 |
189,587 | joomla/joomla-framework | src/Joomla/Github/Package/Gists/Comments.php | Comments.edit | public function edit($commentId, $body)
{
// Build the request path.
$path = '/gists/comments/' . (int) $commentId;
// Build the request data.
$data = json_encode(
array(
'body' => $body
)
);
// Send the request.
$response = $this->client->patch($this->fetchUrl($path), $data);
// Validate ... | php | public function edit($commentId, $body)
{
// Build the request path.
$path = '/gists/comments/' . (int) $commentId;
// Build the request data.
$data = json_encode(
array(
'body' => $body
)
);
// Send the request.
$response = $this->client->patch($this->fetchUrl($path), $data);
// Validate ... | [
"public",
"function",
"edit",
"(",
"$",
"commentId",
",",
"$",
"body",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/gists/comments/'",
".",
"(",
"int",
")",
"$",
"commentId",
";",
"// Build the request data.",
"$",
"data",
"=",
"json_encode",
"... | Method to update a comment on a gist.
@param integer $commentId The id of the comment to update.
@param string $body The new body text for the comment.
@throws \DomainException
@since 1.0
@return object | [
"Method",
"to",
"update",
"a",
"comment",
"on",
"a",
"gist",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Gists/Comments.php#L97-L121 |
189,588 | joomla/joomla-framework | src/Joomla/Twitter/OAuth.php | OAuth.verifyCredentials | public function verifyCredentials()
{
$token = $this->getToken();
// Set the parameters.
$parameters = array('oauth_token' => $token['key']);
// Set the API base
$path = 'https://api.twitter.com/1.1/account/verify_credentials.json';
// Send the request.
$response = $this->oauthRequest($path, 'GET', $p... | php | public function verifyCredentials()
{
$token = $this->getToken();
// Set the parameters.
$parameters = array('oauth_token' => $token['key']);
// Set the API base
$path = 'https://api.twitter.com/1.1/account/verify_credentials.json';
// Send the request.
$response = $this->oauthRequest($path, 'GET', $p... | [
"public",
"function",
"verifyCredentials",
"(",
")",
"{",
"$",
"token",
"=",
"$",
"this",
"->",
"getToken",
"(",
")",
";",
"// Set the parameters.",
"$",
"parameters",
"=",
"array",
"(",
"'oauth_token'",
"=>",
"$",
"token",
"[",
"'key'",
"]",
")",
";",
"... | Method to verify if the access token is valid by making a request.
@return boolean Returns true if the access token is valid and false otherwise.
@since 1.0 | [
"Method",
"to",
"verify",
"if",
"the",
"access",
"token",
"is",
"valid",
"by",
"making",
"a",
"request",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Twitter/OAuth.php#L74-L96 |
189,589 | joomla/joomla-framework | src/Joomla/Twitter/OAuth.php | OAuth.endSession | public function endSession()
{
$token = $this->getToken();
// Set parameters.
$parameters = array('oauth_token' => $token['key']);
// Set the API base
$path = 'https://api.twitter.com/1.1/account/end_session.json';
// Send the request.
$response = $this->oauthRequest($path, 'POST', $parameters);
re... | php | public function endSession()
{
$token = $this->getToken();
// Set parameters.
$parameters = array('oauth_token' => $token['key']);
// Set the API base
$path = 'https://api.twitter.com/1.1/account/end_session.json';
// Send the request.
$response = $this->oauthRequest($path, 'POST', $parameters);
re... | [
"public",
"function",
"endSession",
"(",
")",
"{",
"$",
"token",
"=",
"$",
"this",
"->",
"getToken",
"(",
")",
";",
"// Set parameters.",
"$",
"parameters",
"=",
"array",
"(",
"'oauth_token'",
"=>",
"$",
"token",
"[",
"'key'",
"]",
")",
";",
"// Set the ... | Ends the session of the authenticating user, returning a null cookie.
@return array The decoded JSON response
@since 1.0 | [
"Ends",
"the",
"session",
"of",
"the",
"authenticating",
"user",
"returning",
"a",
"null",
"cookie",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Twitter/OAuth.php#L105-L119 |
189,590 | joomla/joomla-framework | src/Joomla/Filesystem/Clients/FtpClient.php | FtpClient.getInstance | public static function getInstance($host = '127.0.0.1', $port = '21', array $options = array(), $user = null, $pass = null)
{
$signature = $user . ':' . $pass . '@' . $host . ":" . $port;
// Create a new instance, or set the options of an existing one
if (!isset(self::$instances[$signature]) || !is_object(self:... | php | public static function getInstance($host = '127.0.0.1', $port = '21', array $options = array(), $user = null, $pass = null)
{
$signature = $user . ':' . $pass . '@' . $host . ":" . $port;
// Create a new instance, or set the options of an existing one
if (!isset(self::$instances[$signature]) || !is_object(self:... | [
"public",
"static",
"function",
"getInstance",
"(",
"$",
"host",
"=",
"'127.0.0.1'",
",",
"$",
"port",
"=",
"'21'",
",",
"array",
"$",
"options",
"=",
"array",
"(",
")",
",",
"$",
"user",
"=",
"null",
",",
"$",
"pass",
"=",
"null",
")",
"{",
"$",
... | Returns the global FTP connector object, only creating it
if it doesn't already exist.
You may optionally specify a username and password in the parameters. If you do so,
you may not login() again with different credentials using the same object.
If you do not use this option, you must quit() the current connection wh... | [
"Returns",
"the",
"global",
"FTP",
"connector",
"object",
"only",
"creating",
"it",
"if",
"it",
"doesn",
"t",
"already",
"exist",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Filesystem/Clients/FtpClient.php#L192-L218 |
189,591 | joomla/joomla-framework | src/Joomla/Filesystem/Clients/FtpClient.php | FtpClient.read | public function read($remote, &$buffer)
{
// Determine file type
$mode = $this->_findMode($remote);
// If native FTP support is enabled let's use it...
if (FTP_NATIVE)
{
// Turn passive mode on
if (@ftp_pasv($this->conn, true) === false)
{
Log::add(__METHOD__ . ': Unable to use passive mode.', ... | php | public function read($remote, &$buffer)
{
// Determine file type
$mode = $this->_findMode($remote);
// If native FTP support is enabled let's use it...
if (FTP_NATIVE)
{
// Turn passive mode on
if (@ftp_pasv($this->conn, true) === false)
{
Log::add(__METHOD__ . ': Unable to use passive mode.', ... | [
"public",
"function",
"read",
"(",
"$",
"remote",
",",
"&",
"$",
"buffer",
")",
"{",
"// Determine file type",
"$",
"mode",
"=",
"$",
"this",
"->",
"_findMode",
"(",
"$",
"remote",
")",
";",
"// If native FTP support is enabled let's use it...",
"if",
"(",
"FT... | Method to read a file from the FTP server's contents into a buffer
@param string $remote Path to remote file to read on the FTP server
@param string &$buffer Buffer variable to read file contents into
@return boolean True if successful
@since 1.0 | [
"Method",
"to",
"read",
"a",
"file",
"from",
"the",
"FTP",
"server",
"s",
"contents",
"into",
"a",
"buffer"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Filesystem/Clients/FtpClient.php#L886-L985 |
189,592 | joomla/joomla-framework | src/Joomla/Facebook/Photo.php | Photo.updateTag | public function updateTag($photo, $to, $x = null, $y = null)
{
// Set POST request parameters.
$data['to'] = $to;
if ($x)
{
$data['x'] = $x;
}
if ($y)
{
$data['y'] = $y;
}
return $this->createConnection($photo, 'tags', $data);
} | php | public function updateTag($photo, $to, $x = null, $y = null)
{
// Set POST request parameters.
$data['to'] = $to;
if ($x)
{
$data['x'] = $x;
}
if ($y)
{
$data['y'] = $y;
}
return $this->createConnection($photo, 'tags', $data);
} | [
"public",
"function",
"updateTag",
"(",
"$",
"photo",
",",
"$",
"to",
",",
"$",
"x",
"=",
"null",
",",
"$",
"y",
"=",
"null",
")",
"{",
"// Set POST request parameters.",
"$",
"data",
"[",
"'to'",
"]",
"=",
"$",
"to",
";",
"if",
"(",
"$",
"x",
")... | Method to update the position of the tag for a particular Users in a photo.
Requires authentication and publish_stream permission, user_photos permission for private photos.
@param string $photo The photo id.
@param string $to ID of the User to update tag in the photo.
@param integer $x x coordina... | [
"Method",
"to",
"update",
"the",
"position",
"of",
"the",
"tag",
"for",
"a",
"particular",
"Users",
"in",
"a",
"photo",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"permission",
"user_photos",
"permission",
"for",
"private",
"photos",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/Photo.php#L204-L220 |
189,593 | joomla/joomla-framework | src/Joomla/Archive/Zip.php | Zip.getFileData | private function getFileData($key)
{
if ($this->metadata[$key]['_method'] == 0x8)
{
return gzinflate(substr($this->data, $this->metadata[$key]['_dataStart'], $this->metadata[$key]['csize']));
}
elseif ($this->metadata[$key]['_method'] == 0x0)
{
/* Files that aren't compressed. */
return substr($this... | php | private function getFileData($key)
{
if ($this->metadata[$key]['_method'] == 0x8)
{
return gzinflate(substr($this->data, $this->metadata[$key]['_dataStart'], $this->metadata[$key]['csize']));
}
elseif ($this->metadata[$key]['_method'] == 0x0)
{
/* Files that aren't compressed. */
return substr($this... | [
"private",
"function",
"getFileData",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"metadata",
"[",
"$",
"key",
"]",
"[",
"'_method'",
"]",
"==",
"0x8",
")",
"{",
"return",
"gzinflate",
"(",
"substr",
"(",
"$",
"this",
"->",
"data",
","... | Returns the file data for a file by offsest in the ZIP archive
@param integer $key The position of the file in the archive.
@return string Uncompressed file data buffer.
@since 1.0 | [
"Returns",
"the",
"file",
"data",
"for",
"a",
"file",
"by",
"offsest",
"in",
"the",
"ZIP",
"archive"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Archive/Zip.php#L451-L472 |
189,594 | joomla/joomla-framework | src/Joomla/Github/Package/Orgs/Members.php | Members.getList | public function getList($org)
{
// Build the request path.
$path = '/orgs/' . $org . '/members';
$response = $this->client->get($this->fetchUrl($path));
switch ($response->code)
{
case 302 :
// Requester is not an organization member.
return false;
break;
case 200 :
return json_decod... | php | public function getList($org)
{
// Build the request path.
$path = '/orgs/' . $org . '/members';
$response = $this->client->get($this->fetchUrl($path));
switch ($response->code)
{
case 302 :
// Requester is not an organization member.
return false;
break;
case 200 :
return json_decod... | [
"public",
"function",
"getList",
"(",
"$",
"org",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/orgs/'",
".",
"$",
"org",
".",
"'/members'",
";",
"$",
"response",
"=",
"$",
"this",
"->",
"client",
"->",
"get",
"(",
"$",
"this",
"->",
"fe... | Members list.
List all users who are members of an organization.
A member is a user that belongs to at least 1 team in the organization.
If the authenticated user is also a member of this organization then
both concealed and public members will be returned.
If the requester is not a member of the organization the quer... | [
"Members",
"list",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Orgs/Members.php#L39-L61 |
189,595 | joomla/joomla-framework | src/Joomla/Twitter/Directmessages.php | Directmessages.getDirectMessagesById | public function getDirectMessagesById($id)
{
// Check the rate limit for remaining hits
$this->checkRateLimit('direct_messages', 'show');
// Set the API path
$path = '/direct_messages/show.json';
$data['id'] = $id;
// Send the request.
return $this->sendRequest($path, 'GET', $data);
} | php | public function getDirectMessagesById($id)
{
// Check the rate limit for remaining hits
$this->checkRateLimit('direct_messages', 'show');
// Set the API path
$path = '/direct_messages/show.json';
$data['id'] = $id;
// Send the request.
return $this->sendRequest($path, 'GET', $data);
} | [
"public",
"function",
"getDirectMessagesById",
"(",
"$",
"id",
")",
"{",
"// Check the rate limit for remaining hits",
"$",
"this",
"->",
"checkRateLimit",
"(",
"'direct_messages'",
",",
"'show'",
")",
";",
"// Set the API path",
"$",
"path",
"=",
"'/direct_messages/sho... | Method to get a single direct message, specified by an id parameter.
@param integer $id The ID of the direct message.
@return array The decoded JSON response
@since 1.0 | [
"Method",
"to",
"get",
"a",
"single",
"direct",
"message",
"specified",
"by",
"an",
"id",
"parameter",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Twitter/Directmessages.php#L180-L192 |
189,596 | joomla/joomla-framework | src/Joomla/Linkedin/Groups.php | Groups.createPost | public function createPost($group_id, $title, $summary)
{
$token = $this->oauth->getToken();
// Set parameters.
$parameters = array(
'oauth_token' => $token['key']
);
// Set the success response code.
$this->oauth->setOption('success_code', 201);
// Set the API base
$base = '/v1/groups/' . $group... | php | public function createPost($group_id, $title, $summary)
{
$token = $this->oauth->getToken();
// Set parameters.
$parameters = array(
'oauth_token' => $token['key']
);
// Set the success response code.
$this->oauth->setOption('success_code', 201);
// Set the API base
$base = '/v1/groups/' . $group... | [
"public",
"function",
"createPost",
"(",
"$",
"group_id",
",",
"$",
"title",
",",
"$",
"summary",
")",
"{",
"$",
"token",
"=",
"$",
"this",
"->",
"oauth",
"->",
"getToken",
"(",
")",
";",
"// Set parameters.",
"$",
"parameters",
"=",
"array",
"(",
"'oa... | Method to retrieve all comments of a post.
@param string $group_id The unique identifier for a group.
@param string $title Post title.
@param string $summary Post summary.
@return string The created post's id.
@since 1.0 | [
"Method",
"to",
"retrieve",
"all",
"comments",
"of",
"a",
"post",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Linkedin/Groups.php#L651-L681 |
189,597 | joomla/joomla-framework | src/Joomla/Linkedin/Groups.php | Groups.deletePost | public function deletePost($post_id)
{
$token = $this->oauth->getToken();
// Set parameters.
$parameters = array(
'oauth_token' => $token['key']
);
// Set the success response code.
$this->oauth->setOption('success_code', 204);
// Set the API base
$base = '/v1/posts/' . $post_id;
// Build the ... | php | public function deletePost($post_id)
{
$token = $this->oauth->getToken();
// Set parameters.
$parameters = array(
'oauth_token' => $token['key']
);
// Set the success response code.
$this->oauth->setOption('success_code', 204);
// Set the API base
$base = '/v1/posts/' . $post_id;
// Build the ... | [
"public",
"function",
"deletePost",
"(",
"$",
"post_id",
")",
"{",
"$",
"token",
"=",
"$",
"this",
"->",
"oauth",
"->",
"getToken",
"(",
")",
";",
"// Set parameters.",
"$",
"parameters",
"=",
"array",
"(",
"'oauth_token'",
"=>",
"$",
"token",
"[",
"'key... | Method to delete a post if the current user is the creator or flag it as inappropriate otherwise.
@param string $post_id The unique identifier for a group.
@return array The decoded JSON response
@since 1.0 | [
"Method",
"to",
"delete",
"a",
"post",
"if",
"the",
"current",
"user",
"is",
"the",
"creator",
"or",
"flag",
"it",
"as",
"inappropriate",
"otherwise",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Linkedin/Groups.php#L865-L887 |
189,598 | joomla/joomla-framework | src/Joomla/Github/Package/Repositories/Keys.php | Keys.create | public function create($owner, $repo, $title, $key)
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/keys';
$data = array(
'title' => $title,
'key' => $key
);
return $this->processResponse(
$this->client->post($this->fetchUrl($path), json_encode($data)),
201
);
} | php | public function create($owner, $repo, $title, $key)
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/keys';
$data = array(
'title' => $title,
'key' => $key
);
return $this->processResponse(
$this->client->post($this->fetchUrl($path), json_encode($data)),
201
);
} | [
"public",
"function",
"create",
"(",
"$",
"owner",
",",
"$",
"repo",
",",
"$",
"title",
",",
"$",
"key",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/repos/'",
".",
"$",
"owner",
".",
"'/'",
".",
"$",
"repo",
".",
"'/keys'",
";",
"$",... | Create a key.
@param string $owner The name of the owner of the GitHub repository.
@param string $repo The name of the GitHub repository.
@param string $title The key title.
@param string $key The key.
@since 1.0
@return object | [
"Create",
"a",
"key",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Repositories/Keys.php#L75-L89 |
189,599 | joomla/joomla-framework | src/Joomla/Github/Package/Repositories/Keys.php | Keys.edit | public function edit($owner, $repo, $id, $title, $key)
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/keys/' . (int) $id;
$data = array(
'title' => $title,
'key' => $key
);
return $this->processResponse(
$this->client->patch($this->fetchUrl($path), json_encode($data))
... | php | public function edit($owner, $repo, $id, $title, $key)
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/keys/' . (int) $id;
$data = array(
'title' => $title,
'key' => $key
);
return $this->processResponse(
$this->client->patch($this->fetchUrl($path), json_encode($data))
... | [
"public",
"function",
"edit",
"(",
"$",
"owner",
",",
"$",
"repo",
",",
"$",
"id",
",",
"$",
"title",
",",
"$",
"key",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/repos/'",
".",
"$",
"owner",
".",
"'/'",
".",
"$",
"repo",
".",
"'/k... | Edit a key.
@param string $owner The name of the owner of the GitHub repository.
@param string $repo The name of the GitHub repository.
@param integer $id The id of the key.
@param string $title The key title.
@param string $key The key.
@since 1.0
@return object | [
"Edit",
"a",
"key",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Repositories/Keys.php#L104-L117 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.