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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
17,100 | steeffeen/FancyManiaLinks | FML/Script/Features/Toggle.php | Toggle.setOnlyHide | public function setOnlyHide($onlyHide)
{
$this->onlyHide = (bool)$onlyHide;
if ($this->onlyHide) {
$this->onlyShow = null;
}
return $this;
} | php | public function setOnlyHide($onlyHide)
{
$this->onlyHide = (bool)$onlyHide;
if ($this->onlyHide) {
$this->onlyShow = null;
}
return $this;
} | [
"public",
"function",
"setOnlyHide",
"(",
"$",
"onlyHide",
")",
"{",
"$",
"this",
"->",
"onlyHide",
"=",
"(",
"bool",
")",
"$",
"onlyHide",
";",
"if",
"(",
"$",
"this",
"->",
"onlyHide",
")",
"{",
"$",
"this",
"->",
"onlyShow",
"=",
"null",
";",
"}... | Set Hide Only
@api
@param bool $onlyHide If it should only hide the Control but not toggle
@return static | [
"Set",
"Hide",
"Only"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/Toggle.php#L202-L209 |
17,101 | webforge-labs/psc-cms | lib/Psc/Net/HTTP/RequestHandler.php | RequestHandler.dumpRequest | protected function dumpRequest(Request $request) {
$body = $request->getBody();
$dump = "Body of request is:\n";
if (is_object($body) || is_array($body)) {
$dump .= json_encode($body);
} elseif(is_string($body)) {
$dump .= sprintf('"%s"',$body);
}
return $dump;
} | php | protected function dumpRequest(Request $request) {
$body = $request->getBody();
$dump = "Body of request is:\n";
if (is_object($body) || is_array($body)) {
$dump .= json_encode($body);
} elseif(is_string($body)) {
$dump .= sprintf('"%s"',$body);
}
return $dump;
} | [
"protected",
"function",
"dumpRequest",
"(",
"Request",
"$",
"request",
")",
"{",
"$",
"body",
"=",
"$",
"request",
"->",
"getBody",
"(",
")",
";",
"$",
"dump",
"=",
"\"Body of request is:\\n\"",
";",
"if",
"(",
"is_object",
"(",
"$",
"body",
")",
"||",
... | returns a importable string representation of the request
@return string | [
"returns",
"a",
"importable",
"string",
"representation",
"of",
"the",
"request"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Net/HTTP/RequestHandler.php#L317-L329 |
17,102 | CakeCMS/Core | src/View/Widget/MaterializeCss/FileWidget.php | FileWidget.render | public function render(array $data, ContextInterface $context)
{
$data += [
'name' => '',
'templateVars' => [],
'escape' => true
];
unset($data['val']);
$title = (Arr::key('title', $data)) ? $data['title'] : $data['name'];
... | php | public function render(array $data, ContextInterface $context)
{
$data += [
'name' => '',
'templateVars' => [],
'escape' => true
];
unset($data['val']);
$title = (Arr::key('title', $data)) ? $data['title'] : $data['name'];
... | [
"public",
"function",
"render",
"(",
"array",
"$",
"data",
",",
"ContextInterface",
"$",
"context",
")",
"{",
"$",
"data",
"+=",
"[",
"'name'",
"=>",
"''",
",",
"'templateVars'",
"=>",
"[",
"]",
",",
"'escape'",
"=>",
"true",
"]",
";",
"unset",
"(",
... | Render a file upload form widget.
Data supports the following keys:
- `name` - Set the input name.
- `escape` - Set to false to disable HTML escaping.
All other keys will be converted into HTML attributes.
Unlike other input objects the `val` property will be specifically
ignored.
@param array $data The data to b... | [
"Render",
"a",
"file",
"upload",
"form",
"widget",
"."
] | f9cba7aa0043a10e5c35bd45fbad158688a09a96 | https://github.com/CakeCMS/Core/blob/f9cba7aa0043a10e5c35bd45fbad158688a09a96/src/View/Widget/MaterializeCss/FileWidget.php#L47-L65 |
17,103 | drsdre/yii2-xmlsoccer | models/Team.php | Team.getMatches | public function getMatches()
{
$matches = ArrayHelper::merge($this->homeMatches, $this->awayMatches);
ArrayHelper::multisort($matches, 'date', SORT_ASC);
return $matches;
} | php | public function getMatches()
{
$matches = ArrayHelper::merge($this->homeMatches, $this->awayMatches);
ArrayHelper::multisort($matches, 'date', SORT_ASC);
return $matches;
} | [
"public",
"function",
"getMatches",
"(",
")",
"{",
"$",
"matches",
"=",
"ArrayHelper",
"::",
"merge",
"(",
"$",
"this",
"->",
"homeMatches",
",",
"$",
"this",
"->",
"awayMatches",
")",
";",
"ArrayHelper",
"::",
"multisort",
"(",
"$",
"matches",
",",
"'da... | Get all matches
@return array | [
"Get",
"all",
"matches"
] | a746edee6269ed0791bac6c6165a946adc30d994 | https://github.com/drsdre/yii2-xmlsoccer/blob/a746edee6269ed0791bac6c6165a946adc30d994/models/Team.php#L96-L101 |
17,104 | anime-db/app-bundle | src/Controller/NoticeController.php | NoticeController.showAction | public function showAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
/* @var $rep NoticeRepository */
$rep = $em->getRepository('AnimeDbAppBundle:Notice');
$notice = $rep->getFirstShow();
// caching
/* @var $response JsonResponse */
$respo... | php | public function showAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
/* @var $rep NoticeRepository */
$rep = $em->getRepository('AnimeDbAppBundle:Notice');
$notice = $rep->getFirstShow();
// caching
/* @var $response JsonResponse */
$respo... | [
"public",
"function",
"showAction",
"(",
"Request",
"$",
"request",
")",
"{",
"$",
"em",
"=",
"$",
"this",
"->",
"getDoctrine",
"(",
")",
"->",
"getManager",
"(",
")",
";",
"/* @var $rep NoticeRepository */",
"$",
"rep",
"=",
"$",
"em",
"->",
"getRepositor... | Show last notice.
@param Request $request
@return JsonResponse | [
"Show",
"last",
"notice",
"."
] | ca3b342081719d41ba018792a75970cbb1f1fe22 | https://github.com/anime-db/app-bundle/blob/ca3b342081719d41ba018792a75970cbb1f1fe22/src/Controller/NoticeController.php#L25-L59 |
17,105 | flipboxstudio/orm-manager | src/Flipbox/OrmManager/BothRelations/ManyToMany.php | ManyToMany.setConnectedRelationOptions | protected function setConnectedRelationOptions()
{
$pivotTable = $this->defaultOptions['pivot_table'];
$foreignKey = $this->defaultOptions['foreign_key'];
$relatedKey = $this->defaultOptions['related_key'];
if (! $this->db->isTableExists($pivotTable)) {
$question = "Can'... | php | protected function setConnectedRelationOptions()
{
$pivotTable = $this->defaultOptions['pivot_table'];
$foreignKey = $this->defaultOptions['foreign_key'];
$relatedKey = $this->defaultOptions['related_key'];
if (! $this->db->isTableExists($pivotTable)) {
$question = "Can'... | [
"protected",
"function",
"setConnectedRelationOptions",
"(",
")",
"{",
"$",
"pivotTable",
"=",
"$",
"this",
"->",
"defaultOptions",
"[",
"'pivot_table'",
"]",
";",
"$",
"foreignKey",
"=",
"$",
"this",
"->",
"defaultOptions",
"[",
"'foreign_key'",
"]",
";",
"$"... | get connected db relation options
@return void | [
"get",
"connected",
"db",
"relation",
"options"
] | 4288426517f53d05177b8729c4ba94c5beca9a98 | https://github.com/flipboxstudio/orm-manager/blob/4288426517f53d05177b8729c4ba94c5beca9a98/src/Flipbox/OrmManager/BothRelations/ManyToMany.php#L63-L86 |
17,106 | limen/php-jobs | src/Contracts/BaseJobset.php | BaseJobset.make | public static function make($attributes = [])
{
$jobset = new static();
// make jobset model
$model = $jobset->makeModel($attributes);
// update local model
$jobset->setModel($model);
// make job models and init job instances
$jobset->makeJobs();
// s... | php | public static function make($attributes = [])
{
$jobset = new static();
// make jobset model
$model = $jobset->makeModel($attributes);
// update local model
$jobset->setModel($model);
// make job models and init job instances
$jobset->makeJobs();
// s... | [
"public",
"static",
"function",
"make",
"(",
"$",
"attributes",
"=",
"[",
"]",
")",
"{",
"$",
"jobset",
"=",
"new",
"static",
"(",
")",
";",
"// make jobset model",
"$",
"model",
"=",
"$",
"jobset",
"->",
"makeModel",
"(",
"$",
"attributes",
")",
";",
... | Make new jobset
@param array $attributes
@return BaseJobset | [
"Make",
"new",
"jobset"
] | 525f4082b49a7a3e69acb4cea3a622244f1616b9 | https://github.com/limen/php-jobs/blob/525f4082b49a7a3e69acb4cea3a622244f1616b9/src/Contracts/BaseJobset.php#L37-L53 |
17,107 | limen/php-jobs | src/Contracts/BaseJobset.php | BaseJobset.get | public static function get($id)
{
$jobset = new static();
// find jobset model
$model = $jobset->findModel($id);
// update local model
$jobset->setModel($model);
// Init job instances
$jobset->initJobs();
return $jobset;
} | php | public static function get($id)
{
$jobset = new static();
// find jobset model
$model = $jobset->findModel($id);
// update local model
$jobset->setModel($model);
// Init job instances
$jobset->initJobs();
return $jobset;
} | [
"public",
"static",
"function",
"get",
"(",
"$",
"id",
")",
"{",
"$",
"jobset",
"=",
"new",
"static",
"(",
")",
";",
"// find jobset model",
"$",
"model",
"=",
"$",
"jobset",
"->",
"findModel",
"(",
"$",
"id",
")",
";",
"// update local model",
"$",
"j... | Get an existed jobset
@param $id
@return static | [
"Get",
"an",
"existed",
"jobset"
] | 525f4082b49a7a3e69acb4cea3a622244f1616b9 | https://github.com/limen/php-jobs/blob/525f4082b49a7a3e69acb4cea3a622244f1616b9/src/Contracts/BaseJobset.php#L61-L73 |
17,108 | limen/php-jobs | src/Contracts/BaseJobset.php | BaseJobset.execute | public function execute()
{
// If the jobset is finished or failed
// the jobset may need to be dispatched
// so we return true
if ($this->isFinished() || $this->isFailed()) {
return true;
}
// Just return false to tell to terminate the process
if ... | php | public function execute()
{
// If the jobset is finished or failed
// the jobset may need to be dispatched
// so we return true
if ($this->isFinished() || $this->isFailed()) {
return true;
}
// Just return false to tell to terminate the process
if ... | [
"public",
"function",
"execute",
"(",
")",
"{",
"// If the jobset is finished or failed",
"// the jobset may need to be dispatched",
"// so we return true",
"if",
"(",
"$",
"this",
"->",
"isFinished",
"(",
")",
"||",
"$",
"this",
"->",
"isFailed",
"(",
")",
")",
"{"... | If return true, the jobset should be dispatched with considering its status
Or the jobset process should be terminated
@return bool
@throws \Exception | [
"If",
"return",
"true",
"the",
"jobset",
"should",
"be",
"dispatched",
"with",
"considering",
"its",
"status",
"Or",
"the",
"jobset",
"process",
"should",
"be",
"terminated"
] | 525f4082b49a7a3e69acb4cea3a622244f1616b9 | https://github.com/limen/php-jobs/blob/525f4082b49a7a3e69acb4cea3a622244f1616b9/src/Contracts/BaseJobset.php#L206-L244 |
17,109 | limen/php-jobs | src/Contracts/BaseJobset.php | BaseJobset.dispatched | public function dispatched()
{
// Only finished or failed jobset should be dispatched
if ($this->isFinished() || $this->isFailed()) {
$status = $this->isFinished() ?
JobsConst::JOB_SET_STATUS_FINISHED_AND_DISPATCHED : JobsConst::JOB_SET_STATUS_FAILED_AND_DISPATCHED;
... | php | public function dispatched()
{
// Only finished or failed jobset should be dispatched
if ($this->isFinished() || $this->isFailed()) {
$status = $this->isFinished() ?
JobsConst::JOB_SET_STATUS_FINISHED_AND_DISPATCHED : JobsConst::JOB_SET_STATUS_FAILED_AND_DISPATCHED;
... | [
"public",
"function",
"dispatched",
"(",
")",
"{",
"// Only finished or failed jobset should be dispatched",
"if",
"(",
"$",
"this",
"->",
"isFinished",
"(",
")",
"||",
"$",
"this",
"->",
"isFailed",
"(",
")",
")",
"{",
"$",
"status",
"=",
"$",
"this",
"->",... | After successfully notice to commander, we mark the jobset as dispatched here. | [
"After",
"successfully",
"notice",
"to",
"commander",
"we",
"mark",
"the",
"jobset",
"as",
"dispatched",
"here",
"."
] | 525f4082b49a7a3e69acb4cea3a622244f1616b9 | https://github.com/limen/php-jobs/blob/525f4082b49a7a3e69acb4cea3a622244f1616b9/src/Contracts/BaseJobset.php#L309-L320 |
17,110 | limen/php-jobs | src/Contracts/BaseJobset.php | BaseJobset.getJobsetExecutionStatus | public function getJobsetExecutionStatus()
{
$finished = count($this->jobs) > 0 ? true : false;
$failed = false;
$middle = false;
foreach ($this->jobs as $job) {
if ($job->isFailed()) {
$finished = false;
$middle = false;
$... | php | public function getJobsetExecutionStatus()
{
$finished = count($this->jobs) > 0 ? true : false;
$failed = false;
$middle = false;
foreach ($this->jobs as $job) {
if ($job->isFailed()) {
$finished = false;
$middle = false;
$... | [
"public",
"function",
"getJobsetExecutionStatus",
"(",
")",
"{",
"$",
"finished",
"=",
"count",
"(",
"$",
"this",
"->",
"jobs",
")",
">",
"0",
"?",
"true",
":",
"false",
";",
"$",
"failed",
"=",
"false",
";",
"$",
"middle",
"=",
"false",
";",
"foreac... | Get jobset execution status from sub jobs statuses.
At least one job failed, the jobset is failed.
All jobs finished, the jobset is finished.
At least one job has been executed, the jobset is ongoing.
All jobs have not been executed, the jobset is in default status.
@return int | [
"Get",
"jobset",
"execution",
"status",
"from",
"sub",
"jobs",
"statuses",
".",
"At",
"least",
"one",
"job",
"failed",
"the",
"jobset",
"is",
"failed",
".",
"All",
"jobs",
"finished",
"the",
"jobset",
"is",
"finished",
".",
"At",
"least",
"one",
"job",
"... | 525f4082b49a7a3e69acb4cea3a622244f1616b9 | https://github.com/limen/php-jobs/blob/525f4082b49a7a3e69acb4cea3a622244f1616b9/src/Contracts/BaseJobset.php#L341-L369 |
17,111 | limen/php-jobs | src/Contracts/BaseJobset.php | BaseJobset.doOrderedJobs | protected function doOrderedJobs()
{
$jobNames = $this->getOrderedJobNames();
foreach ($jobNames as $jobName) {
$job = $this->getLocalJob($jobName);
if (!$job) {
throw new \Exception("job [$jobName] not exists");
}
$job->execute();
... | php | protected function doOrderedJobs()
{
$jobNames = $this->getOrderedJobNames();
foreach ($jobNames as $jobName) {
$job = $this->getLocalJob($jobName);
if (!$job) {
throw new \Exception("job [$jobName] not exists");
}
$job->execute();
... | [
"protected",
"function",
"doOrderedJobs",
"(",
")",
"{",
"$",
"jobNames",
"=",
"$",
"this",
"->",
"getOrderedJobNames",
"(",
")",
";",
"foreach",
"(",
"$",
"jobNames",
"as",
"$",
"jobName",
")",
"{",
"$",
"job",
"=",
"$",
"this",
"->",
"getLocalJob",
"... | Do ordered jobs | [
"Do",
"ordered",
"jobs"
] | 525f4082b49a7a3e69acb4cea3a622244f1616b9 | https://github.com/limen/php-jobs/blob/525f4082b49a7a3e69acb4cea3a622244f1616b9/src/Contracts/BaseJobset.php#L374-L388 |
17,112 | limen/php-jobs | src/Contracts/BaseJobset.php | BaseJobset.doUnorderedJobs | protected function doUnorderedJobs()
{
$jobNames = $this->getUnorderedJobNames();
foreach ($jobNames as $jobName) {
$job = $this->getLocalJob($jobName);
if (!$job) {
throw new \Exception("job [$jobName] not exists");
}
$job->execute();... | php | protected function doUnorderedJobs()
{
$jobNames = $this->getUnorderedJobNames();
foreach ($jobNames as $jobName) {
$job = $this->getLocalJob($jobName);
if (!$job) {
throw new \Exception("job [$jobName] not exists");
}
$job->execute();... | [
"protected",
"function",
"doUnorderedJobs",
"(",
")",
"{",
"$",
"jobNames",
"=",
"$",
"this",
"->",
"getUnorderedJobNames",
"(",
")",
";",
"foreach",
"(",
"$",
"jobNames",
"as",
"$",
"jobName",
")",
"{",
"$",
"job",
"=",
"$",
"this",
"->",
"getLocalJob",... | Do unordered jobs | [
"Do",
"unordered",
"jobs"
] | 525f4082b49a7a3e69acb4cea3a622244f1616b9 | https://github.com/limen/php-jobs/blob/525f4082b49a7a3e69acb4cea3a622244f1616b9/src/Contracts/BaseJobset.php#L393-L405 |
17,113 | limen/php-jobs | src/Contracts/BaseJobset.php | BaseJobset.getJobsEarliestTryAt | protected function getJobsEarliestTryAt()
{
$tryAt = date('Y-m-d H:i:s');
foreach ($this->jobs as $job) {
if (!$job->isFinished() && Helper::datetimeLT($job->getTryAt(), $tryAt)) {
$tryAt = $job->getTryAt();
}
}
return $tryAt;
} | php | protected function getJobsEarliestTryAt()
{
$tryAt = date('Y-m-d H:i:s');
foreach ($this->jobs as $job) {
if (!$job->isFinished() && Helper::datetimeLT($job->getTryAt(), $tryAt)) {
$tryAt = $job->getTryAt();
}
}
return $tryAt;
} | [
"protected",
"function",
"getJobsEarliestTryAt",
"(",
")",
"{",
"$",
"tryAt",
"=",
"date",
"(",
"'Y-m-d H:i:s'",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"jobs",
"as",
"$",
"job",
")",
"{",
"if",
"(",
"!",
"$",
"job",
"->",
"isFinished",
"(",
")"... | get the earliest job try at time, except the finished jobs
@return false|mixed|string | [
"get",
"the",
"earliest",
"job",
"try",
"at",
"time",
"except",
"the",
"finished",
"jobs"
] | 525f4082b49a7a3e69acb4cea3a622244f1616b9 | https://github.com/limen/php-jobs/blob/525f4082b49a7a3e69acb4cea3a622244f1616b9/src/Contracts/BaseJobset.php#L412-L423 |
17,114 | traderinteractive/util-string-php | src/Strings.php | Strings.format | public static function format(string $format, string ...$arguments) : string
{
foreach ($arguments as $key => $value) {
$format = str_replace("{{$key}}", (string)$value, $format);
}
return $format;
} | php | public static function format(string $format, string ...$arguments) : string
{
foreach ($arguments as $key => $value) {
$format = str_replace("{{$key}}", (string)$value, $format);
}
return $format;
} | [
"public",
"static",
"function",
"format",
"(",
"string",
"$",
"format",
",",
"string",
"...",
"$",
"arguments",
")",
":",
"string",
"{",
"foreach",
"(",
"$",
"arguments",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"$",
"format",
"=",
"str_replace"... | Replaces the format items in a specified string with the string representation of n specified objects.
@param string $format A composit format string
@param mixed $arguments Variable number of items to format.
@return string Returns a copy of format in which the format items have been
replaced by the string represen... | [
"Replaces",
"the",
"format",
"items",
"in",
"a",
"specified",
"string",
"with",
"the",
"string",
"representation",
"of",
"n",
"specified",
"objects",
"."
] | 5c05605fd836f3a2822065d474e814c8644857b8 | https://github.com/traderinteractive/util-string-php/blob/5c05605fd836f3a2822065d474e814c8644857b8/src/Strings.php#L22-L29 |
17,115 | traderinteractive/util-string-php | src/Strings.php | Strings.ellipsize | public static function ellipsize(string $string, int $maxLength, string $suffix = '...') : string
{
if ($maxLength < 0) {
throw new \InvalidArgumentException('$maxLength is negative');
}
if (strlen($string) <= $maxLength) {
return $string;
}
$trimmed... | php | public static function ellipsize(string $string, int $maxLength, string $suffix = '...') : string
{
if ($maxLength < 0) {
throw new \InvalidArgumentException('$maxLength is negative');
}
if (strlen($string) <= $maxLength) {
return $string;
}
$trimmed... | [
"public",
"static",
"function",
"ellipsize",
"(",
"string",
"$",
"string",
",",
"int",
"$",
"maxLength",
",",
"string",
"$",
"suffix",
"=",
"'...'",
")",
":",
"string",
"{",
"if",
"(",
"$",
"maxLength",
"<",
"0",
")",
"{",
"throw",
"new",
"\\",
"Inva... | Truncates the string to the given length, with an ellipsis at the end.
@param string $string The string to shorten.
@param int $maxLength The length to truncate the string to. The result will not be longer than this, but may be
shorter.
@param string $suffix The string to append when truncating. Typically this will ... | [
"Truncates",
"the",
"string",
"to",
"the",
"given",
"length",
"with",
"an",
"ellipsis",
"at",
"the",
"end",
"."
] | 5c05605fd836f3a2822065d474e814c8644857b8 | https://github.com/traderinteractive/util-string-php/blob/5c05605fd836f3a2822065d474e814c8644857b8/src/Strings.php#L75-L93 |
17,116 | trafficgate/shell-command | src/ShellOption.php | ShellOption.enable | public function enable($enable = true)
{
if (! is_bool($enable)) {
throw new InvalidArgumentException("enable must be a boolean. [$enable] given.");
}
$this->enabled = $enable;
return $this;
} | php | public function enable($enable = true)
{
if (! is_bool($enable)) {
throw new InvalidArgumentException("enable must be a boolean. [$enable] given.");
}
$this->enabled = $enable;
return $this;
} | [
"public",
"function",
"enable",
"(",
"$",
"enable",
"=",
"true",
")",
"{",
"if",
"(",
"!",
"is_bool",
"(",
"$",
"enable",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"\"enable must be a boolean. [$enable] given.\"",
")",
";",
"}",
"$",
"t... | Enable the option.
@param bool|true $enable
@throws InvalidArgumentException
@return $this | [
"Enable",
"the",
"option",
"."
] | 1a5f3fcf689f33098b192c34839effe309202c0e | https://github.com/trafficgate/shell-command/blob/1a5f3fcf689f33098b192c34839effe309202c0e/src/ShellOption.php#L100-L109 |
17,117 | trafficgate/shell-command | src/ShellOption.php | ShellOption.hasValue | public function hasValue($value)
{
$index = array_search($value, $this->values);
if ($index === false) {
return false;
}
return true;
} | php | public function hasValue($value)
{
$index = array_search($value, $this->values);
if ($index === false) {
return false;
}
return true;
} | [
"public",
"function",
"hasValue",
"(",
"$",
"value",
")",
"{",
"$",
"index",
"=",
"array_search",
"(",
"$",
"value",
",",
"$",
"this",
"->",
"values",
")",
";",
"if",
"(",
"$",
"index",
"===",
"false",
")",
"{",
"return",
"false",
";",
"}",
"return... | Return whether this option has the given value or not.
@param mixed $value
@return bool | [
"Return",
"whether",
"this",
"option",
"has",
"the",
"given",
"value",
"or",
"not",
"."
] | 1a5f3fcf689f33098b192c34839effe309202c0e | https://github.com/trafficgate/shell-command/blob/1a5f3fcf689f33098b192c34839effe309202c0e/src/ShellOption.php#L150-L159 |
17,118 | trafficgate/shell-command | src/ShellOption.php | ShellOption.addValue | public function addValue($value)
{
$this->assertCanHaveValue();
$this->assertValueIsValid($value);
if ($this->canHaveMultipleValues() && ! $this->hasValue($value)) {
$value = array_merge($this->values, (array) $value);
}
$this->values = (array) $value;
... | php | public function addValue($value)
{
$this->assertCanHaveValue();
$this->assertValueIsValid($value);
if ($this->canHaveMultipleValues() && ! $this->hasValue($value)) {
$value = array_merge($this->values, (array) $value);
}
$this->values = (array) $value;
... | [
"public",
"function",
"addValue",
"(",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"assertCanHaveValue",
"(",
")",
";",
"$",
"this",
"->",
"assertValueIsValid",
"(",
"$",
"value",
")",
";",
"if",
"(",
"$",
"this",
"->",
"canHaveMultipleValues",
"(",
")",
... | Add a new value to this option.
@param int|string $value
@return $this | [
"Add",
"a",
"new",
"value",
"to",
"this",
"option",
"."
] | 1a5f3fcf689f33098b192c34839effe309202c0e | https://github.com/trafficgate/shell-command/blob/1a5f3fcf689f33098b192c34839effe309202c0e/src/ShellOption.php#L178-L190 |
17,119 | trafficgate/shell-command | src/ShellOption.php | ShellOption.addValues | public function addValues(array $values = [])
{
$this->assertCanHaveMultipleValues();
foreach ($values as $value) {
$this->addValue($value);
}
return $this;
} | php | public function addValues(array $values = [])
{
$this->assertCanHaveMultipleValues();
foreach ($values as $value) {
$this->addValue($value);
}
return $this;
} | [
"public",
"function",
"addValues",
"(",
"array",
"$",
"values",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"assertCanHaveMultipleValues",
"(",
")",
";",
"foreach",
"(",
"$",
"values",
"as",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"addValue",
"(",
... | Add multiple values to this option.
@param array $values
@return $this | [
"Add",
"multiple",
"values",
"to",
"this",
"option",
"."
] | 1a5f3fcf689f33098b192c34839effe309202c0e | https://github.com/trafficgate/shell-command/blob/1a5f3fcf689f33098b192c34839effe309202c0e/src/ShellOption.php#L199-L208 |
17,120 | trafficgate/shell-command | src/ShellOption.php | ShellOption.removeValue | public function removeValue($value)
{
if (! $this->canHaveMultipleValues() && ! isset($value)) {
$this->values = [];
$this->enable($enable = false);
return $this;
}
$this->assertValueIsValid($value);
$this->assertCanHaveValue();
if ($thi... | php | public function removeValue($value)
{
if (! $this->canHaveMultipleValues() && ! isset($value)) {
$this->values = [];
$this->enable($enable = false);
return $this;
}
$this->assertValueIsValid($value);
$this->assertCanHaveValue();
if ($thi... | [
"public",
"function",
"removeValue",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"canHaveMultipleValues",
"(",
")",
"&&",
"!",
"isset",
"(",
"$",
"value",
")",
")",
"{",
"$",
"this",
"->",
"values",
"=",
"[",
"]",
";",
"$",
"t... | Remove the given value from the option.
@param int|string $value
@return $this | [
"Remove",
"the",
"given",
"value",
"from",
"the",
"option",
"."
] | 1a5f3fcf689f33098b192c34839effe309202c0e | https://github.com/trafficgate/shell-command/blob/1a5f3fcf689f33098b192c34839effe309202c0e/src/ShellOption.php#L217-L236 |
17,121 | trafficgate/shell-command | src/ShellOption.php | ShellOption.removeValues | public function removeValues(array $values = [])
{
$this->assertCanHaveMultipleValues();
foreach ($values as $value) {
$this->removeValue($value);
}
return $this;
} | php | public function removeValues(array $values = [])
{
$this->assertCanHaveMultipleValues();
foreach ($values as $value) {
$this->removeValue($value);
}
return $this;
} | [
"public",
"function",
"removeValues",
"(",
"array",
"$",
"values",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"assertCanHaveMultipleValues",
"(",
")",
";",
"foreach",
"(",
"$",
"values",
"as",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"removeValue",
... | Remove the given values from the option.
@param array $values
@return $this | [
"Remove",
"the",
"given",
"values",
"from",
"the",
"option",
"."
] | 1a5f3fcf689f33098b192c34839effe309202c0e | https://github.com/trafficgate/shell-command/blob/1a5f3fcf689f33098b192c34839effe309202c0e/src/ShellOption.php#L245-L254 |
17,122 | trafficgate/shell-command | src/ShellOption.php | ShellOption.getArray | public function getArray()
{
$options = [];
if ($this->isDisabled() || $this->canHaveValue() && empty($this->values)) {
return $options;
}
foreach ($this->values as $value) {
$options[] = $this->flag();
$options[] = $value;
}
if ... | php | public function getArray()
{
$options = [];
if ($this->isDisabled() || $this->canHaveValue() && empty($this->values)) {
return $options;
}
foreach ($this->values as $value) {
$options[] = $this->flag();
$options[] = $value;
}
if ... | [
"public",
"function",
"getArray",
"(",
")",
"{",
"$",
"options",
"=",
"[",
"]",
";",
"if",
"(",
"$",
"this",
"->",
"isDisabled",
"(",
")",
"||",
"$",
"this",
"->",
"canHaveValue",
"(",
")",
"&&",
"empty",
"(",
"$",
"this",
"->",
"values",
")",
")... | Get the option and its values as an array.
@return array | [
"Get",
"the",
"option",
"and",
"its",
"values",
"as",
"an",
"array",
"."
] | 1a5f3fcf689f33098b192c34839effe309202c0e | https://github.com/trafficgate/shell-command/blob/1a5f3fcf689f33098b192c34839effe309202c0e/src/ShellOption.php#L261-L279 |
17,123 | trafficgate/shell-command | src/ShellOption.php | ShellOption.parseFlag | private function parseFlag($flag)
{
$flag = trim($flag);
$pattern = '/^'.// Match start of string
'('.// Start Group
'(?<flag>(?:-\w|--\w[\w-]+))'.// Match Group <flag>
'(?<enable>\+)?'.//Enable option by default (useful for creating special commands)
... | php | private function parseFlag($flag)
{
$flag = trim($flag);
$pattern = '/^'.// Match start of string
'('.// Start Group
'(?<flag>(?:-\w|--\w[\w-]+))'.// Match Group <flag>
'(?<enable>\+)?'.//Enable option by default (useful for creating special commands)
... | [
"private",
"function",
"parseFlag",
"(",
"$",
"flag",
")",
"{",
"$",
"flag",
"=",
"trim",
"(",
"$",
"flag",
")",
";",
"$",
"pattern",
"=",
"'/^'",
".",
"// Match start of string",
"'('",
".",
"// Start Group",
"'(?<flag>(?:-\\w|--\\w[\\w-]+))'",
".",
"// Match... | Parse a given flag.
The flag should be in one of the following formats:
- "-v"
- "--verbose"
- "-a="
- "--address="
- "-a=*"
- "--address=*"
@param string $flag
@return array | [
"Parse",
"a",
"given",
"flag",
"."
] | 1a5f3fcf689f33098b192c34839effe309202c0e | https://github.com/trafficgate/shell-command/blob/1a5f3fcf689f33098b192c34839effe309202c0e/src/ShellOption.php#L296-L370 |
17,124 | trafficgate/shell-command | src/ShellOption.php | ShellOption.setDescription | private function setDescription($description = null)
{
if (isset($description) && ! is_string($description)) {
throw new InvalidArgumentException("Description must be a string. [$description] given.");
}
$this->description = $description;
} | php | private function setDescription($description = null)
{
if (isset($description) && ! is_string($description)) {
throw new InvalidArgumentException("Description must be a string. [$description] given.");
}
$this->description = $description;
} | [
"private",
"function",
"setDescription",
"(",
"$",
"description",
"=",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"description",
")",
"&&",
"!",
"is_string",
"(",
"$",
"description",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"\"D... | Set the description.
@param string|null $description
@throws InvalidArgumentException | [
"Set",
"the",
"description",
"."
] | 1a5f3fcf689f33098b192c34839effe309202c0e | https://github.com/trafficgate/shell-command/blob/1a5f3fcf689f33098b192c34839effe309202c0e/src/ShellOption.php#L439-L446 |
17,125 | trafficgate/shell-command | src/ShellOption.php | ShellOption.setValues | private function setValues($values)
{
if (! empty($values)) {
if ($this->canHaveMultipleValues()) {
$this->addValues($values);
} elseif ($this->canHaveValue()) {
$this->addValue($values);
}
}
return $this;
} | php | private function setValues($values)
{
if (! empty($values)) {
if ($this->canHaveMultipleValues()) {
$this->addValues($values);
} elseif ($this->canHaveValue()) {
$this->addValue($values);
}
}
return $this;
} | [
"private",
"function",
"setValues",
"(",
"$",
"values",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"values",
")",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"canHaveMultipleValues",
"(",
")",
")",
"{",
"$",
"this",
"->",
"addValues",
"(",
"$",
"valu... | Set the values for this option.
@param array $values
@return $this | [
"Set",
"the",
"values",
"for",
"this",
"option",
"."
] | 1a5f3fcf689f33098b192c34839effe309202c0e | https://github.com/trafficgate/shell-command/blob/1a5f3fcf689f33098b192c34839effe309202c0e/src/ShellOption.php#L455-L466 |
17,126 | webtorque7/link-field | code/WTTreeDropdownField.php | WTTreeDropdownField.Link | public function Link($action = null) {
$name = $this->name;
if (($pos = stripos($name, '[')) !== false) {
$name = substr($name, 0, $pos);
$action = substr($this->name, $pos + 1, strlen($this->name) - 1 - ($pos + 1)) . 'Tree';
... | php | public function Link($action = null) {
$name = $this->name;
if (($pos = stripos($name, '[')) !== false) {
$name = substr($name, 0, $pos);
$action = substr($this->name, $pos + 1, strlen($this->name) - 1 - ($pos + 1)) . 'Tree';
... | [
"public",
"function",
"Link",
"(",
"$",
"action",
"=",
"null",
")",
"{",
"$",
"name",
"=",
"$",
"this",
"->",
"name",
";",
"if",
"(",
"(",
"$",
"pos",
"=",
"stripos",
"(",
"$",
"name",
",",
"'['",
")",
")",
"!==",
"false",
")",
"{",
"$",
"nam... | Return a Link to this field | [
"Return",
"a",
"Link",
"to",
"this",
"field"
] | b846644e1d35676419e71f3127cfc8f150aff081 | https://github.com/webtorque7/link-field/blob/b846644e1d35676419e71f3127cfc8f150aff081/code/WTTreeDropdownField.php#L8-L18 |
17,127 | Sedona-Solutions/sedona-sbo | src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php | DatatableQuery.setWhereResultCallback | private function setWhereResultCallback(QueryBuilder $qb)
{
if (!empty($this->callbacks['WhereResult'])) {
foreach ($this->callbacks['WhereResult'] as $callback) {
$callback($qb);
}
}
return $this;
} | php | private function setWhereResultCallback(QueryBuilder $qb)
{
if (!empty($this->callbacks['WhereResult'])) {
foreach ($this->callbacks['WhereResult'] as $callback) {
$callback($qb);
}
}
return $this;
} | [
"private",
"function",
"setWhereResultCallback",
"(",
"QueryBuilder",
"$",
"qb",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"callbacks",
"[",
"'WhereResult'",
"]",
")",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"callbacks",
"[",
"'Wher... | Set where result callback.
@param QueryBuilder $qb
@return $this | [
"Set",
"where",
"result",
"callback",
"."
] | 8548be4170d191cb1a3e263577aaaab49f04d5ce | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php#L419-L428 |
17,128 | Sedona-Solutions/sedona-sbo | src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php | DatatableQuery.setWhereAllCallback | private function setWhereAllCallback(QueryBuilder $qb)
{
if (!empty($this->callbacks['WhereAll'])) {
foreach ($this->callbacks['WhereAll'] as $callback) {
$callback($qb);
}
}
return $this;
} | php | private function setWhereAllCallback(QueryBuilder $qb)
{
if (!empty($this->callbacks['WhereAll'])) {
foreach ($this->callbacks['WhereAll'] as $callback) {
$callback($qb);
}
}
return $this;
} | [
"private",
"function",
"setWhereAllCallback",
"(",
"QueryBuilder",
"$",
"qb",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"callbacks",
"[",
"'WhereAll'",
"]",
")",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"callbacks",
"[",
"'WhereAll'"... | Set where all callback.
@param QueryBuilder $qb
@return $this | [
"Set",
"where",
"all",
"callback",
"."
] | 8548be4170d191cb1a3e263577aaaab49f04d5ce | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php#L437-L446 |
17,129 | Sedona-Solutions/sedona-sbo | src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php | DatatableQuery.setSelectFrom | private function setSelectFrom()
{
foreach ($this->selectColumns as $key => $value) {
$this->qb->addSelect($key);
}
$this->qb->from($this->entity, $this->tableName);
return $this;
} | php | private function setSelectFrom()
{
foreach ($this->selectColumns as $key => $value) {
$this->qb->addSelect($key);
}
$this->qb->from($this->entity, $this->tableName);
return $this;
} | [
"private",
"function",
"setSelectFrom",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"selectColumns",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"$",
"this",
"->",
"qb",
"->",
"addSelect",
"(",
"$",
"key",
")",
";",
"}",
"$",
"this",
"->"... | Set select from.
@return $this | [
"Set",
"select",
"from",
"."
] | 8548be4170d191cb1a3e263577aaaab49f04d5ce | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php#L457-L466 |
17,130 | Sedona-Solutions/sedona-sbo | src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php | DatatableQuery.setLeftJoins | private function setLeftJoins(QueryBuilder $qb)
{
foreach ($this->joins as $key => $value) {
$qb->leftJoin($key, $value);
}
return $this;
} | php | private function setLeftJoins(QueryBuilder $qb)
{
foreach ($this->joins as $key => $value) {
$qb->leftJoin($key, $value);
}
return $this;
} | [
"private",
"function",
"setLeftJoins",
"(",
"QueryBuilder",
"$",
"qb",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"joins",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"$",
"qb",
"->",
"leftJoin",
"(",
"$",
"key",
",",
"$",
"value",
")",
";",
... | Set leftJoins.
@param QueryBuilder $qb
@return $this | [
"Set",
"leftJoins",
"."
] | 8548be4170d191cb1a3e263577aaaab49f04d5ce | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php#L475-L482 |
17,131 | Sedona-Solutions/sedona-sbo | src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php | DatatableQuery.setOrderBy | private function setOrderBy()
{
if (isset($this->requestParams['order']) && count($this->requestParams['order'])) {
$counter = count($this->requestParams['order']);
for ($i = 0; $i < $counter; ++$i) {
$columnIdx = (integer) $this->requestParams['order'][$i]['column']... | php | private function setOrderBy()
{
if (isset($this->requestParams['order']) && count($this->requestParams['order'])) {
$counter = count($this->requestParams['order']);
for ($i = 0; $i < $counter; ++$i) {
$columnIdx = (integer) $this->requestParams['order'][$i]['column']... | [
"private",
"function",
"setOrderBy",
"(",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"requestParams",
"[",
"'order'",
"]",
")",
"&&",
"count",
"(",
"$",
"this",
"->",
"requestParams",
"[",
"'order'",
"]",
")",
")",
"{",
"$",
"counter",
"="... | Ordering.
Construct the ORDER BY clause for server-side processing SQL query.
@return $this | [
"Ordering",
".",
"Construct",
"the",
"ORDER",
"BY",
"clause",
"for",
"server",
"-",
"side",
"processing",
"SQL",
"query",
"."
] | 8548be4170d191cb1a3e263577aaaab49f04d5ce | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php#L623-L642 |
17,132 | Sedona-Solutions/sedona-sbo | src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php | DatatableQuery.setLimit | private function setLimit()
{
if (isset($this->requestParams['start']) && -1 != $this->requestParams['length']) {
$this->qb->setFirstResult($this->requestParams['start'])->setMaxResults($this->requestParams['length']);
}
return $this;
} | php | private function setLimit()
{
if (isset($this->requestParams['start']) && -1 != $this->requestParams['length']) {
$this->qb->setFirstResult($this->requestParams['start'])->setMaxResults($this->requestParams['length']);
}
return $this;
} | [
"private",
"function",
"setLimit",
"(",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"requestParams",
"[",
"'start'",
"]",
")",
"&&",
"-",
"1",
"!=",
"$",
"this",
"->",
"requestParams",
"[",
"'length'",
"]",
")",
"{",
"$",
"this",
"->",
"q... | Paging.
Construct the LIMIT clause for server-side processing SQL query.
@return $this | [
"Paging",
".",
"Construct",
"the",
"LIMIT",
"clause",
"for",
"server",
"-",
"side",
"processing",
"SQL",
"query",
"."
] | 8548be4170d191cb1a3e263577aaaab49f04d5ce | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php#L650-L657 |
17,133 | Sedona-Solutions/sedona-sbo | src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php | DatatableQuery.getCountAllResults | private function getCountAllResults($rootEntityIdentifier)
{
$qb = $this->em->createQueryBuilder();
$qb->select('count(distinct '.$this->tableName.'.'.$rootEntityIdentifier.')');
$qb->from($this->entity, $this->tableName);
$this->setLeftJoins($qb);
$this->setWhereAllCallback... | php | private function getCountAllResults($rootEntityIdentifier)
{
$qb = $this->em->createQueryBuilder();
$qb->select('count(distinct '.$this->tableName.'.'.$rootEntityIdentifier.')');
$qb->from($this->entity, $this->tableName);
$this->setLeftJoins($qb);
$this->setWhereAllCallback... | [
"private",
"function",
"getCountAllResults",
"(",
"$",
"rootEntityIdentifier",
")",
"{",
"$",
"qb",
"=",
"$",
"this",
"->",
"em",
"->",
"createQueryBuilder",
"(",
")",
";",
"$",
"qb",
"->",
"select",
"(",
"'count(distinct '",
".",
"$",
"this",
"->",
"table... | Query results before filtering.
@param int $rootEntityIdentifier
@return int | [
"Query",
"results",
"before",
"filtering",
"."
] | 8548be4170d191cb1a3e263577aaaab49f04d5ce | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php#L670-L680 |
17,134 | Sedona-Solutions/sedona-sbo | src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php | DatatableQuery.execute | private function execute()
{
$query = $this->qb->getQuery();
if (true === $this->configs['translation_query_hints']) {
if (true === $this->doctrineExtensions) {
$query->setHint(
\Doctrine\ORM\Query::HINT_CUSTOM_OUTPUT_WALKER,
'Gedm... | php | private function execute()
{
$query = $this->qb->getQuery();
if (true === $this->configs['translation_query_hints']) {
if (true === $this->doctrineExtensions) {
$query->setHint(
\Doctrine\ORM\Query::HINT_CUSTOM_OUTPUT_WALKER,
'Gedm... | [
"private",
"function",
"execute",
"(",
")",
"{",
"$",
"query",
"=",
"$",
"this",
"->",
"qb",
"->",
"getQuery",
"(",
")",
";",
"if",
"(",
"true",
"===",
"$",
"this",
"->",
"configs",
"[",
"'translation_query_hints'",
"]",
")",
"{",
"if",
"(",
"true",
... | Constructs a Query instance.
@return Query
@throws \Exception | [
"Constructs",
"a",
"Query",
"instance",
"."
] | 8548be4170d191cb1a3e263577aaaab49f04d5ce | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php#L709-L737 |
17,135 | Sedona-Solutions/sedona-sbo | src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php | DatatableQuery.entityFieldToArray | private function entityFieldToArray(array $data, $entity, $path)
{
$parts = explode('.', $path, 2);
if (count($parts) === 1) {
if ($entity instanceof \Traversable) {
$data = [];
foreach ($entity as $item) {
$id = $this->em->getClassMe... | php | private function entityFieldToArray(array $data, $entity, $path)
{
$parts = explode('.', $path, 2);
if (count($parts) === 1) {
if ($entity instanceof \Traversable) {
$data = [];
foreach ($entity as $item) {
$id = $this->em->getClassMe... | [
"private",
"function",
"entityFieldToArray",
"(",
"array",
"$",
"data",
",",
"$",
"entity",
",",
"$",
"path",
")",
"{",
"$",
"parts",
"=",
"explode",
"(",
"'.'",
",",
"$",
"path",
",",
"2",
")",
";",
"if",
"(",
"count",
"(",
"$",
"parts",
")",
"=... | Normalizes an entity path into an array.
Each entity of each level will have its id set.
All values are retrieved using a property accessor with magic call activated.
@param array $data
@param object $entity Entity to normalize
@param string $path Path to set in the array
@return array Normalized data | [
"Normalizes",
"an",
"entity",
"path",
"into",
"an",
"array",
".",
"Each",
"entity",
"of",
"each",
"level",
"will",
"have",
"its",
"id",
"set",
".",
"All",
"values",
"are",
"retrieved",
"using",
"a",
"property",
"accessor",
"with",
"magic",
"call",
"activat... | 8548be4170d191cb1a3e263577aaaab49f04d5ce | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php#L754-L790 |
17,136 | Sedona-Solutions/sedona-sbo | src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php | DatatableQuery.setIdentifierFromAssociation | private function setIdentifierFromAssociation($association, $key = '', $i = 0, $metadata = null)
{
if (null === $metadata) {
$metadata = $this->metadata;
}
if (is_string($association)) {
$targetEntityClass = $metadata->getAssociationTargetClass($association);
... | php | private function setIdentifierFromAssociation($association, $key = '', $i = 0, $metadata = null)
{
if (null === $metadata) {
$metadata = $this->metadata;
}
if (is_string($association)) {
$targetEntityClass = $metadata->getAssociationTargetClass($association);
... | [
"private",
"function",
"setIdentifierFromAssociation",
"(",
"$",
"association",
",",
"$",
"key",
"=",
"''",
",",
"$",
"i",
"=",
"0",
",",
"$",
"metadata",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"metadata",
")",
"{",
"$",
"metadata",
"=... | Set identifier from association.
@param string|array $association
@param string $key
@param int $i
@param ClassMetadata|null $metadata
@return $this
@throws \Exception | [
"Set",
"identifier",
"from",
"association",
"."
] | 8548be4170d191cb1a3e263577aaaab49f04d5ce | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php#L955-L983 |
17,137 | Sedona-Solutions/sedona-sbo | src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php | DatatableQuery.isSelectColumn | private function isSelectColumn($data)
{
if (null !== $data && !in_array($data, $this->virtualColumns)) {
return true;
}
return false;
} | php | private function isSelectColumn($data)
{
if (null !== $data && !in_array($data, $this->virtualColumns)) {
return true;
}
return false;
} | [
"private",
"function",
"isSelectColumn",
"(",
"$",
"data",
")",
"{",
"if",
"(",
"null",
"!==",
"$",
"data",
"&&",
"!",
"in_array",
"(",
"$",
"data",
",",
"$",
"this",
"->",
"virtualColumns",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
"false... | Is select column.
@param string $data
@return bool | [
"Is",
"select",
"column",
"."
] | 8548be4170d191cb1a3e263577aaaab49f04d5ce | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php#L1004-L1011 |
17,138 | Sedona-Solutions/sedona-sbo | src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php | DatatableQuery.isSearchColumn | private function isSearchColumn(AbstractColumn $column)
{
if (false === $this->configs['search_on_non_visible_columns']) {
if (null !== $column->getDql() && true === $column->getSearchable() && true === $column->getVisible()) {
return true;
}
} else {
... | php | private function isSearchColumn(AbstractColumn $column)
{
if (false === $this->configs['search_on_non_visible_columns']) {
if (null !== $column->getDql() && true === $column->getSearchable() && true === $column->getVisible()) {
return true;
}
} else {
... | [
"private",
"function",
"isSearchColumn",
"(",
"AbstractColumn",
"$",
"column",
")",
"{",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"configs",
"[",
"'search_on_non_visible_columns'",
"]",
")",
"{",
"if",
"(",
"null",
"!==",
"$",
"column",
"->",
"getDql",
... | Is search column.
@param AbstractColumn $column
@return bool | [
"Is",
"search",
"column",
"."
] | 8548be4170d191cb1a3e263577aaaab49f04d5ce | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php#L1020-L1033 |
17,139 | Sedona-Solutions/sedona-sbo | src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php | DatatableQuery.renderImage | private function renderImage($imageName, ImageColumn $column)
{
return $this->twig->render(
'SgDatatablesBundle:Helper:ii_render_image.html.twig',
array(
'image_id' => 'sg_image_'.uniqid(rand(10000, 99999)),
'image_name' => $imageName,
... | php | private function renderImage($imageName, ImageColumn $column)
{
return $this->twig->render(
'SgDatatablesBundle:Helper:ii_render_image.html.twig',
array(
'image_id' => 'sg_image_'.uniqid(rand(10000, 99999)),
'image_name' => $imageName,
... | [
"private",
"function",
"renderImage",
"(",
"$",
"imageName",
",",
"ImageColumn",
"$",
"column",
")",
"{",
"return",
"$",
"this",
"->",
"twig",
"->",
"render",
"(",
"'SgDatatablesBundle:Helper:ii_render_image.html.twig'",
",",
"array",
"(",
"'image_id'",
"=>",
"'sg... | Render image.
@param string $imageName
@param ImageColumn $column
@return string | [
"Render",
"image",
"."
] | 8548be4170d191cb1a3e263577aaaab49f04d5ce | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBORuntimeBundle/Datatable/Data/DatatableQuery.php#L1043-L1058 |
17,140 | slashworks/control-bundle | src/Slashworks/BackendBundle/Model/om/BaseRole.php | BaseRole.countUserRoles | public function countUserRoles(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collUserRolesPartial && !$this->isNew();
if (null === $this->collUserRoles || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collUserRoles) {
... | php | public function countUserRoles(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collUserRolesPartial && !$this->isNew();
if (null === $this->collUserRoles || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collUserRoles) {
... | [
"public",
"function",
"countUserRoles",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"$",
"distinct",
"=",
"false",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"partial",
"=",
"$",
"this",
"->",
"collUserRolesPartial",
"&&",
"!",
"$"... | Returns the number of related UserRole objects.
@param Criteria $criteria
@param boolean $distinct
@param PropelPDO $con
@return int Count of related UserRole objects.
@throws PropelException | [
"Returns",
"the",
"number",
"of",
"related",
"UserRole",
"objects",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/BackendBundle/Model/om/BaseRole.php#L1066-L1088 |
17,141 | slashworks/control-bundle | src/Slashworks/BackendBundle/Model/om/BaseRole.php | BaseRole.addUserRole | public function addUserRole(UserRole $l)
{
if ($this->collUserRoles === null) {
$this->initUserRoles();
$this->collUserRolesPartial = true;
}
if (!in_array($l, $this->collUserRoles->getArrayCopy(), true)) { // only add it if the **same** object is not already associa... | php | public function addUserRole(UserRole $l)
{
if ($this->collUserRoles === null) {
$this->initUserRoles();
$this->collUserRolesPartial = true;
}
if (!in_array($l, $this->collUserRoles->getArrayCopy(), true)) { // only add it if the **same** object is not already associa... | [
"public",
"function",
"addUserRole",
"(",
"UserRole",
"$",
"l",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"collUserRoles",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"initUserRoles",
"(",
")",
";",
"$",
"this",
"->",
"collUserRolesPartial",
"=",
"true",
... | Method called to associate a UserRole object to this object
through the UserRole foreign key attribute.
@param UserRole $l UserRole
@return Role The current object (for fluent API support) | [
"Method",
"called",
"to",
"associate",
"a",
"UserRole",
"object",
"to",
"this",
"object",
"through",
"the",
"UserRole",
"foreign",
"key",
"attribute",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/BackendBundle/Model/om/BaseRole.php#L1097-L1113 |
17,142 | slashworks/control-bundle | src/Slashworks/BackendBundle/Model/om/BaseRole.php | BaseRole.getUserRolesJoinUser | public function getUserRolesJoinUser($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = UserRoleQuery::create(null, $criteria);
$query->joinWith('User', $join_behavior);
return $this->getUserRoles($query, $con);
} | php | public function getUserRolesJoinUser($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)
{
$query = UserRoleQuery::create(null, $criteria);
$query->joinWith('User', $join_behavior);
return $this->getUserRoles($query, $con);
} | [
"public",
"function",
"getUserRolesJoinUser",
"(",
"$",
"criteria",
"=",
"null",
",",
"$",
"con",
"=",
"null",
",",
"$",
"join_behavior",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"$",
"query",
"=",
"UserRoleQuery",
"::",
"create",
"(",
"null",
",",
... | If this collection has already been initialized with
an identical criteria, it returns the collection.
Otherwise if this Role is new, it will return
an empty collection; or if this Role has previously
been saved, it will retrieve related UserRoles from storage.
This method is protected by default in order to keep the ... | [
"If",
"this",
"collection",
"has",
"already",
"been",
"initialized",
"with",
"an",
"identical",
"criteria",
"it",
"returns",
"the",
"collection",
".",
"Otherwise",
"if",
"this",
"Role",
"is",
"new",
"it",
"will",
"return",
"an",
"empty",
"collection",
";",
"... | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/BackendBundle/Model/om/BaseRole.php#L1160-L1166 |
17,143 | SAREhub/PHP_Commons | src/SAREhub/Commons/Zmq/RequestReply/RequestSender.php | RequestSender.sendRequest | public function sendRequest($request, $wait = self::WAIT)
{
$this->getSocket()->send($request, ($wait) ? 0 : \ZMQ::MODE_DONTWAIT);
return $this;
} | php | public function sendRequest($request, $wait = self::WAIT)
{
$this->getSocket()->send($request, ($wait) ? 0 : \ZMQ::MODE_DONTWAIT);
return $this;
} | [
"public",
"function",
"sendRequest",
"(",
"$",
"request",
",",
"$",
"wait",
"=",
"self",
"::",
"WAIT",
")",
"{",
"$",
"this",
"->",
"getSocket",
"(",
")",
"->",
"send",
"(",
"$",
"request",
",",
"(",
"$",
"wait",
")",
"?",
"0",
":",
"\\",
"ZMQ",
... | Send request via ZMQ socket.
@param string $request Request payload.
@param bool $wait If true that operation would be block.
@return $this
@throws \ZMQSocketException | [
"Send",
"request",
"via",
"ZMQ",
"socket",
"."
] | 4e1769ab6411a584112df1151dcc90e6b82fe2bb | https://github.com/SAREhub/PHP_Commons/blob/4e1769ab6411a584112df1151dcc90e6b82fe2bb/src/SAREhub/Commons/Zmq/RequestReply/RequestSender.php#L75-L79 |
17,144 | adammbalogh/key-value-store-memory | src/Adapter/MemoryAdapter/ValueTrait.php | ValueTrait.getValue | protected function getValue($key)
{
if (!array_key_exists($key, $this->store)) {
throw new KeyNotFoundException();
}
$getResult = $this->store[$key];
$unserialized = @unserialize($getResult);
if (Util::hasInternalExpireTime($unserialized)) {
$this->h... | php | protected function getValue($key)
{
if (!array_key_exists($key, $this->store)) {
throw new KeyNotFoundException();
}
$getResult = $this->store[$key];
$unserialized = @unserialize($getResult);
if (Util::hasInternalExpireTime($unserialized)) {
$this->h... | [
"protected",
"function",
"getValue",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"key",
",",
"$",
"this",
"->",
"store",
")",
")",
"{",
"throw",
"new",
"KeyNotFoundException",
"(",
")",
";",
"}",
"$",
"getResult",
"=",
"$... | Gets value, watches expiring.
@param string $key
@return mixed
@throws KeyNotFoundException | [
"Gets",
"value",
"watches",
"expiring",
"."
] | 6bafb9037d61911f76343a7aa7270866b1a11995 | https://github.com/adammbalogh/key-value-store-memory/blob/6bafb9037d61911f76343a7aa7270866b1a11995/src/Adapter/MemoryAdapter/ValueTrait.php#L49-L65 |
17,145 | adammbalogh/key-value-store-memory | src/Adapter/MemoryAdapter/ValueTrait.php | ValueTrait.handleTtl | protected function handleTtl($key, $expireSetTs, $expireSec)
{
$ttl = $expireSetTs + $expireSec - time();
if ($ttl <= 0) {
unset($this->store[$key]);
throw new KeyNotFoundException();
}
return $ttl;
} | php | protected function handleTtl($key, $expireSetTs, $expireSec)
{
$ttl = $expireSetTs + $expireSec - time();
if ($ttl <= 0) {
unset($this->store[$key]);
throw new KeyNotFoundException();
}
return $ttl;
} | [
"protected",
"function",
"handleTtl",
"(",
"$",
"key",
",",
"$",
"expireSetTs",
",",
"$",
"expireSec",
")",
"{",
"$",
"ttl",
"=",
"$",
"expireSetTs",
"+",
"$",
"expireSec",
"-",
"time",
"(",
")",
";",
"if",
"(",
"$",
"ttl",
"<=",
"0",
")",
"{",
"... | If ttl is lesser or equals 0 delete key.
@param string $key
@param int $expireSetTs
@param int $expireSec
@return int ttl
@throws KeyNotFoundException | [
"If",
"ttl",
"is",
"lesser",
"or",
"equals",
"0",
"delete",
"key",
"."
] | 6bafb9037d61911f76343a7aa7270866b1a11995 | https://github.com/adammbalogh/key-value-store-memory/blob/6bafb9037d61911f76343a7aa7270866b1a11995/src/Adapter/MemoryAdapter/ValueTrait.php#L78-L88 |
17,146 | nyeholt/silverstripe-external-content | thirdparty/Zend/Http/Client/Adapter/Proxy.php | Zend_Http_Client_Adapter_Proxy.connectHandshake | protected function connectHandshake($host, $port = 443, $http_ver = '1.1', array &$headers = array())
{
$request = "CONNECT $host:$port HTTP/$http_ver\r\n" .
"Host: " . $this->config['proxy_host'] . "\r\n";
// Add the user-agent header
if (isset($this->config['useragent'... | php | protected function connectHandshake($host, $port = 443, $http_ver = '1.1', array &$headers = array())
{
$request = "CONNECT $host:$port HTTP/$http_ver\r\n" .
"Host: " . $this->config['proxy_host'] . "\r\n";
// Add the user-agent header
if (isset($this->config['useragent'... | [
"protected",
"function",
"connectHandshake",
"(",
"$",
"host",
",",
"$",
"port",
"=",
"443",
",",
"$",
"http_ver",
"=",
"'1.1'",
",",
"array",
"&",
"$",
"headers",
"=",
"array",
"(",
")",
")",
"{",
"$",
"request",
"=",
"\"CONNECT $host:$port HTTP/$http_ver... | Preform handshaking with HTTPS proxy using CONNECT method
@param string $host
@param integer $port
@param string $http_ver
@param array $headers | [
"Preform",
"handshaking",
"with",
"HTTPS",
"proxy",
"using",
"CONNECT",
"method"
] | 1c6da8c56ef717225ff904e1522aff94ed051601 | https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/thirdparty/Zend/Http/Client/Adapter/Proxy.php#L187-L249 |
17,147 | factorio-item-browser/export-data | src/Entity/LocalisedString.php | LocalisedString.setTranslation | public function setTranslation(string $locale, string $value)
{
if (strlen($value) === 0) {
unset($this->translations[$locale]);
} else {
$this->translations[$locale] = mb_convert_encoding($value, 'UTF-8', 'UTF-8');
}
return $this;
} | php | public function setTranslation(string $locale, string $value)
{
if (strlen($value) === 0) {
unset($this->translations[$locale]);
} else {
$this->translations[$locale] = mb_convert_encoding($value, 'UTF-8', 'UTF-8');
}
return $this;
} | [
"public",
"function",
"setTranslation",
"(",
"string",
"$",
"locale",
",",
"string",
"$",
"value",
")",
"{",
"if",
"(",
"strlen",
"(",
"$",
"value",
")",
"===",
"0",
")",
"{",
"unset",
"(",
"$",
"this",
"->",
"translations",
"[",
"$",
"locale",
"]",
... | Sets a translation of the localised string.
@param string $locale
@param string $value
@return $this | [
"Sets",
"a",
"translation",
"of",
"the",
"localised",
"string",
"."
] | 1413b2eed0fbfed0521457ac7ef0d668ac30c212 | https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Entity/LocalisedString.php#L30-L38 |
17,148 | webforge-labs/psc-cms | lib/Psc/CMS/ProjectMain.php | ProjectMain.initDoctrinePackage | public function initDoctrinePackage() {
$module = $GLOBALS['env']['container']->getModule('Doctrine');
$this->dc = new DCPackage($module, $module->getEntityManager($this->getConnectionName()));
$this->attachEntityMetaListener(); // ganz wichtig das hier zu machen, weil das sonst das doctrinepackage initiali... | php | public function initDoctrinePackage() {
$module = $GLOBALS['env']['container']->getModule('Doctrine');
$this->dc = new DCPackage($module, $module->getEntityManager($this->getConnectionName()));
$this->attachEntityMetaListener(); // ganz wichtig das hier zu machen, weil das sonst das doctrinepackage initiali... | [
"public",
"function",
"initDoctrinePackage",
"(",
")",
"{",
"$",
"module",
"=",
"$",
"GLOBALS",
"[",
"'env'",
"]",
"[",
"'container'",
"]",
"->",
"getModule",
"(",
"'Doctrine'",
")",
";",
"$",
"this",
"->",
"dc",
"=",
"new",
"DCPackage",
"(",
"$",
"mod... | Erstellt das DCPackage
wird vom getter aufgerufen, damit es immer da ist | [
"Erstellt",
"das",
"DCPackage"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/CMS/ProjectMain.php#L195-L199 |
17,149 | webforge-labs/psc-cms | lib/Psc/CMS/ProjectMain.php | ProjectMain.hydrateEntity | public function hydrateEntity($entityName, $identifier) {
return $this->getDoctrinePackage()->getRepository(
$this->getDoctrinePackage()->getModule()->getEntityName($entityName)
)->hydrate($identifier);
} | php | public function hydrateEntity($entityName, $identifier) {
return $this->getDoctrinePackage()->getRepository(
$this->getDoctrinePackage()->getModule()->getEntityName($entityName)
)->hydrate($identifier);
} | [
"public",
"function",
"hydrateEntity",
"(",
"$",
"entityName",
",",
"$",
"identifier",
")",
"{",
"return",
"$",
"this",
"->",
"getDoctrinePackage",
"(",
")",
"->",
"getRepository",
"(",
"$",
"this",
"->",
"getDoctrinePackage",
"(",
")",
"->",
"getModule",
"(... | Hydriert ein einzelnes Entity
@param string $entityName kann der FQN oder Shortname sein
@return Psc\CMS\Entity | [
"Hydriert",
"ein",
"einzelnes",
"Entity"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/CMS/ProjectMain.php#L262-L266 |
17,150 | php-rise/rise | src/Dispatcher.php | Dispatcher.dispatch | public function dispatch() {
$handler = current($this->handlers);
if (!$handler) {
return;
}
$this->resolveHandler($handler);
return $this;
} | php | public function dispatch() {
$handler = current($this->handlers);
if (!$handler) {
return;
}
$this->resolveHandler($handler);
return $this;
} | [
"public",
"function",
"dispatch",
"(",
")",
"{",
"$",
"handler",
"=",
"current",
"(",
"$",
"this",
"->",
"handlers",
")",
";",
"if",
"(",
"!",
"$",
"handler",
")",
"{",
"return",
";",
"}",
"$",
"this",
"->",
"resolveHandler",
"(",
"$",
"handler",
"... | Dispatch handlers.
@return self | [
"Dispatch",
"handlers",
"."
] | cd14ef9956f1b6875b7bcd642545dcef6a9152b7 | https://github.com/php-rise/rise/blob/cd14ef9956f1b6875b7bcd642545dcef6a9152b7/src/Dispatcher.php#L26-L35 |
17,151 | maniaplanet/maniaplanet-ws-sdk | libraries/Maniaplanet/WebServices/TrustCircles.php | TrustCircles.getKarma | function getKarma($circle, $player)
{
if(!$circle)
{
throw new Exception('Invalid circle');
}
if(!$player)
{
throw new Exception('Invalid player');
}
return $this->execute('GET', '/trust/%s/karma/%s/', array($circle, $player));
} | php | function getKarma($circle, $player)
{
if(!$circle)
{
throw new Exception('Invalid circle');
}
if(!$player)
{
throw new Exception('Invalid player');
}
return $this->execute('GET', '/trust/%s/karma/%s/', array($circle, $player));
} | [
"function",
"getKarma",
"(",
"$",
"circle",
",",
"$",
"player",
")",
"{",
"if",
"(",
"!",
"$",
"circle",
")",
"{",
"throw",
"new",
"Exception",
"(",
"'Invalid circle'",
")",
";",
"}",
"if",
"(",
"!",
"$",
"player",
")",
"{",
"throw",
"new",
"Except... | Get how many times a player has been blacklisted and whitelisted within a circle
@param string $circle
@param string $player
@return object Numbers of blacklistings and whitelistings
@throws Exception | [
"Get",
"how",
"many",
"times",
"a",
"player",
"has",
"been",
"blacklisted",
"and",
"whitelisted",
"within",
"a",
"circle"
] | 027a458388035fe66f2f56ff3ea1f85eff2a5a4e | https://github.com/maniaplanet/maniaplanet-ws-sdk/blob/027a458388035fe66f2f56ff3ea1f85eff2a5a4e/libraries/Maniaplanet/WebServices/TrustCircles.php#L21-L33 |
17,152 | webforge-labs/psc-cms | lib/PHPWord/PHPWord.php | PHPWord.createSection | public function createSection($settings = null) {
$sectionCount = $this->_countSections() + 1;
$section = new PHPWord_Section($sectionCount, $settings);
$this->_sectionCollection[] = $section;
return $section;
} | php | public function createSection($settings = null) {
$sectionCount = $this->_countSections() + 1;
$section = new PHPWord_Section($sectionCount, $settings);
$this->_sectionCollection[] = $section;
return $section;
} | [
"public",
"function",
"createSection",
"(",
"$",
"settings",
"=",
"null",
")",
"{",
"$",
"sectionCount",
"=",
"$",
"this",
"->",
"_countSections",
"(",
")",
"+",
"1",
";",
"$",
"section",
"=",
"new",
"PHPWord_Section",
"(",
"$",
"sectionCount",
",",
"$",... | Create a new Section
@param PHPWord_Section_Settings $settings
@return PHPWord_Section | [
"Create",
"a",
"new",
"Section"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord.php#L100-L106 |
17,153 | webforge-labs/psc-cms | lib/PHPWord/PHPWord.php | PHPWord.addFontStyle | public function addFontStyle($styleName, $styleFont, $styleParagraph = null) {
PHPWord_Style::addFontStyle($styleName, $styleFont, $styleParagraph);
} | php | public function addFontStyle($styleName, $styleFont, $styleParagraph = null) {
PHPWord_Style::addFontStyle($styleName, $styleFont, $styleParagraph);
} | [
"public",
"function",
"addFontStyle",
"(",
"$",
"styleName",
",",
"$",
"styleFont",
",",
"$",
"styleParagraph",
"=",
"null",
")",
"{",
"PHPWord_Style",
"::",
"addFontStyle",
"(",
"$",
"styleName",
",",
"$",
"styleFont",
",",
"$",
"styleParagraph",
")",
";",
... | Adds a font style definition to styles.xml
@param $styleName string
@param $styles array | [
"Adds",
"a",
"font",
"style",
"definition",
"to",
"styles",
".",
"xml"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord.php#L157-L159 |
17,154 | webforge-labs/psc-cms | lib/PHPWord/PHPWord.php | PHPWord.addTableStyle | public function addTableStyle($styleName, $styleTable, $styleFirstRow = null) {
PHPWord_Style::addTableStyle($styleName, $styleTable, $styleFirstRow);
} | php | public function addTableStyle($styleName, $styleTable, $styleFirstRow = null) {
PHPWord_Style::addTableStyle($styleName, $styleTable, $styleFirstRow);
} | [
"public",
"function",
"addTableStyle",
"(",
"$",
"styleName",
",",
"$",
"styleTable",
",",
"$",
"styleFirstRow",
"=",
"null",
")",
"{",
"PHPWord_Style",
"::",
"addTableStyle",
"(",
"$",
"styleName",
",",
"$",
"styleTable",
",",
"$",
"styleFirstRow",
")",
";"... | Adds a table style definition to styles.xml
@param $styleName string
@param $styles array | [
"Adds",
"a",
"table",
"style",
"definition",
"to",
"styles",
".",
"xml"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord.php#L167-L169 |
17,155 | webforge-labs/psc-cms | lib/PHPWord/PHPWord.php | PHPWord.addTitleStyle | public function addTitleStyle($titleCount, $styleFont, $styleParagraph = null) {
PHPWord_Style::addTitleStyle($titleCount, $styleFont, $styleParagraph);
} | php | public function addTitleStyle($titleCount, $styleFont, $styleParagraph = null) {
PHPWord_Style::addTitleStyle($titleCount, $styleFont, $styleParagraph);
} | [
"public",
"function",
"addTitleStyle",
"(",
"$",
"titleCount",
",",
"$",
"styleFont",
",",
"$",
"styleParagraph",
"=",
"null",
")",
"{",
"PHPWord_Style",
"::",
"addTitleStyle",
"(",
"$",
"titleCount",
",",
"$",
"styleFont",
",",
"$",
"styleParagraph",
")",
"... | Adds a heading style definition to styles.xml
@param $titleCount int
@param $styles array | [
"Adds",
"a",
"heading",
"style",
"definition",
"to",
"styles",
".",
"xml"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord.php#L177-L179 |
17,156 | webforge-labs/psc-cms | lib/PHPWord/PHPWord.php | PHPWord.loadTemplate | public function loadTemplate($strFilename) {
if(file_exists($strFilename)) {
$template = new PHPWord_Template($strFilename);
return $template;
} else {
trigger_error('Template file '.$strFilename.' not found.', E_ERROR);
}
} | php | public function loadTemplate($strFilename) {
if(file_exists($strFilename)) {
$template = new PHPWord_Template($strFilename);
return $template;
} else {
trigger_error('Template file '.$strFilename.' not found.', E_ERROR);
}
} | [
"public",
"function",
"loadTemplate",
"(",
"$",
"strFilename",
")",
"{",
"if",
"(",
"file_exists",
"(",
"$",
"strFilename",
")",
")",
"{",
"$",
"template",
"=",
"new",
"PHPWord_Template",
"(",
"$",
"strFilename",
")",
";",
"return",
"$",
"template",
";",
... | Load a Template File
@param string $strFilename
@return PHPWord_Template | [
"Load",
"a",
"Template",
"File"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord.php#L213-L220 |
17,157 | steeffeen/FancyManiaLinks | FML/Script/Features/Menu.php | Menu.addItem | public function addItem(Control $item, Control $control, $isStartElement = false)
{
$menuElement = new MenuElement($item, $control);
$this->addElement($menuElement, $isStartElement);
return $this;
} | php | public function addItem(Control $item, Control $control, $isStartElement = false)
{
$menuElement = new MenuElement($item, $control);
$this->addElement($menuElement, $isStartElement);
return $this;
} | [
"public",
"function",
"addItem",
"(",
"Control",
"$",
"item",
",",
"Control",
"$",
"control",
",",
"$",
"isStartElement",
"=",
"false",
")",
"{",
"$",
"menuElement",
"=",
"new",
"MenuElement",
"(",
"$",
"item",
",",
"$",
"control",
")",
";",
"$",
"this... | Add a Menu item
@api
@param Control $item Item Control in the Menu bar
@param Control $control Toggled Menu Control
@param bool $isStartElement (optional) Whether the Menu should start with this Element
@return static | [
"Add",
"a",
"Menu",
"item"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/Menu.php#L70-L75 |
17,158 | steeffeen/FancyManiaLinks | FML/Script/Features/Menu.php | Menu.addElement | public function addElement(MenuElement $menuElement, $isStartElement = false)
{
if (!in_array($menuElement, $this->elements, true)) {
array_push($this->elements, $menuElement);
if ($isStartElement) {
// new start element
$this->setStartElement($menuEle... | php | public function addElement(MenuElement $menuElement, $isStartElement = false)
{
if (!in_array($menuElement, $this->elements, true)) {
array_push($this->elements, $menuElement);
if ($isStartElement) {
// new start element
$this->setStartElement($menuEle... | [
"public",
"function",
"addElement",
"(",
"MenuElement",
"$",
"menuElement",
",",
"$",
"isStartElement",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"menuElement",
",",
"$",
"this",
"->",
"elements",
",",
"true",
")",
")",
"{",
"array_pu... | Add a Menu Element
@api
@param MenuElement $menuElement Menu Element
@param bool $isStartElement (optional) Whether the Menu should start with this Element
@return static | [
"Add",
"a",
"Menu",
"Element"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/Menu.php#L85-L99 |
17,159 | steeffeen/FancyManiaLinks | FML/Script/Features/Menu.php | Menu.setStartElement | public function setStartElement(MenuElement $startElement = null)
{
$this->startElement = $startElement;
if ($startElement && !in_array($startElement, $this->elements, true)) {
array_push($this->elements, $startElement);
}
return $this;
} | php | public function setStartElement(MenuElement $startElement = null)
{
$this->startElement = $startElement;
if ($startElement && !in_array($startElement, $this->elements, true)) {
array_push($this->elements, $startElement);
}
return $this;
} | [
"public",
"function",
"setStartElement",
"(",
"MenuElement",
"$",
"startElement",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"startElement",
"=",
"$",
"startElement",
";",
"if",
"(",
"$",
"startElement",
"&&",
"!",
"in_array",
"(",
"$",
"startElement",
",",
... | Set the Element to start with
@api
@param MenuElement $startElement Start Element
@return static | [
"Set",
"the",
"Element",
"to",
"start",
"with"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/Menu.php#L119-L126 |
17,160 | steeffeen/FancyManiaLinks | FML/Script/Features/Menu.php | Menu.getElementsArrayText | protected function getElementsArrayText()
{
$elements = array();
foreach ($this->elements as $element) {
$elementId = $element->getItem()
->getId();
$elements[$elementId] = $element->getControl()
... | php | protected function getElementsArrayText()
{
$elements = array();
foreach ($this->elements as $element) {
$elementId = $element->getItem()
->getId();
$elements[$elementId] = $element->getControl()
... | [
"protected",
"function",
"getElementsArrayText",
"(",
")",
"{",
"$",
"elements",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"elements",
"as",
"$",
"element",
")",
"{",
"$",
"elementId",
"=",
"$",
"element",
"->",
"getItem",
"(",
")... | Build the array text for the Elements
@return string | [
"Build",
"the",
"array",
"text",
"for",
"the",
"Elements"
] | 227b0759306f0a3c75873ba50276e4163a93bfa6 | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/Menu.php#L172-L182 |
17,161 | benmanu/silverstripe-knowledgebase | code/extensions/FAQRelatedArticlesExtension.php | FAQRelatedArticlesExtension.getTagNameList | public function getTagNameList()
{
$tags = $this->owner->Tags();
$names = [];
foreach ($tags as $tag) {
$names[] = $tag->Name;
}
return implode(', ', $names);
} | php | public function getTagNameList()
{
$tags = $this->owner->Tags();
$names = [];
foreach ($tags as $tag) {
$names[] = $tag->Name;
}
return implode(', ', $names);
} | [
"public",
"function",
"getTagNameList",
"(",
")",
"{",
"$",
"tags",
"=",
"$",
"this",
"->",
"owner",
"->",
"Tags",
"(",
")",
";",
"$",
"names",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"tags",
"as",
"$",
"tag",
")",
"{",
"$",
"names",
"[",
"]",... | Helper to get a comma separated list of all the associated tags.
@return string | [
"Helper",
"to",
"get",
"a",
"comma",
"separated",
"list",
"of",
"all",
"the",
"associated",
"tags",
"."
] | db19bfd4836f43da17ab52e8b53e72a11be64210 | https://github.com/benmanu/silverstripe-knowledgebase/blob/db19bfd4836f43da17ab52e8b53e72a11be64210/code/extensions/FAQRelatedArticlesExtension.php#L45-L55 |
17,162 | benmanu/silverstripe-knowledgebase | code/extensions/FAQRelatedArticlesExtension.php | FAQRelatedArticlesExtension.getRelatedFAQs | public function getRelatedFAQs($limit = null)
{
$tags = $this->owner->Tags();
if ($tags->count() == 0) {
return null;
}
// find any FAQ that has one of the same tags
$faqs = FAQ::get()
->innerJoin('FAQ_Tags', '"FAQ"."ID" = "FAQ_Tags"."FAQID"')
... | php | public function getRelatedFAQs($limit = null)
{
$tags = $this->owner->Tags();
if ($tags->count() == 0) {
return null;
}
// find any FAQ that has one of the same tags
$faqs = FAQ::get()
->innerJoin('FAQ_Tags', '"FAQ"."ID" = "FAQ_Tags"."FAQID"')
... | [
"public",
"function",
"getRelatedFAQs",
"(",
"$",
"limit",
"=",
"null",
")",
"{",
"$",
"tags",
"=",
"$",
"this",
"->",
"owner",
"->",
"Tags",
"(",
")",
";",
"if",
"(",
"$",
"tags",
"->",
"count",
"(",
")",
"==",
"0",
")",
"{",
"return",
"null",
... | Helper to get all the FAQ articles that are tagged with the same
tags.
@return DataList|null | [
"Helper",
"to",
"get",
"all",
"the",
"FAQ",
"articles",
"that",
"are",
"tagged",
"with",
"the",
"same",
"tags",
"."
] | db19bfd4836f43da17ab52e8b53e72a11be64210 | https://github.com/benmanu/silverstripe-knowledgebase/blob/db19bfd4836f43da17ab52e8b53e72a11be64210/code/extensions/FAQRelatedArticlesExtension.php#L63-L83 |
17,163 | 2amigos/yiifoundation | widgets/Dropdown.php | Dropdown.renderItems | protected function renderItems()
{
$lines = array();
if ($this->type === Enum::DROPDOWN_CONTENT) {
$lines[] = $this->dropdownContent;
}
if ($this->type === Enum::DROPDOWN_LIST) {
foreach ($this->items as $item) {
if (is_string($item)) {
... | php | protected function renderItems()
{
$lines = array();
if ($this->type === Enum::DROPDOWN_CONTENT) {
$lines[] = $this->dropdownContent;
}
if ($this->type === Enum::DROPDOWN_LIST) {
foreach ($this->items as $item) {
if (is_string($item)) {
... | [
"protected",
"function",
"renderItems",
"(",
")",
"{",
"$",
"lines",
"=",
"array",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"type",
"===",
"Enum",
"::",
"DROPDOWN_CONTENT",
")",
"{",
"$",
"lines",
"[",
"]",
"=",
"$",
"this",
"->",
"dropdownConten... | Renders dropdown items
@return string
@throws InvalidConfigException | [
"Renders",
"dropdown",
"items"
] | 49bed0d3ca1a9bac9299000e48a2661bdc8f9a29 | https://github.com/2amigos/yiifoundation/blob/49bed0d3ca1a9bac9299000e48a2661bdc8f9a29/widgets/Dropdown.php#L82-L109 |
17,164 | ClanCats/Core | src/bundles/Session/CCSession.php | CCSession.valid_fingerprint | public static function valid_fingerprint( $fingerprint = null, $name = null )
{
return Manager::create( $name )->valid_fingerprint( $fingerprint );
} | php | public static function valid_fingerprint( $fingerprint = null, $name = null )
{
return Manager::create( $name )->valid_fingerprint( $fingerprint );
} | [
"public",
"static",
"function",
"valid_fingerprint",
"(",
"$",
"fingerprint",
"=",
"null",
",",
"$",
"name",
"=",
"null",
")",
"{",
"return",
"Manager",
"::",
"create",
"(",
"$",
"name",
")",
"->",
"valid_fingerprint",
"(",
"$",
"fingerprint",
")",
";",
... | Check if the given fingerprint or the default fingerprint
parameter matches the curent session fingerprint.
@param string $manager
@return string | [
"Check",
"if",
"the",
"given",
"fingerprint",
"or",
"the",
"default",
"fingerprint",
"parameter",
"matches",
"the",
"curent",
"session",
"fingerprint",
"."
] | 9f6ec72c1a439de4b253d0223f1029f7f85b6ef8 | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/Session/CCSession.php#L43-L46 |
17,165 | ClanCats/Core | src/bundles/Session/CCSession.php | CCSession.set | public static function set( $key, $value, $manager = null )
{
return Manager::create( $manager )->set( $key, $value );
} | php | public static function set( $key, $value, $manager = null )
{
return Manager::create( $manager )->set( $key, $value );
} | [
"public",
"static",
"function",
"set",
"(",
"$",
"key",
",",
"$",
"value",
",",
"$",
"manager",
"=",
"null",
")",
"{",
"return",
"Manager",
"::",
"create",
"(",
"$",
"manager",
")",
"->",
"set",
"(",
"$",
"key",
",",
"$",
"value",
")",
";",
"}"
] | Set a value on the session
@param string $key
@param string $value
@param string $manager
@return Session\Manager | [
"Set",
"a",
"value",
"on",
"the",
"session"
] | 9f6ec72c1a439de4b253d0223f1029f7f85b6ef8 | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/Session/CCSession.php#L82-L85 |
17,166 | ClanCats/Core | src/bundles/Session/CCSession.php | CCSession.add | public static function add( $key, $value, $manager = null )
{
return Manager::create( $manager )->add( $key, $value );
} | php | public static function add( $key, $value, $manager = null )
{
return Manager::create( $manager )->add( $key, $value );
} | [
"public",
"static",
"function",
"add",
"(",
"$",
"key",
",",
"$",
"value",
",",
"$",
"manager",
"=",
"null",
")",
"{",
"return",
"Manager",
"::",
"create",
"(",
"$",
"manager",
")",
"->",
"add",
"(",
"$",
"key",
",",
"$",
"value",
")",
";",
"}"
] | Similar to add but forces the element to be an array
and appends an item.
@param string $key
@param string $value
@param string $manager
@return Session\Manager | [
"Similar",
"to",
"add",
"but",
"forces",
"the",
"element",
"to",
"be",
"an",
"array",
"and",
"appends",
"an",
"item",
"."
] | 9f6ec72c1a439de4b253d0223f1029f7f85b6ef8 | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/Session/CCSession.php#L96-L99 |
17,167 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php | BaseUserCustomerRelationPeer.doDeleteAll | public static function doDeleteAll(PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
/... | php | public static function doDeleteAll(PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
/... | [
"public",
"static",
"function",
"doDeleteAll",
"(",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"con",
"===",
"null",
")",
"{",
"$",
"con",
"=",
"Propel",
"::",
"getConnection",
"(",
"UserCustomerRelationPeer",
"::",
"DATABASE_NAME",
",... | Deletes all rows from the user_customer_relation table.
@param PropelPDO $con the connection to use
@return int The number of affected rows (if supported by underlying database driver).
@throws PropelException | [
"Deletes",
"all",
"rows",
"from",
"the",
"user_customer_relation",
"table",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php#L1225-L1248 |
17,168 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php | BaseUserCustomerRelationPeer.doDelete | public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
// invalidate the cache for all objects of th... | php | public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
// invalidate the cache for all objects of th... | [
"public",
"static",
"function",
"doDelete",
"(",
"$",
"values",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"con",
"===",
"null",
")",
"{",
"$",
"con",
"=",
"Propel",
"::",
"getConnection",
"(",
"UserCustomerRelationPeer",
"::",
... | Performs a DELETE on the database, given a UserCustomerRelation or Criteria object OR a primary key value.
@param mixed $values Criteria or UserCustomerRelation object or primary key or array of primary keys
which is used to create the DELETE statement
@param PropelPDO $con the connection to use
@return int ... | [
"Performs",
"a",
"DELETE",
"on",
"the",
"database",
"given",
"a",
"UserCustomerRelation",
"or",
"Criteria",
"object",
"OR",
"a",
"primary",
"key",
"value",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php#L1261-L1307 |
17,169 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php | BaseUserCustomerRelationPeer.retrieveByPK | public static function retrieveByPK($pk, PropelPDO $con = null)
{
if (null !== ($obj = UserCustomerRelationPeer::getInstanceFromPool((string) $pk))) {
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::C... | php | public static function retrieveByPK($pk, PropelPDO $con = null)
{
if (null !== ($obj = UserCustomerRelationPeer::getInstanceFromPool((string) $pk))) {
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::C... | [
"public",
"static",
"function",
"retrieveByPK",
"(",
"$",
"pk",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"!==",
"(",
"$",
"obj",
"=",
"UserCustomerRelationPeer",
"::",
"getInstanceFromPool",
"(",
"(",
"string",
")",
"$",
"p... | Retrieve a single object by pkey.
@param int $pk the primary key.
@param PropelPDO $con the connection to use
@return UserCustomerRelation | [
"Retrieve",
"a",
"single",
"object",
"by",
"pkey",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php#L1353-L1370 |
17,170 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php | BaseUserCustomerRelationPeer.retrieveByPKs | public static function retrieveByPKs($pks, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
... | php | public static function retrieveByPKs($pks, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
... | [
"public",
"static",
"function",
"retrieveByPKs",
"(",
"$",
"pks",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"con",
"===",
"null",
")",
"{",
"$",
"con",
"=",
"Propel",
"::",
"getConnection",
"(",
"UserCustomerRelationPeer",
"::"... | Retrieve multiple objects by pkey.
@param array $pks List of primary keys
@param PropelPDO $con the connection to use
@return UserCustomerRelation[]
@throws PropelException Any exceptions caught during processing will be
rethrown wrapped into a PropelException. | [
"Retrieve",
"multiple",
"objects",
"by",
"pkey",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php#L1381-L1397 |
17,171 | webforge-labs/psc-cms | lib/PHPWord/PHPWord/Section/Settings.php | PHPWord_Section_Settings.setSettingValue | public function setSettingValue($key, $value) {
if($key == '_orientation' && $value == 'landscape') {
$this->setLandscape();
} elseif($key == '_orientation' && is_null($value)) {
$this->setPortrait();
} elseif($key == '_borderSize') {
$this->setBorderSize($value);
} elseif($key == '_borderColor') {
... | php | public function setSettingValue($key, $value) {
if($key == '_orientation' && $value == 'landscape') {
$this->setLandscape();
} elseif($key == '_orientation' && is_null($value)) {
$this->setPortrait();
} elseif($key == '_borderSize') {
$this->setBorderSize($value);
} elseif($key == '_borderColor') {
... | [
"public",
"function",
"setSettingValue",
"(",
"$",
"key",
",",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"key",
"==",
"'_orientation'",
"&&",
"$",
"value",
"==",
"'landscape'",
")",
"{",
"$",
"this",
"->",
"setLandscape",
"(",
")",
";",
"}",
"elseif",
... | Set Setting Value
@param string $key
@param string $value | [
"Set",
"Setting",
"Value"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Section/Settings.php#L184-L196 |
17,172 | webforge-labs/psc-cms | lib/PHPWord/PHPWord/Section/Settings.php | PHPWord_Section_Settings.setLandscape | public function setLandscape() {
$this->_orientation = 'landscape';
$this->_pageSizeW = $this->_defaultPageSizeH;
$this->_pageSizeH = $this->_defaultPageSizeW;
} | php | public function setLandscape() {
$this->_orientation = 'landscape';
$this->_pageSizeW = $this->_defaultPageSizeH;
$this->_pageSizeH = $this->_defaultPageSizeW;
} | [
"public",
"function",
"setLandscape",
"(",
")",
"{",
"$",
"this",
"->",
"_orientation",
"=",
"'landscape'",
";",
"$",
"this",
"->",
"_pageSizeW",
"=",
"$",
"this",
"->",
"_defaultPageSizeH",
";",
"$",
"this",
"->",
"_pageSizeH",
"=",
"$",
"this",
"->",
"... | Set Landscape Orientation | [
"Set",
"Landscape",
"Orientation"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Section/Settings.php#L277-L281 |
17,173 | webforge-labs/psc-cms | lib/PHPWord/PHPWord/Section/Settings.php | PHPWord_Section_Settings.setPortrait | public function setPortrait() {
$this->_orientation = null;
$this->_pageSizeW = $this->_defaultPageSizeW;
$this->_pageSizeH = $this->_defaultPageSizeH;
} | php | public function setPortrait() {
$this->_orientation = null;
$this->_pageSizeW = $this->_defaultPageSizeW;
$this->_pageSizeH = $this->_defaultPageSizeH;
} | [
"public",
"function",
"setPortrait",
"(",
")",
"{",
"$",
"this",
"->",
"_orientation",
"=",
"null",
";",
"$",
"this",
"->",
"_pageSizeW",
"=",
"$",
"this",
"->",
"_defaultPageSizeW",
";",
"$",
"this",
"->",
"_pageSizeH",
"=",
"$",
"this",
"->",
"_default... | Set Portrait Orientation | [
"Set",
"Portrait",
"Orientation"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Section/Settings.php#L286-L290 |
17,174 | webforge-labs/psc-cms | lib/PHPWord/PHPWord/Section/Settings.php | PHPWord_Section_Settings.getBorderSize | public function getBorderSize() {
$t = $this->getBorderTopSize();
$l = $this->getBorderLeftSize();
$r = $this->getBorderRightSize();
$b = $this->getBorderBottomSize();
return array($t, $l, $r, $b);
} | php | public function getBorderSize() {
$t = $this->getBorderTopSize();
$l = $this->getBorderLeftSize();
$r = $this->getBorderRightSize();
$b = $this->getBorderBottomSize();
return array($t, $l, $r, $b);
} | [
"public",
"function",
"getBorderSize",
"(",
")",
"{",
"$",
"t",
"=",
"$",
"this",
"->",
"getBorderTopSize",
"(",
")",
";",
"$",
"l",
"=",
"$",
"this",
"->",
"getBorderLeftSize",
"(",
")",
";",
"$",
"r",
"=",
"$",
"this",
"->",
"getBorderRightSize",
"... | Get Border Size
@return array | [
"Get",
"Border",
"Size"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Section/Settings.php#L336-L343 |
17,175 | webforge-labs/psc-cms | lib/PHPWord/PHPWord/Section/Settings.php | PHPWord_Section_Settings.setBorderColor | public function setBorderColor($pValue = null) {
$this->_borderTopColor = $pValue;
$this->_borderLeftColor = $pValue;
$this->_borderRightColor = $pValue;
$this->_borderBottomColor = $pValue;
} | php | public function setBorderColor($pValue = null) {
$this->_borderTopColor = $pValue;
$this->_borderLeftColor = $pValue;
$this->_borderRightColor = $pValue;
$this->_borderBottomColor = $pValue;
} | [
"public",
"function",
"setBorderColor",
"(",
"$",
"pValue",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"_borderTopColor",
"=",
"$",
"pValue",
";",
"$",
"this",
"->",
"_borderLeftColor",
"=",
"$",
"pValue",
";",
"$",
"this",
"->",
"_borderRightColor",
"=",
... | Set Border Color
@param string $pValue | [
"Set",
"Border",
"Color"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Section/Settings.php#L350-L355 |
17,176 | webforge-labs/psc-cms | lib/PHPWord/PHPWord/Section/Settings.php | PHPWord_Section_Settings.getBorderColor | public function getBorderColor() {
$t = $this->getBorderTopColor();
$l = $this->getBorderLeftColor();
$r = $this->getBorderRightColor();
$b = $this->getBorderBottomColor();
return array($t, $l, $r, $b);
} | php | public function getBorderColor() {
$t = $this->getBorderTopColor();
$l = $this->getBorderLeftColor();
$r = $this->getBorderRightColor();
$b = $this->getBorderBottomColor();
return array($t, $l, $r, $b);
} | [
"public",
"function",
"getBorderColor",
"(",
")",
"{",
"$",
"t",
"=",
"$",
"this",
"->",
"getBorderTopColor",
"(",
")",
";",
"$",
"l",
"=",
"$",
"this",
"->",
"getBorderLeftColor",
"(",
")",
";",
"$",
"r",
"=",
"$",
"this",
"->",
"getBorderRightColor",... | Get Border Color
@return array | [
"Get",
"Border",
"Color"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Section/Settings.php#L362-L369 |
17,177 | miisieq/InfaktClient | src/Infakt/Infakt.php | Infakt.getRepository | public function getRepository(string $className): AbstractObjectRepository
{
$className = 'Infakt\\Repository\\'.substr($className, strrpos($className, '\\') + 1).'Repository';
if (!class_exists($className)) {
throw new LogicException("There is no repository to work with class $classNam... | php | public function getRepository(string $className): AbstractObjectRepository
{
$className = 'Infakt\\Repository\\'.substr($className, strrpos($className, '\\') + 1).'Repository';
if (!class_exists($className)) {
throw new LogicException("There is no repository to work with class $classNam... | [
"public",
"function",
"getRepository",
"(",
"string",
"$",
"className",
")",
":",
"AbstractObjectRepository",
"{",
"$",
"className",
"=",
"'Infakt\\\\Repository\\\\'",
".",
"substr",
"(",
"$",
"className",
",",
"strrpos",
"(",
"$",
"className",
",",
"'\\\\'",
")... | Return object repository for a specific model class name.
@param $className
@throws LogicException
@return AbstractObjectRepository | [
"Return",
"object",
"repository",
"for",
"a",
"specific",
"model",
"class",
"name",
"."
] | 5f0ae58c7be32580f3c92c2a7e7a7808d83d4e81 | https://github.com/miisieq/InfaktClient/blob/5f0ae58c7be32580f3c92c2a7e7a7808d83d4e81/src/Infakt/Infakt.php#L53-L62 |
17,178 | miisieq/InfaktClient | src/Infakt/Infakt.php | Infakt.get | public function get(string $query): ResponseInterface
{
return $this->client->request('get', $this->buildQuery($query), ['headers' => $this->getAuthorizationHeader()]);
} | php | public function get(string $query): ResponseInterface
{
return $this->client->request('get', $this->buildQuery($query), ['headers' => $this->getAuthorizationHeader()]);
} | [
"public",
"function",
"get",
"(",
"string",
"$",
"query",
")",
":",
"ResponseInterface",
"{",
"return",
"$",
"this",
"->",
"client",
"->",
"request",
"(",
"'get'",
",",
"$",
"this",
"->",
"buildQuery",
"(",
"$",
"query",
")",
",",
"[",
"'headers'",
"=>... | Send HTTP GET request.
@param string $query
@return \Psr\Http\Message\ResponseInterface | [
"Send",
"HTTP",
"GET",
"request",
"."
] | 5f0ae58c7be32580f3c92c2a7e7a7808d83d4e81 | https://github.com/miisieq/InfaktClient/blob/5f0ae58c7be32580f3c92c2a7e7a7808d83d4e81/src/Infakt/Infakt.php#L71-L74 |
17,179 | ARCANEDEV/Sanitizer | src/SanitizerServiceProvider.php | SanitizerServiceProvider.registerSanitizer | private function registerSanitizer()
{
$this->singleton(Contracts\Sanitizer::class, function ($app) {
/** @var \Illuminate\Contracts\Config\Repository $config */
$config = $app['config'];
return new Factory($config->get('sanitizer.filters'));
});
$this... | php | private function registerSanitizer()
{
$this->singleton(Contracts\Sanitizer::class, function ($app) {
/** @var \Illuminate\Contracts\Config\Repository $config */
$config = $app['config'];
return new Factory($config->get('sanitizer.filters'));
});
$this... | [
"private",
"function",
"registerSanitizer",
"(",
")",
"{",
"$",
"this",
"->",
"singleton",
"(",
"Contracts",
"\\",
"Sanitizer",
"::",
"class",
",",
"function",
"(",
"$",
"app",
")",
"{",
"/** @var \\Illuminate\\Contracts\\Config\\Repository $config */",
"$",
"conf... | Register Helpers. | [
"Register",
"Helpers",
"."
] | e21990ce6d881366d52a7f4e5040b07cc3ecca96 | https://github.com/ARCANEDEV/Sanitizer/blob/e21990ce6d881366d52a7f4e5040b07cc3ecca96/src/SanitizerServiceProvider.php#L81-L91 |
17,180 | digitalkaoz/versioneye-php | src/Output/Github.php | Github.hook | public function hook(OutputInterface $output, array $response)
{
$this->printBoolean($output, 'OK', $response['success'], true === $response['success']);
} | php | public function hook(OutputInterface $output, array $response)
{
$this->printBoolean($output, 'OK', $response['success'], true === $response['success']);
} | [
"public",
"function",
"hook",
"(",
"OutputInterface",
"$",
"output",
",",
"array",
"$",
"response",
")",
"{",
"$",
"this",
"->",
"printBoolean",
"(",
"$",
"output",
",",
"'OK'",
",",
"$",
"response",
"[",
"'success'",
"]",
",",
"true",
"===",
"$",
"res... | output for hook api.
@param OutputInterface $output
@param array $response | [
"output",
"for",
"hook",
"api",
"."
] | 7b8eb9cdc83e01138dda0e709c07e3beb6aad136 | https://github.com/digitalkaoz/versioneye-php/blob/7b8eb9cdc83e01138dda0e709c07e3beb6aad136/src/Output/Github.php#L31-L34 |
17,181 | digitalkaoz/versioneye-php | src/Output/Github.php | Github.delete | public function delete(OutputInterface $output, array $response)
{
$this->printBoolean($output, 'OK', $response['success'], true === $response['success']);
} | php | public function delete(OutputInterface $output, array $response)
{
$this->printBoolean($output, 'OK', $response['success'], true === $response['success']);
} | [
"public",
"function",
"delete",
"(",
"OutputInterface",
"$",
"output",
",",
"array",
"$",
"response",
")",
"{",
"$",
"this",
"->",
"printBoolean",
"(",
"$",
"output",
",",
"'OK'",
",",
"$",
"response",
"[",
"'success'",
"]",
",",
"true",
"===",
"$",
"r... | output for delete api.
@param OutputInterface $output
@param array $response | [
"output",
"for",
"delete",
"api",
"."
] | 7b8eb9cdc83e01138dda0e709c07e3beb6aad136 | https://github.com/digitalkaoz/versioneye-php/blob/7b8eb9cdc83e01138dda0e709c07e3beb6aad136/src/Output/Github.php#L42-L45 |
17,182 | GrahamDeprecated/CMS-Core | src/Seeds/UsersGroupsTableSeeder.php | UsersGroupsTableSeeder.matchUser | protected function matchUser($email, $group)
{
return Credentials::getUserProvider()->findByLogin($email)->addGroup(Credentials::getGroupProvider()->findByName($group));
} | php | protected function matchUser($email, $group)
{
return Credentials::getUserProvider()->findByLogin($email)->addGroup(Credentials::getGroupProvider()->findByName($group));
} | [
"protected",
"function",
"matchUser",
"(",
"$",
"email",
",",
"$",
"group",
")",
"{",
"return",
"Credentials",
"::",
"getUserProvider",
"(",
")",
"->",
"findByLogin",
"(",
"$",
"email",
")",
"->",
"addGroup",
"(",
"Credentials",
"::",
"getGroupProvider",
"("... | Add the user by email to a group.
@param string $email
@param string $group
@return void | [
"Add",
"the",
"user",
"by",
"email",
"to",
"a",
"group",
"."
] | 5603e2bfa2fac6cf46ca3ed62d21518f2f653675 | https://github.com/GrahamDeprecated/CMS-Core/blob/5603e2bfa2fac6cf46ca3ed62d21518f2f653675/src/Seeds/UsersGroupsTableSeeder.php#L60-L63 |
17,183 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.prefixFromType | public static function prefixFromType($strType)
{
switch ($strType) {
case Type::ARRAY_TYPE:
return "obj";
case Type::BOOLEAN:
return "bln";
case Type::DATE_TIME:
return "dtt";
case Type::FLOAT:
r... | php | public static function prefixFromType($strType)
{
switch ($strType) {
case Type::ARRAY_TYPE:
return "obj";
case Type::BOOLEAN:
return "bln";
case Type::DATE_TIME:
return "dtt";
case Type::FLOAT:
r... | [
"public",
"static",
"function",
"prefixFromType",
"(",
"$",
"strType",
")",
"{",
"switch",
"(",
"$",
"strType",
")",
"{",
"case",
"Type",
"::",
"ARRAY_TYPE",
":",
"return",
"\"obj\"",
";",
"case",
"Type",
"::",
"BOOLEAN",
":",
"return",
"\"bln\"",
";",
"... | Returns prefix for variable according to variable type
@param string $strType The type of variable for which the prefix is needed
@return string The variable prefix
@was QString::PrefixFromType | [
"Returns",
"prefix",
"for",
"variable",
"according",
"to",
"variable",
"type"
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L177-L197 |
17,184 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.getInstalledTemplatePaths | public function getInstalledTemplatePaths()
{
$dir = QCUBED_CONFIG_DIR . '/templates';
$paths = [];
if ($dir !== false) { // does the active directory exist?
foreach (scandir($dir) as $strFileName) {
if (substr($strFileName, -8) == '.inc.php') {
... | php | public function getInstalledTemplatePaths()
{
$dir = QCUBED_CONFIG_DIR . '/templates';
$paths = [];
if ($dir !== false) { // does the active directory exist?
foreach (scandir($dir) as $strFileName) {
if (substr($strFileName, -8) == '.inc.php') {
... | [
"public",
"function",
"getInstalledTemplatePaths",
"(",
")",
"{",
"$",
"dir",
"=",
"QCUBED_CONFIG_DIR",
".",
"'/templates'",
";",
"$",
"paths",
"=",
"[",
"]",
";",
"if",
"(",
"$",
"dir",
"!==",
"false",
")",
"{",
"// does the active directory exist?",
"foreach... | Return an array of paths to template files. This base class versions searches a config directory for pointers
to template files to use. This allows qcubed repos to inject templates into the codegen process.
This process is similar to how the control registry works. | [
"Return",
"an",
"array",
"of",
"paths",
"to",
"template",
"files",
".",
"This",
"base",
"class",
"versions",
"searches",
"a",
"config",
"directory",
"for",
"pointers",
"to",
"template",
"files",
"to",
"use",
".",
"This",
"allows",
"qcubed",
"repos",
"to",
... | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L205-L223 |
17,185 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.getSettingsXml | public static function getSettingsXml()
{
$strCrLf = "\r\n";
$strToReturn = sprintf('<codegen>%s', $strCrLf);
$strToReturn .= sprintf(' <name application="%s"/>%s', Codegen::$ApplicationName, $strCrLf);
$strToReturn .= sprintf(' <render preferredRenderMethod="%s"/>%s', Codegen::$Pre... | php | public static function getSettingsXml()
{
$strCrLf = "\r\n";
$strToReturn = sprintf('<codegen>%s', $strCrLf);
$strToReturn .= sprintf(' <name application="%s"/>%s', Codegen::$ApplicationName, $strCrLf);
$strToReturn .= sprintf(' <render preferredRenderMethod="%s"/>%s', Codegen::$Pre... | [
"public",
"static",
"function",
"getSettingsXml",
"(",
")",
"{",
"$",
"strCrLf",
"=",
"\"\\r\\n\"",
";",
"$",
"strToReturn",
"=",
"sprintf",
"(",
"'<codegen>%s'",
",",
"$",
"strCrLf",
")",
";",
"$",
"strToReturn",
".=",
"sprintf",
"(",
"'\t<name application=\"... | Gets the settings in codegen_settings.xml file and returns its text without comments
@return string | [
"Gets",
"the",
"settings",
"in",
"codegen_settings",
".",
"xml",
"file",
"and",
"returns",
"its",
"text",
"without",
"comments"
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L230-L246 |
17,186 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.run | public static function run($strSettingsXmlFilePath)
{
if (!defined('QCUBED_CODE_GENERATING')) {
define('QCUBED_CODE_GENERATING', true);
}
Codegen::$CodeGenArray = array();
Codegen::$SettingsFilePath = $strSettingsXmlFilePath;
if (!file_exists($strSettingsXmlFile... | php | public static function run($strSettingsXmlFilePath)
{
if (!defined('QCUBED_CODE_GENERATING')) {
define('QCUBED_CODE_GENERATING', true);
}
Codegen::$CodeGenArray = array();
Codegen::$SettingsFilePath = $strSettingsXmlFilePath;
if (!file_exists($strSettingsXmlFile... | [
"public",
"static",
"function",
"run",
"(",
"$",
"strSettingsXmlFilePath",
")",
"{",
"if",
"(",
"!",
"defined",
"(",
"'QCUBED_CODE_GENERATING'",
")",
")",
"{",
"define",
"(",
"'QCUBED_CODE_GENERATING'",
",",
"true",
")",
";",
"}",
"Codegen",
"::",
"$",
"Code... | The function which actually performs the steps for code generation
Code generation begins here.
@param string $strSettingsXmlFilePath Path to the settings file | [
"The",
"function",
"which",
"actually",
"performs",
"the",
"steps",
"for",
"code",
"generation",
"Code",
"generation",
"begins",
"here",
"."
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L253-L315 |
17,187 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.getTemplateSettings | protected function getTemplateSettings($strTemplateFilePath, &$strTemplate = null)
{
if ($strTemplate === null) {
$strTemplate = file_get_contents($strTemplateFilePath);
}
$strError = 'Template\'s first line must be <template OverwriteFlag="boolean" TargetDirectory="string" Direc... | php | protected function getTemplateSettings($strTemplateFilePath, &$strTemplate = null)
{
if ($strTemplate === null) {
$strTemplate = file_get_contents($strTemplateFilePath);
}
$strError = 'Template\'s first line must be <template OverwriteFlag="boolean" TargetDirectory="string" Direc... | [
"protected",
"function",
"getTemplateSettings",
"(",
"$",
"strTemplateFilePath",
",",
"&",
"$",
"strTemplate",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"strTemplate",
"===",
"null",
")",
"{",
"$",
"strTemplate",
"=",
"file_get_contents",
"(",
"$",
"strTemplateFi... | Returns the settings of the template file as SimpleXMLElement object
@param null|string $strTemplateFilePath Path to the file
@param null|string $strTemplate Text of the template (if $strTemplateFilePath is null, this field must be string)
@deprecated
@return \SimpleXMLElement
@throws \Exception | [
"Returns",
"the",
"settings",
"of",
"the",
"template",
"file",
"as",
"SimpleXMLElement",
"object"
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L479-L505 |
17,188 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.generateFile | public function generateFile($strModuleSubPath, $strTemplateFilePath, $mixArgumentArray, $blnSave = true)
{
// Setup Debug/Exception Message
if (Codegen::DEBUG_MODE) {
echo("Evaluating $strTemplateFilePath<br/>");
}
// Check to see if the template file exists, and if it ... | php | public function generateFile($strModuleSubPath, $strTemplateFilePath, $mixArgumentArray, $blnSave = true)
{
// Setup Debug/Exception Message
if (Codegen::DEBUG_MODE) {
echo("Evaluating $strTemplateFilePath<br/>");
}
// Check to see if the template file exists, and if it ... | [
"public",
"function",
"generateFile",
"(",
"$",
"strModuleSubPath",
",",
"$",
"strTemplateFilePath",
",",
"$",
"mixArgumentArray",
",",
"$",
"blnSave",
"=",
"true",
")",
"{",
"// Setup Debug/Exception Message",
"if",
"(",
"Codegen",
"::",
"DEBUG_MODE",
")",
"{",
... | Generates a php code using a template file
@param string $strModuleSubPath
@param string $strTemplateFilePath Path to the template file
@param mixed[] $mixArgumentArray
@param boolean $blnSave whether or not to actually perform the save
@throws Caller
@throws \Exception
@return mixed returns the evaluated template or... | [
"Generates",
"a",
"php",
"code",
"using",
"a",
"template",
"file"
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L519-L588 |
17,189 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.evaluatePHP | protected function evaluatePHP($strFilename, $mixArgumentArray, &$templateSettings = null)
{
// Get all the arguments and set them locally
if ($mixArgumentArray) {
foreach ($mixArgumentArray as $strName => $mixValue) {
$$strName = $mixValue;
}
}
... | php | protected function evaluatePHP($strFilename, $mixArgumentArray, &$templateSettings = null)
{
// Get all the arguments and set them locally
if ($mixArgumentArray) {
foreach ($mixArgumentArray as $strName => $mixValue) {
$$strName = $mixValue;
}
}
... | [
"protected",
"function",
"evaluatePHP",
"(",
"$",
"strFilename",
",",
"$",
"mixArgumentArray",
",",
"&",
"$",
"templateSettings",
"=",
"null",
")",
"{",
"// Get all the arguments and set them locally",
"if",
"(",
"$",
"mixArgumentArray",
")",
"{",
"foreach",
"(",
... | Returns the evaluated PHP
@param $strFilename
@param $mixArgumentArray
@param null $templateSettings
@return mixed|string | [
"Returns",
"the",
"evaluated",
"PHP"
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L614-L653 |
17,190 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelClassName | protected function modelClassName($strTableName)
{
$strTableName = $this->stripPrefixFromTable($strTableName);
return sprintf('%s%s%s',
$this->strClassPrefix,
QString::camelCaseFromUnderscore($strTableName),
$this->strClassSuffix);
} | php | protected function modelClassName($strTableName)
{
$strTableName = $this->stripPrefixFromTable($strTableName);
return sprintf('%s%s%s',
$this->strClassPrefix,
QString::camelCaseFromUnderscore($strTableName),
$this->strClassSuffix);
} | [
"protected",
"function",
"modelClassName",
"(",
"$",
"strTableName",
")",
"{",
"$",
"strTableName",
"=",
"$",
"this",
"->",
"stripPrefixFromTable",
"(",
"$",
"strTableName",
")",
";",
"return",
"sprintf",
"(",
"'%s%s%s'",
",",
"$",
"this",
"->",
"strClassPrefi... | Given a table name, returns the name of the class for the corresponding model object.
@param string $strTableName
@return string | [
"Given",
"a",
"table",
"name",
"returns",
"the",
"name",
"of",
"the",
"class",
"for",
"the",
"corresponding",
"model",
"object",
"."
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L669-L676 |
17,191 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelVariableName | public function modelVariableName($strTableName)
{
$strTableName = $this->stripPrefixFromTable($strTableName);
return Codegen::prefixFromType(Type::OBJECT) .
QString::camelCaseFromUnderscore($strTableName);
} | php | public function modelVariableName($strTableName)
{
$strTableName = $this->stripPrefixFromTable($strTableName);
return Codegen::prefixFromType(Type::OBJECT) .
QString::camelCaseFromUnderscore($strTableName);
} | [
"public",
"function",
"modelVariableName",
"(",
"$",
"strTableName",
")",
"{",
"$",
"strTableName",
"=",
"$",
"this",
"->",
"stripPrefixFromTable",
"(",
"$",
"strTableName",
")",
";",
"return",
"Codegen",
"::",
"prefixFromType",
"(",
"Type",
"::",
"OBJECT",
")... | Given a table name, returns a variable name that will be used to represent the corresponding model object.
@param string $strTableName
@return string | [
"Given",
"a",
"table",
"name",
"returns",
"a",
"variable",
"name",
"that",
"will",
"be",
"used",
"to",
"represent",
"the",
"corresponding",
"model",
"object",
"."
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L683-L688 |
17,192 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelColumnVariableName | protected function modelColumnVariableName(SqlColumn $objColumn)
{
return Codegen::prefixFromType($objColumn->VariableType) .
QString::camelCaseFromUnderscore($objColumn->Name);
} | php | protected function modelColumnVariableName(SqlColumn $objColumn)
{
return Codegen::prefixFromType($objColumn->VariableType) .
QString::camelCaseFromUnderscore($objColumn->Name);
} | [
"protected",
"function",
"modelColumnVariableName",
"(",
"SqlColumn",
"$",
"objColumn",
")",
"{",
"return",
"Codegen",
"::",
"prefixFromType",
"(",
"$",
"objColumn",
"->",
"VariableType",
")",
".",
"QString",
"::",
"camelCaseFromUnderscore",
"(",
"$",
"objColumn",
... | Given a column, returns the name of the variable used to represent the column's value inside
the model object.
@param SqlColumn $objColumn
@return string | [
"Given",
"a",
"column",
"returns",
"the",
"name",
"of",
"the",
"variable",
"used",
"to",
"represent",
"the",
"column",
"s",
"value",
"inside",
"the",
"model",
"object",
"."
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L722-L726 |
17,193 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelReferenceColumnName | protected function modelReferenceColumnName($strColumnName)
{
$intNameLength = strlen($strColumnName);
// Does the column name for this reference column end in "_id"?
if (($intNameLength > 3) && (substr($strColumnName, $intNameLength - 3) == "_id")) {
// It ends in "_id" but we ... | php | protected function modelReferenceColumnName($strColumnName)
{
$intNameLength = strlen($strColumnName);
// Does the column name for this reference column end in "_id"?
if (($intNameLength > 3) && (substr($strColumnName, $intNameLength - 3) == "_id")) {
// It ends in "_id" but we ... | [
"protected",
"function",
"modelReferenceColumnName",
"(",
"$",
"strColumnName",
")",
"{",
"$",
"intNameLength",
"=",
"strlen",
"(",
"$",
"strColumnName",
")",
";",
"// Does the column name for this reference column end in \"_id\"?",
"if",
"(",
"(",
"$",
"intNameLength",
... | Given the name of a column that is a foreign key to another table, returns a kind of
virtual column name that would refer to the object pointed to. This new name is used to refer to the object
version of the column by json and other encodings, and derivatives
of this name are used to represent a variable and property n... | [
"Given",
"the",
"name",
"of",
"a",
"column",
"that",
"is",
"a",
"foreign",
"key",
"to",
"another",
"table",
"returns",
"a",
"kind",
"of",
"virtual",
"column",
"name",
"that",
"would",
"refer",
"to",
"the",
"object",
"pointed",
"to",
".",
"This",
"new",
... | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L760-L780 |
17,194 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelReferenceVariableName | protected function modelReferenceVariableName($strColumnName)
{
$strColumnName = $this->modelReferenceColumnName($strColumnName);
return Codegen::prefixFromType(Type::OBJECT) .
QString::camelCaseFromUnderscore($strColumnName);
} | php | protected function modelReferenceVariableName($strColumnName)
{
$strColumnName = $this->modelReferenceColumnName($strColumnName);
return Codegen::prefixFromType(Type::OBJECT) .
QString::camelCaseFromUnderscore($strColumnName);
} | [
"protected",
"function",
"modelReferenceVariableName",
"(",
"$",
"strColumnName",
")",
"{",
"$",
"strColumnName",
"=",
"$",
"this",
"->",
"modelReferenceColumnName",
"(",
"$",
"strColumnName",
")",
";",
"return",
"Codegen",
"::",
"prefixFromType",
"(",
"Type",
"::... | Given a column name to a foreign key, returns the name of the variable that will represent the foreign object
stored in the model.
@param string $strColumnName
@return string | [
"Given",
"a",
"column",
"name",
"to",
"a",
"foreign",
"key",
"returns",
"the",
"name",
"of",
"the",
"variable",
"that",
"will",
"represent",
"the",
"foreign",
"object",
"stored",
"in",
"the",
"model",
"."
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L789-L794 |
17,195 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelConnectorControlName | public static function modelConnectorControlName(ColumnInterface $objColumn)
{
if (($o = $objColumn->Options) && isset ($o['Name'])) { // Did developer default?
return $o['Name'];
}
return QString::wordsFromCamelCase(Codegen::modelConnectorPropertyName($objColumn));
} | php | public static function modelConnectorControlName(ColumnInterface $objColumn)
{
if (($o = $objColumn->Options) && isset ($o['Name'])) { // Did developer default?
return $o['Name'];
}
return QString::wordsFromCamelCase(Codegen::modelConnectorPropertyName($objColumn));
} | [
"public",
"static",
"function",
"modelConnectorControlName",
"(",
"ColumnInterface",
"$",
"objColumn",
")",
"{",
"if",
"(",
"(",
"$",
"o",
"=",
"$",
"objColumn",
"->",
"Options",
")",
"&&",
"isset",
"(",
"$",
"o",
"[",
"'Name'",
"]",
")",
")",
"{",
"//... | Returns the control label name as used in the ModelConnector corresponding to this column or table.
@param ColumnInterface $objColumn
@return string | [
"Returns",
"the",
"control",
"label",
"name",
"as",
"used",
"in",
"the",
"ModelConnector",
"corresponding",
"to",
"this",
"column",
"or",
"table",
"."
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L868-L874 |
17,196 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelConnectorPropertyName | public static function modelConnectorPropertyName(ColumnInterface $objColumn)
{
if ($objColumn instanceof SqlColumn) {
if ($objColumn->Reference) {
return $objColumn->Reference->PropertyName;
} else {
return $objColumn->PropertyName;
}
... | php | public static function modelConnectorPropertyName(ColumnInterface $objColumn)
{
if ($objColumn instanceof SqlColumn) {
if ($objColumn->Reference) {
return $objColumn->Reference->PropertyName;
} else {
return $objColumn->PropertyName;
}
... | [
"public",
"static",
"function",
"modelConnectorPropertyName",
"(",
"ColumnInterface",
"$",
"objColumn",
")",
"{",
"if",
"(",
"$",
"objColumn",
"instanceof",
"SqlColumn",
")",
"{",
"if",
"(",
"$",
"objColumn",
"->",
"Reference",
")",
"{",
"return",
"$",
"objCol... | The property name used in the ModelConnector for the given column, virtual column or table
@param ColumnInterface $objColumn
@return string
@throws \Exception | [
"The",
"property",
"name",
"used",
"in",
"the",
"ModelConnector",
"for",
"the",
"given",
"column",
"virtual",
"column",
"or",
"table"
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L884-L903 |
17,197 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelConnectorVariableName | public function modelConnectorVariableName(ColumnInterface $objColumn)
{
$strPropName = static::modelConnectorPropertyName($objColumn);
$objControlHelper = $this->getControlCodeGenerator($objColumn);
return $objControlHelper->varName($strPropName);
} | php | public function modelConnectorVariableName(ColumnInterface $objColumn)
{
$strPropName = static::modelConnectorPropertyName($objColumn);
$objControlHelper = $this->getControlCodeGenerator($objColumn);
return $objControlHelper->varName($strPropName);
} | [
"public",
"function",
"modelConnectorVariableName",
"(",
"ColumnInterface",
"$",
"objColumn",
")",
"{",
"$",
"strPropName",
"=",
"static",
"::",
"modelConnectorPropertyName",
"(",
"$",
"objColumn",
")",
";",
"$",
"objControlHelper",
"=",
"$",
"this",
"->",
"getCon... | Return a variable name corresponding to the given column, including virtual columns like
ReverseReference and QManyToMany references.
@param ColumnInterface $objColumn
@return string | [
"Return",
"a",
"variable",
"name",
"corresponding",
"to",
"the",
"given",
"column",
"including",
"virtual",
"columns",
"like",
"ReverseReference",
"and",
"QManyToMany",
"references",
"."
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L911-L916 |
17,198 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelConnectorLabelVariableName | public function modelConnectorLabelVariableName(ColumnInterface $objColumn)
{
$strPropName = static::modelConnectorPropertyName($objColumn);
return \QCubed\Codegen\Generator\Label::instance()->varName($strPropName);
} | php | public function modelConnectorLabelVariableName(ColumnInterface $objColumn)
{
$strPropName = static::modelConnectorPropertyName($objColumn);
return \QCubed\Codegen\Generator\Label::instance()->varName($strPropName);
} | [
"public",
"function",
"modelConnectorLabelVariableName",
"(",
"ColumnInterface",
"$",
"objColumn",
")",
"{",
"$",
"strPropName",
"=",
"static",
"::",
"modelConnectorPropertyName",
"(",
"$",
"objColumn",
")",
";",
"return",
"\\",
"QCubed",
"\\",
"Codegen",
"\\",
"G... | Returns a variable name for the "label" version of a control, which would be the read-only version
of viewing the data in the column.
@param ColumnInterface $objColumn
@return string | [
"Returns",
"a",
"variable",
"name",
"for",
"the",
"label",
"version",
"of",
"a",
"control",
"which",
"would",
"be",
"the",
"read",
"-",
"only",
"version",
"of",
"viewing",
"the",
"data",
"in",
"the",
"column",
"."
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L924-L928 |
17,199 | qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.dataListControlName | public static function dataListControlName(SqlTable $objTable)
{
if (($o = $objTable->Options) && isset ($o['Name'])) { // Did developer default?
return $o['Name'];
}
return QString::wordsFromCamelCase($objTable->ClassNamePlural);
} | php | public static function dataListControlName(SqlTable $objTable)
{
if (($o = $objTable->Options) && isset ($o['Name'])) { // Did developer default?
return $o['Name'];
}
return QString::wordsFromCamelCase($objTable->ClassNamePlural);
} | [
"public",
"static",
"function",
"dataListControlName",
"(",
"SqlTable",
"$",
"objTable",
")",
"{",
"if",
"(",
"(",
"$",
"o",
"=",
"$",
"objTable",
"->",
"Options",
")",
"&&",
"isset",
"(",
"$",
"o",
"[",
"'Name'",
"]",
")",
")",
"{",
"// Did developer ... | Returns the control label name as used in the data list panel corresponding to this column.
@param SqlTable $objTable
@return string | [
"Returns",
"the",
"control",
"label",
"name",
"as",
"used",
"in",
"the",
"data",
"list",
"panel",
"corresponding",
"to",
"this",
"column",
"."
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L1011-L1017 |
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.