repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
Behat/MinkExtension
src/Behat/MinkExtension/Context/MinkContext.php
MinkContext.assertElementNotContainsText
public function assertElementNotContainsText($element, $text) { $this->assertSession()->elementTextNotContains('css', $element, $this->fixStepArgument($text)); }
php
public function assertElementNotContainsText($element, $text) { $this->assertSession()->elementTextNotContains('css', $element, $this->fixStepArgument($text)); }
[ "public", "function", "assertElementNotContainsText", "(", "$", "element", ",", "$", "text", ")", "{", "$", "this", "->", "assertSession", "(", ")", "->", "elementTextNotContains", "(", "'css'", ",", "$", "element", ",", "$", "this", "->", "fixStepArgument", ...
Checks, that element with specified CSS doesn't contain specified text Example: Then I should not see "Bruce Wayne" in the "heroes_alter_egos" element Example: And I should not see "Bruce Wayne" in the "heroes_alter_egos" element @Then /^(?:|I )should not see "(?P<text>(?:[^"]|\\")*)" in the "(?P<element>[^"]*)" element$/
[ "Checks", "that", "element", "with", "specified", "CSS", "doesn", "t", "contain", "specified", "text", "Example", ":", "Then", "I", "should", "not", "see", "Bruce", "Wayne", "in", "the", "heroes_alter_egos", "element", "Example", ":", "And", "I", "should", "...
train
https://github.com/Behat/MinkExtension/blob/80f7849ba53867181b7e412df9210e12fba50177/src/Behat/MinkExtension/Context/MinkContext.php#L374-L377
Behat/MinkExtension
src/Behat/MinkExtension/Context/MinkContext.php
MinkContext.assertElementContains
public function assertElementContains($element, $value) { $this->assertSession()->elementContains('css', $element, $this->fixStepArgument($value)); }
php
public function assertElementContains($element, $value) { $this->assertSession()->elementContains('css', $element, $this->fixStepArgument($value)); }
[ "public", "function", "assertElementContains", "(", "$", "element", ",", "$", "value", ")", "{", "$", "this", "->", "assertSession", "(", ")", "->", "elementContains", "(", "'css'", ",", "$", "element", ",", "$", "this", "->", "fixStepArgument", "(", "$", ...
Checks, that element with specified CSS contains specified HTML Example: Then the "body" element should contain "style=\"color:black;\"" Example: And the "body" element should contain "style=\"color:black;\"" @Then /^the "(?P<element>[^"]*)" element should contain "(?P<value>(?:[^"]|\\")*)"$/
[ "Checks", "that", "element", "with", "specified", "CSS", "contains", "specified", "HTML", "Example", ":", "Then", "the", "body", "element", "should", "contain", "style", "=", "\\", "color", ":", "black", ";", "\\", "Example", ":", "And", "the", "body", "el...
train
https://github.com/Behat/MinkExtension/blob/80f7849ba53867181b7e412df9210e12fba50177/src/Behat/MinkExtension/Context/MinkContext.php#L386-L389
Behat/MinkExtension
src/Behat/MinkExtension/Context/MinkContext.php
MinkContext.assertElementNotContains
public function assertElementNotContains($element, $value) { $this->assertSession()->elementNotContains('css', $element, $this->fixStepArgument($value)); }
php
public function assertElementNotContains($element, $value) { $this->assertSession()->elementNotContains('css', $element, $this->fixStepArgument($value)); }
[ "public", "function", "assertElementNotContains", "(", "$", "element", ",", "$", "value", ")", "{", "$", "this", "->", "assertSession", "(", ")", "->", "elementNotContains", "(", "'css'", ",", "$", "element", ",", "$", "this", "->", "fixStepArgument", "(", ...
Checks, that element with specified CSS doesn't contain specified HTML Example: Then the "body" element should not contain "style=\"color:black;\"" Example: And the "body" element should not contain "style=\"color:black;\"" @Then /^the "(?P<element>[^"]*)" element should not contain "(?P<value>(?:[^"]|\\")*)"$/
[ "Checks", "that", "element", "with", "specified", "CSS", "doesn", "t", "contain", "specified", "HTML", "Example", ":", "Then", "the", "body", "element", "should", "not", "contain", "style", "=", "\\", "color", ":", "black", ";", "\\", "Example", ":", "And"...
train
https://github.com/Behat/MinkExtension/blob/80f7849ba53867181b7e412df9210e12fba50177/src/Behat/MinkExtension/Context/MinkContext.php#L398-L401
Behat/MinkExtension
src/Behat/MinkExtension/Context/MinkContext.php
MinkContext.assertFieldContains
public function assertFieldContains($field, $value) { $field = $this->fixStepArgument($field); $value = $this->fixStepArgument($value); $this->assertSession()->fieldValueEquals($field, $value); }
php
public function assertFieldContains($field, $value) { $field = $this->fixStepArgument($field); $value = $this->fixStepArgument($value); $this->assertSession()->fieldValueEquals($field, $value); }
[ "public", "function", "assertFieldContains", "(", "$", "field", ",", "$", "value", ")", "{", "$", "field", "=", "$", "this", "->", "fixStepArgument", "(", "$", "field", ")", ";", "$", "value", "=", "$", "this", "->", "fixStepArgument", "(", "$", "value...
Checks, that form field with specified id|name|label|value has specified value Example: Then the "username" field should contain "bwayne" Example: And the "username" field should contain "bwayne" @Then /^the "(?P<field>(?:[^"]|\\")*)" field should contain "(?P<value>(?:[^"]|\\")*)"$/
[ "Checks", "that", "form", "field", "with", "specified", "id|name|label|value", "has", "specified", "value", "Example", ":", "Then", "the", "username", "field", "should", "contain", "bwayne", "Example", ":", "And", "the", "username", "field", "should", "contain", ...
train
https://github.com/Behat/MinkExtension/blob/80f7849ba53867181b7e412df9210e12fba50177/src/Behat/MinkExtension/Context/MinkContext.php#L434-L439
Behat/MinkExtension
src/Behat/MinkExtension/Context/MinkContext.php
MinkContext.assertFieldNotContains
public function assertFieldNotContains($field, $value) { $field = $this->fixStepArgument($field); $value = $this->fixStepArgument($value); $this->assertSession()->fieldValueNotEquals($field, $value); }
php
public function assertFieldNotContains($field, $value) { $field = $this->fixStepArgument($field); $value = $this->fixStepArgument($value); $this->assertSession()->fieldValueNotEquals($field, $value); }
[ "public", "function", "assertFieldNotContains", "(", "$", "field", ",", "$", "value", ")", "{", "$", "field", "=", "$", "this", "->", "fixStepArgument", "(", "$", "field", ")", ";", "$", "value", "=", "$", "this", "->", "fixStepArgument", "(", "$", "va...
Checks, that form field with specified id|name|label|value doesn't have specified value Example: Then the "username" field should not contain "batman" Example: And the "username" field should not contain "batman" @Then /^the "(?P<field>(?:[^"]|\\")*)" field should not contain "(?P<value>(?:[^"]|\\")*)"$/
[ "Checks", "that", "form", "field", "with", "specified", "id|name|label|value", "doesn", "t", "have", "specified", "value", "Example", ":", "Then", "the", "username", "field", "should", "not", "contain", "batman", "Example", ":", "And", "the", "username", "field"...
train
https://github.com/Behat/MinkExtension/blob/80f7849ba53867181b7e412df9210e12fba50177/src/Behat/MinkExtension/Context/MinkContext.php#L448-L453
Behat/MinkExtension
src/Behat/MinkExtension/Context/MinkContext.php
MinkContext.showLastResponse
public function showLastResponse() { if (null === $this->getMinkParameter('show_cmd')) { throw new \RuntimeException('Set "show_cmd" parameter in behat.yml to be able to open page in browser (ex.: "show_cmd: firefox %s")'); } $filename = rtrim($this->getMinkParameter('show_tmp_dir'), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.uniqid().'.html'; file_put_contents($filename, $this->getSession()->getPage()->getContent()); system(sprintf($this->getMinkParameter('show_cmd'), escapeshellarg($filename))); }
php
public function showLastResponse() { if (null === $this->getMinkParameter('show_cmd')) { throw new \RuntimeException('Set "show_cmd" parameter in behat.yml to be able to open page in browser (ex.: "show_cmd: firefox %s")'); } $filename = rtrim($this->getMinkParameter('show_tmp_dir'), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.uniqid().'.html'; file_put_contents($filename, $this->getSession()->getPage()->getContent()); system(sprintf($this->getMinkParameter('show_cmd'), escapeshellarg($filename))); }
[ "public", "function", "showLastResponse", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "getMinkParameter", "(", "'show_cmd'", ")", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "'Set \"show_cmd\" parameter in behat.yml to be able to open page...
Opens last response content in browser Example: Then show last response Example: And show last response @Then /^show last response$/
[ "Opens", "last", "response", "content", "in", "browser", "Example", ":", "Then", "show", "last", "response", "Example", ":", "And", "show", "last", "response" ]
train
https://github.com/Behat/MinkExtension/blob/80f7849ba53867181b7e412df9210e12fba50177/src/Behat/MinkExtension/Context/MinkContext.php#L531-L540
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Signal.php
TeamSpeak3_Helper_Signal.emit
public function emit($signal, $params = null) { if(!$this->hasHandlers($signal)) { return; } if(!is_array($params)) { $params = func_get_args(); $params = array_slice($params, 1); } foreach($this->sigslots[$signal] as $slot) { $return = $slot->call($params); } return $return; }
php
public function emit($signal, $params = null) { if(!$this->hasHandlers($signal)) { return; } if(!is_array($params)) { $params = func_get_args(); $params = array_slice($params, 1); } foreach($this->sigslots[$signal] as $slot) { $return = $slot->call($params); } return $return; }
[ "public", "function", "emit", "(", "$", "signal", ",", "$", "params", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "hasHandlers", "(", "$", "signal", ")", ")", "{", "return", ";", "}", "if", "(", "!", "is_array", "(", "$", "params", ...
Emits a signal with a given set of parameters. @todo: Confirm / fix $return is set to last $slot->call() return value. It appears all previous calls before last are lost / ignored. @param string $signal @param mixed $params @return mixed
[ "Emits", "a", "signal", "with", "a", "given", "set", "of", "parameters", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Signal.php#L55-L74
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Signal.php
TeamSpeak3_Helper_Signal.subscribe
public function subscribe($signal, $callback) { if(empty($this->sigslots[$signal])) { $this->sigslots[$signal] = array(); } $index = $this->getCallbackHash($callback); if(!array_key_exists($index, $this->sigslots[$signal])) { $this->sigslots[$signal][$index] = new TeamSpeak3_Helper_Signal_Handler($signal, $callback); } return $this->sigslots[$signal][$index]; }
php
public function subscribe($signal, $callback) { if(empty($this->sigslots[$signal])) { $this->sigslots[$signal] = array(); } $index = $this->getCallbackHash($callback); if(!array_key_exists($index, $this->sigslots[$signal])) { $this->sigslots[$signal][$index] = new TeamSpeak3_Helper_Signal_Handler($signal, $callback); } return $this->sigslots[$signal][$index]; }
[ "public", "function", "subscribe", "(", "$", "signal", ",", "$", "callback", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "sigslots", "[", "$", "signal", "]", ")", ")", "{", "$", "this", "->", "sigslots", "[", "$", "signal", "]", "=", "a...
Subscribes to a signal and returns the signal handler. @param string $signal @param mixed $callback @return TeamSpeak3_Helper_Signal_Handler
[ "Subscribes", "to", "a", "signal", "and", "returns", "the", "signal", "handler", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Signal.php#L100-L115
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Signal.php
TeamSpeak3_Helper_Signal.unsubscribe
public function unsubscribe($signal, $callback = null) { if(!$this->hasHandlers($signal)) { return; } if($callback !== null) { $index = $this->getCallbackHash($callback); if(!array_key_exists($index, $this->sigslots[$signal])) { return; } unset($this->sigslots[$signal][$index]); } else { unset($this->sigslots[$signal]); } }
php
public function unsubscribe($signal, $callback = null) { if(!$this->hasHandlers($signal)) { return; } if($callback !== null) { $index = $this->getCallbackHash($callback); if(!array_key_exists($index, $this->sigslots[$signal])) { return; } unset($this->sigslots[$signal][$index]); } else { unset($this->sigslots[$signal]); } }
[ "public", "function", "unsubscribe", "(", "$", "signal", ",", "$", "callback", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "hasHandlers", "(", "$", "signal", ")", ")", "{", "return", ";", "}", "if", "(", "$", "callback", "!==", "null"...
Unsubscribes from a signal. @param string $signal @param mixed $callback @return void
[ "Unsubscribes", "from", "a", "signal", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Signal.php#L124-L146
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Viewer/Text.php
TeamSpeak3_Viewer_Text.fetchObject
public function fetchObject(TeamSpeak3_Node_Abstract $node, array $siblings = array()) { $this->currObj = $node; $this->currSib = $siblings; $args = array( $this->getPrefix(), $this->getCorpusIcon(), $this->getCorpusName(), ); return TeamSpeak3_Helper_String::factory($this->pattern)->arg($args); }
php
public function fetchObject(TeamSpeak3_Node_Abstract $node, array $siblings = array()) { $this->currObj = $node; $this->currSib = $siblings; $args = array( $this->getPrefix(), $this->getCorpusIcon(), $this->getCorpusName(), ); return TeamSpeak3_Helper_String::factory($this->pattern)->arg($args); }
[ "public", "function", "fetchObject", "(", "TeamSpeak3_Node_Abstract", "$", "node", ",", "array", "$", "siblings", "=", "array", "(", ")", ")", "{", "$", "this", "->", "currObj", "=", "$", "node", ";", "$", "this", "->", "currSib", "=", "$", "siblings", ...
Returns the code needed to display a node in a TeamSpeak 3 viewer. @param TeamSpeak3_Node_Abstract $node @param array $siblings @return string
[ "Returns", "the", "code", "needed", "to", "display", "a", "node", "in", "a", "TeamSpeak", "3", "viewer", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Viewer/Text.php#L45-L57
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Viewer/Text.php
TeamSpeak3_Viewer_Text.getPrefix
protected function getPrefix() { $prefix = ""; if(count($this->currSib)) { $last = array_pop($this->currSib); foreach($this->currSib as $sibling) { $prefix .= ($sibling) ? "| " : " "; } $prefix .= ($last) ? "\\-" : "|-"; } return $prefix; }
php
protected function getPrefix() { $prefix = ""; if(count($this->currSib)) { $last = array_pop($this->currSib); foreach($this->currSib as $sibling) { $prefix .= ($sibling) ? "| " : " "; } $prefix .= ($last) ? "\\-" : "|-"; } return $prefix; }
[ "protected", "function", "getPrefix", "(", ")", "{", "$", "prefix", "=", "\"\"", ";", "if", "(", "count", "(", "$", "this", "->", "currSib", ")", ")", "{", "$", "last", "=", "array_pop", "(", "$", "this", "->", "currSib", ")", ";", "foreach", "(", ...
Returns the ASCII string to display the prefix of the current node. @return string
[ "Returns", "the", "ASCII", "string", "to", "display", "the", "prefix", "of", "the", "current", "node", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Viewer/Text.php#L64-L81
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Abstract.php
TeamSpeak3_Node_Abstract.iconGetName
public function iconGetName($key) { $iconid = ($this[$key] < 0) ? (pow(2, 32))-($this[$key]*-1) : $this[$key]; return new TeamSpeak3_Helper_String("/icon_" . $iconid); }
php
public function iconGetName($key) { $iconid = ($this[$key] < 0) ? (pow(2, 32))-($this[$key]*-1) : $this[$key]; return new TeamSpeak3_Helper_String("/icon_" . $iconid); }
[ "public", "function", "iconGetName", "(", "$", "key", ")", "{", "$", "iconid", "=", "(", "$", "this", "[", "$", "key", "]", "<", "0", ")", "?", "(", "pow", "(", "2", ",", "32", ")", ")", "-", "(", "$", "this", "[", "$", "key", "]", "*", "...
Returns the internal path of the node icon. @param string $key @return TeamSpeak3_Helper_String
[ "Returns", "the", "internal", "path", "of", "the", "node", "icon", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Abstract.php#L135-L140
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Abstract.php
TeamSpeak3_Node_Abstract.getClass
public function getClass($prefix = "ts3_") { if($this instanceof TeamSpeak3_Node_Channel && $this->isSpacer()) { return $prefix . "spacer"; } elseif($this instanceof TeamSpeak3_Node_Client && $this["client_type"]) { return $prefix . "query"; } return $prefix . TeamSpeak3_Helper_String::factory(get_class($this))->section("_", 2)->toLower(); }
php
public function getClass($prefix = "ts3_") { if($this instanceof TeamSpeak3_Node_Channel && $this->isSpacer()) { return $prefix . "spacer"; } elseif($this instanceof TeamSpeak3_Node_Client && $this["client_type"]) { return $prefix . "query"; } return $prefix . TeamSpeak3_Helper_String::factory(get_class($this))->section("_", 2)->toLower(); }
[ "public", "function", "getClass", "(", "$", "prefix", "=", "\"ts3_\"", ")", "{", "if", "(", "$", "this", "instanceof", "TeamSpeak3_Node_Channel", "&&", "$", "this", "->", "isSpacer", "(", ")", ")", "{", "return", "$", "prefix", ".", "\"spacer\"", ";", "}...
Returns a possible classname for the node which can be used as a HTML property. @param string $prefix @return string
[ "Returns", "a", "possible", "classname", "for", "the", "node", "which", "can", "be", "used", "as", "a", "HTML", "property", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Abstract.php#L148-L160
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Abstract.php
TeamSpeak3_Node_Abstract.getProperty
public function getProperty($property, $default = null) { if(!$this->offsetExists($property)) { $this->fetchNodeInfo(); } if(!$this->offsetExists($property)) { return $default; } return $this->nodeInfo[(string) $property]; }
php
public function getProperty($property, $default = null) { if(!$this->offsetExists($property)) { $this->fetchNodeInfo(); } if(!$this->offsetExists($property)) { return $default; } return $this->nodeInfo[(string) $property]; }
[ "public", "function", "getProperty", "(", "$", "property", ",", "$", "default", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "offsetExists", "(", "$", "property", ")", ")", "{", "$", "this", "->", "fetchNodeInfo", "(", ")", ";", "}", "...
Returns the specified property or a pre-defined default value from the node info array. @param string $property @param mixed $default @return mixed
[ "Returns", "the", "specified", "property", "or", "a", "pre", "-", "defined", "default", "value", "from", "the", "node", "info", "array", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Abstract.php#L323-L336
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Abstract.php
TeamSpeak3_Node_Abstract.getStorage
protected function getStorage($key, $default = null) { return !empty($this->storage[$key]) ? $this->storage[$key] : $default; }
php
protected function getStorage($key, $default = null) { return !empty($this->storage[$key]) ? $this->storage[$key] : $default; }
[ "protected", "function", "getStorage", "(", "$", "key", ",", "$", "default", "=", "null", ")", "{", "return", "!", "empty", "(", "$", "this", "->", "storage", "[", "$", "key", "]", ")", "?", "$", "this", "->", "storage", "[", "$", "key", "]", ":"...
Returns data from the internal storage array. @param string $key @param mixed $default @return mixed
[ "Returns", "data", "from", "the", "internal", "storage", "array", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Abstract.php#L405-L408
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Transport/UDP.php
TeamSpeak3_Transport_UDP.disconnect
public function disconnect() { if($this->stream === null) return; $this->stream = null; TeamSpeak3_Helper_Signal::getInstance()->emit(strtolower($this->getAdapterType()) . "Disconnected"); }
php
public function disconnect() { if($this->stream === null) return; $this->stream = null; TeamSpeak3_Helper_Signal::getInstance()->emit(strtolower($this->getAdapterType()) . "Disconnected"); }
[ "public", "function", "disconnect", "(", ")", "{", "if", "(", "$", "this", "->", "stream", "===", "null", ")", "return", ";", "$", "this", "->", "stream", "=", "null", ";", "TeamSpeak3_Helper_Signal", "::", "getInstance", "(", ")", "->", "emit", "(", "...
Disconnects from a remote server. @return void
[ "Disconnects", "from", "a", "remote", "server", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Transport/UDP.php#L63-L70
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Transport/UDP.php
TeamSpeak3_Transport_UDP.read
public function read($length = 4096) { $this->connect(); $this->waitForReadyRead(); $data = @fread($this->stream, $length); TeamSpeak3_Helper_Signal::getInstance()->emit(strtolower($this->getAdapterType()) . "DataRead", $data); if($data === FALSE) { throw new TeamSpeak3_Transport_Exception("connection to server '" . $this->config["host"] . ":" . $this->config["port"] . "' lost"); } return new TeamSpeak3_Helper_String($data); }
php
public function read($length = 4096) { $this->connect(); $this->waitForReadyRead(); $data = @fread($this->stream, $length); TeamSpeak3_Helper_Signal::getInstance()->emit(strtolower($this->getAdapterType()) . "DataRead", $data); if($data === FALSE) { throw new TeamSpeak3_Transport_Exception("connection to server '" . $this->config["host"] . ":" . $this->config["port"] . "' lost"); } return new TeamSpeak3_Helper_String($data); }
[ "public", "function", "read", "(", "$", "length", "=", "4096", ")", "{", "$", "this", "->", "connect", "(", ")", ";", "$", "this", "->", "waitForReadyRead", "(", ")", ";", "$", "data", "=", "@", "fread", "(", "$", "this", "->", "stream", ",", "$"...
Reads data from the stream. @param integer $length @throws TeamSpeak3_Transport_Exception @return TeamSpeak3_Helper_String
[ "Reads", "data", "from", "the", "stream", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Transport/UDP.php#L79-L94
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Client.php
TeamSpeak3_Node_Client.modify
public function modify(array $properties) { $properties["clid"] = $this->getId(); $this->execute("clientedit", $properties); $this->resetNodeInfo(); }
php
public function modify(array $properties) { $properties["clid"] = $this->getId(); $this->execute("clientedit", $properties); $this->resetNodeInfo(); }
[ "public", "function", "modify", "(", "array", "$", "properties", ")", "{", "$", "properties", "[", "\"clid\"", "]", "=", "$", "this", "->", "getId", "(", ")", ";", "$", "this", "->", "execute", "(", "\"clientedit\"", ",", "$", "properties", ")", ";", ...
Changes the clients properties using given properties. @param array $properties @return void
[ "Changes", "the", "clients", "properties", "using", "given", "properties", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Client.php#L59-L65
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Client.php
TeamSpeak3_Node_Client.move
public function move($cid, $cpw = null) { $this->getParent()->clientMove($this->getId(), $cid, $cpw); }
php
public function move($cid, $cpw = null) { $this->getParent()->clientMove($this->getId(), $cid, $cpw); }
[ "public", "function", "move", "(", "$", "cid", ",", "$", "cpw", "=", "null", ")", "{", "$", "this", "->", "getParent", "(", ")", "->", "clientMove", "(", "$", "this", "->", "getId", "(", ")", ",", "$", "cid", ",", "$", "cpw", ")", ";", "}" ]
Moves the client to another channel. @param integer $cid @param string $cpw @return void
[ "Moves", "the", "client", "to", "another", "channel", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Client.php#L116-L119
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Client.php
TeamSpeak3_Node_Client.kick
public function kick($reasonid = TeamSpeak3::KICK_CHANNEL, $reasonmsg = null) { $this->getParent()->clientKick($this->getId(), $reasonid, $reasonmsg); }
php
public function kick($reasonid = TeamSpeak3::KICK_CHANNEL, $reasonmsg = null) { $this->getParent()->clientKick($this->getId(), $reasonid, $reasonmsg); }
[ "public", "function", "kick", "(", "$", "reasonid", "=", "TeamSpeak3", "::", "KICK_CHANNEL", ",", "$", "reasonmsg", "=", "null", ")", "{", "$", "this", "->", "getParent", "(", ")", "->", "clientKick", "(", "$", "this", "->", "getId", "(", ")", ",", "...
Kicks the client from his currently joined channel or from the server. @param integer $reasonid @param string $reasonmsg @return void
[ "Kicks", "the", "client", "from", "his", "currently", "joined", "channel", "or", "from", "the", "server", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Client.php#L128-L131
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Client.php
TeamSpeak3_Node_Client.ban
public function ban($timeseconds = null, $reason = null) { return $this->getParent()->clientBan($this->getId(), $timeseconds, $reason); }
php
public function ban($timeseconds = null, $reason = null) { return $this->getParent()->clientBan($this->getId(), $timeseconds, $reason); }
[ "public", "function", "ban", "(", "$", "timeseconds", "=", "null", ",", "$", "reason", "=", "null", ")", "{", "return", "$", "this", "->", "getParent", "(", ")", "->", "clientBan", "(", "$", "this", "->", "getId", "(", ")", ",", "$", "timeseconds", ...
Bans the client from the server. Please note that this will create two separate ban rules for the targeted clients IP address and his unique identifier. @param integer $timeseconds @param string $reason @return array
[ "Bans", "the", "client", "from", "the", "server", ".", "Please", "note", "that", "this", "will", "create", "two", "separate", "ban", "rules", "for", "the", "targeted", "clients", "IP", "address", "and", "his", "unique", "identifier", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Client.php#L152-L155
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Client.php
TeamSpeak3_Node_Client.permAssign
public function permAssign($permid, $permvalue, $permskip = FALSE) { $this->getParent()->clientPermAssign($this["client_database_id"], $permid, $permvalue, $permskip); }
php
public function permAssign($permid, $permvalue, $permskip = FALSE) { $this->getParent()->clientPermAssign($this["client_database_id"], $permid, $permvalue, $permskip); }
[ "public", "function", "permAssign", "(", "$", "permid", ",", "$", "permvalue", ",", "$", "permskip", "=", "FALSE", ")", "{", "$", "this", "->", "getParent", "(", ")", "->", "clientPermAssign", "(", "$", "this", "[", "\"client_database_id\"", "]", ",", "$...
Adds a set of specified permissions to the client. Multiple permissions can be added by providing the three parameters of each permission. @param integer $permid @param integer $permvalue @param integer $permskip @return void
[ "Adds", "a", "set", "of", "specified", "permissions", "to", "the", "client", ".", "Multiple", "permissions", "can", "be", "added", "by", "providing", "the", "three", "parameters", "of", "each", "permission", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Client.php#L221-L224
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Client.php
TeamSpeak3_Node_Client.avatarDownload
public function avatarDownload() { if($this["client_flag_avatar"] == NULL) return; $download = $this->getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->avatarGetName()); $transfer = TeamSpeak3::factory("filetransfer://" . (strstr($download["host"], ":") !== FALSE ? "[" . $download["host"] . "]" : $download["host"]) . ":" . $download["port"]); return $transfer->download($download["ftkey"], $download["size"]); }
php
public function avatarDownload() { if($this["client_flag_avatar"] == NULL) return; $download = $this->getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->avatarGetName()); $transfer = TeamSpeak3::factory("filetransfer://" . (strstr($download["host"], ":") !== FALSE ? "[" . $download["host"] . "]" : $download["host"]) . ":" . $download["port"]); return $transfer->download($download["ftkey"], $download["size"]); }
[ "public", "function", "avatarDownload", "(", ")", "{", "if", "(", "$", "this", "[", "\"client_flag_avatar\"", "]", "==", "NULL", ")", "return", ";", "$", "download", "=", "$", "this", "->", "getParent", "(", ")", "->", "transferInitDownload", "(", "rand", ...
Downloads and returns the clients avatar file content. @return TeamSpeak3_Helper_String
[ "Downloads", "and", "returns", "the", "clients", "avatar", "file", "content", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Client.php#L306-L314
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Client.php
TeamSpeak3_Node_Client.getBadges
public function getBadges() { $badges = array(); foreach(explode(":", $this["client_badges"]) as $set) { if(substr($set, 0, 7) == "badges=") { $badges[] = array_map("trim", explode(",", substr($set, 7))); } } return $badges; }
php
public function getBadges() { $badges = array(); foreach(explode(":", $this["client_badges"]) as $set) { if(substr($set, 0, 7) == "badges=") { $badges[] = array_map("trim", explode(",", substr($set, 7))); } } return $badges; }
[ "public", "function", "getBadges", "(", ")", "{", "$", "badges", "=", "array", "(", ")", ";", "foreach", "(", "explode", "(", "\":\"", ",", "$", "this", "[", "\"client_badges\"", "]", ")", "as", "$", "set", ")", "{", "if", "(", "substr", "(", "$", ...
Returns a list of equipped badges for this client. @return array
[ "Returns", "a", "list", "of", "equipped", "badges", "for", "this", "client", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Client.php#L341-L354
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Client.php
TeamSpeak3_Node_Client.memberOf
public function memberOf() { $cgroups = array($this->getParent()->channelGroupGetById($this["client_channel_group_id"])); $sgroups = array(); foreach(explode(",", $this["client_servergroups"]) as $sgid) { $sgroups[] = $this->getParent()->serverGroupGetById($sgid); } uasort($sgroups, array(__CLASS__, "sortGroupList")); return array_merge($cgroups, $sgroups); }
php
public function memberOf() { $cgroups = array($this->getParent()->channelGroupGetById($this["client_channel_group_id"])); $sgroups = array(); foreach(explode(",", $this["client_servergroups"]) as $sgid) { $sgroups[] = $this->getParent()->serverGroupGetById($sgid); } uasort($sgroups, array(__CLASS__, "sortGroupList")); return array_merge($cgroups, $sgroups); }
[ "public", "function", "memberOf", "(", ")", "{", "$", "cgroups", "=", "array", "(", "$", "this", "->", "getParent", "(", ")", "->", "channelGroupGetById", "(", "$", "this", "[", "\"client_channel_group_id\"", "]", ")", ")", ";", "$", "sgroups", "=", "arr...
Returns all server and channel groups the client is currently residing in. @return array
[ "Returns", "all", "server", "and", "channel", "groups", "the", "client", "is", "currently", "residing", "in", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Client.php#L371-L384
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Client.php
TeamSpeak3_Node_Client.sendPluginCmd
public function sendPluginCmd($plugin, $data) { $this->execute("plugincmd", array("name" => $plugin, "data" => $data, "targetmode" => TeamSpeak3::PLUGINCMD_CLIENT, "target" => $this->getId())); }
php
public function sendPluginCmd($plugin, $data) { $this->execute("plugincmd", array("name" => $plugin, "data" => $data, "targetmode" => TeamSpeak3::PLUGINCMD_CLIENT, "target" => $this->getId())); }
[ "public", "function", "sendPluginCmd", "(", "$", "plugin", ",", "$", "data", ")", "{", "$", "this", "->", "execute", "(", "\"plugincmd\"", ",", "array", "(", "\"name\"", "=>", "$", "plugin", ",", "\"data\"", "=>", "$", "data", ",", "\"targetmode\"", "=>"...
Sends a plugin command to the client. @param string $plugin @param string $data @return void
[ "Sends", "a", "plugin", "command", "to", "the", "client", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Client.php#L408-L411
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Client.php
TeamSpeak3_Node_Client.getIcon
public function getIcon() { if($this["client_type"]) { return "client_query"; } elseif($this["client_away"]) { return "client_away"; } elseif(!$this["client_output_hardware"]) { return "client_snd_disabled"; } elseif($this["client_output_muted"]) { return "client_snd_muted"; } elseif(!$this["client_input_hardware"]) { return "client_mic_disabled"; } elseif($this["client_input_muted"]) { return "client_mic_muted"; } elseif($this["client_is_channel_commander"]) { return $this["client_flag_talking"] ? "client_cc_talk" : "client_cc_idle"; } else { return $this["client_flag_talking"] ? "client_talk" : "client_idle"; } }
php
public function getIcon() { if($this["client_type"]) { return "client_query"; } elseif($this["client_away"]) { return "client_away"; } elseif(!$this["client_output_hardware"]) { return "client_snd_disabled"; } elseif($this["client_output_muted"]) { return "client_snd_muted"; } elseif(!$this["client_input_hardware"]) { return "client_mic_disabled"; } elseif($this["client_input_muted"]) { return "client_mic_muted"; } elseif($this["client_is_channel_commander"]) { return $this["client_flag_talking"] ? "client_cc_talk" : "client_cc_idle"; } else { return $this["client_flag_talking"] ? "client_talk" : "client_idle"; } }
[ "public", "function", "getIcon", "(", ")", "{", "if", "(", "$", "this", "[", "\"client_type\"", "]", ")", "{", "return", "\"client_query\"", ";", "}", "elseif", "(", "$", "this", "[", "\"client_away\"", "]", ")", "{", "return", "\"client_away\"", ";", "}...
Returns the name of a possible icon to display the node object. @return string
[ "Returns", "the", "name", "of", "a", "possible", "icon", "to", "display", "the", "node", "object", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Client.php#L438-L472
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Uri.php
TeamSpeak3_Helper_Uri.isValid
public function isValid() { return ($this->checkUser() && $this->checkPass() && $this->checkHost() && $this->checkPort() && $this->checkPath() && $this->checkQuery() && $this->checkFragment()); }
php
public function isValid() { return ($this->checkUser() && $this->checkPass() && $this->checkHost() && $this->checkPort() && $this->checkPath() && $this->checkQuery() && $this->checkFragment()); }
[ "public", "function", "isValid", "(", ")", "{", "return", "(", "$", "this", "->", "checkUser", "(", ")", "&&", "$", "this", "->", "checkPass", "(", ")", "&&", "$", "this", "->", "checkHost", "(", ")", "&&", "$", "this", "->", "checkPort", "(", ")",...
Validate the current URI from the instance variables. @return boolean
[ "Validate", "the", "current", "URI", "from", "the", "instance", "variables", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Uri.php#L175-L178
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Uri.php
TeamSpeak3_Helper_Uri.checkUser
public function checkUser($username = null) { if($username === null) { $username = $this->user; } if(strlen($username) == 0) { return TRUE; } $pattern = "/^(" . $this->regex["alphanum"] . "|" . $this->regex["mark"] . "|" . $this->regex["escaped"] . "|[;:&=+$,])+$/"; $status = @preg_match($pattern, $username); if($status === FALSE) { throw new TeamSpeak3_Helper_Exception("URI username validation failed"); } return ($status == 1); }
php
public function checkUser($username = null) { if($username === null) { $username = $this->user; } if(strlen($username) == 0) { return TRUE; } $pattern = "/^(" . $this->regex["alphanum"] . "|" . $this->regex["mark"] . "|" . $this->regex["escaped"] . "|[;:&=+$,])+$/"; $status = @preg_match($pattern, $username); if($status === FALSE) { throw new TeamSpeak3_Helper_Exception("URI username validation failed"); } return ($status == 1); }
[ "public", "function", "checkUser", "(", "$", "username", "=", "null", ")", "{", "if", "(", "$", "username", "===", "null", ")", "{", "$", "username", "=", "$", "this", "->", "user", ";", "}", "if", "(", "strlen", "(", "$", "username", ")", "==", ...
Returns TRUE if the username is valid. @param string $username @throws TeamSpeak3_Helper_Exception @return boolean
[ "Returns", "TRUE", "if", "the", "username", "is", "valid", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Uri.php#L228-L249
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Uri.php
TeamSpeak3_Helper_Uri.checkPass
public function checkPass($password = null) { if($password === null) { $password = $this->pass; } if(strlen($password) == 0) { return TRUE; } $pattern = "/^(" . $this->regex["alphanum"] . "|" . $this->regex["mark"] . "|" . $this->regex["escaped"] . "|[;:&=+$,])+$/"; $status = @preg_match($pattern, $password); if($status === FALSE) { throw new TeamSpeak3_Helper_Exception("URI password validation failed"); } return ($status == 1); }
php
public function checkPass($password = null) { if($password === null) { $password = $this->pass; } if(strlen($password) == 0) { return TRUE; } $pattern = "/^(" . $this->regex["alphanum"] . "|" . $this->regex["mark"] . "|" . $this->regex["escaped"] . "|[;:&=+$,])+$/"; $status = @preg_match($pattern, $password); if($status === FALSE) { throw new TeamSpeak3_Helper_Exception("URI password validation failed"); } return ($status == 1); }
[ "public", "function", "checkPass", "(", "$", "password", "=", "null", ")", "{", "if", "(", "$", "password", "===", "null", ")", "{", "$", "password", "=", "$", "this", "->", "pass", ";", "}", "if", "(", "strlen", "(", "$", "password", ")", "==", ...
Returns TRUE if the password is valid. @param string $password @throws TeamSpeak3_Helper_Exception @return boolean
[ "Returns", "TRUE", "if", "the", "password", "is", "valid", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Uri.php#L279-L299
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Uri.php
TeamSpeak3_Helper_Uri.checkQuery
public function checkQuery($query = null) { if($query === null) { $query = $this->query; } if(strlen($query) == 0) { return TRUE; } $pattern = "/^" . $this->regex["uric"] . "*$/"; $status = @preg_match($pattern, $query); if($status === FALSE) { throw new TeamSpeak3_Helper_Exception("URI query string validation failed"); } return ($status == 1); }
php
public function checkQuery($query = null) { if($query === null) { $query = $this->query; } if(strlen($query) == 0) { return TRUE; } $pattern = "/^" . $this->regex["uric"] . "*$/"; $status = @preg_match($pattern, $query); if($status === FALSE) { throw new TeamSpeak3_Helper_Exception("URI query string validation failed"); } return ($status == 1); }
[ "public", "function", "checkQuery", "(", "$", "query", "=", "null", ")", "{", "if", "(", "$", "query", "===", "null", ")", "{", "$", "query", "=", "$", "this", "->", "query", ";", "}", "if", "(", "strlen", "(", "$", "query", ")", "==", "0", ")"...
Returns TRUE if the query string is valid. @param string $query @throws TeamSpeak3_Helper_Exception @return boolean
[ "Returns", "TRUE", "if", "the", "query", "string", "is", "valid", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Uri.php#L460-L481
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Uri.php
TeamSpeak3_Helper_Uri.hasQueryVar
public function hasQueryVar($key) { if(!$this->hasQuery()) return FALSE; parse_str($this->query, $queryArray); return array_key_exists($key, $queryArray) ? TRUE : FALSE; }
php
public function hasQueryVar($key) { if(!$this->hasQuery()) return FALSE; parse_str($this->query, $queryArray); return array_key_exists($key, $queryArray) ? TRUE : FALSE; }
[ "public", "function", "hasQueryVar", "(", "$", "key", ")", "{", "if", "(", "!", "$", "this", "->", "hasQuery", "(", ")", ")", "return", "FALSE", ";", "parse_str", "(", "$", "this", "->", "query", ",", "$", "queryArray", ")", ";", "return", "array_key...
Returns TRUE if the URI has a query variable. @return boolean
[ "Returns", "TRUE", "if", "the", "URI", "has", "a", "query", "variable", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Uri.php#L516-L523
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Uri.php
TeamSpeak3_Helper_Uri.checkFragment
public function checkFragment($fragment = null) { if($fragment === null) { $fragment = $this->fragment; } if(strlen($fragment) == 0) { return TRUE; } $pattern = "/^" . $this->regex["uric"] . "*$/"; $status = @preg_match($pattern, $fragment); if($status === FALSE) { throw new TeamSpeak3_Helper_Exception("URI fragment validation failed"); } return ($status == 1); }
php
public function checkFragment($fragment = null) { if($fragment === null) { $fragment = $this->fragment; } if(strlen($fragment) == 0) { return TRUE; } $pattern = "/^" . $this->regex["uric"] . "*$/"; $status = @preg_match($pattern, $fragment); if($status === FALSE) { throw new TeamSpeak3_Helper_Exception("URI fragment validation failed"); } return ($status == 1); }
[ "public", "function", "checkFragment", "(", "$", "fragment", "=", "null", ")", "{", "if", "(", "$", "fragment", "===", "null", ")", "{", "$", "fragment", "=", "$", "this", "->", "fragment", ";", "}", "if", "(", "strlen", "(", "$", "fragment", ")", ...
Returns TRUE if the fragment string is valid. @param string $fragment @throws TeamSpeak3_Helper_Exception @return boolean
[ "Returns", "TRUE", "if", "the", "fragment", "string", "is", "valid", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Uri.php#L566-L587
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Uri.php
TeamSpeak3_Helper_Uri.getUserParam
public static function getUserParam($key, $default = null) { return (array_key_exists($key, $_REQUEST) && !empty($_REQUEST[$key])) ? self::stripslashesRecursive($_REQUEST[$key]) : $default; }
php
public static function getUserParam($key, $default = null) { return (array_key_exists($key, $_REQUEST) && !empty($_REQUEST[$key])) ? self::stripslashesRecursive($_REQUEST[$key]) : $default; }
[ "public", "static", "function", "getUserParam", "(", "$", "key", ",", "$", "default", "=", "null", ")", "{", "return", "(", "array_key_exists", "(", "$", "key", ",", "$", "_REQUEST", ")", "&&", "!", "empty", "(", "$", "_REQUEST", "[", "$", "key", "]"...
Returns a specified instance parameter from the $_REQUEST array. @param string $key @param mixed $default @return mixed
[ "Returns", "a", "specified", "instance", "parameter", "from", "the", "$_REQUEST", "array", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Uri.php#L617-L620
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Uri.php
TeamSpeak3_Helper_Uri.getHostParam
public static function getHostParam($key, $default = null) { return (array_key_exists($key, $_SERVER) && !empty($_SERVER[$key])) ? $_SERVER[$key] : $default; }
php
public static function getHostParam($key, $default = null) { return (array_key_exists($key, $_SERVER) && !empty($_SERVER[$key])) ? $_SERVER[$key] : $default; }
[ "public", "static", "function", "getHostParam", "(", "$", "key", ",", "$", "default", "=", "null", ")", "{", "return", "(", "array_key_exists", "(", "$", "key", ",", "$", "_SERVER", ")", "&&", "!", "empty", "(", "$", "_SERVER", "[", "$", "key", "]", ...
Returns a specified environment parameter from the $_SERVER array. @param string $key @param mixed $default @return mixed
[ "Returns", "a", "specified", "environment", "parameter", "from", "the", "$_SERVER", "array", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Uri.php#L629-L632
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Uri.php
TeamSpeak3_Helper_Uri.getSessParam
public static function getSessParam($key, $default = null) { return (array_key_exists($key, $_SESSION) && !empty($_SESSION[$key])) ? $_SESSION[$key] : $default; }
php
public static function getSessParam($key, $default = null) { return (array_key_exists($key, $_SESSION) && !empty($_SESSION[$key])) ? $_SESSION[$key] : $default; }
[ "public", "static", "function", "getSessParam", "(", "$", "key", ",", "$", "default", "=", "null", ")", "{", "return", "(", "array_key_exists", "(", "$", "key", ",", "$", "_SESSION", ")", "&&", "!", "empty", "(", "$", "_SESSION", "[", "$", "key", "]"...
Returns a specified session parameter from the $_SESSION array. @param string $key @param mixed $default @return mixed
[ "Returns", "a", "specified", "session", "parameter", "from", "the", "$_SESSION", "array", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Uri.php#L641-L644
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Uri.php
TeamSpeak3_Helper_Uri.getFQDNParts
public static function getFQDNParts($hostname) { if(!preg_match("/^([a-z0-9][a-z0-9-]{0,62}\.)*([a-z0-9][a-z0-9-]{0,62}\.)+([a-z]{2,6})$/i", $hostname, $matches)) { return array(); } $parts["tld"] = $matches[3]; $parts["2nd"] = $matches[2]; $parts["3rd"] = $matches[1]; return $parts; }
php
public static function getFQDNParts($hostname) { if(!preg_match("/^([a-z0-9][a-z0-9-]{0,62}\.)*([a-z0-9][a-z0-9-]{0,62}\.)+([a-z]{2,6})$/i", $hostname, $matches)) { return array(); } $parts["tld"] = $matches[3]; $parts["2nd"] = $matches[2]; $parts["3rd"] = $matches[1]; return $parts; }
[ "public", "static", "function", "getFQDNParts", "(", "$", "hostname", ")", "{", "if", "(", "!", "preg_match", "(", "\"/^([a-z0-9][a-z0-9-]{0,62}\\.)*([a-z0-9][a-z0-9-]{0,62}\\.)+([a-z]{2,6})$/i\"", ",", "$", "hostname", ",", "$", "matches", ")", ")", "{", "return", ...
Returns an array containing the three main parts of a FQDN (Fully Qualified Domain Name), including the top-level domain, the second-level domains or hostname and the third-level domain. @param string $hostname @return array
[ "Returns", "an", "array", "containing", "the", "three", "main", "parts", "of", "a", "FQDN", "(", "Fully", "Qualified", "Domain", "Name", ")", "including", "the", "top", "-", "level", "domain", "the", "second", "-", "level", "domains", "or", "hostname", "an...
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Uri.php#L653-L665
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.request
public function request($cmd, $throw = TRUE) { if($this->getId() != $this->getParent()->serverSelectedId()) { $this->getParent()->serverSelect($this->getId()); } return $this->getParent()->request($cmd, $throw); }
php
public function request($cmd, $throw = TRUE) { if($this->getId() != $this->getParent()->serverSelectedId()) { $this->getParent()->serverSelect($this->getId()); } return $this->getParent()->request($cmd, $throw); }
[ "public", "function", "request", "(", "$", "cmd", ",", "$", "throw", "=", "TRUE", ")", "{", "if", "(", "$", "this", "->", "getId", "(", ")", "!=", "$", "this", "->", "getParent", "(", ")", "->", "serverSelectedId", "(", ")", ")", "{", "$", "this"...
Sends a prepared command to the server and returns the result. @param string $cmd @param boolean $throw @return TeamSpeak3_Adapter_ServerQuery_Reply
[ "Sends", "a", "prepared", "command", "to", "the", "server", "and", "returns", "the", "result", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L80-L88
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelMove
public function channelMove($cid, $pid, $order = null) { $this->execute("channelmove", array("cid" => $cid, "cpid" => $pid, "order" => $order)); $this->channelListReset(); }
php
public function channelMove($cid, $pid, $order = null) { $this->execute("channelmove", array("cid" => $cid, "cpid" => $pid, "order" => $order)); $this->channelListReset(); }
[ "public", "function", "channelMove", "(", "$", "cid", ",", "$", "pid", ",", "$", "order", "=", "null", ")", "{", "$", "this", "->", "execute", "(", "\"channelmove\"", ",", "array", "(", "\"cid\"", "=>", "$", "cid", ",", "\"cpid\"", "=>", "$", "pid", ...
Moves the channel specified by $cid to the parent channel specified with $pid. @param integer $cid @param integer $pid @param integer $order @return void
[ "Moves", "the", "channel", "specified", "by", "$cid", "to", "the", "parent", "channel", "specified", "with", "$pid", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L187-L191
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelSpacerCreate
public function channelSpacerCreate($ident, $type = TeamSpeak3::SPACER_SOLIDLINE, $align = TeamSpeak3::SPACER_ALIGN_REPEAT, $order = null, $maxclients = 0) { $properties = array( "channel_name_phonetic" => "channel spacer", "channel_codec" => TeamSpeak3::CODEC_OPUS_VOICE, "channel_codec_quality" => 0x00, "channel_flag_permanent" => TRUE, "channel_flag_maxclients_unlimited" => FALSE, "channel_flag_maxfamilyclients_unlimited" => FALSE, "channel_flag_maxfamilyclients_inherited" => FALSE, "channel_maxclients" => $maxclients, "channel_order" => $order, ); switch($align) { case TeamSpeak3::SPACER_ALIGN_REPEAT: $properties["channel_name"] = "[*spacer" . strval($ident) . "]"; break; case TeamSpeak3::SPACER_ALIGN_LEFT: $properties["channel_name"] = "[lspacer" . strval($ident) . "]"; break; case TeamSpeak3::SPACER_ALIGN_RIGHT: $properties["channel_name"] = "[rspacer" . strval($ident) . "]"; break; case TeamSpeak3::SPACER_ALIGN_CENTER: $properties["channel_name"] = "[cspacer" . strval($ident) . "]"; break; default: throw new TeamSpeak3_Adapter_ServerQuery_Exception("missing required parameter", 0x606); break; } switch($type) { case (string) TeamSpeak3::SPACER_SOLIDLINE: $properties["channel_name"] .= "___"; break; case (string) TeamSpeak3::SPACER_DASHLINE: $properties["channel_name"] .= "---"; break; case (string) TeamSpeak3::SPACER_DOTLINE: $properties["channel_name"] .= "..."; break; case (string) TeamSpeak3::SPACER_DASHDOTLINE: $properties["channel_name"] .= "-.-"; break; case (string) TeamSpeak3::SPACER_DASHDOTDOTLINE: $properties["channel_name"] .= "-.."; break; default: $properties["channel_name"] .= strval($type); break; } return $this->channelCreate($properties); }
php
public function channelSpacerCreate($ident, $type = TeamSpeak3::SPACER_SOLIDLINE, $align = TeamSpeak3::SPACER_ALIGN_REPEAT, $order = null, $maxclients = 0) { $properties = array( "channel_name_phonetic" => "channel spacer", "channel_codec" => TeamSpeak3::CODEC_OPUS_VOICE, "channel_codec_quality" => 0x00, "channel_flag_permanent" => TRUE, "channel_flag_maxclients_unlimited" => FALSE, "channel_flag_maxfamilyclients_unlimited" => FALSE, "channel_flag_maxfamilyclients_inherited" => FALSE, "channel_maxclients" => $maxclients, "channel_order" => $order, ); switch($align) { case TeamSpeak3::SPACER_ALIGN_REPEAT: $properties["channel_name"] = "[*spacer" . strval($ident) . "]"; break; case TeamSpeak3::SPACER_ALIGN_LEFT: $properties["channel_name"] = "[lspacer" . strval($ident) . "]"; break; case TeamSpeak3::SPACER_ALIGN_RIGHT: $properties["channel_name"] = "[rspacer" . strval($ident) . "]"; break; case TeamSpeak3::SPACER_ALIGN_CENTER: $properties["channel_name"] = "[cspacer" . strval($ident) . "]"; break; default: throw new TeamSpeak3_Adapter_ServerQuery_Exception("missing required parameter", 0x606); break; } switch($type) { case (string) TeamSpeak3::SPACER_SOLIDLINE: $properties["channel_name"] .= "___"; break; case (string) TeamSpeak3::SPACER_DASHLINE: $properties["channel_name"] .= "---"; break; case (string) TeamSpeak3::SPACER_DOTLINE: $properties["channel_name"] .= "..."; break; case (string) TeamSpeak3::SPACER_DASHDOTLINE: $properties["channel_name"] .= "-.-"; break; case (string) TeamSpeak3::SPACER_DASHDOTDOTLINE: $properties["channel_name"] .= "-.."; break; default: $properties["channel_name"] .= strval($type); break; } return $this->channelCreate($properties); }
[ "public", "function", "channelSpacerCreate", "(", "$", "ident", ",", "$", "type", "=", "TeamSpeak3", "::", "SPACER_SOLIDLINE", ",", "$", "align", "=", "TeamSpeak3", "::", "SPACER_ALIGN_REPEAT", ",", "$", "order", "=", "null", ",", "$", "maxclients", "=", "0"...
Creates a new channel spacer and returns the new ID. The first parameter $ident is used to create a unique spacer name on the virtual server. @param string $ident @param mixed $type @param integer $align @param integer $order @param integer $maxclients @throws TeamSpeak3_Adapter_ServerQuery_Exception @return integer
[ "Creates", "a", "new", "channel", "spacer", "and", "returns", "the", "new", "ID", ".", "The", "first", "parameter", "$ident", "is", "used", "to", "create", "a", "unique", "spacer", "name", "on", "the", "virtual", "server", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L216-L281
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelSpacerGetType
public function channelSpacerGetType($cid) { $channel = $this->channelGetById($cid); if(!$this->channelIsSpacer($channel)) { throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid channel flags", 0x307); } switch($channel["channel_name"]->section("]", 1)) { case "___": return TeamSpeak3::SPACER_SOLIDLINE; case "---": return TeamSpeak3::SPACER_DASHLINE; case "...": return TeamSpeak3::SPACER_DOTLINE; case "-.-": return TeamSpeak3::SPACER_DASHDOTLINE; case "-..": return TeamSpeak3::SPACER_DASHDOTDOTLINE; default: return TeamSpeak3::SPACER_CUSTOM; } }
php
public function channelSpacerGetType($cid) { $channel = $this->channelGetById($cid); if(!$this->channelIsSpacer($channel)) { throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid channel flags", 0x307); } switch($channel["channel_name"]->section("]", 1)) { case "___": return TeamSpeak3::SPACER_SOLIDLINE; case "---": return TeamSpeak3::SPACER_DASHLINE; case "...": return TeamSpeak3::SPACER_DOTLINE; case "-.-": return TeamSpeak3::SPACER_DASHDOTLINE; case "-..": return TeamSpeak3::SPACER_DASHDOTDOTLINE; default: return TeamSpeak3::SPACER_CUSTOM; } }
[ "public", "function", "channelSpacerGetType", "(", "$", "cid", ")", "{", "$", "channel", "=", "$", "this", "->", "channelGetById", "(", "$", "cid", ")", ";", "if", "(", "!", "$", "this", "->", "channelIsSpacer", "(", "$", "channel", ")", ")", "{", "t...
Returns the possible type of a channel spacer. @param integer $cid @throws TeamSpeak3_Adapter_ServerQuery_Exception @return integer
[ "Returns", "the", "possible", "type", "of", "a", "channel", "spacer", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L290-L319
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelSpacerGetAlign
public function channelSpacerGetAlign($cid) { $channel = $this->channelGetById($cid); if(!$this->channelIsSpacer($channel) || !preg_match("/\[(.*)spacer.*\]/", $channel, $matches) || !isset($matches[1])) { throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid channel flags", 0x307); } switch($matches[1]) { case "*": return TeamSpeak3::SPACER_ALIGN_REPEAT; case "c": return TeamSpeak3::SPACER_ALIGN_CENTER; case "r": return TeamSpeak3::SPACER_ALIGN_RIGHT; default: return TeamSpeak3::SPACER_ALIGN_LEFT; } }
php
public function channelSpacerGetAlign($cid) { $channel = $this->channelGetById($cid); if(!$this->channelIsSpacer($channel) || !preg_match("/\[(.*)spacer.*\]/", $channel, $matches) || !isset($matches[1])) { throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid channel flags", 0x307); } switch($matches[1]) { case "*": return TeamSpeak3::SPACER_ALIGN_REPEAT; case "c": return TeamSpeak3::SPACER_ALIGN_CENTER; case "r": return TeamSpeak3::SPACER_ALIGN_RIGHT; default: return TeamSpeak3::SPACER_ALIGN_LEFT; } }
[ "public", "function", "channelSpacerGetAlign", "(", "$", "cid", ")", "{", "$", "channel", "=", "$", "this", "->", "channelGetById", "(", "$", "cid", ")", ";", "if", "(", "!", "$", "this", "->", "channelIsSpacer", "(", "$", "channel", ")", "||", "!", ...
Returns the possible alignment of a channel spacer. @param integer $cid @throws TeamSpeak3_Adapter_ServerQuery_Exception @return integer
[ "Returns", "the", "possible", "alignment", "of", "a", "channel", "spacer", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L328-L351
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelPermList
public function channelPermList($cid, $permsid = FALSE) { return $this->execute("channelpermlist", array("cid" => $cid, $permsid ? "-permsid" : null))->toAssocArray($permsid ? "permsid" : "permid"); }
php
public function channelPermList($cid, $permsid = FALSE) { return $this->execute("channelpermlist", array("cid" => $cid, $permsid ? "-permsid" : null))->toAssocArray($permsid ? "permsid" : "permid"); }
[ "public", "function", "channelPermList", "(", "$", "cid", ",", "$", "permsid", "=", "FALSE", ")", "{", "return", "$", "this", "->", "execute", "(", "\"channelpermlist\"", ",", "array", "(", "\"cid\"", "=>", "$", "cid", ",", "$", "permsid", "?", "\"-perms...
Returns a list of permissions defined for a specific channel. @param integer $cid @param boolean $permsid @return array
[ "Returns", "a", "list", "of", "permissions", "defined", "for", "a", "specific", "channel", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L360-L363
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelPermAssign
public function channelPermAssign($cid, $permid, $permvalue) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("channeladdperm", array("cid" => $cid, $permident => $permid, "permvalue" => $permvalue)); }
php
public function channelPermAssign($cid, $permid, $permvalue) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("channeladdperm", array("cid" => $cid, $permident => $permid, "permvalue" => $permvalue)); }
[ "public", "function", "channelPermAssign", "(", "$", "cid", ",", "$", "permid", ",", "$", "permvalue", ")", "{", "if", "(", "!", "is_array", "(", "$", "permid", ")", ")", "{", "$", "permident", "=", "(", "is_numeric", "(", "$", "permid", ")", ")", ...
Adds a set of specified permissions to a channel. Multiple permissions can be added by providing the two parameters of each permission. @param integer $cid @param integer $permid @param integer $permvalue @return void
[ "Adds", "a", "set", "of", "specified", "permissions", "to", "a", "channel", ".", "Multiple", "permissions", "can", "be", "added", "by", "providing", "the", "two", "parameters", "of", "each", "permission", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L374-L386
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelPermRemove
public function channelPermRemove($cid, $permid) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("channeldelperm", array("cid" => $cid, $permident => $permid)); }
php
public function channelPermRemove($cid, $permid) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("channeldelperm", array("cid" => $cid, $permident => $permid)); }
[ "public", "function", "channelPermRemove", "(", "$", "cid", ",", "$", "permid", ")", "{", "if", "(", "!", "is_array", "(", "$", "permid", ")", ")", "{", "$", "permident", "=", "(", "is_numeric", "(", "$", "permid", ")", ")", "?", "\"permid\"", ":", ...
Removes a set of specified permissions from a channel. Multiple permissions can be removed at once. @param integer $cid @param integer $permid @return void
[ "Removes", "a", "set", "of", "specified", "permissions", "from", "a", "channel", ".", "Multiple", "permissions", "can", "be", "removed", "at", "once", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L395-L407
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelClientPermRemove
public function channelClientPermRemove($cid, $cldbid, $permid) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("channelclientdelperm", array("cid" => $cid, "cldbid" => $cldbid, $permident => $permid)); }
php
public function channelClientPermRemove($cid, $cldbid, $permid) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("channelclientdelperm", array("cid" => $cid, "cldbid" => $cldbid, $permident => $permid)); }
[ "public", "function", "channelClientPermRemove", "(", "$", "cid", ",", "$", "cldbid", ",", "$", "permid", ")", "{", "if", "(", "!", "is_array", "(", "$", "permid", ")", ")", "{", "$", "permident", "=", "(", "is_numeric", "(", "$", "permid", ")", ")",...
Removes a set of specified permissions from a client in a specific channel. Multiple permissions can be removed at once. @param integer $cid @param integer $cldbid @param integer $permid @return void
[ "Removes", "a", "set", "of", "specified", "permissions", "from", "a", "client", "in", "a", "specific", "channel", ".", "Multiple", "permissions", "can", "be", "removed", "at", "once", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L454-L466
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelFileInfo
public function channelFileInfo($cid, $cpw = "", $name = "/") { $info = $this->execute("ftgetfileinfo", array("cid" => $cid, "cpw" => $cpw, "name" => $name))->toArray(); return array_pop($info); }
php
public function channelFileInfo($cid, $cpw = "", $name = "/") { $info = $this->execute("ftgetfileinfo", array("cid" => $cid, "cpw" => $cpw, "name" => $name))->toArray(); return array_pop($info); }
[ "public", "function", "channelFileInfo", "(", "$", "cid", ",", "$", "cpw", "=", "\"\"", ",", "$", "name", "=", "\"/\"", ")", "{", "$", "info", "=", "$", "this", "->", "execute", "(", "\"ftgetfileinfo\"", ",", "array", "(", "\"cid\"", "=>", "$", "cid"...
Returns detailed information about the specified file stored in a channels file repository. @param integer $cid @param string $cpw @param string $name @return array
[ "Returns", "detailed", "information", "about", "the", "specified", "file", "stored", "in", "a", "channels", "file", "repository", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L515-L520
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelFileRename
public function channelFileRename($cid, $cpw = "", $oldname = "/", $newname = "/", $tcid = null, $tcpw = null) { $this->execute("ftrenamefile", array("cid" => $cid, "cpw" => $cpw, "oldname" => $oldname, "newname" => $newname, "tcid" => $tcid, "tcpw" => $tcpw)); }
php
public function channelFileRename($cid, $cpw = "", $oldname = "/", $newname = "/", $tcid = null, $tcpw = null) { $this->execute("ftrenamefile", array("cid" => $cid, "cpw" => $cpw, "oldname" => $oldname, "newname" => $newname, "tcid" => $tcid, "tcpw" => $tcpw)); }
[ "public", "function", "channelFileRename", "(", "$", "cid", ",", "$", "cpw", "=", "\"\"", ",", "$", "oldname", "=", "\"/\"", ",", "$", "newname", "=", "\"/\"", ",", "$", "tcid", "=", "null", ",", "$", "tcpw", "=", "null", ")", "{", "$", "this", "...
Renames a file in a channels file repository. If the two parameters $tcid and $tcpw are specified, the file will be moved into another channels file repository. @param integer $cid @param string $cpw @param string $oldname @param string $newname @param integer $tcid @param string $tcpw @return void
[ "Renames", "a", "file", "in", "a", "channels", "file", "repository", ".", "If", "the", "two", "parameters", "$tcid", "and", "$tcpw", "are", "specified", "the", "file", "will", "be", "moved", "into", "another", "channels", "file", "repository", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L534-L537
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelGetLevel
public function channelGetLevel($cid) { $channel = $this->channelGetById($cid); $levelno = 0; if($channel["pid"]) { $levelno = $this->channelGetLevel($channel["pid"])+1; } return $levelno; }
php
public function channelGetLevel($cid) { $channel = $this->channelGetById($cid); $levelno = 0; if($channel["pid"]) { $levelno = $this->channelGetLevel($channel["pid"])+1; } return $levelno; }
[ "public", "function", "channelGetLevel", "(", "$", "cid", ")", "{", "$", "channel", "=", "$", "this", "->", "channelGetById", "(", "$", "cid", ")", ";", "$", "levelno", "=", "0", ";", "if", "(", "$", "channel", "[", "\"pid\"", "]", ")", "{", "$", ...
Returns the level of a channel. @param integer $cid @return integer
[ "Returns", "the", "level", "of", "a", "channel", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L571-L582
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelGetPathway
public function channelGetPathway($cid) { $channel = $this->channelGetById($cid); $pathway = $channel["channel_name"]; if($channel["pid"]) { $pathway = $this->channelGetPathway($channel["pid"]) . "/" . $channel["channel_name"]; } return $pathway; }
php
public function channelGetPathway($cid) { $channel = $this->channelGetById($cid); $pathway = $channel["channel_name"]; if($channel["pid"]) { $pathway = $this->channelGetPathway($channel["pid"]) . "/" . $channel["channel_name"]; } return $pathway; }
[ "public", "function", "channelGetPathway", "(", "$", "cid", ")", "{", "$", "channel", "=", "$", "this", "->", "channelGetById", "(", "$", "cid", ")", ";", "$", "pathway", "=", "$", "channel", "[", "\"channel_name\"", "]", ";", "if", "(", "$", "channel"...
Returns the pathway of a channel which can be used as a clients default channel. @param integer $cid @return string
[ "Returns", "the", "pathway", "of", "a", "channel", "which", "can", "be", "used", "as", "a", "clients", "default", "channel", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L590-L601
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelGetById
public function channelGetById($cid) { if(!array_key_exists((string) $cid, $this->channelList())) { throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid channelID", 0x300); } return $this->channelList[intval((string) $cid)]; }
php
public function channelGetById($cid) { if(!array_key_exists((string) $cid, $this->channelList())) { throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid channelID", 0x300); } return $this->channelList[intval((string) $cid)]; }
[ "public", "function", "channelGetById", "(", "$", "cid", ")", "{", "if", "(", "!", "array_key_exists", "(", "(", "string", ")", "$", "cid", ",", "$", "this", "->", "channelList", "(", ")", ")", ")", "{", "throw", "new", "TeamSpeak3_Adapter_ServerQuery_Exce...
Returns the TeamSpeak3_Node_Channel object matching the given ID. @param integer $cid @throws TeamSpeak3_Adapter_ServerQuery_Exception @return TeamSpeak3_Node_Channel
[ "Returns", "the", "TeamSpeak3_Node_Channel", "object", "matching", "the", "given", "ID", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L610-L618
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelGetByName
public function channelGetByName($name) { foreach($this->channelList() as $channel) { if($channel["channel_name"] == $name) return $channel; } throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid channelID", 0x300); }
php
public function channelGetByName($name) { foreach($this->channelList() as $channel) { if($channel["channel_name"] == $name) return $channel; } throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid channelID", 0x300); }
[ "public", "function", "channelGetByName", "(", "$", "name", ")", "{", "foreach", "(", "$", "this", "->", "channelList", "(", ")", "as", "$", "channel", ")", "{", "if", "(", "$", "channel", "[", "\"channel_name\"", "]", "==", "$", "name", ")", "return",...
Returns the TeamSpeak3_Node_Channel object matching the given name. @param string $name @throws TeamSpeak3_Adapter_ServerQuery_Exception @return TeamSpeak3_Node_Channel
[ "Returns", "the", "TeamSpeak3_Node_Channel", "object", "matching", "the", "given", "name", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L627-L635
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.clientListDb
public function clientListDb($offset = null, $limit = null) { return $this->execute("clientdblist -count", array("start" => $offset, "duration" => $limit))->toAssocArray("cldbid"); }
php
public function clientListDb($offset = null, $limit = null) { return $this->execute("clientdblist -count", array("start" => $offset, "duration" => $limit))->toAssocArray("cldbid"); }
[ "public", "function", "clientListDb", "(", "$", "offset", "=", "null", ",", "$", "limit", "=", "null", ")", "{", "return", "$", "this", "->", "execute", "(", "\"clientdblist -count\"", ",", "array", "(", "\"start\"", "=>", "$", "offset", ",", "\"duration\"...
Returns a list of client identities known by the virtual server. By default, the server spits out 25 entries at once. @param integer $offset @param integer $limit @return array
[ "Returns", "a", "list", "of", "client", "identities", "known", "by", "the", "virtual", "server", ".", "By", "default", "the", "server", "spits", "out", "25", "entries", "at", "once", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L696-L699
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.clientGetByUid
public function clientGetByUid($uid) { foreach($this->clientList() as $client) { if($client["client_unique_identifier"] == $uid) return $client; } throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid clientID", 0x200); }
php
public function clientGetByUid($uid) { foreach($this->clientList() as $client) { if($client["client_unique_identifier"] == $uid) return $client; } throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid clientID", 0x200); }
[ "public", "function", "clientGetByUid", "(", "$", "uid", ")", "{", "foreach", "(", "$", "this", "->", "clientList", "(", ")", "as", "$", "client", ")", "{", "if", "(", "$", "client", "[", "\"client_unique_identifier\"", "]", "==", "$", "uid", ")", "ret...
Returns the TeamSpeak3_Node_Client object matching the given unique identifier. @param string $uid @throws TeamSpeak3_Adapter_ServerQuery_Exception @return TeamSpeak3_Node_Client
[ "Returns", "the", "TeamSpeak3_Node_Client", "object", "matching", "the", "given", "unique", "identifier", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L788-L796
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.clientGetByDbid
public function clientGetByDbid($dbid) { foreach($this->clientList() as $client) { if($client["client_database_id"] == $dbid) return $client; } throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid clientID", 0x200); }
php
public function clientGetByDbid($dbid) { foreach($this->clientList() as $client) { if($client["client_database_id"] == $dbid) return $client; } throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid clientID", 0x200); }
[ "public", "function", "clientGetByDbid", "(", "$", "dbid", ")", "{", "foreach", "(", "$", "this", "->", "clientList", "(", ")", "as", "$", "client", ")", "{", "if", "(", "$", "client", "[", "\"client_database_id\"", "]", "==", "$", "dbid", ")", "return...
Returns the TeamSpeak3_Node_Client object matching the given database ID. @param integer $dbid @throws TeamSpeak3_Adapter_ServerQuery_Exception @return TeamSpeak3_Node_Client
[ "Returns", "the", "TeamSpeak3_Node_Client", "object", "matching", "the", "given", "database", "ID", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L805-L813
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.clientBan
public function clientBan($clid, $timeseconds = null, $reason = null) { $this->clientListReset(); $bans = $this->execute("banclient", array("clid" => $clid, "time" => $timeseconds, "banreason" => $reason))->toAssocArray("banid"); return array_keys($bans); }
php
public function clientBan($clid, $timeseconds = null, $reason = null) { $this->clientListReset(); $bans = $this->execute("banclient", array("clid" => $clid, "time" => $timeseconds, "banreason" => $reason))->toAssocArray("banid"); return array_keys($bans); }
[ "public", "function", "clientBan", "(", "$", "clid", ",", "$", "timeseconds", "=", "null", ",", "$", "reason", "=", "null", ")", "{", "$", "this", "->", "clientListReset", "(", ")", ";", "$", "bans", "=", "$", "this", "->", "execute", "(", "\"banclie...
Bans the client specified with ID $clid from the server. Please note that this will create three separate ban rules for the targeted clients IP address, the unique identifier and the myTeamSpeak ID (if available). @param integer $clid @param integer $timeseconds @param string $reason @return array
[ "Bans", "the", "client", "specified", "with", "ID", "$clid", "from", "the", "server", ".", "Please", "note", "that", "this", "will", "create", "three", "separate", "ban", "rules", "for", "the", "targeted", "clients", "IP", "address", "the", "unique", "identi...
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L929-L936
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.clientPermList
public function clientPermList($cldbid, $permsid = FALSE) { $this->clientListReset(); return $this->execute("clientpermlist", array("cldbid" => $cldbid, $permsid ? "-permsid" : null))->toAssocArray($permsid ? "permsid" : "permid"); }
php
public function clientPermList($cldbid, $permsid = FALSE) { $this->clientListReset(); return $this->execute("clientpermlist", array("cldbid" => $cldbid, $permsid ? "-permsid" : null))->toAssocArray($permsid ? "permsid" : "permid"); }
[ "public", "function", "clientPermList", "(", "$", "cldbid", ",", "$", "permsid", "=", "FALSE", ")", "{", "$", "this", "->", "clientListReset", "(", ")", ";", "return", "$", "this", "->", "execute", "(", "\"clientpermlist\"", ",", "array", "(", "\"cldbid\""...
Returns a list of permissions defined for a client. @param integer $cldbid @param boolean $permsid @return array
[ "Returns", "a", "list", "of", "permissions", "defined", "for", "a", "client", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L983-L988
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.clientPermAssign
public function clientPermAssign($cldbid, $permid, $permvalue, $permskip = FALSE) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("clientaddperm", array("cldbid" => $cldbid, $permident => $permid, "permvalue" => $permvalue, "permskip" => $permskip)); }
php
public function clientPermAssign($cldbid, $permid, $permvalue, $permskip = FALSE) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("clientaddperm", array("cldbid" => $cldbid, $permident => $permid, "permvalue" => $permvalue, "permskip" => $permskip)); }
[ "public", "function", "clientPermAssign", "(", "$", "cldbid", ",", "$", "permid", ",", "$", "permvalue", ",", "$", "permskip", "=", "FALSE", ")", "{", "if", "(", "!", "is_array", "(", "$", "permid", ")", ")", "{", "$", "permident", "=", "(", "is_nume...
Adds a set of specified permissions to a client. Multiple permissions can be added by providing the three parameters of each permission. @param integer $cldbid @param integer $permid @param integer $permvalue @param integer $permskip @return void
[ "Adds", "a", "set", "of", "specified", "permissions", "to", "a", "client", ".", "Multiple", "permissions", "can", "be", "added", "by", "providing", "the", "three", "parameters", "of", "each", "permission", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1000-L1012
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.clientPermRemove
public function clientPermRemove($cldbid, $permid) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("clientdelperm", array("cldbid" => $cldbid, $permident => $permid)); }
php
public function clientPermRemove($cldbid, $permid) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("clientdelperm", array("cldbid" => $cldbid, $permident => $permid)); }
[ "public", "function", "clientPermRemove", "(", "$", "cldbid", ",", "$", "permid", ")", "{", "if", "(", "!", "is_array", "(", "$", "permid", ")", ")", "{", "$", "permident", "=", "(", "is_numeric", "(", "$", "permid", ")", ")", "?", "\"permid\"", ":",...
Removes a set of specified permissions from a client. Multiple permissions can be removed at once. @param integer $cldbid @param integer $permid @return void
[ "Removes", "a", "set", "of", "specified", "permissions", "from", "a", "client", ".", "Multiple", "permissions", "can", "be", "removed", "at", "once", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1021-L1033
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.serverGroupList
public function serverGroupList(array $filter = array()) { if($this->sgroupList === null) { $this->sgroupList = $this->request("servergrouplist")->toAssocArray("sgid"); foreach($this->sgroupList as $sgid => $group) { $this->sgroupList[$sgid] = new TeamSpeak3_Node_Servergroup($this, $group); } uasort($this->sgroupList, array(__CLASS__, "sortGroupList")); } return $this->filterList($this->sgroupList, $filter); }
php
public function serverGroupList(array $filter = array()) { if($this->sgroupList === null) { $this->sgroupList = $this->request("servergrouplist")->toAssocArray("sgid"); foreach($this->sgroupList as $sgid => $group) { $this->sgroupList[$sgid] = new TeamSpeak3_Node_Servergroup($this, $group); } uasort($this->sgroupList, array(__CLASS__, "sortGroupList")); } return $this->filterList($this->sgroupList, $filter); }
[ "public", "function", "serverGroupList", "(", "array", "$", "filter", "=", "array", "(", ")", ")", "{", "if", "(", "$", "this", "->", "sgroupList", "===", "null", ")", "{", "$", "this", "->", "sgroupList", "=", "$", "this", "->", "request", "(", "\"s...
Returns a list of server groups available. @param filter $filter @return array|TeamSpeak3_Node_Servergroup[]
[ "Returns", "a", "list", "of", "server", "groups", "available", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1041-L1056
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.serverGroupDelete
public function serverGroupDelete($sgid, $force = FALSE) { $this->serverGroupListReset(); $this->execute("servergroupdel", array("sgid" => $sgid, "force" => $force)); }
php
public function serverGroupDelete($sgid, $force = FALSE) { $this->serverGroupListReset(); $this->execute("servergroupdel", array("sgid" => $sgid, "force" => $force)); }
[ "public", "function", "serverGroupDelete", "(", "$", "sgid", ",", "$", "force", "=", "FALSE", ")", "{", "$", "this", "->", "serverGroupListReset", "(", ")", ";", "$", "this", "->", "execute", "(", "\"servergroupdel\"", ",", "array", "(", "\"sgid\"", "=>", ...
Deletes the server group specified with $sgid. If $force is set to 1, the server group will be deleted even if there are clients within. @param integer $sgid @param boolean $force @return void
[ "Deletes", "the", "server", "group", "specified", "with", "$sgid", ".", "If", "$force", "is", "set", "to", "1", "the", "server", "group", "will", "be", "deleted", "even", "if", "there", "are", "clients", "within", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1129-L1134
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.serverGroupPermList
public function serverGroupPermList($sgid, $permsid = FALSE) { return $this->execute("servergrouppermlist", array("sgid" => $sgid, $permsid ? "-permsid" : null))->toAssocArray($permsid ? "permsid" : "permid"); }
php
public function serverGroupPermList($sgid, $permsid = FALSE) { return $this->execute("servergrouppermlist", array("sgid" => $sgid, $permsid ? "-permsid" : null))->toAssocArray($permsid ? "permsid" : "permid"); }
[ "public", "function", "serverGroupPermList", "(", "$", "sgid", ",", "$", "permsid", "=", "FALSE", ")", "{", "return", "$", "this", "->", "execute", "(", "\"servergrouppermlist\"", ",", "array", "(", "\"sgid\"", "=>", "$", "sgid", ",", "$", "permsid", "?", ...
Returns a list of permissions assigned to the server group specified. @param integer $sgid @param boolean $permsid @return array
[ "Returns", "a", "list", "of", "permissions", "assigned", "to", "the", "server", "group", "specified", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1178-L1181
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.serverGroupPermRemove
public function serverGroupPermRemove($sgid, $permid) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("servergroupdelperm", array("sgid" => $sgid, $permident => $permid)); }
php
public function serverGroupPermRemove($sgid, $permid) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("servergroupdelperm", array("sgid" => $sgid, $permident => $permid)); }
[ "public", "function", "serverGroupPermRemove", "(", "$", "sgid", ",", "$", "permid", ")", "{", "if", "(", "!", "is_array", "(", "$", "permid", ")", ")", "{", "$", "permident", "=", "(", "is_numeric", "(", "$", "permid", ")", ")", "?", "\"permid\"", "...
Removes a set of specified permissions from the server group specified with $sgid. Multiple permissions can be removed at once. @param integer $sgid @param integer $permid @return void
[ "Removes", "a", "set", "of", "specified", "permissions", "from", "the", "server", "group", "specified", "with", "$sgid", ".", "Multiple", "permissions", "can", "be", "removed", "at", "once", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1216-L1228
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelGroupCreate
public function channelGroupCreate($name, $type = TeamSpeak3::GROUP_DBTYPE_REGULAR) { $this->channelGroupListReset(); $cgid = $this->execute("channelgroupadd", array("name" => $name, "type" => $type))->toList(); return $cgid["cgid"]; }
php
public function channelGroupCreate($name, $type = TeamSpeak3::GROUP_DBTYPE_REGULAR) { $this->channelGroupListReset(); $cgid = $this->execute("channelgroupadd", array("name" => $name, "type" => $type))->toList(); return $cgid["cgid"]; }
[ "public", "function", "channelGroupCreate", "(", "$", "name", ",", "$", "type", "=", "TeamSpeak3", "::", "GROUP_DBTYPE_REGULAR", ")", "{", "$", "this", "->", "channelGroupListReset", "(", ")", ";", "$", "cgid", "=", "$", "this", "->", "execute", "(", "\"ch...
Creates a new channel group using the name specified with $name and returns its ID. @param string $name @param integer $type @return integer
[ "Creates", "a", "new", "channel", "group", "using", "the", "name", "specified", "with", "$name", "and", "returns", "its", "ID", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1403-L1410
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelGroupDelete
public function channelGroupDelete($cgid, $force = FALSE) { $this->channelGroupListReset(); $this->execute("channelgroupdel", array("cgid" => $cgid, "force" => $force)); }
php
public function channelGroupDelete($cgid, $force = FALSE) { $this->channelGroupListReset(); $this->execute("channelgroupdel", array("cgid" => $cgid, "force" => $force)); }
[ "public", "function", "channelGroupDelete", "(", "$", "cgid", ",", "$", "force", "=", "FALSE", ")", "{", "$", "this", "->", "channelGroupListReset", "(", ")", ";", "$", "this", "->", "execute", "(", "\"channelgroupdel\"", ",", "array", "(", "\"cgid\"", "=>...
Deletes the channel group specified with $cgid. If $force is set to 1, the channel group will be deleted even if there are clients within. @param integer $sgid @param boolean $force @return void
[ "Deletes", "the", "channel", "group", "specified", "with", "$cgid", ".", "If", "$force", "is", "set", "to", "1", "the", "channel", "group", "will", "be", "deleted", "even", "if", "there", "are", "clients", "within", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1457-L1462
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelGroupPermList
public function channelGroupPermList($cgid, $permsid = FALSE) { return $this->execute("channelgrouppermlist", array("cgid" => $cgid, $permsid ? "-permsid" : null))->toAssocArray($permsid ? "permsid" : "permid"); }
php
public function channelGroupPermList($cgid, $permsid = FALSE) { return $this->execute("channelgrouppermlist", array("cgid" => $cgid, $permsid ? "-permsid" : null))->toAssocArray($permsid ? "permsid" : "permid"); }
[ "public", "function", "channelGroupPermList", "(", "$", "cgid", ",", "$", "permsid", "=", "FALSE", ")", "{", "return", "$", "this", "->", "execute", "(", "\"channelgrouppermlist\"", ",", "array", "(", "\"cgid\"", "=>", "$", "cgid", ",", "$", "permsid", "?"...
Returns a list of permissions assigned to the channel group specified. @param integer $cgid @param boolean $permsid @return array
[ "Returns", "a", "list", "of", "permissions", "assigned", "to", "the", "channel", "group", "specified", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1506-L1509
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelGroupPermAssign
public function channelGroupPermAssign($cgid, $permid, $permvalue) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("channelgroupaddperm", array("cgid" => $cgid, $permident => $permid, "permvalue" => $permvalue)); }
php
public function channelGroupPermAssign($cgid, $permid, $permvalue) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("channelgroupaddperm", array("cgid" => $cgid, $permident => $permid, "permvalue" => $permvalue)); }
[ "public", "function", "channelGroupPermAssign", "(", "$", "cgid", ",", "$", "permid", ",", "$", "permvalue", ")", "{", "if", "(", "!", "is_array", "(", "$", "permid", ")", ")", "{", "$", "permident", "=", "(", "is_numeric", "(", "$", "permid", ")", "...
Adds a set of specified permissions to the channel group specified. Multiple permissions can be added by providing the two parameters of each permission in separate arrays. @param integer $cgid @param integer $permid @param integer $permvalue @return void
[ "Adds", "a", "set", "of", "specified", "permissions", "to", "the", "channel", "group", "specified", ".", "Multiple", "permissions", "can", "be", "added", "by", "providing", "the", "two", "parameters", "of", "each", "permission", "in", "separate", "arrays", "."...
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1520-L1532
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelGroupPermRemove
public function channelGroupPermRemove($cgid, $permid) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("channelgroupdelperm", array("cgid" => $cgid, $permident => $permid)); }
php
public function channelGroupPermRemove($cgid, $permid) { if(!is_array($permid)) { $permident = (is_numeric($permid)) ? "permid" : "permsid"; } else { $permident = (is_numeric(current($permid))) ? "permid" : "permsid"; } $this->execute("channelgroupdelperm", array("cgid" => $cgid, $permident => $permid)); }
[ "public", "function", "channelGroupPermRemove", "(", "$", "cgid", ",", "$", "permid", ")", "{", "if", "(", "!", "is_array", "(", "$", "permid", ")", ")", "{", "$", "permident", "=", "(", "is_numeric", "(", "$", "permid", ")", ")", "?", "\"permid\"", ...
Removes a set of specified permissions from the channel group specified with $cgid. Multiple permissions can be removed at once. @param integer $cgid @param integer $permid @return void
[ "Removes", "a", "set", "of", "specified", "permissions", "from", "the", "channel", "group", "specified", "with", "$cgid", ".", "Multiple", "permissions", "can", "be", "removed", "at", "once", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1542-L1554
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.channelGroupClientList
public function channelGroupClientList($cgid = null, $cid = null, $cldbid = null, $resolve = FALSE) { if($this["virtualserver_default_channel_group"] == $cgid) { return array(); } try { $result = $this->execute("channelgroupclientlist", array("cgid" => $cgid, "cid" => $cid, "cldbid" => $cldbid))->toArray(); } catch(TeamSpeak3_Adapter_ServerQuery_Exception $e) { /* ERROR_database_empty_result */ if($e->getCode() != 0x501) throw $e; $result = array(); } if($resolve) { foreach($result as $k => $v) { $result[$k] = array_merge($v, $this->clientInfoDb($v["cldbid"])); } } return $result; }
php
public function channelGroupClientList($cgid = null, $cid = null, $cldbid = null, $resolve = FALSE) { if($this["virtualserver_default_channel_group"] == $cgid) { return array(); } try { $result = $this->execute("channelgroupclientlist", array("cgid" => $cgid, "cid" => $cid, "cldbid" => $cldbid))->toArray(); } catch(TeamSpeak3_Adapter_ServerQuery_Exception $e) { /* ERROR_database_empty_result */ if($e->getCode() != 0x501) throw $e; $result = array(); } if($resolve) { foreach($result as $k => $v) { $result[$k] = array_merge($v, $this->clientInfoDb($v["cldbid"])); } } return $result; }
[ "public", "function", "channelGroupClientList", "(", "$", "cgid", "=", "null", ",", "$", "cid", "=", "null", ",", "$", "cldbid", "=", "null", ",", "$", "resolve", "=", "FALSE", ")", "{", "if", "(", "$", "this", "[", "\"virtualserver_default_channel_group\"...
Returns all the client and/or channel IDs currently assigned to channel groups. All three parameters are optional so you're free to choose the most suitable combination for your requirements. @param integer $cgid @param integer $cid @param integer $cldbid @param boolean $resolve @return array
[ "Returns", "all", "the", "client", "and", "/", "or", "channel", "IDs", "currently", "assigned", "to", "channel", "groups", ".", "All", "three", "parameters", "are", "optional", "so", "you", "re", "free", "to", "choose", "the", "most", "suitable", "combinatio...
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1567-L1595
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.permReset
public function permReset() { $token = $this->request("permreset")->toList(); TeamSpeak3_Helper_Signal::getInstance()->emit("notifyTokencreated", $this, $token["token"]); return $token["token"]; }
php
public function permReset() { $token = $this->request("permreset")->toList(); TeamSpeak3_Helper_Signal::getInstance()->emit("notifyTokencreated", $this, $token["token"]); return $token["token"]; }
[ "public", "function", "permReset", "(", ")", "{", "$", "token", "=", "$", "this", "->", "request", "(", "\"permreset\"", ")", "->", "toList", "(", ")", ";", "TeamSpeak3_Helper_Signal", "::", "getInstance", "(", ")", "->", "emit", "(", "\"notifyTokencreated\"...
Restores the default permission settings on the virtual server and returns a new initial administrator privilege key. @return TeamSpeak3_Helper_String
[ "Restores", "the", "default", "permission", "settings", "on", "the", "virtual", "server", "and", "returns", "a", "new", "initial", "administrator", "privilege", "key", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1603-L1610
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.messageRead
public function messageRead($msgid, $flag_read = TRUE) { $msg = $this->execute("messageget", array("msgid" => $msgid))->toList(); if($flag_read) { $this->execute("messageget", array("msgid" => $msgid, "flag" => $flag_read)); } return $msg; }
php
public function messageRead($msgid, $flag_read = TRUE) { $msg = $this->execute("messageget", array("msgid" => $msgid))->toList(); if($flag_read) { $this->execute("messageget", array("msgid" => $msgid, "flag" => $flag_read)); } return $msg; }
[ "public", "function", "messageRead", "(", "$", "msgid", ",", "$", "flag_read", "=", "TRUE", ")", "{", "$", "msg", "=", "$", "this", "->", "execute", "(", "\"messageget\"", ",", "array", "(", "\"msgid\"", "=>", "$", "msgid", ")", ")", "->", "toList", ...
Returns an existing offline message with ID $msgid from your inbox. @param integer $msgid @param boolean $flag_read @return array
[ "Returns", "an", "existing", "offline", "message", "with", "ID", "$msgid", "from", "your", "inbox", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1857-L1867
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.snapshotDeploy
public function snapshotDeploy($data, $mode = TeamSpeak3::SNAPSHOT_STRING) { switch($mode) { case TeamSpeak3::SNAPSHOT_BASE64: $data = TeamSpeak3_Helper_String::fromBase64($data); break; case TeamSpeak3::SNAPSHOT_HEXDEC: $data = TeamSpeak3_Helper_String::fromHex($data); break; default: $data = TeamSpeak3_Helper_String::factory($data); break; } $detail = $this->request("serversnapshotdeploy -mapping " . $data)->toList(); if(isset($detail[0]["sid"])) { TeamSpeak3_Helper_Signal::getInstance()->emit("notifyServercreated", $this->getParent(), $detail[0]["sid"]); $server = array_shift($detail); } else { $server = array(); } $server["mapping"] = $detail; return $server; }
php
public function snapshotDeploy($data, $mode = TeamSpeak3::SNAPSHOT_STRING) { switch($mode) { case TeamSpeak3::SNAPSHOT_BASE64: $data = TeamSpeak3_Helper_String::fromBase64($data); break; case TeamSpeak3::SNAPSHOT_HEXDEC: $data = TeamSpeak3_Helper_String::fromHex($data); break; default: $data = TeamSpeak3_Helper_String::factory($data); break; } $detail = $this->request("serversnapshotdeploy -mapping " . $data)->toList(); if(isset($detail[0]["sid"])) { TeamSpeak3_Helper_Signal::getInstance()->emit("notifyServercreated", $this->getParent(), $detail[0]["sid"]); $server = array_shift($detail); } else { $server = array(); } $server["mapping"] = $detail; return $server; }
[ "public", "function", "snapshotDeploy", "(", "$", "data", ",", "$", "mode", "=", "TeamSpeak3", "::", "SNAPSHOT_STRING", ")", "{", "switch", "(", "$", "mode", ")", "{", "case", "TeamSpeak3", "::", "SNAPSHOT_BASE64", ":", "$", "data", "=", "TeamSpeak3_Helper_S...
Deploys snapshot data on the selected virtual server. If no virtual server is selected (ID 0), the data will be used to create a new virtual server from scratch. @param string $data @param string $mode @return array
[ "Deploys", "snapshot", "data", "on", "the", "selected", "virtual", "server", ".", "If", "no", "virtual", "server", "is", "selected", "(", "ID", "0", ")", "the", "data", "will", "be", "used", "to", "create", "a", "new", "virtual", "server", "from", "scrat...
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1903-L1936
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.privilegeKeyList
public function privilegeKeyList($resolve = FALSE) { $tokens = $this->request("privilegekeylist")->toAssocArray("token"); if($resolve) { foreach($tokens as $token => $array) { $func = $array["token_type"] ? "channelGroupGetById" : "serverGroupGetById"; try { $tokens[$token]["token_id1"] = $this->$func($array["token_id1"])->name; } catch(Exception $e) { /* ERROR_channel_invalid_id */ if($e->getCode() != 0xA00) throw $e; } try { if($array["token_type"]) $tokens[$token]["token_id2"] = $this->channelGetById($array["token_id2"])->getPathway(); } catch(Exception $e) { /* ERROR_permission_invalid_group_id */ if($e->getCode() != 0x300) throw $e; } } } return $tokens; }
php
public function privilegeKeyList($resolve = FALSE) { $tokens = $this->request("privilegekeylist")->toAssocArray("token"); if($resolve) { foreach($tokens as $token => $array) { $func = $array["token_type"] ? "channelGroupGetById" : "serverGroupGetById"; try { $tokens[$token]["token_id1"] = $this->$func($array["token_id1"])->name; } catch(Exception $e) { /* ERROR_channel_invalid_id */ if($e->getCode() != 0xA00) throw $e; } try { if($array["token_type"]) $tokens[$token]["token_id2"] = $this->channelGetById($array["token_id2"])->getPathway(); } catch(Exception $e) { /* ERROR_permission_invalid_group_id */ if($e->getCode() != 0x300) throw $e; } } } return $tokens; }
[ "public", "function", "privilegeKeyList", "(", "$", "resolve", "=", "FALSE", ")", "{", "$", "tokens", "=", "$", "this", "->", "request", "(", "\"privilegekeylist\"", ")", "->", "toAssocArray", "(", "\"token\"", ")", ";", "if", "(", "$", "resolve", ")", "...
Returns a list of privilege keys (tokens) available. If $resolve is set to TRUE the values of token_id1 and token_id2 will be translated into the appropriate group and/or channel names. @param boolean $resolve @return array
[ "Returns", "a", "list", "of", "privilege", "keys", "(", "tokens", ")", "available", ".", "If", "$resolve", "is", "set", "to", "TRUE", "the", "values", "of", "token_id1", "and", "token_id2", "will", "be", "translated", "into", "the", "appropriate", "group", ...
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L1981-L2014
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.banCreate
public function banCreate(array $rules, $timeseconds = null, $reason = null) { $rules["time"] = $timeseconds; $rules["banreason"] = $reason; $banid = $this->execute("banadd", $rules)->toList(); return $banid["banid"]; }
php
public function banCreate(array $rules, $timeseconds = null, $reason = null) { $rules["time"] = $timeseconds; $rules["banreason"] = $reason; $banid = $this->execute("banadd", $rules)->toList(); return $banid["banid"]; }
[ "public", "function", "banCreate", "(", "array", "$", "rules", ",", "$", "timeseconds", "=", "null", ",", "$", "reason", "=", "null", ")", "{", "$", "rules", "[", "\"time\"", "]", "=", "$", "timeseconds", ";", "$", "rules", "[", "\"banreason\"", "]", ...
Adds a new ban rule on the selected virtual server. All parameters are optional but at least one of the following rules must be set: ip, name, or uid. @param array $rules @param integer $timeseconds @param string $reason @return integer
[ "Adds", "a", "new", "ban", "rule", "on", "the", "selected", "virtual", "server", ".", "All", "parameters", "are", "optional", "but", "at", "least", "one", "of", "the", "following", "rules", "must", "be", "set", ":", "ip", "name", "or", "uid", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L2165-L2173
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.tempPasswordList
public function tempPasswordList($resolve = FALSE) { $passwords = $this->request("servertemppasswordlist")->toAssocArray("pw_clear"); if($resolve) { foreach($passwords as $password => $array) { try { $channel = $this->channelGetById($array["tcid"]); $passwords[$password]["tcname"] = $channel->toString(); $passwords[$password]["tcpath"] = $channel->getPathway(); } catch(Exception $e) { /* ERROR_channel_invalid_id */ if($e->getCode() != 0xA00) throw $e; } } } return $passwords; }
php
public function tempPasswordList($resolve = FALSE) { $passwords = $this->request("servertemppasswordlist")->toAssocArray("pw_clear"); if($resolve) { foreach($passwords as $password => $array) { try { $channel = $this->channelGetById($array["tcid"]); $passwords[$password]["tcname"] = $channel->toString(); $passwords[$password]["tcpath"] = $channel->getPathway(); } catch(Exception $e) { /* ERROR_channel_invalid_id */ if($e->getCode() != 0xA00) throw $e; } } } return $passwords; }
[ "public", "function", "tempPasswordList", "(", "$", "resolve", "=", "FALSE", ")", "{", "$", "passwords", "=", "$", "this", "->", "request", "(", "\"servertemppasswordlist\"", ")", "->", "toAssocArray", "(", "\"pw_clear\"", ")", ";", "if", "(", "$", "resolve"...
Returns a list of temporary server passwords. @param boolean $resolve @return array
[ "Returns", "a", "list", "of", "temporary", "server", "passwords", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L2239-L2263
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.tempPasswordCreate
public function tempPasswordCreate($pw, $duration, $tcid = 0, $tcpw = "", $desc = "") { $this->execute("servertemppasswordadd", array("pw" => $pw, "duration" => $duration, "tcid" => $tcid, "tcpw" => $tcpw, "desc" => $desc)); }
php
public function tempPasswordCreate($pw, $duration, $tcid = 0, $tcpw = "", $desc = "") { $this->execute("servertemppasswordadd", array("pw" => $pw, "duration" => $duration, "tcid" => $tcid, "tcpw" => $tcpw, "desc" => $desc)); }
[ "public", "function", "tempPasswordCreate", "(", "$", "pw", ",", "$", "duration", ",", "$", "tcid", "=", "0", ",", "$", "tcpw", "=", "\"\"", ",", "$", "desc", "=", "\"\"", ")", "{", "$", "this", "->", "execute", "(", "\"servertemppasswordadd\"", ",", ...
Sets a new temporary server password specified with $pw. The temporary password will be valid for the number of seconds specified with $duration. The client connecting with this password will automatically join the channel specified with $tcid. If tcid is set to 0, the client will join the default channel. @param string $pw @param integer $duration @param integer $tcid @param string $tcpw @param string $desc @return void
[ "Sets", "a", "new", "temporary", "server", "password", "specified", "with", "$pw", ".", "The", "temporary", "password", "will", "be", "valid", "for", "the", "number", "of", "seconds", "specified", "with", "$duration", ".", "The", "client", "connecting", "with"...
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L2278-L2281
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.logView
public function logView($lines = 30, $begin_pos = null, $reverse = null, $instance = null) { return $this->execute("logview", array("lines" => $lines, "begin_pos" => $begin_pos, "instance" => $instance, "reverse" => $reverse))->toArray(); }
php
public function logView($lines = 30, $begin_pos = null, $reverse = null, $instance = null) { return $this->execute("logview", array("lines" => $lines, "begin_pos" => $begin_pos, "instance" => $instance, "reverse" => $reverse))->toArray(); }
[ "public", "function", "logView", "(", "$", "lines", "=", "30", ",", "$", "begin_pos", "=", "null", ",", "$", "reverse", "=", "null", ",", "$", "instance", "=", "null", ")", "{", "return", "$", "this", "->", "execute", "(", "\"logview\"", ",", "array"...
Displays a specified number of entries (1-100) from the servers log. @param integer $lines @param integer $begin_pos @param boolean $reverse @param boolean $instance @return array
[ "Displays", "a", "specified", "number", "of", "entries", "(", "1", "-", "100", ")", "from", "the", "servers", "log", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L2303-L2306
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.selfUpdate
public function selfUpdate(array $properties) { $this->execute("clientupdate", $properties); foreach($properties as $ident => $value) { $this->whoamiSet($ident, $value); } }
php
public function selfUpdate(array $properties) { $this->execute("clientupdate", $properties); foreach($properties as $ident => $value) { $this->whoamiSet($ident, $value); } }
[ "public", "function", "selfUpdate", "(", "array", "$", "properties", ")", "{", "$", "this", "->", "execute", "(", "\"clientupdate\"", ",", "$", "properties", ")", ";", "foreach", "(", "$", "properties", "as", "$", "ident", "=>", "$", "value", ")", "{", ...
Changes the properties of your own client connection. @param array $properties @return void
[ "Changes", "the", "properties", "of", "your", "own", "client", "connection", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L2379-L2387
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.sortClientList
protected static function sortClientList(TeamSpeak3_Node_Client $a, TeamSpeak3_Node_Client $b) { if(get_class($a) != get_class($b)) { return 0; /* workaround for PHP bug #50688 */ throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid parameter", 0x602); } if(!$a instanceof TeamSpeak3_Node_Client) { return 0; /* workaround for PHP bug #50688 */ throw new TeamSpeak3_Adapter_ServerQuery_Exception("convert error", 0x604); } if($a->getProperty("client_talk_power", 0) != $b->getProperty("client_talk_power", 0)) { return ($a->getProperty("client_talk_power", 0) > $b->getProperty("client_talk_power", 0)) ? -1 : 1; } if($a->getProperty("client_is_talker", 0) != $b->getProperty("client_is_talker", 0)) { return ($a->getProperty("client_is_talker", 0) > $b->getProperty("client_is_talker", 0)) ? -1 : 1; } return strcmp(strtolower($a["client_nickname"]), strtolower($b["client_nickname"])); }
php
protected static function sortClientList(TeamSpeak3_Node_Client $a, TeamSpeak3_Node_Client $b) { if(get_class($a) != get_class($b)) { return 0; /* workaround for PHP bug #50688 */ throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid parameter", 0x602); } if(!$a instanceof TeamSpeak3_Node_Client) { return 0; /* workaround for PHP bug #50688 */ throw new TeamSpeak3_Adapter_ServerQuery_Exception("convert error", 0x604); } if($a->getProperty("client_talk_power", 0) != $b->getProperty("client_talk_power", 0)) { return ($a->getProperty("client_talk_power", 0) > $b->getProperty("client_talk_power", 0)) ? -1 : 1; } if($a->getProperty("client_is_talker", 0) != $b->getProperty("client_is_talker", 0)) { return ($a->getProperty("client_is_talker", 0) > $b->getProperty("client_is_talker", 0)) ? -1 : 1; } return strcmp(strtolower($a["client_nickname"]), strtolower($b["client_nickname"])); }
[ "protected", "static", "function", "sortClientList", "(", "TeamSpeak3_Node_Client", "$", "a", ",", "TeamSpeak3_Node_Client", "$", "b", ")", "{", "if", "(", "get_class", "(", "$", "a", ")", "!=", "get_class", "(", "$", "b", ")", ")", "{", "return", "0", "...
Internal callback funtion for sorting of client objects. @param TeamSpeak3_Node_Client $a @param TeamSpeak3_Node_Client $b @return integer
[ "Internal", "callback", "funtion", "for", "sorting", "of", "client", "objects", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L2444-L2473
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.sortGroupList
protected static function sortGroupList(TeamSpeak3_Node_Abstract $a, TeamSpeak3_Node_Abstract $b) { if(get_class($a) != get_class($b)) { return 0; /* workaround for PHP bug #50688 */ throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid parameter", 0x602); } if(!$a instanceof TeamSpeak3_Node_Servergroup && !$a instanceof TeamSpeak3_Node_Channelgroup) { return 0; /* workaround for PHP bug #50688 */ throw new TeamSpeak3_Adapter_ServerQuery_Exception("convert error", 0x604); } if($a->getProperty("sortid", 0) != $b->getProperty("sortid", 0) && $a->getProperty("sortid", 0) != 0 && $b->getProperty("sortid", 0) != 0) { return ($a->getProperty("sortid", 0) < $b->getProperty("sortid", 0)) ? -1 : 1; } return ($a->getId() < $b->getId()) ? -1 : 1; }
php
protected static function sortGroupList(TeamSpeak3_Node_Abstract $a, TeamSpeak3_Node_Abstract $b) { if(get_class($a) != get_class($b)) { return 0; /* workaround for PHP bug #50688 */ throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid parameter", 0x602); } if(!$a instanceof TeamSpeak3_Node_Servergroup && !$a instanceof TeamSpeak3_Node_Channelgroup) { return 0; /* workaround for PHP bug #50688 */ throw new TeamSpeak3_Adapter_ServerQuery_Exception("convert error", 0x604); } if($a->getProperty("sortid", 0) != $b->getProperty("sortid", 0) && $a->getProperty("sortid", 0) != 0 && $b->getProperty("sortid", 0) != 0) { return ($a->getProperty("sortid", 0) < $b->getProperty("sortid", 0)) ? -1 : 1; } return ($a->getId() < $b->getId()) ? -1 : 1; }
[ "protected", "static", "function", "sortGroupList", "(", "TeamSpeak3_Node_Abstract", "$", "a", ",", "TeamSpeak3_Node_Abstract", "$", "b", ")", "{", "if", "(", "get_class", "(", "$", "a", ")", "!=", "get_class", "(", "$", "b", ")", ")", "{", "return", "0", ...
Internal callback funtion for sorting of group objects. @param TeamSpeak3_Node_Abstract $a @param TeamSpeak3_Node_Abstract $b @return integer
[ "Internal", "callback", "funtion", "for", "sorting", "of", "group", "objects", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L2482-L2506
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Node/Server.php
TeamSpeak3_Node_Server.sortFileList
protected static function sortFileList(array $a, array $b) { if(!array_key_exists("src", $a) || !array_key_exists("src", $b) || !array_key_exists("type", $a) || !array_key_exists("type", $b)) { return 0; throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid parameter", 0x602); } if($a["type"] != $b["type"]) { return ($a["type"] < $b["type"]) ? -1 : 1; } return strcmp(strtolower($a["src"]), strtolower($b["src"])); }
php
protected static function sortFileList(array $a, array $b) { if(!array_key_exists("src", $a) || !array_key_exists("src", $b) || !array_key_exists("type", $a) || !array_key_exists("type", $b)) { return 0; throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid parameter", 0x602); } if($a["type"] != $b["type"]) { return ($a["type"] < $b["type"]) ? -1 : 1; } return strcmp(strtolower($a["src"]), strtolower($b["src"])); }
[ "protected", "static", "function", "sortFileList", "(", "array", "$", "a", ",", "array", "$", "b", ")", "{", "if", "(", "!", "array_key_exists", "(", "\"src\"", ",", "$", "a", ")", "||", "!", "array_key_exists", "(", "\"src\"", ",", "$", "b", ")", "|...
Internal callback funtion for sorting of file list items. @param array $a @param array $b @return integer
[ "Internal", "callback", "funtion", "for", "sorting", "of", "file", "list", "items", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Node/Server.php#L2515-L2530
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Profiler.php
TeamSpeak3_Helper_Profiler.start
public static function start($name = "default") { if(array_key_exists($name, self::$timers)) { self::$timers[$name]->start(); } else { self::$timers[$name] = new TeamSpeak3_Helper_Profiler_Timer($name); } }
php
public static function start($name = "default") { if(array_key_exists($name, self::$timers)) { self::$timers[$name]->start(); } else { self::$timers[$name] = new TeamSpeak3_Helper_Profiler_Timer($name); } }
[ "public", "static", "function", "start", "(", "$", "name", "=", "\"default\"", ")", "{", "if", "(", "array_key_exists", "(", "$", "name", ",", "self", "::", "$", "timers", ")", ")", "{", "self", "::", "$", "timers", "[", "$", "name", "]", "->", "st...
Starts a timer. @param string $name @return void
[ "Starts", "a", "timer", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Profiler.php#L55-L65
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Profiler.php
TeamSpeak3_Helper_Profiler.stop
public static function stop($name = "default") { if(!array_key_exists($name, self::$timers)) { self::init($name); } self::$timers[$name]->stop(); }
php
public static function stop($name = "default") { if(!array_key_exists($name, self::$timers)) { self::init($name); } self::$timers[$name]->stop(); }
[ "public", "static", "function", "stop", "(", "$", "name", "=", "\"default\"", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "name", ",", "self", "::", "$", "timers", ")", ")", "{", "self", "::", "init", "(", "$", "name", ")", ";", "}", ...
Stops a timer. @param string $name @return void
[ "Stops", "a", "timer", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Profiler.php#L73-L81
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Profiler.php
TeamSpeak3_Helper_Profiler.get
public static function get($name = "default") { if(!array_key_exists($name, self::$timers)) { self::init($name); } return self::$timers[$name]; }
php
public static function get($name = "default") { if(!array_key_exists($name, self::$timers)) { self::init($name); } return self::$timers[$name]; }
[ "public", "static", "function", "get", "(", "$", "name", "=", "\"default\"", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "name", ",", "self", "::", "$", "timers", ")", ")", "{", "self", "::", "init", "(", "$", "name", ")", ";", "}", "...
Returns a timer. @param string $name @return TeamSpeak3_Helper_Profiler_Timer
[ "Returns", "a", "timer", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Profiler.php#L89-L97
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/String.php
TeamSpeak3_Helper_String.replace
public function replace($search, $replace, $caseSensitivity = TRUE) { if($caseSensitivity) { $this->string = str_replace($search, $replace, $this->string); } else { $this->string = str_ireplace($search, $replace, $this->string); } return $this; }
php
public function replace($search, $replace, $caseSensitivity = TRUE) { if($caseSensitivity) { $this->string = str_replace($search, $replace, $this->string); } else { $this->string = str_ireplace($search, $replace, $this->string); } return $this; }
[ "public", "function", "replace", "(", "$", "search", ",", "$", "replace", ",", "$", "caseSensitivity", "=", "TRUE", ")", "{", "if", "(", "$", "caseSensitivity", ")", "{", "$", "this", "->", "string", "=", "str_replace", "(", "$", "search", ",", "$", ...
Replaces every occurrence of the string $search with the string $replace. @param string $search @param string $replace @param boolean $caseSensitivity @return TeamSpeak3_Helper_String
[ "Replaces", "every", "occurrence", "of", "the", "string", "$search", "with", "the", "string", "$replace", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/String.php#L73-L85
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/String.php
TeamSpeak3_Helper_String.arg
public function arg(array $args, $char = "%") { $args = array_reverse($args, TRUE); foreach($args as $key => $val) { $args[$char . $key] = $val; unset($args[$key]); } $this->string = strtr($this->string, $args); return $this; }
php
public function arg(array $args, $char = "%") { $args = array_reverse($args, TRUE); foreach($args as $key => $val) { $args[$char . $key] = $val; unset($args[$key]); } $this->string = strtr($this->string, $args); return $this; }
[ "public", "function", "arg", "(", "array", "$", "args", ",", "$", "char", "=", "\"%\"", ")", "{", "$", "args", "=", "array_reverse", "(", "$", "args", ",", "TRUE", ")", ";", "foreach", "(", "$", "args", "as", "$", "key", "=>", "$", "val", ")", ...
This function replaces indexed or associative signs with given values. @param array $args @param string $char @return TeamSpeak3_Helper_String
[ "This", "function", "replaces", "indexed", "or", "associative", "signs", "with", "given", "values", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/String.php#L94-L107
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/String.php
TeamSpeak3_Helper_String.startsWith
public function startsWith($pattern) { return (substr($this->string, 0, strlen($pattern)) == $pattern) ? TRUE : FALSE; }
php
public function startsWith($pattern) { return (substr($this->string, 0, strlen($pattern)) == $pattern) ? TRUE : FALSE; }
[ "public", "function", "startsWith", "(", "$", "pattern", ")", "{", "return", "(", "substr", "(", "$", "this", "->", "string", ",", "0", ",", "strlen", "(", "$", "pattern", ")", ")", "==", "$", "pattern", ")", "?", "TRUE", ":", "FALSE", ";", "}" ]
Returns true if the string starts with $pattern. @param string $pattern @return boolean
[ "Returns", "true", "if", "the", "string", "starts", "with", "$pattern", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/String.php#L115-L118
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/String.php
TeamSpeak3_Helper_String.endsWith
public function endsWith($pattern) { return (substr($this->string, strlen($pattern)*-1) == $pattern) ? TRUE : FALSE; }
php
public function endsWith($pattern) { return (substr($this->string, strlen($pattern)*-1) == $pattern) ? TRUE : FALSE; }
[ "public", "function", "endsWith", "(", "$", "pattern", ")", "{", "return", "(", "substr", "(", "$", "this", "->", "string", ",", "strlen", "(", "$", "pattern", ")", "*", "-", "1", ")", "==", "$", "pattern", ")", "?", "TRUE", ":", "FALSE", ";", "}...
Returns true if the string ends with $pattern. @param string $pattern @return boolean
[ "Returns", "true", "if", "the", "string", "ends", "with", "$pattern", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/String.php#L126-L129
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/String.php
TeamSpeak3_Helper_String.contains
public function contains($pattern, $regexp = FALSE) { if(empty($pattern)) { return TRUE; } if($regexp) { return (preg_match("/" . $pattern . "/i", $this->string)) ? TRUE : FALSE; } else { return (stristr($this->string, $pattern) !== FALSE) ? TRUE : FALSE; } }
php
public function contains($pattern, $regexp = FALSE) { if(empty($pattern)) { return TRUE; } if($regexp) { return (preg_match("/" . $pattern . "/i", $this->string)) ? TRUE : FALSE; } else { return (stristr($this->string, $pattern) !== FALSE) ? TRUE : FALSE; } }
[ "public", "function", "contains", "(", "$", "pattern", ",", "$", "regexp", "=", "FALSE", ")", "{", "if", "(", "empty", "(", "$", "pattern", ")", ")", "{", "return", "TRUE", ";", "}", "if", "(", "$", "regexp", ")", "{", "return", "(", "preg_match", ...
Returns true if the string contains $pattern. @param string $pattern @param boolean $regexp @return boolean
[ "Returns", "true", "if", "the", "string", "contains", "$pattern", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/String.php#L180-L195
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/String.php
TeamSpeak3_Helper_String.substr
public function substr($start, $length = null) { $string = ($length !== null) ? substr($this->string, $start, $length) : substr($this->string, $start); return new self($string); }
php
public function substr($start, $length = null) { $string = ($length !== null) ? substr($this->string, $start, $length) : substr($this->string, $start); return new self($string); }
[ "public", "function", "substr", "(", "$", "start", ",", "$", "length", "=", "null", ")", "{", "$", "string", "=", "(", "$", "length", "!==", "null", ")", "?", "substr", "(", "$", "this", "->", "string", ",", "$", "start", ",", "$", "length", ")",...
Returns part of a string. @param integer $start @param integer $length @return TeamSpeak3_Helper_String
[ "Returns", "part", "of", "a", "string", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/String.php#L204-L209
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/String.php
TeamSpeak3_Helper_String.split
public function split($separator, $limit = 0) { $parts = explode($separator, $this->string, ($limit) ? intval($limit) : $this->count()); foreach($parts as $key => $val) { $parts[$key] = new self($val); } return $parts; }
php
public function split($separator, $limit = 0) { $parts = explode($separator, $this->string, ($limit) ? intval($limit) : $this->count()); foreach($parts as $key => $val) { $parts[$key] = new self($val); } return $parts; }
[ "public", "function", "split", "(", "$", "separator", ",", "$", "limit", "=", "0", ")", "{", "$", "parts", "=", "explode", "(", "$", "separator", ",", "$", "this", "->", "string", ",", "(", "$", "limit", ")", "?", "intval", "(", "$", "limit", ")"...
Splits the string into substrings wherever $separator occurs. @param string $separator @param integer $limit @return array
[ "Splits", "the", "string", "into", "substrings", "wherever", "$separator", "occurs", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/String.php#L218-L228
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/String.php
TeamSpeak3_Helper_String.resize
public function resize($size, $char = "\0") { $chars = ($size - $this->count()); if($chars < 0) { $this->string = substr($this->string, 0, $chars); } elseif($chars > 0) { $this->string = str_pad($this->string, $size, strval($char)); } return $this; }
php
public function resize($size, $char = "\0") { $chars = ($size - $this->count()); if($chars < 0) { $this->string = substr($this->string, 0, $chars); } elseif($chars > 0) { $this->string = str_pad($this->string, $size, strval($char)); } return $this; }
[ "public", "function", "resize", "(", "$", "size", ",", "$", "char", "=", "\"\\0\"", ")", "{", "$", "chars", "=", "(", "$", "size", "-", "$", "this", "->", "count", "(", ")", ")", ";", "if", "(", "$", "chars", "<", "0", ")", "{", "$", "this", ...
Sets the size of the string to $size characters. @param integer $size @param string $char @return TeamSpeak3_Helper_String
[ "Sets", "the", "size", "of", "the", "string", "to", "$size", "characters", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/String.php#L295-L309
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/String.php
TeamSpeak3_Helper_String.escape
public function escape() { foreach(TeamSpeak3::getEscapePatterns() as $search => $replace) { $this->string = str_replace($search, $replace, $this->string); } return $this; }
php
public function escape() { foreach(TeamSpeak3::getEscapePatterns() as $search => $replace) { $this->string = str_replace($search, $replace, $this->string); } return $this; }
[ "public", "function", "escape", "(", ")", "{", "foreach", "(", "TeamSpeak3", "::", "getEscapePatterns", "(", ")", "as", "$", "search", "=>", "$", "replace", ")", "{", "$", "this", "->", "string", "=", "str_replace", "(", "$", "search", ",", "$", "repla...
Escapes a string using the TeamSpeak 3 escape patterns. @return TeamSpeak3_Helper_String
[ "Escapes", "a", "string", "using", "the", "TeamSpeak", "3", "escape", "patterns", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/String.php#L328-L336
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/String.php
TeamSpeak3_Helper_String.unescape
public function unescape() { $this->string = strtr($this->string, array_flip(TeamSpeak3::getEscapePatterns())); return $this; }
php
public function unescape() { $this->string = strtr($this->string, array_flip(TeamSpeak3::getEscapePatterns())); return $this; }
[ "public", "function", "unescape", "(", ")", "{", "$", "this", "->", "string", "=", "strtr", "(", "$", "this", "->", "string", ",", "array_flip", "(", "TeamSpeak3", "::", "getEscapePatterns", "(", ")", ")", ")", ";", "return", "$", "this", ";", "}" ]
Unescapes a string using the TeamSpeak 3 escape patterns. @return TeamSpeak3_Helper_String
[ "Unescapes", "a", "string", "using", "the", "TeamSpeak", "3", "escape", "patterns", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/String.php#L343-L348
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/String.php
TeamSpeak3_Helper_String.isInt
public function isInt() { return (is_numeric($this->string) && !$this->contains(".") && !$this->contains("x")) ? TRUE : FALSE; }
php
public function isInt() { return (is_numeric($this->string) && !$this->contains(".") && !$this->contains("x")) ? TRUE : FALSE; }
[ "public", "function", "isInt", "(", ")", "{", "return", "(", "is_numeric", "(", "$", "this", "->", "string", ")", "&&", "!", "$", "this", "->", "contains", "(", "\".\"", ")", "&&", "!", "$", "this", "->", "contains", "(", "\"x\"", ")", ")", "?", ...
Returns TRUE if the string is a numeric value. @return boolean
[ "Returns", "TRUE", "if", "the", "string", "is", "a", "numeric", "value", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/String.php#L391-L394
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/String.php
TeamSpeak3_Helper_String.toInt
public function toInt() { if($this->string == pow(2, 63) || $this->string == pow(2, 64)) { return -1; } return ($this->string > pow(2, 31)) ? floatval($this->string) : intval($this->string); }
php
public function toInt() { if($this->string == pow(2, 63) || $this->string == pow(2, 64)) { return -1; } return ($this->string > pow(2, 31)) ? floatval($this->string) : intval($this->string); }
[ "public", "function", "toInt", "(", ")", "{", "if", "(", "$", "this", "->", "string", "==", "pow", "(", "2", ",", "63", ")", "||", "$", "this", "->", "string", "==", "pow", "(", "2", ",", "64", ")", ")", "{", "return", "-", "1", ";", "}", "...
Returns the integer value of the string. @return float @return integer
[ "Returns", "the", "integer", "value", "of", "the", "string", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/String.php#L402-L410
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/String.php
TeamSpeak3_Helper_String.transliterate
public function transliterate() { $utf8_accents = array( "à" => "a", "ô" => "o", "ď" => "d", "ḟ" => "f", "ë" => "e", "š" => "s", "ơ" => "o", "ß" => "ss", "ă" => "a", "ř" => "r", "ț" => "t", "ň" => "n", "ā" => "a", "ķ" => "k", "ŝ" => "s", "ỳ" => "y", "ņ" => "n", "ĺ" => "l", "ħ" => "h", "ṗ" => "p", "ó" => "o", "ú" => "u", "ě" => "e", "é" => "e", "ç" => "c", "ẁ" => "w", "ċ" => "c", "õ" => "o", "ṡ" => "s", "ø" => "o", "ģ" => "g", "ŧ" => "t", "ș" => "s", "ė" => "e", "ĉ" => "c", "ś" => "s", "î" => "i", "ű" => "u", "ć" => "c", "ę" => "e", "ŵ" => "w", "ṫ" => "t", "ū" => "u", "č" => "c", "ö" => "oe", "è" => "e", "ŷ" => "y", "ą" => "a", "ł" => "l", "ų" => "u", "ů" => "u", "ş" => "s", "ğ" => "g", "ļ" => "l", "ƒ" => "f", "ž" => "z", "ẃ" => "w", "ḃ" => "b", "å" => "a", "ì" => "i", "ï" => "i", "ḋ" => "d", "ť" => "t", "ŗ" => "r", "ä" => "ae", "í" => "i", "ŕ" => "r", "ê" => "e", "ü" => "ue", "ò" => "o", "ē" => "e", "ñ" => "n", "ń" => "n", "ĥ" => "h", "ĝ" => "g", "đ" => "d", "ĵ" => "j", "ÿ" => "y", "ũ" => "u", "ŭ" => "u", "ư" => "u", "ţ" => "t", "ý" => "y", "ő" => "o", "â" => "a", "ľ" => "l", "ẅ" => "w", "ż" => "z", "ī" => "i", "ã" => "a", "ġ" => "g", "ṁ" => "m", "ō" => "o", "ĩ" => "i", "ù" => "u", "į" => "i", "ź" => "z", "á" => "a", "û" => "u", "þ" => "th", "ð" => "dh", "æ" => "ae", "µ" => "u", "ĕ" => "e", "œ" => "oe", "À" => "A", "Ô" => "O", "Ď" => "D", "Ḟ" => "F", "Ë" => "E", "Š" => "S", "Ơ" => "O", "Ă" => "A", "Ř" => "R", "Ț" => "T", "Ň" => "N", "Ā" => "A", "Ķ" => "K", "Ŝ" => "S", "Ỳ" => "Y", "Ņ" => "N", "Ĺ" => "L", "Ħ" => "H", "Ṗ" => "P", "Ó" => "O", "Ú" => "U", "Ě" => "E", "É" => "E", "Ç" => "C", "Ẁ" => "W", "Ċ" => "C", "Õ" => "O", "Ṡ" => "S", "Ø" => "O", "Ģ" => "G", "Ŧ" => "T", "Ș" => "S", "Ė" => "E", "Ĉ" => "C", "Ś" => "S", "Î" => "I", "Ű" => "U", "Ć" => "C", "Ę" => "E", "Ŵ" => "W", "Ṫ" => "T", "Ū" => "U", "Č" => "C", "Ö" => "Oe", "È" => "E", "Ŷ" => "Y", "Ą" => "A", "Ł" => "L", "Ų" => "U", "Ů" => "U", "Ş" => "S", "Ğ" => "G", "Ļ" => "L", "Ƒ" => "F", "Ž" => "Z", "Ẃ" => "W", "Ḃ" => "B", "Å" => "A", "Ì" => "I", "Ï" => "I", "Ḋ" => "D", "Ť" => "T", "Ŗ" => "R", "Ä" => "Ae", "Í" => "I", "Ŕ" => "R", "Ê" => "E", "Ü" => "Ue", "Ò" => "O", "Ē" => "E", "Ñ" => "N", "Ń" => "N", "Ĥ" => "H", "Ĝ" => "G", "Đ" => "D", "Ĵ" => "J", "Ÿ" => "Y", "Ũ" => "U", "Ŭ" => "U", "Ư" => "U", "Ţ" => "T", "Ý" => "Y", "Ő" => "O", "Â" => "A", "Ľ" => "L", "Ẅ" => "W", "Ż" => "Z", "Ī" => "I", "Ã" => "A", "Ġ" => "G", "Ṁ" => "M", "Ō" => "O", "Ĩ" => "I", "Ù" => "U", "Į" => "I", "Ź" => "Z", "Á" => "A", "Û" => "U", "Þ" => "Th", "Ð" => "Dh", "Æ" => "Ae", "Ĕ" => "E", "Œ" => "Oe", ); return new self($this->toUtf8()->replace(array_keys($utf8_accents), array_values($utf8_accents))); }
php
public function transliterate() { $utf8_accents = array( "à" => "a", "ô" => "o", "ď" => "d", "ḟ" => "f", "ë" => "e", "š" => "s", "ơ" => "o", "ß" => "ss", "ă" => "a", "ř" => "r", "ț" => "t", "ň" => "n", "ā" => "a", "ķ" => "k", "ŝ" => "s", "ỳ" => "y", "ņ" => "n", "ĺ" => "l", "ħ" => "h", "ṗ" => "p", "ó" => "o", "ú" => "u", "ě" => "e", "é" => "e", "ç" => "c", "ẁ" => "w", "ċ" => "c", "õ" => "o", "ṡ" => "s", "ø" => "o", "ģ" => "g", "ŧ" => "t", "ș" => "s", "ė" => "e", "ĉ" => "c", "ś" => "s", "î" => "i", "ű" => "u", "ć" => "c", "ę" => "e", "ŵ" => "w", "ṫ" => "t", "ū" => "u", "č" => "c", "ö" => "oe", "è" => "e", "ŷ" => "y", "ą" => "a", "ł" => "l", "ų" => "u", "ů" => "u", "ş" => "s", "ğ" => "g", "ļ" => "l", "ƒ" => "f", "ž" => "z", "ẃ" => "w", "ḃ" => "b", "å" => "a", "ì" => "i", "ï" => "i", "ḋ" => "d", "ť" => "t", "ŗ" => "r", "ä" => "ae", "í" => "i", "ŕ" => "r", "ê" => "e", "ü" => "ue", "ò" => "o", "ē" => "e", "ñ" => "n", "ń" => "n", "ĥ" => "h", "ĝ" => "g", "đ" => "d", "ĵ" => "j", "ÿ" => "y", "ũ" => "u", "ŭ" => "u", "ư" => "u", "ţ" => "t", "ý" => "y", "ő" => "o", "â" => "a", "ľ" => "l", "ẅ" => "w", "ż" => "z", "ī" => "i", "ã" => "a", "ġ" => "g", "ṁ" => "m", "ō" => "o", "ĩ" => "i", "ù" => "u", "į" => "i", "ź" => "z", "á" => "a", "û" => "u", "þ" => "th", "ð" => "dh", "æ" => "ae", "µ" => "u", "ĕ" => "e", "œ" => "oe", "À" => "A", "Ô" => "O", "Ď" => "D", "Ḟ" => "F", "Ë" => "E", "Š" => "S", "Ơ" => "O", "Ă" => "A", "Ř" => "R", "Ț" => "T", "Ň" => "N", "Ā" => "A", "Ķ" => "K", "Ŝ" => "S", "Ỳ" => "Y", "Ņ" => "N", "Ĺ" => "L", "Ħ" => "H", "Ṗ" => "P", "Ó" => "O", "Ú" => "U", "Ě" => "E", "É" => "E", "Ç" => "C", "Ẁ" => "W", "Ċ" => "C", "Õ" => "O", "Ṡ" => "S", "Ø" => "O", "Ģ" => "G", "Ŧ" => "T", "Ș" => "S", "Ė" => "E", "Ĉ" => "C", "Ś" => "S", "Î" => "I", "Ű" => "U", "Ć" => "C", "Ę" => "E", "Ŵ" => "W", "Ṫ" => "T", "Ū" => "U", "Č" => "C", "Ö" => "Oe", "È" => "E", "Ŷ" => "Y", "Ą" => "A", "Ł" => "L", "Ų" => "U", "Ů" => "U", "Ş" => "S", "Ğ" => "G", "Ļ" => "L", "Ƒ" => "F", "Ž" => "Z", "Ẃ" => "W", "Ḃ" => "B", "Å" => "A", "Ì" => "I", "Ï" => "I", "Ḋ" => "D", "Ť" => "T", "Ŗ" => "R", "Ä" => "Ae", "Í" => "I", "Ŕ" => "R", "Ê" => "E", "Ü" => "Ue", "Ò" => "O", "Ē" => "E", "Ñ" => "N", "Ń" => "N", "Ĥ" => "H", "Ĝ" => "G", "Đ" => "D", "Ĵ" => "J", "Ÿ" => "Y", "Ũ" => "U", "Ŭ" => "U", "Ư" => "U", "Ţ" => "T", "Ý" => "Y", "Ő" => "O", "Â" => "A", "Ľ" => "L", "Ẅ" => "W", "Ż" => "Z", "Ī" => "I", "Ã" => "A", "Ġ" => "G", "Ṁ" => "M", "Ō" => "O", "Ĩ" => "I", "Ù" => "U", "Į" => "I", "Ź" => "Z", "Á" => "A", "Û" => "U", "Þ" => "Th", "Ð" => "Dh", "Æ" => "Ae", "Ĕ" => "E", "Œ" => "Oe", ); return new self($this->toUtf8()->replace(array_keys($utf8_accents), array_values($utf8_accents))); }
[ "public", "function", "transliterate", "(", ")", "{", "$", "utf8_accents", "=", "array", "(", "\"à\" ", "> ", "a\",", "", "\"ô\" ", "> ", "o\",", "", "\"ď\" ", "> ", "d\",", "", "\"ḟ\" =", " \"", "\",", "", "\"ë\" ", "> ", "e\",", "", "\"š\" ", "> ", ...
Returns the string transliterated from UTF-8 to Latin. @return TeamSpeak3_Helper_String
[ "Returns", "the", "string", "transliterated", "from", "UTF", "-", "8", "to", "Latin", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/String.php#L545-L759
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/String.php
TeamSpeak3_Helper_String.uriSafe
public function uriSafe($spacer = "-") { $this->string = str_replace($spacer, " ", $this->string); $this->string = $this->transliterate(); $this->string = preg_replace("/(\s|[^A-Za-z0-9\-])+/", $spacer, trim(strtolower($this->string))); $this->string = trim($this->string, $spacer); return new self($this->string); }
php
public function uriSafe($spacer = "-") { $this->string = str_replace($spacer, " ", $this->string); $this->string = $this->transliterate(); $this->string = preg_replace("/(\s|[^A-Za-z0-9\-])+/", $spacer, trim(strtolower($this->string))); $this->string = trim($this->string, $spacer); return new self($this->string); }
[ "public", "function", "uriSafe", "(", "$", "spacer", "=", "\"-\"", ")", "{", "$", "this", "->", "string", "=", "str_replace", "(", "$", "spacer", ",", "\" \"", ",", "$", "this", "->", "string", ")", ";", "$", "this", "->", "string", "=", "$", "this...
Processes the string and replaces all accented UTF-8 characters by unaccented ASCII-7 "equivalents", whitespaces are replaced by a pre-defined spacer and the string is lowercase. @param string $spacer @return TeamSpeak3_Helper_String
[ "Processes", "the", "string", "and", "replaces", "all", "accented", "UTF", "-", "8", "characters", "by", "unaccented", "ASCII", "-", "7", "equivalents", "whitespaces", "are", "replaced", "by", "a", "pre", "-", "defined", "spacer", "and", "the", "string", "is...
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/String.php#L768-L776
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Transport/Abstract.php
TeamSpeak3_Transport_Abstract.getAdapterType
public function getAdapterType() { if($this->adapter instanceof TeamSpeak3_Adapter_Abstract) { $string = TeamSpeak3_Helper_String::factory(get_class($this->adapter)); return $string->substr($string->findLast("_"))->replace(array("_", " "), "")->toString(); } return "Unknown"; }
php
public function getAdapterType() { if($this->adapter instanceof TeamSpeak3_Adapter_Abstract) { $string = TeamSpeak3_Helper_String::factory(get_class($this->adapter)); return $string->substr($string->findLast("_"))->replace(array("_", " "), "")->toString(); } return "Unknown"; }
[ "public", "function", "getAdapterType", "(", ")", "{", "if", "(", "$", "this", "->", "adapter", "instanceof", "TeamSpeak3_Adapter_Abstract", ")", "{", "$", "string", "=", "TeamSpeak3_Helper_String", "::", "factory", "(", "get_class", "(", "$", "this", "->", "a...
Returns the adapter type. @return string
[ "Returns", "the", "adapter", "type", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Transport/Abstract.php#L211-L221
planetteamspeak/ts3phpframework
libraries/TeamSpeak3/Helper/Char.php
TeamSpeak3_Helper_Char.toUnicode
public function toUnicode() { $h = ord($this->char{0}); if($h <= 0x7F) { return $h; } else if($h < 0xC2) { return FALSE; } else if($h <= 0xDF) { return ($h & 0x1F) << 6 | (ord($this->char{1}) & 0x3F); } else if($h <= 0xEF) { return ($h & 0x0F) << 12 | (ord($this->char{1}) & 0x3F) << 6 | (ord($this->char{2}) & 0x3F); } else if($h <= 0xF4) { return ($h & 0x0F) << 18 | (ord($this->char{1}) & 0x3F) << 12 | (ord($this->char{2}) & 0x3F) << 6 | (ord($this->char{3}) & 0x3F); } else { return FALSE; } }
php
public function toUnicode() { $h = ord($this->char{0}); if($h <= 0x7F) { return $h; } else if($h < 0xC2) { return FALSE; } else if($h <= 0xDF) { return ($h & 0x1F) << 6 | (ord($this->char{1}) & 0x3F); } else if($h <= 0xEF) { return ($h & 0x0F) << 12 | (ord($this->char{1}) & 0x3F) << 6 | (ord($this->char{2}) & 0x3F); } else if($h <= 0xF4) { return ($h & 0x0F) << 18 | (ord($this->char{1}) & 0x3F) << 12 | (ord($this->char{2}) & 0x3F) << 6 | (ord($this->char{3}) & 0x3F); } else { return FALSE; } }
[ "public", "function", "toUnicode", "(", ")", "{", "$", "h", "=", "ord", "(", "$", "this", "->", "char", "{", "0", "}", ")", ";", "if", "(", "$", "h", "<=", "0x7F", ")", "{", "return", "$", "h", ";", "}", "else", "if", "(", "$", "h", "<", ...
Returns the Unicode value of the character. @return integer
[ "Returns", "the", "Unicode", "value", "of", "the", "character", "." ]
train
https://github.com/planetteamspeak/ts3phpframework/blob/82ed6edc261547099c916a59f624caf5daa68035/libraries/TeamSpeak3/Helper/Char.php#L180-L208