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,700 | joomla/joomla-framework | src/Joomla/Ldap/LdapClient.php | LdapClient.remove | public function remove($dn, $attribute)
{
$resource = $this->resource;
return @ldap_mod_del($resource, $dn, $attribute);
} | php | public function remove($dn, $attribute)
{
$resource = $this->resource;
return @ldap_mod_del($resource, $dn, $attribute);
} | [
"public",
"function",
"remove",
"(",
"$",
"dn",
",",
"$",
"attribute",
")",
"{",
"$",
"resource",
"=",
"$",
"this",
"->",
"resource",
";",
"return",
"@",
"ldap_mod_del",
"(",
"$",
"resource",
",",
"$",
"dn",
",",
"$",
"attribute",
")",
";",
"}"
] | Removes attribute value from given dn and return a true or false result
@param string $dn The DN which contains the attribute you want to remove
@param string $attribute The attribute values you want to remove
@return mixed result of comparison (true, false, -1 on error)
@since 1.0 | [
"Removes",
"attribute",
"value",
"from",
"given",
"dn",
"and",
"return",
"a",
"true",
"or",
"false",
"result"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Ldap/LdapClient.php#L398-L403 |
189,701 | joomla/joomla-framework | src/Joomla/Ldap/LdapClient.php | LdapClient.compare | public function compare($dn, $attribute, $value)
{
return @ldap_compare($this->resource, $dn, $attribute, $value);
} | php | public function compare($dn, $attribute, $value)
{
return @ldap_compare($this->resource, $dn, $attribute, $value);
} | [
"public",
"function",
"compare",
"(",
"$",
"dn",
",",
"$",
"attribute",
",",
"$",
"value",
")",
"{",
"return",
"@",
"ldap_compare",
"(",
"$",
"this",
"->",
"resource",
",",
"$",
"dn",
",",
"$",
"attribute",
",",
"$",
"value",
")",
";",
"}"
] | Compare an entry and return a true or false result
@param string $dn The DN which contains the attribute you want to compare
@param string $attribute The attribute whose value you want to compare
@param string $value The value you want to check against the LDAP attribute
@return mixed result ... | [
"Compare",
"an",
"entry",
"and",
"return",
"a",
"true",
"or",
"false",
"result"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Ldap/LdapClient.php#L416-L419 |
189,702 | joomla/joomla-framework | src/Joomla/Ldap/LdapClient.php | LdapClient.read | public function read($dn)
{
$base = substr($dn, strpos($dn, ',') + 1);
$cn = substr($dn, 0, strpos($dn, ','));
$result = @ldap_read($this->resource, $base, $cn);
if ($result)
{
return @ldap_get_entries($this->resource, $result);
}
else
{
return $result;
}
} | php | public function read($dn)
{
$base = substr($dn, strpos($dn, ',') + 1);
$cn = substr($dn, 0, strpos($dn, ','));
$result = @ldap_read($this->resource, $base, $cn);
if ($result)
{
return @ldap_get_entries($this->resource, $result);
}
else
{
return $result;
}
} | [
"public",
"function",
"read",
"(",
"$",
"dn",
")",
"{",
"$",
"base",
"=",
"substr",
"(",
"$",
"dn",
",",
"strpos",
"(",
"$",
"dn",
",",
"','",
")",
"+",
"1",
")",
";",
"$",
"cn",
"=",
"substr",
"(",
"$",
"dn",
",",
"0",
",",
"strpos",
"(",
... | Read all or specified attributes of given dn
@param string $dn The DN of the object you want to read
@return mixed array of attributes or -1 on error
@since 1.0 | [
"Read",
"all",
"or",
"specified",
"attributes",
"of",
"given",
"dn"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Ldap/LdapClient.php#L430-L444 |
189,703 | joomla/joomla-framework | src/Joomla/Ldap/LdapClient.php | LdapClient.rename | public function rename($dn, $newdn, $newparent, $deleteolddn)
{
return @ldap_rename($this->resource, $dn, $newdn, $newparent, $deleteolddn);
} | php | public function rename($dn, $newdn, $newparent, $deleteolddn)
{
return @ldap_rename($this->resource, $dn, $newdn, $newparent, $deleteolddn);
} | [
"public",
"function",
"rename",
"(",
"$",
"dn",
",",
"$",
"newdn",
",",
"$",
"newparent",
",",
"$",
"deleteolddn",
")",
"{",
"return",
"@",
"ldap_rename",
"(",
"$",
"this",
"->",
"resource",
",",
"$",
"dn",
",",
"$",
"newdn",
",",
"$",
"newparent",
... | Rename the entry
@param string $dn The DN of the entry at the moment
@param string $newdn The DN of the entry should be (only cn=newvalue)
@param string $newparent The full DN of the parent (null by default)
@param boolean $deleteolddn Delete the old values (default)
@return boole... | [
"Rename",
"the",
"entry"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Ldap/LdapClient.php#L503-L506 |
189,704 | joomla/joomla-framework | src/Joomla/Ldap/LdapClient.php | LdapClient.LDAPNetAddr | public static function LDAPNetAddr($networkaddress)
{
$addr = "";
$addrtype = (int) substr($networkaddress, 0, 1);
// Throw away bytes 0 and 1 which should be the addrtype and the "#" separator
$networkaddress = substr($networkaddress, 2);
if (($addrtype == 8) || ($addrtype = 9))
{
// TODO 1.6: If UDP... | php | public static function LDAPNetAddr($networkaddress)
{
$addr = "";
$addrtype = (int) substr($networkaddress, 0, 1);
// Throw away bytes 0 and 1 which should be the addrtype and the "#" separator
$networkaddress = substr($networkaddress, 2);
if (($addrtype == 8) || ($addrtype = 9))
{
// TODO 1.6: If UDP... | [
"public",
"static",
"function",
"LDAPNetAddr",
"(",
"$",
"networkaddress",
")",
"{",
"$",
"addr",
"=",
"\"\"",
";",
"$",
"addrtype",
"=",
"(",
"int",
")",
"substr",
"(",
"$",
"networkaddress",
",",
"0",
",",
"1",
")",
";",
"// Throw away bytes 0 and 1 whic... | Extract readable network address from the LDAP encoded networkAddress attribute.
Please keep this document block and author attribution in place.
Novell Docs, see: http://developer.novell.com/ndk/doc/ndslib/schm_enu/data/sdk5624.html#sdk5624
for Address types: http://developer.novell.com/ndk/doc/ndslib/index.html?pag... | [
"Extract",
"readable",
"network",
"address",
"from",
"the",
"LDAP",
"encoded",
"networkAddress",
"attribute",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Ldap/LdapClient.php#L573-L631 |
189,705 | joomla/joomla-framework | src/Joomla/Ldap/LdapClient.php | LdapClient.generatePassword | public static function generatePassword($password, $type = 'md5')
{
switch (strtolower($type))
{
case 'sha':
$userpassword = '{SHA}' . base64_encode(pack('H*', sha1($password)));
break;
case 'md5':
default:
$userpassword = '{MD5}' . base64_encode(pack('H*', md5($password)));
break;
}
... | php | public static function generatePassword($password, $type = 'md5')
{
switch (strtolower($type))
{
case 'sha':
$userpassword = '{SHA}' . base64_encode(pack('H*', sha1($password)));
break;
case 'md5':
default:
$userpassword = '{MD5}' . base64_encode(pack('H*', md5($password)));
break;
}
... | [
"public",
"static",
"function",
"generatePassword",
"(",
"$",
"password",
",",
"$",
"type",
"=",
"'md5'",
")",
"{",
"switch",
"(",
"strtolower",
"(",
"$",
"type",
")",
")",
"{",
"case",
"'sha'",
":",
"$",
"userpassword",
"=",
"'{SHA}'",
".",
"base64_enco... | Generates a LDAP compatible password
@param string $password Clear text password to encrypt
@param string $type Type of password hash, either md5 or SHA
@return string Encrypted password
@since 1.0 | [
"Generates",
"a",
"LDAP",
"compatible",
"password"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Ldap/LdapClient.php#L643-L658 |
189,706 | joomla/joomla-framework | src/Joomla/Database/Postgresql/PostgresqlImporter.php | PostgresqlImporter.getChangeSequenceSQL | protected function getChangeSequenceSQL(\SimpleXMLElement $field)
{
/* For older database version that doesn't support these fields use default values */
if (version_compare($this->db->getVersion(), '9.1.0') < 0)
{
$field['Min_Value'] = '1';
$field['Max_Value'] = '9223372036854775807';
$field['Increment... | php | protected function getChangeSequenceSQL(\SimpleXMLElement $field)
{
/* For older database version that doesn't support these fields use default values */
if (version_compare($this->db->getVersion(), '9.1.0') < 0)
{
$field['Min_Value'] = '1';
$field['Max_Value'] = '9223372036854775807';
$field['Increment... | [
"protected",
"function",
"getChangeSequenceSQL",
"(",
"\\",
"SimpleXMLElement",
"$",
"field",
")",
"{",
"/* For older database version that doesn't support these fields use default values */",
"if",
"(",
"version_compare",
"(",
"$",
"this",
"->",
"db",
"->",
"getVersion",
"... | Get the syntax to alter a sequence.
@param \SimpleXMLElement $field The XML definition for the sequence.
@return string
@since 1.0 | [
"Get",
"the",
"syntax",
"to",
"alter",
"a",
"sequence",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Database/Postgresql/PostgresqlImporter.php#L308-L326 |
189,707 | joomla/joomla-framework | src/Joomla/Github/Package/Repositories.php | Repositories.edit | public function edit($owner, $repo, $name, $description = '', $homepage = '', $private = false, $has_issues = false,
$has_wiki = false, $has_downloads = false, $default_branch = '')
{
$path = '/repos/' . $owner . '/' . $repo;
$data = array(
'name' => $name,
'description' => $description,
'... | php | public function edit($owner, $repo, $name, $description = '', $homepage = '', $private = false, $has_issues = false,
$has_wiki = false, $has_downloads = false, $default_branch = '')
{
$path = '/repos/' . $owner . '/' . $repo;
$data = array(
'name' => $name,
'description' => $description,
'... | [
"public",
"function",
"edit",
"(",
"$",
"owner",
",",
"$",
"repo",
",",
"$",
"name",
",",
"$",
"description",
"=",
"''",
",",
"$",
"homepage",
"=",
"''",
",",
"$",
"private",
"=",
"false",
",",
"$",
"has_issues",
"=",
"false",
",",
"$",
"has_wiki",... | Edit a repository.
@param string $owner Repository owner.
@param string $repo Repository name.
@param string $name The repository name.
@param string $description The repository description.
@param string $homepage The repository homepage.
@param boolean... | [
"Edit",
"a",
"repository",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Repositories.php#L277-L297 |
189,708 | joomla/joomla-framework | src/Joomla/Facebook/Checkin.php | Checkin.createComment | public function createComment($checkin, $message)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
return $this->createConnection($checkin, 'comments', $data);
} | php | public function createComment($checkin, $message)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
return $this->createConnection($checkin, 'comments', $data);
} | [
"public",
"function",
"createComment",
"(",
"$",
"checkin",
",",
"$",
"message",
")",
"{",
"// Set POST request parameters.",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"data",
"[",
"'message'",
"]",
"=",
"$",
"message",
";",
"return",
"$",
"this",
"... | Method to post a comment to the checkin. Requires authentication and publish_stream and user_checkins or friends_checkins permission.
@param string $checkin The checkin id.
@param string $message The checkin's text.
@return mixed The decoded JSON response or false if the client is not authenticated.
@sinc... | [
"Method",
"to",
"post",
"a",
"comment",
"to",
"the",
"checkin",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"and",
"user_checkins",
"or",
"friends_checkins",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/Checkin.php#L61-L68 |
189,709 | joomla/joomla-framework | src/Joomla/Application/Web/WebClient.php | WebClient.detectBrowser | protected function detectBrowser($userAgent)
{
// Attempt to detect the browser type. Obviously we are only worried about major browsers.
if ((stripos($userAgent, 'MSIE') !== false) && (stripos($userAgent, 'Opera') === false))
{
$this->browser = self::IE;
$patternBrowser = 'MSIE';
}
elseif ((stripos($... | php | protected function detectBrowser($userAgent)
{
// Attempt to detect the browser type. Obviously we are only worried about major browsers.
if ((stripos($userAgent, 'MSIE') !== false) && (stripos($userAgent, 'Opera') === false))
{
$this->browser = self::IE;
$patternBrowser = 'MSIE';
}
elseif ((stripos($... | [
"protected",
"function",
"detectBrowser",
"(",
"$",
"userAgent",
")",
"{",
"// Attempt to detect the browser type. Obviously we are only worried about major browsers.",
"if",
"(",
"(",
"stripos",
"(",
"$",
"userAgent",
",",
"'MSIE'",
")",
"!==",
"false",
")",
"&&",
"("... | Detects the client browser and version in a user agent string.
@param string $userAgent The user-agent string to parse.
@return void
@since 1.0 | [
"Detects",
"the",
"client",
"browser",
"and",
"version",
"in",
"a",
"user",
"agent",
"string",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Application/Web/WebClient.php#L243-L315 |
189,710 | joomla/joomla-framework | src/Joomla/Database/DatabaseFactory.php | DatabaseFactory.getDriver | public function getDriver($name = 'mysqli', $options = array())
{
// Sanitize the database connector options.
$options['driver'] = preg_replace('/[^A-Z0-9_\.-]/i', '', $name);
$options['database'] = (isset($options['database'])) ? $options['database'] : null;
$options['select'] = (isset($options['select'])... | php | public function getDriver($name = 'mysqli', $options = array())
{
// Sanitize the database connector options.
$options['driver'] = preg_replace('/[^A-Z0-9_\.-]/i', '', $name);
$options['database'] = (isset($options['database'])) ? $options['database'] : null;
$options['select'] = (isset($options['select'])... | [
"public",
"function",
"getDriver",
"(",
"$",
"name",
"=",
"'mysqli'",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"// Sanitize the database connector options.",
"$",
"options",
"[",
"'driver'",
"]",
"=",
"preg_replace",
"(",
"'/[^A-Z0-9_\\.-]/i'",
","... | Method to return a Driver instance based on the given options. There are three global options and then
the rest are specific to the database driver. The 'database' option determines which database is to
be used for the connection. The 'select' option determines whether the connector should automatically select
the chos... | [
"Method",
"to",
"return",
"a",
"Driver",
"instance",
"based",
"on",
"the",
"given",
"options",
".",
"There",
"are",
"three",
"global",
"options",
"and",
"then",
"the",
"rest",
"are",
"specific",
"to",
"the",
"database",
"driver",
".",
"The",
"database",
"o... | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Database/DatabaseFactory.php#L43-L70 |
189,711 | joomla/joomla-framework | src/Joomla/Github/Package/Activity/Watching.php | Watching.setSubscription | public function setSubscription($owner, $repo, $subscribed, $ignored)
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/subscription';
$data = array(
'subscribed' => $subscribed,
'ignored' => $ignored
);
return $this->processResponse(
$this->client->put($this->fetchUrl($... | php | public function setSubscription($owner, $repo, $subscribed, $ignored)
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/subscription';
$data = array(
'subscribed' => $subscribed,
'ignored' => $ignored
);
return $this->processResponse(
$this->client->put($this->fetchUrl($... | [
"public",
"function",
"setSubscription",
"(",
"$",
"owner",
",",
"$",
"repo",
",",
"$",
"subscribed",
",",
"$",
"ignored",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/repos/'",
".",
"$",
"owner",
".",
"'/'",
".",
"$",
"repo",
".",
"'/sub... | Set a Repository Subscription.
@param string $owner Repository owner.
@param string $repo Repository name.
@param boolean $subscribed Determines if notifications should be received from this thread.
@param boolean $ignored Determines if all notifications should be blocked from this thre... | [
"Set",
"a",
"Repository",
"Subscription",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Activity/Watching.php#L97-L110 |
189,712 | joomla/joomla-framework | src/Joomla/Http/Transport/Socket.php | Socket.connect | protected function connect(UriInterface $uri, $timeout = null)
{
$errno = null;
$err = null;
// Get the host from the uri.
$host = ($uri->isSSL()) ? 'ssl://' . $uri->getHost() : $uri->getHost();
// If the port is not explicitly set in the URI detect it.
if (!$uri->getPort())
{
$port = ($uri->getSche... | php | protected function connect(UriInterface $uri, $timeout = null)
{
$errno = null;
$err = null;
// Get the host from the uri.
$host = ($uri->isSSL()) ? 'ssl://' . $uri->getHost() : $uri->getHost();
// If the port is not explicitly set in the URI detect it.
if (!$uri->getPort())
{
$port = ($uri->getSche... | [
"protected",
"function",
"connect",
"(",
"UriInterface",
"$",
"uri",
",",
"$",
"timeout",
"=",
"null",
")",
"{",
"$",
"errno",
"=",
"null",
";",
"$",
"err",
"=",
"null",
";",
"// Get the host from the uri.",
"$",
"host",
"=",
"(",
"$",
"uri",
"->",
"is... | Method to connect to a server and get the resource.
@param UriInterface $uri The URI to connect with.
@param integer $timeout Read timeout in seconds.
@return resource Socket connection resource.
@since 1.0
@throws \RuntimeException | [
"Method",
"to",
"connect",
"to",
"a",
"server",
"and",
"get",
"the",
"resource",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Http/Transport/Socket.php#L213-L298 |
189,713 | joomla/joomla-framework | src/Joomla/Crypt/Password/Simple.php | Simple.verify | public function verify($password, $hash)
{
// Check if the hash is a blowfish hash.
if (substr($hash, 0, 4) == '$2a$' || substr($hash, 0, 4) == '$2y$')
{
if (version_compare(PHP_VERSION, '5.3.7') >= 0)
{
$type = '$2y$';
}
else
{
$type = '$2a$';
}
$hash = $type . substr($hash, 4);
... | php | public function verify($password, $hash)
{
// Check if the hash is a blowfish hash.
if (substr($hash, 0, 4) == '$2a$' || substr($hash, 0, 4) == '$2y$')
{
if (version_compare(PHP_VERSION, '5.3.7') >= 0)
{
$type = '$2y$';
}
else
{
$type = '$2a$';
}
$hash = $type . substr($hash, 4);
... | [
"public",
"function",
"verify",
"(",
"$",
"password",
",",
"$",
"hash",
")",
"{",
"// Check if the hash is a blowfish hash.",
"if",
"(",
"substr",
"(",
"$",
"hash",
",",
"0",
",",
"4",
")",
"==",
"'$2a$'",
"||",
"substr",
"(",
"$",
"hash",
",",
"0",
",... | Verifies a password hash
@param string $password The password to verify.
@param string $hash The password hash to check.
@return boolean True if the password is valid, false otherwise.
@since 1.0 | [
"Verifies",
"a",
"password",
"hash"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Crypt/Password/Simple.php#L119-L151 |
189,714 | joomla/joomla-framework | src/Joomla/Github/Package/Markdown.php | Markdown.render | public function render($text, $mode = 'gfm', $context = null)
{
// The valid modes
$validModes = array('gfm', 'markdown');
// Make sure the scope is valid
if (!in_array($mode, $validModes))
{
throw new \InvalidArgumentException(sprintf('The %s mode is not valid. Valid modes are "gfm" or "markdown".', $mo... | php | public function render($text, $mode = 'gfm', $context = null)
{
// The valid modes
$validModes = array('gfm', 'markdown');
// Make sure the scope is valid
if (!in_array($mode, $validModes))
{
throw new \InvalidArgumentException(sprintf('The %s mode is not valid. Valid modes are "gfm" or "markdown".', $mo... | [
"public",
"function",
"render",
"(",
"$",
"text",
",",
"$",
"mode",
"=",
"'gfm'",
",",
"$",
"context",
"=",
"null",
")",
"{",
"// The valid modes",
"$",
"validModes",
"=",
"array",
"(",
"'gfm'",
",",
"'markdown'",
")",
";",
"// Make sure the scope is valid",... | Method to render a markdown document.
@param string $text The text object being parsed.
@param string $mode The parsing mode; valid options are 'markdown' or 'gfm'.
@param string $context An optional repository context, only used in 'gfm' mode.
@return string Formatted HTML
@since 1.0
@throws ... | [
"Method",
"to",
"render",
"a",
"markdown",
"document",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Markdown.php#L35-L72 |
189,715 | joomla/joomla-framework | src/Joomla/Database/Pdo/PdoIterator.php | PdoIterator.count | public function count()
{
if (!empty($this->cursor) && $this->cursor instanceof \PDOStatement)
{
return $this->cursor->rowCount();
}
else
{
return 0;
}
} | php | public function count()
{
if (!empty($this->cursor) && $this->cursor instanceof \PDOStatement)
{
return $this->cursor->rowCount();
}
else
{
return 0;
}
} | [
"public",
"function",
"count",
"(",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"cursor",
")",
"&&",
"$",
"this",
"->",
"cursor",
"instanceof",
"\\",
"PDOStatement",
")",
"{",
"return",
"$",
"this",
"->",
"cursor",
"->",
"rowCount",
"(... | Get the number of rows in the result set for the executed SQL given by the cursor.
@return integer The number of rows in the result set.
@since 1.0
@see Countable::count() | [
"Get",
"the",
"number",
"of",
"rows",
"in",
"the",
"result",
"set",
"for",
"the",
"executed",
"SQL",
"given",
"by",
"the",
"cursor",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Database/Pdo/PdoIterator.php#L28-L38 |
189,716 | joomla/joomla-framework | src/Joomla/Filesystem/Patcher.php | Patcher.add | public function add($udiff, $root = JPATH_ROOT, $strip = 0)
{
$this->patches[] = array(
'udiff' => $udiff,
'root' => isset($root) ? rtrim($root, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR : '',
'strip' => $strip
);
return $this;
} | php | public function add($udiff, $root = JPATH_ROOT, $strip = 0)
{
$this->patches[] = array(
'udiff' => $udiff,
'root' => isset($root) ? rtrim($root, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR : '',
'strip' => $strip
);
return $this;
} | [
"public",
"function",
"add",
"(",
"$",
"udiff",
",",
"$",
"root",
"=",
"JPATH_ROOT",
",",
"$",
"strip",
"=",
"0",
")",
"{",
"$",
"this",
"->",
"patches",
"[",
"]",
"=",
"array",
"(",
"'udiff'",
"=>",
"$",
"udiff",
",",
"'root'",
"=>",
"isset",
"(... | Add a unified diff string to the patcher
@param string $udiff Unified diff input string
@param string $root The files root path
@param integer $strip The number of '/' to strip
@return Patcher $this for chaining
@since 1.0 | [
"Add",
"a",
"unified",
"diff",
"string",
"to",
"the",
"patcher"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Filesystem/Patcher.php#L234-L243 |
189,717 | joomla/joomla-framework | src/Joomla/Filesystem/Patcher.php | Patcher.findHeader | protected static function findHeader(&$lines, &$src, &$dst)
{
// Get the current line
$line = current($lines);
// Search for the header
while ($line !== false && !preg_match(self::SRC_FILE, $line, $m))
{
$line = next($lines);
}
if ($line === false)
{
// No header found, return false
return f... | php | protected static function findHeader(&$lines, &$src, &$dst)
{
// Get the current line
$line = current($lines);
// Search for the header
while ($line !== false && !preg_match(self::SRC_FILE, $line, $m))
{
$line = next($lines);
}
if ($line === false)
{
// No header found, return false
return f... | [
"protected",
"static",
"function",
"findHeader",
"(",
"&",
"$",
"lines",
",",
"&",
"$",
"src",
",",
"&",
"$",
"dst",
")",
"{",
"// Get the current line",
"$",
"line",
"=",
"current",
"(",
"$",
"lines",
")",
";",
"// Search for the header",
"while",
"(",
... | Find the diff header
The internal array pointer of $lines is on the next line after the finding
@param array &$lines The udiff array of lines
@param string &$src The source file
@param string &$dst The destination file
@return boolean TRUE in case of success, FALSE in case of failure
@since 1.0... | [
"Find",
"the",
"diff",
"header"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Filesystem/Patcher.php#L273-L319 |
189,718 | joomla/joomla-framework | src/Joomla/Google/Data/Picasa/Album.php | Album.listPhotos | public function listPhotos()
{
if ($this->isAuthenticated())
{
$url = $this->getLink('http://schemas.google.com/g/2005#feed');
$jdata = $this->query($url, null, array('GData-Version' => 2));
$xml = $this->safeXML($jdata->body);
if (isset($xml->children()->entry))
{
$items = array();
foreac... | php | public function listPhotos()
{
if ($this->isAuthenticated())
{
$url = $this->getLink('http://schemas.google.com/g/2005#feed');
$jdata = $this->query($url, null, array('GData-Version' => 2));
$xml = $this->safeXML($jdata->body);
if (isset($xml->children()->entry))
{
$items = array();
foreac... | [
"public",
"function",
"listPhotos",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isAuthenticated",
"(",
")",
")",
"{",
"$",
"url",
"=",
"$",
"this",
"->",
"getLink",
"(",
"'http://schemas.google.com/g/2005#feed'",
")",
";",
"$",
"jdata",
"=",
"$",
"this... | Method to retrieve a list of Picasa Photos
@return mixed Data from Google
@since 1.0
@throws \UnexpectedValueException | [
"Method",
"to",
"retrieve",
"a",
"list",
"of",
"Picasa",
"Photos"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Google/Data/Picasa/Album.php#L345-L373 |
189,719 | joomla/joomla-framework | src/Joomla/Github/Package/Activity/Events.php | Events.getPublic | public function getPublic()
{
// Build the request path.
$path = '/events';
return $this->processResponse(
$this->client->get($this->fetchUrl($path))
);
} | php | public function getPublic()
{
// Build the request path.
$path = '/events';
return $this->processResponse(
$this->client->get($this->fetchUrl($path))
);
} | [
"public",
"function",
"getPublic",
"(",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/events'",
";",
"return",
"$",
"this",
"->",
"processResponse",
"(",
"$",
"this",
"->",
"client",
"->",
"get",
"(",
"$",
"this",
"->",
"fetchUrl",
"(",
"$",... | List public events.
@return object
@since 1.0 | [
"List",
"public",
"events",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Activity/Events.php#L29-L37 |
189,720 | joomla/joomla-framework | src/Joomla/Github/Package/Activity/Events.php | Events.getUserOrg | public function getUserOrg($user, $org)
{
// Build the request path.
$path = '/users/' . $user . '/events/orgs/' . $org;
return $this->processResponse(
$this->client->get($this->fetchUrl($path))
);
} | php | public function getUserOrg($user, $org)
{
// Build the request path.
$path = '/users/' . $user . '/events/orgs/' . $org;
return $this->processResponse(
$this->client->get($this->fetchUrl($path))
);
} | [
"public",
"function",
"getUserOrg",
"(",
"$",
"user",
",",
"$",
"org",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/users/'",
".",
"$",
"user",
".",
"'/events/orgs/'",
".",
"$",
"org",
";",
"return",
"$",
"this",
"->",
"processResponse",
"(... | List events for an organization.
This is the user’s organization dashboard.
You must be authenticated as the user to view this.
@param string $user User name.
@param string $org Organisation.
@return object
@since 1.0 | [
"List",
"events",
"for",
"an",
"organization",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Activity/Events.php#L214-L222 |
189,721 | joomla/joomla-framework | src/Joomla/Github/Package/Users.php | Users.getAuthenticatedUser | public function getAuthenticatedUser()
{
// Build the request path.
$path = '/user';
// Send the request.
return $this->processResponse(
$this->client->get($this->fetchUrl($path))
);
} | php | public function getAuthenticatedUser()
{
// Build the request path.
$path = '/user';
// Send the request.
return $this->processResponse(
$this->client->get($this->fetchUrl($path))
);
} | [
"public",
"function",
"getAuthenticatedUser",
"(",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/user'",
";",
"// Send the request.",
"return",
"$",
"this",
"->",
"processResponse",
"(",
"$",
"this",
"->",
"client",
"->",
"get",
"(",
"$",
"this",
... | Get the current authenticated user.
@return mixed
@since 1.0
@throws \DomainException | [
"Get",
"the",
"current",
"authenticated",
"user",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Users.php#L51-L60 |
189,722 | joomla/joomla-framework | src/Joomla/Facebook/Event.php | Event.createLink | public function createLink($event, $link, $message = null)
{
// Set POST request parameters.
$data = array();
$data['link'] = $link;
$data['message'] = $message;
return $this->createConnection($event, 'feed', $data);
} | php | public function createLink($event, $link, $message = null)
{
// Set POST request parameters.
$data = array();
$data['link'] = $link;
$data['message'] = $message;
return $this->createConnection($event, 'feed', $data);
} | [
"public",
"function",
"createLink",
"(",
"$",
"event",
",",
"$",
"link",
",",
"$",
"message",
"=",
"null",
")",
"{",
"// Set POST request parameters.",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"data",
"[",
"'link'",
"]",
"=",
"$",
"link",
";",
... | Method to post a link on event's feed which the current_user is or maybe attending. Requires authentication and publish_stream permission.
@param string $event The event id.
@param string $link Link URL.
@param string $message Link message.
@return mixed The decoded JSON response or false if the c... | [
"Method",
"to",
"post",
"a",
"link",
"on",
"event",
"s",
"feed",
"which",
"the",
"current_user",
"is",
"or",
"maybe",
"attending",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/Event.php#L62-L70 |
189,723 | joomla/joomla-framework | src/Joomla/Facebook/Event.php | Event.createStatus | public function createStatus($event, $message)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
return $this->createConnection($event, 'feed', $data);
} | php | public function createStatus($event, $message)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
return $this->createConnection($event, 'feed', $data);
} | [
"public",
"function",
"createStatus",
"(",
"$",
"event",
",",
"$",
"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 event's wall. Requires authentication and publish_stream permission.
@param string $event The event 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",
"event",
"s",
"wall",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/Event.php#L143-L150 |
189,724 | joomla/joomla-framework | src/Joomla/Facebook/Event.php | Event.createInvite | public function createInvite($event, $users)
{
// Set POST request parameters.
$data = array();
$data['users'] = $users;
return $this->createConnection($event, 'invited', $data);
} | php | public function createInvite($event, $users)
{
// Set POST request parameters.
$data = array();
$data['users'] = $users;
return $this->createConnection($event, 'invited', $data);
} | [
"public",
"function",
"createInvite",
"(",
"$",
"event",
",",
"$",
"users",
")",
"{",
"// Set POST request parameters.",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"data",
"[",
"'users'",
"]",
"=",
"$",
"users",
";",
"return",
"$",
"this",
"->",
"c... | Method to invite users to the event. Requires authentication and create_event permission.
@param string $event The event id.
@param string $users Comma separated list of user ids.
@return boolean Returns true if successful, and false otherwise.
@since 1.0 | [
"Method",
"to",
"invite",
"users",
"to",
"the",
"event",
".",
"Requires",
"authentication",
"and",
"create_event",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/Event.php#L208-L215 |
189,725 | joomla/joomla-framework | src/Joomla/Facebook/Event.php | Event.createPhoto | public function createPhoto($event, $source, $message = null)
{
// Set POST request parameters.
$data = array();
$data[basename($source)] = '@' . realpath($source);
if ($message)
{
$data['message'] = $message;
}
return $this->createConnection($event, 'photos', $data, array('Content-Type' => 'multipa... | php | public function createPhoto($event, $source, $message = null)
{
// Set POST request parameters.
$data = array();
$data[basename($source)] = '@' . realpath($source);
if ($message)
{
$data['message'] = $message;
}
return $this->createConnection($event, 'photos', $data, array('Content-Type' => 'multipa... | [
"public",
"function",
"createPhoto",
"(",
"$",
"event",
",",
"$",
"source",
",",
"$",
"message",
"=",
"null",
")",
"{",
"// Set POST request parameters.",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"data",
"[",
"basename",
"(",
"$",
"source",
")",
... | Method to post a photo on event's wall. Requires authentication and publish_stream permission.
@param string $event The event id.
@param string $source Path to photo.
@param string $message Photo description.
@return mixed The decoded JSON response or false if the client is not authenticated.
@sinc... | [
"Method",
"to",
"post",
"a",
"photo",
"on",
"event",
"s",
"wall",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/Event.php#L456-L468 |
189,726 | joomla/joomla-framework | src/Joomla/Facebook/Event.php | Event.createVideo | public function createVideo($event, $source, $title = null, $description = null)
{
// Set POST request parameters.
$data = array();
$data[basename($source)] = '@' . realpath($source);
if ($title)
{
$data['title'] = $title;
}
if ($description)
{
$data['description'] = $description;
}
return... | php | public function createVideo($event, $source, $title = null, $description = null)
{
// Set POST request parameters.
$data = array();
$data[basename($source)] = '@' . realpath($source);
if ($title)
{
$data['title'] = $title;
}
if ($description)
{
$data['description'] = $description;
}
return... | [
"public",
"function",
"createVideo",
"(",
"$",
"event",
",",
"$",
"source",
",",
"$",
"title",
"=",
"null",
",",
"$",
"description",
"=",
"null",
")",
"{",
"// Set POST request parameters.",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"data",
"[",
"... | Method to post a video on event's wall. Requires authentication and publish_stream permission.
@param string $event The event id.
@param string $source Path to photo.
@param string $title Video title.
@param string $description Video description.
@return mixed The decoded JSON resp... | [
"Method",
"to",
"post",
"a",
"video",
"on",
"event",
"s",
"wall",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/Event.php#L500-L517 |
189,727 | joomla/joomla-framework | src/Joomla/Google/Data/Plus/People.php | People.getPeople | public function getPeople($id, $fields = null)
{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'people/' . $id;
// Check if fields is specified.
if ($fields)
{
$url .= '?fields=' . $fields;
}
$jdata = $this->auth->query($url);
return json_decode($jdata->body, true... | php | public function getPeople($id, $fields = null)
{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'people/' . $id;
// Check if fields is specified.
if ($fields)
{
$url .= '?fields=' . $fields;
}
$jdata = $this->auth->query($url);
return json_decode($jdata->body, true... | [
"public",
"function",
"getPeople",
"(",
"$",
"id",
",",
"$",
"fields",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isAuthenticated",
"(",
")",
")",
"{",
"$",
"url",
"=",
"$",
"this",
"->",
"getOption",
"(",
"'api.url'",
")",
".",
"'people... | Get a person's profile.
@param string $id The ID of the person to get the profile for. The special value "me" can be used to indicate the authenticated user.
@param string $fields Used to specify the fields you want returned.
@return mixed Data from Google
@since 1.0 | [
"Get",
"a",
"person",
"s",
"profile",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Google/Data/Plus/People.php#L50-L70 |
189,728 | joomla/joomla-framework | src/Joomla/Google/Data/Plus/People.php | People.search | public function search($query, $fields = null, $language = null, $max = 10, $token = null)
{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'people?query=' . urlencode($query);
// Check if fields is specified.
if ($fields)
{
$url .= '&fields=' . $fields;
}
// Check if ... | php | public function search($query, $fields = null, $language = null, $max = 10, $token = null)
{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'people?query=' . urlencode($query);
// Check if fields is specified.
if ($fields)
{
$url .= '&fields=' . $fields;
}
// Check if ... | [
"public",
"function",
"search",
"(",
"$",
"query",
",",
"$",
"fields",
"=",
"null",
",",
"$",
"language",
"=",
"null",
",",
"$",
"max",
"=",
"10",
",",
"$",
"token",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isAuthenticated",
"(",
")"... | Search all public profiles.
@param string $query Specify a query string for full text search of public text in all profiles.
@param string $fields Used to specify the fields you want returned.
@param string $language Specify the preferred language to search with. https://developers.google.com/+/api... | [
"Search",
"all",
"public",
"profiles",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Google/Data/Plus/People.php#L86-L124 |
189,729 | joomla/joomla-framework | src/Joomla/Google/Data/Plus/People.php | People.listByActivity | public function listByActivity($activityId, $collection, $fields = null, $max = 10, $token = null)
{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'activities/' . $activityId . '/people/' . $collection;
// Check if fields is specified.
if ($fields)
{
$url .= '?fields=' . $fi... | php | public function listByActivity($activityId, $collection, $fields = null, $max = 10, $token = null)
{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'activities/' . $activityId . '/people/' . $collection;
// Check if fields is specified.
if ($fields)
{
$url .= '?fields=' . $fi... | [
"public",
"function",
"listByActivity",
"(",
"$",
"activityId",
",",
"$",
"collection",
",",
"$",
"fields",
"=",
"null",
",",
"$",
"max",
"=",
"10",
",",
"$",
"token",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isAuthenticated",
"(",
")",
... | List all of the people in the specified collection for a particular activity.
@param string $activityId The ID of the activity to get the list of people for.
@param string $collection The collection of people to list. Acceptable values are "plusoners" and "resharers".
@param string $fields Used to s... | [
"List",
"all",
"of",
"the",
"people",
"in",
"the",
"specified",
"collection",
"for",
"a",
"particular",
"activity",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Google/Data/Plus/People.php#L140-L174 |
189,730 | joomla/joomla-framework | src/Joomla/Github/Package/Issues/Milestones.php | Milestones.create | public function create($user, $repo, $title, $state = null, $description = null, $due_on = null)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/milestones';
// Build the request data.
$data = array(
'title' => $title
);
if (!is_null($state))
{
$data['state'] = $state;
... | php | public function create($user, $repo, $title, $state = null, $description = null, $due_on = null)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/milestones';
// Build the request data.
$data = array(
'title' => $title
);
if (!is_null($state))
{
$data['state'] = $state;
... | [
"public",
"function",
"create",
"(",
"$",
"user",
",",
"$",
"repo",
",",
"$",
"title",
",",
"$",
"state",
"=",
"null",
",",
"$",
"description",
"=",
"null",
",",
"$",
"due_on",
"=",
"null",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'... | Method to create a milestone for a repository.
@param string $user The name of the owner of the GitHub repository.
@param string $repo The name of the GitHub repository.
@param integer $title The title of the milestone.
@param string $state Can be open (default) or closed.
... | [
"Method",
"to",
"create",
"a",
"milestone",
"for",
"a",
"repository",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Issues/Milestones.php#L107-L146 |
189,731 | joomla/joomla-framework | src/Joomla/Github/Package/Issues/Milestones.php | Milestones.edit | public function edit($user, $repo, $milestoneId, $title = null, $state = null, $description = null, $due_on = null)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/milestones/' . (int) $milestoneId;
// Build the request data.
$data = array();
if (!is_null($title))
{
$data['tit... | php | public function edit($user, $repo, $milestoneId, $title = null, $state = null, $description = null, $due_on = null)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/milestones/' . (int) $milestoneId;
// Build the request data.
$data = array();
if (!is_null($title))
{
$data['tit... | [
"public",
"function",
"edit",
"(",
"$",
"user",
",",
"$",
"repo",
",",
"$",
"milestoneId",
",",
"$",
"title",
"=",
"null",
",",
"$",
"state",
"=",
"null",
",",
"$",
"description",
"=",
"null",
",",
"$",
"due_on",
"=",
"null",
")",
"{",
"// Build th... | Method to update a milestone.
@param string $user The name of the owner of the GitHub repository.
@param string $repo The name of the GitHub repository.
@param integer $milestoneId The id of the comment to update.
@param integer $title Optional title of the milestone.
@param str... | [
"Method",
"to",
"update",
"a",
"milestone",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Issues/Milestones.php#L164-L206 |
189,732 | joomla/joomla-framework | src/Joomla/Github/Package/Issues/Milestones.php | Milestones.delete | public function delete($user, $repo, $milestoneId)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/milestones/' . (int) $milestoneId;
// Send the request.
$response = $this->client->delete($this->fetchUrl($path));
// Validate the response code.
if ($response->code != 204)
{
... | php | public function delete($user, $repo, $milestoneId)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/milestones/' . (int) $milestoneId;
// Send the request.
$response = $this->client->delete($this->fetchUrl($path));
// Validate the response code.
if ($response->code != 204)
{
... | [
"public",
"function",
"delete",
"(",
"$",
"user",
",",
"$",
"repo",
",",
"$",
"milestoneId",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/repos/'",
".",
"$",
"user",
".",
"'/'",
".",
"$",
"repo",
".",
"'/milestones/'",
".",
"(",
"int",
... | Method to delete a milestone.
@param string $user The name of the owner of the GitHub repository.
@param string $repo The name of the GitHub repository.
@param integer $milestoneId The id of the milestone to delete.
@throws \DomainException
@return void
@since 1.0 | [
"Method",
"to",
"delete",
"a",
"milestone",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Issues/Milestones.php#L220-L235 |
189,733 | joomla/joomla-framework | src/Joomla/Archive/Archive.php | Archive.getAdapter | public function getAdapter($type)
{
$type = strtolower($type);
if (!isset($this->adapters[$type]))
{
// Try to load the adapter object
/* @var ExtractableInterface $class */
$class = 'Joomla\\Archive\\' . ucfirst($type);
if (!class_exists($class) || !$class::isSupported())
{
throw new \Inv... | php | public function getAdapter($type)
{
$type = strtolower($type);
if (!isset($this->adapters[$type]))
{
// Try to load the adapter object
/* @var ExtractableInterface $class */
$class = 'Joomla\\Archive\\' . ucfirst($type);
if (!class_exists($class) || !$class::isSupported())
{
throw new \Inv... | [
"public",
"function",
"getAdapter",
"(",
"$",
"type",
")",
"{",
"$",
"type",
"=",
"strtolower",
"(",
"$",
"type",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"adapters",
"[",
"$",
"type",
"]",
")",
")",
"{",
"// Try to load the adapter... | Get a file compression adapter.
@param string $type The type of adapter (bzip2|gzip|tar|zip).
@return ExtractableInterface Adapter for the requested type
@since 1.0
@throws \InvalidArgumentException | [
"Get",
"a",
"file",
"compression",
"adapter",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Archive/Archive.php#L190-L215 |
189,734 | joomla/joomla-framework | src/Joomla/Github/Package/Data/Commits.php | Commits.create | public function create($owner, $repo, $message, $tree, array $parents = array())
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/git/commits';
$data = json_encode(
array('message' => $message, 'tree' => $tree, 'parents' => $parents)
);
// Send the request.
return $this->proce... | php | public function create($owner, $repo, $message, $tree, array $parents = array())
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/git/commits';
$data = json_encode(
array('message' => $message, 'tree' => $tree, 'parents' => $parents)
);
// Send the request.
return $this->proce... | [
"public",
"function",
"create",
"(",
"$",
"owner",
",",
"$",
"repo",
",",
"$",
"message",
",",
"$",
"tree",
",",
"array",
"$",
"parents",
"=",
"array",
"(",
")",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/repos/'",
".",
"$",
"owner",
... | Method to create a commit.
@param string $owner The name of the owner of the GitHub repository.
@param string $repo The name of the GitHub repository.
@param string $message The commit message.
@param string $tree SHA of the tree object this commit points to.
@param array $parents Array of... | [
"Method",
"to",
"create",
"a",
"commit",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Data/Commits.php#L57-L71 |
189,735 | joomla/joomla-framework | src/Joomla/Facebook/Link.php | Link.createComment | public function createComment($link, $message)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
return $this->createConnection($link, 'comments', $data);
} | php | public function createComment($link, $message)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
return $this->createConnection($link, 'comments', $data);
} | [
"public",
"function",
"createComment",
"(",
"$",
"link",
",",
"$",
"message",
")",
"{",
"// Set POST request parameters.",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"data",
"[",
"'message'",
"]",
"=",
"$",
"message",
";",
"return",
"$",
"this",
"->"... | Method to comment on a link. Requires authentication and publish_stream permission.
@param string $link The link id.
@param string $message The comment's text.
@return mixed The decoded JSON response or false if the client is not authenticated.
@since 1.0 | [
"Method",
"to",
"comment",
"on",
"a",
"link",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"permission",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/Link.php#L61-L68 |
189,736 | joomla/joomla-framework | src/Joomla/Twitter/Places.php | Places.getGeocode | public function getGeocode($lat, $long, $accuracy = null, $granularity = null, $max_results = 0, $callback = null)
{
// Check the rate limit for remaining hits
$this->checkRateLimit('geo', 'reverse_geocode');
// Set the API path
$path = '/geo/reverse_geocode.json';
// Set the request parameters
$data['la... | php | public function getGeocode($lat, $long, $accuracy = null, $granularity = null, $max_results = 0, $callback = null)
{
// Check the rate limit for remaining hits
$this->checkRateLimit('geo', 'reverse_geocode');
// Set the API path
$path = '/geo/reverse_geocode.json';
// Set the request parameters
$data['la... | [
"public",
"function",
"getGeocode",
"(",
"$",
"lat",
",",
"$",
"long",
",",
"$",
"accuracy",
"=",
"null",
",",
"$",
"granularity",
"=",
"null",
",",
"$",
"max_results",
"=",
"0",
",",
"$",
"callback",
"=",
"null",
")",
"{",
"// Check the rate limit for r... | Method to get up to 20 places that can be used as a place_id when updating a status.
@param float $lat The latitude to search around.
@param float $long The longitude to search around.
@param string $accuracy A hint on the "region" in which to search. If a number, then this is a radi... | [
"Method",
"to",
"get",
"up",
"to",
"20",
"places",
"that",
"can",
"be",
"used",
"as",
"a",
"place_id",
"when",
"updating",
"a",
"status",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Twitter/Places.php#L55-L93 |
189,737 | joomla/joomla-framework | src/Joomla/Facebook/Video.php | Video.createComment | public function createComment($video, $message)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
return $this->createConnection($video, 'comments', $data);
} | php | public function createComment($video, $message)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
return $this->createConnection($video, 'comments', $data);
} | [
"public",
"function",
"createComment",
"(",
"$",
"video",
",",
"$",
"message",
")",
"{",
"// Set POST request parameters.",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"data",
"[",
"'message'",
"]",
"=",
"$",
"message",
";",
"return",
"$",
"this",
"->... | Method to comment on a video. Requires authentication and publish_stream permission, user_videos or friends_videos permission for private videos.
@param string $video The video id.
@param string $message The comment's text.
@return mixed The decoded JSON response or false if the client is not authenticat... | [
"Method",
"to",
"comment",
"on",
"a",
"video",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"permission",
"user_videos",
"or",
"friends_videos",
"permission",
"for",
"private",
"videos",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/Video.php#L61-L68 |
189,738 | joomla/joomla-framework | src/Joomla/Log/Log.php | Log.addLogEntry | protected function addLogEntry(LogEntry $entry)
{
// Find all the appropriate loggers based on priority and category for the entry.
$loggers = $this->findLoggers($entry->priority, $entry->category);
foreach ((array) $loggers as $signature)
{
// Attempt to instantiate the logger object if it doesn't already... | php | protected function addLogEntry(LogEntry $entry)
{
// Find all the appropriate loggers based on priority and category for the entry.
$loggers = $this->findLoggers($entry->priority, $entry->category);
foreach ((array) $loggers as $signature)
{
// Attempt to instantiate the logger object if it doesn't already... | [
"protected",
"function",
"addLogEntry",
"(",
"LogEntry",
"$",
"entry",
")",
"{",
"// Find all the appropriate loggers based on priority and category for the entry.",
"$",
"loggers",
"=",
"$",
"this",
"->",
"findLoggers",
"(",
"$",
"entry",
"->",
"priority",
",",
"$",
... | Method to add an entry to the appropriate loggers.
@param LogEntry $entry The LogEntry object to send to the loggers.
@return void
@since 1.0
@throws \RuntimeException | [
"Method",
"to",
"add",
"an",
"entry",
"to",
"the",
"appropriate",
"loggers",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Log/Log.php#L252-L277 |
189,739 | joomla/joomla-framework | src/Joomla/Log/Log.php | Log.findLoggers | protected function findLoggers($priority, $category)
{
$loggers = array();
// Sanitize inputs.
$priority = (int) $priority;
$category = strtolower($category);
// Let's go iterate over the loggers and get all the ones we need.
foreach ((array) $this->lookup as $signature => $rules)
{
// Check to make... | php | protected function findLoggers($priority, $category)
{
$loggers = array();
// Sanitize inputs.
$priority = (int) $priority;
$category = strtolower($category);
// Let's go iterate over the loggers and get all the ones we need.
foreach ((array) $this->lookup as $signature => $rules)
{
// Check to make... | [
"protected",
"function",
"findLoggers",
"(",
"$",
"priority",
",",
"$",
"category",
")",
"{",
"$",
"loggers",
"=",
"array",
"(",
")",
";",
"// Sanitize inputs.",
"$",
"priority",
"=",
"(",
"int",
")",
"$",
"priority",
";",
"$",
"category",
"=",
"strtolow... | Method to find the loggers to use based on priority and category values.
@param integer $priority Message priority.
@param string $category Type of entry
@return array The array of loggers to use for the given priority and category values.
@since 1.0 | [
"Method",
"to",
"find",
"the",
"loggers",
"to",
"use",
"based",
"on",
"priority",
"and",
"category",
"values",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Log/Log.php#L289-L323 |
189,740 | joomla/joomla-framework | src/Joomla/Database/DatabaseDriver.php | DatabaseDriver.getImporter | public function getImporter()
{
// Derive the class name from the driver.
$class = '\\Joomla\\Database\\' . ucfirst($this->name) . '\\' . ucfirst($this->name) . 'Importer';
// Make sure we have an importer class for this driver.
if (!class_exists($class))
{
// If it doesn't exist we are at an impasse so ... | php | public function getImporter()
{
// Derive the class name from the driver.
$class = '\\Joomla\\Database\\' . ucfirst($this->name) . '\\' . ucfirst($this->name) . 'Importer';
// Make sure we have an importer class for this driver.
if (!class_exists($class))
{
// If it doesn't exist we are at an impasse so ... | [
"public",
"function",
"getImporter",
"(",
")",
"{",
"// Derive the class name from the driver.",
"$",
"class",
"=",
"'\\\\Joomla\\\\Database\\\\'",
".",
"ucfirst",
"(",
"$",
"this",
"->",
"name",
")",
".",
"'\\\\'",
".",
"ucfirst",
"(",
"$",
"this",
"->",
"name"... | Gets an importer class object.
@return DatabaseImporter An importer object.
@since 1.0
@throws \RuntimeException | [
"Gets",
"an",
"importer",
"class",
"object",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Database/DatabaseDriver.php#L656-L673 |
189,741 | joomla/joomla-framework | src/Joomla/Database/DatabaseDriver.php | DatabaseDriver.loadObject | public function loadObject($class = 'stdClass')
{
$this->connect();
$ret = null;
// Execute the query and get the result set cursor.
if (!($cursor = $this->execute()))
{
return null;
}
// Get the first row from the result set as an object of type $class.
$object = $this->fetchObject($cursor, $cla... | php | public function loadObject($class = 'stdClass')
{
$this->connect();
$ret = null;
// Execute the query and get the result set cursor.
if (!($cursor = $this->execute()))
{
return null;
}
// Get the first row from the result set as an object of type $class.
$object = $this->fetchObject($cursor, $cla... | [
"public",
"function",
"loadObject",
"(",
"$",
"class",
"=",
"'stdClass'",
")",
"{",
"$",
"this",
"->",
"connect",
"(",
")",
";",
"$",
"ret",
"=",
"null",
";",
"// Execute the query and get the result set cursor.",
"if",
"(",
"!",
"(",
"$",
"cursor",
"=",
"... | Method to get the first row of the result set from the database query as an object.
@param string $class The class name to use for the returned row object.
@return mixed The return value or null if the query failed.
@since 1.0
@throws \RuntimeException | [
"Method",
"to",
"get",
"the",
"first",
"row",
"of",
"the",
"result",
"set",
"from",
"the",
"database",
"query",
"as",
"an",
"object",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Database/DatabaseDriver.php#L1015-L1039 |
189,742 | jstayton/GoogleMapsGeocoder | src/GoogleMapsGeocoder.php | GoogleMapsGeocoder.setBounds | public function setBounds($southwestLatitude, $southwestLongitude, $northeastLatitude, $northeastLongitude) {
$this->setBoundsSouthwest($southwestLatitude, $southwestLongitude)
->setBoundsNortheast($northeastLatitude, $northeastLongitude);
return $this;
} | php | public function setBounds($southwestLatitude, $southwestLongitude, $northeastLatitude, $northeastLongitude) {
$this->setBoundsSouthwest($southwestLatitude, $southwestLongitude)
->setBoundsNortheast($northeastLatitude, $northeastLongitude);
return $this;
} | [
"public",
"function",
"setBounds",
"(",
"$",
"southwestLatitude",
",",
"$",
"southwestLongitude",
",",
"$",
"northeastLatitude",
",",
"$",
"northeastLongitude",
")",
"{",
"$",
"this",
"->",
"setBoundsSouthwest",
"(",
"$",
"southwestLatitude",
",",
"$",
"southwestL... | Set the bounding box coordinates within which to bias geocode results.
@link https://developers.google.com/maps/documentation/geocoding/intro#Viewports
@param float|string $southwestLatitude southwest latitude boundary
@param float|string $southwestLongitude southwest longitude boundary
@param float|string $north... | [
"Set",
"the",
"bounding",
"box",
"coordinates",
"within",
"which",
"to",
"bias",
"geocode",
"results",
"."
] | 9da0b1363e0dc2908750e60af23f2d32b0afe855 | https://github.com/jstayton/GoogleMapsGeocoder/blob/9da0b1363e0dc2908750e60af23f2d32b0afe855/src/GoogleMapsGeocoder.php#L553-L558 |
189,743 | jstayton/GoogleMapsGeocoder | src/GoogleMapsGeocoder.php | GoogleMapsGeocoder.getBounds | public function getBounds() {
$southwest = $this->getBoundsSouthwest();
$northeast = $this->getBoundsNortheast();
if ($southwest && $northeast) {
return $southwest . "|" . $northeast;
}
else {
return false;
}
} | php | public function getBounds() {
$southwest = $this->getBoundsSouthwest();
$northeast = $this->getBoundsNortheast();
if ($southwest && $northeast) {
return $southwest . "|" . $northeast;
}
else {
return false;
}
} | [
"public",
"function",
"getBounds",
"(",
")",
"{",
"$",
"southwest",
"=",
"$",
"this",
"->",
"getBoundsSouthwest",
"(",
")",
";",
"$",
"northeast",
"=",
"$",
"this",
"->",
"getBoundsNortheast",
"(",
")",
";",
"if",
"(",
"$",
"southwest",
"&&",
"$",
"nor... | Get the bounding box coordinates within which to bias geocode results
in comma-separated, pipe-delimited format.
@link https://developers.google.com/maps/documentation/geocoding/intro#Viewports
@return string|false comma-separated, pipe-delimited coordinates, or
false if not set | [
"Get",
"the",
"bounding",
"box",
"coordinates",
"within",
"which",
"to",
"bias",
"geocode",
"results",
"in",
"comma",
"-",
"separated",
"pipe",
"-",
"delimited",
"format",
"."
] | 9da0b1363e0dc2908750e60af23f2d32b0afe855 | https://github.com/jstayton/GoogleMapsGeocoder/blob/9da0b1363e0dc2908750e60af23f2d32b0afe855/src/GoogleMapsGeocoder.php#L568-L578 |
189,744 | jstayton/GoogleMapsGeocoder | src/GoogleMapsGeocoder.php | GoogleMapsGeocoder.setBoundsSouthwest | public function setBoundsSouthwest($latitude, $longitude) {
$this->boundsSouthwestLatitude = $latitude;
$this->boundsSouthwestLongitude = $longitude;
return $this;
} | php | public function setBoundsSouthwest($latitude, $longitude) {
$this->boundsSouthwestLatitude = $latitude;
$this->boundsSouthwestLongitude = $longitude;
return $this;
} | [
"public",
"function",
"setBoundsSouthwest",
"(",
"$",
"latitude",
",",
"$",
"longitude",
")",
"{",
"$",
"this",
"->",
"boundsSouthwestLatitude",
"=",
"$",
"latitude",
";",
"$",
"this",
"->",
"boundsSouthwestLongitude",
"=",
"$",
"longitude",
";",
"return",
"$"... | Set the southwest coordinates of the bounding box within which to bias
geocode results.
@link https://developers.google.com/maps/documentation/geocoding/intro#Viewports
@param float|string $latitude southwest latitude boundary
@param float|string $longitude southwest longitude boundary
@return GoogleMapsGeocoder | [
"Set",
"the",
"southwest",
"coordinates",
"of",
"the",
"bounding",
"box",
"within",
"which",
"to",
"bias",
"geocode",
"results",
"."
] | 9da0b1363e0dc2908750e60af23f2d32b0afe855 | https://github.com/jstayton/GoogleMapsGeocoder/blob/9da0b1363e0dc2908750e60af23f2d32b0afe855/src/GoogleMapsGeocoder.php#L589-L594 |
189,745 | jstayton/GoogleMapsGeocoder | src/GoogleMapsGeocoder.php | GoogleMapsGeocoder.getBoundsSouthwest | public function getBoundsSouthwest() {
$latitude = $this->getBoundsSouthwestLatitude();
$longitude = $this->getBoundsSouthwestLongitude();
if ($latitude && $longitude) {
return $latitude . "," . $longitude;
}
else {
return false;
}
} | php | public function getBoundsSouthwest() {
$latitude = $this->getBoundsSouthwestLatitude();
$longitude = $this->getBoundsSouthwestLongitude();
if ($latitude && $longitude) {
return $latitude . "," . $longitude;
}
else {
return false;
}
} | [
"public",
"function",
"getBoundsSouthwest",
"(",
")",
"{",
"$",
"latitude",
"=",
"$",
"this",
"->",
"getBoundsSouthwestLatitude",
"(",
")",
";",
"$",
"longitude",
"=",
"$",
"this",
"->",
"getBoundsSouthwestLongitude",
"(",
")",
";",
"if",
"(",
"$",
"latitude... | Get the southwest coordinates of the bounding box within which to bias
geocode results in comma-separated format.
@link https://developers.google.com/maps/documentation/geocoding/intro#Viewports
@return string|false comma-separated coordinates, or false if not set | [
"Get",
"the",
"southwest",
"coordinates",
"of",
"the",
"bounding",
"box",
"within",
"which",
"to",
"bias",
"geocode",
"results",
"in",
"comma",
"-",
"separated",
"format",
"."
] | 9da0b1363e0dc2908750e60af23f2d32b0afe855 | https://github.com/jstayton/GoogleMapsGeocoder/blob/9da0b1363e0dc2908750e60af23f2d32b0afe855/src/GoogleMapsGeocoder.php#L603-L613 |
189,746 | jstayton/GoogleMapsGeocoder | src/GoogleMapsGeocoder.php | GoogleMapsGeocoder.setBoundsNortheast | public function setBoundsNortheast($latitude, $longitude) {
$this->boundsNortheastLatitude = $latitude;
$this->boundsNortheastLongitude = $longitude;
return $this;
} | php | public function setBoundsNortheast($latitude, $longitude) {
$this->boundsNortheastLatitude = $latitude;
$this->boundsNortheastLongitude = $longitude;
return $this;
} | [
"public",
"function",
"setBoundsNortheast",
"(",
"$",
"latitude",
",",
"$",
"longitude",
")",
"{",
"$",
"this",
"->",
"boundsNortheastLatitude",
"=",
"$",
"latitude",
";",
"$",
"this",
"->",
"boundsNortheastLongitude",
"=",
"$",
"longitude",
";",
"return",
"$"... | Set the northeast coordinates of the bounding box within which to bias
geocode results.
@link https://developers.google.com/maps/documentation/geocoding/intro#Viewports
@param float|string $latitude northeast latitude boundary
@param float|string $longitude northeast longitude boundary
@return GoogleMapsGeocoder | [
"Set",
"the",
"northeast",
"coordinates",
"of",
"the",
"bounding",
"box",
"within",
"which",
"to",
"bias",
"geocode",
"results",
"."
] | 9da0b1363e0dc2908750e60af23f2d32b0afe855 | https://github.com/jstayton/GoogleMapsGeocoder/blob/9da0b1363e0dc2908750e60af23f2d32b0afe855/src/GoogleMapsGeocoder.php#L646-L651 |
189,747 | jstayton/GoogleMapsGeocoder | src/GoogleMapsGeocoder.php | GoogleMapsGeocoder.getBoundsNortheast | public function getBoundsNortheast() {
$latitude = $this->getBoundsNortheastLatitude();
$longitude = $this->getBoundsNortheastLongitude();
if ($latitude && $longitude) {
return $latitude . "," . $longitude;
}
else {
return false;
}
} | php | public function getBoundsNortheast() {
$latitude = $this->getBoundsNortheastLatitude();
$longitude = $this->getBoundsNortheastLongitude();
if ($latitude && $longitude) {
return $latitude . "," . $longitude;
}
else {
return false;
}
} | [
"public",
"function",
"getBoundsNortheast",
"(",
")",
"{",
"$",
"latitude",
"=",
"$",
"this",
"->",
"getBoundsNortheastLatitude",
"(",
")",
";",
"$",
"longitude",
"=",
"$",
"this",
"->",
"getBoundsNortheastLongitude",
"(",
")",
";",
"if",
"(",
"$",
"latitude... | Get the northeast coordinates of the bounding box within which to bias
geocode results in comma-separated format.
@link https://developers.google.com/maps/documentation/geocoding/intro#Viewports
@return string|false comma-separated coordinates, or false if not set | [
"Get",
"the",
"northeast",
"coordinates",
"of",
"the",
"bounding",
"box",
"within",
"which",
"to",
"bias",
"geocode",
"results",
"in",
"comma",
"-",
"separated",
"format",
"."
] | 9da0b1363e0dc2908750e60af23f2d32b0afe855 | https://github.com/jstayton/GoogleMapsGeocoder/blob/9da0b1363e0dc2908750e60af23f2d32b0afe855/src/GoogleMapsGeocoder.php#L660-L670 |
189,748 | jstayton/GoogleMapsGeocoder | src/GoogleMapsGeocoder.php | GoogleMapsGeocoder.setSensor | public function setSensor($sensor) {
if ($sensor == 'true' || $sensor == 'false') {
$this->sensor = $sensor;
}
elseif ($sensor) {
$this->sensor = "true";
}
else {
$this->sensor = "false";
}
return $this;
} | php | public function setSensor($sensor) {
if ($sensor == 'true' || $sensor == 'false') {
$this->sensor = $sensor;
}
elseif ($sensor) {
$this->sensor = "true";
}
else {
$this->sensor = "false";
}
return $this;
} | [
"public",
"function",
"setSensor",
"(",
"$",
"sensor",
")",
"{",
"if",
"(",
"$",
"sensor",
"==",
"'true'",
"||",
"$",
"sensor",
"==",
"'false'",
")",
"{",
"$",
"this",
"->",
"sensor",
"=",
"$",
"sensor",
";",
"}",
"elseif",
"(",
"$",
"sensor",
")",... | Set whether the request is from a device with a location sensor.
@deprecated 2.3.0 no longer required by the Google Maps API
@link https://developers.google.com/maps/documentation/geocoding/intro#Sensor
@param bool|string $sensor boolean or 'true'/'false' string
@return GoogleMapsGeocoder | [
"Set",
"whether",
"the",
"request",
"is",
"from",
"a",
"device",
"with",
"a",
"location",
"sensor",
"."
] | 9da0b1363e0dc2908750e60af23f2d32b0afe855 | https://github.com/jstayton/GoogleMapsGeocoder/blob/9da0b1363e0dc2908750e60af23f2d32b0afe855/src/GoogleMapsGeocoder.php#L816-L828 |
189,749 | jstayton/GoogleMapsGeocoder | src/GoogleMapsGeocoder.php | GoogleMapsGeocoder.generateSignature | private function generateSignature($pathQueryString) {
$decodedSigningKey = self::base64DecodeUrlSafe($this->getSigningKey());
$signature = hash_hmac('sha1', $pathQueryString, $decodedSigningKey, true);
$signature = self::base64EncodeUrlSafe($signature);
return $signature;
} | php | private function generateSignature($pathQueryString) {
$decodedSigningKey = self::base64DecodeUrlSafe($this->getSigningKey());
$signature = hash_hmac('sha1', $pathQueryString, $decodedSigningKey, true);
$signature = self::base64EncodeUrlSafe($signature);
return $signature;
} | [
"private",
"function",
"generateSignature",
"(",
"$",
"pathQueryString",
")",
"{",
"$",
"decodedSigningKey",
"=",
"self",
"::",
"base64DecodeUrlSafe",
"(",
"$",
"this",
"->",
"getSigningKey",
"(",
")",
")",
";",
"$",
"signature",
"=",
"hash_hmac",
"(",
"'sha1'... | Generate the signature for a Business client geocode request.
@link https://developers.google.com/maps/documentation/business/webservices/auth#digital_signatures
@param string $pathQueryString path and query string of the request
@return string Base64 encoded signature that's URL safe | [
"Generate",
"the",
"signature",
"for",
"a",
"Business",
"client",
"geocode",
"request",
"."
] | 9da0b1363e0dc2908750e60af23f2d32b0afe855 | https://github.com/jstayton/GoogleMapsGeocoder/blob/9da0b1363e0dc2908750e60af23f2d32b0afe855/src/GoogleMapsGeocoder.php#L925-L932 |
189,750 | jstayton/GoogleMapsGeocoder | src/GoogleMapsGeocoder.php | GoogleMapsGeocoder.geocodeQueryString | private function geocodeQueryString() {
$queryString = array();
// One of the following is required.
$address = $this->getAddress();
$latitudeLongitude = $this->getLatitudeLongitude();
// If both are set for some reason, favor address to geocode.
if ($address) {
$queryStrin... | php | private function geocodeQueryString() {
$queryString = array();
// One of the following is required.
$address = $this->getAddress();
$latitudeLongitude = $this->getLatitudeLongitude();
// If both are set for some reason, favor address to geocode.
if ($address) {
$queryStrin... | [
"private",
"function",
"geocodeQueryString",
"(",
")",
"{",
"$",
"queryString",
"=",
"array",
"(",
")",
";",
"// One of the following is required.",
"$",
"address",
"=",
"$",
"this",
"->",
"getAddress",
"(",
")",
";",
"$",
"latitudeLongitude",
"=",
"$",
"this"... | Build the query string with all set parameters of the geocode request.
@link https://developers.google.com/maps/documentation/geocoding/intro#GeocodingRequests
@return string encoded query string of the geocode request | [
"Build",
"the",
"query",
"string",
"with",
"all",
"set",
"parameters",
"of",
"the",
"geocode",
"request",
"."
] | 9da0b1363e0dc2908750e60af23f2d32b0afe855 | https://github.com/jstayton/GoogleMapsGeocoder/blob/9da0b1363e0dc2908750e60af23f2d32b0afe855/src/GoogleMapsGeocoder.php#L940-L978 |
189,751 | jstayton/GoogleMapsGeocoder | src/GoogleMapsGeocoder.php | GoogleMapsGeocoder.boundingBox | public static function boundingBox($latitude, $longitude, $mileRange) {
$maxLatitude = $latitude + $mileRange / self::EQUATOR_LAT_DEGREE_IN_MILES;
$minLatitude = $latitude - ($maxLatitude - $latitude);
$maxLongitude = $longitude + $mileRange / (cos($minLatitude * M_PI / 180) * self::EQUATOR_LAT_DEGRE... | php | public static function boundingBox($latitude, $longitude, $mileRange) {
$maxLatitude = $latitude + $mileRange / self::EQUATOR_LAT_DEGREE_IN_MILES;
$minLatitude = $latitude - ($maxLatitude - $latitude);
$maxLongitude = $longitude + $mileRange / (cos($minLatitude * M_PI / 180) * self::EQUATOR_LAT_DEGRE... | [
"public",
"static",
"function",
"boundingBox",
"(",
"$",
"latitude",
",",
"$",
"longitude",
",",
"$",
"mileRange",
")",
"{",
"$",
"maxLatitude",
"=",
"$",
"latitude",
"+",
"$",
"mileRange",
"/",
"self",
"::",
"EQUATOR_LAT_DEGREE_IN_MILES",
";",
"$",
"minLati... | Computes a four point bounding box around the specified location. This
can then be used to find all locations within an X-mile range of a central
location. A bounding box is much easier and faster to compute than a
bounding radius.
The returned array contains two keys: 'lat' and 'lon'. Each of these
contains another a... | [
"Computes",
"a",
"four",
"point",
"bounding",
"box",
"around",
"the",
"specified",
"location",
".",
"This",
"can",
"then",
"be",
"used",
"to",
"find",
"all",
"locations",
"within",
"an",
"X",
"-",
"mile",
"range",
"of",
"a",
"central",
"location",
".",
"... | 9da0b1363e0dc2908750e60af23f2d32b0afe855 | https://github.com/jstayton/GoogleMapsGeocoder/blob/9da0b1363e0dc2908750e60af23f2d32b0afe855/src/GoogleMapsGeocoder.php#L1047-L1058 |
189,752 | joomla/joomla-framework | src/Joomla/OAuth2/Client.php | Client.authenticate | public function authenticate()
{
if ($data['code'] = $this->input->get('code', false, 'raw'))
{
$data['grant_type'] = 'authorization_code';
$data['redirect_uri'] = $this->getOption('redirecturi');
$data['client_id'] = $this->getOption('clientid');
$data['client_secret'] = $this->getOption('clientsecret... | php | public function authenticate()
{
if ($data['code'] = $this->input->get('code', false, 'raw'))
{
$data['grant_type'] = 'authorization_code';
$data['redirect_uri'] = $this->getOption('redirecturi');
$data['client_id'] = $this->getOption('clientid');
$data['client_secret'] = $this->getOption('clientsecret... | [
"public",
"function",
"authenticate",
"(",
")",
"{",
"if",
"(",
"$",
"data",
"[",
"'code'",
"]",
"=",
"$",
"this",
"->",
"input",
"->",
"get",
"(",
"'code'",
",",
"false",
",",
"'raw'",
")",
")",
"{",
"$",
"data",
"[",
"'grant_type'",
"]",
"=",
"... | Get the access token or redict to the authentication URL.
@return string The access token
@since 1.0
@throws \RuntimeException | [
"Get",
"the",
"access",
"token",
"or",
"redict",
"to",
"the",
"authentication",
"URL",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/OAuth2/Client.php#L72-L110 |
189,753 | joomla/joomla-framework | src/Joomla/OAuth2/Client.php | Client.isAuthenticated | public function isAuthenticated()
{
$token = $this->getToken();
if (!$token || !array_key_exists('access_token', $token))
{
return false;
}
elseif (array_key_exists('expires_in', $token) && $token['created'] + $token['expires_in'] < time() + 20)
{
return false;
}
else
{
return true;
}
} | php | public function isAuthenticated()
{
$token = $this->getToken();
if (!$token || !array_key_exists('access_token', $token))
{
return false;
}
elseif (array_key_exists('expires_in', $token) && $token['created'] + $token['expires_in'] < time() + 20)
{
return false;
}
else
{
return true;
}
} | [
"public",
"function",
"isAuthenticated",
"(",
")",
"{",
"$",
"token",
"=",
"$",
"this",
"->",
"getToken",
"(",
")",
";",
"if",
"(",
"!",
"$",
"token",
"||",
"!",
"array_key_exists",
"(",
"'access_token'",
",",
"$",
"token",
")",
")",
"{",
"return",
"... | Verify if the client has been authenticated
@return boolean Is authenticated
@since 1.0 | [
"Verify",
"if",
"the",
"client",
"has",
"been",
"authenticated"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/OAuth2/Client.php#L119-L135 |
189,754 | joomla/joomla-framework | src/Joomla/OAuth2/Client.php | Client.createUrl | public function createUrl()
{
if (!$this->getOption('authurl') || !$this->getOption('clientid'))
{
throw new \InvalidArgumentException('Authorization URL and client_id are required');
}
$url = $this->getOption('authurl');
if (strpos($url, '?'))
{
$url .= '&';
}
else
{
$url .= '?';
}
$... | php | public function createUrl()
{
if (!$this->getOption('authurl') || !$this->getOption('clientid'))
{
throw new \InvalidArgumentException('Authorization URL and client_id are required');
}
$url = $this->getOption('authurl');
if (strpos($url, '?'))
{
$url .= '&';
}
else
{
$url .= '?';
}
$... | [
"public",
"function",
"createUrl",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"getOption",
"(",
"'authurl'",
")",
"||",
"!",
"$",
"this",
"->",
"getOption",
"(",
"'clientid'",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
... | Create the URL for authentication.
@return \Joomla\Http\Response The HTTP response
@since 1.0
@throws \InvalidArgumentException | [
"Create",
"the",
"URL",
"for",
"authentication",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/OAuth2/Client.php#L145-L191 |
189,755 | joomla/joomla-framework | src/Joomla/OAuth2/Client.php | Client.refreshToken | public function refreshToken($token = null)
{
if (!$this->getOption('userefresh'))
{
throw new \RuntimeException('Refresh token is not supported for this OAuth instance.');
}
if (!$token)
{
$token = $this->getToken();
if (!array_key_exists('refresh_token', $token))
{
throw new \RuntimeExcep... | php | public function refreshToken($token = null)
{
if (!$this->getOption('userefresh'))
{
throw new \RuntimeException('Refresh token is not supported for this OAuth instance.');
}
if (!$token)
{
$token = $this->getToken();
if (!array_key_exists('refresh_token', $token))
{
throw new \RuntimeExcep... | [
"public",
"function",
"refreshToken",
"(",
"$",
"token",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"getOption",
"(",
"'userefresh'",
")",
")",
"{",
"throw",
"new",
"\\",
"RuntimeException",
"(",
"'Refresh token is not supported for this OAuth ins... | Refresh the access token instance.
@param string $token The refresh token
@return array The new access token
@since 1.0
@throws \Exception
@throws \RuntimeException | [
"Refresh",
"the",
"access",
"token",
"instance",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/OAuth2/Client.php#L344-L389 |
189,756 | joomla/joomla-framework | src/Joomla/Keychain/Keychain.php | Keychain.createPassphraseFile | public function createPassphraseFile($passphrase, $passphraseFile, $privateKeyFile, $privateKeyPassphrase)
{
$privateKey = openssl_get_privatekey(file_get_contents($privateKeyFile), $privateKeyPassphrase);
if (!$privateKey)
{
throw new \RuntimeException("Failed to load private key.");
}
$crypted = '';
... | php | public function createPassphraseFile($passphrase, $passphraseFile, $privateKeyFile, $privateKeyPassphrase)
{
$privateKey = openssl_get_privatekey(file_get_contents($privateKeyFile), $privateKeyPassphrase);
if (!$privateKey)
{
throw new \RuntimeException("Failed to load private key.");
}
$crypted = '';
... | [
"public",
"function",
"createPassphraseFile",
"(",
"$",
"passphrase",
",",
"$",
"passphraseFile",
",",
"$",
"privateKeyFile",
",",
"$",
"privateKeyPassphrase",
")",
"{",
"$",
"privateKey",
"=",
"openssl_get_privatekey",
"(",
"file_get_contents",
"(",
"$",
"privateKe... | Create a passphrase file
@param string $passphrase The passphrase to store in the passphrase file.
@param string $passphraseFile Path to the passphrase file to create.
@param string $privateKeyFile Path to the private key file to encrypt the passphrase file.
@param string $privateK... | [
"Create",
"a",
"passphrase",
"file"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Keychain/Keychain.php#L49-L66 |
189,757 | joomla/joomla-framework | src/Joomla/Keychain/Keychain.php | Keychain.loadKeychain | public function loadKeychain($keychainFile, $passphraseFile, $publicKeyFile)
{
if (!file_exists($keychainFile))
{
throw new \RuntimeException('Attempting to load non-existent keychain file');
}
$passphrase = $this->getPassphraseFromFile($passphraseFile, $publicKeyFile);
$cleartext = openssl_decrypt(file... | php | public function loadKeychain($keychainFile, $passphraseFile, $publicKeyFile)
{
if (!file_exists($keychainFile))
{
throw new \RuntimeException('Attempting to load non-existent keychain file');
}
$passphrase = $this->getPassphraseFromFile($passphraseFile, $publicKeyFile);
$cleartext = openssl_decrypt(file... | [
"public",
"function",
"loadKeychain",
"(",
"$",
"keychainFile",
",",
"$",
"passphraseFile",
",",
"$",
"publicKeyFile",
")",
"{",
"if",
"(",
"!",
"file_exists",
"(",
"$",
"keychainFile",
")",
")",
"{",
"throw",
"new",
"\\",
"RuntimeException",
"(",
"'Attempti... | Load a keychain file into this object.
@param string $keychainFile Path to the keychain file.
@param string $passphraseFile The path to the passphrase file to decript the keychain.
@param string $publicKeyFile The file containing the public key to decrypt the passphrase file.
@return boolean Result o... | [
"Load",
"a",
"keychain",
"file",
"into",
"this",
"object",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Keychain/Keychain.php#L120-L137 |
189,758 | joomla/joomla-framework | src/Joomla/Keychain/Keychain.php | Keychain.saveKeychain | public function saveKeychain($keychainFile, $passphraseFile, $publicKeyFile)
{
$passphrase = $this->getPassphraseFromFile($passphraseFile, $publicKeyFile);
$data = $this->toString('JSON');
$encrypted = @openssl_encrypt($data, $this->method, $passphrase, true, $this->iv);
if ($encrypted === false)
{
thro... | php | public function saveKeychain($keychainFile, $passphraseFile, $publicKeyFile)
{
$passphrase = $this->getPassphraseFromFile($passphraseFile, $publicKeyFile);
$data = $this->toString('JSON');
$encrypted = @openssl_encrypt($data, $this->method, $passphrase, true, $this->iv);
if ($encrypted === false)
{
thro... | [
"public",
"function",
"saveKeychain",
"(",
"$",
"keychainFile",
",",
"$",
"passphraseFile",
",",
"$",
"publicKeyFile",
")",
"{",
"$",
"passphrase",
"=",
"$",
"this",
"->",
"getPassphraseFromFile",
"(",
"$",
"passphraseFile",
",",
"$",
"publicKeyFile",
")",
";"... | Save this keychain to a file.
@param string $keychainFile The path to the keychain file.
@param string $passphraseFile The path to the passphrase file to encrypt the keychain.
@param string $publicKeyFile The file containing the public key to decrypt the passphrase file.
@return boolean Result of sto... | [
"Save",
"this",
"keychain",
"to",
"a",
"file",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Keychain/Keychain.php#L151-L164 |
189,759 | joomla/joomla-framework | src/Joomla/Keychain/Keychain.php | Keychain.getPassphraseFromFile | protected function getPassphraseFromFile($passphraseFile, $publicKeyFile)
{
if (!file_exists($publicKeyFile))
{
throw new \RuntimeException('Missing public key file');
}
$publicKey = openssl_get_publickey(file_get_contents($publicKeyFile));
if (!$publicKey)
{
throw new \RuntimeException("Failed to ... | php | protected function getPassphraseFromFile($passphraseFile, $publicKeyFile)
{
if (!file_exists($publicKeyFile))
{
throw new \RuntimeException('Missing public key file');
}
$publicKey = openssl_get_publickey(file_get_contents($publicKeyFile));
if (!$publicKey)
{
throw new \RuntimeException("Failed to ... | [
"protected",
"function",
"getPassphraseFromFile",
"(",
"$",
"passphraseFile",
",",
"$",
"publicKeyFile",
")",
"{",
"if",
"(",
"!",
"file_exists",
"(",
"$",
"publicKeyFile",
")",
")",
"{",
"throw",
"new",
"\\",
"RuntimeException",
"(",
"'Missing public key file'",
... | Get the passphrase for this keychain
@param string $passphraseFile The file containing the passphrase to encrypt and decrypt.
@param string $publicKeyFile The file containing the public key to decrypt the passphrase file.
@return string The passphrase in from passphraseFile
@since 1.0
@throws \RuntimeE... | [
"Get",
"the",
"passphrase",
"for",
"this",
"keychain"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Keychain/Keychain.php#L177-L204 |
189,760 | joomla/joomla-framework | src/Joomla/Linkedin/Jobs.php | Jobs.bookmark | public function bookmark($id)
{
$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/~/job-bookmarks';
// Build xml.
... | php | public function bookmark($id)
{
$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/~/job-bookmarks';
// Build xml.
... | [
"public",
"function",
"bookmark",
"(",
"$",
"id",
")",
"{",
"$",
"token",
"=",
"$",
"this",
"->",
"oauth",
"->",
"getToken",
"(",
")",
";",
"// Set parameters.",
"$",
"parameters",
"=",
"array",
"(",
"'oauth_token'",
"=>",
"$",
"token",
"[",
"'key'",
"... | Method to bookmark a job to the current user's account.
@param integer $id The unique identifier for a job.
@return array The decoded JSON response
@since 1.0 | [
"Method",
"to",
"bookmark",
"a",
"job",
"to",
"the",
"current",
"user",
"s",
"account",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Linkedin/Jobs.php#L106-L133 |
189,761 | joomla/joomla-framework | src/Joomla/Linkedin/Jobs.php | Jobs.deleteBookmark | public function deleteBookmark($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/people/~/job-bookmarks/' . $id;
//... | php | public function deleteBookmark($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/people/~/job-bookmarks/' . $id;
//... | [
"public",
"function",
"deleteBookmark",
"(",
"$",
"id",
")",
"{",
"$",
"token",
"=",
"$",
"this",
"->",
"oauth",
"->",
"getToken",
"(",
")",
";",
"// Set parameters.",
"$",
"parameters",
"=",
"array",
"(",
"'oauth_token'",
"=>",
"$",
"token",
"[",
"'key'... | Method to delete a bookmark.
@param integer $id The unique identifier for a job.
@return array The decoded JSON response
@since 1.0 | [
"Method",
"to",
"delete",
"a",
"bookmark",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Linkedin/Jobs.php#L144-L166 |
189,762 | joomla/joomla-framework | src/Joomla/Cache/Cache.php | Cache.removeMultiple | public function removeMultiple($keys)
{
$result = array();
foreach ($keys as $key)
{
$result[$key] = $this->remove($key);
}
return $result;
} | php | public function removeMultiple($keys)
{
$result = array();
foreach ($keys as $key)
{
$result[$key] = $this->remove($key);
}
return $result;
} | [
"public",
"function",
"removeMultiple",
"(",
"$",
"keys",
")",
"{",
"$",
"result",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"keys",
"as",
"$",
"key",
")",
"{",
"$",
"result",
"[",
"$",
"key",
"]",
"=",
"$",
"this",
"->",
"remove",
"(",
... | Remove multiple cache items in a single operation.
@param array $keys The array of keys to be removed.
@return array An associative array of 'key' => result, elements. Each array row has the key being deleted
and the result of that operation. The result will be a boolean of true or false
representing if the cac... | [
"Remove",
"multiple",
"cache",
"items",
"in",
"a",
"single",
"operation",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Cache/Cache.php#L131-L141 |
189,763 | joomla/joomla-framework | src/Joomla/Github/Package/Repositories/Statuses.php | Statuses.create | public function create($user, $repo, $sha, $state, $targetUrl = null, $description = null)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/statuses/' . $sha;
if (!in_array($state, array('pending', 'success', 'error', 'failure')))
{
throw new \InvalidArgumentException('State must be... | php | public function create($user, $repo, $sha, $state, $targetUrl = null, $description = null)
{
// Build the request path.
$path = '/repos/' . $user . '/' . $repo . '/statuses/' . $sha;
if (!in_array($state, array('pending', 'success', 'error', 'failure')))
{
throw new \InvalidArgumentException('State must be... | [
"public",
"function",
"create",
"(",
"$",
"user",
",",
"$",
"repo",
",",
"$",
"sha",
",",
"$",
"state",
",",
"$",
"targetUrl",
"=",
"null",
",",
"$",
"description",
"=",
"null",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/repos/'",
"."... | Method to create a status.
@param string $user The name of the owner of the GitHub repository.
@param string $repo The name of the GitHub repository.
@param string $sha The SHA1 value for which to set the status.
@param string $state The state (pending, success, error or fai... | [
"Method",
"to",
"create",
"a",
"status",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Repositories/Statuses.php#L39-L69 |
189,764 | joomla/joomla-framework | src/Joomla/Google/Data.php | Data.listGetData | protected function listGetData($url, $maxpages = 1, $token = null)
{
$qurl = $url;
if (strpos($url, '&') && isset($token))
{
$qurl .= '&pageToken=' . $token;
}
elseif (isset($token))
{
$qurl .= 'pageToken=' . $token;
}
$jdata = $this->query($qurl);
$data = json_decode($jdata->body, true);
... | php | protected function listGetData($url, $maxpages = 1, $token = null)
{
$qurl = $url;
if (strpos($url, '&') && isset($token))
{
$qurl .= '&pageToken=' . $token;
}
elseif (isset($token))
{
$qurl .= 'pageToken=' . $token;
}
$jdata = $this->query($qurl);
$data = json_decode($jdata->body, true);
... | [
"protected",
"function",
"listGetData",
"(",
"$",
"url",
",",
"$",
"maxpages",
"=",
"1",
",",
"$",
"token",
"=",
"null",
")",
"{",
"$",
"qurl",
"=",
"$",
"url",
";",
"if",
"(",
"strpos",
"(",
"$",
"url",
",",
"'&'",
")",
"&&",
"isset",
"(",
"$"... | Method to retrieve a list of data
@param array $url URL to GET
@param integer $maxpages Maximum number of pages to return
@param string $token Next page token
@return mixed Data from Google
@since 1.0
@throws UnexpectedValueException | [
"Method",
"to",
"retrieve",
"a",
"list",
"of",
"data"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Google/Data.php#L106-L139 |
189,765 | joomla/joomla-framework | src/Joomla/Data/DataSet.php | DataSet.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);
$objects = array();
// Make sure that we have not... | 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);
$objects = array();
// Make sure that we have not... | [
"public",
"function",
"dump",
"(",
"$",
"depth",
"=",
"3",
",",
"\\",
"SplObjectStorage",
"$",
"dumped",
"=",
"null",
")",
"{",
"// Check if we should initialise the recursion tracker.",
"if",
"(",
"$",
"dumped",
"===",
"null",
")",
"{",
"$",
"dumped",
"=",
... | Dumps the data object in the set, 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.
@param \SplObjec... | [
"Dumps",
"the",
"data",
"object",
"in",
"the",
"set",
"recursively",
"if",
"appropriate",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Data/DataSet.php#L241-L265 |
189,766 | joomla/joomla-framework | src/Joomla/Data/DataSet.php | DataSet.jsonSerialize | public function jsonSerialize($serialized = null)
{
// Check if we should initialise the recursion tracker.
if ($serialized === null)
{
$serialized = array();
}
// Add this object to the serialized stack.
$serialized[] = spl_object_hash($this);
$return = array();
// Iterate through the objects.
... | php | public function jsonSerialize($serialized = null)
{
// Check if we should initialise the recursion tracker.
if ($serialized === null)
{
$serialized = array();
}
// Add this object to the serialized stack.
$serialized[] = spl_object_hash($this);
$return = array();
// Iterate through the objects.
... | [
"public",
"function",
"jsonSerialize",
"(",
"$",
"serialized",
"=",
"null",
")",
"{",
"// Check if we should initialise the recursion tracker.",
"if",
"(",
"$",
"serialized",
"===",
"null",
")",
"{",
"$",
"serialized",
"=",
"array",
"(",
")",
";",
"}",
"// Add t... | Gets the data set in a form that can be serialised to JSON format.
Note that this method will not return an associative array, otherwise it would be encoded into an object.
JSON decoders do not consistently maintain the order of associative keys, whereas they do maintain the order of arrays.
@param mixed $serializ... | [
"Gets",
"the",
"data",
"set",
"in",
"a",
"form",
"that",
"can",
"be",
"serialised",
"to",
"JSON",
"format",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Data/DataSet.php#L280-L300 |
189,767 | joomla/joomla-framework | src/Joomla/Data/DataSet.php | DataSet.next | public function next()
{
// Get the object offsets.
$keys = $this->keys();
// Check if _current has been set to false but offsetUnset.
if ($this->current === false && isset($keys[0]))
{
// This is a special case where offsetUnset was used in a foreach loop and the first element was unset.
$this->curre... | php | public function next()
{
// Get the object offsets.
$keys = $this->keys();
// Check if _current has been set to false but offsetUnset.
if ($this->current === false && isset($keys[0]))
{
// This is a special case where offsetUnset was used in a foreach loop and the first element was unset.
$this->curre... | [
"public",
"function",
"next",
"(",
")",
"{",
"// Get the object offsets.",
"$",
"keys",
"=",
"$",
"this",
"->",
"keys",
"(",
")",
";",
"// Check if _current has been set to false but offsetUnset.",
"if",
"(",
"$",
"this",
"->",
"current",
"===",
"false",
"&&",
"... | Advances the iterator to the next object in the iterator.
@return void
@since 1.0 | [
"Advances",
"the",
"iterator",
"to",
"the",
"next",
"object",
"in",
"the",
"iterator",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Data/DataSet.php#L333-L361 |
189,768 | joomla/joomla-framework | src/Joomla/Data/DataSet.php | DataSet.offsetUnset | public function offsetUnset($offset)
{
if (!$this->offsetExists($offset))
{
// Do nothing if the offset does not exist.
return;
}
// Check for special handling of unsetting the current position.
if ($offset == $this->current)
{
// Get the current position.
$keys = $this->keys();
$position =... | php | public function offsetUnset($offset)
{
if (!$this->offsetExists($offset))
{
// Do nothing if the offset does not exist.
return;
}
// Check for special handling of unsetting the current position.
if ($offset == $this->current)
{
// Get the current position.
$keys = $this->keys();
$position =... | [
"public",
"function",
"offsetUnset",
"(",
"$",
"offset",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"offsetExists",
"(",
"$",
"offset",
")",
")",
"{",
"// Do nothing if the offset does not exist.",
"return",
";",
"}",
"// Check for special handling of unsetting th... | Unsets an offset in the iterator.
@param mixed $offset The object offset.
@return void
@since 1.0 | [
"Unsets",
"an",
"offset",
"in",
"the",
"iterator",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Data/DataSet.php#L422-L451 |
189,769 | joomla/joomla-framework | src/Joomla/Data/DataSet.php | DataSet.rewind | public function rewind()
{
// Set the current position to the first object.
if (empty($this->objects))
{
$this->current = false;
}
else
{
$keys = $this->keys();
$this->current = array_shift($keys);
}
} | php | public function rewind()
{
// Set the current position to the first object.
if (empty($this->objects))
{
$this->current = false;
}
else
{
$keys = $this->keys();
$this->current = array_shift($keys);
}
} | [
"public",
"function",
"rewind",
"(",
")",
"{",
"// Set the current position to the first object.",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"objects",
")",
")",
"{",
"$",
"this",
"->",
"current",
"=",
"false",
";",
"}",
"else",
"{",
"$",
"keys",
"=",
... | Rewinds the iterator to the first object.
@return void
@since 1.0 | [
"Rewinds",
"the",
"iterator",
"to",
"the",
"first",
"object",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Data/DataSet.php#L460-L472 |
189,770 | joomla/joomla-framework | src/Joomla/Data/DataSet.php | DataSet.valid | public function valid()
{
// Check the current position.
if (!is_scalar($this->current) || !isset($this->objects[$this->current]))
{
return false;
}
return true;
} | php | public function valid()
{
// Check the current position.
if (!is_scalar($this->current) || !isset($this->objects[$this->current]))
{
return false;
}
return true;
} | [
"public",
"function",
"valid",
"(",
")",
"{",
"// Check the current position.",
"if",
"(",
"!",
"is_scalar",
"(",
"$",
"this",
"->",
"current",
")",
"||",
"!",
"isset",
"(",
"$",
"this",
"->",
"objects",
"[",
"$",
"this",
"->",
"current",
"]",
")",
")"... | Validates the iterator.
@return boolean True if valid, false otherwise.
@since 1.0 | [
"Validates",
"the",
"iterator",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Data/DataSet.php#L481-L490 |
189,771 | joomla/joomla-framework | src/Joomla/Form/Field/Checkbox.php | Field_Checkbox.getInput | protected function getInput()
{
// Initialize some field attributes.
$class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
$disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';
$value = $this->element['value'] ? (string) $this->element... | php | protected function getInput()
{
// Initialize some field attributes.
$class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
$disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';
$value = $this->element['value'] ? (string) $this->element... | [
"protected",
"function",
"getInput",
"(",
")",
"{",
"// Initialize some field attributes.",
"$",
"class",
"=",
"$",
"this",
"->",
"element",
"[",
"'class'",
"]",
"?",
"' class=\"'",
".",
"(",
"string",
")",
"$",
"this",
"->",
"element",
"[",
"'class'",
"]",
... | Method to get the field input markup.
The checked element sets the field to selected.
@return string The field input markup.
@since 1.0 | [
"Method",
"to",
"get",
"the",
"field",
"input",
"markup",
".",
"The",
"checked",
"element",
"sets",
"the",
"field",
"to",
"selected",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Form/Field/Checkbox.php#L38-L59 |
189,772 | joomla/joomla-framework | src/Joomla/Filesystem/Stream.php | Stream.getStream | public static function getStream($use_prefix = true, $ua = null, $uamask = false)
{
// Setup the context; Joomla! UA and overwrite
$context = array();
// Set the UA for HTTP
$context['http']['user_agent'] = $ua ?: 'Joomla! Framework Stream';
if ($use_prefix)
{
return new Stream(JPATH_ROOT . '/', JPATH... | php | public static function getStream($use_prefix = true, $ua = null, $uamask = false)
{
// Setup the context; Joomla! UA and overwrite
$context = array();
// Set the UA for HTTP
$context['http']['user_agent'] = $ua ?: 'Joomla! Framework Stream';
if ($use_prefix)
{
return new Stream(JPATH_ROOT . '/', JPATH... | [
"public",
"static",
"function",
"getStream",
"(",
"$",
"use_prefix",
"=",
"true",
",",
"$",
"ua",
"=",
"null",
",",
"$",
"uamask",
"=",
"false",
")",
"{",
"// Setup the context; Joomla! UA and overwrite",
"$",
"context",
"=",
"array",
"(",
")",
";",
"// Set ... | Creates a new stream object with appropriate prefix
@param boolean $use_prefix Prefix the connections for writing
@param string $ua UA User agent to use
@param boolean $uamask User agent masking (prefix Mozilla)
@return Stream
@see Stream
@since 1.0 | [
"Creates",
"a",
"new",
"stream",
"object",
"with",
"appropriate",
"prefix"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Filesystem/Stream.php#L178-L192 |
189,773 | joomla/joomla-framework | src/Joomla/Github/Package/Gists.php | Gists.create | public function create($files, $public = false, $description = null)
{
// Build the request path.
$path = '/gists';
// Build the request data.
$data = json_encode(
array(
'files' => $this->buildFileData((array) $files),
'public' => (bool) $public,
'description' => $description
)
... | php | public function create($files, $public = false, $description = null)
{
// Build the request path.
$path = '/gists';
// Build the request data.
$data = json_encode(
array(
'files' => $this->buildFileData((array) $files),
'public' => (bool) $public,
'description' => $description
)
... | [
"public",
"function",
"create",
"(",
"$",
"files",
",",
"$",
"public",
"=",
"false",
",",
"$",
"description",
"=",
"null",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/gists'",
";",
"// Build the request data.",
"$",
"data",
"=",
"json_encode",... | Method to create a gist.
@param mixed $files Either an array of file paths or a single file path as a string.
@param boolean $public True if the gist should be public.
@param string $description The optional description of the gist.
@return object
@since 1.0
@throws \DomainException | [
"Method",
"to",
"create",
"a",
"gist",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Gists.php#L36-L62 |
189,774 | joomla/joomla-framework | src/Joomla/Github/Package/Gists.php | Gists.edit | public function edit($gistId, $files = null, $public = null, $description = null)
{
// Build the request path.
$path = '/gists/' . (int) $gistId;
// Craete the data object.
$data = new \stdClass;
// If a description is set add it to the data object.
if (isset($description))
{
$data->description = $d... | php | public function edit($gistId, $files = null, $public = null, $description = null)
{
// Build the request path.
$path = '/gists/' . (int) $gistId;
// Craete the data object.
$data = new \stdClass;
// If a description is set add it to the data object.
if (isset($description))
{
$data->description = $d... | [
"public",
"function",
"edit",
"(",
"$",
"gistId",
",",
"$",
"files",
"=",
"null",
",",
"$",
"public",
"=",
"null",
",",
"$",
"description",
"=",
"null",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/gists/'",
".",
"(",
"int",
")",
"$",
... | Method to update a gist.
@param integer $gistId The gist number.
@param mixed $files Either an array of file paths or a single file path as a string.
@param boolean $public True if the gist should be public.
@param string $description The description of the gist.
@return object
@s... | [
"Method",
"to",
"update",
"a",
"gist",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Gists.php#L104-L145 |
189,775 | joomla/joomla-framework | src/Joomla/Github/Package/Gists.php | Gists.buildFileData | protected function buildFileData(array $files)
{
$data = array();
foreach ($files as $key => $file)
{
if (!is_numeric($key))
{
// If the key isn't numeric, then we are dealing with a file whose content has been supplied
$data[$key] = array('content' => $file);
}
elseif (!file_exists($file))... | php | protected function buildFileData(array $files)
{
$data = array();
foreach ($files as $key => $file)
{
if (!is_numeric($key))
{
// If the key isn't numeric, then we are dealing with a file whose content has been supplied
$data[$key] = array('content' => $file);
}
elseif (!file_exists($file))... | [
"protected",
"function",
"buildFileData",
"(",
"array",
"$",
"files",
")",
"{",
"$",
"data",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"files",
"as",
"$",
"key",
"=>",
"$",
"file",
")",
"{",
"if",
"(",
"!",
"is_numeric",
"(",
"$",
"key",
... | Method to fetch a data array for transmitting to the GitHub API for a list of files based on
an input array of file paths or filename and content pairs.
@param array $files The list of file paths or filenames and content.
@return array
@since 1.0
@throws \InvalidArgumentException | [
"Method",
"to",
"fetch",
"a",
"data",
"array",
"for",
"transmitting",
"to",
"the",
"GitHub",
"API",
"for",
"a",
"list",
"of",
"files",
"based",
"on",
"an",
"input",
"array",
"of",
"file",
"paths",
"or",
"filename",
"and",
"content",
"pairs",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Gists.php#L428-L454 |
189,776 | joomla/joomla-framework | src/Joomla/Form/Html/Select.php | Select.genericlist | public static function genericlist($data, $name, $attribs = null, $optKey = 'value', $optText = 'text', $selected = null, $idtag = false,
$translate = false)
{
// Set default options
$options = array_merge(self::$formatOptions, array('format.depth' => 0, 'id' => false));
if (is_array($attribs) && func_num_arg... | php | public static function genericlist($data, $name, $attribs = null, $optKey = 'value', $optText = 'text', $selected = null, $idtag = false,
$translate = false)
{
// Set default options
$options = array_merge(self::$formatOptions, array('format.depth' => 0, 'id' => false));
if (is_array($attribs) && func_num_arg... | [
"public",
"static",
"function",
"genericlist",
"(",
"$",
"data",
",",
"$",
"name",
",",
"$",
"attribs",
"=",
"null",
",",
"$",
"optKey",
"=",
"'value'",
",",
"$",
"optText",
"=",
"'text'",
",",
"$",
"selected",
"=",
"null",
",",
"$",
"idtag",
"=",
... | Generates an HTML selection list.
@param array $data An array of objects, arrays, or scalars.
@param string $name The value of the HTML name attribute.
@param mixed $attribs Additional HTML attributes for the <select> tag. This
can be an array of attributes, or an array of options. Treated... | [
"Generates",
"an",
"HTML",
"selection",
"list",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Form/Html/Select.php#L94-L143 |
189,777 | joomla/joomla-framework | src/Joomla/View/AbstractHtmlView.php | AbstractHtmlView.getPath | public function getPath($layout, $ext = 'php')
{
// Get the layout file name.
$file = Path::clean($layout . '.' . $ext);
// Find the layout file path.
$path = Path::find(clone($this->paths), $file);
return $path;
} | php | public function getPath($layout, $ext = 'php')
{
// Get the layout file name.
$file = Path::clean($layout . '.' . $ext);
// Find the layout file path.
$path = Path::find(clone($this->paths), $file);
return $path;
} | [
"public",
"function",
"getPath",
"(",
"$",
"layout",
",",
"$",
"ext",
"=",
"'php'",
")",
"{",
"// Get the layout file name.",
"$",
"file",
"=",
"Path",
"::",
"clean",
"(",
"$",
"layout",
".",
"'.'",
".",
"$",
"ext",
")",
";",
"// Find the layout file path.... | Method to get the layout path.
@param string $layout The base name of the layout file (excluding extension).
@param string $ext The extension of the layout file (default: "php").
@return mixed The layout file name if found, false otherwise.
@since 1.0 | [
"Method",
"to",
"get",
"the",
"layout",
"path",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/View/AbstractHtmlView.php#L103-L112 |
189,778 | joomla/joomla-framework | src/Joomla/View/AbstractHtmlView.php | AbstractHtmlView.render | public function render()
{
// Get the layout path.
$path = $this->getPath($this->getLayout());
// Check if the layout path was found.
if (!$path)
{
throw new \RuntimeException('Layout Path Not Found');
}
// Start an output buffer.
ob_start();
// Load the layout.
include $path;
// Get the l... | php | public function render()
{
// Get the layout path.
$path = $this->getPath($this->getLayout());
// Check if the layout path was found.
if (!$path)
{
throw new \RuntimeException('Layout Path Not Found');
}
// Start an output buffer.
ob_start();
// Load the layout.
include $path;
// Get the l... | [
"public",
"function",
"render",
"(",
")",
"{",
"// Get the layout path.",
"$",
"path",
"=",
"$",
"this",
"->",
"getPath",
"(",
"$",
"this",
"->",
"getLayout",
"(",
")",
")",
";",
"// Check if the layout path was found.",
"if",
"(",
"!",
"$",
"path",
")",
"... | Method to render the view.
@return string The rendered view.
@since 1.0
@throws \RuntimeException | [
"Method",
"to",
"render",
"the",
"view",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/View/AbstractHtmlView.php#L134-L155 |
189,779 | joomla/joomla-framework | src/Joomla/Google/Google.php | Google.data | public function data($name, $options = null, $auth = null)
{
if ($this->options && !$options)
{
$options = $this->options;
}
if ($this->auth && !$auth)
{
$auth = $this->auth;
}
switch (strtolower($name))
{
case 'plus':
return new Data\Plus($options, $auth);
case 'picasa':
return ... | php | public function data($name, $options = null, $auth = null)
{
if ($this->options && !$options)
{
$options = $this->options;
}
if ($this->auth && !$auth)
{
$auth = $this->auth;
}
switch (strtolower($name))
{
case 'plus':
return new Data\Plus($options, $auth);
case 'picasa':
return ... | [
"public",
"function",
"data",
"(",
"$",
"name",
",",
"$",
"options",
"=",
"null",
",",
"$",
"auth",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"options",
"&&",
"!",
"$",
"options",
")",
"{",
"$",
"options",
"=",
"$",
"this",
"->",
"op... | Method to create Data objects
@param string $name Name of property to retrieve
@param array $options Google options object.
@param Auth $auth The authentication client object.
@return Data Google data API object.
@since 1.0 | [
"Method",
"to",
"create",
"Data",
"objects"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Google/Google.php#L70-L99 |
189,780 | joomla/joomla-framework | src/Joomla/Google/Google.php | Google.embed | public function embed($name, $options = null)
{
if ($this->options && !$options)
{
$options = $this->options;
}
switch (strtolower($name))
{
case 'maps':
return new Embed\Maps($options);
case 'analytics':
return new Embed\Analytics($options);
default:
return null;
}
} | php | public function embed($name, $options = null)
{
if ($this->options && !$options)
{
$options = $this->options;
}
switch (strtolower($name))
{
case 'maps':
return new Embed\Maps($options);
case 'analytics':
return new Embed\Analytics($options);
default:
return null;
}
} | [
"public",
"function",
"embed",
"(",
"$",
"name",
",",
"$",
"options",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"options",
"&&",
"!",
"$",
"options",
")",
"{",
"$",
"options",
"=",
"$",
"this",
"->",
"options",
";",
"}",
"switch",
"(",... | Method to create Embed objects
@param string $name Name of property to retrieve
@param array $options Google options object.
@return Embed Google embed API object.
@since 1.0 | [
"Method",
"to",
"create",
"Embed",
"objects"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Google/Google.php#L111-L129 |
189,781 | joomla/joomla-framework | src/Joomla/Application/AbstractDaemonApplication.php | AbstractDaemonApplication.execute | public function execute()
{
// @event onBeforeExecute
// Enable basic garbage collection.
gc_enable();
$this->getLogger()->info('Starting ' . $this->name);
// Set off the process for becoming a daemon.
if ($this->daemonize())
{
// Declare ticks to start signal monitoring. When you declare ticks, PC... | php | public function execute()
{
// @event onBeforeExecute
// Enable basic garbage collection.
gc_enable();
$this->getLogger()->info('Starting ' . $this->name);
// Set off the process for becoming a daemon.
if ($this->daemonize())
{
// Declare ticks to start signal monitoring. When you declare ticks, PC... | [
"public",
"function",
"execute",
"(",
")",
"{",
"// @event onBeforeExecute",
"// Enable basic garbage collection.",
"gc_enable",
"(",
")",
";",
"$",
"this",
"->",
"getLogger",
"(",
")",
"->",
"info",
"(",
"'Starting '",
".",
"$",
"this",
"->",
"name",
")",
";"... | Execute the daemon.
@return void
@since 1.0 | [
"Execute",
"the",
"daemon",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Application/AbstractDaemonApplication.php#L368-L404 |
189,782 | joomla/joomla-framework | src/Joomla/Application/AbstractDaemonApplication.php | AbstractDaemonApplication.daemonize | protected function daemonize()
{
// Is there already an active daemon running?
if ($this->isActive())
{
$this->getLogger()->emergency($this->name . ' daemon is still running. Exiting the application.');
return false;
}
// Reset Process Information
$this->safeMode = !!@ ini_get('safe_mode');
$this... | php | protected function daemonize()
{
// Is there already an active daemon running?
if ($this->isActive())
{
$this->getLogger()->emergency($this->name . ' daemon is still running. Exiting the application.');
return false;
}
// Reset Process Information
$this->safeMode = !!@ ini_get('safe_mode');
$this... | [
"protected",
"function",
"daemonize",
"(",
")",
"{",
"// Is there already an active daemon running?",
"if",
"(",
"$",
"this",
"->",
"isActive",
"(",
")",
")",
"{",
"$",
"this",
"->",
"getLogger",
"(",
")",
"->",
"emergency",
"(",
"$",
"this",
"->",
"name",
... | Method to put the application into the background.
@return boolean
@since 1.0
@throws \RuntimeException | [
"Method",
"to",
"put",
"the",
"application",
"into",
"the",
"background",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Application/AbstractDaemonApplication.php#L508-L595 |
189,783 | joomla/joomla-framework | src/Joomla/Google/Data/Picasa.php | Picasa.getAlbum | public function getAlbum($url)
{
if ($this->isAuthenticated())
{
$jdata = $this->query($url, null, array('GData-Version' => 2));
$xml = $this->safeXML($jdata->body);
return new Picasa\Album($xml, $this->options, $this->auth);
}
else
{
return false;
}
} | php | public function getAlbum($url)
{
if ($this->isAuthenticated())
{
$jdata = $this->query($url, null, array('GData-Version' => 2));
$xml = $this->safeXML($jdata->body);
return new Picasa\Album($xml, $this->options, $this->auth);
}
else
{
return false;
}
} | [
"public",
"function",
"getAlbum",
"(",
"$",
"url",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isAuthenticated",
"(",
")",
")",
"{",
"$",
"jdata",
"=",
"$",
"this",
"->",
"query",
"(",
"$",
"url",
",",
"null",
",",
"array",
"(",
"'GData-Version'",
"=>... | Get Picasa Album
@param string $url URL of album to get
@return mixed Data from Google
@since 1.0
@throws \UnexpectedValueException | [
"Get",
"Picasa",
"Album"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Google/Data/Picasa.php#L137-L150 |
189,784 | joomla/joomla-framework | src/Joomla/Database/Postgresql/PostgresqlQuery.php | PostgresqlQuery.limit | public function limit($limit = 0)
{
if (is_null($this->limit))
{
$this->limit = new QueryElement('LIMIT', (int) $limit);
}
return $this;
} | php | public function limit($limit = 0)
{
if (is_null($this->limit))
{
$this->limit = new QueryElement('LIMIT', (int) $limit);
}
return $this;
} | [
"public",
"function",
"limit",
"(",
"$",
"limit",
"=",
"0",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"limit",
")",
")",
"{",
"$",
"this",
"->",
"limit",
"=",
"new",
"QueryElement",
"(",
"'LIMIT'",
",",
"(",
"int",
")",
"$",
"limit"... | Set the LIMIT clause to the query
@param integer $limit Number of rows to return
@return PostgresqlQuery Returns this object to allow chaining.
@since 1.0 | [
"Set",
"the",
"LIMIT",
"clause",
"to",
"the",
"query"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Database/Postgresql/PostgresqlQuery.php#L512-L520 |
189,785 | joomla/joomla-framework | src/Joomla/Filesystem/Stream/String.php | String.stream_open | public function stream_open($path, $mode, $options, &$opened_path)
{
$this->currentString = &StringController::getRef(str_replace('string://', '', $path));
if ($this->currentString)
{
$this->len = strlen($this->currentString);
$this->pos = 0;
$this->stat = $this->url_stat($path, 0);
return true;
... | php | public function stream_open($path, $mode, $options, &$opened_path)
{
$this->currentString = &StringController::getRef(str_replace('string://', '', $path));
if ($this->currentString)
{
$this->len = strlen($this->currentString);
$this->pos = 0;
$this->stat = $this->url_stat($path, 0);
return true;
... | [
"public",
"function",
"stream_open",
"(",
"$",
"path",
",",
"$",
"mode",
",",
"$",
"options",
",",
"&",
"$",
"opened_path",
")",
"{",
"$",
"this",
"->",
"currentString",
"=",
"&",
"StringController",
"::",
"getRef",
"(",
"str_replace",
"(",
"'string://'",
... | Method to open a file or URL.
@param string $path The stream path.
@param string $mode Not used.
@param integer $options Not used.
@param string &$opened_path Not used.
@return boolean
@since 1.0 | [
"Method",
"to",
"open",
"a",
"file",
"or",
"URL",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Filesystem/Stream/String.php#L106-L122 |
189,786 | joomla/joomla-framework | src/Joomla/Facebook/Note.php | Note.createComment | public function createComment($note, $message)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
return $this->createConnection($note, 'comments', $data);
} | php | public function createComment($note, $message)
{
// Set POST request parameters.
$data = array();
$data['message'] = $message;
return $this->createConnection($note, 'comments', $data);
} | [
"public",
"function",
"createComment",
"(",
"$",
"note",
",",
"$",
"message",
")",
"{",
"// Set POST request parameters.",
"$",
"data",
"=",
"array",
"(",
")",
";",
"$",
"data",
"[",
"'message'",
"]",
"=",
"$",
"message",
";",
"return",
"$",
"this",
"->"... | Method to comment on a note. Requires authentication and publish_stream and user_notes or friends_notes permissions.
@param string $note The note id.
@param string $message The comment's text.
@return mixed The decoded JSON response or false if the client is not authenticated.
@since 1.0 | [
"Method",
"to",
"comment",
"on",
"a",
"note",
".",
"Requires",
"authentication",
"and",
"publish_stream",
"and",
"user_notes",
"or",
"friends_notes",
"permissions",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Facebook/Note.php#L61-L68 |
189,787 | joomla/joomla-framework | src/Joomla/Google/Data/Adsense.php | Adsense.getChannel | public function getChannel($accountID, $adclientID, $channelID)
{
if ($this->isAuthenticated())
{
$url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . '/adclients/';
$url .= urlencode($adclientID) . '/customchannels/' . urlencode($channelID);
$jdata = $this->query($url);
... | php | public function getChannel($accountID, $adclientID, $channelID)
{
if ($this->isAuthenticated())
{
$url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . '/adclients/';
$url .= urlencode($adclientID) . '/customchannels/' . urlencode($channelID);
$jdata = $this->query($url);
... | [
"public",
"function",
"getChannel",
"(",
"$",
"accountID",
",",
"$",
"adclientID",
",",
"$",
"channelID",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isAuthenticated",
"(",
")",
")",
"{",
"$",
"url",
"=",
"'https://www.googleapis.com/adsense/v1.1/accounts/'",
"."... | Method to get an Adsense Channel
@param string $accountID ID of account to get
@param string $adclientID ID of client to get
@param string $channelID ID of channel to get
@return mixed Data from Google
@since 1.0
@throws UnexpectedValueException | [
"Method",
"to",
"get",
"an",
"Adsense",
"Channel"
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Google/Data/Adsense.php#L209-L230 |
189,788 | joomla/joomla-framework | src/Joomla/Github/Package/Repositories/Downloads.php | Downloads.getList | public function getList($owner, $repo)
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/downloads';
// Send the request.
return $this->processResponse(
$this->client->get($this->fetchUrl($path))
);
} | php | public function getList($owner, $repo)
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/downloads';
// Send the request.
return $this->processResponse(
$this->client->get($this->fetchUrl($path))
);
} | [
"public",
"function",
"getList",
"(",
"$",
"owner",
",",
"$",
"repo",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/repos/'",
".",
"$",
"owner",
".",
"'/'",
".",
"$",
"repo",
".",
"'/downloads'",
";",
"// Send the request.",
"return",
"$",
"... | List downloads for a repository.
@param string $owner The name of the owner of the GitHub repository.
@param string $repo The name of the GitHub repository.
@since 1.0
@return object | [
"List",
"downloads",
"for",
"a",
"repository",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Repositories/Downloads.php#L36-L45 |
189,789 | joomla/joomla-framework | src/Joomla/Github/Package/Data/Blobs.php | Blobs.create | public function create($owner, $repo, $content, $encoding = 'utf-8')
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/git/blobs';
$data = array(
'content' => $content,
'encoding' => $encoding
);
return $this->processResponse(
$this->client->post($this->fetchUrl($path), js... | php | public function create($owner, $repo, $content, $encoding = 'utf-8')
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/git/blobs';
$data = array(
'content' => $content,
'encoding' => $encoding
);
return $this->processResponse(
$this->client->post($this->fetchUrl($path), js... | [
"public",
"function",
"create",
"(",
"$",
"owner",
",",
"$",
"repo",
",",
"$",
"content",
",",
"$",
"encoding",
"=",
"'utf-8'",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/repos/'",
".",
"$",
"owner",
".",
"'/'",
".",
"$",
"repo",
".",... | Create a Blob.
@param string $owner Repository owner.
@param string $repo Repository name.
@param string $content The content of the blob.
@param string $encoding The encoding to use.
@return object
@since 1.0 | [
"Create",
"a",
"Blob",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Data/Blobs.php#L59-L73 |
189,790 | joomla/joomla-framework | src/Joomla/Github/Package/Activity/Notifications.php | Notifications.getListRepository | public function getListRepository($owner, $repo, $all = true, $participating = true, Date $since = null)
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/notifications?';
$path .= ($all) ? '&all=1' : '';
$path .= ($participating) ? '&participating=1' : '';
$path .= ($since) ? '&sinc... | php | public function getListRepository($owner, $repo, $all = true, $participating = true, Date $since = null)
{
// Build the request path.
$path = '/repos/' . $owner . '/' . $repo . '/notifications?';
$path .= ($all) ? '&all=1' : '';
$path .= ($participating) ? '&participating=1' : '';
$path .= ($since) ? '&sinc... | [
"public",
"function",
"getListRepository",
"(",
"$",
"owner",
",",
"$",
"repo",
",",
"$",
"all",
"=",
"true",
",",
"$",
"participating",
"=",
"true",
",",
"Date",
"$",
"since",
"=",
"null",
")",
"{",
"// Build the request path.",
"$",
"path",
"=",
"'/rep... | List your notifications in a repository.
List all notifications for the current user.
@param string $owner Repository owner.
@param string $repo Repository name.
@param boolean $all True to show notifications marked as read.
@param boolean $participating True to show only ... | [
"List",
"your",
"notifications",
"in",
"a",
"repository",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Github/Package/Activity/Notifications.php#L69-L81 |
189,791 | joomla/joomla-framework | src/Joomla/Google/Data/Plus/Activities.php | Activities.listActivities | public function listActivities($userId, $collection, $fields = null, $max = 10, $token = null, $alt = null)
{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'people/' . $userId . '/activities/' . $collection;
// Check if fields is specified.
if ($fields)
{
$url .= '?fields=' ... | php | public function listActivities($userId, $collection, $fields = null, $max = 10, $token = null, $alt = null)
{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'people/' . $userId . '/activities/' . $collection;
// Check if fields is specified.
if ($fields)
{
$url .= '?fields=' ... | [
"public",
"function",
"listActivities",
"(",
"$",
"userId",
",",
"$",
"collection",
",",
"$",
"fields",
"=",
"null",
",",
"$",
"max",
"=",
"10",
",",
"$",
"token",
"=",
"null",
",",
"$",
"alt",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",... | List all of the activities in the specified collection for a particular user.
@param string $userId The ID of the user to get activities for. The special value "me" can be used to indicate the authenticated user.
@param string $collection The collection of activities to list. Acceptable values are: "publ... | [
"List",
"all",
"of",
"the",
"activities",
"in",
"the",
"specified",
"collection",
"for",
"a",
"particular",
"user",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Google/Data/Plus/Activities.php#L55-L96 |
189,792 | joomla/joomla-framework | src/Joomla/Google/Data/Plus/Activities.php | Activities.getActivity | public function getActivity($id, $fields = null, $alt = null)
{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'activities/' . $id;
// Check if fields is specified.
if ($fields)
{
$url .= '?fields=' . $fields;
}
// Check if alt is specified.
if ($alt)
{
$url ... | php | public function getActivity($id, $fields = null, $alt = null)
{
if ($this->isAuthenticated())
{
$url = $this->getOption('api.url') . 'activities/' . $id;
// Check if fields is specified.
if ($fields)
{
$url .= '?fields=' . $fields;
}
// Check if alt is specified.
if ($alt)
{
$url ... | [
"public",
"function",
"getActivity",
"(",
"$",
"id",
",",
"$",
"fields",
"=",
"null",
",",
"$",
"alt",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isAuthenticated",
"(",
")",
")",
"{",
"$",
"url",
"=",
"$",
"this",
"->",
"getOption",
"(... | Get an activity.
@param string $id The ID of the activity to get.
@param string $fields Used to specify the fields you want returned.
@param string $alt Specifies an alternative representation type. Acceptable values are: "json" - Use JSON format (default)
@return mixed Data from Google
@since ... | [
"Get",
"an",
"activity",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Google/Data/Plus/Activities.php#L109-L136 |
189,793 | joomla/joomla-framework | src/Joomla/Image/Image.php | Image.getImageFileProperties | public static function getImageFileProperties($path)
{
// Make sure the file exists.
if (!file_exists($path))
{
throw new \InvalidArgumentException('The image file does not exist.');
}
// Get the image file information.
$info = getimagesize($path);
if (!$info)
{
// @codeCoverageIgnoreStart
t... | php | public static function getImageFileProperties($path)
{
// Make sure the file exists.
if (!file_exists($path))
{
throw new \InvalidArgumentException('The image file does not exist.');
}
// Get the image file information.
$info = getimagesize($path);
if (!$info)
{
// @codeCoverageIgnoreStart
t... | [
"public",
"static",
"function",
"getImageFileProperties",
"(",
"$",
"path",
")",
"{",
"// Make sure the file exists.",
"if",
"(",
"!",
"file_exists",
"(",
"$",
"path",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'The image file does not ex... | Method to return a properties object for an image given a filesystem path. The
result object has values for image width, height, type, attributes, mime type, bits,
and channels.
@param string $path The filesystem path to the image for which to get properties.
@return \stdClass
@since 1.0
@throws \InvalidArg... | [
"Method",
"to",
"return",
"a",
"properties",
"object",
"for",
"an",
"image",
"given",
"a",
"filesystem",
"path",
".",
"The",
"result",
"object",
"has",
"values",
"for",
"image",
"width",
"height",
"type",
"attributes",
"mime",
"type",
"bits",
"and",
"channel... | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Image/Image.php#L169-L200 |
189,794 | joomla/joomla-framework | src/Joomla/Image/Image.php | Image.generateThumbs | public function generateThumbs($thumbSizes, $creationMethod = self::SCALE_INSIDE)
{
// Make sure the resource handle is valid.
if (!$this->isLoaded())
{
throw new \LogicException('No valid image was loaded.');
}
// Accept a single thumbsize string as parameter
if (!is_array($thumbSizes))
{
$thumbS... | php | public function generateThumbs($thumbSizes, $creationMethod = self::SCALE_INSIDE)
{
// Make sure the resource handle is valid.
if (!$this->isLoaded())
{
throw new \LogicException('No valid image was loaded.');
}
// Accept a single thumbsize string as parameter
if (!is_array($thumbSizes))
{
$thumbS... | [
"public",
"function",
"generateThumbs",
"(",
"$",
"thumbSizes",
",",
"$",
"creationMethod",
"=",
"self",
"::",
"SCALE_INSIDE",
")",
"{",
"// Make sure the resource handle is valid.",
"if",
"(",
"!",
"$",
"this",
"->",
"isLoaded",
"(",
")",
")",
"{",
"throw",
"... | Method to generate thumbnails from the current image. It allows
creation by resizing or cropping the original image.
@param mixed $thumbSizes String or array of strings. Example: $thumbSizes = array('150x75','250x150');
@param integer $creationMethod 1-3 resize $scaleMethod | 4 create croppping | 5 resiz... | [
"Method",
"to",
"generate",
"thumbnails",
"from",
"the",
"current",
"image",
".",
"It",
"allows",
"creation",
"by",
"resizing",
"or",
"cropping",
"the",
"original",
"image",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Image/Image.php#L215-L270 |
189,795 | joomla/joomla-framework | src/Joomla/Image/Image.php | Image.getFilterInstance | protected function getFilterInstance($type)
{
// Sanitize the filter type.
$type = strtolower(preg_replace('#[^A-Z0-9_]#i', '', $type));
// Verify that the filter type exists.
$className = 'Joomla\\Image\\Filter\\' . ucfirst($type);
if (!class_exists($className))
{
$this->getLogger()->error('The ' . u... | php | protected function getFilterInstance($type)
{
// Sanitize the filter type.
$type = strtolower(preg_replace('#[^A-Z0-9_]#i', '', $type));
// Verify that the filter type exists.
$className = 'Joomla\\Image\\Filter\\' . ucfirst($type);
if (!class_exists($className))
{
$this->getLogger()->error('The ' . u... | [
"protected",
"function",
"getFilterInstance",
"(",
"$",
"type",
")",
"{",
"// Sanitize the filter type.",
"$",
"type",
"=",
"strtolower",
"(",
"preg_replace",
"(",
"'#[^A-Z0-9_]#i'",
",",
"''",
",",
"$",
"type",
")",
")",
";",
"// Verify that the filter type exists.... | Method to get an image filter instance of a specified type.
@param string $type The image filter type to get.
@return ImageFilter
@since 1.0
@throws \RuntimeException | [
"Method",
"to",
"get",
"an",
"image",
"filter",
"instance",
"of",
"a",
"specified",
"type",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Image/Image.php#L910-L940 |
189,796 | joomla/joomla-framework | src/Joomla/Image/Image.php | Image.prepareDimensions | protected function prepareDimensions($width, $height, $scaleMethod)
{
// Instantiate variables.
$dimensions = new \stdClass;
switch ($scaleMethod)
{
case self::SCALE_FILL:
$dimensions->width = (int) round($width);
$dimensions->height = (int) round($height);
break;
case self::SCALE_INSIDE:
... | php | protected function prepareDimensions($width, $height, $scaleMethod)
{
// Instantiate variables.
$dimensions = new \stdClass;
switch ($scaleMethod)
{
case self::SCALE_FILL:
$dimensions->width = (int) round($width);
$dimensions->height = (int) round($height);
break;
case self::SCALE_INSIDE:
... | [
"protected",
"function",
"prepareDimensions",
"(",
"$",
"width",
",",
"$",
"height",
",",
"$",
"scaleMethod",
")",
"{",
"// Instantiate variables.",
"$",
"dimensions",
"=",
"new",
"\\",
"stdClass",
";",
"switch",
"(",
"$",
"scaleMethod",
")",
"{",
"case",
"s... | Method to get the new dimensions for a resized image.
@param integer $width The width of the resized image in pixels.
@param integer $height The height of the resized image in pixels.
@param integer $scaleMethod The method to use for scaling
@return \stdClass
@since 1.0
@throws \InvalidArg... | [
"Method",
"to",
"get",
"the",
"new",
"dimensions",
"for",
"a",
"resized",
"image",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Image/Image.php#L954-L991 |
189,797 | joomla/joomla-framework | src/Joomla/Image/Image.php | Image.sanitizeHeight | protected function sanitizeHeight($height, $width)
{
// If no height was given we will assume it is a square and use the width.
$height = ($height === null) ? $width : $height;
// If we were given a percentage, calculate the integer value.
if (preg_match('/^[0-9]+(\.[0-9]+)?\%$/', $height))
{
$height = (... | php | protected function sanitizeHeight($height, $width)
{
// If no height was given we will assume it is a square and use the width.
$height = ($height === null) ? $width : $height;
// If we were given a percentage, calculate the integer value.
if (preg_match('/^[0-9]+(\.[0-9]+)?\%$/', $height))
{
$height = (... | [
"protected",
"function",
"sanitizeHeight",
"(",
"$",
"height",
",",
"$",
"width",
")",
"{",
"// If no height was given we will assume it is a square and use the width.",
"$",
"height",
"=",
"(",
"$",
"height",
"===",
"null",
")",
"?",
"$",
"width",
":",
"$",
"heig... | Method to sanitize a height value.
@param mixed $height The input height value to sanitize.
@param mixed $width The input width value for reference.
@return integer
@since 1.0 | [
"Method",
"to",
"sanitize",
"a",
"height",
"value",
"."
] | 7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7 | https://github.com/joomla/joomla-framework/blob/7f2f8e43c44a93f908aef8abd5ff5d9cfdf0f9d7/src/Joomla/Image/Image.php#L1003-L1020 |
189,798 | dudapiotr/ZfTable | src/ZfTable/Header.php | Header.addDecorator | public function addDecorator($name, $options = array())
{
$decorator = DecoratorFactory::factoryHeader($name, $options);
$this->attachDecorator($decorator);
$decorator->setHeader($this);
return $decorator;
} | php | public function addDecorator($name, $options = array())
{
$decorator = DecoratorFactory::factoryHeader($name, $options);
$this->attachDecorator($decorator);
$decorator->setHeader($this);
return $decorator;
} | [
"public",
"function",
"addDecorator",
"(",
"$",
"name",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"decorator",
"=",
"DecoratorFactory",
"::",
"factoryHeader",
"(",
"$",
"name",
",",
"$",
"options",
")",
";",
"$",
"this",
"->",
"attach... | Set options like title, width, order, sortable
@param string $name
@param array $options
@return Decorator\Header\AbstractHeaderDecorator | [
"Set",
"options",
"like",
"title",
"width",
"order",
"sortable"
] | 8c7750c10d16137208d055345ca81c7d845e59d2 | https://github.com/dudapiotr/ZfTable/blob/8c7750c10d16137208d055345ca81c7d845e59d2/src/ZfTable/Header.php#L111-L117 |
189,799 | dudapiotr/ZfTable | src/ZfTable/Header.php | Header.setOptions | public function setOptions($options)
{
$this->title = (isset($options['title'])) ? $options['title'] : '';
$this->width = (isset($options['width'])) ? $options['width'] : '';
$this->order = (isset($options['order'])) ? $options['order'] : true;
$this->sortable = (isset($options['sort... | php | public function setOptions($options)
{
$this->title = (isset($options['title'])) ? $options['title'] : '';
$this->width = (isset($options['width'])) ? $options['width'] : '';
$this->order = (isset($options['order'])) ? $options['order'] : true;
$this->sortable = (isset($options['sort... | [
"public",
"function",
"setOptions",
"(",
"$",
"options",
")",
"{",
"$",
"this",
"->",
"title",
"=",
"(",
"isset",
"(",
"$",
"options",
"[",
"'title'",
"]",
")",
")",
"?",
"$",
"options",
"[",
"'title'",
"]",
":",
"''",
";",
"$",
"this",
"->",
"wi... | Set options like title, width, order
@param array $options
@return $this | [
"Set",
"options",
"like",
"title",
"width",
"order"
] | 8c7750c10d16137208d055345ca81c7d845e59d2 | https://github.com/dudapiotr/ZfTable/blob/8c7750c10d16137208d055345ca81c7d845e59d2/src/ZfTable/Header.php#L125-L141 |
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.