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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
233,100 | phillies2k/ratchet-bundle | WebSocket/Server/Factory.php | Factory.addPeriodicTimer | public function addPeriodicTimer(PeriodicTimerInterface $periodicTimer)
{
if (array_key_exists($periodicTimer->getName(), $this->periodicTimers)) {
throw new TimerAlreadyAddedException();
}
$this->periodicTimers[$periodicTimer->getName()] = $periodicTimer;
return $this;... | php | public function addPeriodicTimer(PeriodicTimerInterface $periodicTimer)
{
if (array_key_exists($periodicTimer->getName(), $this->periodicTimers)) {
throw new TimerAlreadyAddedException();
}
$this->periodicTimers[$periodicTimer->getName()] = $periodicTimer;
return $this;... | [
"public",
"function",
"addPeriodicTimer",
"(",
"PeriodicTimerInterface",
"$",
"periodicTimer",
")",
"{",
"if",
"(",
"array_key_exists",
"(",
"$",
"periodicTimer",
"->",
"getName",
"(",
")",
",",
"$",
"this",
"->",
"periodicTimers",
")",
")",
"{",
"throw",
"new... | Adds a periodic timer to the loop. Throws TimerAlreadyAddedException when the timer was already added to the
event loop.
@param PeriodicTimerInterface $periodicTimer
@return Factory
@throws \P2\Bundle\RatchetBundle\WebSocket\Exception\TimerAlreadyAddedException | [
"Adds",
"a",
"periodic",
"timer",
"to",
"the",
"loop",
".",
"Throws",
"TimerAlreadyAddedException",
"when",
"the",
"timer",
"was",
"already",
"added",
"to",
"the",
"event",
"loop",
"."
] | 1ea60f42d04c6e5e2c63c7f8c53262d382b0b5f3 | https://github.com/phillies2k/ratchet-bundle/blob/1ea60f42d04c6e5e2c63c7f8c53262d382b0b5f3/WebSocket/Server/Factory.php#L76-L85 |
233,101 | phillies2k/ratchet-bundle | WebSocket/Server/Factory.php | Factory.configure | protected function configure(IoServer $server)
{
foreach ($this->periodicTimers as $periodicTimer) {
$server->loop->addPeriodicTimer($periodicTimer->getInterval(), $periodicTimer->getCallback());
}
} | php | protected function configure(IoServer $server)
{
foreach ($this->periodicTimers as $periodicTimer) {
$server->loop->addPeriodicTimer($periodicTimer->getInterval(), $periodicTimer->getCallback());
}
} | [
"protected",
"function",
"configure",
"(",
"IoServer",
"$",
"server",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"periodicTimers",
"as",
"$",
"periodicTimer",
")",
"{",
"$",
"server",
"->",
"loop",
"->",
"addPeriodicTimer",
"(",
"$",
"periodicTimer",
"->",... | Configures the io server
@param IoServer $server | [
"Configures",
"the",
"io",
"server"
] | 1ea60f42d04c6e5e2c63c7f8c53262d382b0b5f3 | https://github.com/phillies2k/ratchet-bundle/blob/1ea60f42d04c6e5e2c63c7f8c53262d382b0b5f3/WebSocket/Server/Factory.php#L105-L110 |
233,102 | jkphl/rdfa-lite-microdata | src/RdfaLiteMicrodata/Ports/Parser/RdfaLite.php | RdfaLite.parseHtml | public function parseHtml($string)
{
return $this->parseSource(
$string,
new HtmlDocumentFactory(),
(new RdfaLiteElementProcessor())->setHtml(true),
new RdfaLiteContext()
);
} | php | public function parseHtml($string)
{
return $this->parseSource(
$string,
new HtmlDocumentFactory(),
(new RdfaLiteElementProcessor())->setHtml(true),
new RdfaLiteContext()
);
} | [
"public",
"function",
"parseHtml",
"(",
"$",
"string",
")",
"{",
"return",
"$",
"this",
"->",
"parseSource",
"(",
"$",
"string",
",",
"new",
"HtmlDocumentFactory",
"(",
")",
",",
"(",
"new",
"RdfaLiteElementProcessor",
"(",
")",
")",
"->",
"setHtml",
"(",
... | Parse an HTML string
@param string $string HTML string
@return \stdClass Extracted things | [
"Parse",
"an",
"HTML",
"string"
] | 12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8 | https://github.com/jkphl/rdfa-lite-microdata/blob/12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8/src/RdfaLiteMicrodata/Ports/Parser/RdfaLite.php#L98-L106 |
233,103 | civicrm/civicrm-setup | src/Setup/SmartyUtil.php | SmartyUtil.createSmarty | public static function createSmarty($srcPath) {
require_once 'CRM/Core/I18n.php';
$packagePath = implode(DIRECTORY_SEPARATOR, [$srcPath, 'packages']);
require_once $packagePath . DIRECTORY_SEPARATOR . 'Smarty' . DIRECTORY_SEPARATOR . 'Smarty.class.php';
$smarty = new \Smarty();
$smarty->template_d... | php | public static function createSmarty($srcPath) {
require_once 'CRM/Core/I18n.php';
$packagePath = implode(DIRECTORY_SEPARATOR, [$srcPath, 'packages']);
require_once $packagePath . DIRECTORY_SEPARATOR . 'Smarty' . DIRECTORY_SEPARATOR . 'Smarty.class.php';
$smarty = new \Smarty();
$smarty->template_d... | [
"public",
"static",
"function",
"createSmarty",
"(",
"$",
"srcPath",
")",
"{",
"require_once",
"'CRM/Core/I18n.php'",
";",
"$",
"packagePath",
"=",
"implode",
"(",
"DIRECTORY_SEPARATOR",
",",
"[",
"$",
"srcPath",
",",
"'packages'",
"]",
")",
";",
"require_once",... | Create a Smarty instance.
@return \Smarty | [
"Create",
"a",
"Smarty",
"instance",
"."
] | 556b312faf78781c85c4fc4ae6c1c3b658da9e09 | https://github.com/civicrm/civicrm-setup/blob/556b312faf78781c85c4fc4ae6c1c3b658da9e09/src/Setup/SmartyUtil.php#L11-L31 |
233,104 | tableau-mkt/elomentary | src/Api/AbstractBulkApi.php | AbstractBulkApi.getResponse | public function getResponse($key, $expectedResponse = null) {
if (isset($expectedResponse)) {
return $expectedResponse;
}
if (!isset($this->_responses[$key])) {
throw new InvalidArgumentException("Response value for $key is not available");
}
return $this->_responses[$key];
} | php | public function getResponse($key, $expectedResponse = null) {
if (isset($expectedResponse)) {
return $expectedResponse;
}
if (!isset($this->_responses[$key])) {
throw new InvalidArgumentException("Response value for $key is not available");
}
return $this->_responses[$key];
} | [
"public",
"function",
"getResponse",
"(",
"$",
"key",
",",
"$",
"expectedResponse",
"=",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"expectedResponse",
")",
")",
"{",
"return",
"$",
"expectedResponse",
";",
"}",
"if",
"(",
"!",
"isset",
"(",
"$",
... | Get accessor for _responses array
@param string $key
_responses key
@param \Eloqua\HttpClient\Message\ResponseMediator $expectedResponse
Set if you want to force $expectedResponse to be returned
@return array
Value of requested Eloqua bulk API response
@throws \Eloqua\Exception\InvalidArgumentException | [
"Get",
"accessor",
"for",
"_responses",
"array"
] | c9e8e67f8239cfd813fae59fe665ed7130c439d2 | https://github.com/tableau-mkt/elomentary/blob/c9e8e67f8239cfd813fae59fe665ed7130c439d2/src/Api/AbstractBulkApi.php#L57-L67 |
233,105 | tableau-mkt/elomentary | src/Api/AbstractBulkApi.php | AbstractBulkApi.upload | public function upload($contactObject, $mapResponse = null) {
$mapResponse = $this->getResponse('map', $mapResponse);
$uri = trim($mapResponse['uri'], '/');
return $this->setResponse('load', $this->post("$uri/data", $contactObject));
} | php | public function upload($contactObject, $mapResponse = null) {
$mapResponse = $this->getResponse('map', $mapResponse);
$uri = trim($mapResponse['uri'], '/');
return $this->setResponse('load', $this->post("$uri/data", $contactObject));
} | [
"public",
"function",
"upload",
"(",
"$",
"contactObject",
",",
"$",
"mapResponse",
"=",
"null",
")",
"{",
"$",
"mapResponse",
"=",
"$",
"this",
"->",
"getResponse",
"(",
"'map'",
",",
"$",
"mapResponse",
")",
";",
"$",
"uri",
"=",
"trim",
"(",
"$",
... | Upload imports file to Eloqua bulk staging area.
@param array $contactObject
Data to be uploaded
@param array $mapResponse
Response from $this->map(). Defaults to whatever is returned from the
last $this->map() call.
@return array
Eloqua response, required for sync() step. | [
"Upload",
"imports",
"file",
"to",
"Eloqua",
"bulk",
"staging",
"area",
"."
] | c9e8e67f8239cfd813fae59fe665ed7130c439d2 | https://github.com/tableau-mkt/elomentary/blob/c9e8e67f8239cfd813fae59fe665ed7130c439d2/src/Api/AbstractBulkApi.php#L111-L116 |
233,106 | tableau-mkt/elomentary | src/Api/AbstractBulkApi.php | AbstractBulkApi.sync | public function sync($mapResponse = null) {
$mapResponse = $this->getResponse('map', $mapResponse);
return $this->setResponse('sync', $this->post('syncs', array (
'syncedInstanceUri' => $mapResponse['uri']
)));
} | php | public function sync($mapResponse = null) {
$mapResponse = $this->getResponse('map', $mapResponse);
return $this->setResponse('sync', $this->post('syncs', array (
'syncedInstanceUri' => $mapResponse['uri']
)));
} | [
"public",
"function",
"sync",
"(",
"$",
"mapResponse",
"=",
"null",
")",
"{",
"$",
"mapResponse",
"=",
"$",
"this",
"->",
"getResponse",
"(",
"'map'",
",",
"$",
"mapResponse",
")",
";",
"return",
"$",
"this",
"->",
"setResponse",
"(",
"'sync'",
",",
"$... | Syncs an import file to your Eloqua database, or syncs and export to a
downloadable file
@param array $mapResponse
Response from $this->map(). Defaults to whatever is returned from the
last $this->map() call.
@return array
Eloqua response, including URI for status() step. | [
"Syncs",
"an",
"import",
"file",
"to",
"your",
"Eloqua",
"database",
"or",
"syncs",
"and",
"export",
"to",
"a",
"downloadable",
"file"
] | c9e8e67f8239cfd813fae59fe665ed7130c439d2 | https://github.com/tableau-mkt/elomentary/blob/c9e8e67f8239cfd813fae59fe665ed7130c439d2/src/Api/AbstractBulkApi.php#L129-L135 |
233,107 | tableau-mkt/elomentary | src/Api/AbstractBulkApi.php | AbstractBulkApi.status | public function status($wait = false, $syncResponse = null) {
$syncResponse = $this->getResponse('sync', $syncResponse);
$uri = trim($syncResponse['uri'], '/');
do {
$status = $this->get($uri);
} while ($wait and $this->isWaitingStatus($status) and sleep(1) === 0);
return $this->setResponse(... | php | public function status($wait = false, $syncResponse = null) {
$syncResponse = $this->getResponse('sync', $syncResponse);
$uri = trim($syncResponse['uri'], '/');
do {
$status = $this->get($uri);
} while ($wait and $this->isWaitingStatus($status) and sleep(1) === 0);
return $this->setResponse(... | [
"public",
"function",
"status",
"(",
"$",
"wait",
"=",
"false",
",",
"$",
"syncResponse",
"=",
"null",
")",
"{",
"$",
"syncResponse",
"=",
"$",
"this",
"->",
"getResponse",
"(",
"'sync'",
",",
"$",
"syncResponse",
")",
";",
"$",
"uri",
"=",
"trim",
"... | Checks the status of the last sync.
@param bool $wait
If true, the function will block until the sync either
completes or fails. It will wait one second between the last response
and the next check.
This should be set to false for asynchronous operations.
@param array $syncResponse
Response from $this->sync(). Def... | [
"Checks",
"the",
"status",
"of",
"the",
"last",
"sync",
"."
] | c9e8e67f8239cfd813fae59fe665ed7130c439d2 | https://github.com/tableau-mkt/elomentary/blob/c9e8e67f8239cfd813fae59fe665ed7130c439d2/src/Api/AbstractBulkApi.php#L154-L163 |
233,108 | tableau-mkt/elomentary | src/Api/AbstractBulkApi.php | AbstractBulkApi.download | public function download($statusResponse = null, $limit = null, $offset = null) {
$statusResponse = $this->getResponse('status', $statusResponse);
$uri = trim($statusResponse['syncedInstanceUri'], '/');
if (isset($limit) && isset($offset) && $limit > 0 && $offset >= 0){
return $this->get("$uri/data?l... | php | public function download($statusResponse = null, $limit = null, $offset = null) {
$statusResponse = $this->getResponse('status', $statusResponse);
$uri = trim($statusResponse['syncedInstanceUri'], '/');
if (isset($limit) && isset($offset) && $limit > 0 && $offset >= 0){
return $this->get("$uri/data?l... | [
"public",
"function",
"download",
"(",
"$",
"statusResponse",
"=",
"null",
",",
"$",
"limit",
"=",
"null",
",",
"$",
"offset",
"=",
"null",
")",
"{",
"$",
"statusResponse",
"=",
"$",
"this",
"->",
"getResponse",
"(",
"'status'",
",",
"$",
"statusResponse... | Retrieves data from the staging area.
@param array $statusResponse
Response from $this->status call. Defaults to last $this->status()
response.
@param integer $limit
A URL parameter that specifies the maximum number of records to return.
This can be any positive integer between 1 and 50000 inclusive.
If not specifie... | [
"Retrieves",
"data",
"from",
"the",
"staging",
"area",
"."
] | c9e8e67f8239cfd813fae59fe665ed7130c439d2 | https://github.com/tableau-mkt/elomentary/blob/c9e8e67f8239cfd813fae59fe665ed7130c439d2/src/Api/AbstractBulkApi.php#L201-L214 |
233,109 | tableau-mkt/elomentary | src/Api/AbstractBulkApi.php | AbstractBulkApi.log | public function log($statusResponse = null) {
$statusResponse = $this->getResponse('status', $statusResponse);
$uri = trim($statusResponse['uri'], '/');
return $this->get("$uri/logs");
} | php | public function log($statusResponse = null) {
$statusResponse = $this->getResponse('status', $statusResponse);
$uri = trim($statusResponse['uri'], '/');
return $this->get("$uri/logs");
} | [
"public",
"function",
"log",
"(",
"$",
"statusResponse",
"=",
"null",
")",
"{",
"$",
"statusResponse",
"=",
"$",
"this",
"->",
"getResponse",
"(",
"'status'",
",",
"$",
"statusResponse",
")",
";",
"$",
"uri",
"=",
"trim",
"(",
"$",
"statusResponse",
"[",... | Returns log from last bulk API transfer.
@param array $statusResponse
Response from $this->status call. Defaults to last $this->status()
response.
@return array
Bulk API log from last transfer. | [
"Returns",
"log",
"from",
"last",
"bulk",
"API",
"transfer",
"."
] | c9e8e67f8239cfd813fae59fe665ed7130c439d2 | https://github.com/tableau-mkt/elomentary/blob/c9e8e67f8239cfd813fae59fe665ed7130c439d2/src/Api/AbstractBulkApi.php#L226-L231 |
233,110 | canis-io/lumen-jwt-auth | src/Token.php | Token.ensureClaimValues | public function ensureClaimValues(array $validateClaims)
{
foreach ($validateClaims as $claim => $value) {
if (!isset($this->claims[$claim]) || $this->claims[$claim] !== $value) {
return false;
}
}
return true;
} | php | public function ensureClaimValues(array $validateClaims)
{
foreach ($validateClaims as $claim => $value) {
if (!isset($this->claims[$claim]) || $this->claims[$claim] !== $value) {
return false;
}
}
return true;
} | [
"public",
"function",
"ensureClaimValues",
"(",
"array",
"$",
"validateClaims",
")",
"{",
"foreach",
"(",
"$",
"validateClaims",
"as",
"$",
"claim",
"=>",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"claims",
"[",
"$",
"cla... | Validate the claims of the token
@param array $validateClaims
@return boolean | [
"Validate",
"the",
"claims",
"of",
"the",
"token"
] | 5e1a76a9878ec58348a76aeea382e6cb9c104ef9 | https://github.com/canis-io/lumen-jwt-auth/blob/5e1a76a9878ec58348a76aeea382e6cb9c104ef9/src/Token.php#L90-L98 |
233,111 | civicrm/civicrm-setup | src/Setup/BasicRunner.php | BasicRunner.run | public static function run($ctrl) {
$method = $_SERVER['REQUEST_METHOD'];
list ($headers, $body) = $ctrl->run($method, ($method === 'GET' ? $_GET : $_POST));
foreach ($headers as $k => $v) {
header("$k: $v");
}
echo $body;
} | php | public static function run($ctrl) {
$method = $_SERVER['REQUEST_METHOD'];
list ($headers, $body) = $ctrl->run($method, ($method === 'GET' ? $_GET : $_POST));
foreach ($headers as $k => $v) {
header("$k: $v");
}
echo $body;
} | [
"public",
"static",
"function",
"run",
"(",
"$",
"ctrl",
")",
"{",
"$",
"method",
"=",
"$",
"_SERVER",
"[",
"'REQUEST_METHOD'",
"]",
";",
"list",
"(",
"$",
"headers",
",",
"$",
"body",
")",
"=",
"$",
"ctrl",
"->",
"run",
"(",
"$",
"method",
",",
... | Execute the controller and display the output.
Note: This is really just an example which handles input and output using
stock PHP variables and functions. Depending on the environment,
it may be easier to work directly with `getCtrl()->run(...)` which
handles inputs/outputs in a more abstract fashion.
@param object ... | [
"Execute",
"the",
"controller",
"and",
"display",
"the",
"output",
"."
] | 556b312faf78781c85c4fc4ae6c1c3b658da9e09 | https://github.com/civicrm/civicrm-setup/blob/556b312faf78781c85c4fc4ae6c1c3b658da9e09/src/Setup/BasicRunner.php#L17-L24 |
233,112 | ionux/phactor | src/BaseObject.php | BaseObject.genBytes | private function genBytes()
{
$tempvals = array();
for ($x = 0; $x < 256; $x++) {
$tempvals[$x] = chr($x);
}
return $tempvals;
} | php | private function genBytes()
{
$tempvals = array();
for ($x = 0; $x < 256; $x++) {
$tempvals[$x] = chr($x);
}
return $tempvals;
} | [
"private",
"function",
"genBytes",
"(",
")",
"{",
"$",
"tempvals",
"=",
"array",
"(",
")",
";",
"for",
"(",
"$",
"x",
"=",
"0",
";",
"$",
"x",
"<",
"256",
";",
"$",
"x",
"++",
")",
"{",
"$",
"tempvals",
"[",
"$",
"x",
"]",
"=",
"chr",
"(",
... | Generates an array of byte values.
@return array $tempvals An array of bytes. | [
"Generates",
"an",
"array",
"of",
"byte",
"values",
"."
] | 667064d3930e043fd78abed9a2324aee52466fa5 | https://github.com/ionux/phactor/blob/667064d3930e043fd78abed9a2324aee52466fa5/src/BaseObject.php#L62-L71 |
233,113 | mcustiel/php-simple-config | src/ConfigLoader.php | ConfigLoader.readFromCache | private function readFromCache()
{
if (($config = $this->cacheConfig->getCacheManager()->get($this->cacheConfig->getKey())) !== null) {
return $config;
}
$config = $this->read();
$this->cacheConfig->getCacheManager()->set(
$this->cacheConfig->getKey(),
... | php | private function readFromCache()
{
if (($config = $this->cacheConfig->getCacheManager()->get($this->cacheConfig->getKey())) !== null) {
return $config;
}
$config = $this->read();
$this->cacheConfig->getCacheManager()->set(
$this->cacheConfig->getKey(),
... | [
"private",
"function",
"readFromCache",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"config",
"=",
"$",
"this",
"->",
"cacheConfig",
"->",
"getCacheManager",
"(",
")",
"->",
"get",
"(",
"$",
"this",
"->",
"cacheConfig",
"->",
"getKey",
"(",
")",
")",
")",
"!... | Tries to read the configuration from cache, if it's not cached loads it from file and caches it.
@return array|object | [
"Tries",
"to",
"read",
"the",
"configuration",
"from",
"cache",
"if",
"it",
"s",
"not",
"cached",
"loads",
"it",
"from",
"file",
"and",
"caches",
"it",
"."
] | da1b56cb9c3d4582a00da9d2380295a79f318ebb | https://github.com/mcustiel/php-simple-config/blob/da1b56cb9c3d4582a00da9d2380295a79f318ebb/src/ConfigLoader.php#L74-L87 |
233,114 | CampaignChain/core | Controller/MilestoneController.php | MilestoneController.moveApiAction | public function moveApiAction(Request $request)
{
$serializer = $this->get('campaignchain.core.serializer.default');
$responseData = array();
$id = $request->request->get('id');
$newDue = new \DateTime($request->request->get('start_date'));
$milestoneService = $this->get('... | php | public function moveApiAction(Request $request)
{
$serializer = $this->get('campaignchain.core.serializer.default');
$responseData = array();
$id = $request->request->get('id');
$newDue = new \DateTime($request->request->get('start_date'));
$milestoneService = $this->get('... | [
"public",
"function",
"moveApiAction",
"(",
"Request",
"$",
"request",
")",
"{",
"$",
"serializer",
"=",
"$",
"this",
"->",
"get",
"(",
"'campaignchain.core.serializer.default'",
")",
";",
"$",
"responseData",
"=",
"array",
"(",
")",
";",
"$",
"id",
"=",
"... | Move a Milestone to a new start date.
@ApiDoc(
section = "Core",
views = { "private" },
requirements={
{
"name"="id",
"description" = "Milestone ID",
"requirement"="\d+"
},
{
"name"="start_date",
"description" = "Start date in ISO8601 format",
"requirement"="/(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})[+-](\d{2}... | [
"Move",
"a",
"Milestone",
"to",
"a",
"new",
"start",
"date",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Controller/MilestoneController.php#L172-L202 |
233,115 | jkphl/rdfa-lite-microdata | src/RdfaLiteMicrodata/Infrastructure/Service/ThingGateway.php | ThingGateway.exportProperty | protected function exportProperty(PropertyInterface $property)
{
$value = $property->getValue();
return ($value instanceof ThingInterface) ? $this->exportThing($value) : $value;
} | php | protected function exportProperty(PropertyInterface $property)
{
$value = $property->getValue();
return ($value instanceof ThingInterface) ? $this->exportThing($value) : $value;
} | [
"protected",
"function",
"exportProperty",
"(",
"PropertyInterface",
"$",
"property",
")",
"{",
"$",
"value",
"=",
"$",
"property",
"->",
"getValue",
"(",
")",
";",
"return",
"(",
"$",
"value",
"instanceof",
"ThingInterface",
")",
"?",
"$",
"this",
"->",
"... | Export a property
@param PropertyInterface $property Property
@return ThingInterface|string Exported property | [
"Export",
"a",
"property"
] | 12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8 | https://github.com/jkphl/rdfa-lite-microdata/blob/12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8/src/RdfaLiteMicrodata/Infrastructure/Service/ThingGateway.php#L85-L89 |
233,116 | jkphl/rdfa-lite-microdata | src/RdfaLiteMicrodata/Infrastructure/Service/ThingGateway.php | ThingGateway.exportThing | protected function exportThing(ThingInterface $thing)
{
$iri = $this->iri;
return (object)[
'type' => array_map(
function (TypeInterface $type) use ($iri) {
return $iri ?
(object)[
'profile' => $type... | php | protected function exportThing(ThingInterface $thing)
{
$iri = $this->iri;
return (object)[
'type' => array_map(
function (TypeInterface $type) use ($iri) {
return $iri ?
(object)[
'profile' => $type... | [
"protected",
"function",
"exportThing",
"(",
"ThingInterface",
"$",
"thing",
")",
"{",
"$",
"iri",
"=",
"$",
"this",
"->",
"iri",
";",
"return",
"(",
"object",
")",
"[",
"'type'",
"=>",
"array_map",
"(",
"function",
"(",
"TypeInterface",
"$",
"type",
")"... | Export a single thing
@param ThingInterface $thing Thing
@return \stdClass Exported thing | [
"Export",
"a",
"single",
"thing"
] | 12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8 | https://github.com/jkphl/rdfa-lite-microdata/blob/12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8/src/RdfaLiteMicrodata/Infrastructure/Service/ThingGateway.php#L97-L116 |
233,117 | jkphl/rdfa-lite-microdata | src/RdfaLiteMicrodata/Infrastructure/Service/ThingGateway.php | ThingGateway.exportProperties | protected function exportProperties(ThingInterface $thing)
{
$properties = [];
foreach ($thing->getProperties() as $propertyIri => $propertyValues) {
if (count($propertyValues)) {
$propertyValues = array_map([$this, 'exportProperty'], $propertyValues);
$pr... | php | protected function exportProperties(ThingInterface $thing)
{
$properties = [];
foreach ($thing->getProperties() as $propertyIri => $propertyValues) {
if (count($propertyValues)) {
$propertyValues = array_map([$this, 'exportProperty'], $propertyValues);
$pr... | [
"protected",
"function",
"exportProperties",
"(",
"ThingInterface",
"$",
"thing",
")",
"{",
"$",
"properties",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"thing",
"->",
"getProperties",
"(",
")",
"as",
"$",
"propertyIri",
"=>",
"$",
"propertyValues",
")",
"{... | Export the properties list
@param ThingInterface $thing Thing
@return array Properties list | [
"Export",
"the",
"properties",
"list"
] | 12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8 | https://github.com/jkphl/rdfa-lite-microdata/blob/12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8/src/RdfaLiteMicrodata/Infrastructure/Service/ThingGateway.php#L124-L140 |
233,118 | prooph/link-process-manager | src/Model/Workflow.php | Workflow.isForeachProcessPossible | private function isForeachProcessPossible(Message $message, MessageHandler $messageHandler)
{
if ($message->processingType()->typeDescription()->nativeType() !== NativeType::COLLECTION) {
return false;
}
$itemMessage = Message::emulateProcessingWorkflowMessage(
$mess... | php | private function isForeachProcessPossible(Message $message, MessageHandler $messageHandler)
{
if ($message->processingType()->typeDescription()->nativeType() !== NativeType::COLLECTION) {
return false;
}
$itemMessage = Message::emulateProcessingWorkflowMessage(
$mess... | [
"private",
"function",
"isForeachProcessPossible",
"(",
"Message",
"$",
"message",
",",
"MessageHandler",
"$",
"messageHandler",
")",
"{",
"if",
"(",
"$",
"message",
"->",
"processingType",
"(",
")",
"->",
"typeDescription",
"(",
")",
"->",
"nativeType",
"(",
... | Checks if the message handler can handle a workflow message with the item processing type of a collection.
@param Message $message
@param MessageHandler $messageHandler
@return bool | [
"Checks",
"if",
"the",
"message",
"handler",
"can",
"handle",
"a",
"workflow",
"message",
"with",
"the",
"item",
"processing",
"type",
"of",
"a",
"collection",
"."
] | 3d6c8bdc72e855786227747bf06bcf8221f7860a | https://github.com/prooph/link-process-manager/blob/3d6c8bdc72e855786227747bf06bcf8221f7860a/src/Model/Workflow.php#L295-L308 |
233,119 | prooph/link-process-manager | src/Model/Workflow.php | Workflow.determineProcessType | private function determineProcessType(Message $message, MessageHandler $messageHandler)
{
if ($messageHandler->canHandleMessage($message)) {
if ($message->processingMetadata()->shouldCollectionBeSplitIntoChunks()) {
$processType = ProcessType::parallelChunk();
} else ... | php | private function determineProcessType(Message $message, MessageHandler $messageHandler)
{
if ($messageHandler->canHandleMessage($message)) {
if ($message->processingMetadata()->shouldCollectionBeSplitIntoChunks()) {
$processType = ProcessType::parallelChunk();
} else ... | [
"private",
"function",
"determineProcessType",
"(",
"Message",
"$",
"message",
",",
"MessageHandler",
"$",
"messageHandler",
")",
"{",
"if",
"(",
"$",
"messageHandler",
"->",
"canHandleMessage",
"(",
"$",
"message",
")",
")",
"{",
"if",
"(",
"$",
"message",
... | Determine the required process type based on given message and the message handler which will receive the message.
@param Message $message
@param MessageHandler $messageHandler
@return ProcessType
@throws Workflow\Exception\MessageIsNotManageable | [
"Determine",
"the",
"required",
"process",
"type",
"based",
"on",
"given",
"message",
"and",
"the",
"message",
"handler",
"which",
"will",
"receive",
"the",
"message",
"."
] | 3d6c8bdc72e855786227747bf06bcf8221f7860a | https://github.com/prooph/link-process-manager/blob/3d6c8bdc72e855786227747bf06bcf8221f7860a/src/Model/Workflow.php#L318-L340 |
233,120 | prooph/link-process-manager | src/Model/Workflow.php | Workflow.scheduleTaskFor | private function scheduleTaskFor(MessageHandler $messageHandler, ProcessingMetadata $taskMetadata, Message $workflowMessage)
{
if ($workflowMessage->messageType()->isCollectDataMessage()) {
$taskType = TaskType::collectData();
} elseif ($workflowMessage->messageType()->isDataCollectedMes... | php | private function scheduleTaskFor(MessageHandler $messageHandler, ProcessingMetadata $taskMetadata, Message $workflowMessage)
{
if ($workflowMessage->messageType()->isCollectDataMessage()) {
$taskType = TaskType::collectData();
} elseif ($workflowMessage->messageType()->isDataCollectedMes... | [
"private",
"function",
"scheduleTaskFor",
"(",
"MessageHandler",
"$",
"messageHandler",
",",
"ProcessingMetadata",
"$",
"taskMetadata",
",",
"Message",
"$",
"workflowMessage",
")",
"{",
"if",
"(",
"$",
"workflowMessage",
"->",
"messageType",
"(",
")",
"->",
"isCol... | Creates a new task for given message handler and workflow message
@param MessageHandler $messageHandler
@param ProcessingMetadata $taskMetadata
@param Workflow\Message $workflowMessage
@return \Prooph\Link\ProcessManager\Model\Task
@throws \RuntimeException | [
"Creates",
"a",
"new",
"task",
"for",
"given",
"message",
"handler",
"and",
"workflow",
"message"
] | 3d6c8bdc72e855786227747bf06bcf8221f7860a | https://github.com/prooph/link-process-manager/blob/3d6c8bdc72e855786227747bf06bcf8221f7860a/src/Model/Workflow.php#L351-L371 |
233,121 | opus-online/yii2-payment | lib/services/Payment.php | Payment.generateForms | public function generateForms(Transaction $transaction)
{
$paymentForms = array();
foreach ($this->paymentAdapters as $bankId => $paymentAdapter) {
if ($paymentAdapter->enabled) {
$form = new Form([], $paymentAdapter);
$paymentAdapter->fillPaymentFormDat... | php | public function generateForms(Transaction $transaction)
{
$paymentForms = array();
foreach ($this->paymentAdapters as $bankId => $paymentAdapter) {
if ($paymentAdapter->enabled) {
$form = new Form([], $paymentAdapter);
$paymentAdapter->fillPaymentFormDat... | [
"public",
"function",
"generateForms",
"(",
"Transaction",
"$",
"transaction",
")",
"{",
"$",
"paymentForms",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"paymentAdapters",
"as",
"$",
"bankId",
"=>",
"$",
"paymentAdapter",
")",
"{",
"if... | Generates payment forms for all enabled adapters
@param Transaction $transaction
@return Form[] | [
"Generates",
"payment",
"forms",
"for",
"all",
"enabled",
"adapters"
] | df48093f7ef1368a0992460bc66f12f0f090044c | https://github.com/opus-online/yii2-payment/blob/df48093f7ef1368a0992460bc66f12f0f090044c/lib/services/Payment.php#L40-L56 |
233,122 | opus-online/yii2-payment | lib/services/Payment.php | Payment.handleResponse | public function handleResponse(array $request)
{
foreach ($this->paymentAdapters as $adapter) {
$response = new Response($request, $adapter);
if ($adapter->enabled && $adapter->canHandlePaymentResponse($response)) {
$adapter->handlePaymentResponse($response);
... | php | public function handleResponse(array $request)
{
foreach ($this->paymentAdapters as $adapter) {
$response = new Response($request, $adapter);
if ($adapter->enabled && $adapter->canHandlePaymentResponse($response)) {
$adapter->handlePaymentResponse($response);
... | [
"public",
"function",
"handleResponse",
"(",
"array",
"$",
"request",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"paymentAdapters",
"as",
"$",
"adapter",
")",
"{",
"$",
"response",
"=",
"new",
"Response",
"(",
"$",
"request",
",",
"$",
"adapter",
")",
... | Handles the response received from the server after payment
@param array $request Data from $_REQUEST
@return Response
@throws \opus\payment\Exception | [
"Handles",
"the",
"response",
"received",
"from",
"the",
"server",
"after",
"payment"
] | df48093f7ef1368a0992460bc66f12f0f090044c | https://github.com/opus-online/yii2-payment/blob/df48093f7ef1368a0992460bc66f12f0f090044c/lib/services/Payment.php#L65-L79 |
233,123 | Deathnerd/php-wtforms | src/widgets/core/Select.php | Select.renderOption | public static function renderOption($value, $label, $selected, $options = [])
{
if ($value === true) {
// Handle the special case of a true value
$value = "true";
}
$options = array_merge($options, ["value" => $value]);
if ($selected) {
$options['s... | php | public static function renderOption($value, $label, $selected, $options = [])
{
if ($value === true) {
// Handle the special case of a true value
$value = "true";
}
$options = array_merge($options, ["value" => $value]);
if ($selected) {
$options['s... | [
"public",
"static",
"function",
"renderOption",
"(",
"$",
"value",
",",
"$",
"label",
",",
"$",
"selected",
",",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"$",
"value",
"===",
"true",
")",
"{",
"// Handle the special case of a true value",
"$",
... | Private method called when rendering each option as HTML
@param mixed $value
@param string $label
@param boolean $selected
@param array $options
@return string | [
"Private",
"method",
"called",
"when",
"rendering",
"each",
"option",
"as",
"HTML"
] | 2e1f9ad515f6241c9fac57edc472bf657267f4a1 | https://github.com/Deathnerd/php-wtforms/blob/2e1f9ad515f6241c9fac57edc472bf657267f4a1/src/widgets/core/Select.php#L63-L75 |
233,124 | kgilden/php-digidoc | src/Exception/ApiException.php | ApiException.createIncorrectStatus | public static function createIncorrectStatus($status, \Exception $e = null)
{
$message = 'Expected server status to be "OK", got "%s" instead';
return new static(sprintf($message, $status), null, $e);
} | php | public static function createIncorrectStatus($status, \Exception $e = null)
{
$message = 'Expected server status to be "OK", got "%s" instead';
return new static(sprintf($message, $status), null, $e);
} | [
"public",
"static",
"function",
"createIncorrectStatus",
"(",
"$",
"status",
",",
"\\",
"Exception",
"$",
"e",
"=",
"null",
")",
"{",
"$",
"message",
"=",
"'Expected server status to be \"OK\", got \"%s\" instead'",
";",
"return",
"new",
"static",
"(",
"sprintf",
... | Creates a new ApiException for incorrect response statuses.
@param string $status
@param \Exception|null $e
@return ApiException | [
"Creates",
"a",
"new",
"ApiException",
"for",
"incorrect",
"response",
"statuses",
"."
] | 88112ba05688fc1d32c0ff948cb8e1f4d2f264d3 | https://github.com/kgilden/php-digidoc/blob/88112ba05688fc1d32c0ff948cb8e1f4d2f264d3/src/Exception/ApiException.php#L90-L95 |
233,125 | kgilden/php-digidoc | src/Exception/ApiException.php | ApiException.createNotMerged | public static function createNotMerged(Envelope $envelope, \Exception $e = null)
{
$message = 'The given DigiDoc envelope must be merged with Api (using Api::merge) before calling this method.';
return new static($message, null, $e);
} | php | public static function createNotMerged(Envelope $envelope, \Exception $e = null)
{
$message = 'The given DigiDoc envelope must be merged with Api (using Api::merge) before calling this method.';
return new static($message, null, $e);
} | [
"public",
"static",
"function",
"createNotMerged",
"(",
"Envelope",
"$",
"envelope",
",",
"\\",
"Exception",
"$",
"e",
"=",
"null",
")",
"{",
"$",
"message",
"=",
"'The given DigiDoc envelope must be merged with Api (using Api::merge) before calling this method.'",
";",
"... | Creates a new ApiException for non-merged DigiDoc envelopes.
@param Envelope $envelope
@param \Exception|null $e
@return ApiException | [
"Creates",
"a",
"new",
"ApiException",
"for",
"non",
"-",
"merged",
"DigiDoc",
"envelopes",
"."
] | 88112ba05688fc1d32c0ff948cb8e1f4d2f264d3 | https://github.com/kgilden/php-digidoc/blob/88112ba05688fc1d32c0ff948cb8e1f4d2f264d3/src/Exception/ApiException.php#L105-L110 |
233,126 | netgen/ngpush | classes/twitteroauth.php | TwitterOAuth.getXAuthToken | function getXAuthToken($username, $password) {
$parameters = array();
$parameters['x_auth_username'] = $username;
$parameters['x_auth_password'] = $password;
$parameters['x_auth_mode'] = 'client_auth';
$request = $this->oAuthRequest($this->accessTokenURL(), 'POST', $parameters);
$token = OAuthUt... | php | function getXAuthToken($username, $password) {
$parameters = array();
$parameters['x_auth_username'] = $username;
$parameters['x_auth_password'] = $password;
$parameters['x_auth_mode'] = 'client_auth';
$request = $this->oAuthRequest($this->accessTokenURL(), 'POST', $parameters);
$token = OAuthUt... | [
"function",
"getXAuthToken",
"(",
"$",
"username",
",",
"$",
"password",
")",
"{",
"$",
"parameters",
"=",
"array",
"(",
")",
";",
"$",
"parameters",
"[",
"'x_auth_username'",
"]",
"=",
"$",
"username",
";",
"$",
"parameters",
"[",
"'x_auth_password'",
"]"... | One time exchange of username and password for access token and secret.
@returns array("oauth_token" => "the-access-token",
"oauth_token_secret" => "the-access-secret",
"user_id" => "9436992",
"screen_name" => "abraham",
"x_auth_expires" => "0") | [
"One",
"time",
"exchange",
"of",
"username",
"and",
"password",
"for",
"access",
"token",
"and",
"secret",
"."
] | 0e12d13876b34ae2a1bf51cee35b44736cefba0b | https://github.com/netgen/ngpush/blob/0e12d13876b34ae2a1bf51cee35b44736cefba0b/classes/twitteroauth.php#L127-L136 |
233,127 | czukowski/I18n_Plural | classes/I18n/Core.php | Core.form | public function form($string, $form = NULL, $lang = NULL)
{
$translation = $this->get($string, $lang);
if (is_array($translation))
{
if (array_key_exists($form, $translation))
{
return $translation[$form];
}
elseif (array_key_exists('other', $translation))
{
return $translation['other'];
... | php | public function form($string, $form = NULL, $lang = NULL)
{
$translation = $this->get($string, $lang);
if (is_array($translation))
{
if (array_key_exists($form, $translation))
{
return $translation[$form];
}
elseif (array_key_exists('other', $translation))
{
return $translation['other'];
... | [
"public",
"function",
"form",
"(",
"$",
"string",
",",
"$",
"form",
"=",
"NULL",
",",
"$",
"lang",
"=",
"NULL",
")",
"{",
"$",
"translation",
"=",
"$",
"this",
"->",
"get",
"(",
"$",
"string",
",",
"$",
"lang",
")",
";",
"if",
"(",
"is_array",
... | Returns specified form of a string translation. If no translation exists, the original string will be
returned. No parameters are replaced.
$hello = $i18n->form('I\'ve met :name, he is my friend now.', 'fem');
// I've met :name, she is my friend now.
@param string $string
@param string $form if NULL, looking f... | [
"Returns",
"specified",
"form",
"of",
"a",
"string",
"translation",
".",
"If",
"no",
"translation",
"exists",
"the",
"original",
"string",
"will",
"be",
"returned",
".",
"No",
"parameters",
"are",
"replaced",
"."
] | 6782aeac50e22a194d3840759c9da97d1f9c50d0 | https://github.com/czukowski/I18n_Plural/blob/6782aeac50e22a194d3840759c9da97d1f9c50d0/classes/I18n/Core.php#L86-L102 |
233,128 | czukowski/I18n_Plural | classes/I18n/Core.php | Core.get | protected function get($string, $lang)
{
// If fallbacks are used, split language parts and iterate each reader using each part.
// If fallbacks are not used, just use the specified language and let the reader implementation
// take care of the translation fallbacks.
$lang_fallback_path = $this->_use_fallback
... | php | protected function get($string, $lang)
{
// If fallbacks are used, split language parts and iterate each reader using each part.
// If fallbacks are not used, just use the specified language and let the reader implementation
// take care of the translation fallbacks.
$lang_fallback_path = $this->_use_fallback
... | [
"protected",
"function",
"get",
"(",
"$",
"string",
",",
"$",
"lang",
")",
"{",
"// If fallbacks are used, split language parts and iterate each reader using each part.",
"// If fallbacks are not used, just use the specified language and let the reader implementation",
"// take care of the... | Returns the translation from the first reader where it exists, or the input string
if no translation is available.
@param string $string
@param string $lang
@return string | [
"Returns",
"the",
"translation",
"from",
"the",
"first",
"reader",
"where",
"it",
"exists",
"or",
"the",
"input",
"string",
"if",
"no",
"translation",
"is",
"available",
"."
] | 6782aeac50e22a194d3840759c9da97d1f9c50d0 | https://github.com/czukowski/I18n_Plural/blob/6782aeac50e22a194d3840759c9da97d1f9c50d0/classes/I18n/Core.php#L133-L152 |
233,129 | czukowski/I18n_Plural | classes/I18n/Core.php | Core.use_fallback | public function use_fallback($boolean = NULL)
{
if ($boolean === NULL)
{
return $this->_use_fallback;
}
$this->_use_fallback = $boolean;
return $this;
} | php | public function use_fallback($boolean = NULL)
{
if ($boolean === NULL)
{
return $this->_use_fallback;
}
$this->_use_fallback = $boolean;
return $this;
} | [
"public",
"function",
"use_fallback",
"(",
"$",
"boolean",
"=",
"NULL",
")",
"{",
"if",
"(",
"$",
"boolean",
"===",
"NULL",
")",
"{",
"return",
"$",
"this",
"->",
"_use_fallback",
";",
"}",
"$",
"this",
"->",
"_use_fallback",
"=",
"$",
"boolean",
";",
... | Switch `get` method behavior to either request the translation from the readers with
or without fallback to less specific languages. If called without parameters, returns
the current internal value.
@param boolean|NULL $boolean
@return $this|boolean | [
"Switch",
"get",
"method",
"behavior",
"to",
"either",
"request",
"the",
"translation",
"from",
"the",
"readers",
"with",
"or",
"without",
"fallback",
"to",
"less",
"specific",
"languages",
".",
"If",
"called",
"without",
"parameters",
"returns",
"the",
"current... | 6782aeac50e22a194d3840759c9da97d1f9c50d0 | https://github.com/czukowski/I18n_Plural/blob/6782aeac50e22a194d3840759c9da97d1f9c50d0/classes/I18n/Core.php#L185-L193 |
233,130 | czukowski/I18n_Plural | classes/I18n/Core.php | Core.plural_rules | protected function plural_rules($lang)
{
if ( ! isset($this->_rules[$lang]))
{
// Get language code prefix
$parts = explode('-', $lang, 2);
$this->_rules[$lang] = $this->plural_rules_factory()
->create_rules($parts[0]);
}
return $this->_rules[$lang];
} | php | protected function plural_rules($lang)
{
if ( ! isset($this->_rules[$lang]))
{
// Get language code prefix
$parts = explode('-', $lang, 2);
$this->_rules[$lang] = $this->plural_rules_factory()
->create_rules($parts[0]);
}
return $this->_rules[$lang];
} | [
"protected",
"function",
"plural_rules",
"(",
"$",
"lang",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"_rules",
"[",
"$",
"lang",
"]",
")",
")",
"{",
"// Get language code prefix",
"$",
"parts",
"=",
"explode",
"(",
"'-'",
",",
"$",
"... | Plural rules lazy initialization
@param string $lang
@return Plural\Rules | [
"Plural",
"rules",
"lazy",
"initialization"
] | 6782aeac50e22a194d3840759c9da97d1f9c50d0 | https://github.com/czukowski/I18n_Plural/blob/6782aeac50e22a194d3840759c9da97d1f9c50d0/classes/I18n/Core.php#L201-L211 |
233,131 | CampaignChain/core | Module/BundleConfig.php | BundleConfig.getNewBundles | public function getNewBundles()
{
$bundles = $this->bundleLocatorService->getAvailableBundles();
$newBundles = [];
foreach ($bundles as $bundle) {
// Check whether this bundle has already been installed
switch ($this->isRegisteredBundle($bundle)) {
ca... | php | public function getNewBundles()
{
$bundles = $this->bundleLocatorService->getAvailableBundles();
$newBundles = [];
foreach ($bundles as $bundle) {
// Check whether this bundle has already been installed
switch ($this->isRegisteredBundle($bundle)) {
ca... | [
"public",
"function",
"getNewBundles",
"(",
")",
"{",
"$",
"bundles",
"=",
"$",
"this",
"->",
"bundleLocatorService",
"->",
"getAvailableBundles",
"(",
")",
";",
"$",
"newBundles",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"bundles",
"as",
"$",
"bundle",
... | Return only new or need to be updated Bundles
skipVersion == false
@return Bundle[] | [
"Return",
"only",
"new",
"or",
"need",
"to",
"be",
"updated",
"Bundles",
"skipVersion",
"==",
"false"
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Module/BundleConfig.php#L52-L91 |
233,132 | swoft-cloud/swoft-console | src/Router/HandlerMapping.php | HandlerMapping.getPrefix | public function getPrefix(string $prefix, string $className): string
{
// the prefix of annotation is exist
if (! empty($prefix)) {
return $prefix;
}
// the prefix of annotation is empty
$reg = '/^.*\\\(\w+)' . $this->suffix . '$/';
$prefix = '';
... | php | public function getPrefix(string $prefix, string $className): string
{
// the prefix of annotation is exist
if (! empty($prefix)) {
return $prefix;
}
// the prefix of annotation is empty
$reg = '/^.*\\\(\w+)' . $this->suffix . '$/';
$prefix = '';
... | [
"public",
"function",
"getPrefix",
"(",
"string",
"$",
"prefix",
",",
"string",
"$",
"className",
")",
":",
"string",
"{",
"// the prefix of annotation is exist",
"if",
"(",
"!",
"empty",
"(",
"$",
"prefix",
")",
")",
"{",
"return",
"$",
"prefix",
";",
"}... | Get command from class name
@param string $prefix
@param string $className
@return string | [
"Get",
"command",
"from",
"class",
"name"
] | d7153f56505a9be420ebae9eb29f7e45bfb2982e | https://github.com/swoft-cloud/swoft-console/blob/d7153f56505a9be420ebae9eb29f7e45bfb2982e/src/Router/HandlerMapping.php#L167-L183 |
233,133 | jkphl/rdfa-lite-microdata | src/RdfaLiteMicrodata/Infrastructure/Parser/PropertyProcessorTrait.php | PropertyProcessorTrait.processPropertyPrefixName | protected function processPropertyPrefixName($prefix, $name, \DOMElement $element, ContextInterface $context, $last)
{
$vocabulary = $this->getVocabulary($prefix, $context);
if ($vocabulary instanceof VocabularyInterface) {
try {
$context = $this->addProperty($element, $c... | php | protected function processPropertyPrefixName($prefix, $name, \DOMElement $element, ContextInterface $context, $last)
{
$vocabulary = $this->getVocabulary($prefix, $context);
if ($vocabulary instanceof VocabularyInterface) {
try {
$context = $this->addProperty($element, $c... | [
"protected",
"function",
"processPropertyPrefixName",
"(",
"$",
"prefix",
",",
"$",
"name",
",",
"\\",
"DOMElement",
"$",
"element",
",",
"ContextInterface",
"$",
"context",
",",
"$",
"last",
")",
"{",
"$",
"vocabulary",
"=",
"$",
"this",
"->",
"getVocabular... | Create a property by prefix and name
@param string $prefix Property prefix
@param string $name Property name
@param \DOMElement $element DOM element
@param ContextInterface $context Inherited Context
@param boolean $last Last property
@return ContextInterface Local context for this element | [
"Create",
"a",
"property",
"by",
"prefix",
"and",
"name"
] | 12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8 | https://github.com/jkphl/rdfa-lite-microdata/blob/12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8/src/RdfaLiteMicrodata/Infrastructure/Parser/PropertyProcessorTrait.php#L65-L77 |
233,134 | jkphl/rdfa-lite-microdata | src/RdfaLiteMicrodata/Infrastructure/Parser/PropertyProcessorTrait.php | PropertyProcessorTrait.addProperty | protected function addProperty(
\DOMElement $element,
ContextInterface $context,
$name,
VocabularyInterface $vocabulary,
$last
) {
$resourceId = $this->getResourceId($element);
// Get the property value
$propertyValue = $this->getPropertyValue($elemen... | php | protected function addProperty(
\DOMElement $element,
ContextInterface $context,
$name,
VocabularyInterface $vocabulary,
$last
) {
$resourceId = $this->getResourceId($element);
// Get the property value
$propertyValue = $this->getPropertyValue($elemen... | [
"protected",
"function",
"addProperty",
"(",
"\\",
"DOMElement",
"$",
"element",
",",
"ContextInterface",
"$",
"context",
",",
"$",
"name",
",",
"VocabularyInterface",
"$",
"vocabulary",
",",
"$",
"last",
")",
"{",
"$",
"resourceId",
"=",
"$",
"this",
"->",
... | Add a single property
@param \DOMElement $element DOM element
@param ContextInterface $context Inherited Context
@param string $name Property name
@param VocabularyInterface $vocabulary Property vocabulary
@param boolean $last Last property
@return ContextInterface Local context for this element | [
"Add",
"a",
"single",
"property"
] | 12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8 | https://github.com/jkphl/rdfa-lite-microdata/blob/12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8/src/RdfaLiteMicrodata/Infrastructure/Parser/PropertyProcessorTrait.php#L98-L115 |
233,135 | jkphl/rdfa-lite-microdata | src/RdfaLiteMicrodata/Infrastructure/Parser/PropertyProcessorTrait.php | PropertyProcessorTrait.getPropertyContentAttrValue | protected function getPropertyContentAttrValue(\DOMElement $element)
{
$value = trim($element->getAttribute('content'));
return strlen($value) ? $value : null;
} | php | protected function getPropertyContentAttrValue(\DOMElement $element)
{
$value = trim($element->getAttribute('content'));
return strlen($value) ? $value : null;
} | [
"protected",
"function",
"getPropertyContentAttrValue",
"(",
"\\",
"DOMElement",
"$",
"element",
")",
"{",
"$",
"value",
"=",
"trim",
"(",
"$",
"element",
"->",
"getAttribute",
"(",
"'content'",
")",
")",
";",
"return",
"strlen",
"(",
"$",
"value",
")",
"?... | Return a content attribute property value
@param \DOMElement $element DOM element
@return null|string Property value | [
"Return",
"a",
"content",
"attribute",
"property",
"value"
] | 12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8 | https://github.com/jkphl/rdfa-lite-microdata/blob/12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8/src/RdfaLiteMicrodata/Infrastructure/Parser/PropertyProcessorTrait.php#L210-L214 |
233,136 | jkphl/rdfa-lite-microdata | src/RdfaLiteMicrodata/Infrastructure/Parser/PropertyProcessorTrait.php | PropertyProcessorTrait.addPropertyChild | protected function addPropertyChild($propertyValue, ContextInterface $context, $last)
{
// If the property value is a thing and this is the element's last property
if (($propertyValue instanceof ThingInterface) && $last) {
// Set the thing as parent thing for nested iterations
... | php | protected function addPropertyChild($propertyValue, ContextInterface $context, $last)
{
// If the property value is a thing and this is the element's last property
if (($propertyValue instanceof ThingInterface) && $last) {
// Set the thing as parent thing for nested iterations
... | [
"protected",
"function",
"addPropertyChild",
"(",
"$",
"propertyValue",
",",
"ContextInterface",
"$",
"context",
",",
"$",
"last",
")",
"{",
"// If the property value is a thing and this is the element's last property",
"if",
"(",
"(",
"$",
"propertyValue",
"instanceof",
... | Add a property child
@param string|ThingInterface Property value
@param ContextInterface $context Inherited Context
@param boolean $last Last property
@return ContextInterface Local context for this element | [
"Add",
"a",
"property",
"child"
] | 12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8 | https://github.com/jkphl/rdfa-lite-microdata/blob/12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8/src/RdfaLiteMicrodata/Infrastructure/Parser/PropertyProcessorTrait.php#L243-L252 |
233,137 | jkphl/rdfa-lite-microdata | src/RdfaLiteMicrodata/Application/Context/AbstractContext.php | AbstractContext.setParentThing | public function setParentThing(ThingInterface $parentThing)
{
// If the new parent thing differs from the current one
if ($this->parentThing !== $parentThing) {
$context = clone $this;
$context->parentThing = $parentThing;
return $context;
}
retur... | php | public function setParentThing(ThingInterface $parentThing)
{
// If the new parent thing differs from the current one
if ($this->parentThing !== $parentThing) {
$context = clone $this;
$context->parentThing = $parentThing;
return $context;
}
retur... | [
"public",
"function",
"setParentThing",
"(",
"ThingInterface",
"$",
"parentThing",
")",
"{",
"// If the new parent thing differs from the current one",
"if",
"(",
"$",
"this",
"->",
"parentThing",
"!==",
"$",
"parentThing",
")",
"{",
"$",
"context",
"=",
"clone",
"$... | Set the parent thing
@param ThingInterface $parentThing Parent thing
@return ContextInterface Self reference | [
"Set",
"the",
"parent",
"thing"
] | 12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8 | https://github.com/jkphl/rdfa-lite-microdata/blob/12ea2dcc2bc9d3b78784530b08205c79b2dd7bd8/src/RdfaLiteMicrodata/Application/Context/AbstractContext.php#L106-L116 |
233,138 | CampaignChain/core | Controller/SecurityController.php | SecurityController.loginAction | public function loginAction(Request $request)
{
if ($this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
return $this->redirectToRoute('campaignchain_core_homepage');
}
return parent::loginAction($request);
} | php | public function loginAction(Request $request)
{
if ($this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
return $this->redirectToRoute('campaignchain_core_homepage');
}
return parent::loginAction($request);
} | [
"public",
"function",
"loginAction",
"(",
"Request",
"$",
"request",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"get",
"(",
"'security.authorization_checker'",
")",
"->",
"isGranted",
"(",
"'IS_AUTHENTICATED_REMEMBERED'",
")",
")",
"{",
"return",
"$",
"this",
"->... | redirect to home when already authenticated
@param Request $request
@return \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response | [
"redirect",
"to",
"home",
"when",
"already",
"authenticated"
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Controller/SecurityController.php#L32-L40 |
233,139 | CampaignChain/core | Module/Repository.php | Repository.getModulesFromRepository | public function getModulesFromRepository()
{
$modules = array();
$system = $this->systemService->getActiveSystem();
foreach($this->repositories as $repository){
// Retrieve compatible modules.
$client = new Client([
'base_uri' => $repository,
... | php | public function getModulesFromRepository()
{
$modules = array();
$system = $this->systemService->getActiveSystem();
foreach($this->repositories as $repository){
// Retrieve compatible modules.
$client = new Client([
'base_uri' => $repository,
... | [
"public",
"function",
"getModulesFromRepository",
"(",
")",
"{",
"$",
"modules",
"=",
"array",
"(",
")",
";",
"$",
"system",
"=",
"$",
"this",
"->",
"systemService",
"->",
"getActiveSystem",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"repositories",... | Retrieve compatible modules from repositories.
@return array | [
"Retrieve",
"compatible",
"modules",
"from",
"repositories",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Module/Repository.php#L90-L112 |
233,140 | CampaignChain/core | Module/Repository.php | Repository.getAll | public function getAll()
{
if (!$this->loadRepositories()) {
return Repository::STATUS_NO_REPOSITORIES;
}
$modules = $this->getModulesFromRepository();
// Is a higher version of an already installed package available?
foreach ($modules as $key => $module) {
... | php | public function getAll()
{
if (!$this->loadRepositories()) {
return Repository::STATUS_NO_REPOSITORIES;
}
$modules = $this->getModulesFromRepository();
// Is a higher version of an already installed package available?
foreach ($modules as $key => $module) {
... | [
"public",
"function",
"getAll",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"loadRepositories",
"(",
")",
")",
"{",
"return",
"Repository",
"::",
"STATUS_NO_REPOSITORIES",
";",
"}",
"$",
"modules",
"=",
"$",
"this",
"->",
"getModulesFromRepository",
... | Get module versions from CampaignChain.
@return array|string | [
"Get",
"module",
"versions",
"from",
"CampaignChain",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Module/Repository.php#L119-L145 |
233,141 | CampaignChain/core | Module/Repository.php | Repository.getInstalls | public function getInstalls()
{
if (!$this->loadRepositories()) {
return Repository::STATUS_NO_REPOSITORIES;
}
$modules = $this->getModulesFromRepository();
// Is the package already installed? If yes, is a higher version available?
foreach ($modules as $key => ... | php | public function getInstalls()
{
if (!$this->loadRepositories()) {
return Repository::STATUS_NO_REPOSITORIES;
}
$modules = $this->getModulesFromRepository();
// Is the package already installed? If yes, is a higher version available?
foreach ($modules as $key => ... | [
"public",
"function",
"getInstalls",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"loadRepositories",
"(",
")",
")",
"{",
"return",
"Repository",
"::",
"STATUS_NO_REPOSITORIES",
";",
"}",
"$",
"modules",
"=",
"$",
"this",
"->",
"getModulesFromRepository... | Get modules that needs to be installed.
@return array|string | [
"Get",
"modules",
"that",
"needs",
"to",
"be",
"installed",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Module/Repository.php#L152-L171 |
233,142 | CampaignChain/core | Module/Repository.php | Repository.getUpdates | public function getUpdates()
{
if (!$this->loadRepositories()) {
return Repository::STATUS_NO_REPOSITORIES;
}
$modules = $this->getModulesFromRepository();
// Is a higher version of an already installed package available?
foreach ($modules as $key => $module) {
... | php | public function getUpdates()
{
if (!$this->loadRepositories()) {
return Repository::STATUS_NO_REPOSITORIES;
}
$modules = $this->getModulesFromRepository();
// Is a higher version of an already installed package available?
foreach ($modules as $key => $module) {
... | [
"public",
"function",
"getUpdates",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"loadRepositories",
"(",
")",
")",
"{",
"return",
"Repository",
"::",
"STATUS_NO_REPOSITORIES",
";",
"}",
"$",
"modules",
"=",
"$",
"this",
"->",
"getModulesFromRepository"... | Get updates from CampaignChain.
@return array|string | [
"Get",
"updates",
"from",
"CampaignChain",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Module/Repository.php#L178-L202 |
233,143 | sveneisenschmidt/bmecat | src/SE/Component/BMEcat/DocumentBuilder.php | DocumentBuilder.build | public function build()
{
if(($document = $this->getDocument()) === null) {
$document = $this->loader->getInstance(NodeLoader::DOCUMENT_NODE);
$this->setDocument($document);
}
if(($header = $document->getHeader()) === null) {
$header = $this->loader->getI... | php | public function build()
{
if(($document = $this->getDocument()) === null) {
$document = $this->loader->getInstance(NodeLoader::DOCUMENT_NODE);
$this->setDocument($document);
}
if(($header = $document->getHeader()) === null) {
$header = $this->loader->getI... | [
"public",
"function",
"build",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"document",
"=",
"$",
"this",
"->",
"getDocument",
"(",
")",
")",
"===",
"null",
")",
"{",
"$",
"document",
"=",
"$",
"this",
"->",
"loader",
"->",
"getInstance",
"(",
"NodeLoader",
... | Builds the BMEcat document tree
@return \SE\Component\BMEcat\Node\DocumentNode | [
"Builds",
"the",
"BMEcat",
"document",
"tree"
] | 1f0713fb4ee910b60ccdf8fda4ae35ab5d6c5c2e | https://github.com/sveneisenschmidt/bmecat/blob/1f0713fb4ee910b60ccdf8fda4ae35ab5d6c5c2e/src/SE/Component/BMEcat/DocumentBuilder.php#L140-L173 |
233,144 | prooph/link-process-manager | src/Projection/MessageHandler/MessageHandlerFinder.php | MessageHandlerFinder.findByProcessingId | public function findByProcessingId($processingId)
{
$handlers = [];
$builder = $this->connection->createQueryBuilder();
$builder->select('*')->from(Tables::MESSAGE_HANDLER)
->where($builder->expr()->eq('processing_id', ':processing_id'))
->setParameter('processing_i... | php | public function findByProcessingId($processingId)
{
$handlers = [];
$builder = $this->connection->createQueryBuilder();
$builder->select('*')->from(Tables::MESSAGE_HANDLER)
->where($builder->expr()->eq('processing_id', ':processing_id'))
->setParameter('processing_i... | [
"public",
"function",
"findByProcessingId",
"(",
"$",
"processingId",
")",
"{",
"$",
"handlers",
"=",
"[",
"]",
";",
"$",
"builder",
"=",
"$",
"this",
"->",
"connection",
"->",
"createQueryBuilder",
"(",
")",
";",
"$",
"builder",
"->",
"select",
"(",
"'*... | Find all message handler with given processing_id
@param string $processingId
@return array of message handlers data | [
"Find",
"all",
"message",
"handler",
"with",
"given",
"processing_id"
] | 3d6c8bdc72e855786227747bf06bcf8221f7860a | https://github.com/prooph/link-process-manager/blob/3d6c8bdc72e855786227747bf06bcf8221f7860a/src/Projection/MessageHandler/MessageHandlerFinder.php#L70-L86 |
233,145 | joomla-framework/twitter-api | src/Statuses.php | Statuses.getHomeTimeline | public function getHomeTimeline($count = 20, $noReplies = null, $sinceId = 0, $maxId = 0, $trimUser = null, $contributor = null, $entities = null)
{
// Check the rate limit for remaining hits
$this->checkRateLimit('statuses', 'home_timeline');
$data = array();
// Set the API base
$path = '/statuses/home_ti... | php | public function getHomeTimeline($count = 20, $noReplies = null, $sinceId = 0, $maxId = 0, $trimUser = null, $contributor = null, $entities = null)
{
// Check the rate limit for remaining hits
$this->checkRateLimit('statuses', 'home_timeline');
$data = array();
// Set the API base
$path = '/statuses/home_ti... | [
"public",
"function",
"getHomeTimeline",
"(",
"$",
"count",
"=",
"20",
",",
"$",
"noReplies",
"=",
"null",
",",
"$",
"sinceId",
"=",
"0",
",",
"$",
"maxId",
"=",
"0",
",",
"$",
"trimUser",
"=",
"null",
",",
"$",
"contributor",
"=",
"null",
",",
"$"... | Method to retrieve collection of the most recent Tweets and retweets posted by the authenticating user and the users they follow.
The home timeline is central to how most users interact with the Twitter service.
@param integer $count Specifies the number of tweets to try and retrieve, up to a maximum of 200.... | [
"Method",
"to",
"retrieve",
"collection",
"of",
"the",
"most",
"recent",
"Tweets",
"and",
"retweets",
"posted",
"by",
"the",
"authenticating",
"user",
"and",
"the",
"users",
"they",
"follow",
".",
"The",
"home",
"timeline",
"is",
"central",
"to",
"how",
"mos... | 289719bbd67e83c7cfaf515b94b1d5497b1f0525 | https://github.com/joomla-framework/twitter-api/blob/289719bbd67e83c7cfaf515b94b1d5497b1f0525/src/Statuses.php#L178-L229 |
233,146 | joomla-framework/twitter-api | src/Statuses.php | Statuses.retweet | public function retweet($id, $trimUser = null)
{
// Set the API path
$path = '/statuses/retweet/' . $id . '.json';
$data = array();
// Check if trim_user is specified
if ($trimUser !== null)
{
$data['trim_user'] = $trimUser;
}
// Send the request.
return $this->sendRequest($path, 'POST', $data)... | php | public function retweet($id, $trimUser = null)
{
// Set the API path
$path = '/statuses/retweet/' . $id . '.json';
$data = array();
// Check if trim_user is specified
if ($trimUser !== null)
{
$data['trim_user'] = $trimUser;
}
// Send the request.
return $this->sendRequest($path, 'POST', $data)... | [
"public",
"function",
"retweet",
"(",
"$",
"id",
",",
"$",
"trimUser",
"=",
"null",
")",
"{",
"// Set the API path",
"$",
"path",
"=",
"'/statuses/retweet/'",
".",
"$",
"id",
".",
"'.json'",
";",
"$",
"data",
"=",
"array",
"(",
")",
";",
"// Check if tri... | Method to retweet a tweet.
@param integer $id The numerical ID of the desired status.
@param boolean $trimUser When set to true, each tweet returned in a timeline will include a user object including only the status author's
numerical ID.
@return array The decoded JSON response
@since 1.0 | [
"Method",
"to",
"retweet",
"a",
"tweet",
"."
] | 289719bbd67e83c7cfaf515b94b1d5497b1f0525 | https://github.com/joomla-framework/twitter-api/blob/289719bbd67e83c7cfaf515b94b1d5497b1f0525/src/Statuses.php#L547-L562 |
233,147 | prooph/link-process-manager | src/Model/MessageHandler/ProcessingTypes.php | ProcessingTypes.support | public static function support(array $processingTypes)
{
$prototypes = [];
foreach ($processingTypes as $typeClassOrPrototype) {
if ($typeClassOrPrototype instanceof Prototype) {
$prototypes[] = $typeClassOrPrototype;
} else {
Assertion::strin... | php | public static function support(array $processingTypes)
{
$prototypes = [];
foreach ($processingTypes as $typeClassOrPrototype) {
if ($typeClassOrPrototype instanceof Prototype) {
$prototypes[] = $typeClassOrPrototype;
} else {
Assertion::strin... | [
"public",
"static",
"function",
"support",
"(",
"array",
"$",
"processingTypes",
")",
"{",
"$",
"prototypes",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"processingTypes",
"as",
"$",
"typeClassOrPrototype",
")",
"{",
"if",
"(",
"$",
"typeClassOrPrototype",
"in... | Supported processing types can be given as processing prototypes or a list of type classes
@param Prototype[]|array $processingTypes
@return ProcessingTypes | [
"Supported",
"processing",
"types",
"can",
"be",
"given",
"as",
"processing",
"prototypes",
"or",
"a",
"list",
"of",
"type",
"classes"
] | 3d6c8bdc72e855786227747bf06bcf8221f7860a | https://github.com/prooph/link-process-manager/blob/3d6c8bdc72e855786227747bf06bcf8221f7860a/src/Model/MessageHandler/ProcessingTypes.php#L47-L63 |
233,148 | snelg/cakephp-3-cas | src/Auth/CasAuthenticate.php | CasAuthenticate.logout | public function logout(Event $event)
{
if (phpCAS::isAuthenticated()) {
//Step 1. When the client clicks logout, this will run.
// phpCAS::logout will redirect the client to the CAS server.
// The CAS server will, in turn, redirect the client back to
... | php | public function logout(Event $event)
{
if (phpCAS::isAuthenticated()) {
//Step 1. When the client clicks logout, this will run.
// phpCAS::logout will redirect the client to the CAS server.
// The CAS server will, in turn, redirect the client back to
... | [
"public",
"function",
"logout",
"(",
"Event",
"$",
"event",
")",
"{",
"if",
"(",
"phpCAS",
"::",
"isAuthenticated",
"(",
")",
")",
"{",
"//Step 1. When the client clicks logout, this will run.",
"// phpCAS::logout will redirect the client to the CAS server.",
"// ... | Log a user out. Interrupts initial call to AuthComponent logout
to handle CAS logout, which happens on separate CAS server
@param Event $event Auth.logout event
@return void | [
"Log",
"a",
"user",
"out",
".",
"Interrupts",
"initial",
"call",
"to",
"AuthComponent",
"logout",
"to",
"handle",
"CAS",
"logout",
"which",
"happens",
"on",
"separate",
"CAS",
"server"
] | eb60ad37c0afd404e7a33d8783e3a3add0bdf2cb | https://github.com/snelg/cakephp-3-cas/blob/eb60ad37c0afd404e7a33d8783e3a3add0bdf2cb/src/Auth/CasAuthenticate.php#L134-L158 |
233,149 | ionux/phactor | src/Signature.php | Signature.Generate | public function Generate($message, $private_key)
{
$e = '';
$k = '';
$r = '';
$s = '';
$R = array();
$signature = array();
$private_key = $this->encodeHex($private_key);
$this->hexLenCheck($private_key);
... | php | public function Generate($message, $private_key)
{
$e = '';
$k = '';
$r = '';
$s = '';
$R = array();
$signature = array();
$private_key = $this->encodeHex($private_key);
$this->hexLenCheck($private_key);
... | [
"public",
"function",
"Generate",
"(",
"$",
"message",
",",
"$",
"private_key",
")",
"{",
"$",
"e",
"=",
"''",
";",
"$",
"k",
"=",
"''",
";",
"$",
"r",
"=",
"''",
";",
"$",
"s",
"=",
"''",
";",
"$",
"R",
"=",
"array",
"(",
")",
";",
"$",
... | Generates an ECDSA signature for a message using the private key
parameter in hex format. Returns an associative array of all the
signature data including raw point information and the signature.
@param string $message The message to be signed.
@param string $private_key The private key in hex.
@return str... | [
"Generates",
"an",
"ECDSA",
"signature",
"for",
"a",
"message",
"using",
"the",
"private",
"key",
"parameter",
"in",
"hex",
"format",
".",
"Returns",
"an",
"associative",
"array",
"of",
"all",
"the",
"signature",
"data",
"including",
"raw",
"point",
"informati... | 667064d3930e043fd78abed9a2324aee52466fa5 | https://github.com/ionux/phactor/blob/667064d3930e043fd78abed9a2324aee52466fa5/src/Signature.php#L113-L162 |
233,150 | ionux/phactor | src/Signature.php | Signature.Verify | public function Verify($sig, $msg, $pubkey)
{
if (true === empty($sig) || true === empty($msg) || true === empty($pubkey)) {
throw new \Exception('The signature, public key and message parameters are required to verify a signature. Value received for first parameter was "' . var_export($sig, tr... | php | public function Verify($sig, $msg, $pubkey)
{
if (true === empty($sig) || true === empty($msg) || true === empty($pubkey)) {
throw new \Exception('The signature, public key and message parameters are required to verify a signature. Value received for first parameter was "' . var_export($sig, tr... | [
"public",
"function",
"Verify",
"(",
"$",
"sig",
",",
"$",
"msg",
",",
"$",
"pubkey",
")",
"{",
"if",
"(",
"true",
"===",
"empty",
"(",
"$",
"sig",
")",
"||",
"true",
"===",
"empty",
"(",
"$",
"msg",
")",
"||",
"true",
"===",
"empty",
"(",
"$",... | Verifies an ECDSA signature previously generated.
@param string $sig The signature in hex.
@param string $msg The message signed.
@param string $pubkey The uncompressed public key of the signer.
@return bool The result of the verification.
@throws \Exception | [
"Verifies",
"an",
"ECDSA",
"signature",
"previously",
"generated",
"."
] | 667064d3930e043fd78abed9a2324aee52466fa5 | https://github.com/ionux/phactor/blob/667064d3930e043fd78abed9a2324aee52466fa5/src/Signature.php#L173-L231 |
233,151 | ionux/phactor | src/Signature.php | Signature.parseSig | private function parseSig($signature)
{
$signature = trim($signature);
/* This is the main structure we'll use for storing our parsed signature. */
$ecdsa_struct = array(
'sigstart' => '',
'siglen' => '',
... | php | private function parseSig($signature)
{
$signature = trim($signature);
/* This is the main structure we'll use for storing our parsed signature. */
$ecdsa_struct = array(
'sigstart' => '',
'siglen' => '',
... | [
"private",
"function",
"parseSig",
"(",
"$",
"signature",
")",
"{",
"$",
"signature",
"=",
"trim",
"(",
"$",
"signature",
")",
";",
"/* This is the main structure we'll use for storing our parsed signature. */",
"$",
"ecdsa_struct",
"=",
"array",
"(",
"'sigstart'",
"=... | Parses a ECDSA signature to retrieve the r and s coordinate pair. Used to verify a point.
@param string $signature The ECDSA signature to parse.
@return array The r and s coordinates. | [
"Parses",
"a",
"ECDSA",
"signature",
"to",
"retrieve",
"the",
"r",
"and",
"s",
"coordinate",
"pair",
".",
"Used",
"to",
"verify",
"a",
"point",
"."
] | 667064d3930e043fd78abed9a2324aee52466fa5 | https://github.com/ionux/phactor/blob/667064d3930e043fd78abed9a2324aee52466fa5/src/Signature.php#L265-L337 |
233,152 | ionux/phactor | src/Signature.php | Signature.generateFromConstructor | private function generateFromConstructor($message, $private_key)
{
if (empty($message) === false && empty($private_key) === false) {
$this->Generate($message, $private_key);
}
} | php | private function generateFromConstructor($message, $private_key)
{
if (empty($message) === false && empty($private_key) === false) {
$this->Generate($message, $private_key);
}
} | [
"private",
"function",
"generateFromConstructor",
"(",
"$",
"message",
",",
"$",
"private_key",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"message",
")",
"===",
"false",
"&&",
"empty",
"(",
"$",
"private_key",
")",
"===",
"false",
")",
"{",
"$",
"this",
... | Called to generate a signature if values are passed to the constructor.
@param string $message The message to sign.
@param string $private_key The signer's private key. | [
"Called",
"to",
"generate",
"a",
"signature",
"if",
"values",
"are",
"passed",
"to",
"the",
"constructor",
"."
] | 667064d3930e043fd78abed9a2324aee52466fa5 | https://github.com/ionux/phactor/blob/667064d3930e043fd78abed9a2324aee52466fa5/src/Signature.php#L410-L415 |
233,153 | stanislav-web/phalcon-translate | src/Translate/Translator.php | Translator.assign | public function assign($signature) {
$file = $this->path.$this->language.DIRECTORY_SEPARATOR.$signature.'.php';
// content does not loaded yet
if(isset($this->required[$file]) === false) {
if (file_exists($file) === true) {
$content = include $file;
... | php | public function assign($signature) {
$file = $this->path.$this->language.DIRECTORY_SEPARATOR.$signature.'.php';
// content does not loaded yet
if(isset($this->required[$file]) === false) {
if (file_exists($file) === true) {
$content = include $file;
... | [
"public",
"function",
"assign",
"(",
"$",
"signature",
")",
"{",
"$",
"file",
"=",
"$",
"this",
"->",
"path",
".",
"$",
"this",
"->",
"language",
".",
"DIRECTORY_SEPARATOR",
".",
"$",
"signature",
".",
"'.php'",
";",
"// content does not loaded yet",
"if",
... | Assign content to loaded translate file
@param string $signature
@throws Exception
@return Translator | [
"Assign",
"content",
"to",
"loaded",
"translate",
"file"
] | aadd56d87553274d316a8db9ebb2ec921cf43160 | https://github.com/stanislav-web/phalcon-translate/blob/aadd56d87553274d316a8db9ebb2ec921cf43160/src/Translate/Translator.php#L97-L135 |
233,154 | stanislav-web/phalcon-translate | src/Translate/Translator.php | Translator.translate | public function translate($string) {
// get selected signature
if(empty($this->signature) === false) {
if (array_key_exists($string, $this->signature) === false) {
return $string;
}
return $this->signature[$string];
}
else {
... | php | public function translate($string) {
// get selected signature
if(empty($this->signature) === false) {
if (array_key_exists($string, $this->signature) === false) {
return $string;
}
return $this->signature[$string];
}
else {
... | [
"public",
"function",
"translate",
"(",
"$",
"string",
")",
"{",
"// get selected signature",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"signature",
")",
"===",
"false",
")",
"{",
"if",
"(",
"array_key_exists",
"(",
"$",
"string",
",",
"$",
"this",
"->... | Translate original string
@param $string
@throws Exception
@return string | [
"Translate",
"original",
"string"
] | aadd56d87553274d316a8db9ebb2ec921cf43160 | https://github.com/stanislav-web/phalcon-translate/blob/aadd56d87553274d316a8db9ebb2ec921cf43160/src/Translate/Translator.php#L156-L169 |
233,155 | kgilden/php-digidoc | src/Envelope.php | Envelope.addFile | public function addFile($pathOrFile)
{
$file = is_string($pathOrFile) ? new File($pathOrFile) : $pathOrFile;
if (!($file instanceof File)) {
throw new UnexpectedTypeException('string" or "\KG\DigiDoc\File', $file);
}
$this->getFiles()->add($file);
} | php | public function addFile($pathOrFile)
{
$file = is_string($pathOrFile) ? new File($pathOrFile) : $pathOrFile;
if (!($file instanceof File)) {
throw new UnexpectedTypeException('string" or "\KG\DigiDoc\File', $file);
}
$this->getFiles()->add($file);
} | [
"public",
"function",
"addFile",
"(",
"$",
"pathOrFile",
")",
"{",
"$",
"file",
"=",
"is_string",
"(",
"$",
"pathOrFile",
")",
"?",
"new",
"File",
"(",
"$",
"pathOrFile",
")",
":",
"$",
"pathOrFile",
";",
"if",
"(",
"!",
"(",
"$",
"file",
"instanceof... | Adds a new file to the envelope. NB! Files cannot be added once the
envelope has at least 1 signature.
@param string|File $pathOrFile | [
"Adds",
"a",
"new",
"file",
"to",
"the",
"envelope",
".",
"NB!",
"Files",
"cannot",
"be",
"added",
"once",
"the",
"envelope",
"has",
"at",
"least",
"1",
"signature",
"."
] | 88112ba05688fc1d32c0ff948cb8e1f4d2f264d3 | https://github.com/kgilden/php-digidoc/blob/88112ba05688fc1d32c0ff948cb8e1f4d2f264d3/src/Envelope.php#L61-L70 |
233,156 | kgilden/php-digidoc | src/Envelope.php | Envelope.getSignature | public function getSignature($signatureId)
{
foreach ($this->getSignatures() as $signature) {
if ($signature->getId() === $signatureId) {
return $signature;
}
}
} | php | public function getSignature($signatureId)
{
foreach ($this->getSignatures() as $signature) {
if ($signature->getId() === $signatureId) {
return $signature;
}
}
} | [
"public",
"function",
"getSignature",
"(",
"$",
"signatureId",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"getSignatures",
"(",
")",
"as",
"$",
"signature",
")",
"{",
"if",
"(",
"$",
"signature",
"->",
"getId",
"(",
")",
"===",
"$",
"signatureId",
")... | Gets a signature given it's id in the envelope.
@param string $signatureId The signature id (e.g. "S01")
@return Signature|null The found signature or null, if no match was found | [
"Gets",
"a",
"signature",
"given",
"it",
"s",
"id",
"in",
"the",
"envelope",
"."
] | 88112ba05688fc1d32c0ff948cb8e1f4d2f264d3 | https://github.com/kgilden/php-digidoc/blob/88112ba05688fc1d32c0ff948cb8e1f4d2f264d3/src/Envelope.php#L105-L112 |
233,157 | sulu/SuluAutomationBundle | Tasks/Scheduler/TaskScheduler.php | TaskScheduler.scheduleTask | private function scheduleTask(TaskInterface $task, array $workload)
{
return $this->taskScheduler->createTask($task->getHandlerClass(), $workload)
->executeAt($task->getSchedule())
->schedule();
} | php | private function scheduleTask(TaskInterface $task, array $workload)
{
return $this->taskScheduler->createTask($task->getHandlerClass(), $workload)
->executeAt($task->getSchedule())
->schedule();
} | [
"private",
"function",
"scheduleTask",
"(",
"TaskInterface",
"$",
"task",
",",
"array",
"$",
"workload",
")",
"{",
"return",
"$",
"this",
"->",
"taskScheduler",
"->",
"createTask",
"(",
"$",
"task",
"->",
"getHandlerClass",
"(",
")",
",",
"$",
"workload",
... | Schedule php-task.
@param TaskInterface $task
@param array $workload
@return PHPTaskInterface | [
"Schedule",
"php",
"-",
"task",
"."
] | 2cfc3a7122a96939d2f203f6fe54bcb74e2cfd46 | https://github.com/sulu/SuluAutomationBundle/blob/2cfc3a7122a96939d2f203f6fe54bcb74e2cfd46/Tasks/Scheduler/TaskScheduler.php#L121-L126 |
233,158 | sulu/SuluAutomationBundle | Tasks/Scheduler/TaskScheduler.php | TaskScheduler.createWorkload | private function createWorkload(TaskInterface $task)
{
// TODO get from additional form of handler
$workload = [];
$optionsResolver = new OptionsResolver();
$optionsResolver->setDefaults(
[
'class' => $task->getEntityClass(),
'id' => $task... | php | private function createWorkload(TaskInterface $task)
{
// TODO get from additional form of handler
$workload = [];
$optionsResolver = new OptionsResolver();
$optionsResolver->setDefaults(
[
'class' => $task->getEntityClass(),
'id' => $task... | [
"private",
"function",
"createWorkload",
"(",
"TaskInterface",
"$",
"task",
")",
"{",
"// TODO get from additional form of handler",
"$",
"workload",
"=",
"[",
"]",
";",
"$",
"optionsResolver",
"=",
"new",
"OptionsResolver",
"(",
")",
";",
"$",
"optionsResolver",
... | Create and validate workload for given task.
@param TaskInterface $task
@return array
@throws TaskHandlerNotSupportedException | [
"Create",
"and",
"validate",
"workload",
"for",
"given",
"task",
"."
] | 2cfc3a7122a96939d2f203f6fe54bcb74e2cfd46 | https://github.com/sulu/SuluAutomationBundle/blob/2cfc3a7122a96939d2f203f6fe54bcb74e2cfd46/Tasks/Scheduler/TaskScheduler.php#L137-L159 |
233,159 | CampaignChain/core | EventListener/EntryPoint.php | EntryPoint.start | public function start(Request $request, AuthenticationException $authException = null)
{
// AJAX request?
if ($request->isXmlHttpRequest()) {
return new JsonResponse('', Response::HTTP_UNAUTHORIZED);
}
return new RedirectResponse($this->router->generate('fos_user_securit... | php | public function start(Request $request, AuthenticationException $authException = null)
{
// AJAX request?
if ($request->isXmlHttpRequest()) {
return new JsonResponse('', Response::HTTP_UNAUTHORIZED);
}
return new RedirectResponse($this->router->generate('fos_user_securit... | [
"public",
"function",
"start",
"(",
"Request",
"$",
"request",
",",
"AuthenticationException",
"$",
"authException",
"=",
"null",
")",
"{",
"// AJAX request?",
"if",
"(",
"$",
"request",
"->",
"isXmlHttpRequest",
"(",
")",
")",
"{",
"return",
"new",
"JsonRespo... | Checks prior to creating a new session whether the request is an AJAX
request. If so, then we issue a 401 error to avoid that the AJAX returns
the login page as the response. The AJAX request would handle the 401
by redirecting to the login page. If not an AJAX request, we automatically
go to the login page.
@param Re... | [
"Checks",
"prior",
"to",
"creating",
"a",
"new",
"session",
"whether",
"the",
"request",
"is",
"an",
"AJAX",
"request",
".",
"If",
"so",
"then",
"we",
"issue",
"a",
"401",
"error",
"to",
"avoid",
"that",
"the",
"AJAX",
"returns",
"the",
"login",
"page",
... | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/EventListener/EntryPoint.php#L52-L60 |
233,160 | CampaignChain/core | EventListener/UserDateTimeListener.php | UserDateTimeListener.storeDateTimeSettingsInSession | protected function storeDateTimeSettingsInSession(UserInterface $user, SessionInterface $session)
{
$session->set('campaignchain.locale', $user->getLocale());
$session->set('campaignchain.timezone', $user->getTimezone());
$session->set('campaignchain.dateFormat', $user->getDateFormat());
... | php | protected function storeDateTimeSettingsInSession(UserInterface $user, SessionInterface $session)
{
$session->set('campaignchain.locale', $user->getLocale());
$session->set('campaignchain.timezone', $user->getTimezone());
$session->set('campaignchain.dateFormat', $user->getDateFormat());
... | [
"protected",
"function",
"storeDateTimeSettingsInSession",
"(",
"UserInterface",
"$",
"user",
",",
"SessionInterface",
"$",
"session",
")",
"{",
"$",
"session",
"->",
"set",
"(",
"'campaignchain.locale'",
",",
"$",
"user",
"->",
"getLocale",
"(",
")",
")",
";",
... | Make user date and time settings sticky
@param UserInterface $user
@param SessionInterface $session | [
"Make",
"user",
"date",
"and",
"time",
"settings",
"sticky"
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/EventListener/UserDateTimeListener.php#L88-L94 |
233,161 | yeriomin/getopt | src/Yeriomin/Getopt/UsageProvider.php | UsageProvider.getUsageMessage | public function getUsageMessage()
{
if (empty($this->scriptName)) {
throw new GetoptException('Script name can not be empty');
}
$helpText = 'Usage: ' . $this->scriptName . ' '
. $this->argumentsDescription . "\n\n" . 'Options:' ."\n"
;
$args = array()... | php | public function getUsageMessage()
{
if (empty($this->scriptName)) {
throw new GetoptException('Script name can not be empty');
}
$helpText = 'Usage: ' . $this->scriptName . ' '
. $this->argumentsDescription . "\n\n" . 'Options:' ."\n"
;
$args = array()... | [
"public",
"function",
"getUsageMessage",
"(",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"scriptName",
")",
")",
"{",
"throw",
"new",
"GetoptException",
"(",
"'Script name can not be empty'",
")",
";",
"}",
"$",
"helpText",
"=",
"'Usage: '",
".",
... | Get usage message
@return string | [
"Get",
"usage",
"message"
] | 0b86fca451799e594aab7bc04a399a8f15d3119d | https://github.com/yeriomin/getopt/blob/0b86fca451799e594aab7bc04a399a8f15d3119d/src/Yeriomin/Getopt/UsageProvider.php#L80-L99 |
233,162 | yeriomin/getopt | src/Yeriomin/Getopt/UsageProvider.php | UsageProvider.getOptionString | private function getOptionString(OptionDefinition $option)
{
$short = $option->getShort();
$long = $option->getLong();
$result = ' ';
if ($short !== null && $long !== null) {
$result .= '-' . $short . ', --' . $long;
} else {
$result .= $short !== null... | php | private function getOptionString(OptionDefinition $option)
{
$short = $option->getShort();
$long = $option->getLong();
$result = ' ';
if ($short !== null && $long !== null) {
$result .= '-' . $short . ', --' . $long;
} else {
$result .= $short !== null... | [
"private",
"function",
"getOptionString",
"(",
"OptionDefinition",
"$",
"option",
")",
"{",
"$",
"short",
"=",
"$",
"option",
"->",
"getShort",
"(",
")",
";",
"$",
"long",
"=",
"$",
"option",
"->",
"getLong",
"(",
")",
";",
"$",
"result",
"=",
"' '",
... | Get a human-readable string definition of an option
@param \Yeriomin\Getopt\OptionDefinition $option
@return string | [
"Get",
"a",
"human",
"-",
"readable",
"string",
"definition",
"of",
"an",
"option"
] | 0b86fca451799e594aab7bc04a399a8f15d3119d | https://github.com/yeriomin/getopt/blob/0b86fca451799e594aab7bc04a399a8f15d3119d/src/Yeriomin/Getopt/UsageProvider.php#L107-L118 |
233,163 | CampaignChain/core | EventListener/ConsoleExceptionListener.php | ConsoleExceptionListener.onConsoleException | public function onConsoleException(ConsoleExceptionEvent $event)
{
/** @var SchedulerCommand $command */
$command = $event->getCommand();
if ($command->getName() != 'campaignchain:scheduler') {
return;
}
// if scheduler is null exception happened in early stage
... | php | public function onConsoleException(ConsoleExceptionEvent $event)
{
/** @var SchedulerCommand $command */
$command = $event->getCommand();
if ($command->getName() != 'campaignchain:scheduler') {
return;
}
// if scheduler is null exception happened in early stage
... | [
"public",
"function",
"onConsoleException",
"(",
"ConsoleExceptionEvent",
"$",
"event",
")",
"{",
"/** @var SchedulerCommand $command */",
"$",
"command",
"=",
"$",
"event",
"->",
"getCommand",
"(",
")",
";",
"if",
"(",
"$",
"command",
"->",
"getName",
"(",
")",... | In case of an exception in scheduler console command
the message should be saved into the scheduler entity
@param ConsoleExceptionEvent $event | [
"In",
"case",
"of",
"an",
"exception",
"in",
"scheduler",
"console",
"command",
"the",
"message",
"should",
"be",
"saved",
"into",
"the",
"scheduler",
"entity"
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/EventListener/ConsoleExceptionListener.php#L61-L88 |
233,164 | CampaignChain/core | Util/ParserUtil.php | ParserUtil.sanitizeUrl | static function sanitizeUrl($url)
{
if(
self::validateUrl($url) &&
substr($url, -1) === '/'
) {
$urlParts = parse_url($url);
if(
!isset($urlParts['path']) ||
($urlParts['path'] == '/' && !isset($urlParts['query'])) ||
... | php | static function sanitizeUrl($url)
{
if(
self::validateUrl($url) &&
substr($url, -1) === '/'
) {
$urlParts = parse_url($url);
if(
!isset($urlParts['path']) ||
($urlParts['path'] == '/' && !isset($urlParts['query'])) ||
... | [
"static",
"function",
"sanitizeUrl",
"(",
"$",
"url",
")",
"{",
"if",
"(",
"self",
"::",
"validateUrl",
"(",
"$",
"url",
")",
"&&",
"substr",
"(",
"$",
"url",
",",
"-",
"1",
")",
"===",
"'/'",
")",
"{",
"$",
"urlParts",
"=",
"parse_url",
"(",
"$"... | Remove trailing slash if no path included in URL.
For example:
- http://www.example.com/ <- remove
- http://www.example.com/news/ <- do not remove
- http://www.exmaple.com/?id=2/ <- remove
- http://www.example.com/?id=2 <- do not remove
@param $url
@return string
@throws \Exception | [
"Remove",
"trailing",
"slash",
"if",
"no",
"path",
"included",
"in",
"URL",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Util/ParserUtil.php#L266-L283 |
233,165 | CampaignChain/core | Util/ParserUtil.php | ParserUtil.getTextLengthWithShortUrls | static function getTextLengthWithShortUrls($text, $shortUrlLength = 23)
{
if($shortUrlLength < 7){
throw new \Exception('URL must be at least 7 characters long.');
}
// Create dummy short URL.
$shortUrl = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJ... | php | static function getTextLengthWithShortUrls($text, $shortUrlLength = 23)
{
if($shortUrlLength < 7){
throw new \Exception('URL must be at least 7 characters long.');
}
// Create dummy short URL.
$shortUrl = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJ... | [
"static",
"function",
"getTextLengthWithShortUrls",
"(",
"$",
"text",
",",
"$",
"shortUrlLength",
"=",
"23",
")",
"{",
"if",
"(",
"$",
"shortUrlLength",
"<",
"7",
")",
"{",
"throw",
"new",
"\\",
"Exception",
"(",
"'URL must be at least 7 characters long.'",
")",... | Get length of a text which includes URLs that will be shortened.
Basically, this function can be used to calculate the length of a Twitter
message.
@param $text
@param int $shortUrlLength
@return int
@throws \Exception | [
"Get",
"length",
"of",
"a",
"text",
"which",
"includes",
"URLs",
"that",
"will",
"be",
"shortened",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Util/ParserUtil.php#L335-L346 |
233,166 | CampaignChain/core | Util/SchedulerUtil.php | SchedulerUtil.isDueNow | public function isDueNow(\DateTime $moment)
{
$startInterval = new \DateTime();
$startInterval->modify('-'.$this->schedulerInterval.' mins');
if($moment > $startInterval && $moment <= new \DateTime()){
return true;
} else {
return false;
}
} | php | public function isDueNow(\DateTime $moment)
{
$startInterval = new \DateTime();
$startInterval->modify('-'.$this->schedulerInterval.' mins');
if($moment > $startInterval && $moment <= new \DateTime()){
return true;
} else {
return false;
}
} | [
"public",
"function",
"isDueNow",
"(",
"\\",
"DateTime",
"$",
"moment",
")",
"{",
"$",
"startInterval",
"=",
"new",
"\\",
"DateTime",
"(",
")",
";",
"$",
"startInterval",
"->",
"modify",
"(",
"'-'",
".",
"$",
"this",
"->",
"schedulerInterval",
".",
"' mi... | If the post is within the scheduler's interval, then this means that
it is supposed to be published now.
@param \DateTime $moment
@return bool | [
"If",
"the",
"post",
"is",
"within",
"the",
"scheduler",
"s",
"interval",
"then",
"this",
"means",
"that",
"it",
"is",
"supposed",
"to",
"be",
"published",
"now",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Util/SchedulerUtil.php#L36-L45 |
233,167 | CampaignChain/core | Controller/REST/ModuleController.php | ModuleController.getTypesMetaAction | public function getTypesMetaAction()
{
$typeClasses = $this->getDoctrine()->getEntityManager()->getClassMetadata('CampaignChain\CoreBundle\Entity\Module')->discriminatorMap;
return $this->response(
VariableUtil::arrayFlatten(array_keys($typeClasses))
);
} | php | public function getTypesMetaAction()
{
$typeClasses = $this->getDoctrine()->getEntityManager()->getClassMetadata('CampaignChain\CoreBundle\Entity\Module')->discriminatorMap;
return $this->response(
VariableUtil::arrayFlatten(array_keys($typeClasses))
);
} | [
"public",
"function",
"getTypesMetaAction",
"(",
")",
"{",
"$",
"typeClasses",
"=",
"$",
"this",
"->",
"getDoctrine",
"(",
")",
"->",
"getEntityManager",
"(",
")",
"->",
"getClassMetadata",
"(",
"'CampaignChain\\CoreBundle\\Entity\\Module'",
")",
"->",
"discriminato... | List all available types for modules
Example Request
===============
GET /api/v1/modules/types
Example Response
================
[
"activity",
"campaign",
"channel",
"location",
"milestone",
"operation",
"report",
"security"
]
@ApiDoc(
section="Core"
)
@REST\GET("/types")
@return \Symfony\Component\HttpFoundation... | [
"List",
"all",
"available",
"types",
"for",
"modules"
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Controller/REST/ModuleController.php#L70-L77 |
233,168 | CampaignChain/core | Controller/REST/ModuleController.php | ModuleController.getTypesAction | public function getTypesAction($type)
{
$qb = $this->getQueryBuilder();
$qb->select(self::SELECT_STATEMENT);
$typeClasses = $this->getDoctrine()->getEntityManager()->getClassMetadata('CampaignChain\CoreBundle\Entity\Module')->discriminatorMap;
$qb->from($typeClasses[$type], 'm');
... | php | public function getTypesAction($type)
{
$qb = $this->getQueryBuilder();
$qb->select(self::SELECT_STATEMENT);
$typeClasses = $this->getDoctrine()->getEntityManager()->getClassMetadata('CampaignChain\CoreBundle\Entity\Module')->discriminatorMap;
$qb->from($typeClasses[$type], 'm');
... | [
"public",
"function",
"getTypesAction",
"(",
"$",
"type",
")",
"{",
"$",
"qb",
"=",
"$",
"this",
"->",
"getQueryBuilder",
"(",
")",
";",
"$",
"qb",
"->",
"select",
"(",
"self",
"::",
"SELECT_STATEMENT",
")",
";",
"$",
"typeClasses",
"=",
"$",
"this",
... | Get all modules of same type.
Example Request
===============
GET /api/v1/modules/types/location
Example Response
================
[
{
"composerPackage": "campaignchain/location-facebook",
"moduleIdentifier": "campaignchain-facebook-page",
"displayName": "Facebook page stream",
"hooks": {
"default": {
"campaignchai... | [
"Get",
"all",
"modules",
"of",
"same",
"type",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Controller/REST/ModuleController.php#L158-L172 |
233,169 | CampaignChain/core | Controller/REST/ModuleController.php | ModuleController.getPackagesMetaAction | public function getPackagesMetaAction()
{
$qb = $this->getQueryBuilder();
$qb->select("b.name");
$qb->from('CampaignChain\CoreBundle\Entity\Module', 'm');
$qb->from('CampaignChain\CoreBundle\Entity\Bundle', 'b');
$qb->where('b.id = m.bundle');
$qb->orderBy('m.identifi... | php | public function getPackagesMetaAction()
{
$qb = $this->getQueryBuilder();
$qb->select("b.name");
$qb->from('CampaignChain\CoreBundle\Entity\Module', 'm');
$qb->from('CampaignChain\CoreBundle\Entity\Bundle', 'b');
$qb->where('b.id = m.bundle');
$qb->orderBy('m.identifi... | [
"public",
"function",
"getPackagesMetaAction",
"(",
")",
"{",
"$",
"qb",
"=",
"$",
"this",
"->",
"getQueryBuilder",
"(",
")",
";",
"$",
"qb",
"->",
"select",
"(",
"\"b.name\"",
")",
";",
"$",
"qb",
"->",
"from",
"(",
"'CampaignChain\\CoreBundle\\Entity\\Modu... | List all installed Composer packages which include CampaignChain Modules.
Example Request
===============
GET /api/v1/modules/packages
Example Response
================
[
"campaignchain/report-analytics-cta-tracking",
"campaignchain/location-citrix",
"campaignchain/channel-facebook",
"campaignchain/location-faceboo... | [
"List",
"all",
"installed",
"Composer",
"packages",
"which",
"include",
"CampaignChain",
"Modules",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Controller/REST/ModuleController.php#L243-L258 |
233,170 | CampaignChain/core | Controller/REST/ModuleController.php | ModuleController.getUrisAction | public function getUrisAction($uri)
{
$uri = new URI($uri);
$qb = $this->getQueryBuilder();
$qb->select(self::SELECT_STATEMENT);
$qb->from('CampaignChain\CoreBundle\Entity\Module', 'm');
$qb->from('CampaignChain\CoreBundle\Entity\Bundle', 'b');
$qb->where('b.id = m.b... | php | public function getUrisAction($uri)
{
$uri = new URI($uri);
$qb = $this->getQueryBuilder();
$qb->select(self::SELECT_STATEMENT);
$qb->from('CampaignChain\CoreBundle\Entity\Module', 'm');
$qb->from('CampaignChain\CoreBundle\Entity\Bundle', 'b');
$qb->where('b.id = m.b... | [
"public",
"function",
"getUrisAction",
"(",
"$",
"uri",
")",
"{",
"$",
"uri",
"=",
"new",
"URI",
"(",
"$",
"uri",
")",
";",
"$",
"qb",
"=",
"$",
"this",
"->",
"getQueryBuilder",
"(",
")",
";",
"$",
"qb",
"->",
"select",
"(",
"self",
"::",
"SELECT... | Get one specific module by Module URI.
Example Request
===============
GET /api/v1/modules/uris/campaignchain%2Flocation-facebook%2Fcampaignchain-facebook-user
Example Response
================
[
{
"id": 10,
"identifier": "campaignchain-facebook-user",
"displayName": "Facebook user stream",
"hooks":
{
"default":
{
... | [
"Get",
"one",
"specific",
"module",
"by",
"Module",
"URI",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Controller/REST/ModuleController.php#L472-L491 |
233,171 | CampaignChain/core | Controller/REST/ModuleController.php | ModuleController.postToggleStatusAction | public function postToggleStatusAction(Request $request)
{
$uri = new URI($request->request->get('uri'));
$service = $this->get('campaignchain.core.module');
try {
$status = $service->toggleStatus($uri->getPackage(), $uri->getModule());
$response = $this->forward(
... | php | public function postToggleStatusAction(Request $request)
{
$uri = new URI($request->request->get('uri'));
$service = $this->get('campaignchain.core.module');
try {
$status = $service->toggleStatus($uri->getPackage(), $uri->getModule());
$response = $this->forward(
... | [
"public",
"function",
"postToggleStatusAction",
"(",
"Request",
"$",
"request",
")",
"{",
"$",
"uri",
"=",
"new",
"URI",
"(",
"$",
"request",
"->",
"request",
"->",
"get",
"(",
"'uri'",
")",
")",
";",
"$",
"service",
"=",
"$",
"this",
"->",
"get",
"(... | Toggle the status of a Module to active or inactive.
Example Request
===============
POST /api/v1/modules/toggle-status
Example Input
=============
{
"uri": "campaignchain/channel-twitter/campaignchain-twitter"
}
Example Response
================
See:
GET /api/v1/modules/uris/{uri}
@ApiDoc(
section="Core",
requ... | [
"Toggle",
"the",
"status",
"of",
"a",
"Module",
"to",
"active",
"or",
"inactive",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Controller/REST/ModuleController.php#L529-L546 |
233,172 | et-soft/yii2-widget-select-year | YearSelectbox.php | YearSelectbox._getItems | private function _getItems()
{
$typesAvailable = ['fix', 'calculation'];
$this->yearStart = intval($this->yearStart);
$this->yearEnd = intval($this->yearEnd);
if (!in_array($this->yearStartType, $typesAvailable)) throw new InvalidConfigException("The 'yearStartType' option is must ... | php | private function _getItems()
{
$typesAvailable = ['fix', 'calculation'];
$this->yearStart = intval($this->yearStart);
$this->yearEnd = intval($this->yearEnd);
if (!in_array($this->yearStartType, $typesAvailable)) throw new InvalidConfigException("The 'yearStartType' option is must ... | [
"private",
"function",
"_getItems",
"(",
")",
"{",
"$",
"typesAvailable",
"=",
"[",
"'fix'",
",",
"'calculation'",
"]",
";",
"$",
"this",
"->",
"yearStart",
"=",
"intval",
"(",
"$",
"this",
"->",
"yearStart",
")",
";",
"$",
"this",
"->",
"yearEnd",
"="... | Create array of the years.
@return array
@throws InvalidConfigException | [
"Create",
"array",
"of",
"the",
"years",
"."
] | 54e50594810fb2e094cbbc759db7a70d35b1f7e7 | https://github.com/et-soft/yii2-widget-select-year/blob/54e50594810fb2e094cbbc759db7a70d35b1f7e7/YearSelectbox.php#L87-L103 |
233,173 | Deathnerd/php-wtforms | src/fields/core/FieldList.php | FieldList.addEntry | private function addEntry($formdata = [], $data = null, $index = null)
{
if (!(!$this->max_entries || count($this->entries) < $this->max_entries)) {
throw new AssertionError("You cannot have more than max_entries entries in the FieldList");
}
if ($index === null) {
$... | php | private function addEntry($formdata = [], $data = null, $index = null)
{
if (!(!$this->max_entries || count($this->entries) < $this->max_entries)) {
throw new AssertionError("You cannot have more than max_entries entries in the FieldList");
}
if ($index === null) {
$... | [
"private",
"function",
"addEntry",
"(",
"$",
"formdata",
"=",
"[",
"]",
",",
"$",
"data",
"=",
"null",
",",
"$",
"index",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"(",
"!",
"$",
"this",
"->",
"max_entries",
"||",
"count",
"(",
"$",
"this",
"->",
... | Processes an unbound field and inserts it as a field type in this field list
@param array $formdata
@param null|array $data
@param null|integer $index
@return Field
@throws AssertionError | [
"Processes",
"an",
"unbound",
"field",
"and",
"inserts",
"it",
"as",
"a",
"field",
"type",
"in",
"this",
"field",
"list"
] | 2e1f9ad515f6241c9fac57edc472bf657267f4a1 | https://github.com/Deathnerd/php-wtforms/blob/2e1f9ad515f6241c9fac57edc472bf657267f4a1/src/fields/core/FieldList.php#L196-L229 |
233,174 | Deathnerd/php-wtforms | src/fields/core/FieldList.php | FieldList.popEntry | public function popEntry()
{
if (count($this->entries) == 0) {
throw new IndexError;
}
$entry = array_pop($this->entries);
$this->last_index -= 1;
return $entry;
} | php | public function popEntry()
{
if (count($this->entries) == 0) {
throw new IndexError;
}
$entry = array_pop($this->entries);
$this->last_index -= 1;
return $entry;
} | [
"public",
"function",
"popEntry",
"(",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"entries",
")",
"==",
"0",
")",
"{",
"throw",
"new",
"IndexError",
";",
"}",
"$",
"entry",
"=",
"array_pop",
"(",
"$",
"this",
"->",
"entries",
")",
";",
... | Removes the last entry from the list and returns it
@return mixed
@throws IndexError | [
"Removes",
"the",
"last",
"entry",
"from",
"the",
"list",
"and",
"returns",
"it"
] | 2e1f9ad515f6241c9fac57edc472bf657267f4a1 | https://github.com/Deathnerd/php-wtforms/blob/2e1f9ad515f6241c9fac57edc472bf657267f4a1/src/fields/core/FieldList.php#L251-L260 |
233,175 | Deathnerd/php-wtforms | src/fields/core/FieldList.php | FieldList.validate | public function validate(Form $form, array $extra_validators = [])
{
$this->errors = [];
// Run validators on all entries within
foreach ($this->entries as $subfield) {
/**
* @var Field $subfield
*/
if (!$subfield->validate($form)) {
... | php | public function validate(Form $form, array $extra_validators = [])
{
$this->errors = [];
// Run validators on all entries within
foreach ($this->entries as $subfield) {
/**
* @var Field $subfield
*/
if (!$subfield->validate($form)) {
... | [
"public",
"function",
"validate",
"(",
"Form",
"$",
"form",
",",
"array",
"$",
"extra_validators",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"errors",
"=",
"[",
"]",
";",
"// Run validators on all entries within",
"foreach",
"(",
"$",
"this",
"->",
"entr... | Validate this FieldList.
Note that the FieldList differs from normal field validation in
that FieldList validates all its enclosed fields first before running any
of its own validators.
@param \WTForms\Form $form
@param array $extra_validators
@return bool|void | [
"Validate",
"this",
"FieldList",
"."
] | 2e1f9ad515f6241c9fac57edc472bf657267f4a1 | https://github.com/Deathnerd/php-wtforms/blob/2e1f9ad515f6241c9fac57edc472bf657267f4a1/src/fields/core/FieldList.php#L274-L290 |
233,176 | notthatbad/silverstripe-rest-api | code/extensions/PaginationExtension.php | PaginationExtension.offset | public function offset($request) {
$offset = (int)$request->getVar('offset');
if($offset && is_int($offset) && $offset >= 0) {
return $offset;
} else {
return static::$default_offset;
}
} | php | public function offset($request) {
$offset = (int)$request->getVar('offset');
if($offset && is_int($offset) && $offset >= 0) {
return $offset;
} else {
return static::$default_offset;
}
} | [
"public",
"function",
"offset",
"(",
"$",
"request",
")",
"{",
"$",
"offset",
"=",
"(",
"int",
")",
"$",
"request",
"->",
"getVar",
"(",
"'offset'",
")",
";",
"if",
"(",
"$",
"offset",
"&&",
"is_int",
"(",
"$",
"offset",
")",
"&&",
"$",
"offset",
... | Returns the offset, either given in request by `offset` or from the default settings in the controller.
@param \SS_HTTPRequest $request
@return int the offset value | [
"Returns",
"the",
"offset",
"either",
"given",
"in",
"request",
"by",
"offset",
"or",
"from",
"the",
"default",
"settings",
"in",
"the",
"controller",
"."
] | aed8e9812a01d4ab1e7cdfe7c3e0161ca368e621 | https://github.com/notthatbad/silverstripe-rest-api/blob/aed8e9812a01d4ab1e7cdfe7c3e0161ca368e621/code/extensions/PaginationExtension.php#L31-L38 |
233,177 | notthatbad/silverstripe-rest-api | code/extensions/PaginationExtension.php | PaginationExtension.limit | public function limit($request) {
$limit = (int)$request->getVar('limit');
if($limit && is_int($limit) && $limit > 0) {
return $limit;
} else {
return static::$default_limit;
}
} | php | public function limit($request) {
$limit = (int)$request->getVar('limit');
if($limit && is_int($limit) && $limit > 0) {
return $limit;
} else {
return static::$default_limit;
}
} | [
"public",
"function",
"limit",
"(",
"$",
"request",
")",
"{",
"$",
"limit",
"=",
"(",
"int",
")",
"$",
"request",
"->",
"getVar",
"(",
"'limit'",
")",
";",
"if",
"(",
"$",
"limit",
"&&",
"is_int",
"(",
"$",
"limit",
")",
"&&",
"$",
"limit",
">",
... | Returns the limit, either given in request by `limit` or from the default settings in the controller.
@param \SS_HTTPRequest $request
@return int the limit value | [
"Returns",
"the",
"limit",
"either",
"given",
"in",
"request",
"by",
"limit",
"or",
"from",
"the",
"default",
"settings",
"in",
"the",
"controller",
"."
] | aed8e9812a01d4ab1e7cdfe7c3e0161ca368e621 | https://github.com/notthatbad/silverstripe-rest-api/blob/aed8e9812a01d4ab1e7cdfe7c3e0161ca368e621/code/extensions/PaginationExtension.php#L46-L53 |
233,178 | Patroklo/yii2-comments | models/CommentSearchModel.php | CommentSearchModel.search | public function search($params, $pageSize = 20)
{
$query = self::find()->joinWith('author');
$dataProvider = new ActiveDataProvider([
'query' => $query,
'pagination' => [
'pageSize' => $pageSize
]
]);
$dataProvider->setSort([
... | php | public function search($params, $pageSize = 20)
{
$query = self::find()->joinWith('author');
$dataProvider = new ActiveDataProvider([
'query' => $query,
'pagination' => [
'pageSize' => $pageSize
]
]);
$dataProvider->setSort([
... | [
"public",
"function",
"search",
"(",
"$",
"params",
",",
"$",
"pageSize",
"=",
"20",
")",
"{",
"$",
"query",
"=",
"self",
"::",
"find",
"(",
")",
"->",
"joinWith",
"(",
"'author'",
")",
";",
"$",
"dataProvider",
"=",
"new",
"ActiveDataProvider",
"(",
... | Setup search function for filtering and sorting based on fullName field
@param $params
@param int $pageSize
@return ActiveDataProvider | [
"Setup",
"search",
"function",
"for",
"filtering",
"and",
"sorting",
"based",
"on",
"fullName",
"field"
] | e06409ea52b12dc14d0594030088fd7d2c2e160a | https://github.com/Patroklo/yii2-comments/blob/e06409ea52b12dc14d0594030088fd7d2c2e160a/models/CommentSearchModel.php#L41-L69 |
233,179 | malenkiki/aleavatar | src/Malenki/Aleavatar/Quarter.php | Quarter.tr | public function tr()
{
$q = new self(self::TOP_RIGHT, $this->bool_rotate_way);
$q->units($this->arr_units);
return $q;
} | php | public function tr()
{
$q = new self(self::TOP_RIGHT, $this->bool_rotate_way);
$q->units($this->arr_units);
return $q;
} | [
"public",
"function",
"tr",
"(",
")",
"{",
"$",
"q",
"=",
"new",
"self",
"(",
"self",
"::",
"TOP_RIGHT",
",",
"$",
"this",
"->",
"bool_rotate_way",
")",
";",
"$",
"q",
"->",
"units",
"(",
"$",
"this",
"->",
"arr_units",
")",
";",
"return",
"$",
"... | Returns new quarter copied from current one and rotated for the top
right corner.
@access public
@return Quarter | [
"Returns",
"new",
"quarter",
"copied",
"from",
"current",
"one",
"and",
"rotated",
"for",
"the",
"top",
"right",
"corner",
"."
] | 91affa83f8580c8e6da62c77ce34b1c4451784bf | https://github.com/malenkiki/aleavatar/blob/91affa83f8580c8e6da62c77ce34b1c4451784bf/src/Malenki/Aleavatar/Quarter.php#L119-L125 |
233,180 | malenkiki/aleavatar | src/Malenki/Aleavatar/Quarter.php | Quarter.br | public function br()
{
$q = new self(self::BOTTOM_RIGHT, $this->bool_rotate_way);
$q->units($this->arr_units);
return $q;
} | php | public function br()
{
$q = new self(self::BOTTOM_RIGHT, $this->bool_rotate_way);
$q->units($this->arr_units);
return $q;
} | [
"public",
"function",
"br",
"(",
")",
"{",
"$",
"q",
"=",
"new",
"self",
"(",
"self",
"::",
"BOTTOM_RIGHT",
",",
"$",
"this",
"->",
"bool_rotate_way",
")",
";",
"$",
"q",
"->",
"units",
"(",
"$",
"this",
"->",
"arr_units",
")",
";",
"return",
"$",
... | Returns new quarter copied from current one and rotated for the bottom
right corner.
@access public
@return Quarter | [
"Returns",
"new",
"quarter",
"copied",
"from",
"current",
"one",
"and",
"rotated",
"for",
"the",
"bottom",
"right",
"corner",
"."
] | 91affa83f8580c8e6da62c77ce34b1c4451784bf | https://github.com/malenkiki/aleavatar/blob/91affa83f8580c8e6da62c77ce34b1c4451784bf/src/Malenki/Aleavatar/Quarter.php#L134-L140 |
233,181 | malenkiki/aleavatar | src/Malenki/Aleavatar/Quarter.php | Quarter.bl | public function bl()
{
$q = new self(self::BOTTOM_LEFT, $this->bool_rotate_way);
$q->units($this->arr_units);
return $q;
} | php | public function bl()
{
$q = new self(self::BOTTOM_LEFT, $this->bool_rotate_way);
$q->units($this->arr_units);
return $q;
} | [
"public",
"function",
"bl",
"(",
")",
"{",
"$",
"q",
"=",
"new",
"self",
"(",
"self",
"::",
"BOTTOM_LEFT",
",",
"$",
"this",
"->",
"bool_rotate_way",
")",
";",
"$",
"q",
"->",
"units",
"(",
"$",
"this",
"->",
"arr_units",
")",
";",
"return",
"$",
... | Returns new quarter copied from current one and rotated for the bottom
left corner.
@access public
@return Quarter | [
"Returns",
"new",
"quarter",
"copied",
"from",
"current",
"one",
"and",
"rotated",
"for",
"the",
"bottom",
"left",
"corner",
"."
] | 91affa83f8580c8e6da62c77ce34b1c4451784bf | https://github.com/malenkiki/aleavatar/blob/91affa83f8580c8e6da62c77ce34b1c4451784bf/src/Malenki/Aleavatar/Quarter.php#L149-L155 |
233,182 | malenkiki/aleavatar | src/Malenki/Aleavatar/Quarter.php | Quarter.svg | public function svg()
{
$str_g = '';
foreach ($this->arr_units as $k => $u) {
$int_dx = 0;
$int_dy = 0;
if ($k == self::TOP_RIGHT) {
$int_dx = Unit::SIZE;
} elseif ($k == self::BOTTOM_RIGHT) {
$int_dx = Unit::SIZE;
... | php | public function svg()
{
$str_g = '';
foreach ($this->arr_units as $k => $u) {
$int_dx = 0;
$int_dy = 0;
if ($k == self::TOP_RIGHT) {
$int_dx = Unit::SIZE;
} elseif ($k == self::BOTTOM_RIGHT) {
$int_dx = Unit::SIZE;
... | [
"public",
"function",
"svg",
"(",
")",
"{",
"$",
"str_g",
"=",
"''",
";",
"foreach",
"(",
"$",
"this",
"->",
"arr_units",
"as",
"$",
"k",
"=>",
"$",
"u",
")",
"{",
"$",
"int_dx",
"=",
"0",
";",
"$",
"int_dy",
"=",
"0",
";",
"if",
"(",
"$",
... | SVG rendering.
If quarter's type is different of Quarter::TOP_LEFT, a translation and a
rotation are apply.
@access public
@return string SVG code | [
"SVG",
"rendering",
"."
] | 91affa83f8580c8e6da62c77ce34b1c4451784bf | https://github.com/malenkiki/aleavatar/blob/91affa83f8580c8e6da62c77ce34b1c4451784bf/src/Malenki/Aleavatar/Quarter.php#L191-L253 |
233,183 | joomla-framework/twitter-api | src/Mute.php | Mute.getMutedUserIds | public function getMutedUserIds($cursor = null)
{
// Check if cursor is specified
if ($cursor !== null)
{
$data['cursor'] = $cursor;
}
// Set the API path
$path = '/mutes/users/ids.json';
// Send the request.
return $this->sendRequest($path, 'GET', $data);
} | php | public function getMutedUserIds($cursor = null)
{
// Check if cursor is specified
if ($cursor !== null)
{
$data['cursor'] = $cursor;
}
// Set the API path
$path = '/mutes/users/ids.json';
// Send the request.
return $this->sendRequest($path, 'GET', $data);
} | [
"public",
"function",
"getMutedUserIds",
"(",
"$",
"cursor",
"=",
"null",
")",
"{",
"// Check if cursor is specified",
"if",
"(",
"$",
"cursor",
"!==",
"null",
")",
"{",
"$",
"data",
"[",
"'cursor'",
"]",
"=",
"$",
"cursor",
";",
"}",
"// Set the API path",
... | Method to get a list of muted user ID's
@param integer $cursor Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging.
@return array The decoded JSON response
@since 1.2.0 | [
"Method",
"to",
"get",
"a",
"list",
"of",
"muted",
"user",
"ID",
"s"
] | 289719bbd67e83c7cfaf515b94b1d5497b1f0525 | https://github.com/joomla-framework/twitter-api/blob/289719bbd67e83c7cfaf515b94b1d5497b1f0525/src/Mute.php#L96-L109 |
233,184 | joomla-framework/twitter-api | src/Mute.php | Mute.getMutedUsers | public function getMutedUsers($cursor = null, $entities = null, $skipStatus = null)
{
// Check if cursor is specified
if ($cursor !== null)
{
$data['cursor'] = $cursor;
}
// Check if entities is specified
if ($entities !== null)
{
$data['include_entities'] = $entities;
}
// Check if skip_stat... | php | public function getMutedUsers($cursor = null, $entities = null, $skipStatus = null)
{
// Check if cursor is specified
if ($cursor !== null)
{
$data['cursor'] = $cursor;
}
// Check if entities is specified
if ($entities !== null)
{
$data['include_entities'] = $entities;
}
// Check if skip_stat... | [
"public",
"function",
"getMutedUsers",
"(",
"$",
"cursor",
"=",
"null",
",",
"$",
"entities",
"=",
"null",
",",
"$",
"skipStatus",
"=",
"null",
")",
"{",
"// Check if cursor is specified",
"if",
"(",
"$",
"cursor",
"!==",
"null",
")",
"{",
"$",
"data",
"... | Method to get a list of muted users
@param integer $cursor Breaks the results into pages. A single page contains 20 lists. Provide a value of -1 to begin paging.
@param boolean $entities When set to either true, t or 1, each user will include a node called "entities". This node offers a variety
of metada... | [
"Method",
"to",
"get",
"a",
"list",
"of",
"muted",
"users"
] | 289719bbd67e83c7cfaf515b94b1d5497b1f0525 | https://github.com/joomla-framework/twitter-api/blob/289719bbd67e83c7cfaf515b94b1d5497b1f0525/src/Mute.php#L123-L148 |
233,185 | CampaignChain/core | Controller/ActivityController.php | ActivityController.moveApiAction | public function moveApiAction(Request $request)
{
$serializer = $this->get('campaignchain.core.serializer.default');
$responseData = array();
$id = $request->request->get('id');
$newDue = new \DateTime($request->request->get('start_date'));
$activityService = $this->get('c... | php | public function moveApiAction(Request $request)
{
$serializer = $this->get('campaignchain.core.serializer.default');
$responseData = array();
$id = $request->request->get('id');
$newDue = new \DateTime($request->request->get('start_date'));
$activityService = $this->get('c... | [
"public",
"function",
"moveApiAction",
"(",
"Request",
"$",
"request",
")",
"{",
"$",
"serializer",
"=",
"$",
"this",
"->",
"get",
"(",
"'campaignchain.core.serializer.default'",
")",
";",
"$",
"responseData",
"=",
"array",
"(",
")",
";",
"$",
"id",
"=",
"... | Move an Activity to a new start date.
@ApiDoc(
section = "Core",
views = { "private" },
requirements={
{
"name"="id",
"description" = "Campaign ID",
"requirement"="\d+"
},
{
"name"="start_date",
"description" = "Start date in ISO8601 format",
"requirement"="/(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})[+-](\d{2})... | [
"Move",
"an",
"Activity",
"to",
"a",
"new",
"start",
"date",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Controller/ActivityController.php#L316-L355 |
233,186 | CampaignChain/core | EntityService/CTAService.php | CTAService.expandUrl | protected function expandUrl($url)
{
// skip if no short url
if (!ParserUtil::isShortUrl($url)) {
return $url;
}
$header_location = get_headers($url, 1)['Location'];
return $header_location ?: $url;
} | php | protected function expandUrl($url)
{
// skip if no short url
if (!ParserUtil::isShortUrl($url)) {
return $url;
}
$header_location = get_headers($url, 1)['Location'];
return $header_location ?: $url;
} | [
"protected",
"function",
"expandUrl",
"(",
"$",
"url",
")",
"{",
"// skip if no short url",
"if",
"(",
"!",
"ParserUtil",
"::",
"isShortUrl",
"(",
"$",
"url",
")",
")",
"{",
"return",
"$",
"url",
";",
"}",
"$",
"header_location",
"=",
"get_headers",
"(",
... | Expand if url is already a short url
@param $url
@return mixed | [
"Expand",
"if",
"url",
"is",
"already",
"a",
"short",
"url"
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/EntityService/CTAService.php#L223-L233 |
233,187 | CampaignChain/core | EntityService/CTAService.php | CTAService.generateTrackingUrl | protected function generateTrackingUrl($url, $trackingId)
{
$trackingUrl = ParserUtil::addUrlParam($url, $this->trackingIdName, $trackingId);
// Pass the base URL if tracking script runs in dev or dev-stay mode.
if($this->trackingJsMode == 'dev' || $this->trackingJsMode == 'dev-stay... | php | protected function generateTrackingUrl($url, $trackingId)
{
$trackingUrl = ParserUtil::addUrlParam($url, $this->trackingIdName, $trackingId);
// Pass the base URL if tracking script runs in dev or dev-stay mode.
if($this->trackingJsMode == 'dev' || $this->trackingJsMode == 'dev-stay... | [
"protected",
"function",
"generateTrackingUrl",
"(",
"$",
"url",
",",
"$",
"trackingId",
")",
"{",
"$",
"trackingUrl",
"=",
"ParserUtil",
"::",
"addUrlParam",
"(",
"$",
"url",
",",
"$",
"this",
"->",
"trackingIdName",
",",
"$",
"trackingId",
")",
";",
"// ... | Append the CampaignChain Tracking ID to the URL.
@param $url
@param $trackingId
@return mixed|string | [
"Append",
"the",
"CampaignChain",
"Tracking",
"ID",
"to",
"the",
"URL",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/EntityService/CTAService.php#L242-L252 |
233,188 | CampaignChain/core | EntityService/CTAService.php | CTAService.getUniqueUrl | public function getUniqueUrl($url, $uniqueId)
{
// If the shortened URL is supposed to be unique, then we modify the URL.
$urlParts = parse_url($url);
if(!isset($urlParts['fragment'])){
//
$url .= '#'.$uniqueId;
} else {
//
$url = Parse... | php | public function getUniqueUrl($url, $uniqueId)
{
// If the shortened URL is supposed to be unique, then we modify the URL.
$urlParts = parse_url($url);
if(!isset($urlParts['fragment'])){
//
$url .= '#'.$uniqueId;
} else {
//
$url = Parse... | [
"public",
"function",
"getUniqueUrl",
"(",
"$",
"url",
",",
"$",
"uniqueId",
")",
"{",
"// If the shortened URL is supposed to be unique, then we modify the URL.",
"$",
"urlParts",
"=",
"parse_url",
"(",
"$",
"url",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"... | Modifies a URL so that it results into a unique short URL.
If a URL has no fragment, we add a unique ID as one. For example:
http://www.example.com/#2
If a URL fragment exists, we add a query parameter instead. For example:
http:/www.example.com/?ccshortly=2#fragment
@param string $url
@param integer $uniqueId
@retu... | [
"Modifies",
"a",
"URL",
"so",
"that",
"it",
"results",
"into",
"a",
"unique",
"short",
"URL",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/EntityService/CTAService.php#L267-L280 |
233,189 | CampaignChain/core | EntityService/CTAService.php | CTAService.getShortenedUrl | protected function getShortenedUrl($url, $uniqueId = null)
{
// skip if localhost
if (in_array(parse_url($url, PHP_URL_HOST), array('localhost', '127.0.0.1'))) {
return $url;
}
$link = new Link();
$link->setLongUrl($url);
$this->urlShortener->shorten($li... | php | protected function getShortenedUrl($url, $uniqueId = null)
{
// skip if localhost
if (in_array(parse_url($url, PHP_URL_HOST), array('localhost', '127.0.0.1'))) {
return $url;
}
$link = new Link();
$link->setLongUrl($url);
$this->urlShortener->shorten($li... | [
"protected",
"function",
"getShortenedUrl",
"(",
"$",
"url",
",",
"$",
"uniqueId",
"=",
"null",
")",
"{",
"// skip if localhost",
"if",
"(",
"in_array",
"(",
"parse_url",
"(",
"$",
"url",
",",
"PHP_URL_HOST",
")",
",",
"array",
"(",
"'localhost'",
",",
"'1... | Use shortener service to shorten url
@param $url
@param integer $uniqueId
@return mixed | [
"Use",
"shortener",
"service",
"to",
"shorten",
"url"
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/EntityService/CTAService.php#L289-L302 |
233,190 | CampaignChain/core | EntityService/CTAService.php | CTAService.countShortenedUrls | protected function countShortenedUrls($url, Operation $operation, Location $location = null)
{
if($operation->getActivity()->getCampaign()->getInterval()){
$isParentCampaign = false;
$campaign = $operation->getActivity()->getCampaign();
} elseif(
$operation->getAc... | php | protected function countShortenedUrls($url, Operation $operation, Location $location = null)
{
if($operation->getActivity()->getCampaign()->getInterval()){
$isParentCampaign = false;
$campaign = $operation->getActivity()->getCampaign();
} elseif(
$operation->getAc... | [
"protected",
"function",
"countShortenedUrls",
"(",
"$",
"url",
",",
"Operation",
"$",
"operation",
",",
"Location",
"$",
"location",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"operation",
"->",
"getActivity",
"(",
")",
"->",
"getCampaign",
"(",
")",
"->",
... | Counts the number of shortened URLs available for the same URL.
@param $url
@param Operation $operation
@param Location $location
@return mixed | [
"Counts",
"the",
"number",
"of",
"shortened",
"URLs",
"available",
"for",
"the",
"same",
"URL",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/EntityService/CTAService.php#L347-L390 |
233,191 | CampaignChain/core | Util/VariableUtil.php | VariableUtil.arrayMerge | static function arrayMerge($array1, $array2, $overwriteValue = true)
{
// if($overwriteValue) {
// foreach ($array2 as $key => $Value) {
// if (array_key_exists($key, $array1) && is_array($Value)) {
// $array1[$key] = self::arrayMergeRecursively(
// ... | php | static function arrayMerge($array1, $array2, $overwriteValue = true)
{
// if($overwriteValue) {
// foreach ($array2 as $key => $Value) {
// if (array_key_exists($key, $array1) && is_array($Value)) {
// $array1[$key] = self::arrayMergeRecursively(
// ... | [
"static",
"function",
"arrayMerge",
"(",
"$",
"array1",
",",
"$",
"array2",
",",
"$",
"overwriteValue",
"=",
"true",
")",
"{",
"// if($overwriteValue) {",
"// foreach ($array2 as $key => $Value) {",
"// if (array_key_exists($key, $array1) && is_ar... | Merges two arrays recursively, either by allowing for duplicate values
for a key or by overwriting identical values.
@param $array1
@param $array2
@param bool|true $overwriteValue
@return array | [
"Merges",
"two",
"arrays",
"recursively",
"either",
"by",
"allowing",
"for",
"duplicate",
"values",
"for",
"a",
"key",
"or",
"by",
"overwriting",
"identical",
"values",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Util/VariableUtil.php#L31-L51 |
233,192 | CampaignChain/core | Util/VariableUtil.php | VariableUtil.arraysIntersect | static function arraysIntersect(array $array1, array $array2)
{
$match = array_intersect($array1, $array2);
if(is_array($match) && count($match)){
return true;
}
return false;
} | php | static function arraysIntersect(array $array1, array $array2)
{
$match = array_intersect($array1, $array2);
if(is_array($match) && count($match)){
return true;
}
return false;
} | [
"static",
"function",
"arraysIntersect",
"(",
"array",
"$",
"array1",
",",
"array",
"$",
"array2",
")",
"{",
"$",
"match",
"=",
"array_intersect",
"(",
"$",
"array1",
",",
"$",
"array2",
")",
";",
"if",
"(",
"is_array",
"(",
"$",
"match",
")",
"&&",
... | At least 1 value in 1 array is identical with 1 value in the other array.
@param array $array1
@param array $array2
@return bool | [
"At",
"least",
"1",
"value",
"in",
"1",
"array",
"is",
"identical",
"with",
"1",
"value",
"in",
"the",
"other",
"array",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Util/VariableUtil.php#L112-L120 |
233,193 | CampaignChain/core | Util/VariableUtil.php | VariableUtil.stringContainsWord | static function stringContainsWord($str, array $arr)
{
foreach($arr as $a) {
if (stripos($str,$a) !== false) return true;
}
return false;
} | php | static function stringContainsWord($str, array $arr)
{
foreach($arr as $a) {
if (stripos($str,$a) !== false) return true;
}
return false;
} | [
"static",
"function",
"stringContainsWord",
"(",
"$",
"str",
",",
"array",
"$",
"arr",
")",
"{",
"foreach",
"(",
"$",
"arr",
"as",
"$",
"a",
")",
"{",
"if",
"(",
"stripos",
"(",
"$",
"str",
",",
"$",
"a",
")",
"!==",
"false",
")",
"return",
"true... | Minimum 1 word in the array can be found in the string.
@param $str
@param array $arr
@return bool | [
"Minimum",
"1",
"word",
"in",
"the",
"array",
"can",
"be",
"found",
"in",
"the",
"string",
"."
] | 82526548a223ed49fcd65ed7c23638544499775f | https://github.com/CampaignChain/core/blob/82526548a223ed49fcd65ed7c23638544499775f/Util/VariableUtil.php#L129-L135 |
233,194 | prooph/link-process-manager | src/Model/ProcessingMetadata.php | ProcessingMetadata.merge | public function merge(ProcessingMetadata $metadata)
{
return new self(ArrayUtils::merge($this->metadata->toArray(), $metadata->toArray()));
} | php | public function merge(ProcessingMetadata $metadata)
{
return new self(ArrayUtils::merge($this->metadata->toArray(), $metadata->toArray()));
} | [
"public",
"function",
"merge",
"(",
"ProcessingMetadata",
"$",
"metadata",
")",
"{",
"return",
"new",
"self",
"(",
"ArrayUtils",
"::",
"merge",
"(",
"$",
"this",
"->",
"metadata",
"->",
"toArray",
"(",
")",
",",
"$",
"metadata",
"->",
"toArray",
"(",
")"... | Merges given metadata recursive into existing metadata and returns a new ProcessingMetadata object
@param ProcessingMetadata $metadata
@return ProcessingMetadata | [
"Merges",
"given",
"metadata",
"recursive",
"into",
"existing",
"metadata",
"and",
"returns",
"a",
"new",
"ProcessingMetadata",
"object"
] | 3d6c8bdc72e855786227747bf06bcf8221f7860a | https://github.com/prooph/link-process-manager/blob/3d6c8bdc72e855786227747bf06bcf8221f7860a/src/Model/ProcessingMetadata.php#L67-L70 |
233,195 | prooph/link-process-manager | src/Model/ProcessingMetadata.php | ProcessingMetadata.setMetadata | private function setMetadata(array $metadata)
{
foreach($metadata as $key => &$partial) {
$this->assertArrayOrScalar($partial, $key);
}
$this->metadata = new ArrayReader($metadata);
} | php | private function setMetadata(array $metadata)
{
foreach($metadata as $key => &$partial) {
$this->assertArrayOrScalar($partial, $key);
}
$this->metadata = new ArrayReader($metadata);
} | [
"private",
"function",
"setMetadata",
"(",
"array",
"$",
"metadata",
")",
"{",
"foreach",
"(",
"$",
"metadata",
"as",
"$",
"key",
"=>",
"&",
"$",
"partial",
")",
"{",
"$",
"this",
"->",
"assertArrayOrScalar",
"(",
"$",
"partial",
",",
"$",
"key",
")",
... | Assert that metadata only contains scalar values and arrays
@param array $metadata | [
"Assert",
"that",
"metadata",
"only",
"contains",
"scalar",
"values",
"and",
"arrays"
] | 3d6c8bdc72e855786227747bf06bcf8221f7860a | https://github.com/prooph/link-process-manager/blob/3d6c8bdc72e855786227747bf06bcf8221f7860a/src/Model/ProcessingMetadata.php#L107-L114 |
233,196 | prooph/link-process-manager | src/Model/ProcessingMetadata.php | ProcessingMetadata.assertArrayOrScalar | private function assertArrayOrScalar(&$partialMetadata, $partialKey)
{
if (is_scalar($partialMetadata)) return;
if (! is_array($partialMetadata)) {
throw new \InvalidArgumentException(sprintf(
'The metadata key %s contains an invalid data type. Allowed types are all scal... | php | private function assertArrayOrScalar(&$partialMetadata, $partialKey)
{
if (is_scalar($partialMetadata)) return;
if (! is_array($partialMetadata)) {
throw new \InvalidArgumentException(sprintf(
'The metadata key %s contains an invalid data type. Allowed types are all scal... | [
"private",
"function",
"assertArrayOrScalar",
"(",
"&",
"$",
"partialMetadata",
",",
"$",
"partialKey",
")",
"{",
"if",
"(",
"is_scalar",
"(",
"$",
"partialMetadata",
")",
")",
"return",
";",
"if",
"(",
"!",
"is_array",
"(",
"$",
"partialMetadata",
")",
")... | Recursive assertion of metadata
@param mixed $partialMetadata
@param string $partialKey
@throws \InvalidArgumentException | [
"Recursive",
"assertion",
"of",
"metadata"
] | 3d6c8bdc72e855786227747bf06bcf8221f7860a | https://github.com/prooph/link-process-manager/blob/3d6c8bdc72e855786227747bf06bcf8221f7860a/src/Model/ProcessingMetadata.php#L123-L138 |
233,197 | civicrm/civicrm-setup | src/Setup/DbUtil.php | DbUtil.execute | public static function execute($conn, $sql) {
$conn = is_array($conn) ? self::connect($conn) : $conn;
$result = $conn->query($sql);
if (!$result) {
throw new SqlException("Cannot execute $sql: " . $conn->error);
}
if ($result && $result !== TRUE) {
$result->free_result();
}
} | php | public static function execute($conn, $sql) {
$conn = is_array($conn) ? self::connect($conn) : $conn;
$result = $conn->query($sql);
if (!$result) {
throw new SqlException("Cannot execute $sql: " . $conn->error);
}
if ($result && $result !== TRUE) {
$result->free_result();
}
} | [
"public",
"static",
"function",
"execute",
"(",
"$",
"conn",
",",
"$",
"sql",
")",
"{",
"$",
"conn",
"=",
"is_array",
"(",
"$",
"conn",
")",
"?",
"self",
"::",
"connect",
"(",
"$",
"conn",
")",
":",
"$",
"conn",
";",
"$",
"result",
"=",
"$",
"c... | Execute query. Ignore the results.
@param \mysqli|array $conn
The DB to query. Either a mysqli connection, or credentials for
establishing one.
@param string $sql
@throws SqlException | [
"Execute",
"query",
".",
"Ignore",
"the",
"results",
"."
] | 556b312faf78781c85c4fc4ae6c1c3b658da9e09 | https://github.com/civicrm/civicrm-setup/blob/556b312faf78781c85c4fc4ae6c1c3b658da9e09/src/Setup/DbUtil.php#L166-L177 |
233,198 | civicrm/civicrm-setup | src/Setup/DbUtil.php | DbUtil.fetchAll | public static function fetchAll($conn, $sql) {
$conn = is_array($conn) ? self::connect($conn) : $conn;
$result = $conn->query($sql);
if (!$result) {
throw new SqlException("Cannot execute $sql: " . $conn->error);
}
$rows = array();
while ($row = $result->fetch_assoc()) {
$rows[] = $... | php | public static function fetchAll($conn, $sql) {
$conn = is_array($conn) ? self::connect($conn) : $conn;
$result = $conn->query($sql);
if (!$result) {
throw new SqlException("Cannot execute $sql: " . $conn->error);
}
$rows = array();
while ($row = $result->fetch_assoc()) {
$rows[] = $... | [
"public",
"static",
"function",
"fetchAll",
"(",
"$",
"conn",
",",
"$",
"sql",
")",
"{",
"$",
"conn",
"=",
"is_array",
"(",
"$",
"conn",
")",
"?",
"self",
"::",
"connect",
"(",
"$",
"conn",
")",
":",
"$",
"conn",
";",
"$",
"result",
"=",
"$",
"... | Get all the results of a SQL query, as an array.
@param \mysqli|array $conn
The DB to query. Either a mysqli connection, or credentials for
establishing one.
@param string $sql
@return array
@throws \Exception | [
"Get",
"all",
"the",
"results",
"of",
"a",
"SQL",
"query",
"as",
"an",
"array",
"."
] | 556b312faf78781c85c4fc4ae6c1c3b658da9e09 | https://github.com/civicrm/civicrm-setup/blob/556b312faf78781c85c4fc4ae6c1c3b658da9e09/src/Setup/DbUtil.php#L189-L203 |
233,199 | civicrm/civicrm-setup | src/Setup/DbUtil.php | DbUtil.findViews | public static function findViews($conn, $databaseName) {
$sql = sprintf("SELECT table_name FROM information_schema.TABLES WHERE TABLE_SCHEMA='%s' AND TABLE_TYPE = 'VIEW'",
$conn->escape_string($databaseName));
return array_map(function($arr){
return $arr['table_name'];
}, self::fetchAll($conn,... | php | public static function findViews($conn, $databaseName) {
$sql = sprintf("SELECT table_name FROM information_schema.TABLES WHERE TABLE_SCHEMA='%s' AND TABLE_TYPE = 'VIEW'",
$conn->escape_string($databaseName));
return array_map(function($arr){
return $arr['table_name'];
}, self::fetchAll($conn,... | [
"public",
"static",
"function",
"findViews",
"(",
"$",
"conn",
",",
"$",
"databaseName",
")",
"{",
"$",
"sql",
"=",
"sprintf",
"(",
"\"SELECT table_name FROM information_schema.TABLES WHERE TABLE_SCHEMA='%s' AND TABLE_TYPE = 'VIEW'\"",
",",
"$",
"conn",
"->",
"escape_str... | Get a list of views in the given database.
@param \mysqli|array $conn
The DB to query. Either a mysqli connection, or credentials for
establishing one.
@param string $databaseName
@return array
Ex: ['civicrm_view1', 'civicrm_view2'] | [
"Get",
"a",
"list",
"of",
"views",
"in",
"the",
"given",
"database",
"."
] | 556b312faf78781c85c4fc4ae6c1c3b658da9e09 | https://github.com/civicrm/civicrm-setup/blob/556b312faf78781c85c4fc4ae6c1c3b658da9e09/src/Setup/DbUtil.php#L215-L222 |
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.