id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
18,600 | bosha/PTel | src/PTel.php | PTel.getMetaData | public function getMetaData($param) {
if (!$this->_sock) { throw new SocketClientException("Connection gone!"); }
$info = stream_get_meta_data($this->_sock);
return $info[$param];
} | php | public function getMetaData($param) {
if (!$this->_sock) { throw new SocketClientException("Connection gone!"); }
$info = stream_get_meta_data($this->_sock);
return $info[$param];
} | [
"public",
"function",
"getMetaData",
"(",
"$",
"param",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"_sock",
")",
"{",
"throw",
"new",
"SocketClientException",
"(",
"\"Connection gone!\"",
")",
";",
"}",
"$",
"info",
"=",
"stream_get_meta_data",
"(",
"$",... | Return stream meta data parameter
@param $param string Parameter name
@throws SocketClientException On socket communication error
@return mixed Value of parameter | [
"Return",
"stream",
"meta",
"data",
"parameter"
] | 049d72f8faaf6c2548353e715e06ad1f28c756b5 | https://github.com/bosha/PTel/blob/049d72f8faaf6c2548353e715e06ad1f28c756b5/src/PTel.php#L374-L378 |
18,601 | bosha/PTel | src/PTel.php | PTel._negotiateDo | private function _negotiateDo($cmd) {
switch ($cmd) {
case TEL_TTYPE: // Send terminal type
$term = (binary) $this->terminal_type;
return $this->send(TEL_IAC.TEL_SUB.TEL_TTYPE.TEL_BIN.$term.
TEL_IAC.TEL_SUBEND,false);
case TEL_X... | php | private function _negotiateDo($cmd) {
switch ($cmd) {
case TEL_TTYPE: // Send terminal type
$term = (binary) $this->terminal_type;
return $this->send(TEL_IAC.TEL_SUB.TEL_TTYPE.TEL_BIN.$term.
TEL_IAC.TEL_SUBEND,false);
case TEL_X... | [
"private",
"function",
"_negotiateDo",
"(",
"$",
"cmd",
")",
"{",
"switch",
"(",
"$",
"cmd",
")",
"{",
"case",
"TEL_TTYPE",
":",
"// Send terminal type",
"$",
"term",
"=",
"(",
"binary",
")",
"$",
"this",
"->",
"terminal_type",
";",
"return",
"$",
"this"... | Telnet DO negotiaion
@param char $cmd Binary representation of command char
@throws SocketClientException On socket communication error
@return int Bytes written | [
"Telnet",
"DO",
"negotiaion"
] | 049d72f8faaf6c2548353e715e06ad1f28c756b5 | https://github.com/bosha/PTel/blob/049d72f8faaf6c2548353e715e06ad1f28c756b5/src/PTel.php#L422-L454 |
18,602 | bosha/PTel | src/PTel.php | PTel._negotiateWill | private function _negotiateWill($cmd) {
switch ($cmd) {
case TEL_GA:
break;
case TEL_ECHO:
break;
default:
return $this->send(TEL_IAC.TEL_WONT.$cmd, false);
}
} | php | private function _negotiateWill($cmd) {
switch ($cmd) {
case TEL_GA:
break;
case TEL_ECHO:
break;
default:
return $this->send(TEL_IAC.TEL_WONT.$cmd, false);
}
} | [
"private",
"function",
"_negotiateWill",
"(",
"$",
"cmd",
")",
"{",
"switch",
"(",
"$",
"cmd",
")",
"{",
"case",
"TEL_GA",
":",
"break",
";",
"case",
"TEL_ECHO",
":",
"break",
";",
"default",
":",
"return",
"$",
"this",
"->",
"send",
"(",
"TEL_IAC",
... | Telnet WILL negotiaion
@param char $cmd Binary representation of command char
@throws SocketClientException On socket communication error
@return int Bytes written | [
"Telnet",
"WILL",
"negotiaion"
] | 049d72f8faaf6c2548353e715e06ad1f28c756b5 | https://github.com/bosha/PTel/blob/049d72f8faaf6c2548353e715e06ad1f28c756b5/src/PTel.php#L464-L473 |
18,603 | bosha/PTel | src/PTel.php | PTel.waitReply | public function waitReply($timeout = 10) {
$timestart = time();
while (true) {
$char = $this->recvChr();
$timerun = time() - $timestart;
if ($timerun >= $timeout) {
return false;
}
if(!empty($char)) {
return true... | php | public function waitReply($timeout = 10) {
$timestart = time();
while (true) {
$char = $this->recvChr();
$timerun = time() - $timestart;
if ($timerun >= $timeout) {
return false;
}
if(!empty($char)) {
return true... | [
"public",
"function",
"waitReply",
"(",
"$",
"timeout",
"=",
"10",
")",
"{",
"$",
"timestart",
"=",
"time",
"(",
")",
";",
"while",
"(",
"true",
")",
"{",
"$",
"char",
"=",
"$",
"this",
"->",
"recvChr",
"(",
")",
";",
"$",
"timerun",
"=",
"time",... | Wait for reply from socket
@param int $timeout Max timeout to wait reply
@throws SocketClientException On socket communication error
@return bool True if found reply, false if timeout reached | [
"Wait",
"for",
"reply",
"from",
"socket"
] | 049d72f8faaf6c2548353e715e06ad1f28c756b5 | https://github.com/bosha/PTel/blob/049d72f8faaf6c2548353e715e06ad1f28c756b5/src/PTel.php#L483-L496 |
18,604 | bosha/PTel | src/PTel.php | PTel.waitFor | public function waitFor($str, $maxtimeout = 10) {
$timestart = time();
$buff = '';
while (true) {
$buff .= $this->recvChr();
$timerun = time() - $timestart;
if (preg_match("/$str/", $buff, $matches)) {
return true;
}
i... | php | public function waitFor($str, $maxtimeout = 10) {
$timestart = time();
$buff = '';
while (true) {
$buff .= $this->recvChr();
$timerun = time() - $timestart;
if (preg_match("/$str/", $buff, $matches)) {
return true;
}
i... | [
"public",
"function",
"waitFor",
"(",
"$",
"str",
",",
"$",
"maxtimeout",
"=",
"10",
")",
"{",
"$",
"timestart",
"=",
"time",
"(",
")",
";",
"$",
"buff",
"=",
"''",
";",
"while",
"(",
"true",
")",
"{",
"$",
"buff",
".=",
"$",
"this",
"->",
"rec... | Wait for specified message from socket till timeout
@param string $str String to wait
@param int $maxtimeout Maximum timeout to wait
@throws SocketClientException On socket communication error
@throws TelnetException If maxtimeout reached
@return bool True if found | [
"Wait",
"for",
"specified",
"message",
"from",
"socket",
"till",
"timeout"
] | 049d72f8faaf6c2548353e715e06ad1f28c756b5 | https://github.com/bosha/PTel/blob/049d72f8faaf6c2548353e715e06ad1f28c756b5/src/PTel.php#L508-L524 |
18,605 | bosha/PTel | src/PTel.php | PTel.getOutputOf | public function getOutputOf($cmd, $newline = true, $maxtimeout = 10) {
$return = array();
$this->recvAll();
$this->send($cmd, $newline);
$timestart = time();
while (true) {
$buff = $this->recvLine();
$timerun = time() - $timestart;
if (strpos(... | php | public function getOutputOf($cmd, $newline = true, $maxtimeout = 10) {
$return = array();
$this->recvAll();
$this->send($cmd, $newline);
$timestart = time();
while (true) {
$buff = $this->recvLine();
$timerun = time() - $timestart;
if (strpos(... | [
"public",
"function",
"getOutputOf",
"(",
"$",
"cmd",
",",
"$",
"newline",
"=",
"true",
",",
"$",
"maxtimeout",
"=",
"10",
")",
"{",
"$",
"return",
"=",
"array",
"(",
")",
";",
"$",
"this",
"->",
"recvAll",
"(",
")",
";",
"$",
"this",
"->",
"send... | Get only output of running command
@param string $cmd Command to execute
@param bool $newline Add new line character, or not
@param int $maxtimeout Maximum timeout to wait command execution
@throws SocketClientException On socket communication error
@throws TelnetException ... | [
"Get",
"only",
"output",
"of",
"running",
"command"
] | 049d72f8faaf6c2548353e715e06ad1f28c756b5 | https://github.com/bosha/PTel/blob/049d72f8faaf6c2548353e715e06ad1f28c756b5/src/PTel.php#L538-L565 |
18,606 | bosha/PTel | src/PTel.php | PTel.setTermSpeed | public function setTermSpeed($in, $out) {
$this->terminal_speed_in = $in;
$this->terminal_speed_out = $out;
return $this;
} | php | public function setTermSpeed($in, $out) {
$this->terminal_speed_in = $in;
$this->terminal_speed_out = $out;
return $this;
} | [
"public",
"function",
"setTermSpeed",
"(",
"$",
"in",
",",
"$",
"out",
")",
"{",
"$",
"this",
"->",
"terminal_speed_in",
"=",
"$",
"in",
";",
"$",
"this",
"->",
"terminal_speed_out",
"=",
"$",
"out",
";",
"return",
"$",
"this",
";",
"}"
] | Setting terminal speed
@param string $in String with inbound terminal speed
@param string $out String with outbound terminal speed
@return $this Instance of current class | [
"Setting",
"terminal",
"speed"
] | 049d72f8faaf6c2548353e715e06ad1f28c756b5 | https://github.com/bosha/PTel/blob/049d72f8faaf6c2548353e715e06ad1f28c756b5/src/PTel.php#L587-L592 |
18,607 | bosha/PTel | src/PTel.php | PTel.setWindowSize | public function setWindowSize($height, $width) {
if (!is_int($height) || !is_int($width)) {
throw new TelnetException("Wrong windows height or width used. Should valid integer.");
}
if ($height < 1 || $width < 1 || $height === 255 || $width === 255) {
throw new TelnetExc... | php | public function setWindowSize($height, $width) {
if (!is_int($height) || !is_int($width)) {
throw new TelnetException("Wrong windows height or width used. Should valid integer.");
}
if ($height < 1 || $width < 1 || $height === 255 || $width === 255) {
throw new TelnetExc... | [
"public",
"function",
"setWindowSize",
"(",
"$",
"height",
",",
"$",
"width",
")",
"{",
"if",
"(",
"!",
"is_int",
"(",
"$",
"height",
")",
"||",
"!",
"is_int",
"(",
"$",
"width",
")",
")",
"{",
"throw",
"new",
"TelnetException",
"(",
"\"Wrong windows h... | Window size used while negotiating
@param int $height Window height
@param int $width Window width
@throws TelnetException On wrong parameter specified
@throws SocketClientException On socket communication error
@return $this Instance of current class | [
"Window",
"size",
"used",
"while",
"negotiating"
] | 049d72f8faaf6c2548353e715e06ad1f28c756b5 | https://github.com/bosha/PTel/blob/049d72f8faaf6c2548353e715e06ad1f28c756b5/src/PTel.php#L605-L618 |
18,608 | steeffeen/FancyManiaLinks | FML/XmlRpc/TMUIProperties.php | TMUIProperties.setLiveInfoPosition | public function setLiveInfoPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->liveInfoProperties, $positionX, $positionY, $positionZ);
return $this;
} | php | public function setLiveInfoPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->liveInfoProperties, $positionX, $positionY, $positionZ);
return $this;
} | [
"public",
"function",
"setLiveInfoPosition",
"(",
"$",
"positionX",
",",
"$",
"positionY",
",",
"$",
"positionZ",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"setPositionProperty",
"(",
"$",
"this",
"->",
"liveInfoProperties",
",",
"$",
"positionX",
",",
"$",
... | Set the live info position
@api
@param float $positionX X position
@param float $positionY Y position
@param float $positionZ (optional) Z position (Z-index)
@return static | [
"Set",
"the",
"live",
"info",
"position"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/TMUIProperties.php#L124-L128 |
18,609 | steeffeen/FancyManiaLinks | FML/XmlRpc/TMUIProperties.php | TMUIProperties.setSpectatorInfoPosition | public function setSpectatorInfoPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->spectatorInfoProperties, $positionX, $positionY, $positionZ);
return $this;
} | php | public function setSpectatorInfoPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->spectatorInfoProperties, $positionX, $positionY, $positionZ);
return $this;
} | [
"public",
"function",
"setSpectatorInfoPosition",
"(",
"$",
"positionX",
",",
"$",
"positionY",
",",
"$",
"positionZ",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"setPositionProperty",
"(",
"$",
"this",
"->",
"spectatorInfoProperties",
",",
"$",
"positionX",
",... | Set the spectator info position
@api
@param float $positionX X position
@param float $positionY Y position
@param float $positionZ (optional) Z position (Z-index)
@return static | [
"Set",
"the",
"spectator",
"info",
"position"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/TMUIProperties.php#L174-L178 |
18,610 | steeffeen/FancyManiaLinks | FML/XmlRpc/TMUIProperties.php | TMUIProperties.setCheckpointListPosition | public function setCheckpointListPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->checkpointListProperties, $positionX, $positionY, $positionZ);
return $this;
} | php | public function setCheckpointListPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->checkpointListProperties, $positionX, $positionY, $positionZ);
return $this;
} | [
"public",
"function",
"setCheckpointListPosition",
"(",
"$",
"positionX",
",",
"$",
"positionY",
",",
"$",
"positionZ",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"setPositionProperty",
"(",
"$",
"this",
"->",
"checkpointListProperties",
",",
"$",
"positionX",
... | Set the checkpoint list position
@api
@param float $positionX X position
@param float $positionY Y position
@param float $positionZ (optional) Z position (Z-index)
@return static | [
"Set",
"the",
"checkpoint",
"list",
"position"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/TMUIProperties.php#L248-L252 |
18,611 | steeffeen/FancyManiaLinks | FML/XmlRpc/TMUIProperties.php | TMUIProperties.setRoundScoresPosition | public function setRoundScoresPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->roundScoresProperties, $positionX, $positionY, $positionZ);
return $this;
} | php | public function setRoundScoresPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->roundScoresProperties, $positionX, $positionY, $positionZ);
return $this;
} | [
"public",
"function",
"setRoundScoresPosition",
"(",
"$",
"positionX",
",",
"$",
"positionY",
",",
"$",
"positionZ",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"setPositionProperty",
"(",
"$",
"this",
"->",
"roundScoresProperties",
",",
"$",
"positionX",
",",
... | Set the round scores position
@api
@param float $positionX X position
@param float $positionY Y position
@param float $positionZ (optional) Z position (Z-index)
@return static | [
"Set",
"the",
"round",
"scores",
"position"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/TMUIProperties.php#L298-L302 |
18,612 | steeffeen/FancyManiaLinks | FML/XmlRpc/TMUIProperties.php | TMUIProperties.setChronoPosition | public function setChronoPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->chronoProperties, $positionX, $positionY, $positionZ);
return $this;
} | php | public function setChronoPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->chronoProperties, $positionX, $positionY, $positionZ);
return $this;
} | [
"public",
"function",
"setChronoPosition",
"(",
"$",
"positionX",
",",
"$",
"positionY",
",",
"$",
"positionZ",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"setPositionProperty",
"(",
"$",
"this",
"->",
"chronoProperties",
",",
"$",
"positionX",
",",
"$",
"p... | Set the chrono position
@api
@param float $positionX X position
@param float $positionY Y position
@param float $positionZ (optional) Z position (Z-index)
@return static | [
"Set",
"the",
"chrono",
"position"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/TMUIProperties.php#L348-L352 |
18,613 | steeffeen/FancyManiaLinks | FML/XmlRpc/TMUIProperties.php | TMUIProperties.setSpeedAndDistancePosition | public function setSpeedAndDistancePosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->speedAndDistanceProperties, $positionX, $positionY, $positionZ);
return $this;
} | php | public function setSpeedAndDistancePosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->speedAndDistanceProperties, $positionX, $positionY, $positionZ);
return $this;
} | [
"public",
"function",
"setSpeedAndDistancePosition",
"(",
"$",
"positionX",
",",
"$",
"positionY",
",",
"$",
"positionZ",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"setPositionProperty",
"(",
"$",
"this",
"->",
"speedAndDistanceProperties",
",",
"$",
"positionX"... | Set the speed and distance position
@api
@param float $positionX X position
@param float $positionY Y position
@param float $positionZ (optional) Z position (Z-index)
@return static | [
"Set",
"the",
"speed",
"and",
"distance",
"position"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/TMUIProperties.php#L398-L402 |
18,614 | steeffeen/FancyManiaLinks | FML/XmlRpc/TMUIProperties.php | TMUIProperties.setPersonalBestAndRankPosition | public function setPersonalBestAndRankPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->personalBestAndRankProperties, $positionX, $positionY, $positionZ);
return $this;
} | php | public function setPersonalBestAndRankPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->personalBestAndRankProperties, $positionX, $positionY, $positionZ);
return $this;
} | [
"public",
"function",
"setPersonalBestAndRankPosition",
"(",
"$",
"positionX",
",",
"$",
"positionY",
",",
"$",
"positionZ",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"setPositionProperty",
"(",
"$",
"this",
"->",
"personalBestAndRankProperties",
",",
"$",
"posi... | Set the personal best and rank position
@api
@param float $positionX X position
@param float $positionY Y position
@param float $positionZ (optional) Z position (Z-index)
@return static | [
"Set",
"the",
"personal",
"best",
"and",
"rank",
"position"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/TMUIProperties.php#L448-L452 |
18,615 | steeffeen/FancyManiaLinks | FML/XmlRpc/TMUIProperties.php | TMUIProperties.setPositionPosition | public function setPositionPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->positionProperties, $positionX, $positionY, $positionZ);
return $this;
} | php | public function setPositionPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->positionProperties, $positionX, $positionY, $positionZ);
return $this;
} | [
"public",
"function",
"setPositionPosition",
"(",
"$",
"positionX",
",",
"$",
"positionY",
",",
"$",
"positionZ",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"setPositionProperty",
"(",
"$",
"this",
"->",
"positionProperties",
",",
"$",
"positionX",
",",
"$",
... | Set the position position
@api
@param float $positionX X position
@param float $positionY Y position
@param float $positionZ (optional) Z position (Z-index)
@return static | [
"Set",
"the",
"position",
"position"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/TMUIProperties.php#L498-L502 |
18,616 | steeffeen/FancyManiaLinks | FML/XmlRpc/TMUIProperties.php | TMUIProperties.setCheckpointTimePosition | public function setCheckpointTimePosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->checkpointTimeProperties, $positionX, $positionY, $positionZ);
return $this;
} | php | public function setCheckpointTimePosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->checkpointTimeProperties, $positionX, $positionY, $positionZ);
return $this;
} | [
"public",
"function",
"setCheckpointTimePosition",
"(",
"$",
"positionX",
",",
"$",
"positionY",
",",
"$",
"positionZ",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"setPositionProperty",
"(",
"$",
"this",
"->",
"checkpointTimeProperties",
",",
"$",
"positionX",
... | Set the checkpoint time position
@api
@param float $positionX X position
@param float $positionY Y position
@param float $positionZ (optional) Z position (Z-index)
@return static | [
"Set",
"the",
"checkpoint",
"time",
"position"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/TMUIProperties.php#L548-L552 |
18,617 | steeffeen/FancyManiaLinks | FML/XmlRpc/TMUIProperties.php | TMUIProperties.setWarmUpPosition | public function setWarmUpPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->warmUpProperties, $positionX, $positionY, $positionZ);
return $this;
} | php | public function setWarmUpPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->warmUpProperties, $positionX, $positionY, $positionZ);
return $this;
} | [
"public",
"function",
"setWarmUpPosition",
"(",
"$",
"positionX",
",",
"$",
"positionY",
",",
"$",
"positionZ",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"setPositionProperty",
"(",
"$",
"this",
"->",
"warmUpProperties",
",",
"$",
"positionX",
",",
"$",
"p... | Set the warm-up position
@api
@param float $positionX X position
@param float $positionY Y position
@param float $positionZ (optional) Z position (Z-index)
@return static | [
"Set",
"the",
"warm",
"-",
"up",
"position"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/TMUIProperties.php#L598-L602 |
18,618 | steeffeen/FancyManiaLinks | FML/XmlRpc/TMUIProperties.php | TMUIProperties.setMultiLapInfoPosition | public function setMultiLapInfoPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->multiLapInfoProperties, $positionX, $positionY, $positionZ);
return $this;
} | php | public function setMultiLapInfoPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->multiLapInfoProperties, $positionX, $positionY, $positionZ);
return $this;
} | [
"public",
"function",
"setMultiLapInfoPosition",
"(",
"$",
"positionX",
",",
"$",
"positionY",
",",
"$",
"positionZ",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"setPositionProperty",
"(",
"$",
"this",
"->",
"multiLapInfoProperties",
",",
"$",
"positionX",
",",... | Set the multi-lap info position
@api
@param float $positionX X position
@param float $positionY Y position
@param float $positionZ (optional) Z position (Z-index)
@return static | [
"Set",
"the",
"multi",
"-",
"lap",
"info",
"position"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/TMUIProperties.php#L648-L652 |
18,619 | steeffeen/FancyManiaLinks | FML/XmlRpc/TMUIProperties.php | TMUIProperties.setCheckpointRankingPosition | public function setCheckpointRankingPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->checkpointRankingProperties, $positionX, $positionY, $positionZ);
return $this;
} | php | public function setCheckpointRankingPosition($positionX, $positionY, $positionZ = null)
{
$this->setPositionProperty($this->checkpointRankingProperties, $positionX, $positionY, $positionZ);
return $this;
} | [
"public",
"function",
"setCheckpointRankingPosition",
"(",
"$",
"positionX",
",",
"$",
"positionY",
",",
"$",
"positionZ",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"setPositionProperty",
"(",
"$",
"this",
"->",
"checkpointRankingProperties",
",",
"$",
"position... | Set the checkpoint ranking position
@api
@param float $positionX X position
@param float $positionY Y position
@param float $positionZ (optional) Z position (Z-index)
@return static | [
"Set",
"the",
"checkpoint",
"ranking",
"position"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/XmlRpc/TMUIProperties.php#L698-L702 |
18,620 | scrutinizer-ci/rabbitmq | src/Scrutinizer/RabbitMQ/Rpc/RpcClient.php | RpcClient.invoke | public function invoke($queueName, $payload, $resultType, $timeout = 10)
{
$rs = $this->invokeAll(array(array($queueName, $payload, $resultType)), $timeout);
if ($rs[0] instanceof RpcError) {
throw new RpcErrorException($rs[0]);
}
return $rs[0];
} | php | public function invoke($queueName, $payload, $resultType, $timeout = 10)
{
$rs = $this->invokeAll(array(array($queueName, $payload, $resultType)), $timeout);
if ($rs[0] instanceof RpcError) {
throw new RpcErrorException($rs[0]);
}
return $rs[0];
} | [
"public",
"function",
"invoke",
"(",
"$",
"queueName",
",",
"$",
"payload",
",",
"$",
"resultType",
",",
"$",
"timeout",
"=",
"10",
")",
"{",
"$",
"rs",
"=",
"$",
"this",
"->",
"invokeAll",
"(",
"array",
"(",
"array",
"(",
"$",
"queueName",
",",
"$... | Invokes a single remote command and returns the result of the invocation.
The remote command is invoked synchronously.
@param $queueName
@param $payload
@param $resultType
@throws RpcErrorException when a remote error occurs
@return mixed | [
"Invokes",
"a",
"single",
"remote",
"command",
"and",
"returns",
"the",
"result",
"of",
"the",
"invocation",
"."
] | 5603f7901de2ad352086287f8d2c65bbae5170d5 | https://github.com/scrutinizer-ci/rabbitmq/blob/5603f7901de2ad352086287f8d2c65bbae5170d5/src/Scrutinizer/RabbitMQ/Rpc/RpcClient.php#L93-L101 |
18,621 | webforge-labs/psc-cms | lib/Psc/Code/Generate/GProperty.php | GProperty.reflectorFactory | public static function reflectorFactory(Reflector $reflector) {
$args = func_get_args();
$g = new static($args[1]);
$g->elevate($args[0]);
return $g;
} | php | public static function reflectorFactory(Reflector $reflector) {
$args = func_get_args();
$g = new static($args[1]);
$g->elevate($args[0]);
return $g;
} | [
"public",
"static",
"function",
"reflectorFactory",
"(",
"Reflector",
"$",
"reflector",
")",
"{",
"$",
"args",
"=",
"func_get_args",
"(",
")",
";",
"$",
"g",
"=",
"new",
"static",
"(",
"$",
"args",
"[",
"1",
"]",
")",
";",
"$",
"g",
"->",
"elevate",
... | Erstellt ein neues GProperty
der zweite Parameter ist wichtig
@param Reflector $reflector
@param GClass $gClass | [
"Erstellt",
"ein",
"neues",
"GProperty"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Code/Generate/GProperty.php#L126-L131 |
18,622 | askupasoftware/amarkal | Form/Updater.php | Updater.reset | public function reset( array $names = array() )
{
if( array() == $names )
{
// Unset new instance to force reset
$this->new_instance = array();
return $this->update();
}
else
{
foreach( $this->components as $c )
{
... | php | public function reset( array $names = array() )
{
if( array() == $names )
{
// Unset new instance to force reset
$this->new_instance = array();
return $this->update();
}
else
{
foreach( $this->components as $c )
{
... | [
"public",
"function",
"reset",
"(",
"array",
"$",
"names",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"array",
"(",
")",
"==",
"$",
"names",
")",
"{",
"// Unset new instance to force reset",
"$",
"this",
"->",
"new_instance",
"=",
"array",
"(",
")",
... | Reset all fields to their default values.
@param array $names List of component names to be set to their defaults. If no names are specified, all components will be reset
@return array The updated values array. | [
"Reset",
"all",
"fields",
"to",
"their",
"default",
"values",
"."
] | fe8283e2d6847ef697abec832da7ee741a85058c | https://github.com/askupasoftware/amarkal/blob/fe8283e2d6847ef697abec832da7ee741a85058c/Form/Updater.php#L97-L116 |
18,623 | askupasoftware/amarkal | Form/Updater.php | Updater.update_components | private function update_components( $components )
{
foreach ( $components as $component )
{
// Update each component in the composite collection
if ( $component instanceof UI\Components\Composite )
{
$this->update_components( $component->component... | php | private function update_components( $components )
{
foreach ( $components as $component )
{
// Update each component in the composite collection
if ( $component instanceof UI\Components\Composite )
{
$this->update_components( $component->component... | [
"private",
"function",
"update_components",
"(",
"$",
"components",
")",
"{",
"foreach",
"(",
"$",
"components",
"as",
"$",
"component",
")",
"{",
"// Update each component in the composite collection",
"if",
"(",
"$",
"component",
"instanceof",
"UI",
"\\",
"Compone... | Update the given list of components.
Recursively calls itself fpr composite components.
@param UI\AbstractComponent $components | [
"Update",
"the",
"given",
"list",
"of",
"components",
".",
"Recursively",
"calls",
"itself",
"fpr",
"composite",
"components",
"."
] | fe8283e2d6847ef697abec832da7ee741a85058c | https://github.com/askupasoftware/amarkal/blob/fe8283e2d6847ef697abec832da7ee741a85058c/Form/Updater.php#L124-L140 |
18,624 | askupasoftware/amarkal | Form/Updater.php | Updater.update_value | private function update_value( $component, $value )
{
$component->set_value( $value );
$this->final_instance[$component->get_name()] = $value;
} | php | private function update_value( $component, $value )
{
$component->set_value( $value );
$this->final_instance[$component->get_name()] = $value;
} | [
"private",
"function",
"update_value",
"(",
"$",
"component",
",",
"$",
"value",
")",
"{",
"$",
"component",
"->",
"set_value",
"(",
"$",
"value",
")",
";",
"$",
"this",
"->",
"final_instance",
"[",
"$",
"component",
"->",
"get_name",
"(",
")",
"]",
"=... | Update the component's value and the final instance with the
given value.
@param UI\AbstractComponent $component
@param string $value | [
"Update",
"the",
"component",
"s",
"value",
"and",
"the",
"final",
"instance",
"with",
"the",
"given",
"value",
"."
] | fe8283e2d6847ef697abec832da7ee741a85058c | https://github.com/askupasoftware/amarkal/blob/fe8283e2d6847ef697abec832da7ee741a85058c/Form/Updater.php#L200-L204 |
18,625 | askupasoftware/amarkal | Form/Updater.php | Updater.update_filterable | private function update_filterable( UI\FilterableComponentInterface $component )
{
$this->update_value(
$component,
$component->apply_filter( $this->new_instance[$component->get_name()] )
);
} | php | private function update_filterable( UI\FilterableComponentInterface $component )
{
$this->update_value(
$component,
$component->apply_filter( $this->new_instance[$component->get_name()] )
);
} | [
"private",
"function",
"update_filterable",
"(",
"UI",
"\\",
"FilterableComponentInterface",
"$",
"component",
")",
"{",
"$",
"this",
"->",
"update_value",
"(",
"$",
"component",
",",
"$",
"component",
"->",
"apply_filter",
"(",
"$",
"this",
"->",
"new_instance"... | Filter the component's value using its filter function.
@param UI\FilterableComponentInterface $component | [
"Filter",
"the",
"component",
"s",
"value",
"using",
"its",
"filter",
"function",
"."
] | fe8283e2d6847ef697abec832da7ee741a85058c | https://github.com/askupasoftware/amarkal/blob/fe8283e2d6847ef697abec832da7ee741a85058c/Form/Updater.php#L224-L230 |
18,626 | forxer/tao | src/Tao/Support/StopWords.php | StopWords.get | public function get($locale = 'en')
{
if (isset($this->stopwords[$locale])) {
return $this->stopwords[$locale];
}
$this->stopwords[$locale] = [];
$filename = $this->path . '/' . $locale . '.php';
if (file_exists($filename)) {
$this->stopwords[$locale] = require $filename;
}
return $this->stopwo... | php | public function get($locale = 'en')
{
if (isset($this->stopwords[$locale])) {
return $this->stopwords[$locale];
}
$this->stopwords[$locale] = [];
$filename = $this->path . '/' . $locale . '.php';
if (file_exists($filename)) {
$this->stopwords[$locale] = require $filename;
}
return $this->stopwo... | [
"public",
"function",
"get",
"(",
"$",
"locale",
"=",
"'en'",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"stopwords",
"[",
"$",
"locale",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"stopwords",
"[",
"$",
"locale",
"]",
";",
"}",
... | Return stop word list for given locale.
@param string $locale
@return array | [
"Return",
"stop",
"word",
"list",
"for",
"given",
"locale",
"."
] | b5e9109c244a29a72403ae6a58633ab96a67c660 | https://github.com/forxer/tao/blob/b5e9109c244a29a72403ae6a58633ab96a67c660/src/Tao/Support/StopWords.php#L25-L40 |
18,627 | slashworks/control-bundle | src/Slashworks/BackendBundle/Model/om/BaseRolePeer.php | BaseRolePeer.doInsert | public static function doInsert($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(RolePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} els... | php | public static function doInsert($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(RolePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} els... | [
"public",
"static",
"function",
"doInsert",
"(",
"$",
"values",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"con",
"===",
"null",
")",
"{",
"$",
"con",
"=",
"Propel",
"::",
"getConnection",
"(",
"RolePeer",
"::",
"DATABASE_NAME... | Performs an INSERT on the database, given a Role or Criteria object.
@param mixed $values Criteria or Role object containing data that is used to create the INSERT statement.
@param PropelPDO $con the PropelPDO connection to use
@return mixed The new primary key.
@throws PropelException Any excepti... | [
"Performs",
"an",
"INSERT",
"on",
"the",
"database",
"given",
"a",
"Role",
"or",
"Criteria",
"object",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/BackendBundle/Model/om/BaseRolePeer.php#L516-L548 |
18,628 | flipboxstudio/orm-manager | src/Flipbox/OrmManager/Consoles/ModelDetail.php | ModelDetail.showDetail | protected function showDetail(Model $model)
{
$name = $this->manager->getClassName($model);
$this->title("Summary of Model {$name} :");
$summary = $this->manager->getModelSummary($name);
$rows = [];
foreach ($summary as $key => $value) {
if (is_bool($value)) {
... | php | protected function showDetail(Model $model)
{
$name = $this->manager->getClassName($model);
$this->title("Summary of Model {$name} :");
$summary = $this->manager->getModelSummary($name);
$rows = [];
foreach ($summary as $key => $value) {
if (is_bool($value)) {
... | [
"protected",
"function",
"showDetail",
"(",
"Model",
"$",
"model",
")",
"{",
"$",
"name",
"=",
"$",
"this",
"->",
"manager",
"->",
"getClassName",
"(",
"$",
"model",
")",
";",
"$",
"this",
"->",
"title",
"(",
"\"Summary of Model {$name} :\"",
")",
";",
"... | show detail of model
@param Model $model
@return void | [
"show",
"detail",
"of",
"model"
] | 4288426517f53d05177b8729c4ba94c5beca9a98 | https://github.com/flipboxstudio/orm-manager/blob/4288426517f53d05177b8729c4ba94c5beca9a98/src/Flipbox/OrmManager/Consoles/ModelDetail.php#L77-L101 |
18,629 | flipboxstudio/orm-manager | src/Flipbox/OrmManager/Consoles/ModelDetail.php | ModelDetail.showDatabaseFields | protected function showDatabaseFields(Model $model)
{
$this->title("Table {$model->getTable()} :");
if ( ! $this->db->isConnected()) {
$this->warn("Not Connected to databse, please check your connection config\r");
} else {
$fields = $this->db->getFields($model->getT... | php | protected function showDatabaseFields(Model $model)
{
$this->title("Table {$model->getTable()} :");
if ( ! $this->db->isConnected()) {
$this->warn("Not Connected to databse, please check your connection config\r");
} else {
$fields = $this->db->getFields($model->getT... | [
"protected",
"function",
"showDatabaseFields",
"(",
"Model",
"$",
"model",
")",
"{",
"$",
"this",
"->",
"title",
"(",
"\"Table {$model->getTable()} :\"",
")",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"db",
"->",
"isConnected",
"(",
")",
")",
"{",
"$",
"th... | show database fileds
@param Model $model
@return void | [
"show",
"database",
"fileds"
] | 4288426517f53d05177b8729c4ba94c5beca9a98 | https://github.com/flipboxstudio/orm-manager/blob/4288426517f53d05177b8729c4ba94c5beca9a98/src/Flipbox/OrmManager/Consoles/ModelDetail.php#L109-L121 |
18,630 | flipboxstudio/orm-manager | src/Flipbox/OrmManager/Consoles/ModelDetail.php | ModelDetail.showRelatoins | protected function showRelatoins(Model $model)
{
$name = $this->manager->getClassName($model);
$this->title("Relations of Model {$name}: ");
$relations = $this->manager->getRelations($model);
$tbody = [];
foreach ($relations as $relation) {
$relationName = $thi... | php | protected function showRelatoins(Model $model)
{
$name = $this->manager->getClassName($model);
$this->title("Relations of Model {$name}: ");
$relations = $this->manager->getRelations($model);
$tbody = [];
foreach ($relations as $relation) {
$relationName = $thi... | [
"protected",
"function",
"showRelatoins",
"(",
"Model",
"$",
"model",
")",
"{",
"$",
"name",
"=",
"$",
"this",
"->",
"manager",
"->",
"getClassName",
"(",
"$",
"model",
")",
";",
"$",
"this",
"->",
"title",
"(",
"\"Relations of Model {$name}: \"",
")",
";"... | show relations of model
@param Model $model
@return void | [
"show",
"relations",
"of",
"model"
] | 4288426517f53d05177b8729c4ba94c5beca9a98 | https://github.com/flipboxstudio/orm-manager/blob/4288426517f53d05177b8729c4ba94c5beca9a98/src/Flipbox/OrmManager/Consoles/ModelDetail.php#L129-L149 |
18,631 | flipboxstudio/orm-manager | src/Flipbox/OrmManager/Consoles/ModelDetail.php | ModelDetail.showModifier | protected function showModifier(Model $model)
{
$name = $this->manager->getClassName($model);
$this->title("Modifier of Model {$name}: ");
$modifiers = [
'mutators' => $this->manager->getMutators($model),
'accessors' => $this->manager->getAccessors($model),
... | php | protected function showModifier(Model $model)
{
$name = $this->manager->getClassName($model);
$this->title("Modifier of Model {$name}: ");
$modifiers = [
'mutators' => $this->manager->getMutators($model),
'accessors' => $this->manager->getAccessors($model),
... | [
"protected",
"function",
"showModifier",
"(",
"Model",
"$",
"model",
")",
"{",
"$",
"name",
"=",
"$",
"this",
"->",
"manager",
"->",
"getClassName",
"(",
"$",
"model",
")",
";",
"$",
"this",
"->",
"title",
"(",
"\"Modifier of Model {$name}: \"",
")",
";",
... | show model modifier
@param Model $model
@return void | [
"show",
"model",
"modifier"
] | 4288426517f53d05177b8729c4ba94c5beca9a98 | https://github.com/flipboxstudio/orm-manager/blob/4288426517f53d05177b8729c4ba94c5beca9a98/src/Flipbox/OrmManager/Consoles/ModelDetail.php#L157-L189 |
18,632 | nicklaw5/larapi | src/Larapi.php | Larapi.badRequest | public function badRequest($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_BAD_REQUEST, $headers);
} | php | public function badRequest($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_BAD_REQUEST, $headers);
} | [
"public",
"function",
"badRequest",
"(",
"$",
"msg",
"=",
"''",
",",
"$",
"errorCode",
"=",
"null",
",",
"$",
"headers",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"getErrorResponse",
"(",
"$",
"msg",
",",
"$",
"errorCode",
",",
"self",
... | Returns 400 Bad Request Response
@param string $msg
@param int $errorCode
@param array $headers
@return json | [
"Returns",
"400",
"Bad",
"Request",
"Response"
] | fb3493118bb9c6ce01567230c09e8402ac148d0e | https://github.com/nicklaw5/larapi/blob/fb3493118bb9c6ce01567230c09e8402ac148d0e/src/Larapi.php#L110-L113 |
18,633 | nicklaw5/larapi | src/Larapi.php | Larapi.unauthorized | public function unauthorized($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_UNAUTHORIZED, $headers);
} | php | public function unauthorized($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_UNAUTHORIZED, $headers);
} | [
"public",
"function",
"unauthorized",
"(",
"$",
"msg",
"=",
"''",
",",
"$",
"errorCode",
"=",
"null",
",",
"$",
"headers",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"getErrorResponse",
"(",
"$",
"msg",
",",
"$",
"errorCode",
",",
"self",
... | Returns 401 Unauthorized Response
@param string $msg
@param int $errorCode
@param array $headers
@return json | [
"Returns",
"401",
"Unauthorized",
"Response"
] | fb3493118bb9c6ce01567230c09e8402ac148d0e | https://github.com/nicklaw5/larapi/blob/fb3493118bb9c6ce01567230c09e8402ac148d0e/src/Larapi.php#L123-L126 |
18,634 | nicklaw5/larapi | src/Larapi.php | Larapi.forbidden | public function forbidden($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_FORBIDDEN, $headers);
} | php | public function forbidden($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_FORBIDDEN, $headers);
} | [
"public",
"function",
"forbidden",
"(",
"$",
"msg",
"=",
"''",
",",
"$",
"errorCode",
"=",
"null",
",",
"$",
"headers",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"getErrorResponse",
"(",
"$",
"msg",
",",
"$",
"errorCode",
",",
"self",
"... | Returns 403 Forbidden Response
@param string $msg
@param int $errorCode
@param array $headers
@return json | [
"Returns",
"403",
"Forbidden",
"Response"
] | fb3493118bb9c6ce01567230c09e8402ac148d0e | https://github.com/nicklaw5/larapi/blob/fb3493118bb9c6ce01567230c09e8402ac148d0e/src/Larapi.php#L136-L139 |
18,635 | nicklaw5/larapi | src/Larapi.php | Larapi.notFound | public function notFound($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_NOT_FOUND, $headers);
} | php | public function notFound($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_NOT_FOUND, $headers);
} | [
"public",
"function",
"notFound",
"(",
"$",
"msg",
"=",
"''",
",",
"$",
"errorCode",
"=",
"null",
",",
"$",
"headers",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"getErrorResponse",
"(",
"$",
"msg",
",",
"$",
"errorCode",
",",
"self",
":... | Returns 404 Not Found HTTP Response
@param string $msg
@param int $errorCode
@param array $headers
@return json | [
"Returns",
"404",
"Not",
"Found",
"HTTP",
"Response"
] | fb3493118bb9c6ce01567230c09e8402ac148d0e | https://github.com/nicklaw5/larapi/blob/fb3493118bb9c6ce01567230c09e8402ac148d0e/src/Larapi.php#L149-L152 |
18,636 | nicklaw5/larapi | src/Larapi.php | Larapi.methodNotAllowed | public function methodNotAllowed($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_METHOD_NOT_ALLOWED, $headers);
} | php | public function methodNotAllowed($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_METHOD_NOT_ALLOWED, $headers);
} | [
"public",
"function",
"methodNotAllowed",
"(",
"$",
"msg",
"=",
"''",
",",
"$",
"errorCode",
"=",
"null",
",",
"$",
"headers",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"getErrorResponse",
"(",
"$",
"msg",
",",
"$",
"errorCode",
",",
"sel... | Returns 405 Method Not Allowed Response
@param string $msg
@param int $errorCode
@param array $headers
@return json | [
"Returns",
"405",
"Method",
"Not",
"Allowed",
"Response"
] | fb3493118bb9c6ce01567230c09e8402ac148d0e | https://github.com/nicklaw5/larapi/blob/fb3493118bb9c6ce01567230c09e8402ac148d0e/src/Larapi.php#L162-L165 |
18,637 | nicklaw5/larapi | src/Larapi.php | Larapi.conflict | public function conflict($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_CONFLICT, $headers);
} | php | public function conflict($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_CONFLICT, $headers);
} | [
"public",
"function",
"conflict",
"(",
"$",
"msg",
"=",
"''",
",",
"$",
"errorCode",
"=",
"null",
",",
"$",
"headers",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"getErrorResponse",
"(",
"$",
"msg",
",",
"$",
"errorCode",
",",
"self",
":... | Returns 409 Conflict Response
@param string $msg
@param int $errorCode
@param array $headers
@return json | [
"Returns",
"409",
"Conflict",
"Response"
] | fb3493118bb9c6ce01567230c09e8402ac148d0e | https://github.com/nicklaw5/larapi/blob/fb3493118bb9c6ce01567230c09e8402ac148d0e/src/Larapi.php#L175-L178 |
18,638 | nicklaw5/larapi | src/Larapi.php | Larapi.unprocessableEntity | public function unprocessableEntity($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_UNPROCESSABLE_ENTITY, $headers);
} | php | public function unprocessableEntity($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_UNPROCESSABLE_ENTITY, $headers);
} | [
"public",
"function",
"unprocessableEntity",
"(",
"$",
"msg",
"=",
"''",
",",
"$",
"errorCode",
"=",
"null",
",",
"$",
"headers",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"getErrorResponse",
"(",
"$",
"msg",
",",
"$",
"errorCode",
",",
"... | Returns 422 Unprocessable Entity
@param string $msg
@param int $errorCode
@param array $headers
@return json | [
"Returns",
"422",
"Unprocessable",
"Entity"
] | fb3493118bb9c6ce01567230c09e8402ac148d0e | https://github.com/nicklaw5/larapi/blob/fb3493118bb9c6ce01567230c09e8402ac148d0e/src/Larapi.php#L188-L191 |
18,639 | nicklaw5/larapi | src/Larapi.php | Larapi.internalError | public function internalError($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_INTERNAL_SERVER_ERROR, $headers);
} | php | public function internalError($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_INTERNAL_SERVER_ERROR, $headers);
} | [
"public",
"function",
"internalError",
"(",
"$",
"msg",
"=",
"''",
",",
"$",
"errorCode",
"=",
"null",
",",
"$",
"headers",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"getErrorResponse",
"(",
"$",
"msg",
",",
"$",
"errorCode",
",",
"self",... | Returns 500 Internal Server HTTP Response
@param string $msg
@param int $errorCode
@param array $headers
@return json | [
"Returns",
"500",
"Internal",
"Server",
"HTTP",
"Response"
] | fb3493118bb9c6ce01567230c09e8402ac148d0e | https://github.com/nicklaw5/larapi/blob/fb3493118bb9c6ce01567230c09e8402ac148d0e/src/Larapi.php#L201-L204 |
18,640 | nicklaw5/larapi | src/Larapi.php | Larapi.notImplemented | public function notImplemented($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_NOT_IMPLEMENTED, $headers);
} | php | public function notImplemented($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_NOT_IMPLEMENTED, $headers);
} | [
"public",
"function",
"notImplemented",
"(",
"$",
"msg",
"=",
"''",
",",
"$",
"errorCode",
"=",
"null",
",",
"$",
"headers",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"getErrorResponse",
"(",
"$",
"msg",
",",
"$",
"errorCode",
",",
"self"... | Returns 501 Not Implemented HTTP Response
@param string $msg
@param int $errorCode
@param array $headers
@return json | [
"Returns",
"501",
"Not",
"Implemented",
"HTTP",
"Response"
] | fb3493118bb9c6ce01567230c09e8402ac148d0e | https://github.com/nicklaw5/larapi/blob/fb3493118bb9c6ce01567230c09e8402ac148d0e/src/Larapi.php#L214-L217 |
18,641 | nicklaw5/larapi | src/Larapi.php | Larapi.notAvailable | public function notAvailable($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_SERVICE_UNAVAILABLE, $headers);
} | php | public function notAvailable($msg = '', $errorCode = null, $headers = [])
{
return $this->getErrorResponse($msg, $errorCode, self::HTTP_SERVICE_UNAVAILABLE, $headers);
} | [
"public",
"function",
"notAvailable",
"(",
"$",
"msg",
"=",
"''",
",",
"$",
"errorCode",
"=",
"null",
",",
"$",
"headers",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"getErrorResponse",
"(",
"$",
"msg",
",",
"$",
"errorCode",
",",
"self",
... | Returns 503 Not Available HTTP Response
@param string $msg
@param int $errorCode
@param array $headers
@return json | [
"Returns",
"503",
"Not",
"Available",
"HTTP",
"Response"
] | fb3493118bb9c6ce01567230c09e8402ac148d0e | https://github.com/nicklaw5/larapi/blob/fb3493118bb9c6ce01567230c09e8402ac148d0e/src/Larapi.php#L227-L230 |
18,642 | fyuze/framework | src/Fyuze/Kernel/Services/Debug.php | Debug.bootstrap | public function bootstrap()
{
$this->registry->make('toolbar')
->addCollector(new Response($this->registry->make('response')), true);
} | php | public function bootstrap()
{
$this->registry->make('toolbar')
->addCollector(new Response($this->registry->make('response')), true);
} | [
"public",
"function",
"bootstrap",
"(",
")",
"{",
"$",
"this",
"->",
"registry",
"->",
"make",
"(",
"'toolbar'",
")",
"->",
"addCollector",
"(",
"new",
"Response",
"(",
"$",
"this",
"->",
"registry",
"->",
"make",
"(",
"'response'",
")",
")",
",",
"tru... | Once the has started | [
"Once",
"the",
"has",
"started"
] | 89b3984f7225e24bfcdafb090ee197275b3222c9 | https://github.com/fyuze/framework/blob/89b3984f7225e24bfcdafb090ee197275b3222c9/src/Fyuze/Kernel/Services/Debug.php#L16-L20 |
18,643 | titon/db | src/Titon/Db/Repository.php | Repository.addBehavior | public function addBehavior(Behavior $behavior) {
$behavior->setRepository($this);
$this->_behaviors[$behavior->getAlias()] = $behavior;
$this->attachObject($behavior->getAlias(), $behavior);
if ($behavior instanceof Listener) {
$this->on('db', $behavior);
}
... | php | public function addBehavior(Behavior $behavior) {
$behavior->setRepository($this);
$this->_behaviors[$behavior->getAlias()] = $behavior;
$this->attachObject($behavior->getAlias(), $behavior);
if ($behavior instanceof Listener) {
$this->on('db', $behavior);
}
... | [
"public",
"function",
"addBehavior",
"(",
"Behavior",
"$",
"behavior",
")",
"{",
"$",
"behavior",
"->",
"setRepository",
"(",
"$",
"this",
")",
";",
"$",
"this",
"->",
"_behaviors",
"[",
"$",
"behavior",
"->",
"getAlias",
"(",
")",
"]",
"=",
"$",
"beha... | Add a behavior.
@param \Titon\Db\Behavior $behavior
@return $this | [
"Add",
"a",
"behavior",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L142-L154 |
18,644 | titon/db | src/Titon/Db/Repository.php | Repository.aggregate | public function aggregate(Query $query, $function, $field) {
$query->fields(
Query::func(strtoupper($function), [$field => Func::FIELD])->asAlias('aggregate')
);
$results = $this->getDriver()
->setContext('read')
->executeQuery($query)
->find();
... | php | public function aggregate(Query $query, $function, $field) {
$query->fields(
Query::func(strtoupper($function), [$field => Func::FIELD])->asAlias('aggregate')
);
$results = $this->getDriver()
->setContext('read')
->executeQuery($query)
->find();
... | [
"public",
"function",
"aggregate",
"(",
"Query",
"$",
"query",
",",
"$",
"function",
",",
"$",
"field",
")",
"{",
"$",
"query",
"->",
"fields",
"(",
"Query",
"::",
"func",
"(",
"strtoupper",
"(",
"$",
"function",
")",
",",
"[",
"$",
"field",
"=>",
... | Perform an aggregation on the database and return the calculated value.
The currently supported aggregates are `avg`, `count`, `min`, `max`, and `sum`.
@param \Titon\Db\Query $query
@param string $function
@param string $field
@return int | [
"Perform",
"an",
"aggregation",
"on",
"the",
"database",
"and",
"return",
"the",
"calculated",
"value",
".",
"The",
"currently",
"supported",
"aggregates",
"are",
"avg",
"count",
"min",
"max",
"and",
"sum",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L178-L193 |
18,645 | titon/db | src/Titon/Db/Repository.php | Repository.castResults | public function castResults(Event $event, array &$results, $finder) {
$columns = $this->getSchema()->getColumns();
$driver = $this->getDriver();
$entityClass = $this->getEntity();
foreach ($results as $i => $result) {
foreach ($result as $field => $value) {
i... | php | public function castResults(Event $event, array &$results, $finder) {
$columns = $this->getSchema()->getColumns();
$driver = $this->getDriver();
$entityClass = $this->getEntity();
foreach ($results as $i => $result) {
foreach ($result as $field => $value) {
i... | [
"public",
"function",
"castResults",
"(",
"Event",
"$",
"event",
",",
"array",
"&",
"$",
"results",
",",
"$",
"finder",
")",
"{",
"$",
"columns",
"=",
"$",
"this",
"->",
"getSchema",
"(",
")",
"->",
"getColumns",
"(",
")",
";",
"$",
"driver",
"=",
... | Type cast the results and wrap each result in an entity after a find operation.
@param \Titon\Event\Event $event
@param array $results
@param string $finder | [
"Type",
"cast",
"the",
"results",
"and",
"wrap",
"each",
"result",
"in",
"an",
"entity",
"after",
"a",
"find",
"operation",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L202-L222 |
18,646 | titon/db | src/Titon/Db/Repository.php | Repository.create | public function create($data, array $options = []) {
return $this->query(Query::INSERT)->save($data, $options);
} | php | public function create($data, array $options = []) {
return $this->query(Query::INSERT)->save($data, $options);
} | [
"public",
"function",
"create",
"(",
"$",
"data",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"query",
"(",
"Query",
"::",
"INSERT",
")",
"->",
"save",
"(",
"$",
"data",
",",
"$",
"options",
")",
";",
"}"
] | Insert data into the database as a new record.
If any related data exists, insert new records after joining them to the original record.
Validate schema data and related data structure before inserting.
@param array|\Titon\Type\Contract\Arrayable $data
@param array $options
@return int The record ID on success, 0 on f... | [
"Insert",
"data",
"into",
"the",
"database",
"as",
"a",
"new",
"record",
".",
"If",
"any",
"related",
"data",
"exists",
"insert",
"new",
"records",
"after",
"joining",
"them",
"to",
"the",
"original",
"record",
".",
"Validate",
"schema",
"data",
"and",
"re... | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L233-L235 |
18,647 | titon/db | src/Titon/Db/Repository.php | Repository.createMany | public function createMany(array $data, $allowPk = false, array $options = []) {
$pk = $this->getPrimaryKey();
$columns = $this->getSchema()->getColumns();
$records = [];
$defaults = [];
if ($columns) {
foreach ($columns as $key => $column) {
$default... | php | public function createMany(array $data, $allowPk = false, array $options = []) {
$pk = $this->getPrimaryKey();
$columns = $this->getSchema()->getColumns();
$records = [];
$defaults = [];
if ($columns) {
foreach ($columns as $key => $column) {
$default... | [
"public",
"function",
"createMany",
"(",
"array",
"$",
"data",
",",
"$",
"allowPk",
"=",
"false",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"pk",
"=",
"$",
"this",
"->",
"getPrimaryKey",
"(",
")",
";",
"$",
"columns",
"=",
"$",
... | Insert multiple records into the database using a single query.
Missing fields will be added with an empty value or the schema default value.
Does not support callbacks or transactions.
@uses Titon\Utility\Hash
@param array $data Multi-dimensional array of records
@param bool $allowPk If true will allow primary key f... | [
"Insert",
"multiple",
"records",
"into",
"the",
"database",
"using",
"a",
"single",
"query",
".",
"Missing",
"fields",
"will",
"be",
"added",
"with",
"an",
"empty",
"value",
"or",
"the",
"schema",
"default",
"value",
".",
"Does",
"not",
"support",
"callbacks... | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L249-L287 |
18,648 | titon/db | src/Titon/Db/Repository.php | Repository.createTable | public function createTable(array $options = [], array $attributes = []) {
$schema = $this->getSchema();
$schema->addOptions($options);
// Create the table
$status = (bool) $this->query(Query::CREATE_TABLE)
->attribute($attributes)
->schema($schema)
-... | php | public function createTable(array $options = [], array $attributes = []) {
$schema = $this->getSchema();
$schema->addOptions($options);
// Create the table
$status = (bool) $this->query(Query::CREATE_TABLE)
->attribute($attributes)
->schema($schema)
-... | [
"public",
"function",
"createTable",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
",",
"array",
"$",
"attributes",
"=",
"[",
"]",
")",
"{",
"$",
"schema",
"=",
"$",
"this",
"->",
"getSchema",
"(",
")",
";",
"$",
"schema",
"->",
"addOptions",
"(",
"... | Create a database table and indexes based off the tables schema.
The schema must be an array of column data.
@param array $options
@param array $attributes
@return bool | [
"Create",
"a",
"database",
"table",
"and",
"indexes",
"based",
"off",
"the",
"tables",
"schema",
".",
"The",
"schema",
"must",
"be",
"an",
"array",
"of",
"column",
"data",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L297-L317 |
18,649 | titon/db | src/Titon/Db/Repository.php | Repository.delete | public function delete($id, array $options = []) {
return $this->query(Query::DELETE)
->where($this->getPrimaryKey(), $id)
->save([], $options);
} | php | public function delete($id, array $options = []) {
return $this->query(Query::DELETE)
->where($this->getPrimaryKey(), $id)
->save([], $options);
} | [
"public",
"function",
"delete",
"(",
"$",
"id",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"query",
"(",
"Query",
"::",
"DELETE",
")",
"->",
"where",
"(",
"$",
"this",
"->",
"getPrimaryKey",
"(",
")",
",",
... | Delete a record by ID.
@param int|int[] $id
@param array $options
@return int The count of records deleted | [
"Delete",
"a",
"record",
"by",
"ID",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L353-L357 |
18,650 | titon/db | src/Titon/Db/Repository.php | Repository.deleteMany | public function deleteMany(Closure $conditions, array $options = []) {
$query = $this->query(Query::DELETE)->bindCallback($conditions);
// Validate that this won't delete all records
$where = $query->getWhere()->getParams();
if (empty($where)) {
throw new InvalidQueryExcept... | php | public function deleteMany(Closure $conditions, array $options = []) {
$query = $this->query(Query::DELETE)->bindCallback($conditions);
// Validate that this won't delete all records
$where = $query->getWhere()->getParams();
if (empty($where)) {
throw new InvalidQueryExcept... | [
"public",
"function",
"deleteMany",
"(",
"Closure",
"$",
"conditions",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"query",
"=",
"$",
"this",
"->",
"query",
"(",
"Query",
"::",
"DELETE",
")",
"->",
"bindCallback",
"(",
"$",
"conditions"... | Delete multiple records with conditions.
@param \Closure $conditions
@param array $options
@return int The count of records deleted
@throws \Titon\Db\Exception\InvalidQueryException | [
"Delete",
"multiple",
"records",
"with",
"conditions",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L367-L378 |
18,651 | titon/db | src/Titon/Db/Repository.php | Repository.exists | public function exists($id) {
return (bool) $this->select()->where($this->getPrimaryKey(), $id)->count();
} | php | public function exists($id) {
return (bool) $this->select()->where($this->getPrimaryKey(), $id)->count();
} | [
"public",
"function",
"exists",
"(",
"$",
"id",
")",
"{",
"return",
"(",
"bool",
")",
"$",
"this",
"->",
"select",
"(",
")",
"->",
"where",
"(",
"$",
"this",
"->",
"getPrimaryKey",
"(",
")",
",",
"$",
"id",
")",
"->",
"count",
"(",
")",
";",
"}... | Check if a record with an ID exists.
@param int $id
@return bool | [
"Check",
"if",
"a",
"record",
"with",
"an",
"ID",
"exists",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L395-L397 |
18,652 | titon/db | src/Titon/Db/Repository.php | Repository.filterData | public function filterData(Event $event, Query $query, $id, array &$data) {
if ($columns = $this->getSchema()->getColumns()) {
$data = array_intersect_key($data, $columns);
}
return true;
} | php | public function filterData(Event $event, Query $query, $id, array &$data) {
if ($columns = $this->getSchema()->getColumns()) {
$data = array_intersect_key($data, $columns);
}
return true;
} | [
"public",
"function",
"filterData",
"(",
"Event",
"$",
"event",
",",
"Query",
"$",
"query",
",",
"$",
"id",
",",
"array",
"&",
"$",
"data",
")",
"{",
"if",
"(",
"$",
"columns",
"=",
"$",
"this",
"->",
"getSchema",
"(",
")",
"->",
"getColumns",
"(",... | Filter out invalid columns before a save operation.
@param \Titon\Event\Event $event
@param \Titon\Db\Query $query
@param int|int[] $id
@param array $data
@return bool | [
"Filter",
"out",
"invalid",
"columns",
"before",
"a",
"save",
"operation",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L408-L414 |
18,653 | titon/db | src/Titon/Db/Repository.php | Repository.find | public function find(Query $query, $type, array $options = []) {
$options = $options + [
'before' => true,
'after' => true,
'collection' => $this->getConfig('collection')
];
$finder = $this->getFinder($type);
$state = null;
if ($options['befo... | php | public function find(Query $query, $type, array $options = []) {
$options = $options + [
'before' => true,
'after' => true,
'collection' => $this->getConfig('collection')
];
$finder = $this->getFinder($type);
$state = null;
if ($options['befo... | [
"public",
"function",
"find",
"(",
"Query",
"$",
"query",
",",
"$",
"type",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"=",
"$",
"options",
"+",
"[",
"'before'",
"=>",
"true",
",",
"'after'",
"=>",
"true",
",",
"'collect... | All-in-one method for fetching results from a query.
Depending on the type of finder, the returned results will differ.
Before a fetch is executed, a `preFind` event will be triggered.
If this event returns a falsey value, the find will exit and
return a `noResults` value based on the current finder.
If this event ret... | [
"All",
"-",
"in",
"-",
"one",
"method",
"for",
"fetching",
"results",
"from",
"a",
"query",
".",
"Depending",
"on",
"the",
"type",
"of",
"finder",
"the",
"returned",
"results",
"will",
"differ",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L447-L490 |
18,654 | titon/db | src/Titon/Db/Repository.php | Repository.findID | public function findID(Query $query) {
$pk = $this->getPrimaryKey();
// Gather ID from where clause
foreach ($query->getWhere()->getParams() as $param) {
if ($param instanceof Expr && $param->getField() === $pk && in_array($param->getOperator(), ['=', 'in'])) {
retur... | php | public function findID(Query $query) {
$pk = $this->getPrimaryKey();
// Gather ID from where clause
foreach ($query->getWhere()->getParams() as $param) {
if ($param instanceof Expr && $param->getField() === $pk && in_array($param->getOperator(), ['=', 'in'])) {
retur... | [
"public",
"function",
"findID",
"(",
"Query",
"$",
"query",
")",
"{",
"$",
"pk",
"=",
"$",
"this",
"->",
"getPrimaryKey",
"(",
")",
";",
"// Gather ID from where clause",
"foreach",
"(",
"$",
"query",
"->",
"getWhere",
"(",
")",
"->",
"getParams",
"(",
"... | Find the a primary key value within a query. Begin by looping through the where clause and match any value
that equates to the PK field. If none can be found, do a select query for a list of IDs.
@param \Titon\Db\Query $query
@return int|int[] | [
"Find",
"the",
"a",
"primary",
"key",
"value",
"within",
"a",
"query",
".",
"Begin",
"by",
"looping",
"through",
"the",
"where",
"clause",
"and",
"match",
"any",
"value",
"that",
"equates",
"to",
"the",
"PK",
"field",
".",
"If",
"none",
"can",
"be",
"f... | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L499-L524 |
18,655 | titon/db | src/Titon/Db/Repository.php | Repository.getBehavior | public function getBehavior($alias) {
if ($this->hasBehavior($alias)) {
return $this->_behaviors[$alias];
}
throw new MissingBehaviorException(sprintf('Behavior %s does not exist', $alias));
} | php | public function getBehavior($alias) {
if ($this->hasBehavior($alias)) {
return $this->_behaviors[$alias];
}
throw new MissingBehaviorException(sprintf('Behavior %s does not exist', $alias));
} | [
"public",
"function",
"getBehavior",
"(",
"$",
"alias",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"hasBehavior",
"(",
"$",
"alias",
")",
")",
"{",
"return",
"$",
"this",
"->",
"_behaviors",
"[",
"$",
"alias",
"]",
";",
"}",
"throw",
"new",
"MissingBeha... | Return a behavior by alias.
@param string $alias
@return \Titon\Db\Behavior
@throws \Titon\Db\Exception\MissingBehaviorException | [
"Return",
"a",
"behavior",
"by",
"alias",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L542-L548 |
18,656 | titon/db | src/Titon/Db/Repository.php | Repository.getDisplayField | public function getDisplayField() {
return $this->cache(__METHOD__, function() {
$fields = $this->getConfig('displayField');
$schema = $this->getSchema();
foreach ((array) $fields as $field) {
if ($schema->hasColumn($field)) {
return $fiel... | php | public function getDisplayField() {
return $this->cache(__METHOD__, function() {
$fields = $this->getConfig('displayField');
$schema = $this->getSchema();
foreach ((array) $fields as $field) {
if ($schema->hasColumn($field)) {
return $fiel... | [
"public",
"function",
"getDisplayField",
"(",
")",
"{",
"return",
"$",
"this",
"->",
"cache",
"(",
"__METHOD__",
",",
"function",
"(",
")",
"{",
"$",
"fields",
"=",
"$",
"this",
"->",
"getConfig",
"(",
"'displayField'",
")",
";",
"$",
"schema",
"=",
"$... | Return the field used as the display field.
@return string | [
"Return",
"the",
"field",
"used",
"as",
"the",
"display",
"field",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L587-L600 |
18,657 | titon/db | src/Titon/Db/Repository.php | Repository.getDriver | public function getDriver() {
if ($this->_driver) {
return $this->_driver;
}
return $this->_driver = $this->getDatabase()->getDriver($this->getConnectionKey());
} | php | public function getDriver() {
if ($this->_driver) {
return $this->_driver;
}
return $this->_driver = $this->getDatabase()->getDriver($this->getConnectionKey());
} | [
"public",
"function",
"getDriver",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_driver",
")",
"{",
"return",
"$",
"this",
"->",
"_driver",
";",
"}",
"return",
"$",
"this",
"->",
"_driver",
"=",
"$",
"this",
"->",
"getDatabase",
"(",
")",
"->",
"g... | Return the driver defined by key.
@uses Titon\Common\Registry
@return \Titon\Db\Driver | [
"Return",
"the",
"driver",
"defined",
"by",
"key",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L609-L615 |
18,658 | titon/db | src/Titon/Db/Repository.php | Repository.getFinder | public function getFinder($key) {
if (isset($this->_finders[$key])) {
return $this->_finders[$key];
}
throw new MissingFinderException(sprintf('Finder %s does not exist', $key));
} | php | public function getFinder($key) {
if (isset($this->_finders[$key])) {
return $this->_finders[$key];
}
throw new MissingFinderException(sprintf('Finder %s does not exist', $key));
} | [
"public",
"function",
"getFinder",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"_finders",
"[",
"$",
"key",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"_finders",
"[",
"$",
"key",
"]",
";",
"}",
"throw",
"new",
... | Return a finder by name.
@param string $key
@return \Titon\Db\Finder
@throws \Titon\Db\Exception\MissingFinderException | [
"Return",
"a",
"finder",
"by",
"name",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L633-L639 |
18,659 | titon/db | src/Titon/Db/Repository.php | Repository.getPrimaryKey | public function getPrimaryKey() {
return $this->cache(__METHOD__, function() {
$pk = $this->getConfig('primaryKey');
$schema = $this->getSchema();
if ($schema->hasColumn($pk)) {
return $pk;
}
if ($pk = $schema->getPrimaryKey()) {
... | php | public function getPrimaryKey() {
return $this->cache(__METHOD__, function() {
$pk = $this->getConfig('primaryKey');
$schema = $this->getSchema();
if ($schema->hasColumn($pk)) {
return $pk;
}
if ($pk = $schema->getPrimaryKey()) {
... | [
"public",
"function",
"getPrimaryKey",
"(",
")",
"{",
"return",
"$",
"this",
"->",
"cache",
"(",
"__METHOD__",
",",
"function",
"(",
")",
"{",
"$",
"pk",
"=",
"$",
"this",
"->",
"getConfig",
"(",
"'primaryKey'",
")",
";",
"$",
"schema",
"=",
"$",
"th... | Return the field used as the primary, usually the ID.
@return string | [
"Return",
"the",
"field",
"used",
"as",
"the",
"primary",
"usually",
"the",
"ID",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L655-L670 |
18,660 | titon/db | src/Titon/Db/Repository.php | Repository.getSchema | public function getSchema() {
if ($this->_schema instanceof Schema) {
return $this->_schema;
// Manually defined columns
// Allows for full schema and key/index support
} else if ($this->_schema && is_array($this->_schema)) {
$columns = $this->_schema;
/... | php | public function getSchema() {
if ($this->_schema instanceof Schema) {
return $this->_schema;
// Manually defined columns
// Allows for full schema and key/index support
} else if ($this->_schema && is_array($this->_schema)) {
$columns = $this->_schema;
/... | [
"public",
"function",
"getSchema",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_schema",
"instanceof",
"Schema",
")",
"{",
"return",
"$",
"this",
"->",
"_schema",
";",
"// Manually defined columns",
"// Allows for full schema and key/index support",
"}",
"else",
... | Return a schema object that represents the database table.
@return \Titon\Db\Driver\Schema | [
"Return",
"a",
"schema",
"object",
"that",
"represents",
"the",
"database",
"table",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L677-L695 |
18,661 | titon/db | src/Titon/Db/Repository.php | Repository.query | public function query($type) {
$query = $this->getDriver()->newQuery($type);
$query->setRepository($this);
$query->from($this->getTable(), $this->getAlias());
return $query;
} | php | public function query($type) {
$query = $this->getDriver()->newQuery($type);
$query->setRepository($this);
$query->from($this->getTable(), $this->getAlias());
return $query;
} | [
"public",
"function",
"query",
"(",
"$",
"type",
")",
"{",
"$",
"query",
"=",
"$",
"this",
"->",
"getDriver",
"(",
")",
"->",
"newQuery",
"(",
"$",
"type",
")",
";",
"$",
"query",
"->",
"setRepository",
"(",
"$",
"this",
")",
";",
"$",
"query",
"... | Instantiate a new query builder.
@param string $type
@return \Titon\Db\Query | [
"Instantiate",
"a",
"new",
"query",
"builder",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L786-L792 |
18,662 | titon/db | src/Titon/Db/Repository.php | Repository.read | public function read($id, array $options = [], Closure $callback = null) {
return $this->select()
->where($this->getPrimaryKey(), $id)
->bindCallback($callback)
->first($options);
} | php | public function read($id, array $options = [], Closure $callback = null) {
return $this->select()
->where($this->getPrimaryKey(), $id)
->bindCallback($callback)
->first($options);
} | [
"public",
"function",
"read",
"(",
"$",
"id",
",",
"array",
"$",
"options",
"=",
"[",
"]",
",",
"Closure",
"$",
"callback",
"=",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"select",
"(",
")",
"->",
"where",
"(",
"$",
"this",
"->",
"getPrimaryKe... | Fetch a single record by ID.
@param int $id
@param array $options
@param \Closure $callback
@return \Titon\Db\Entity|array | [
"Fetch",
"a",
"single",
"record",
"by",
"ID",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L802-L807 |
18,663 | titon/db | src/Titon/Db/Repository.php | Repository.save | public function save(Query $query, array $options = []) {
$type = $query->getType();
if ($type === Query::DELETE) {
return $this->_processDelete($query, $options);
} else if ($type === Query::INSERT) {
return $this->_processCreate($query, $options);
} else if (... | php | public function save(Query $query, array $options = []) {
$type = $query->getType();
if ($type === Query::DELETE) {
return $this->_processDelete($query, $options);
} else if ($type === Query::INSERT) {
return $this->_processCreate($query, $options);
} else if (... | [
"public",
"function",
"save",
"(",
"Query",
"$",
"query",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"type",
"=",
"$",
"query",
"->",
"getType",
"(",
")",
";",
"if",
"(",
"$",
"type",
"===",
"Query",
"::",
"DELETE",
")",
"{",
"... | Return a count of how many rows were affected by the query.
@param \Titon\Db\Query $query
@param array $options
@return int | [
"Return",
"a",
"count",
"of",
"how",
"many",
"rows",
"were",
"affected",
"by",
"the",
"query",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L826-L841 |
18,664 | titon/db | src/Titon/Db/Repository.php | Repository.update | public function update($id, $data, array $options = []) {
return $this->query(Query::UPDATE)
->where($this->getPrimaryKey(), $id)
->save($data, $options);
} | php | public function update($id, $data, array $options = []) {
return $this->query(Query::UPDATE)
->where($this->getPrimaryKey(), $id)
->save($data, $options);
} | [
"public",
"function",
"update",
"(",
"$",
"id",
",",
"$",
"data",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"query",
"(",
"Query",
"::",
"UPDATE",
")",
"->",
"where",
"(",
"$",
"this",
"->",
"getPrimaryKey"... | Update a database record based on ID.
@param int $id
@param array|\Titon\Type\Contract\Arrayable $data
@param array $options
@return int The count of records updated | [
"Update",
"a",
"database",
"record",
"based",
"on",
"ID",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L893-L897 |
18,665 | titon/db | src/Titon/Db/Repository.php | Repository.updateMany | public function updateMany($data, Closure $conditions, array $options = []) {
return $this->query(Query::UPDATE)
->bindCallback($conditions)
->save($data, $options);
} | php | public function updateMany($data, Closure $conditions, array $options = []) {
return $this->query(Query::UPDATE)
->bindCallback($conditions)
->save($data, $options);
} | [
"public",
"function",
"updateMany",
"(",
"$",
"data",
",",
"Closure",
"$",
"conditions",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"query",
"(",
"Query",
"::",
"UPDATE",
")",
"->",
"bindCallback",
"(",
"$",
"... | Update multiple records with conditions.
@param array|\Titon\Type\Contract\Arrayable $data
@param \Closure $conditions
@param array $options
@return int The count of records updated
@throws \Titon\Db\Exception\InvalidQueryException | [
"Update",
"multiple",
"records",
"with",
"conditions",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L908-L912 |
18,666 | titon/db | src/Titon/Db/Repository.php | Repository.upsert | public function upsert($data, $id = null, array $options = []) {
$pk = $this->getPrimaryKey();
$update = false;
// Check for an ID in the data
if (!$id && isset($data[$pk])) {
$id = $data[$pk];
}
unset($data[$pk]);
// Check for record existence
... | php | public function upsert($data, $id = null, array $options = []) {
$pk = $this->getPrimaryKey();
$update = false;
// Check for an ID in the data
if (!$id && isset($data[$pk])) {
$id = $data[$pk];
}
unset($data[$pk]);
// Check for record existence
... | [
"public",
"function",
"upsert",
"(",
"$",
"data",
",",
"$",
"id",
"=",
"null",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"pk",
"=",
"$",
"this",
"->",
"getPrimaryKey",
"(",
")",
";",
"$",
"update",
"=",
"false",
";",
"// Check f... | Either update or insert a record by checking for ID and record existence.
@param array|\Titon\Type\Contract\Arrayable $data
@param int $id
@param array $options
@return int The record ID on success, 0 on failure | [
"Either",
"update",
"or",
"insert",
"a",
"record",
"by",
"checking",
"for",
"ID",
"and",
"record",
"existence",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L922-L950 |
18,667 | titon/db | src/Titon/Db/Repository.php | Repository._processCreate | protected function _processCreate(Query $query, array $options = []) {
$data = $query->getData();
$options = $options + [
'before' => true,
'after' => true
];
if ($options['before']) {
foreach (['db.preSave', 'db.preCreate'] as $event) {
... | php | protected function _processCreate(Query $query, array $options = []) {
$data = $query->getData();
$options = $options + [
'before' => true,
'after' => true
];
if ($options['before']) {
foreach (['db.preSave', 'db.preCreate'] as $event) {
... | [
"protected",
"function",
"_processCreate",
"(",
"Query",
"$",
"query",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"data",
"=",
"$",
"query",
"->",
"getData",
"(",
")",
";",
"$",
"options",
"=",
"$",
"options",
"+",
"[",
"'before'",
... | Primary method that handles the processing of insert queries.
Before a save is executed, a `preSave` and `preCreate` event will be triggered.
This event allows data to be modified before saving via references.
If this event returns a falsey value, the save will exit early and
return a 0. This allows behaviors and even... | [
"Primary",
"method",
"that",
"handles",
"the",
"processing",
"of",
"insert",
"queries",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L974-L1013 |
18,668 | titon/db | src/Titon/Db/Repository.php | Repository._processDelete | protected function _processDelete(Query $query, array $options = []) {
$options = $options + [
'before' => true,
'after' => true
];
// Fetch ID
$this->id = $id = $this->findID($query);
if ($options['before']) {
$event = $this->emit('db.preDel... | php | protected function _processDelete(Query $query, array $options = []) {
$options = $options + [
'before' => true,
'after' => true
];
// Fetch ID
$this->id = $id = $this->findID($query);
if ($options['before']) {
$event = $this->emit('db.preDel... | [
"protected",
"function",
"_processDelete",
"(",
"Query",
"$",
"query",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"=",
"$",
"options",
"+",
"[",
"'before'",
"=>",
"true",
",",
"'after'",
"=>",
"true",
"]",
";",
"// Fetch ID"... | Primary method that handles the processing of delete queries.
Before a delete is executed, a `preDelete` event will be triggered.
If a falsey value is returned, exit early with a 0. If a numeric value
is returned, exit early and return the number, which acts as a virtual
affected row count (permitting behaviors to sho... | [
"Primary",
"method",
"that",
"handles",
"the",
"processing",
"of",
"delete",
"queries",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L1034-L1066 |
18,669 | titon/db | src/Titon/Db/Repository.php | Repository._processUpdate | protected function _processUpdate(Query $query, array $options = []) {
$data = $query->getData();
$options = $options + [
'before' => true,
'after' => true
];
// Fetch ID
$this->id = $id = $this->findID($query);
if ($options['before']) {
... | php | protected function _processUpdate(Query $query, array $options = []) {
$data = $query->getData();
$options = $options + [
'before' => true,
'after' => true
];
// Fetch ID
$this->id = $id = $this->findID($query);
if ($options['before']) {
... | [
"protected",
"function",
"_processUpdate",
"(",
"Query",
"$",
"query",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"data",
"=",
"$",
"query",
"->",
"getData",
"(",
")",
";",
"$",
"options",
"=",
"$",
"options",
"+",
"[",
"'before'",
... | Primary method that handles the processing of update queries.
Before a save is executed, a `preSave` and `preUpdate` event will be triggered.
This event allows data to be modified before saving via references.
If this event returns a falsey value, the save will exit early and
return a 0. This allows behaviors and even... | [
"Primary",
"method",
"that",
"handles",
"the",
"processing",
"of",
"update",
"queries",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Repository.php#L1090-L1129 |
18,670 | arsengoian/viper-framework | src/Viper/Daemon/DaemonHistorian.php | DaemonHistorian.clearLog | function clearLog() : void
{
@unlink($this -> errLogger -> getFile());
@unlink($this -> logger -> getFile());
@unlink($this -> errLogger -> getFile().'.shell');
@unlink($this -> logger -> getFile().'.shell');
} | php | function clearLog() : void
{
@unlink($this -> errLogger -> getFile());
@unlink($this -> logger -> getFile());
@unlink($this -> errLogger -> getFile().'.shell');
@unlink($this -> logger -> getFile().'.shell');
} | [
"function",
"clearLog",
"(",
")",
":",
"void",
"{",
"@",
"unlink",
"(",
"$",
"this",
"->",
"errLogger",
"->",
"getFile",
"(",
")",
")",
";",
"@",
"unlink",
"(",
"$",
"this",
"->",
"logger",
"->",
"getFile",
"(",
")",
")",
";",
"@",
"unlink",
"(",... | Cleans daemon log | [
"Cleans",
"daemon",
"log"
] | 22796c5cc219cae3ca0b4af370a347ba2acab0f2 | https://github.com/arsengoian/viper-framework/blob/22796c5cc219cae3ca0b4af370a347ba2acab0f2/src/Viper/Daemon/DaemonHistorian.php#L75-L81 |
18,671 | aedart/laravel-helpers | src/Traits/View/BladeTrait.php | BladeTrait.getDefaultBlade | public function getDefaultBlade(): ?BladeCompiler
{
// The blade compiler is usually only available, once
// Laravel's view service provider has been initialised.
// Thus, before just returning the Blade Facade's root
// instance, we must make sure that the view facade
// act... | php | public function getDefaultBlade(): ?BladeCompiler
{
// The blade compiler is usually only available, once
// Laravel's view service provider has been initialised.
// Thus, before just returning the Blade Facade's root
// instance, we must make sure that the view facade
// act... | [
"public",
"function",
"getDefaultBlade",
"(",
")",
":",
"?",
"BladeCompiler",
"{",
"// The blade compiler is usually only available, once",
"// Laravel's view service provider has been initialised.",
"// Thus, before just returning the Blade Facade's root",
"// instance, we must make sure th... | Get a default blade value, if any is available
@return BladeCompiler|null A default blade value or Null if no default value is available | [
"Get",
"a",
"default",
"blade",
"value",
"if",
"any",
"is",
"available"
] | 8b81a2d6658f3f8cb62b6be2c34773aaa2df219a | https://github.com/aedart/laravel-helpers/blob/8b81a2d6658f3f8cb62b6be2c34773aaa2df219a/src/Traits/View/BladeTrait.php#L77-L89 |
18,672 | ClanCats/Core | src/classes/CCStorage.php | CCStorage.add | public static function add( $key, $path, $url = null )
{
static::$paths[$key] = $path;
if ( !is_null( $url ) )
{
static::$urls[$key] = $url;
}
} | php | public static function add( $key, $path, $url = null )
{
static::$paths[$key] = $path;
if ( !is_null( $url ) )
{
static::$urls[$key] = $url;
}
} | [
"public",
"static",
"function",
"add",
"(",
"$",
"key",
",",
"$",
"path",
",",
"$",
"url",
"=",
"null",
")",
"{",
"static",
"::",
"$",
"paths",
"[",
"$",
"key",
"]",
"=",
"$",
"path",
";",
"if",
"(",
"!",
"is_null",
"(",
"$",
"url",
")",
")",... | Adds a new storage directory
@param string $key
@param string $path
@param string $url
@return void | [
"Adds",
"a",
"new",
"storage",
"directory"
] | 9f6ec72c1a439de4b253d0223f1029f7f85b6ef8 | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStorage.php#L75-L83 |
18,673 | ClanCats/Core | src/classes/CCStorage.php | CCStorage.file | public static function file( $file )
{
$params = array_merge( static::$params, array(
'time' => time(),
'fingerprint' => \CCSession::fingerprint(),
'random' => CCStr::random(),
));
foreach( $params as $param => $value )
{
$file = str_replace( ':'.$param, $value, $file );
}
return $file;
... | php | public static function file( $file )
{
$params = array_merge( static::$params, array(
'time' => time(),
'fingerprint' => \CCSession::fingerprint(),
'random' => CCStr::random(),
));
foreach( $params as $param => $value )
{
$file = str_replace( ':'.$param, $value, $file );
}
return $file;
... | [
"public",
"static",
"function",
"file",
"(",
"$",
"file",
")",
"{",
"$",
"params",
"=",
"array_merge",
"(",
"static",
"::",
"$",
"params",
",",
"array",
"(",
"'time'",
"=>",
"time",
"(",
")",
",",
"'fingerprint'",
"=>",
"\\",
"CCSession",
"::",
"finger... | Prepares a file with the parameters
@param string $file
@return $file | [
"Prepares",
"a",
"file",
"with",
"the",
"parameters"
] | 9f6ec72c1a439de4b253d0223f1029f7f85b6ef8 | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStorage.php#L91-L105 |
18,674 | ClanCats/Core | src/classes/CCStorage.php | CCStorage.url | public static function url( $file = null, $key = null )
{
// get the storage key
if ( is_null( $key ) )
{
$key = static::$default;
}
// check if path exists
if ( !isset( static::$urls[$key] ) )
{
throw new CCException( 'CCStorage - use of undefined public url '.$key.'.' );
}
return CCUrl::... | php | public static function url( $file = null, $key = null )
{
// get the storage key
if ( is_null( $key ) )
{
$key = static::$default;
}
// check if path exists
if ( !isset( static::$urls[$key] ) )
{
throw new CCException( 'CCStorage - use of undefined public url '.$key.'.' );
}
return CCUrl::... | [
"public",
"static",
"function",
"url",
"(",
"$",
"file",
"=",
"null",
",",
"$",
"key",
"=",
"null",
")",
"{",
"// get the storage key",
"if",
"(",
"is_null",
"(",
"$",
"key",
")",
")",
"{",
"$",
"key",
"=",
"static",
"::",
"$",
"default",
";",
"}",... | Get the public url to a file if available
@param string $file
@param string $key
@return string | [
"Get",
"the",
"public",
"url",
"to",
"a",
"file",
"if",
"available"
] | 9f6ec72c1a439de4b253d0223f1029f7f85b6ef8 | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStorage.php#L143-L158 |
18,675 | ClanCats/Core | src/classes/CCStorage.php | CCStorage.write | public static function write( $file, $content, $key = null )
{
return CCFile::write( static::path( $file, $key ), $content );
} | php | public static function write( $file, $content, $key = null )
{
return CCFile::write( static::path( $file, $key ), $content );
} | [
"public",
"static",
"function",
"write",
"(",
"$",
"file",
",",
"$",
"content",
",",
"$",
"key",
"=",
"null",
")",
"{",
"return",
"CCFile",
"::",
"write",
"(",
"static",
"::",
"path",
"(",
"$",
"file",
",",
"$",
"key",
")",
",",
"$",
"content",
"... | Write a file to the storage
@param string $file
@param string $key
@return string | [
"Write",
"a",
"file",
"to",
"the",
"storage"
] | 9f6ec72c1a439de4b253d0223f1029f7f85b6ef8 | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/classes/CCStorage.php#L167-L170 |
18,676 | slashworks/control-bundle | src/Slashworks/AppBundle/Resources/private/api/zip.lib.php | Zip.setComment | public function setComment($newComment = NULL) {
if ($this->isFinalized) {
return FALSE;
}
$this->zipComment = $newComment;
return TRUE;
} | php | public function setComment($newComment = NULL) {
if ($this->isFinalized) {
return FALSE;
}
$this->zipComment = $newComment;
return TRUE;
} | [
"public",
"function",
"setComment",
"(",
"$",
"newComment",
"=",
"NULL",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isFinalized",
")",
"{",
"return",
"FALSE",
";",
"}",
"$",
"this",
"->",
"zipComment",
"=",
"$",
"newComment",
";",
"return",
"TRUE",
";",
... | Set Zip archive comment.
@param string $newComment New comment. NULL to clear.
@return bool $success | [
"Set",
"Zip",
"archive",
"comment",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Resources/private/api/zip.lib.php#L139-L146 |
18,677 | slashworks/control-bundle | src/Slashworks/AppBundle/Resources/private/api/zip.lib.php | Zip.addDirectory | public function addDirectory($directoryPath, $timestamp = 0, $fileComment = NULL, $extFileAttr = self::EXT_FILE_ATTR_DIR) {
if ($this->isFinalized) {
return FALSE;
}
$directoryPath = str_replace("\\", "/", $directoryPath);
$directoryPath = rtrim($directoryPath, "/");
... | php | public function addDirectory($directoryPath, $timestamp = 0, $fileComment = NULL, $extFileAttr = self::EXT_FILE_ATTR_DIR) {
if ($this->isFinalized) {
return FALSE;
}
$directoryPath = str_replace("\\", "/", $directoryPath);
$directoryPath = rtrim($directoryPath, "/");
... | [
"public",
"function",
"addDirectory",
"(",
"$",
"directoryPath",
",",
"$",
"timestamp",
"=",
"0",
",",
"$",
"fileComment",
"=",
"NULL",
",",
"$",
"extFileAttr",
"=",
"self",
"::",
"EXT_FILE_ATTR_DIR",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isFinalized",
... | Add an empty directory entry to the zip archive.
Basically this is only used if an empty directory is added.
@param string $directoryPath Directory Path and name to be added to the archive.
@param int $timestamp (Optional) Timestamp for the added directory, if omitted or set to 0, the current time will be used.... | [
"Add",
"an",
"empty",
"directory",
"entry",
"to",
"the",
"zip",
"archive",
".",
"Basically",
"this",
"is",
"only",
"used",
"if",
"an",
"empty",
"directory",
"is",
"added",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Resources/private/api/zip.lib.php#L188-L200 |
18,678 | slashworks/control-bundle | src/Slashworks/AppBundle/Resources/private/api/zip.lib.php | Zip.addStreamData | public function addStreamData($data) {
if ($this->isFinalized || strlen($this->streamFilePath) == 0) {
return FALSE;
}
$length = fwrite($this->streamData, $data, strlen($data));
if ($length != strlen($data)) {
throw new Exception("File IO: Error writing; Length m... | php | public function addStreamData($data) {
if ($this->isFinalized || strlen($this->streamFilePath) == 0) {
return FALSE;
}
$length = fwrite($this->streamData, $data, strlen($data));
if ($length != strlen($data)) {
throw new Exception("File IO: Error writing; Length m... | [
"public",
"function",
"addStreamData",
"(",
"$",
"data",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isFinalized",
"||",
"strlen",
"(",
"$",
"this",
"->",
"streamFilePath",
")",
"==",
"0",
")",
"{",
"return",
"FALSE",
";",
"}",
"$",
"length",
"=",
"fwri... | Add data to the open stream.
@param string $data
@throws Exception Throws an exception in case of errors
@return mixed length in bytes added or FALSE if the archive is finalized or there are no open stream. | [
"Add",
"data",
"to",
"the",
"open",
"stream",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Resources/private/api/zip.lib.php#L389-L401 |
18,679 | slashworks/control-bundle | src/Slashworks/AppBundle/Resources/private/api/zip.lib.php | Zip.closeStream | public function closeStream() {
if ($this->isFinalized || strlen($this->streamFilePath) == 0) {
return FALSE;
}
fflush($this->streamData);
fclose($this->streamData);
$this->processFile($this->streamFile, $this->streamFilePath, $this->streamTimestamp, $this->streamFi... | php | public function closeStream() {
if ($this->isFinalized || strlen($this->streamFilePath) == 0) {
return FALSE;
}
fflush($this->streamData);
fclose($this->streamData);
$this->processFile($this->streamFile, $this->streamFilePath, $this->streamTimestamp, $this->streamFi... | [
"public",
"function",
"closeStream",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isFinalized",
"||",
"strlen",
"(",
"$",
"this",
"->",
"streamFilePath",
")",
"==",
"0",
")",
"{",
"return",
"FALSE",
";",
"}",
"fflush",
"(",
"$",
"this",
"->",
"strea... | Close the current stream.
@return bool $success | [
"Close",
"the",
"current",
"stream",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Resources/private/api/zip.lib.php#L408-L431 |
18,680 | slashworks/control-bundle | src/Slashworks/AppBundle/Resources/private/api/zip.lib.php | Zip.finalize | public function finalize() {
if (!$this->isFinalized) {
if (strlen($this->streamFilePath) > 0) {
$this->closeStream();
}
$cd = implode("", $this->cdRec);
$cdRecSize = pack("v", sizeof($this->cdRec));
$cdRec = $cd . self::ZIP_END_OF_CEN... | php | public function finalize() {
if (!$this->isFinalized) {
if (strlen($this->streamFilePath) > 0) {
$this->closeStream();
}
$cd = implode("", $this->cdRec);
$cdRecSize = pack("v", sizeof($this->cdRec));
$cdRec = $cd . self::ZIP_END_OF_CEN... | [
"public",
"function",
"finalize",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isFinalized",
")",
"{",
"if",
"(",
"strlen",
"(",
"$",
"this",
"->",
"streamFilePath",
")",
">",
"0",
")",
"{",
"$",
"this",
"->",
"closeStream",
"(",
")",
";",
... | Close the archive.
A closed archive can no longer have new files added to it.
@return bool $success | [
"Close",
"the",
"archive",
".",
"A",
"closed",
"archive",
"can",
"no",
"longer",
"have",
"new",
"files",
"added",
"to",
"it",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Resources/private/api/zip.lib.php#L488-L513 |
18,681 | slashworks/control-bundle | src/Slashworks/AppBundle/Resources/private/api/zip.lib.php | Zip.getZipFile | public function getZipFile() {
if (!$this->isFinalized) {
$this->finalize();
}
$this->zipflush();
rewind($this->zipFile);
return $this->zipFile;
} | php | public function getZipFile() {
if (!$this->isFinalized) {
$this->finalize();
}
$this->zipflush();
rewind($this->zipFile);
return $this->zipFile;
} | [
"public",
"function",
"getZipFile",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isFinalized",
")",
"{",
"$",
"this",
"->",
"finalize",
"(",
")",
";",
"}",
"$",
"this",
"->",
"zipflush",
"(",
")",
";",
"rewind",
"(",
"$",
"this",
"->",
"zip... | Get the handle ressource for the archive zip file.
If the zip haven't been finalized yet, this will cause it to become finalized
@return zip file handle | [
"Get",
"the",
"handle",
"ressource",
"for",
"the",
"archive",
"zip",
"file",
".",
"If",
"the",
"zip",
"haven",
"t",
"been",
"finalized",
"yet",
"this",
"will",
"cause",
"it",
"to",
"become",
"finalized"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Resources/private/api/zip.lib.php#L521-L531 |
18,682 | slashworks/control-bundle | src/Slashworks/AppBundle/Resources/private/api/zip.lib.php | Zip.getZipData | public function getZipData() {
if (!$this->isFinalized) {
$this->finalize();
}
if (!is_resource($this->zipFile)) {
return $this->zipData;
} else {
rewind($this->zipFile);
$filestat = fstat($this->zipFile);
return fread($this->zi... | php | public function getZipData() {
if (!$this->isFinalized) {
$this->finalize();
}
if (!is_resource($this->zipFile)) {
return $this->zipData;
} else {
rewind($this->zipFile);
$filestat = fstat($this->zipFile);
return fread($this->zi... | [
"public",
"function",
"getZipData",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isFinalized",
")",
"{",
"$",
"this",
"->",
"finalize",
"(",
")",
";",
"}",
"if",
"(",
"!",
"is_resource",
"(",
"$",
"this",
"->",
"zipFile",
")",
")",
"{",
"re... | Get the zip file contents
If the zip haven't been finalized yet, this will cause it to become finalized
@return zip data | [
"Get",
"the",
"zip",
"file",
"contents",
"If",
"the",
"zip",
"haven",
"t",
"been",
"finalized",
"yet",
"this",
"will",
"cause",
"it",
"to",
"become",
"finalized"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Resources/private/api/zip.lib.php#L539-L550 |
18,683 | slashworks/control-bundle | src/Slashworks/AppBundle/Resources/private/api/zip.lib.php | Zip.getArchiveSize | public function getArchiveSize() {
if (!is_resource($this->zipFile)) {
return strlen($this->zipData);
}
$filestat = fstat($this->zipFile);
return $filestat['size'];
} | php | public function getArchiveSize() {
if (!is_resource($this->zipFile)) {
return strlen($this->zipData);
}
$filestat = fstat($this->zipFile);
return $filestat['size'];
} | [
"public",
"function",
"getArchiveSize",
"(",
")",
"{",
"if",
"(",
"!",
"is_resource",
"(",
"$",
"this",
"->",
"zipFile",
")",
")",
"{",
"return",
"strlen",
"(",
"$",
"this",
"->",
"zipData",
")",
";",
"}",
"$",
"filestat",
"=",
"fstat",
"(",
"$",
"... | Return the current size of the archive
@return $size Size of the archive | [
"Return",
"the",
"current",
"size",
"of",
"the",
"archive"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Resources/private/api/zip.lib.php#L613-L620 |
18,684 | slashworks/control-bundle | src/Slashworks/AppBundle/Resources/private/api/zip.lib.php | Zip.getDosTime | private function getDosTime($timestamp = 0) {
$timestamp = (int)$timestamp;
$oldTZ = @date_default_timezone_get();
date_default_timezone_set('UTC');
$date = ($timestamp == 0 ? getdate() : getdate($timestamp));
date_default_timezone_set($oldTZ);
if ($date["year"] >= 1980) ... | php | private function getDosTime($timestamp = 0) {
$timestamp = (int)$timestamp;
$oldTZ = @date_default_timezone_get();
date_default_timezone_set('UTC');
$date = ($timestamp == 0 ? getdate() : getdate($timestamp));
date_default_timezone_set($oldTZ);
if ($date["year"] >= 1980) ... | [
"private",
"function",
"getDosTime",
"(",
"$",
"timestamp",
"=",
"0",
")",
"{",
"$",
"timestamp",
"=",
"(",
"int",
")",
"$",
"timestamp",
";",
"$",
"oldTZ",
"=",
"@",
"date_default_timezone_get",
"(",
")",
";",
"date_default_timezone_set",
"(",
"'UTC'",
")... | Calculate the 2 byte dostime used in the zip entries.
@param int $timestamp
@return 2-byte encoded DOS Date | [
"Calculate",
"the",
"2",
"byte",
"dostime",
"used",
"in",
"the",
"zip",
"entries",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Resources/private/api/zip.lib.php#L628-L639 |
18,685 | slashworks/control-bundle | src/Slashworks/AppBundle/Resources/private/api/zip.lib.php | Zip.generateExtAttr | public static function generateExtAttr($owner = 07, $group = 05, $other = 05, $isFile = true) {
$fp = $isFile ? self::S_IFREG : self::S_IFDIR;
$fp |= (($owner & 07) << 6) | (($group & 07) << 3) | ($other & 07);
return ($fp << 16) | ($isFile ? self::S_DOS_A : self::S_DOS_D);
} | php | public static function generateExtAttr($owner = 07, $group = 05, $other = 05, $isFile = true) {
$fp = $isFile ? self::S_IFREG : self::S_IFDIR;
$fp |= (($owner & 07) << 6) | (($group & 07) << 3) | ($other & 07);
return ($fp << 16) | ($isFile ? self::S_DOS_A : self::S_DOS_D);
} | [
"public",
"static",
"function",
"generateExtAttr",
"(",
"$",
"owner",
"=",
"07",
",",
"$",
"group",
"=",
"05",
",",
"$",
"other",
"=",
"05",
",",
"$",
"isFile",
"=",
"true",
")",
"{",
"$",
"fp",
"=",
"$",
"isFile",
"?",
"self",
"::",
"S_IFREG",
"... | Create the file permissions for a file or directory, for use in the extFileAttr parameters.
@param int $owner Unix permisions for owner (octal from 00 to 07)
@param int $group Unix permisions for group (octal from 00 to 07)
@param int $other Unix permisions for others (octal from 00 to 07)
@param bool $isFile
@... | [
"Create",
"the",
"file",
"permissions",
"for",
"a",
"file",
"or",
"directory",
"for",
"use",
"in",
"the",
"extFileAttr",
"parameters",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Resources/private/api/zip.lib.php#L828-L833 |
18,686 | slashworks/control-bundle | src/Slashworks/AppBundle/Resources/private/api/zip.lib.php | Zip.getFileExtAttr | public static function getFileExtAttr($filename) {
if (file_exists($filename)) {
$fp = fileperms($filename) << 16;
return $fp | (is_dir($filename) ? self::S_DOS_D : self::S_DOS_A);
}
return FALSE;
} | php | public static function getFileExtAttr($filename) {
if (file_exists($filename)) {
$fp = fileperms($filename) << 16;
return $fp | (is_dir($filename) ? self::S_DOS_D : self::S_DOS_A);
}
return FALSE;
} | [
"public",
"static",
"function",
"getFileExtAttr",
"(",
"$",
"filename",
")",
"{",
"if",
"(",
"file_exists",
"(",
"$",
"filename",
")",
")",
"{",
"$",
"fp",
"=",
"fileperms",
"(",
"$",
"filename",
")",
"<<",
"16",
";",
"return",
"$",
"fp",
"|",
"(",
... | Get the file permissions for a file or directory, for use in the extFileAttr parameters.
@param string $filename
@return external ref field, or FALSE if the file is not found. | [
"Get",
"the",
"file",
"permissions",
"for",
"a",
"file",
"or",
"directory",
"for",
"use",
"in",
"the",
"extFileAttr",
"parameters",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Resources/private/api/zip.lib.php#L841-L847 |
18,687 | slashworks/control-bundle | src/Slashworks/AppBundle/Resources/private/api/zip.lib.php | Zip.getTemporaryFile | private static function getTemporaryFile() {
if(is_callable(self::$temp)) {
$temporaryFile = @call_user_func(self::$temp);
if(is_string($temporaryFile) && strlen($temporaryFile) && is_writable($temporaryFile)) {
return $temporaryFile;
}
}
$temp... | php | private static function getTemporaryFile() {
if(is_callable(self::$temp)) {
$temporaryFile = @call_user_func(self::$temp);
if(is_string($temporaryFile) && strlen($temporaryFile) && is_writable($temporaryFile)) {
return $temporaryFile;
}
}
$temp... | [
"private",
"static",
"function",
"getTemporaryFile",
"(",
")",
"{",
"if",
"(",
"is_callable",
"(",
"self",
"::",
"$",
"temp",
")",
")",
"{",
"$",
"temporaryFile",
"=",
"@",
"call_user_func",
"(",
"self",
"::",
"$",
"temp",
")",
";",
"if",
"(",
"is_stri... | Returns the path to a temporary file.
@return string | [
"Returns",
"the",
"path",
"to",
"a",
"temporary",
"file",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Resources/private/api/zip.lib.php#L852-L861 |
18,688 | webforge-labs/psc-cms | lib/Psc/Form/Validator.php | Validator.validate | public function validate($field, $data = NULL, $flags = 0x000000) {
$key = $this->getKey($field);
if (isset($this->dataProvider)) {
$data = $this->dataProvider->getValidatorData($field);
}
if ($this->hasField($field)) {
try {
foreach ($this->rules[$key] as... | php | public function validate($field, $data = NULL, $flags = 0x000000) {
$key = $this->getKey($field);
if (isset($this->dataProvider)) {
$data = $this->dataProvider->getValidatorData($field);
}
if ($this->hasField($field)) {
try {
foreach ($this->rules[$key] as... | [
"public",
"function",
"validate",
"(",
"$",
"field",
",",
"$",
"data",
"=",
"NULL",
",",
"$",
"flags",
"=",
"0x000000",
")",
"{",
"$",
"key",
"=",
"$",
"this",
"->",
"getKey",
"(",
"$",
"field",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"... | Validiert die Daten zu einem Feld
gibt die Daten zurück!
Wenn das Feld nicht validiert werden, wird eine Exception geworfen!
@throws ValidatorException wenn die Daten nicht zum Feld passen
ist $flags OPTIONAL gesetzt und wird die Rule eine EmptyDataException werfen, wird der DefaultWert (normal: NULL) der Exception z... | [
"Validiert",
"die",
"Daten",
"zu",
"einem",
"Feld"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Form/Validator.php#L53-L89 |
18,689 | steeffeen/FancyManiaLinks | FML/Stylesheet/Mood.php | Mood.setLightAmbientColor | public function setLightAmbientColor($red, $green, $blue)
{
$this->lightAmbientColor = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
return $this;
} | php | public function setLightAmbientColor($red, $green, $blue)
{
$this->lightAmbientColor = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
return $this;
} | [
"public",
"function",
"setLightAmbientColor",
"(",
"$",
"red",
",",
"$",
"green",
",",
"$",
"blue",
")",
"{",
"$",
"this",
"->",
"lightAmbientColor",
"=",
"floatval",
"(",
"$",
"red",
")",
".",
"' '",
".",
"floatval",
"(",
"$",
"green",
")",
".",
"' ... | Set the ambient color in which elements reflect the light
@api
@param float $red Red color value
@param float $green Green color value
@param float $blue Blue color value
@return static | [
"Set",
"the",
"ambient",
"color",
"in",
"which",
"elements",
"reflect",
"the",
"light"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Stylesheet/Mood.php#L117-L121 |
18,690 | steeffeen/FancyManiaLinks | FML/Stylesheet/Mood.php | Mood.setCloudsMinimumColor | public function setCloudsMinimumColor($red, $green, $blue)
{
$this->cloudsMinimumColor = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
return $this;
} | php | public function setCloudsMinimumColor($red, $green, $blue)
{
$this->cloudsMinimumColor = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
return $this;
} | [
"public",
"function",
"setCloudsMinimumColor",
"(",
"$",
"red",
",",
"$",
"green",
",",
"$",
"blue",
")",
"{",
"$",
"this",
"->",
"cloudsMinimumColor",
"=",
"floatval",
"(",
"$",
"red",
")",
".",
"' '",
".",
"floatval",
"(",
"$",
"green",
")",
".",
"... | Set the minimum value for the background color range
@api
@param float $red Red color value
@param float $green Green color value
@param float $blue Blue color value
@return static | [
"Set",
"the",
"minimum",
"value",
"for",
"the",
"background",
"color",
"range"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Stylesheet/Mood.php#L143-L147 |
18,691 | steeffeen/FancyManiaLinks | FML/Stylesheet/Mood.php | Mood.setCloudsMaximumColor | public function setCloudsMaximumColor($red, $green, $blue)
{
$this->cloudsMaximumColor = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
return $this;
} | php | public function setCloudsMaximumColor($red, $green, $blue)
{
$this->cloudsMaximumColor = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
return $this;
} | [
"public",
"function",
"setCloudsMaximumColor",
"(",
"$",
"red",
",",
"$",
"green",
",",
"$",
"blue",
")",
"{",
"$",
"this",
"->",
"cloudsMaximumColor",
"=",
"floatval",
"(",
"$",
"red",
")",
".",
"' '",
".",
"floatval",
"(",
"$",
"green",
")",
".",
"... | Set the maximum value for the background color range
@api
@param float $red Red color value
@param float $green Green color value
@param float $blue Blue color value
@return static | [
"Set",
"the",
"maximum",
"value",
"for",
"the",
"background",
"color",
"range"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Stylesheet/Mood.php#L169-L173 |
18,692 | steeffeen/FancyManiaLinks | FML/Stylesheet/Mood.php | Mood.setLight0Color | public function setLight0Color($red, $green, $blue)
{
$this->light0Color = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
return $this;
} | php | public function setLight0Color($red, $green, $blue)
{
$this->light0Color = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
return $this;
} | [
"public",
"function",
"setLight0Color",
"(",
"$",
"red",
",",
"$",
"green",
",",
"$",
"blue",
")",
"{",
"$",
"this",
"->",
"light0Color",
"=",
"floatval",
"(",
"$",
"red",
")",
".",
"' '",
".",
"floatval",
"(",
"$",
"green",
")",
".",
"' '",
".",
... | Set the RGB color of light source 0
@api
@param float $red Red color value
@param float $green Green color value
@param float $blue Blue color value
@return static | [
"Set",
"the",
"RGB",
"color",
"of",
"light",
"source",
"0"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Stylesheet/Mood.php#L195-L199 |
18,693 | steeffeen/FancyManiaLinks | FML/Stylesheet/Mood.php | Mood.setLightBallColor | public function setLightBallColor($red, $green, $blue)
{
$this->lightBallColor = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
return $this;
} | php | public function setLightBallColor($red, $green, $blue)
{
$this->lightBallColor = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
return $this;
} | [
"public",
"function",
"setLightBallColor",
"(",
"$",
"red",
",",
"$",
"green",
",",
"$",
"blue",
")",
"{",
"$",
"this",
"->",
"lightBallColor",
"=",
"floatval",
"(",
"$",
"red",
")",
".",
"' '",
".",
"floatval",
"(",
"$",
"green",
")",
".",
"' '",
... | Set the light ball color
@api
@param float $red Red color value
@param float $green Green color value
@param float $blue Blue color value
@return static | [
"Set",
"the",
"light",
"ball",
"color"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Stylesheet/Mood.php#L293-L297 |
18,694 | steeffeen/FancyManiaLinks | FML/Stylesheet/Mood.php | Mood.setFogColor | public function setFogColor($red, $green, $blue)
{
$this->fogColor = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
return $this;
} | php | public function setFogColor($red, $green, $blue)
{
$this->fogColor = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
return $this;
} | [
"public",
"function",
"setFogColor",
"(",
"$",
"red",
",",
"$",
"green",
",",
"$",
"blue",
")",
"{",
"$",
"this",
"->",
"fogColor",
"=",
"floatval",
"(",
"$",
"red",
")",
".",
"' '",
".",
"floatval",
"(",
"$",
"green",
")",
".",
"' '",
".",
"floa... | Set the fog color
@api
@param float $red Red color value
@param float $green Green color value
@param float $blue Blue color value
@return static | [
"Set",
"the",
"fog",
"color"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Stylesheet/Mood.php#L367-L371 |
18,695 | steeffeen/FancyManiaLinks | FML/Stylesheet/Mood.php | Mood.setSelfIlluminationColor | public function setSelfIlluminationColor($red, $green, $blue)
{
$this->selfIlluminationColor = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
return $this;
} | php | public function setSelfIlluminationColor($red, $green, $blue)
{
$this->selfIlluminationColor = floatval($red) . ' ' . floatval($green) . ' ' . floatval($blue);
return $this;
} | [
"public",
"function",
"setSelfIlluminationColor",
"(",
"$",
"red",
",",
"$",
"green",
",",
"$",
"blue",
")",
"{",
"$",
"this",
"->",
"selfIlluminationColor",
"=",
"floatval",
"(",
"$",
"red",
")",
".",
"' '",
".",
"floatval",
"(",
"$",
"green",
")",
".... | Set the self illumination color
@api
@param float $red Red color value
@param float $green Green color value
@param float $blue Blue color value
@return static | [
"Set",
"the",
"self",
"illumination",
"color"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Stylesheet/Mood.php#L393-L397 |
18,696 | steeffeen/FancyManiaLinks | FML/Stylesheet/Mood.php | Mood.addSkyGradient | public function addSkyGradient($x, $color)
{
$skyGradientKey = new SkyGradientKey($x, $color);
return $this->addSkyGradientKey($skyGradientKey);
} | php | public function addSkyGradient($x, $color)
{
$skyGradientKey = new SkyGradientKey($x, $color);
return $this->addSkyGradientKey($skyGradientKey);
} | [
"public",
"function",
"addSkyGradient",
"(",
"$",
"x",
",",
"$",
"color",
")",
"{",
"$",
"skyGradientKey",
"=",
"new",
"SkyGradientKey",
"(",
"$",
"x",
",",
"$",
"color",
")",
";",
"return",
"$",
"this",
"->",
"addSkyGradientKey",
"(",
"$",
"skyGradientK... | Add a sky gradient
@api
@param float $x X value
@param string $color Color value
@return static | [
"Add",
"a",
"sky",
"gradient"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Stylesheet/Mood.php#L455-L459 |
18,697 | steeffeen/FancyManiaLinks | FML/Stylesheet/Mood.php | Mood.render | public function render(\DOMDocument $domDocument)
{
$domElement = $domDocument->createElement("mood");
if ($this->lightAmbientColor) {
$domElement->setAttribute("LAmbient_LinearRgb", $this->lightAmbientColor);
}
if ($this->cloudsMinimumColor) {
$domElement->se... | php | public function render(\DOMDocument $domDocument)
{
$domElement = $domDocument->createElement("mood");
if ($this->lightAmbientColor) {
$domElement->setAttribute("LAmbient_LinearRgb", $this->lightAmbientColor);
}
if ($this->cloudsMinimumColor) {
$domElement->se... | [
"public",
"function",
"render",
"(",
"\\",
"DOMDocument",
"$",
"domDocument",
")",
"{",
"$",
"domElement",
"=",
"$",
"domDocument",
"->",
"createElement",
"(",
"\"mood\"",
")",
";",
"if",
"(",
"$",
"this",
"->",
"lightAmbientColor",
")",
"{",
"$",
"domElem... | Render the Mood
@param \DOMDocument $domDocument DOMDocument for which the Mood should be rendered
@return \DOMElement | [
"Render",
"the",
"Mood"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Stylesheet/Mood.php#L479-L530 |
18,698 | left-right/center | src/controllers/RowController.php | RowController.store | public function store($table) {
$table = config('center.tables.' . $table);
# Security
if (!isset($table->name)) {
return redirect()->action('\LeftRight\Center\Controllers\TableController@index')->with('error', trans('center::site.table_does_not_exist'));
}
$inserts = self::processColumnsInput($table);
... | php | public function store($table) {
$table = config('center.tables.' . $table);
# Security
if (!isset($table->name)) {
return redirect()->action('\LeftRight\Center\Controllers\TableController@index')->with('error', trans('center::site.table_does_not_exist'));
}
$inserts = self::processColumnsInput($table);
... | [
"public",
"function",
"store",
"(",
"$",
"table",
")",
"{",
"$",
"table",
"=",
"config",
"(",
"'center.tables.'",
".",
"$",
"table",
")",
";",
"# Security",
"if",
"(",
"!",
"isset",
"(",
"$",
"table",
"->",
"name",
")",
")",
"{",
"return",
"redirect"... | save a new object instance to the database | [
"save",
"a",
"new",
"object",
"instance",
"to",
"the",
"database"
] | 47c225538475ca3e87fa49f31a323b6e6bd4eff2 | https://github.com/left-right/center/blob/47c225538475ca3e87fa49f31a323b6e6bd4eff2/src/controllers/RowController.php#L268-L313 |
18,699 | left-right/center | src/controllers/RowController.php | RowController.listColumn | public static function listColumn($table) {
if (is_string($table)) $table = config('center.tables.' . $table);
$fields = !empty($table->list) ? $table->list : array_keys((array) $table->fields);
foreach ($fields as $field) {
if ($table->fields->{$field}->type == 'string') return $field;
}
} | php | public static function listColumn($table) {
if (is_string($table)) $table = config('center.tables.' . $table);
$fields = !empty($table->list) ? $table->list : array_keys((array) $table->fields);
foreach ($fields as $field) {
if ($table->fields->{$field}->type == 'string') return $field;
}
} | [
"public",
"static",
"function",
"listColumn",
"(",
"$",
"table",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"table",
")",
")",
"$",
"table",
"=",
"config",
"(",
"'center.tables.'",
".",
"$",
"table",
")",
";",
"$",
"fields",
"=",
"!",
"empty",
"(",
... | get the first text field column name | [
"get",
"the",
"first",
"text",
"field",
"column",
"name"
] | 47c225538475ca3e87fa49f31a323b6e6bd4eff2 | https://github.com/left-right/center/blob/47c225538475ca3e87fa49f31a323b6e6bd4eff2/src/controllers/RowController.php#L705-L711 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.