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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
226,300 | phergie/phergie-irc-client-react | src/Client.php | Client.getErrorCallback | protected function getErrorCallback(ConnectionInterface $connection)
{
$logger = $this->getLogger();
return function($exception) use ($connection, $logger) {
$this->emit('connect.error', array($exception, $connection, $logger));
};
} | php | protected function getErrorCallback(ConnectionInterface $connection)
{
$logger = $this->getLogger();
return function($exception) use ($connection, $logger) {
$this->emit('connect.error', array($exception, $connection, $logger));
};
} | [
"protected",
"function",
"getErrorCallback",
"(",
"ConnectionInterface",
"$",
"connection",
")",
"{",
"$",
"logger",
"=",
"$",
"this",
"->",
"getLogger",
"(",
")",
";",
"return",
"function",
"(",
"$",
"exception",
")",
"use",
"(",
"$",
"connection",
",",
"... | Returns a callback for proxying connection error events to listeners of
the client.
@param \Phergie\Irc\ConnectionInterface $connection Connection on which
the error occurred
@return callable | [
"Returns",
"a",
"callback",
"for",
"proxying",
"connection",
"error",
"events",
"to",
"listeners",
"of",
"the",
"client",
"."
] | b0d03f1e1ff34a2868f1f7d677786fdd1786b320 | https://github.com/phergie/phergie-irc-client-react/blob/b0d03f1e1ff34a2868f1f7d677786fdd1786b320/src/Client.php#L505-L511 |
226,301 | phergie/phergie-irc-client-react | src/Client.php | Client.getEndCallback | protected function getEndCallback(ReadStream $read, WriteStream $write, ConnectionInterface $connection, TimerInterface $timer)
{
$logger = $this->getLogger();
return function() use ($read, $write, $connection, $timer, $logger) {
$this->removeActiveConnection($connection);
$t... | php | protected function getEndCallback(ReadStream $read, WriteStream $write, ConnectionInterface $connection, TimerInterface $timer)
{
$logger = $this->getLogger();
return function() use ($read, $write, $connection, $timer, $logger) {
$this->removeActiveConnection($connection);
$t... | [
"protected",
"function",
"getEndCallback",
"(",
"ReadStream",
"$",
"read",
",",
"WriteStream",
"$",
"write",
",",
"ConnectionInterface",
"$",
"connection",
",",
"TimerInterface",
"$",
"timer",
")",
"{",
"$",
"logger",
"=",
"$",
"this",
"->",
"getLogger",
"(",
... | Returns a callback for when a connection is terminated, whether
explicitly by the bot or server or as a result of loss of connectivity.
@param \Phergie\Irc\Client\React\ReadStream $read Read stream for this
connection
@param \Phergie\Irc\Client\React\WriteStream $write Write stream for this
connection
@param \Phergie\... | [
"Returns",
"a",
"callback",
"for",
"when",
"a",
"connection",
"is",
"terminated",
"whether",
"explicitly",
"by",
"the",
"bot",
"or",
"server",
"or",
"as",
"a",
"result",
"of",
"loss",
"of",
"connectivity",
"."
] | b0d03f1e1ff34a2868f1f7d677786fdd1786b320 | https://github.com/phergie/phergie-irc-client-react/blob/b0d03f1e1ff34a2868f1f7d677786fdd1786b320/src/Client.php#L527-L538 |
226,302 | phergie/phergie-irc-client-react | src/Client.php | Client.getTickCallback | protected function getTickCallback(WriteStream $write, ConnectionInterface $connection)
{
$logger = $this->getLogger();
return function() use ($write, $connection, $logger) {
$this->emit('irc.tick', array($write, $connection, $logger));
};
} | php | protected function getTickCallback(WriteStream $write, ConnectionInterface $connection)
{
$logger = $this->getLogger();
return function() use ($write, $connection, $logger) {
$this->emit('irc.tick', array($write, $connection, $logger));
};
} | [
"protected",
"function",
"getTickCallback",
"(",
"WriteStream",
"$",
"write",
",",
"ConnectionInterface",
"$",
"connection",
")",
"{",
"$",
"logger",
"=",
"$",
"this",
"->",
"getLogger",
"(",
")",
";",
"return",
"function",
"(",
")",
"use",
"(",
"$",
"writ... | Returns a callback executed periodically to allow events to be sent
asynchronously versus in response to received or sent events.
@param \Phergie\Irc\Client\React\WriteStream $write Stream used to
send events to the server
@param \Phergie\Irc\ConnectionInterface $connection Connection to
receive the event | [
"Returns",
"a",
"callback",
"executed",
"periodically",
"to",
"allow",
"events",
"to",
"be",
"sent",
"asynchronously",
"versus",
"in",
"response",
"to",
"received",
"or",
"sent",
"events",
"."
] | b0d03f1e1ff34a2868f1f7d677786fdd1786b320 | https://github.com/phergie/phergie-irc-client-react/blob/b0d03f1e1ff34a2868f1f7d677786fdd1786b320/src/Client.php#L549-L555 |
226,303 | phergie/phergie-irc-client-react | src/Client.php | Client.configureStreams | protected function configureStreams(ConnectionInterface $connection, DuplexStreamInterface $stream, WriteStream $write)
{
$timer = $this->addPeriodicTimer($this->getTickInterval(), $this->getTickCallback($write, $connection));
$read = $this->getReadStream($connection);
$write->pipe($stream)-... | php | protected function configureStreams(ConnectionInterface $connection, DuplexStreamInterface $stream, WriteStream $write)
{
$timer = $this->addPeriodicTimer($this->getTickInterval(), $this->getTickCallback($write, $connection));
$read = $this->getReadStream($connection);
$write->pipe($stream)-... | [
"protected",
"function",
"configureStreams",
"(",
"ConnectionInterface",
"$",
"connection",
",",
"DuplexStreamInterface",
"$",
"stream",
",",
"WriteStream",
"$",
"write",
")",
"{",
"$",
"timer",
"=",
"$",
"this",
"->",
"addPeriodicTimer",
"(",
"$",
"this",
"->",... | Configure streams to handle messages received from and sent to the
server.
@param \Phergie\Irc\ConnectionInterface $connection Metadata for the
connection over which messages are being exchanged
@param \React\Stream\DuplexStreamInterface $stream Stream representing the
connection to the server
@param \Phergie\Irc\Clie... | [
"Configure",
"streams",
"to",
"handle",
"messages",
"received",
"from",
"and",
"sent",
"to",
"the",
"server",
"."
] | b0d03f1e1ff34a2868f1f7d677786fdd1786b320 | https://github.com/phergie/phergie-irc-client-react/blob/b0d03f1e1ff34a2868f1f7d677786fdd1786b320/src/Client.php#L568-L582 |
226,304 | phergie/phergie-irc-client-react | src/Client.php | Client.identifyUser | protected function identifyUser(ConnectionInterface $connection, WriteStream $writeStream)
{
$password = $connection->getPassword();
if ($password) {
$writeStream->ircPass($password);
}
$writeStream->ircUser(
$connection->getUsername(),
$connectio... | php | protected function identifyUser(ConnectionInterface $connection, WriteStream $writeStream)
{
$password = $connection->getPassword();
if ($password) {
$writeStream->ircPass($password);
}
$writeStream->ircUser(
$connection->getUsername(),
$connectio... | [
"protected",
"function",
"identifyUser",
"(",
"ConnectionInterface",
"$",
"connection",
",",
"WriteStream",
"$",
"writeStream",
")",
"{",
"$",
"password",
"=",
"$",
"connection",
"->",
"getPassword",
"(",
")",
";",
"if",
"(",
"$",
"password",
")",
"{",
"$",
... | Identifies the user to a server.
@param \Phergie\Irc\ConnectionInterface $connection Connection on which
to identify the user
@param \Phergie\Irc\Client\React\WriteStream $writeStream Stream to
receive commands identifying the user | [
"Identifies",
"the",
"user",
"to",
"a",
"server",
"."
] | b0d03f1e1ff34a2868f1f7d677786fdd1786b320 | https://github.com/phergie/phergie-irc-client-react/blob/b0d03f1e1ff34a2868f1f7d677786fdd1786b320/src/Client.php#L592-L607 |
226,305 | phergie/phergie-irc-client-react | src/Client.php | Client.emitConnectionError | protected function emitConnectionError(\Exception $exception, ConnectionInterface $connection)
{
$this->emit(
'connect.error',
array(
$exception->getMessage(),
$connection,
$this->getLogger()
)
);
} | php | protected function emitConnectionError(\Exception $exception, ConnectionInterface $connection)
{
$this->emit(
'connect.error',
array(
$exception->getMessage(),
$connection,
$this->getLogger()
)
);
} | [
"protected",
"function",
"emitConnectionError",
"(",
"\\",
"Exception",
"$",
"exception",
",",
"ConnectionInterface",
"$",
"connection",
")",
"{",
"$",
"this",
"->",
"emit",
"(",
"'connect.error'",
",",
"array",
"(",
"$",
"exception",
"->",
"getMessage",
"(",
... | Emits a connection error event.
@param \Exception $exception
@param \Phergie\Irc\ConnectionInterface $connection | [
"Emits",
"a",
"connection",
"error",
"event",
"."
] | b0d03f1e1ff34a2868f1f7d677786fdd1786b320 | https://github.com/phergie/phergie-irc-client-react/blob/b0d03f1e1ff34a2868f1f7d677786fdd1786b320/src/Client.php#L615-L625 |
226,306 | phergie/phergie-irc-client-react | src/Client.php | Client.addUnsecuredConnection | protected function addUnsecuredConnection(ConnectionInterface $connection)
{
$this->getRemote($connection)->then(
function($remote) use($connection) {
$this->initializeConnection($remote, $connection);
},
function($error) use($connection) {
... | php | protected function addUnsecuredConnection(ConnectionInterface $connection)
{
$this->getRemote($connection)->then(
function($remote) use($connection) {
$this->initializeConnection($remote, $connection);
},
function($error) use($connection) {
... | [
"protected",
"function",
"addUnsecuredConnection",
"(",
"ConnectionInterface",
"$",
"connection",
")",
"{",
"$",
"this",
"->",
"getRemote",
"(",
"$",
"connection",
")",
"->",
"then",
"(",
"function",
"(",
"$",
"remote",
")",
"use",
"(",
"$",
"connection",
")... | Initializes an unsecured connection.
@param \Phergie\Irc\ConnectionInterface $connection | [
"Initializes",
"an",
"unsecured",
"connection",
"."
] | b0d03f1e1ff34a2868f1f7d677786fdd1786b320 | https://github.com/phergie/phergie-irc-client-react/blob/b0d03f1e1ff34a2868f1f7d677786fdd1786b320/src/Client.php#L632-L642 |
226,307 | phergie/phergie-irc-client-react | src/Client.php | Client.getSecureConnector | protected function getSecureConnector($connection)
{
if (!$this->secureConnector) {
$loop = $this->getLoop();
$connector = new \React\Socket\Connector(
$loop,
[
'dns' => $this->getResolver(),
]
);
... | php | protected function getSecureConnector($connection)
{
if (!$this->secureConnector) {
$loop = $this->getLoop();
$connector = new \React\Socket\Connector(
$loop,
[
'dns' => $this->getResolver(),
]
);
... | [
"protected",
"function",
"getSecureConnector",
"(",
"$",
"connection",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"secureConnector",
")",
"{",
"$",
"loop",
"=",
"$",
"this",
"->",
"getLoop",
"(",
")",
";",
"$",
"connector",
"=",
"new",
"\\",
"React",... | Returns a connector for establishing SSL connections.
@return \React\Socket\SecureConnector | [
"Returns",
"a",
"connector",
"for",
"establishing",
"SSL",
"connections",
"."
] | b0d03f1e1ff34a2868f1f7d677786fdd1786b320 | https://github.com/phergie/phergie-irc-client-react/blob/b0d03f1e1ff34a2868f1f7d677786fdd1786b320/src/Client.php#L649-L662 |
226,308 | phergie/phergie-irc-client-react | src/Client.php | Client.addSecureConnection | protected function addSecureConnection(ConnectionInterface $connection)
{
$hostname = $connection->getServerHostname();
$port = $connection->getServerPort();
$this->getSecureConnector($connection)
->connect($hostname . ':' . $port)
->then(
function(Du... | php | protected function addSecureConnection(ConnectionInterface $connection)
{
$hostname = $connection->getServerHostname();
$port = $connection->getServerPort();
$this->getSecureConnector($connection)
->connect($hostname . ':' . $port)
->then(
function(Du... | [
"protected",
"function",
"addSecureConnection",
"(",
"ConnectionInterface",
"$",
"connection",
")",
"{",
"$",
"hostname",
"=",
"$",
"connection",
"->",
"getServerHostname",
"(",
")",
";",
"$",
"port",
"=",
"$",
"connection",
"->",
"getServerPort",
"(",
")",
";... | Initializes a secured connection.
@param \Phergie\Irc\ConnectionInterface $connection
@throws \Phergie\Irc\Client\React\Exception if the SSL transport and
forcing IPv4 usage are both enabled | [
"Initializes",
"a",
"secured",
"connection",
"."
] | b0d03f1e1ff34a2868f1f7d677786fdd1786b320 | https://github.com/phergie/phergie-irc-client-react/blob/b0d03f1e1ff34a2868f1f7d677786fdd1786b320/src/Client.php#L671-L687 |
226,309 | phergie/phergie-irc-client-react | src/Client.php | Client.initializeStream | protected function initializeStream(DuplexStreamInterface $stream, ConnectionInterface $connection)
{
try {
$connection->setData('stream', $stream);
$write = $this->getWriteStream($connection);
$connection->setData('write', $write);
$this->configureStreams($co... | php | protected function initializeStream(DuplexStreamInterface $stream, ConnectionInterface $connection)
{
try {
$connection->setData('stream', $stream);
$write = $this->getWriteStream($connection);
$connection->setData('write', $write);
$this->configureStreams($co... | [
"protected",
"function",
"initializeStream",
"(",
"DuplexStreamInterface",
"$",
"stream",
",",
"ConnectionInterface",
"$",
"connection",
")",
"{",
"try",
"{",
"$",
"connection",
"->",
"setData",
"(",
"'stream'",
",",
"$",
"stream",
")",
";",
"$",
"write",
"=",... | Configures an established stream for a given connection.
@param \React\Stream\DuplexStreamInterface $stream
@param \Phergie\Irc\ConnectionInterface $connection | [
"Configures",
"an",
"established",
"stream",
"for",
"a",
"given",
"connection",
"."
] | b0d03f1e1ff34a2868f1f7d677786fdd1786b320 | https://github.com/phergie/phergie-irc-client-react/blob/b0d03f1e1ff34a2868f1f7d677786fdd1786b320/src/Client.php#L695-L706 |
226,310 | phergie/phergie-irc-client-react | src/Client.php | Client.initializeConnection | protected function initializeConnection($remote, $connection)
{
try {
$context = $this->getContext($connection);
$socket = $this->getSocket($remote, $context);
$stream = $this->getStream($socket);
$this->initializeStream($stream, $connection);
$thi... | php | protected function initializeConnection($remote, $connection)
{
try {
$context = $this->getContext($connection);
$socket = $this->getSocket($remote, $context);
$stream = $this->getStream($socket);
$this->initializeStream($stream, $connection);
$thi... | [
"protected",
"function",
"initializeConnection",
"(",
"$",
"remote",
",",
"$",
"connection",
")",
"{",
"try",
"{",
"$",
"context",
"=",
"$",
"this",
"->",
"getContext",
"(",
"$",
"connection",
")",
";",
"$",
"socket",
"=",
"$",
"this",
"->",
"getSocket",... | Initializes an added connection.
@param string $remote
@param \Phergie\Irc\ConnectionInterface $connection | [
"Initializes",
"an",
"added",
"connection",
"."
] | b0d03f1e1ff34a2868f1f7d677786fdd1786b320 | https://github.com/phergie/phergie-irc-client-react/blob/b0d03f1e1ff34a2868f1f7d677786fdd1786b320/src/Client.php#L714-L727 |
226,311 | phergie/phergie-irc-client-react | src/Client.php | Client.addConnection | public function addConnection(ConnectionInterface $connection)
{
$this->emit('connect.before.each', array($connection));
if ($this->getTransport($connection) === 'ssl') {
$this->addSecureConnection($connection);
} else {
$this->addUnsecuredConnection($connection);
... | php | public function addConnection(ConnectionInterface $connection)
{
$this->emit('connect.before.each', array($connection));
if ($this->getTransport($connection) === 'ssl') {
$this->addSecureConnection($connection);
} else {
$this->addUnsecuredConnection($connection);
... | [
"public",
"function",
"addConnection",
"(",
"ConnectionInterface",
"$",
"connection",
")",
"{",
"$",
"this",
"->",
"emit",
"(",
"'connect.before.each'",
",",
"array",
"(",
"$",
"connection",
")",
")",
";",
"if",
"(",
"$",
"this",
"->",
"getTransport",
"(",
... | Initializes an IRC connection.
Emits connect.before.each and connect.after.each events before and
after connection attempts are established, respectively.
Emits a connect.error event if a connection attempt fails.
@param \Phergie\Irc\ConnectionInterface $connection Metadata for connection to establish
@throws \Pherg... | [
"Initializes",
"an",
"IRC",
"connection",
"."
] | b0d03f1e1ff34a2868f1f7d677786fdd1786b320 | https://github.com/phergie/phergie-irc-client-react/blob/b0d03f1e1ff34a2868f1f7d677786fdd1786b320/src/Client.php#L740-L749 |
226,312 | phergie/phergie-irc-client-react | src/Client.php | Client.run | public function run($connections, $autorun = true)
{
if (!is_array($connections)) {
$connections = array($connections);
}
$this->on('connect.error', function($message, $connection, $logger) {
$logger->error($message);
});
$this->emit('connect.before.... | php | public function run($connections, $autorun = true)
{
if (!is_array($connections)) {
$connections = array($connections);
}
$this->on('connect.error', function($message, $connection, $logger) {
$logger->error($message);
});
$this->emit('connect.before.... | [
"public",
"function",
"run",
"(",
"$",
"connections",
",",
"$",
"autorun",
"=",
"true",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"connections",
")",
")",
"{",
"$",
"connections",
"=",
"array",
"(",
"$",
"connections",
")",
";",
"}",
"$",
"th... | Executes the event loop, which continues running until no active
connections remain.
@param \Phergie\Irc\ConnectionInterface|\Phergie\Irc\ConnectionInterface[] $connections
@param bool $autorun | [
"Executes",
"the",
"event",
"loop",
"which",
"continues",
"running",
"until",
"no",
"active",
"connections",
"remain",
"."
] | b0d03f1e1ff34a2868f1f7d677786fdd1786b320 | https://github.com/phergie/phergie-irc-client-react/blob/b0d03f1e1ff34a2868f1f7d677786fdd1786b320/src/Client.php#L758-L785 |
226,313 | odannyc/laravel-alertify | src/Alertify/Log.php | Log.success | public function success(?string $message = null): Log
{
if (!is_null($message)) {
$this->message = $message;
}
$this->type = 'success';
Alertify::flash();
return $this;
} | php | public function success(?string $message = null): Log
{
if (!is_null($message)) {
$this->message = $message;
}
$this->type = 'success';
Alertify::flash();
return $this;
} | [
"public",
"function",
"success",
"(",
"?",
"string",
"$",
"message",
"=",
"null",
")",
":",
"Log",
"{",
"if",
"(",
"!",
"is_null",
"(",
"$",
"message",
")",
")",
"{",
"$",
"this",
"->",
"message",
"=",
"$",
"message",
";",
"}",
"$",
"this",
"->",... | Sets a success message.
@param string $message The success message
@return Log | [
"Sets",
"a",
"success",
"message",
"."
] | 0210586d2c6c176084d2636e12c14516e88b3b5f | https://github.com/odannyc/laravel-alertify/blob/0210586d2c6c176084d2636e12c14516e88b3b5f/src/Alertify/Log.php#L71-L79 |
226,314 | odannyc/laravel-alertify | src/Alertify/Log.php | Log.delay | public function delay(int $time): Log
{
$this->delay = $time;
Alertify::flash();
return $this;
} | php | public function delay(int $time): Log
{
$this->delay = $time;
Alertify::flash();
return $this;
} | [
"public",
"function",
"delay",
"(",
"int",
"$",
"time",
")",
":",
"Log",
"{",
"$",
"this",
"->",
"delay",
"=",
"$",
"time",
";",
"Alertify",
"::",
"flash",
"(",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Sets the delay of the alert.
@param int $time The time delay in milliseconds
@return Log | [
"Sets",
"the",
"delay",
"of",
"the",
"alert",
"."
] | 0210586d2c6c176084d2636e12c14516e88b3b5f | https://github.com/odannyc/laravel-alertify/blob/0210586d2c6c176084d2636e12c14516e88b3b5f/src/Alertify/Log.php#L103-L108 |
226,315 | odannyc/laravel-alertify | src/Alertify/Log.php | Log.position | public function position(string $position): Log
{
$acceptablePositions = [
'top right',
'top left',
'bottom right',
'bottom left'
];
if (array_search(strtolower($position), $acceptablePositions) === false) {
$acceptablePositions = ... | php | public function position(string $position): Log
{
$acceptablePositions = [
'top right',
'top left',
'bottom right',
'bottom left'
];
if (array_search(strtolower($position), $acceptablePositions) === false) {
$acceptablePositions = ... | [
"public",
"function",
"position",
"(",
"string",
"$",
"position",
")",
":",
"Log",
"{",
"$",
"acceptablePositions",
"=",
"[",
"'top right'",
",",
"'top left'",
",",
"'bottom right'",
",",
"'bottom left'",
"]",
";",
"if",
"(",
"array_search",
"(",
"strtolower",... | Sets the position of the alert.
@param string $position The position of the alert
@throws \Exception
@return Log | [
"Sets",
"the",
"position",
"of",
"the",
"alert",
"."
] | 0210586d2c6c176084d2636e12c14516e88b3b5f | https://github.com/odannyc/laravel-alertify/blob/0210586d2c6c176084d2636e12c14516e88b3b5f/src/Alertify/Log.php#L117-L134 |
226,316 | gjerokrsteski/pimf-framework | core/Pimf/Util/Serializer.php | Serializer.serialize | public static function serialize($object)
{
$masked = false;
if (false === is_object($object)) {
$object = self::mask($object);
$masked = true;
}
$capsule = new \stdClass();
$capsule->type = get_class($object);
$capsule->object = $object;
... | php | public static function serialize($object)
{
$masked = false;
if (false === is_object($object)) {
$object = self::mask($object);
$masked = true;
}
$capsule = new \stdClass();
$capsule->type = get_class($object);
$capsule->object = $object;
... | [
"public",
"static",
"function",
"serialize",
"(",
"$",
"object",
")",
"{",
"$",
"masked",
"=",
"false",
";",
"if",
"(",
"false",
"===",
"is_object",
"(",
"$",
"object",
")",
")",
"{",
"$",
"object",
"=",
"self",
"::",
"mask",
"(",
"$",
"object",
")... | Serialize things.
@param mixed $object Item you want - string, array, integer, object
@return string Containing a byte-stream representation. | [
"Serialize",
"things",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Util/Serializer.php#L29-L48 |
226,317 | gjerokrsteski/pimf-framework | core/Pimf/Util/Serializer.php | Serializer.unserialize | public static function unserialize($object)
{
$capsule = self::unserializeNative($object);
if (true === $capsule->fake) {
$capsule->object = self::unmask($capsule->object);
}
if ($capsule->type == 'SimpleXMLElement') {
$capsule->object = simplexml_load_strin... | php | public static function unserialize($object)
{
$capsule = self::unserializeNative($object);
if (true === $capsule->fake) {
$capsule->object = self::unmask($capsule->object);
}
if ($capsule->type == 'SimpleXMLElement') {
$capsule->object = simplexml_load_strin... | [
"public",
"static",
"function",
"unserialize",
"(",
"$",
"object",
")",
"{",
"$",
"capsule",
"=",
"self",
"::",
"unserializeNative",
"(",
"$",
"object",
")",
";",
"if",
"(",
"true",
"===",
"$",
"capsule",
"->",
"fake",
")",
"{",
"$",
"capsule",
"->",
... | Unserialize things.
@param string $object Serialized object.
@return mixed | [
"Unserialize",
"things",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Util/Serializer.php#L57-L70 |
226,318 | crip-laravel/filesys | src/App/File.php | File.init | public function init(ServiceBlob $blob)
{
parent::init($blob);
$this->extension = $blob->metadata->getExtension();
$this->mime = $blob->getMime();
$this->mimeType = $blob->metadata->getMimeType();
$this->thumbs = $blob->getThumbsDetails();
} | php | public function init(ServiceBlob $blob)
{
parent::init($blob);
$this->extension = $blob->metadata->getExtension();
$this->mime = $blob->getMime();
$this->mimeType = $blob->metadata->getMimeType();
$this->thumbs = $blob->getThumbsDetails();
} | [
"public",
"function",
"init",
"(",
"ServiceBlob",
"$",
"blob",
")",
"{",
"parent",
"::",
"init",
"(",
"$",
"blob",
")",
";",
"$",
"this",
"->",
"extension",
"=",
"$",
"blob",
"->",
"metadata",
"->",
"getExtension",
"(",
")",
";",
"$",
"this",
"->",
... | Initialize File properties from service instance.
@param ServiceBlob $blob | [
"Initialize",
"File",
"properties",
"from",
"service",
"instance",
"."
] | 43c66929a5a16772dbb3bae4b5188bdc10b6f9ec | https://github.com/crip-laravel/filesys/blob/43c66929a5a16772dbb3bae4b5188bdc10b6f9ec/src/App/File.php#L35-L43 |
226,319 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Client.php | Client.Rest | public static function Rest($username, $password, $service)
{
if (is_string($service)) {
return static::createRestClient($username, $password, $service);
} elseif (is_array($service)) {
$services = array();
foreach ($service as $serviceName) {
$se... | php | public static function Rest($username, $password, $service)
{
if (is_string($service)) {
return static::createRestClient($username, $password, $service);
} elseif (is_array($service)) {
$services = array();
foreach ($service as $serviceName) {
$se... | [
"public",
"static",
"function",
"Rest",
"(",
"$",
"username",
",",
"$",
"password",
",",
"$",
"service",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"service",
")",
")",
"{",
"return",
"static",
"::",
"createRestClient",
"(",
"$",
"username",
",",
"$",... | Create one or more REST service clients
@static
@param string $username API Login
@param string $password API Password
@param string|array $service Service name(s)
@return CallFire\Api\R... | [
"Create",
"one",
"or",
"more",
"REST",
"service",
"clients"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Client.php#L20-L35 |
226,320 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Client.php | Client.createRestClient | protected static function createRestClient($username, $password, $service)
{
$serviceClass = RestClient::ns()."\\{$service}";
$client = new $serviceClass;
$client->setUsername($username);
$client->setPassword($password);
return $client;
} | php | protected static function createRestClient($username, $password, $service)
{
$serviceClass = RestClient::ns()."\\{$service}";
$client = new $serviceClass;
$client->setUsername($username);
$client->setPassword($password);
return $client;
} | [
"protected",
"static",
"function",
"createRestClient",
"(",
"$",
"username",
",",
"$",
"password",
",",
"$",
"service",
")",
"{",
"$",
"serviceClass",
"=",
"RestClient",
"::",
"ns",
"(",
")",
".",
"\"\\\\{$service}\"",
";",
"$",
"client",
"=",
"new",
"$",
... | Instantiate a REST service client
@static
@param string $username API Login
@param string $password API Password
@param string $service Service name
@return CallFire\Api\Rest\Client REST API client | [
"Instantiate",
"a",
"REST",
"service",
"client"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Client.php#L46-L55 |
226,321 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Client.php | Client.Soap | public static function Soap($username, $password, $service, $version = 'SOAP_1_2', $wsdl = 'http://callfire.com/api/1.1/wsdl/callfire-service-http-soap12.wsdl')
{
$options = array(
'soap_version' => $version,
'login' => $username,
'password' => $password
);
... | php | public static function Soap($username, $password, $service, $version = 'SOAP_1_2', $wsdl = 'http://callfire.com/api/1.1/wsdl/callfire-service-http-soap12.wsdl')
{
$options = array(
'soap_version' => $version,
'login' => $username,
'password' => $password
);
... | [
"public",
"static",
"function",
"Soap",
"(",
"$",
"username",
",",
"$",
"password",
",",
"$",
"service",
",",
"$",
"version",
"=",
"'SOAP_1_2'",
",",
"$",
"wsdl",
"=",
"'http://callfire.com/api/1.1/wsdl/callfire-service-http-soap12.wsdl'",
")",
"{",
"$",
"options"... | Create a SOAP client
@static
@param string $username API Login
@param string $password API Password
@param string $version = 'SOAP_1_2' SOAP version
@param string $wsdl = 'http://callfire.com/api/1.1/wsdl/callfire-service-http-soap12.wsdl... | [
"Create",
"a",
"SOAP",
"client"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Client.php#L67-L93 |
226,322 | infomaniac-amf/php | lib/Util/ReferenceStore.php | ReferenceStore.getReference | public function getReference($data, $type)
{
$index = array_search($data, $this->store[$type], true);
if ($index !== false) {
return $index;
}
if (!$this->validate($data)) {
return false;
}
$this->addReference($data, $type);
return fa... | php | public function getReference($data, $type)
{
$index = array_search($data, $this->store[$type], true);
if ($index !== false) {
return $index;
}
if (!$this->validate($data)) {
return false;
}
$this->addReference($data, $type);
return fa... | [
"public",
"function",
"getReference",
"(",
"$",
"data",
",",
"$",
"type",
")",
"{",
"$",
"index",
"=",
"array_search",
"(",
"$",
"data",
",",
"$",
"this",
"->",
"store",
"[",
"$",
"type",
"]",
",",
"true",
")",
";",
"if",
"(",
"$",
"index",
"!=="... | Creates or retrieves an object reference from the store
@param $data
@param $type
@return int | [
"Creates",
"or",
"retrieves",
"an",
"object",
"reference",
"from",
"the",
"store"
] | 1b71c125352ec562f473cd51958a03f786aa7ac9 | https://github.com/infomaniac-amf/php/blob/1b71c125352ec562f473cd51958a03f786aa7ac9/lib/Util/ReferenceStore.php#L29-L42 |
226,323 | infomaniac-amf/php | lib/Util/ReferenceStore.php | ReferenceStore.getByReference | public function getByReference($reference, $type)
{
if (!isset($this->store[$type])) {
return false;
}
$count = count($this->store[$type]);
if ($reference >= $count) {
throw new DeserializationException('Invalid ' . $type . ' reference: ' . $reference);
... | php | public function getByReference($reference, $type)
{
if (!isset($this->store[$type])) {
return false;
}
$count = count($this->store[$type]);
if ($reference >= $count) {
throw new DeserializationException('Invalid ' . $type . ' reference: ' . $reference);
... | [
"public",
"function",
"getByReference",
"(",
"$",
"reference",
",",
"$",
"type",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"store",
"[",
"$",
"type",
"]",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"count",
"=",
"count",
"(... | Retrieves a value of a given type by reference
@param $reference
@param $type
@return bool
@throws \Infomaniac\Exception\DeserializationException | [
"Retrieves",
"a",
"value",
"of",
"a",
"given",
"type",
"by",
"reference"
] | 1b71c125352ec562f473cd51958a03f786aa7ac9 | https://github.com/infomaniac-amf/php/blob/1b71c125352ec562f473cd51958a03f786aa7ac9/lib/Util/ReferenceStore.php#L53-L70 |
226,324 | infomaniac-amf/php | lib/Util/ReferenceStore.php | ReferenceStore.addReference | public function addReference(&$data, $type)
{
if (!$this->validate($data)) {
return false;
}
$this->store[$type][] =& $data;
return $data;
} | php | public function addReference(&$data, $type)
{
if (!$this->validate($data)) {
return false;
}
$this->store[$type][] =& $data;
return $data;
} | [
"public",
"function",
"addReference",
"(",
"&",
"$",
"data",
",",
"$",
"type",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"validate",
"(",
"$",
"data",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"this",
"->",
"store",
"[",
"$",
"type",
... | Adds a new reference by type
@param $data
@param $type
@return bool | [
"Adds",
"a",
"new",
"reference",
"by",
"type"
] | 1b71c125352ec562f473cd51958a03f786aa7ac9 | https://github.com/infomaniac-amf/php/blob/1b71c125352ec562f473cd51958a03f786aa7ac9/lib/Util/ReferenceStore.php#L80-L88 |
226,325 | infomaniac-amf/php | lib/Util/ReferenceStore.php | ReferenceStore.validate | private function validate($data)
{
// null or zero-length values cannot be assigned references
if (is_null($data) || (is_string($data) && !strlen($data))) {
return false;
}
return true;
} | php | private function validate($data)
{
// null or zero-length values cannot be assigned references
if (is_null($data) || (is_string($data) && !strlen($data))) {
return false;
}
return true;
} | [
"private",
"function",
"validate",
"(",
"$",
"data",
")",
"{",
"// null or zero-length values cannot be assigned references",
"if",
"(",
"is_null",
"(",
"$",
"data",
")",
"||",
"(",
"is_string",
"(",
"$",
"data",
")",
"&&",
"!",
"strlen",
"(",
"$",
"data",
"... | Validates a given value and type for issues
and prepares array for possible reference addition
@param $data
@return bool | [
"Validates",
"a",
"given",
"value",
"and",
"type",
"for",
"issues",
"and",
"prepares",
"array",
"for",
"possible",
"reference",
"addition"
] | 1b71c125352ec562f473cd51958a03f786aa7ac9 | https://github.com/infomaniac-amf/php/blob/1b71c125352ec562f473cd51958a03f786aa7ac9/lib/Util/ReferenceStore.php#L98-L106 |
226,326 | gjerokrsteski/pimf-framework | core/Pimf/Logger.php | Logger.format | private function format($message, $severity)
{
$msg = date("m-d-Y") . " " . date("G:i:s") . " " . self::$remoteIp;
$IPLength = strlen(self::$remoteIp);
$numWhitespaces = 15 - $IPLength;
for ($i = 0; $i < $numWhitespaces; $i++) {
$msg .= " ";
}
$msg .= "... | php | private function format($message, $severity)
{
$msg = date("m-d-Y") . " " . date("G:i:s") . " " . self::$remoteIp;
$IPLength = strlen(self::$remoteIp);
$numWhitespaces = 15 - $IPLength;
for ($i = 0; $i < $numWhitespaces; $i++) {
$msg .= " ";
}
$msg .= "... | [
"private",
"function",
"format",
"(",
"$",
"message",
",",
"$",
"severity",
")",
"{",
"$",
"msg",
"=",
"date",
"(",
"\"m-d-Y\"",
")",
".",
"\" \"",
".",
"date",
"(",
"\"G:i:s\"",
")",
".",
"\" \"",
".",
"self",
"::",
"$",
"remoteIp",
";",
"$",
"IPL... | Formats the error message in representable manner.
@param string $message
@param string $severity
@return string | [
"Formats",
"the",
"error",
"message",
"in",
"representable",
"manner",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Logger.php#L183-L207 |
226,327 | gjerokrsteski/pimf-framework | core/Pimf/DataMapper/Base.php | Base.reflect | public function reflect($model, $value, $property = 'id')
{
$attribute = new \ReflectionProperty($model, $property);
$attribute->setAccessible(true);
$attribute->setValue($model, $value);
return $model;
} | php | public function reflect($model, $value, $property = 'id')
{
$attribute = new \ReflectionProperty($model, $property);
$attribute->setAccessible(true);
$attribute->setValue($model, $value);
return $model;
} | [
"public",
"function",
"reflect",
"(",
"$",
"model",
",",
"$",
"value",
",",
"$",
"property",
"=",
"'id'",
")",
"{",
"$",
"attribute",
"=",
"new",
"\\",
"ReflectionProperty",
"(",
"$",
"model",
",",
"$",
"property",
")",
";",
"$",
"attribute",
"->",
"... | Makes a given model-property accessible.
@param object $model
@param int $value
@param string $property
@return mixed | [
"Makes",
"a",
"given",
"model",
"-",
"property",
"accessible",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/DataMapper/Base.php#L63-L70 |
226,328 | Techworker/ssml | src/Traits/SayAsTrait.php | SayAsTrait.sayAs | public function sayAs(string $interpretAs, string $content, string $format = null): ContainerElement
{
/** @var ContainerElement $this */
return $this->addElement(SayAs::factory($interpretAs, $content, $format));
} | php | public function sayAs(string $interpretAs, string $content, string $format = null): ContainerElement
{
/** @var ContainerElement $this */
return $this->addElement(SayAs::factory($interpretAs, $content, $format));
} | [
"public",
"function",
"sayAs",
"(",
"string",
"$",
"interpretAs",
",",
"string",
"$",
"content",
",",
"string",
"$",
"format",
"=",
"null",
")",
":",
"ContainerElement",
"{",
"/** @var ContainerElement $this */",
"return",
"$",
"this",
"->",
"addElement",
"(",
... | Adds a new say-as element.
@param string $interpretAs
@param string $content
@param string|null $format
@return ContainerElement | [
"Adds",
"a",
"new",
"say",
"-",
"as",
"element",
"."
] | cafb979b777480baf7a01b5db2bf7c2cff837805 | https://github.com/Techworker/ssml/blob/cafb979b777480baf7a01b5db2bf7c2cff837805/src/Traits/SayAsTrait.php#L31-L35 |
226,329 | lexik/ws-colissimo | src/WSColissimo/WSColiPosteLetterService/Request/ValueObject/Choice/RequestType.php | RequestType.getChoices | public static function getChoices()
{
$choices = array();
$reflect = new \ReflectionClass(__CLASS__);
$constants = array_keys($reflect->getConstants());
foreach ($constants as $constant) {
$choices[] = $reflect->getConstant($constant);
}
return $choices... | php | public static function getChoices()
{
$choices = array();
$reflect = new \ReflectionClass(__CLASS__);
$constants = array_keys($reflect->getConstants());
foreach ($constants as $constant) {
$choices[] = $reflect->getConstant($constant);
}
return $choices... | [
"public",
"static",
"function",
"getChoices",
"(",
")",
"{",
"$",
"choices",
"=",
"array",
"(",
")",
";",
"$",
"reflect",
"=",
"new",
"\\",
"ReflectionClass",
"(",
"__CLASS__",
")",
";",
"$",
"constants",
"=",
"array_keys",
"(",
"$",
"reflect",
"->",
"... | Return an array of the class constants
@return array | [
"Return",
"an",
"array",
"of",
"the",
"class",
"constants"
] | df4ba30b05afed8e49d509c36592d4aa7797c259 | https://github.com/lexik/ws-colissimo/blob/df4ba30b05afed8e49d509c36592d4aa7797c259/src/WSColissimo/WSColiPosteLetterService/Request/ValueObject/Choice/RequestType.php#L23-L35 |
226,330 | Techworker/ssml | src/Element/Paragraph.php | Paragraph.toDOM | public function toDOM(\DOMDocument $doc): \DOMNode
{
$paragraph = $doc->createElement('p');
$this->customAttributesToDOM($paragraph);
$this->containerToDOM($doc, $paragraph);
return $paragraph;
} | php | public function toDOM(\DOMDocument $doc): \DOMNode
{
$paragraph = $doc->createElement('p');
$this->customAttributesToDOM($paragraph);
$this->containerToDOM($doc, $paragraph);
return $paragraph;
} | [
"public",
"function",
"toDOM",
"(",
"\\",
"DOMDocument",
"$",
"doc",
")",
":",
"\\",
"DOMNode",
"{",
"$",
"paragraph",
"=",
"$",
"doc",
"->",
"createElement",
"(",
"'p'",
")",
";",
"$",
"this",
"->",
"customAttributesToDOM",
"(",
"$",
"paragraph",
")",
... | Adds the element to the given document.
@inheritdoc | [
"Adds",
"the",
"element",
"to",
"the",
"given",
"document",
"."
] | cafb979b777480baf7a01b5db2bf7c2cff837805 | https://github.com/Techworker/ssml/blob/cafb979b777480baf7a01b5db2bf7c2cff837805/src/Element/Paragraph.php#L39-L47 |
226,331 | gjerokrsteski/pimf-framework | core/Pimf/Redis.php | Redis.bulk | protected function bulk($head)
{
if ($head == '$-1') {
return null;
}
list($read, $response, $size) = array(0, '', substr($head, 1));
if ($size > 0) {
do {
// Calculate and read the appropriate bytes off of the Redis response.
... | php | protected function bulk($head)
{
if ($head == '$-1') {
return null;
}
list($read, $response, $size) = array(0, '', substr($head, 1));
if ($size > 0) {
do {
// Calculate and read the appropriate bytes off of the Redis response.
... | [
"protected",
"function",
"bulk",
"(",
"$",
"head",
")",
"{",
"if",
"(",
"$",
"head",
"==",
"'$-1'",
")",
"{",
"return",
"null",
";",
"}",
"list",
"(",
"$",
"read",
",",
"$",
"response",
",",
"$",
"size",
")",
"=",
"array",
"(",
"0",
",",
"''",
... | Parse and handle a bulk response from the Redis database.
@param string $head
@return string | [
"Parse",
"and",
"handle",
"a",
"bulk",
"response",
"from",
"the",
"Redis",
"database",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Redis.php#L225-L248 |
226,332 | gjerokrsteski/pimf-framework | core/Pimf/Redis.php | Redis.multibulk | protected function multibulk($head)
{
if (($count = substr($head, 1)) == '-1') {
return null;
}
$response = array();
// Iterate through each bulk response in the multi-bulk and parse it out.
for ($i = 0; $i < $count; $i++) {
$response[] = $this->pars... | php | protected function multibulk($head)
{
if (($count = substr($head, 1)) == '-1') {
return null;
}
$response = array();
// Iterate through each bulk response in the multi-bulk and parse it out.
for ($i = 0; $i < $count; $i++) {
$response[] = $this->pars... | [
"protected",
"function",
"multibulk",
"(",
"$",
"head",
")",
"{",
"if",
"(",
"(",
"$",
"count",
"=",
"substr",
"(",
"$",
"head",
",",
"1",
")",
")",
"==",
"'-1'",
")",
"{",
"return",
"null",
";",
"}",
"$",
"response",
"=",
"array",
"(",
")",
";... | Parse and handle a multi-bulk reply from the Redis database.
@param string $head
@return array | [
"Parse",
"and",
"handle",
"a",
"multi",
"-",
"bulk",
"reply",
"from",
"the",
"Redis",
"database",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Redis.php#L257-L271 |
226,333 | tarsana/functional | src/Classes/Stream.php | Stream.operation | public static function operation($name, $signatures, $fn = null)
{
if (! is_array($signatures)) {
$signatures = [$signatures];
}
foreach ($signatures as $signature) {
self::$operations[] = _stream_operation($name, $signature, $fn);
}
} | php | public static function operation($name, $signatures, $fn = null)
{
if (! is_array($signatures)) {
$signatures = [$signatures];
}
foreach ($signatures as $signature) {
self::$operations[] = _stream_operation($name, $signature, $fn);
}
} | [
"public",
"static",
"function",
"operation",
"(",
"$",
"name",
",",
"$",
"signatures",
",",
"$",
"fn",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"signatures",
")",
")",
"{",
"$",
"signatures",
"=",
"[",
"$",
"signatures",
"]",
";... | Adds a new operation to the Stream class.
@param string $name
@param string $signature
@param callable $fn
@return void | [
"Adds",
"a",
"new",
"operation",
"to",
"the",
"Stream",
"class",
"."
] | 77ab9cbe8e44865edb686c07cc0848d8a950ed19 | https://github.com/tarsana/functional/blob/77ab9cbe8e44865edb686c07cc0848d8a950ed19/src/Classes/Stream.php#L54-L62 |
226,334 | tarsana/functional | src/Classes/Stream.php | Stream.removeOperations | public static function removeOperations($name)
{
$names = func_get_args();
self::$operations = filter(function($operation) use($names) {
return !in_array(get('name', $operation), $names);
}, self::$operations);
} | php | public static function removeOperations($name)
{
$names = func_get_args();
self::$operations = filter(function($operation) use($names) {
return !in_array(get('name', $operation), $names);
}, self::$operations);
} | [
"public",
"static",
"function",
"removeOperations",
"(",
"$",
"name",
")",
"{",
"$",
"names",
"=",
"func_get_args",
"(",
")",
";",
"self",
"::",
"$",
"operations",
"=",
"filter",
"(",
"function",
"(",
"$",
"operation",
")",
"use",
"(",
"$",
"names",
")... | Removes one or many operation from the Stream class.
@param string $name
@return void | [
"Removes",
"one",
"or",
"many",
"operation",
"from",
"the",
"Stream",
"class",
"."
] | 77ab9cbe8e44865edb686c07cc0848d8a950ed19 | https://github.com/tarsana/functional/blob/77ab9cbe8e44865edb686c07cc0848d8a950ed19/src/Classes/Stream.php#L81-L87 |
226,335 | phergie/phergie-irc-client-react | src/ReadStream.php | ReadStream.getParser | public function getParser()
{
if (!$this->parser) {
$this->parser = new \Phergie\Irc\Parser();
}
return $this->parser;
} | php | public function getParser()
{
if (!$this->parser) {
$this->parser = new \Phergie\Irc\Parser();
}
return $this->parser;
} | [
"public",
"function",
"getParser",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"parser",
")",
"{",
"$",
"this",
"->",
"parser",
"=",
"new",
"\\",
"Phergie",
"\\",
"Irc",
"\\",
"Parser",
"(",
")",
";",
"}",
"return",
"$",
"this",
"->",
"pars... | Returns the IRC message parser in use.
@return \Phergie\Irc\ParserInterface | [
"Returns",
"the",
"IRC",
"message",
"parser",
"in",
"use",
"."
] | b0d03f1e1ff34a2868f1f7d677786fdd1786b320 | https://github.com/phergie/phergie-irc-client-react/blob/b0d03f1e1ff34a2868f1f7d677786fdd1786b320/src/ReadStream.php#L60-L66 |
226,336 | phergie/phergie-irc-client-react | src/ReadStream.php | ReadStream.write | public function write($data)
{
if ($this->closed) {
return;
}
$all = $this->tail . $data;
$messages = $this->getParser()->consumeAll($all);
$this->tail = $all;
foreach ($messages as $message) {
if (isset($message['message'])) {
... | php | public function write($data)
{
if ($this->closed) {
return;
}
$all = $this->tail . $data;
$messages = $this->getParser()->consumeAll($all);
$this->tail = $all;
foreach ($messages as $message) {
if (isset($message['message'])) {
... | [
"public",
"function",
"write",
"(",
"$",
"data",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"closed",
")",
"{",
"return",
";",
"}",
"$",
"all",
"=",
"$",
"this",
"->",
"tail",
".",
"$",
"data",
";",
"$",
"messages",
"=",
"$",
"this",
"->",
"getPar... | Parses messages from data piped to this stream and emits them as
events.
@param string $data | [
"Parses",
"messages",
"from",
"data",
"piped",
"to",
"this",
"stream",
"and",
"emits",
"them",
"as",
"events",
"."
] | b0d03f1e1ff34a2868f1f7d677786fdd1786b320 | https://github.com/phergie/phergie-irc-client-react/blob/b0d03f1e1ff34a2868f1f7d677786fdd1786b320/src/ReadStream.php#L74-L92 |
226,337 | gjerokrsteski/pimf-framework | core/Pimf/Cache/Storages/Dba.php | Dba.clean | public function clean()
{
$dba = $this->dba;
$key = dba_firstkey($dba);
while ($key !== false && $key !== null) {
$this->retrieve($key);
$key = dba_nextkey($dba);
}
return dba_optimize($dba);
} | php | public function clean()
{
$dba = $this->dba;
$key = dba_firstkey($dba);
while ($key !== false && $key !== null) {
$this->retrieve($key);
$key = dba_nextkey($dba);
}
return dba_optimize($dba);
} | [
"public",
"function",
"clean",
"(",
")",
"{",
"$",
"dba",
"=",
"$",
"this",
"->",
"dba",
";",
"$",
"key",
"=",
"dba_firstkey",
"(",
"$",
"dba",
")",
";",
"while",
"(",
"$",
"key",
"!==",
"false",
"&&",
"$",
"key",
"!==",
"null",
")",
"{",
"$",
... | Cleans and optimizes the cache from all expired entries.
@return bool | [
"Cleans",
"and",
"optimizes",
"the",
"cache",
"from",
"all",
"expired",
"entries",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Cache/Storages/Dba.php#L198-L209 |
226,338 | gjerokrsteski/pimf-framework | core/Pimf/Cache/Storages/Dba.php | Dba.flush | public function flush()
{
if (file_exists($this->file)) {
// We close the dba file before deleting
// and reopen on next use.
$this->__destruct();
unlink($this->file);
clearstatcache();
return true;
}
return false;
... | php | public function flush()
{
if (file_exists($this->file)) {
// We close the dba file before deleting
// and reopen on next use.
$this->__destruct();
unlink($this->file);
clearstatcache();
return true;
}
return false;
... | [
"public",
"function",
"flush",
"(",
")",
"{",
"if",
"(",
"file_exists",
"(",
"$",
"this",
"->",
"file",
")",
")",
"{",
"// We close the dba file before deleting",
"// and reopen on next use.",
"$",
"this",
"->",
"__destruct",
"(",
")",
";",
"unlink",
"(",
"$",... | Flush the whole storage.
@return bool | [
"Flush",
"the",
"whole",
"storage",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Cache/Storages/Dba.php#L216-L232 |
226,339 | gjerokrsteski/pimf-framework | core/Pimf/Util/Header.php | Header.isModified | public static function isModified($mtime, $etag = '')
{
$modifiedSince = strtotime(preg_replace('/;.*$/', '', self::$IfModifiedSince));
return !($modifiedSince >= $mtime || self::$IfNoneMatch == $etag);
} | php | public static function isModified($mtime, $etag = '')
{
$modifiedSince = strtotime(preg_replace('/;.*$/', '', self::$IfModifiedSince));
return !($modifiedSince >= $mtime || self::$IfNoneMatch == $etag);
} | [
"public",
"static",
"function",
"isModified",
"(",
"$",
"mtime",
",",
"$",
"etag",
"=",
"''",
")",
"{",
"$",
"modifiedSince",
"=",
"strtotime",
"(",
"preg_replace",
"(",
"'/;.*$/'",
",",
"''",
",",
"self",
"::",
"$",
"IfModifiedSince",
")",
")",
";",
"... | Actual HTTP caching validation.
@param int $mtime In seconds
@param string $etag
@return bool | [
"Actual",
"HTTP",
"caching",
"validation",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Util/Header.php#L150-L155 |
226,340 | gjerokrsteski/pimf-framework | core/Pimf/Util/Header.php | Header.sendDownloadDialog | public static function sendDownloadDialog($fileOrString, $fileName, $exit = true)
{
$disposition = (false !== strpos(self::$userAgent, 'MSIE 5.5')) ? '' : 'attachment; ';
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=... | php | public static function sendDownloadDialog($fileOrString, $fileName, $exit = true)
{
$disposition = (false !== strpos(self::$userAgent, 'MSIE 5.5')) ? '' : 'attachment; ';
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=... | [
"public",
"static",
"function",
"sendDownloadDialog",
"(",
"$",
"fileOrString",
",",
"$",
"fileName",
",",
"$",
"exit",
"=",
"true",
")",
"{",
"$",
"disposition",
"=",
"(",
"false",
"!==",
"strpos",
"(",
"self",
"::",
"$",
"userAgent",
",",
"'MSIE 5.5'",
... | Sends file as download-header through any firewall to the browsers like >=IE6 >=FF3.6, Safari, Chrome, Opera.
@link http://reeg.junetz.de/DSP/node16.html
@link http://www.php.net/manual/de/function.header.php#88038
@param string $fileOrString
@param string $fileName
@param boolean $exit Optional for testing | [
"Sends",
"file",
"as",
"download",
"-",
"header",
"through",
"any",
"firewall",
"to",
"the",
"browsers",
"like",
">",
"=",
"IE6",
">",
"=",
"FF3",
".",
"6",
"Safari",
"Chrome",
"Opera",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Util/Header.php#L216-L235 |
226,341 | vinkla/laravel-backup | src/Backup.php | Backup.run | public function run(bool $clear = false)
{
$profile = $this->registry->get($this->getProfile());
$this->executor->backup($profile, $clear);
} | php | public function run(bool $clear = false)
{
$profile = $this->registry->get($this->getProfile());
$this->executor->backup($profile, $clear);
} | [
"public",
"function",
"run",
"(",
"bool",
"$",
"clear",
"=",
"false",
")",
"{",
"$",
"profile",
"=",
"$",
"this",
"->",
"registry",
"->",
"get",
"(",
"$",
"this",
"->",
"getProfile",
"(",
")",
")",
";",
"$",
"this",
"->",
"executor",
"->",
"backup"... | Execute the backup.
@param bool $clear
@return void | [
"Execute",
"the",
"backup",
"."
] | d3662b6509a39bce9cd75cc3e65b4ea01be46b26 | https://github.com/vinkla/laravel-backup/blob/d3662b6509a39bce9cd75cc3e65b4ea01be46b26/src/Backup.php#L118-L123 |
226,342 | Techworker/ssml | src/Element/Phoneme.php | Phoneme.factory | public static function factory(string $alphabet, string $ph, string $text): Phoneme
{
$instance = new static();
$instance->alphabet = $alphabet;
$instance->ph = $ph;
$instance->text = $text;
return $instance;
} | php | public static function factory(string $alphabet, string $ph, string $text): Phoneme
{
$instance = new static();
$instance->alphabet = $alphabet;
$instance->ph = $ph;
$instance->text = $text;
return $instance;
} | [
"public",
"static",
"function",
"factory",
"(",
"string",
"$",
"alphabet",
",",
"string",
"$",
"ph",
",",
"string",
"$",
"text",
")",
":",
"Phoneme",
"{",
"$",
"instance",
"=",
"new",
"static",
"(",
")",
";",
"$",
"instance",
"->",
"alphabet",
"=",
"... | Creates a phoneme element with the given data as attributes.
@param string $alphabet
@param string $ph
@param string $text
@return Phoneme | [
"Creates",
"a",
"phoneme",
"element",
"with",
"the",
"given",
"data",
"as",
"attributes",
"."
] | cafb979b777480baf7a01b5db2bf7c2cff837805 | https://github.com/Techworker/ssml/blob/cafb979b777480baf7a01b5db2bf7c2cff837805/src/Element/Phoneme.php#L54-L62 |
226,343 | sdboyer/gliph | src/Gliph/Algorithm/ConnectedComponent.php | ConnectedComponent.tarjan_scc | public static function tarjan_scc(Digraph $graph, TarjanSCCVisitor $visitor = NULL) {
$visitor = $visitor ?: new TarjanSCCVisitor();
$counter = 0;
$stack = array();
$indices = new \SplObjectStorage();
$lowlimits = new \SplObjectStorage();
$visit = function($vertex) use (... | php | public static function tarjan_scc(Digraph $graph, TarjanSCCVisitor $visitor = NULL) {
$visitor = $visitor ?: new TarjanSCCVisitor();
$counter = 0;
$stack = array();
$indices = new \SplObjectStorage();
$lowlimits = new \SplObjectStorage();
$visit = function($vertex) use (... | [
"public",
"static",
"function",
"tarjan_scc",
"(",
"Digraph",
"$",
"graph",
",",
"TarjanSCCVisitor",
"$",
"visitor",
"=",
"NULL",
")",
"{",
"$",
"visitor",
"=",
"$",
"visitor",
"?",
":",
"new",
"TarjanSCCVisitor",
"(",
")",
";",
"$",
"counter",
"=",
"0",... | Finds connected components in the provided directed graph.
@param Digraph $graph
The Digraph to search for connected components.
@param TarjanSCCVisitor $visitor
The visitor that will collect and store the connected components. One
will be created if not provided.
@return TarjanSCCVisitor
The finalized visitor. | [
"Finds",
"connected",
"components",
"in",
"the",
"provided",
"directed",
"graph",
"."
] | 5ec6314b2b211053f6bae989b95446ccf6e8ded0 | https://github.com/sdboyer/gliph/blob/5ec6314b2b211053f6bae989b95446ccf6e8ded0/src/Gliph/Algorithm/ConnectedComponent.php#L25-L64 |
226,344 | CallFire/CallFire-PHP-SDK | src/CallFire/Generator/Soap/SoapFunction.php | SoapFunction.generateParameter | protected function generateParameter($requestTypeName, $requestType)
{
if ($requestNamespace = $this->getRequestNamespace()) {
$requestType = Soap::REQUEST_NAMESPACE_ALIAS.'\\'.$requestType;
}
$parameter = new SoapParameter;
$parameter->generate($requestTypeName, $reques... | php | protected function generateParameter($requestTypeName, $requestType)
{
if ($requestNamespace = $this->getRequestNamespace()) {
$requestType = Soap::REQUEST_NAMESPACE_ALIAS.'\\'.$requestType;
}
$parameter = new SoapParameter;
$parameter->generate($requestTypeName, $reques... | [
"protected",
"function",
"generateParameter",
"(",
"$",
"requestTypeName",
",",
"$",
"requestType",
")",
"{",
"if",
"(",
"$",
"requestNamespace",
"=",
"$",
"this",
"->",
"getRequestNamespace",
"(",
")",
")",
"{",
"$",
"requestType",
"=",
"Soap",
"::",
"REQUE... | Generate a parameter generator from a SOAP function description's parameter name
and type.
@param string $requestTypeName
@param string $requestType
@return SoapParameter | [
"Generate",
"a",
"parameter",
"generator",
"from",
"a",
"SOAP",
"function",
"description",
"s",
"parameter",
"name",
"and",
"type",
"."
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Generator/Soap/SoapFunction.php#L203-L213 |
226,345 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Label.php | Label.DeleteLabel | public function DeleteLabel(Request\DeleteLabel $DeleteLabel = null)
{
$uri = $this->getUri('/label', array());
return $this->delete($uri, $DeleteLabel);
} | php | public function DeleteLabel(Request\DeleteLabel $DeleteLabel = null)
{
$uri = $this->getUri('/label', array());
return $this->delete($uri, $DeleteLabel);
} | [
"public",
"function",
"DeleteLabel",
"(",
"Request",
"\\",
"DeleteLabel",
"$",
"DeleteLabel",
"=",
"null",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/label'",
",",
"array",
"(",
")",
")",
";",
"return",
"$",
"this",
"->",
"delete",... | Removes a label from all labeled objects and deletes it
Delete label identified by name. All broadcasts and numbers currently containing
the label will have the label association removed.
@api
@param Request\DeleteLabel $DeleteLabel = null | [
"Removes",
"a",
"label",
"from",
"all",
"labeled",
"objects",
"and",
"deletes",
"it"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Label.php#L22-L27 |
226,346 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Label.php | Label.QueryLabels | public function QueryLabels(Request\QueryLabels $QueryLabels = null)
{
$uri = $this->getUri('/label', array());
return $this->get($uri, $QueryLabels);
} | php | public function QueryLabels(Request\QueryLabels $QueryLabels = null)
{
$uri = $this->getUri('/label', array());
return $this->get($uri, $QueryLabels);
} | [
"public",
"function",
"QueryLabels",
"(",
"Request",
"\\",
"QueryLabels",
"$",
"QueryLabels",
"=",
"null",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/label'",
",",
"array",
"(",
")",
")",
";",
"return",
"$",
"this",
"->",
"get",
... | Returns all defined labels
Return list of all defined label names. The labels may be associated with
broadcasts or numbers.
@api
@param Request\QueryLabels $QueryLabels = null | [
"Returns",
"all",
"defined",
"labels"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Label.php#L38-L43 |
226,347 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Label.php | Label.LabelBroadcast | public function LabelBroadcast($Id, Request\LabelBroadcast $LabelBroadcast)
{
$uri = $this->getUri('/label/broadcast/%s', array($Id));
return $this->post($uri, $LabelBroadcast);
} | php | public function LabelBroadcast($Id, Request\LabelBroadcast $LabelBroadcast)
{
$uri = $this->getUri('/label/broadcast/%s', array($Id));
return $this->post($uri, $LabelBroadcast);
} | [
"public",
"function",
"LabelBroadcast",
"(",
"$",
"Id",
",",
"Request",
"\\",
"LabelBroadcast",
"$",
"LabelBroadcast",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/label/broadcast/%s'",
",",
"array",
"(",
"$",
"Id",
")",
")",
";",
"ret... | Adds a label to a broadcast, creating the label if it doesn't already exist
Label broadcast (Voice, Text, or IVR) by specifying broadcastId and label name.
If label name doesn't currently exist on system it will be created and saved.
@api
@param int $Id Unique ID of resource
@param Requ... | [
"Adds",
"a",
"label",
"to",
"a",
"broadcast",
"creating",
"the",
"label",
"if",
"it",
"doesn",
"t",
"already",
"exist"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Label.php#L55-L60 |
226,348 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Label.php | Label.UnlabelBroadcast | public function UnlabelBroadcast($Id, Request\UnlabelBroadcast $UnlabelBroadcast)
{
$uri = $this->getUri('/label/broadcast/%s', array($Id));
return $this->delete($uri, $UnlabelBroadcast);
} | php | public function UnlabelBroadcast($Id, Request\UnlabelBroadcast $UnlabelBroadcast)
{
$uri = $this->getUri('/label/broadcast/%s', array($Id));
return $this->delete($uri, $UnlabelBroadcast);
} | [
"public",
"function",
"UnlabelBroadcast",
"(",
"$",
"Id",
",",
"Request",
"\\",
"UnlabelBroadcast",
"$",
"UnlabelBroadcast",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/label/broadcast/%s'",
",",
"array",
"(",
"$",
"Id",
")",
")",
";",
... | Removes a label from a single broadcast
Remove label from broadcast. This doesn't remove label from system, it just
removes association between broadcast and label.
@api
@param int $Id Unique ID of resource
@param Request\UnlabelBroadcast $UnlabelBroadcast | [
"Removes",
"a",
"label",
"from",
"a",
"single",
"broadcast"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Label.php#L72-L77 |
226,349 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Label.php | Label.LabelNumber | public function LabelNumber($Number, Request\LabelNumber $LabelNumber)
{
$uri = $this->getUri('/label/number/%s', array($Number));
return $this->post($uri, $LabelNumber);
} | php | public function LabelNumber($Number, Request\LabelNumber $LabelNumber)
{
$uri = $this->getUri('/label/number/%s', array($Number));
return $this->post($uri, $LabelNumber);
} | [
"public",
"function",
"LabelNumber",
"(",
"$",
"Number",
",",
"Request",
"\\",
"LabelNumber",
"$",
"LabelNumber",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/label/number/%s'",
",",
"array",
"(",
"$",
"Number",
")",
")",
";",
"return"... | Adds a label to a single number
Label number by specifying E.164 11 digit number identifier and label name. If
label name doesn't currently exist on system it will be created and saved.
@api
@param string $Number List of E.164 11 digit numbers space seperated and
optional fieldName
@param Request\LabelNumber $LabelNu... | [
"Adds",
"a",
"label",
"to",
"a",
"single",
"number"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Label.php#L90-L95 |
226,350 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Label.php | Label.UnlabelNumber | public function UnlabelNumber($Number, Request\UnlabelNumber $UnlabelNumber)
{
$uri = $this->getUri('/label/number/%s', array($Number));
return $this->delete($uri, $UnlabelNumber);
} | php | public function UnlabelNumber($Number, Request\UnlabelNumber $UnlabelNumber)
{
$uri = $this->getUri('/label/number/%s', array($Number));
return $this->delete($uri, $UnlabelNumber);
} | [
"public",
"function",
"UnlabelNumber",
"(",
"$",
"Number",
",",
"Request",
"\\",
"UnlabelNumber",
"$",
"UnlabelNumber",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/label/number/%s'",
",",
"array",
"(",
"$",
"Number",
")",
")",
";",
"r... | Removes a label from a single number
Remove label from number. This doesn't remove label from system, it just removes
association between number and label.
@api
@param string $Number List of E.164 11 digit numbers space seperated and
optional fieldName
@param Request\UnlabelNumber $UnlabelNumber | [
"Removes",
"a",
"label",
"from",
"a",
"single",
"number"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Label.php#L108-L113 |
226,351 | gjerokrsteski/pimf-framework | core/Pimf/Util/Message.php | Message.format | public function format()
{
if ($this->getMessage() == '' || !$this->getMessage()) {
return '';
}
if (count($this->bindings) > 0) {
foreach ($this->bindings as $token => $value) {
$this->message = str_replace($this->delimiter . $token, $value, $this->m... | php | public function format()
{
if ($this->getMessage() == '' || !$this->getMessage()) {
return '';
}
if (count($this->bindings) > 0) {
foreach ($this->bindings as $token => $value) {
$this->message = str_replace($this->delimiter . $token, $value, $this->m... | [
"public",
"function",
"format",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getMessage",
"(",
")",
"==",
"''",
"||",
"!",
"$",
"this",
"->",
"getMessage",
"(",
")",
")",
"{",
"return",
"''",
";",
"}",
"if",
"(",
"count",
"(",
"$",
"this",
"->... | Retuns formated message.
@return string | [
"Retuns",
"formated",
"message",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Util/Message.php#L126-L139 |
226,352 | eosnewmedia/JSON-API-Common | src/Model/Request/Request.php | Request.updateUriQuery | private function updateUriQuery(): void
{
$sort = [];
foreach ($this->order as $field => $direction) {
if ($direction === self::ORDER_ASC) {
$sort[] = $field;
} elseif ($direction === self::ORDER_DESC) {
$sort[] = '-' . $field;
}
... | php | private function updateUriQuery(): void
{
$sort = [];
foreach ($this->order as $field => $direction) {
if ($direction === self::ORDER_ASC) {
$sort[] = $field;
} elseif ($direction === self::ORDER_DESC) {
$sort[] = '-' . $field;
}
... | [
"private",
"function",
"updateUriQuery",
"(",
")",
":",
"void",
"{",
"$",
"sort",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"order",
"as",
"$",
"field",
"=>",
"$",
"direction",
")",
"{",
"if",
"(",
"$",
"direction",
"===",
"self",
"::"... | Updates the uri query | [
"Updates",
"the",
"uri",
"query"
] | d868eb4d76bf75518f1bb72a70e5abf78fcae476 | https://github.com/eosnewmedia/JSON-API-Common/blob/d868eb4d76bf75518f1bb72a70e5abf78fcae476/src/Model/Request/Request.php#L259-L284 |
226,353 | eosnewmedia/JSON-API-Common | src/Model/Request/Request.php | Request.requestField | public function requestField(string $type, string $name): void
{
$this->fields[$type][] = $name;
$this->updateUriQuery();
} | php | public function requestField(string $type, string $name): void
{
$this->fields[$type][] = $name;
$this->updateUriQuery();
} | [
"public",
"function",
"requestField",
"(",
"string",
"$",
"type",
",",
"string",
"$",
"name",
")",
":",
"void",
"{",
"$",
"this",
"->",
"fields",
"[",
"$",
"type",
"]",
"[",
"]",
"=",
"$",
"name",
";",
"$",
"this",
"->",
"updateUriQuery",
"(",
")",... | Define a field as requested. This method will manipulate the uri of the request.
@param string $type
@param string $name | [
"Define",
"a",
"field",
"as",
"requested",
".",
"This",
"method",
"will",
"manipulate",
"the",
"uri",
"of",
"the",
"request",
"."
] | d868eb4d76bf75518f1bb72a70e5abf78fcae476 | https://github.com/eosnewmedia/JSON-API-Common/blob/d868eb4d76bf75518f1bb72a70e5abf78fcae476/src/Model/Request/Request.php#L395-L399 |
226,354 | eosnewmedia/JSON-API-Common | src/Model/Request/Request.php | Request.requestInclude | public function requestInclude(string $relationship): void
{
$this->includes[] = $relationship;
$this->currentLevelIncludes[] = explode('.', $relationship)[0];
$this->updateUriQuery();
} | php | public function requestInclude(string $relationship): void
{
$this->includes[] = $relationship;
$this->currentLevelIncludes[] = explode('.', $relationship)[0];
$this->updateUriQuery();
} | [
"public",
"function",
"requestInclude",
"(",
"string",
"$",
"relationship",
")",
":",
"void",
"{",
"$",
"this",
"->",
"includes",
"[",
"]",
"=",
"$",
"relationship",
";",
"$",
"this",
"->",
"currentLevelIncludes",
"[",
"]",
"=",
"explode",
"(",
"'.'",
",... | Define a relationship as included. This method will manipulate the uri of the request.
@param string $relationship | [
"Define",
"a",
"relationship",
"as",
"included",
".",
"This",
"method",
"will",
"manipulate",
"the",
"uri",
"of",
"the",
"request",
"."
] | d868eb4d76bf75518f1bb72a70e5abf78fcae476 | https://github.com/eosnewmedia/JSON-API-Common/blob/d868eb4d76bf75518f1bb72a70e5abf78fcae476/src/Model/Request/Request.php#L419-L424 |
226,355 | eosnewmedia/JSON-API-Common | src/Model/Request/Request.php | Request.addFilter | public function addFilter(string $name, $value): void
{
$this->filter[$name] = $value;
$this->updateUriQuery();
} | php | public function addFilter(string $name, $value): void
{
$this->filter[$name] = $value;
$this->updateUriQuery();
} | [
"public",
"function",
"addFilter",
"(",
"string",
"$",
"name",
",",
"$",
"value",
")",
":",
"void",
"{",
"$",
"this",
"->",
"filter",
"[",
"$",
"name",
"]",
"=",
"$",
"value",
";",
"$",
"this",
"->",
"updateUriQuery",
"(",
")",
";",
"}"
] | Define a filter value. This method will manipulate the uri of the request.
@param string $name
@param array|string|int|float $value
@return void | [
"Define",
"a",
"filter",
"value",
".",
"This",
"method",
"will",
"manipulate",
"the",
"uri",
"of",
"the",
"request",
"."
] | d868eb4d76bf75518f1bb72a70e5abf78fcae476 | https://github.com/eosnewmedia/JSON-API-Common/blob/d868eb4d76bf75518f1bb72a70e5abf78fcae476/src/Model/Request/Request.php#L445-L449 |
226,356 | eosnewmedia/JSON-API-Common | src/Model/Request/Request.php | Request.addOrderBy | public function addOrderBy(string $name, string $direction = self::ORDER_ASC): void
{
$this->order[$name] = $direction;
$this->updateUriQuery();
} | php | public function addOrderBy(string $name, string $direction = self::ORDER_ASC): void
{
$this->order[$name] = $direction;
$this->updateUriQuery();
} | [
"public",
"function",
"addOrderBy",
"(",
"string",
"$",
"name",
",",
"string",
"$",
"direction",
"=",
"self",
"::",
"ORDER_ASC",
")",
":",
"void",
"{",
"$",
"this",
"->",
"order",
"[",
"$",
"name",
"]",
"=",
"$",
"direction",
";",
"$",
"this",
"->",
... | Define a sort parameter. This method will manipulate the uri of the request.
@param string $name
@param string $direction | [
"Define",
"a",
"sort",
"parameter",
".",
"This",
"method",
"will",
"manipulate",
"the",
"uri",
"of",
"the",
"request",
"."
] | d868eb4d76bf75518f1bb72a70e5abf78fcae476 | https://github.com/eosnewmedia/JSON-API-Common/blob/d868eb4d76bf75518f1bb72a70e5abf78fcae476/src/Model/Request/Request.php#L479-L483 |
226,357 | eosnewmedia/JSON-API-Common | src/Model/Request/Request.php | Request.addPagination | public function addPagination(string $key, $value): void
{
$this->pagination[$key] = $value;
$this->updateUriQuery();
} | php | public function addPagination(string $key, $value): void
{
$this->pagination[$key] = $value;
$this->updateUriQuery();
} | [
"public",
"function",
"addPagination",
"(",
"string",
"$",
"key",
",",
"$",
"value",
")",
":",
"void",
"{",
"$",
"this",
"->",
"pagination",
"[",
"$",
"key",
"]",
"=",
"$",
"value",
";",
"$",
"this",
"->",
"updateUriQuery",
"(",
")",
";",
"}"
] | Define a pagination parameter. This method will manipulate the uri of the request.
@param string $key
@param array|string|int|float $value | [
"Define",
"a",
"pagination",
"parameter",
".",
"This",
"method",
"will",
"manipulate",
"the",
"uri",
"of",
"the",
"request",
"."
] | d868eb4d76bf75518f1bb72a70e5abf78fcae476 | https://github.com/eosnewmedia/JSON-API-Common/blob/d868eb4d76bf75518f1bb72a70e5abf78fcae476/src/Model/Request/Request.php#L499-L503 |
226,358 | eosnewmedia/JSON-API-Common | src/Model/Request/Request.php | Request.createSubRequest | public function createSubRequest(
string $relationship,
?ResourceInterface $resource = null,
bool $keepFilters = false
): RequestInterface {
$requestKey = $relationship . ($keepFilters ? '-filtered' : '-not-filtered');
if (!\array_key_exists($requestKey, $this->subRequests)) ... | php | public function createSubRequest(
string $relationship,
?ResourceInterface $resource = null,
bool $keepFilters = false
): RequestInterface {
$requestKey = $relationship . ($keepFilters ? '-filtered' : '-not-filtered');
if (!\array_key_exists($requestKey, $this->subRequests)) ... | [
"public",
"function",
"createSubRequest",
"(",
"string",
"$",
"relationship",
",",
"?",
"ResourceInterface",
"$",
"resource",
"=",
"null",
",",
"bool",
"$",
"keepFilters",
"=",
"false",
")",
":",
"RequestInterface",
"{",
"$",
"requestKey",
"=",
"$",
"relations... | Creates a request for the given relationship.
If called twice, the call will return the already created sub request.
A sub request does not contain pagination and sorting from its parent.
@param string $relationship
@param ResourceInterface|null $resource
@param bool $keepFilters
@return RequestInterface
@throws BadRe... | [
"Creates",
"a",
"request",
"for",
"the",
"given",
"relationship",
".",
"If",
"called",
"twice",
"the",
"call",
"will",
"return",
"the",
"already",
"created",
"sub",
"request",
".",
"A",
"sub",
"request",
"does",
"not",
"contain",
"pagination",
"and",
"sortin... | d868eb4d76bf75518f1bb72a70e5abf78fcae476 | https://github.com/eosnewmedia/JSON-API-Common/blob/d868eb4d76bf75518f1bb72a70e5abf78fcae476/src/Model/Request/Request.php#L542-L588 |
226,359 | progsmile/request-validator | src/Helpers/PdoTrait.php | PdoTrait.setupPDO | public static function setupPDO($connectionString, $user, $password)
{
try {
self::$pdoInstance = new PDO($connectionString, $user, $password);
} catch (PDOException $e) {
trigger_error($e->getMessage(), E_USER_ERROR);
}
} | php | public static function setupPDO($connectionString, $user, $password)
{
try {
self::$pdoInstance = new PDO($connectionString, $user, $password);
} catch (PDOException $e) {
trigger_error($e->getMessage(), E_USER_ERROR);
}
} | [
"public",
"static",
"function",
"setupPDO",
"(",
"$",
"connectionString",
",",
"$",
"user",
",",
"$",
"password",
")",
"{",
"try",
"{",
"self",
"::",
"$",
"pdoInstance",
"=",
"new",
"PDO",
"(",
"$",
"connectionString",
",",
"$",
"user",
",",
"$",
"pass... | Initialize PDO connection.
@param string $connectionString - ex. (mysql:host=localhost;dbname=test)
@param string $user - db username
@param string $password - db password | [
"Initialize",
"PDO",
"connection",
"."
] | f211abd1a8e7c67030401f8c4896d926da7dafef | https://github.com/progsmile/request-validator/blob/f211abd1a8e7c67030401f8c4896d926da7dafef/src/Helpers/PdoTrait.php#L20-L27 |
226,360 | gjerokrsteski/pimf-framework | core/Pimf/Cache.php | Cache.storage | public static function storage($storage = null)
{
if ($storage === null) {
$storage = Config::get('cache.storage') ?: 'memory';
}
if (!isset(static::$storages[$storage])) {
static::$storages[$storage] = static::factory($storage);
}
return static::$st... | php | public static function storage($storage = null)
{
if ($storage === null) {
$storage = Config::get('cache.storage') ?: 'memory';
}
if (!isset(static::$storages[$storage])) {
static::$storages[$storage] = static::factory($storage);
}
return static::$st... | [
"public",
"static",
"function",
"storage",
"(",
"$",
"storage",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"storage",
"===",
"null",
")",
"{",
"$",
"storage",
"=",
"Config",
"::",
"get",
"(",
"'cache.storage'",
")",
"?",
":",
"'memory'",
";",
"}",
"if",
... | Get a cache storage instance.
@param string $storage
@return CS\Apc|CS\Dba|CS\File|CS\Memcached|CS\Memory|CS\Pdo|CS\Redis|CS\WinCache | [
"Get",
"a",
"cache",
"storage",
"instance",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Cache.php#L49-L60 |
226,361 | gjerokrsteski/pimf-framework | core/Pimf/Cache.php | Cache.factory | protected static function factory($storage)
{
$cache = Config::get('cache');
switch ($storage) {
case 'apc':
return new CS\Apc($cache['key']);
case 'file':
return new CS\File($cache['storage_path']);
case 'pdo':
r... | php | protected static function factory($storage)
{
$cache = Config::get('cache');
switch ($storage) {
case 'apc':
return new CS\Apc($cache['key']);
case 'file':
return new CS\File($cache['storage_path']);
case 'pdo':
r... | [
"protected",
"static",
"function",
"factory",
"(",
"$",
"storage",
")",
"{",
"$",
"cache",
"=",
"Config",
"::",
"get",
"(",
"'cache'",
")",
";",
"switch",
"(",
"$",
"storage",
")",
"{",
"case",
"'apc'",
":",
"return",
"new",
"CS",
"\\",
"Apc",
"(",
... | Create a new cache storage instance.
@param string $storage
@return CS\Apc|CS\Dba|CS\File|CS\Memcached|CS\Memory|CS\Pdo|CS\Redis|CS\WinCache
@throws \RuntimeException | [
"Create",
"a",
"new",
"cache",
"storage",
"instance",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Cache.php#L70-L102 |
226,362 | jagilpe/encryption-bundle | Metadata/ClassMetadataFactory.php | ClassMetadataFactory.getClassMetadata | private function getClassMetadata(\ReflectionClass $reflectionClass)
{
/** @var ClassMetadata $classMetadata */
$classMetadata = $this->getMetadataDriver()->loadMetadataForClass($reflectionClass);
if (null === $classMetadata->encryptionMode) {
$classMetadata->encryptionMode = $th... | php | private function getClassMetadata(\ReflectionClass $reflectionClass)
{
/** @var ClassMetadata $classMetadata */
$classMetadata = $this->getMetadataDriver()->loadMetadataForClass($reflectionClass);
if (null === $classMetadata->encryptionMode) {
$classMetadata->encryptionMode = $th... | [
"private",
"function",
"getClassMetadata",
"(",
"\\",
"ReflectionClass",
"$",
"reflectionClass",
")",
"{",
"/** @var ClassMetadata $classMetadata */",
"$",
"classMetadata",
"=",
"$",
"this",
"->",
"getMetadataDriver",
"(",
")",
"->",
"loadMetadataForClass",
"(",
"$",
... | Returns the metadata for a given class
@param \ReflectionClass $reflectionClass
@return ClassMetadata | [
"Returns",
"the",
"metadata",
"for",
"a",
"given",
"class"
] | 1e1ba13a3cc646b36e3407822f2e8339c5671f47 | https://github.com/jagilpe/encryption-bundle/blob/1e1ba13a3cc646b36e3407822f2e8339c5671f47/Metadata/ClassMetadataFactory.php#L140-L148 |
226,363 | jagilpe/encryption-bundle | Metadata/ClassMetadataFactory.php | ClassMetadataFactory.getMetadataDirs | private function getMetadataDirs()
{
if (null === $this->metadataDirs) {
$this->metadataDirs = array();
$bundles = $this->kernel->getBundles();
$fs = new Filesystem();
/**
* @var string $bundleName
* @var BundleInterface $bundle
... | php | private function getMetadataDirs()
{
if (null === $this->metadataDirs) {
$this->metadataDirs = array();
$bundles = $this->kernel->getBundles();
$fs = new Filesystem();
/**
* @var string $bundleName
* @var BundleInterface $bundle
... | [
"private",
"function",
"getMetadataDirs",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"metadataDirs",
")",
"{",
"$",
"this",
"->",
"metadataDirs",
"=",
"array",
"(",
")",
";",
"$",
"bundles",
"=",
"$",
"this",
"->",
"kernel",
"->",
"g... | Returns the directories in which to look for the encryption metadata
@return array | [
"Returns",
"the",
"directories",
"in",
"which",
"to",
"look",
"for",
"the",
"encryption",
"metadata"
] | 1e1ba13a3cc646b36e3407822f2e8339c5671f47 | https://github.com/jagilpe/encryption-bundle/blob/1e1ba13a3cc646b36e3407822f2e8339c5671f47/Metadata/ClassMetadataFactory.php#L155-L177 |
226,364 | jagilpe/encryption-bundle | Metadata/ClassMetadataFactory.php | ClassMetadataFactory.getMetadataDriver | private function getMetadataDriver()
{
if (null === $this->driver) {
$metadataDirs = $this->getMetadataDirs();
$annotationDriver = new AnnotationDriver($this->reader);
if (!empty($metadataDirs)) {
$fileLocator = new FileLocator($metadataDirs);
... | php | private function getMetadataDriver()
{
if (null === $this->driver) {
$metadataDirs = $this->getMetadataDirs();
$annotationDriver = new AnnotationDriver($this->reader);
if (!empty($metadataDirs)) {
$fileLocator = new FileLocator($metadataDirs);
... | [
"private",
"function",
"getMetadataDriver",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"driver",
")",
"{",
"$",
"metadataDirs",
"=",
"$",
"this",
"->",
"getMetadataDirs",
"(",
")",
";",
"$",
"annotationDriver",
"=",
"new",
"AnnotationDrive... | Returns the metadata driver
@return DriverInterface | [
"Returns",
"the",
"metadata",
"driver"
] | 1e1ba13a3cc646b36e3407822f2e8339c5671f47 | https://github.com/jagilpe/encryption-bundle/blob/1e1ba13a3cc646b36e3407822f2e8339c5671f47/Metadata/ClassMetadataFactory.php#L184-L206 |
226,365 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Broadcast.php | Broadcast.CreateBroadcast | public function CreateBroadcast(Request\CreateBroadcast $CreateBroadcast = null)
{
$uri = $this->getUri('/broadcast', array());
return $this->post($uri, $CreateBroadcast);
} | php | public function CreateBroadcast(Request\CreateBroadcast $CreateBroadcast = null)
{
$uri = $this->getUri('/broadcast', array());
return $this->post($uri, $CreateBroadcast);
} | [
"public",
"function",
"CreateBroadcast",
"(",
"Request",
"\\",
"CreateBroadcast",
"$",
"CreateBroadcast",
"=",
"null",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/broadcast'",
",",
"array",
"(",
")",
")",
";",
"return",
"$",
"this",
"... | Creates a new Broadcast
This operation creates a Broadcast campaign and returns a broadcastId. To see
the status of this campaign call GetBroadcast with the returned broadcastId.
There are 3 types of Broadcast: TEXT, IVR, or VOICE. Select the appropriate
config to match the broadcast type, TextBroadcastConfig, IvrBroa... | [
"Creates",
"a",
"new",
"Broadcast"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Broadcast.php#L27-L32 |
226,366 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Broadcast.php | Broadcast.QueryBroadcasts | public function QueryBroadcasts(Request\QueryBroadcasts $QueryBroadcasts = null)
{
$uri = $this->getUri('/broadcast', array());
return $this->get($uri, $QueryBroadcasts);
} | php | public function QueryBroadcasts(Request\QueryBroadcasts $QueryBroadcasts = null)
{
$uri = $this->getUri('/broadcast', array());
return $this->get($uri, $QueryBroadcasts);
} | [
"public",
"function",
"QueryBroadcasts",
"(",
"Request",
"\\",
"QueryBroadcasts",
"$",
"QueryBroadcasts",
"=",
"null",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/broadcast'",
",",
"array",
"(",
")",
")",
";",
"return",
"$",
"this",
"... | Lists existing Broadcasts
Use this operation to see the status of Broadcasts in account. Filter by type of
campaign whether currently running. Returns a list of Broadcast info such as
campaign name, type, status, ect...
@api
@param Request\QueryBroadcasts $QueryBroadcasts = null | [
"Lists",
"existing",
"Broadcasts"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Broadcast.php#L44-L49 |
226,367 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Broadcast.php | Broadcast.GetBroadcastStats | public function GetBroadcastStats($Id, Request\GetBroadcastStats $GetBroadcastStats)
{
$uri = $this->getUri('/broadcast/%s/stats', array($Id));
return $this->get($uri, $GetBroadcastStats);
} | php | public function GetBroadcastStats($Id, Request\GetBroadcastStats $GetBroadcastStats)
{
$uri = $this->getUri('/broadcast/%s/stats', array($Id));
return $this->get($uri, $GetBroadcastStats);
} | [
"public",
"function",
"GetBroadcastStats",
"(",
"$",
"Id",
",",
"Request",
"\\",
"GetBroadcastStats",
"$",
"GetBroadcastStats",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/broadcast/%s/stats'",
",",
"array",
"(",
"$",
"Id",
")",
")",
";... | Gets performance and result statistics for a Broadcast
Get broadcast stats by broadcastId or by interval range. Stats include
information like billed amount, billed duration, actions count, attempt count,
etc...
@api
@param int $Id Unique ID of resource
@param Request\GetBroadcast... | [
"Gets",
"performance",
"and",
"result",
"statistics",
"for",
"a",
"Broadcast"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Broadcast.php#L79-L84 |
226,368 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Broadcast.php | Broadcast.ControlBroadcast | public function ControlBroadcast($Id, Request\ControlBroadcast $ControlBroadcast)
{
$uri = $this->getUri('/broadcast/%s/control', array($Id));
return $this->put($uri, $ControlBroadcast);
} | php | public function ControlBroadcast($Id, Request\ControlBroadcast $ControlBroadcast)
{
$uri = $this->getUri('/broadcast/%s/control', array($Id));
return $this->put($uri, $ControlBroadcast);
} | [
"public",
"function",
"ControlBroadcast",
"(",
"$",
"Id",
",",
"Request",
"\\",
"ControlBroadcast",
"$",
"ControlBroadcast",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/broadcast/%s/control'",
",",
"array",
"(",
"$",
"Id",
")",
")",
";"... | Starts, Stops or Archives a Broadcast
Apply command START, STOP, or ARCHIVE to Broadcast. Also can change the max
active count of Broadcast.
@api
@param int $Id Unique ID of resource
@param Request\ControlBroadcast $ControlBroadcast | [
"Starts",
"Stops",
"or",
"Archives",
"a",
"Broadcast"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Broadcast.php#L96-L101 |
226,369 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Broadcast.php | Broadcast.CreateContactBatch | public function CreateContactBatch($BroadcastId, Request\CreateContactBatch $CreateContactBatch)
{
$uri = $this->getUri('/broadcast/%s/batch', array($BroadcastId));
return $this->post($uri, $CreateContactBatch);
} | php | public function CreateContactBatch($BroadcastId, Request\CreateContactBatch $CreateContactBatch)
{
$uri = $this->getUri('/broadcast/%s/batch', array($BroadcastId));
return $this->post($uri, $CreateContactBatch);
} | [
"public",
"function",
"CreateContactBatch",
"(",
"$",
"BroadcastId",
",",
"Request",
"\\",
"CreateContactBatch",
"$",
"CreateContactBatch",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/broadcast/%s/batch'",
",",
"array",
"(",
"$",
"BroadcastId... | Creates a new ContactBatch
Contact Batch is a list of contacts to associate with a broadcast. Use this
operation to attach a list of contacts to an existing Campaign. A list of
ToNumbers or an existing Contact List ID is required to create and attach the
Contact List. Returned is the unique contactListId that can be u... | [
"Creates",
"a",
"new",
"ContactBatch"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Broadcast.php#L116-L121 |
226,370 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Broadcast.php | Broadcast.QueryContactBatches | public function QueryContactBatches($BroadcastId, Request\QueryContactBatches $QueryContactBatches)
{
$uri = $this->getUri('/broadcast/%s/batch', array($BroadcastId));
return $this->get($uri, $QueryContactBatches);
} | php | public function QueryContactBatches($BroadcastId, Request\QueryContactBatches $QueryContactBatches)
{
$uri = $this->getUri('/broadcast/%s/batch', array($BroadcastId));
return $this->get($uri, $QueryContactBatches);
} | [
"public",
"function",
"QueryContactBatches",
"(",
"$",
"BroadcastId",
",",
"Request",
"\\",
"QueryContactBatches",
"$",
"QueryContactBatches",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/broadcast/%s/batch'",
",",
"array",
"(",
"$",
"Broadcas... | Lists a Broadcast's ContactBatch
Return list of Contact Batches associated with this Broadcast. The
contactBatchIds returned from this campaign can then be used to enable, disable,
or delete the individual Batches.
@api
@param int $BroadcastId Unique ID of Broadcast
@param Request\Quer... | [
"Lists",
"a",
"Broadcast",
"s",
"ContactBatch"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Broadcast.php#L134-L139 |
226,371 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Broadcast.php | Broadcast.ControlContactBatch | public function ControlContactBatch($Id, Request\ControlContactBatch $ControlContactBatch)
{
$uri = $this->getUri('/broadcast/batch/%s/control', array($Id));
return $this->put($uri, $ControlContactBatch);
} | php | public function ControlContactBatch($Id, Request\ControlContactBatch $ControlContactBatch)
{
$uri = $this->getUri('/broadcast/batch/%s/control', array($Id));
return $this->put($uri, $ControlContactBatch);
} | [
"public",
"function",
"ControlContactBatch",
"(",
"$",
"Id",
",",
"Request",
"\\",
"ControlContactBatch",
"$",
"ControlContactBatch",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/broadcast/batch/%s/control'",
",",
"array",
"(",
"$",
"Id",
")... | Enables or Disables a Broadcast's ContactBatch
This operation provides the ability to enable or disable on a Broadcast the list
of contacts associated with a ContactBatch.
@api
@param int $Id Unique ID of resource
@param Request\ControlContactBatch $ControlContactBatch | [
"Enables",
"or",
"Disables",
"a",
"Broadcast",
"s",
"ContactBatch"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Broadcast.php#L167-L172 |
226,372 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Broadcast.php | Broadcast.CreateBroadcastSchedule | public function CreateBroadcastSchedule($BroadcastId, Request\CreateBroadcastSchedule $CreateBroadcastSchedule)
{
$uri = $this->getUri('/broadcast/%s/schedule', array($BroadcastId));
return $this->post($uri, $CreateBroadcastSchedule);
} | php | public function CreateBroadcastSchedule($BroadcastId, Request\CreateBroadcastSchedule $CreateBroadcastSchedule)
{
$uri = $this->getUri('/broadcast/%s/schedule', array($BroadcastId));
return $this->post($uri, $CreateBroadcastSchedule);
} | [
"public",
"function",
"CreateBroadcastSchedule",
"(",
"$",
"BroadcastId",
",",
"Request",
"\\",
"CreateBroadcastSchedule",
"$",
"CreateBroadcastSchedule",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/broadcast/%s/schedule'",
",",
"array",
"(",
"... | Creates a new Schedule for a Broadcast
Broadcast can be set to run at scheduled times a prescribed by
BroadcastSchedule. Can pick start time, stop time, begin date, and day of week.
Returns broadcastScheduleId that can be used in GetBroadcastSchedule and
DeleteBroadcastSchedule
@api
@param int ... | [
"Creates",
"a",
"new",
"Schedule",
"for",
"a",
"Broadcast"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Broadcast.php#L186-L191 |
226,373 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Broadcast.php | Broadcast.QueryBroadcastSchedule | public function QueryBroadcastSchedule($BroadcastId, Request\QueryBroadcastSchedule $QueryBroadcastSchedule)
{
$uri = $this->getUri('/broadcast/%s/schedule', array($BroadcastId));
return $this->get($uri, $QueryBroadcastSchedule);
} | php | public function QueryBroadcastSchedule($BroadcastId, Request\QueryBroadcastSchedule $QueryBroadcastSchedule)
{
$uri = $this->getUri('/broadcast/%s/schedule', array($BroadcastId));
return $this->get($uri, $QueryBroadcastSchedule);
} | [
"public",
"function",
"QueryBroadcastSchedule",
"(",
"$",
"BroadcastId",
",",
"Request",
"\\",
"QueryBroadcastSchedule",
"$",
"QueryBroadcastSchedule",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/broadcast/%s/schedule'",
",",
"array",
"(",
"$",... | Lists existing BroadcastSchedules
List information about Broadcast Schedules attached to a Broadcast.
@api
@param int $BroadcastId Unique ID of Broadcast
@param Request\QueryBroadcastSchedule $QueryBroadcastSchedule | [
"Lists",
"existing",
"BroadcastSchedules"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Broadcast.php#L202-L207 |
226,374 | CallFire/CallFire-PHP-SDK | src/CallFire/Api/Rest/Client/Broadcast.php | Broadcast.UpdateBroadcast | public function UpdateBroadcast($id, Request\UpdateBroadcast $UpdateBroadcast = null)
{
$uri = $this->getUri('/broadcast/%s', array($id));
return $this->put($uri, $UpdateBroadcast);
} | php | public function UpdateBroadcast($id, Request\UpdateBroadcast $UpdateBroadcast = null)
{
$uri = $this->getUri('/broadcast/%s', array($id));
return $this->put($uri, $UpdateBroadcast);
} | [
"public",
"function",
"UpdateBroadcast",
"(",
"$",
"id",
",",
"Request",
"\\",
"UpdateBroadcast",
"$",
"UpdateBroadcast",
"=",
"null",
")",
"{",
"$",
"uri",
"=",
"$",
"this",
"->",
"getUri",
"(",
"'/broadcast/%s'",
",",
"array",
"(",
"$",
"id",
")",
")",... | Updates an existing Broadcast's configuration
Update existing broadcast's configuration such as time zone restrictions or
retry logic. Currently all fields from config are updated so the 'Message' field
needs to be populated just like in CreateBroadcast operation. Use unique ID to
specify broadcast. Need to provide d... | [
"Updates",
"an",
"existing",
"Broadcast",
"s",
"configuration"
] | 7d6d3e1c59d4116e4fadaf57851a2fa127a13f65 | https://github.com/CallFire/CallFire-PHP-SDK/blob/7d6d3e1c59d4116e4fadaf57851a2fa127a13f65/src/CallFire/Api/Rest/Client/Broadcast.php#L254-L259 |
226,375 | gjerokrsteski/pimf-framework | core/Pimf/Util/Character.php | Character.checkUtf8Encoding | public static function checkUtf8Encoding($string)
{
if (!mb_check_encoding($string, 'UTF-8') ||
!$string == mb_convert_encoding(mb_convert_encoding($string, 'UTF-32', 'UTF-8'), 'UTF-8', 'UTF-32')
) {
return false;
}
return true;
} | php | public static function checkUtf8Encoding($string)
{
if (!mb_check_encoding($string, 'UTF-8') ||
!$string == mb_convert_encoding(mb_convert_encoding($string, 'UTF-32', 'UTF-8'), 'UTF-8', 'UTF-32')
) {
return false;
}
return true;
} | [
"public",
"static",
"function",
"checkUtf8Encoding",
"(",
"$",
"string",
")",
"{",
"if",
"(",
"!",
"mb_check_encoding",
"(",
"$",
"string",
",",
"'UTF-8'",
")",
"||",
"!",
"$",
"string",
"==",
"mb_convert_encoding",
"(",
"mb_convert_encoding",
"(",
"$",
"str... | Check for invalid UTF8 encoding and invalid byte .
@param string $string Your string.
@return boolean | [
"Check",
"for",
"invalid",
"UTF8",
"encoding",
"and",
"invalid",
"byte",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Util/Character.php#L38-L47 |
226,376 | gjerokrsteski/pimf-framework | core/Pimf/Util/Character.php | Character.ensureTrailing | public static function ensureTrailing($needle, $haystack)
{
$needleLength = strlen($needle);
$needlePart = substr($haystack, -1 * $needleLength);
if ($needlePart !== $needle) {
// append missing trailing character.
$haystack .= $needle;
}
return $hay... | php | public static function ensureTrailing($needle, $haystack)
{
$needleLength = strlen($needle);
$needlePart = substr($haystack, -1 * $needleLength);
if ($needlePart !== $needle) {
// append missing trailing character.
$haystack .= $needle;
}
return $hay... | [
"public",
"static",
"function",
"ensureTrailing",
"(",
"$",
"needle",
",",
"$",
"haystack",
")",
"{",
"$",
"needleLength",
"=",
"strlen",
"(",
"$",
"needle",
")",
";",
"$",
"needlePart",
"=",
"substr",
"(",
"$",
"haystack",
",",
"-",
"1",
"*",
"$",
"... | Ensure that a string is ends with a special string.
<code>
- ensureTrailing('/', 'http://www.example.com') -> 'http://www.example.com/'
- ensureTrailing('/', 'http://www.example.com/') -> 'http://www.example.com/'
</code>
@param string $needle The needle.
@param string $haystack The haystack.
@return string | [
"Ensure",
"that",
"a",
"string",
"is",
"ends",
"with",
"a",
"special",
"string",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Util/Character.php#L62-L73 |
226,377 | gjerokrsteski/pimf-framework | core/Pimf/Util/Character.php | Character.ensureLeading | public static function ensureLeading($needle, $haystack)
{
$needleLength = strlen($needle);
$needlePart = substr($haystack, 0, $needleLength);
if ($needlePart !== $needle) {
// append missing trailing string
$haystack = $needle . $haystack;
}
return ... | php | public static function ensureLeading($needle, $haystack)
{
$needleLength = strlen($needle);
$needlePart = substr($haystack, 0, $needleLength);
if ($needlePart !== $needle) {
// append missing trailing string
$haystack = $needle . $haystack;
}
return ... | [
"public",
"static",
"function",
"ensureLeading",
"(",
"$",
"needle",
",",
"$",
"haystack",
")",
"{",
"$",
"needleLength",
"=",
"strlen",
"(",
"$",
"needle",
")",
";",
"$",
"needlePart",
"=",
"substr",
"(",
"$",
"haystack",
",",
"0",
",",
"$",
"needleLe... | Ensure that a string is starts with a special string.
<code>
- ensureLeading('#', '1#2#3#4#5') -> '#1#2#3#4#5'
- ensureLeading('#', '#1#2#3#4#5') -> '#1#2#3#4#5'
</code>
@param string $needle The needle.
@param string $haystack The haystack
@return string | [
"Ensure",
"that",
"a",
"string",
"is",
"starts",
"with",
"a",
"special",
"string",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Util/Character.php#L88-L99 |
226,378 | gjerokrsteski/pimf-framework | core/Pimf/Util/Character.php | Character.deleteTrailing | public static function deleteTrailing($needle, $haystack)
{
$pattern = '#(' . self::pregQuote($needle, '#') . ')+$#';
$result = preg_replace($pattern, '', $haystack);
return $result;
} | php | public static function deleteTrailing($needle, $haystack)
{
$pattern = '#(' . self::pregQuote($needle, '#') . ')+$#';
$result = preg_replace($pattern, '', $haystack);
return $result;
} | [
"public",
"static",
"function",
"deleteTrailing",
"(",
"$",
"needle",
",",
"$",
"haystack",
")",
"{",
"$",
"pattern",
"=",
"'#('",
".",
"self",
"::",
"pregQuote",
"(",
"$",
"needle",
",",
"'#'",
")",
".",
"')+$#'",
";",
"$",
"result",
"=",
"preg_replac... | Delete trailing characters.
<code>
- deleteTrailing('|', '|1|2|3|4|5|') -> '|1|2|3|4|5'
- deleteTrailing(array('|','5'), '|1|2|3|4|5|555') -> '|1|2|3|4'
</code>
@param string|array $needle The needle.
@param string $haystack The haystack.
@return string | [
"Delete",
"trailing",
"characters",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Util/Character.php#L114-L120 |
226,379 | gjerokrsteski/pimf-framework | core/Pimf/Util/Character.php | Character.deleteLeading | public static function deleteLeading($needle, $haystack)
{
$pattern = '#^(' . self::pregQuote($needle, '#') . ')+#';
$result = preg_replace($pattern, '', $haystack);
return $result;
} | php | public static function deleteLeading($needle, $haystack)
{
$pattern = '#^(' . self::pregQuote($needle, '#') . ')+#';
$result = preg_replace($pattern, '', $haystack);
return $result;
} | [
"public",
"static",
"function",
"deleteLeading",
"(",
"$",
"needle",
",",
"$",
"haystack",
")",
"{",
"$",
"pattern",
"=",
"'#^('",
".",
"self",
"::",
"pregQuote",
"(",
"$",
"needle",
",",
"'#'",
")",
".",
"')+#'",
";",
"$",
"result",
"=",
"preg_replace... | Delete leading characters.
<code>
- deleteTrailing('#', '#1#2#3#4#5') -> '1#2#3#4#5'
- deleteTrailing(array('#', '1'), '##11#2#3#4#5') -> '2#3#4#5'
</code>
@param string|array $needle The needle.
@param string $haystack The haystack.
@return string | [
"Delete",
"leading",
"characters",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Util/Character.php#L135-L141 |
226,380 | gjerokrsteski/pimf-framework | core/Pimf/Util/Character.php | Character.pregQuote | public static function pregQuote($values, $delimiter = null)
{
if (!is_array($values)) {
return preg_quote($values, $delimiter);
}
// Case: needle is array
foreach ($values as $key => $value) {
$values[$key] = preg_quote($value, $delimiter);
}
... | php | public static function pregQuote($values, $delimiter = null)
{
if (!is_array($values)) {
return preg_quote($values, $delimiter);
}
// Case: needle is array
foreach ($values as $key => $value) {
$values[$key] = preg_quote($value, $delimiter);
}
... | [
"public",
"static",
"function",
"pregQuote",
"(",
"$",
"values",
",",
"$",
"delimiter",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"values",
")",
")",
"{",
"return",
"preg_quote",
"(",
"$",
"values",
",",
"$",
"delimiter",
")",
";",... | Wrapper for preg_quote supporting strings and array of strings.
@param mixed $values The values.
@param null|string $delimiter (Optional) The delimiter.
@return string | [
"Wrapper",
"for",
"preg_quote",
"supporting",
"strings",
"and",
"array",
"of",
"strings",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Util/Character.php#L151-L163 |
226,381 | gjerokrsteski/pimf-framework | core/Pimf/Util/Character.php | Character.contains | public static function contains($haystack, $needle)
{
foreach ((array)$needle as $n) {
if (strpos($haystack, $n) !== false) {
return true;
}
}
return false;
} | php | public static function contains($haystack, $needle)
{
foreach ((array)$needle as $n) {
if (strpos($haystack, $n) !== false) {
return true;
}
}
return false;
} | [
"public",
"static",
"function",
"contains",
"(",
"$",
"haystack",
",",
"$",
"needle",
")",
"{",
"foreach",
"(",
"(",
"array",
")",
"$",
"needle",
"as",
"$",
"n",
")",
"{",
"if",
"(",
"strpos",
"(",
"$",
"haystack",
",",
"$",
"n",
")",
"!==",
"fal... | Determine if a given string contains a given sub-string.
@param string $haystack
@param string|array $needle
@return bool | [
"Determine",
"if",
"a",
"given",
"string",
"contains",
"a",
"given",
"sub",
"-",
"string",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Util/Character.php#L211-L220 |
226,382 | gjerokrsteski/pimf-framework | core/Pimf/Util/Character.php | Character.endsWith | public static function endsWith($haystack, $needle)
{
return $needle == substr($haystack, strlen($haystack) - strlen($needle));
} | php | public static function endsWith($haystack, $needle)
{
return $needle == substr($haystack, strlen($haystack) - strlen($needle));
} | [
"public",
"static",
"function",
"endsWith",
"(",
"$",
"haystack",
",",
"$",
"needle",
")",
"{",
"return",
"$",
"needle",
"==",
"substr",
"(",
"$",
"haystack",
",",
"strlen",
"(",
"$",
"haystack",
")",
"-",
"strlen",
"(",
"$",
"needle",
")",
")",
";",... | Determine if a given string ends with a given value.
@param string $haystack
@param string|array $needle
@return bool | [
"Determine",
"if",
"a",
"given",
"string",
"ends",
"with",
"a",
"given",
"value",
"."
] | 859aa7c8bb727b556c5e32224842af3cff33f18b | https://github.com/gjerokrsteski/pimf-framework/blob/859aa7c8bb727b556c5e32224842af3cff33f18b/core/Pimf/Util/Character.php#L243-L246 |
226,383 | crip-laravel/filesys | src/Services/ThumbService.php | ThumbService.resize | public function resize($pathToImage)
{
$file = $this->storage->get($pathToImage);
$this->sizes->each(function ($size, $key) use ($pathToImage, $file) {
$img = app(ImageManager::class)->make($file);
$path = $this->createThumbPath($pathToImage, $key);
switch ($siz... | php | public function resize($pathToImage)
{
$file = $this->storage->get($pathToImage);
$this->sizes->each(function ($size, $key) use ($pathToImage, $file) {
$img = app(ImageManager::class)->make($file);
$path = $this->createThumbPath($pathToImage, $key);
switch ($siz... | [
"public",
"function",
"resize",
"(",
"$",
"pathToImage",
")",
"{",
"$",
"file",
"=",
"$",
"this",
"->",
"storage",
"->",
"get",
"(",
"$",
"pathToImage",
")",
";",
"$",
"this",
"->",
"sizes",
"->",
"each",
"(",
"function",
"(",
"$",
"size",
",",
"$"... | Resize image to all configured sizes
@param $pathToImage | [
"Resize",
"image",
"to",
"all",
"configured",
"sizes"
] | 43c66929a5a16772dbb3bae4b5188bdc10b6f9ec | https://github.com/crip-laravel/filesys/blob/43c66929a5a16772dbb3bae4b5188bdc10b6f9ec/src/Services/ThumbService.php#L65-L94 |
226,384 | crip-laravel/filesys | src/Services/ThumbService.php | ThumbService.rename | public function rename($pathToImage, $newName)
{
$this->sizes->keys()->each(function ($size) use ($pathToImage, $newName) {
$existing = $this->createThumbPath($pathToImage, $size);
list($path) = $this->getThumbPath($pathToImage, $size);
if ($this->storage->exists($existi... | php | public function rename($pathToImage, $newName)
{
$this->sizes->keys()->each(function ($size) use ($pathToImage, $newName) {
$existing = $this->createThumbPath($pathToImage, $size);
list($path) = $this->getThumbPath($pathToImage, $size);
if ($this->storage->exists($existi... | [
"public",
"function",
"rename",
"(",
"$",
"pathToImage",
",",
"$",
"newName",
")",
"{",
"$",
"this",
"->",
"sizes",
"->",
"keys",
"(",
")",
"->",
"each",
"(",
"function",
"(",
"$",
"size",
")",
"use",
"(",
"$",
"pathToImage",
",",
"$",
"newName",
"... | Rename thumbs for a image.
@param string $pathToImage
@param string $newName | [
"Rename",
"thumbs",
"for",
"a",
"image",
"."
] | 43c66929a5a16772dbb3bae4b5188bdc10b6f9ec | https://github.com/crip-laravel/filesys/blob/43c66929a5a16772dbb3bae4b5188bdc10b6f9ec/src/Services/ThumbService.php#L101-L111 |
226,385 | crip-laravel/filesys | src/Services/ThumbService.php | ThumbService.delete | public function delete($pathToImage, $isDir = false)
{
$this->sizes->keys()->each(function ($size) use ($pathToImage, $isDir) {
list($path, $name) = $this->getThumbPath($pathToImage, $size);
$file = $path . '/' . $name;
if ($this->storage->exists($file)) {
... | php | public function delete($pathToImage, $isDir = false)
{
$this->sizes->keys()->each(function ($size) use ($pathToImage, $isDir) {
list($path, $name) = $this->getThumbPath($pathToImage, $size);
$file = $path . '/' . $name;
if ($this->storage->exists($file)) {
... | [
"public",
"function",
"delete",
"(",
"$",
"pathToImage",
",",
"$",
"isDir",
"=",
"false",
")",
"{",
"$",
"this",
"->",
"sizes",
"->",
"keys",
"(",
")",
"->",
"each",
"(",
"function",
"(",
"$",
"size",
")",
"use",
"(",
"$",
"pathToImage",
",",
"$",
... | Delete all thumbs of an image.
@param string $pathToImage
@param bool $isDir | [
"Delete",
"all",
"thumbs",
"of",
"an",
"image",
"."
] | 43c66929a5a16772dbb3bae4b5188bdc10b6f9ec | https://github.com/crip-laravel/filesys/blob/43c66929a5a16772dbb3bae4b5188bdc10b6f9ec/src/Services/ThumbService.php#L118-L131 |
226,386 | crip-laravel/filesys | src/Services/ThumbService.php | ThumbService.createThumbPath | public function createThumbPath($originalFilePath, $thumbSizeIdentifier)
{
list($path, $file) = $this->getThumbPath($originalFilePath, $thumbSizeIdentifier);
// Make sure dir exists for thumb
$this->storage->makeDirectory($path, 0777, true, true);
return $path . '/' . $file;
} | php | public function createThumbPath($originalFilePath, $thumbSizeIdentifier)
{
list($path, $file) = $this->getThumbPath($originalFilePath, $thumbSizeIdentifier);
// Make sure dir exists for thumb
$this->storage->makeDirectory($path, 0777, true, true);
return $path . '/' . $file;
} | [
"public",
"function",
"createThumbPath",
"(",
"$",
"originalFilePath",
",",
"$",
"thumbSizeIdentifier",
")",
"{",
"list",
"(",
"$",
"path",
",",
"$",
"file",
")",
"=",
"$",
"this",
"->",
"getThumbPath",
"(",
"$",
"originalFilePath",
",",
"$",
"thumbSizeIdent... | Create dir for thumb and return file path with this thumb prefix
@param $originalFilePath
@param $thumbSizeIdentifier
@return string | [
"Create",
"dir",
"for",
"thumb",
"and",
"return",
"file",
"path",
"with",
"this",
"thumb",
"prefix"
] | 43c66929a5a16772dbb3bae4b5188bdc10b6f9ec | https://github.com/crip-laravel/filesys/blob/43c66929a5a16772dbb3bae4b5188bdc10b6f9ec/src/Services/ThumbService.php#L139-L147 |
226,387 | xinix-technology/bono | src/Bono/Middleware/SessionMiddleware.php | SessionMiddleware.call | public function call()
{
$defaultOptions = array(
'name' => 'BSESS',
'lifetime' => 0,
'path' => \URL::base('', false),
'domain' => '',
'secure' => false,
'httpOnly' => false,
);
if (is_array($this->options)) {
... | php | public function call()
{
$defaultOptions = array(
'name' => 'BSESS',
'lifetime' => 0,
'path' => \URL::base('', false),
'domain' => '',
'secure' => false,
'httpOnly' => false,
);
if (is_array($this->options)) {
... | [
"public",
"function",
"call",
"(",
")",
"{",
"$",
"defaultOptions",
"=",
"array",
"(",
"'name'",
"=>",
"'BSESS'",
",",
"'lifetime'",
"=>",
"0",
",",
"'path'",
"=>",
"\\",
"URL",
"::",
"base",
"(",
"''",
",",
"false",
")",
",",
"'domain'",
"=>",
"''",... | Call method of SessionMiddleware
@return void | [
"Call",
"method",
"of",
"SessionMiddleware"
] | 86c89f702dee2ab010767236c2c40b50cdc39c6e | https://github.com/xinix-technology/bono/blob/86c89f702dee2ab010767236c2c40b50cdc39c6e/src/Bono/Middleware/SessionMiddleware.php#L60-L83 |
226,388 | Dachande663/PHP-PhantomJS | src/HybridLogic/PhantomJS/Runner.php | Runner.execute | public function execute($script) {
// Escape
$args = func_get_args();
$cmd = escapeshellcmd("{$this->bin} " . implode(' ', $args));
if($this->debug) $cmd .= ' 2>&1';
// Execute
$result = shell_exec($cmd);
if($this->debug) return $result;
if($result === null) return false;
// Return
if(substr($res... | php | public function execute($script) {
// Escape
$args = func_get_args();
$cmd = escapeshellcmd("{$this->bin} " . implode(' ', $args));
if($this->debug) $cmd .= ' 2>&1';
// Execute
$result = shell_exec($cmd);
if($this->debug) return $result;
if($result === null) return false;
// Return
if(substr($res... | [
"public",
"function",
"execute",
"(",
"$",
"script",
")",
"{",
"// Escape",
"$",
"args",
"=",
"func_get_args",
"(",
")",
";",
"$",
"cmd",
"=",
"escapeshellcmd",
"(",
"\"{$this->bin} \"",
".",
"implode",
"(",
"' '",
",",
"$",
"args",
")",
")",
";",
"if"... | Execute a given JS file
This method should be called with the first argument
being the JS file you wish to execute. Additional
PhantomJS command line arguments can be passed
through as function arguments e.g.:
$command->execute('/path/to/my/script.js', 'arg1', 'arg2'[, ...])
The script tries to automatically decodde... | [
"Execute",
"a",
"given",
"JS",
"file"
] | 011e507102309cc339544e9e996332915f2d2e1c | https://github.com/Dachande663/PHP-PhantomJS/blob/011e507102309cc339544e9e996332915f2d2e1c/src/HybridLogic/PhantomJS/Runner.php#L65-L83 |
226,389 | phrest/api | src/Response/ResponseArray.php | ResponseArray.getResponseByKey | public function getResponseByKey($key)
{
return isset($this->responses[$key]) ? $this->responses[$key] : null;
} | php | public function getResponseByKey($key)
{
return isset($this->responses[$key]) ? $this->responses[$key] : null;
} | [
"public",
"function",
"getResponseByKey",
"(",
"$",
"key",
")",
"{",
"return",
"isset",
"(",
"$",
"this",
"->",
"responses",
"[",
"$",
"key",
"]",
")",
"?",
"$",
"this",
"->",
"responses",
"[",
"$",
"key",
"]",
":",
"null",
";",
"}"
] | Get a response by array key
@param $key
@return null|Response | [
"Get",
"a",
"response",
"by",
"array",
"key"
] | 271d604f332cbd3ef0dc8593ea0904fee0a42a84 | https://github.com/phrest/api/blob/271d604f332cbd3ef0dc8593ea0904fee0a42a84/src/Response/ResponseArray.php#L69-L72 |
226,390 | phrest/api | src/Response/ResponseArray.php | ResponseArray.getCount | public function getCount()
{
if (isset($this->meta->count))
{
return $this->meta->count;
}
return $this->meta->count = count($this->responses);
} | php | public function getCount()
{
if (isset($this->meta->count))
{
return $this->meta->count;
}
return $this->meta->count = count($this->responses);
} | [
"public",
"function",
"getCount",
"(",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"meta",
"->",
"count",
")",
")",
"{",
"return",
"$",
"this",
"->",
"meta",
"->",
"count",
";",
"}",
"return",
"$",
"this",
"->",
"meta",
"->",
"count",
"... | Get the count of responses
Count the responses if not already set
@return int | [
"Get",
"the",
"count",
"of",
"responses",
"Count",
"the",
"responses",
"if",
"not",
"already",
"set"
] | 271d604f332cbd3ef0dc8593ea0904fee0a42a84 | https://github.com/phrest/api/blob/271d604f332cbd3ef0dc8593ea0904fee0a42a84/src/Response/ResponseArray.php#L94-L102 |
226,391 | phrest/api | src/Exceptions/HandledException.php | HandledException.getResponseDescription | protected function getResponseDescription($code)
{
$codes = array(
// Informational 1xx
100 => 'Continue',
101 => 'Switching Protocols',
// Success 2xx
200 => 'OK',
201 => 'Created',
202 => 'Accepted',
203 => 'Non-Authoritative Information',
204 => 'No Conten... | php | protected function getResponseDescription($code)
{
$codes = array(
// Informational 1xx
100 => 'Continue',
101 => 'Switching Protocols',
// Success 2xx
200 => 'OK',
201 => 'Created',
202 => 'Accepted',
203 => 'Non-Authoritative Information',
204 => 'No Conten... | [
"protected",
"function",
"getResponseDescription",
"(",
"$",
"code",
")",
"{",
"$",
"codes",
"=",
"array",
"(",
"// Informational 1xx",
"100",
"=>",
"'Continue'",
",",
"101",
"=>",
"'Switching Protocols'",
",",
"// Success 2xx",
"200",
"=>",
"'OK'",
",",
"201",
... | todo make use of this
@param $code
@return string | [
"todo",
"make",
"use",
"of",
"this"
] | 271d604f332cbd3ef0dc8593ea0904fee0a42a84 | https://github.com/phrest/api/blob/271d604f332cbd3ef0dc8593ea0904fee0a42a84/src/Exceptions/HandledException.php#L47-L103 |
226,392 | michael-donat/php-vfs | src/VirtualFileSystem/Wrapper/FileHandler.php | FileHandler.write | public function write($data)
{
$content = $this->file->data();
$content = substr($content, 0, $this->position());
$content .= $data;
$this->file->setData($content);
$written = strlen($data);
$this->offsetPosition($written);
$this->file->setModificationTime(tim... | php | public function write($data)
{
$content = $this->file->data();
$content = substr($content, 0, $this->position());
$content .= $data;
$this->file->setData($content);
$written = strlen($data);
$this->offsetPosition($written);
$this->file->setModificationTime(tim... | [
"public",
"function",
"write",
"(",
"$",
"data",
")",
"{",
"$",
"content",
"=",
"$",
"this",
"->",
"file",
"->",
"data",
"(",
")",
";",
"$",
"content",
"=",
"substr",
"(",
"$",
"content",
",",
"0",
",",
"$",
"this",
"->",
"position",
"(",
")",
... | Writes data to file. Will return the number of bytes written. Will advance pointer by number of bytes written.
@param string $data
@return int | [
"Writes",
"data",
"to",
"file",
".",
"Will",
"return",
"the",
"number",
"of",
"bytes",
"written",
".",
"Will",
"advance",
"pointer",
"by",
"number",
"of",
"bytes",
"written",
"."
] | 1254b67ca6bdaccd9f305b0e1aea81f790b3fa67 | https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Wrapper/FileHandler.php#L63-L75 |
226,393 | michael-donat/php-vfs | src/VirtualFileSystem/Wrapper/FileHandler.php | FileHandler.position | public function position($position = null)
{
return is_null($position) ? $this->position : $this->position = $position;
} | php | public function position($position = null)
{
return is_null($position) ? $this->position : $this->position = $position;
} | [
"public",
"function",
"position",
"(",
"$",
"position",
"=",
"null",
")",
"{",
"return",
"is_null",
"(",
"$",
"position",
")",
"?",
"$",
"this",
"->",
"position",
":",
"$",
"this",
"->",
"position",
"=",
"$",
"position",
";",
"}"
] | Returns current pointer position.
@param integer|null $position
@return int | [
"Returns",
"current",
"pointer",
"position",
"."
] | 1254b67ca6bdaccd9f305b0e1aea81f790b3fa67 | https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Wrapper/FileHandler.php#L107-L110 |
226,394 | michael-donat/php-vfs | src/VirtualFileSystem/Wrapper/FileHandler.php | FileHandler.truncate | public function truncate($newSize = 0)
{
$this->position(0);
$newData = substr($this->file->data(), 0, $newSize);
$newData = false === $newData ? '' : $newData;
$this->file->setData($newData);
$this->file->setModificationTime(time());
$this->file->setChangeTime(time()... | php | public function truncate($newSize = 0)
{
$this->position(0);
$newData = substr($this->file->data(), 0, $newSize);
$newData = false === $newData ? '' : $newData;
$this->file->setData($newData);
$this->file->setModificationTime(time());
$this->file->setChangeTime(time()... | [
"public",
"function",
"truncate",
"(",
"$",
"newSize",
"=",
"0",
")",
"{",
"$",
"this",
"->",
"position",
"(",
"0",
")",
";",
"$",
"newData",
"=",
"substr",
"(",
"$",
"this",
"->",
"file",
"->",
"data",
"(",
")",
",",
"0",
",",
"$",
"newSize",
... | Removed all data from file and sets pointer to 0
@param int $newSize
@return void | [
"Removed",
"all",
"data",
"from",
"file",
"and",
"sets",
"pointer",
"to",
"0"
] | 1254b67ca6bdaccd9f305b0e1aea81f790b3fa67 | https://github.com/michael-donat/php-vfs/blob/1254b67ca6bdaccd9f305b0e1aea81f790b3fa67/src/VirtualFileSystem/Wrapper/FileHandler.php#L149-L159 |
226,395 | Solution10/calendar | src/Resolution/WeekResolution.php | WeekResolution.build | public function build()
{
if ($this->currentDate === null) {
return null;
}
return new Week($this->currentDate, $this->startDay);
} | php | public function build()
{
if ($this->currentDate === null) {
return null;
}
return new Week($this->currentDate, $this->startDay);
} | [
"public",
"function",
"build",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"currentDate",
"===",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"new",
"Week",
"(",
"$",
"this",
"->",
"currentDate",
",",
"$",
"this",
"->",
"startDay",
")",
... | Returns the data for this view. Could be anything!
@return mixed | [
"Returns",
"the",
"data",
"for",
"this",
"view",
".",
"Could",
"be",
"anything!"
] | fa0d8e09627693a7b0fe0e6b69cab997bab919e8 | https://github.com/Solution10/calendar/blob/fa0d8e09627693a7b0fe0e6b69cab997bab919e8/src/Resolution/WeekResolution.php#L91-L97 |
226,396 | amranidev/ajaxis | src/Attributes/Attributes.php | Attributes.getAttributes | public function getAttributes()
{
//select all the Attributes from table
$this->result = DB::select(DB::raw('show columns from `'.$this->table.'`;'));
//delete the first element.(ignore the id section)
unset($this->result[0]);
//get result
return $this->result;
} | php | public function getAttributes()
{
//select all the Attributes from table
$this->result = DB::select(DB::raw('show columns from `'.$this->table.'`;'));
//delete the first element.(ignore the id section)
unset($this->result[0]);
//get result
return $this->result;
} | [
"public",
"function",
"getAttributes",
"(",
")",
"{",
"//select all the Attributes from table",
"$",
"this",
"->",
"result",
"=",
"DB",
"::",
"select",
"(",
"DB",
"::",
"raw",
"(",
"'show columns from `'",
".",
"$",
"this",
"->",
"table",
".",
"'`;'",
")",
"... | Get attributes from table. | [
"Get",
"attributes",
"from",
"table",
"."
] | 0de3be2cc63cd953fb8a0efc44b6afc176f57ca4 | https://github.com/amranidev/ajaxis/blob/0de3be2cc63cd953fb8a0efc44b6afc176f57ca4/src/Attributes/Attributes.php#L40-L48 |
226,397 | QueenCityCodeFactory/CakeSoap | src/Network/CakeSoap.php | CakeSoap._parseConfig | protected function _parseConfig(array $options = [])
{
if (!class_exists('SoapClient')) {
$this->handleError('Class SoapClient not found, please enable Soap extensions');
}
$opts = [
'http' => [
'user_agent' => $this->getConfig('userAgent')
... | php | protected function _parseConfig(array $options = [])
{
if (!class_exists('SoapClient')) {
$this->handleError('Class SoapClient not found, please enable Soap extensions');
}
$opts = [
'http' => [
'user_agent' => $this->getConfig('userAgent')
... | [
"protected",
"function",
"_parseConfig",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"class_exists",
"(",
"'SoapClient'",
")",
")",
"{",
"$",
"this",
"->",
"handleError",
"(",
"'Class SoapClient not found, please enable Soap extensions'"... | Setup Configuration options
@param array $options The options
@return array Configuration options | [
"Setup",
"Configuration",
"options"
] | 587edc29d9e891fb6027805cd0cb30034dcadff1 | https://github.com/QueenCityCodeFactory/CakeSoap/blob/587edc29d9e891fb6027805cd0cb30034dcadff1/src/Network/CakeSoap.php#L111-L147 |
226,398 | QueenCityCodeFactory/CakeSoap | src/Network/CakeSoap.php | CakeSoap.connect | public function connect(array $options = [])
{
$config = $this->_parseConfig($options);
try {
$this->client = new SoapClient($this->getConfig('wsdl'), $config);
} catch (SoapFault $fault) {
$this->handleError($fault->faultstring);
}
if ($this->client)... | php | public function connect(array $options = [])
{
$config = $this->_parseConfig($options);
try {
$this->client = new SoapClient($this->getConfig('wsdl'), $config);
} catch (SoapFault $fault) {
$this->handleError($fault->faultstring);
}
if ($this->client)... | [
"public",
"function",
"connect",
"(",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"config",
"=",
"$",
"this",
"->",
"_parseConfig",
"(",
"$",
"options",
")",
";",
"try",
"{",
"$",
"this",
"->",
"client",
"=",
"new",
"SoapClient",
"(",
"$... | Connects to the SOAP server using the WSDL in the configuration
@param array $options The options
@return bool True on success, false on failure | [
"Connects",
"to",
"the",
"SOAP",
"server",
"using",
"the",
"WSDL",
"in",
"the",
"configuration"
] | 587edc29d9e891fb6027805cd0cb30034dcadff1 | https://github.com/QueenCityCodeFactory/CakeSoap/blob/587edc29d9e891fb6027805cd0cb30034dcadff1/src/Network/CakeSoap.php#L155-L169 |
226,399 | QueenCityCodeFactory/CakeSoap | src/Network/CakeSoap.php | CakeSoap.sendRequest | public function sendRequest($action, $data)
{
if (!$this->connected) {
$this->connect();
}
try {
$result = $this->client->__soapCall($action, $data);
} catch (SoapFault $fault) {
$this->handleError($fault->faultstring);
}
return $r... | php | public function sendRequest($action, $data)
{
if (!$this->connected) {
$this->connect();
}
try {
$result = $this->client->__soapCall($action, $data);
} catch (SoapFault $fault) {
$this->handleError($fault->faultstring);
}
return $r... | [
"public",
"function",
"sendRequest",
"(",
"$",
"action",
",",
"$",
"data",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"connected",
")",
"{",
"$",
"this",
"->",
"connect",
"(",
")",
";",
"}",
"try",
"{",
"$",
"result",
"=",
"$",
"this",
"->",
... | Query the SOAP server with the given method and parameters
@param string $action The WSDL Action
@param array $data The data array
@return mixed Returns the result on success, false on failure | [
"Query",
"the",
"SOAP",
"server",
"with",
"the",
"given",
"method",
"and",
"parameters"
] | 587edc29d9e891fb6027805cd0cb30034dcadff1 | https://github.com/QueenCityCodeFactory/CakeSoap/blob/587edc29d9e891fb6027805cd0cb30034dcadff1/src/Network/CakeSoap.php#L201-L213 |
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.