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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
6,900 | gossi/trixionary | src/domain/base/SkillDomainTrait.php | SkillDomainTrait.doSetStartPositionId | protected function doSetStartPositionId(Skill $model, $relatedId) {
if ($model->getStartPositionId() !== $relatedId) {
$model->setStartPositionId($relatedId);
return true;
}
return false;
} | php | protected function doSetStartPositionId(Skill $model, $relatedId) {
if ($model->getStartPositionId() !== $relatedId) {
$model->setStartPositionId($relatedId);
return true;
}
return false;
} | [
"protected",
"function",
"doSetStartPositionId",
"(",
"Skill",
"$",
"model",
",",
"$",
"relatedId",
")",
"{",
"if",
"(",
"$",
"model",
"->",
"getStartPositionId",
"(",
")",
"!==",
"$",
"relatedId",
")",
"{",
"$",
"model",
"->",
"setStartPositionId",
"(",
"... | Internal mechanism to set the StartPosition id
@param Skill $model
@param mixed $relatedId | [
"Internal",
"mechanism",
"to",
"set",
"the",
"StartPosition",
"id"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/SkillDomainTrait.php#L2719-L2727 |
6,901 | gossi/trixionary | src/domain/base/SkillDomainTrait.php | SkillDomainTrait.doSetVariationOfId | protected function doSetVariationOfId(Skill $model, $relatedId) {
if ($model->getVariationOfId() !== $relatedId) {
$model->setVariationOfId($relatedId);
return true;
}
return false;
} | php | protected function doSetVariationOfId(Skill $model, $relatedId) {
if ($model->getVariationOfId() !== $relatedId) {
$model->setVariationOfId($relatedId);
return true;
}
return false;
} | [
"protected",
"function",
"doSetVariationOfId",
"(",
"Skill",
"$",
"model",
",",
"$",
"relatedId",
")",
"{",
"if",
"(",
"$",
"model",
"->",
"getVariationOfId",
"(",
")",
"!==",
"$",
"relatedId",
")",
"{",
"$",
"model",
"->",
"setVariationOfId",
"(",
"$",
... | Internal mechanism to set the VariationOf id
@param Skill $model
@param mixed $relatedId | [
"Internal",
"mechanism",
"to",
"set",
"the",
"VariationOf",
"id"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/SkillDomainTrait.php#L2735-L2743 |
6,902 | gossi/trixionary | src/domain/base/SkillDomainTrait.php | SkillDomainTrait.doUpdateChildren | protected function doUpdateChildren(Skill $model, $data) {
// remove all relationships before
SkillDependencyQuery::create()->filterBySkillRelatedByParentId($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} els... | php | protected function doUpdateChildren(Skill $model, $data) {
// remove all relationships before
SkillDependencyQuery::create()->filterBySkillRelatedByParentId($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} els... | [
"protected",
"function",
"doUpdateChildren",
"(",
"Skill",
"$",
"model",
",",
"$",
"data",
")",
"{",
"// remove all relationships before",
"SkillDependencyQuery",
"::",
"create",
"(",
")",
"->",
"filterBySkillRelatedByParentId",
"(",
"$",
"model",
")",
"->",
"delete... | Internal update mechanism of Children on Skill
@param Skill $model
@param mixed $data | [
"Internal",
"update",
"mechanism",
"of",
"Children",
"on",
"Skill"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/SkillDomainTrait.php#L2751-L2769 |
6,903 | gossi/trixionary | src/domain/base/SkillDomainTrait.php | SkillDomainTrait.doUpdateComposites | protected function doUpdateComposites(Skill $model, $data) {
// remove all relationships before
SkillPartQuery::create()->filterBySkillRelatedByPartId($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} else {
... | php | protected function doUpdateComposites(Skill $model, $data) {
// remove all relationships before
SkillPartQuery::create()->filterBySkillRelatedByPartId($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} else {
... | [
"protected",
"function",
"doUpdateComposites",
"(",
"Skill",
"$",
"model",
",",
"$",
"data",
")",
"{",
"// remove all relationships before",
"SkillPartQuery",
"::",
"create",
"(",
")",
"->",
"filterBySkillRelatedByPartId",
"(",
"$",
"model",
")",
"->",
"delete",
"... | Internal update mechanism of Composites on Skill
@param Skill $model
@param mixed $data | [
"Internal",
"update",
"mechanism",
"of",
"Composites",
"on",
"Skill"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/SkillDomainTrait.php#L2777-L2795 |
6,904 | gossi/trixionary | src/domain/base/SkillDomainTrait.php | SkillDomainTrait.doUpdateFunctionPhases | protected function doUpdateFunctionPhases(Skill $model, $data) {
// remove all relationships before
FunctionPhaseQuery::create()->filterBySkill($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for FunctionPhase';
} else {
... | php | protected function doUpdateFunctionPhases(Skill $model, $data) {
// remove all relationships before
FunctionPhaseQuery::create()->filterBySkill($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for FunctionPhase';
} else {
... | [
"protected",
"function",
"doUpdateFunctionPhases",
"(",
"Skill",
"$",
"model",
",",
"$",
"data",
")",
"{",
"// remove all relationships before",
"FunctionPhaseQuery",
"::",
"create",
"(",
")",
"->",
"filterBySkill",
"(",
"$",
"model",
")",
"->",
"delete",
"(",
"... | Internal update mechanism of FunctionPhases on Skill
@param Skill $model
@param mixed $data | [
"Internal",
"update",
"mechanism",
"of",
"FunctionPhases",
"on",
"Skill"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/SkillDomainTrait.php#L2803-L2821 |
6,905 | gossi/trixionary | src/domain/base/SkillDomainTrait.php | SkillDomainTrait.doUpdateGroups | protected function doUpdateGroups(Skill $model, $data) {
// remove all relationships before
SkillGroupQuery::create()->filterBySkill($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Group';
} else {
$related = Group... | php | protected function doUpdateGroups(Skill $model, $data) {
// remove all relationships before
SkillGroupQuery::create()->filterBySkill($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Group';
} else {
$related = Group... | [
"protected",
"function",
"doUpdateGroups",
"(",
"Skill",
"$",
"model",
",",
"$",
"data",
")",
"{",
"// remove all relationships before",
"SkillGroupQuery",
"::",
"create",
"(",
")",
"->",
"filterBySkill",
"(",
"$",
"model",
")",
"->",
"delete",
"(",
")",
";",
... | Internal update mechanism of Groups on Skill
@param Skill $model
@param mixed $data | [
"Internal",
"update",
"mechanism",
"of",
"Groups",
"on",
"Skill"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/SkillDomainTrait.php#L2829-L2847 |
6,906 | gossi/trixionary | src/domain/base/SkillDomainTrait.php | SkillDomainTrait.doUpdateKstrukturs | protected function doUpdateKstrukturs(Skill $model, $data) {
// remove all relationships before
KstrukturQuery::create()->filterBySkill($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Kstruktur';
} else {
$related ... | php | protected function doUpdateKstrukturs(Skill $model, $data) {
// remove all relationships before
KstrukturQuery::create()->filterBySkill($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Kstruktur';
} else {
$related ... | [
"protected",
"function",
"doUpdateKstrukturs",
"(",
"Skill",
"$",
"model",
",",
"$",
"data",
")",
"{",
"// remove all relationships before",
"KstrukturQuery",
"::",
"create",
"(",
")",
"->",
"filterBySkill",
"(",
"$",
"model",
")",
"->",
"delete",
"(",
")",
";... | Internal update mechanism of Kstrukturs on Skill
@param Skill $model
@param mixed $data | [
"Internal",
"update",
"mechanism",
"of",
"Kstrukturs",
"on",
"Skill"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/SkillDomainTrait.php#L2855-L2873 |
6,907 | gossi/trixionary | src/domain/base/SkillDomainTrait.php | SkillDomainTrait.doUpdateLineages | protected function doUpdateLineages(Skill $model, $data) {
// remove all relationships before
LineageQuery::create()->filterByAncestor($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Lineage';
} else {
$related = L... | php | protected function doUpdateLineages(Skill $model, $data) {
// remove all relationships before
LineageQuery::create()->filterByAncestor($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Lineage';
} else {
$related = L... | [
"protected",
"function",
"doUpdateLineages",
"(",
"Skill",
"$",
"model",
",",
"$",
"data",
")",
"{",
"// remove all relationships before",
"LineageQuery",
"::",
"create",
"(",
")",
"->",
"filterByAncestor",
"(",
"$",
"model",
")",
"->",
"delete",
"(",
")",
";"... | Internal update mechanism of Lineages on Skill
@param Skill $model
@param mixed $data | [
"Internal",
"update",
"mechanism",
"of",
"Lineages",
"on",
"Skill"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/SkillDomainTrait.php#L2881-L2899 |
6,908 | gossi/trixionary | src/domain/base/SkillDomainTrait.php | SkillDomainTrait.doUpdateMultiples | protected function doUpdateMultiples(Skill $model, $data) {
// remove all relationships before
SkillQuery::create()->filterByMultipleOf($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} else {
$related = Sk... | php | protected function doUpdateMultiples(Skill $model, $data) {
// remove all relationships before
SkillQuery::create()->filterByMultipleOf($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} else {
$related = Sk... | [
"protected",
"function",
"doUpdateMultiples",
"(",
"Skill",
"$",
"model",
",",
"$",
"data",
")",
"{",
"// remove all relationships before",
"SkillQuery",
"::",
"create",
"(",
")",
"->",
"filterByMultipleOf",
"(",
"$",
"model",
")",
"->",
"delete",
"(",
")",
";... | Internal update mechanism of Multiples on Skill
@param Skill $model
@param mixed $data | [
"Internal",
"update",
"mechanism",
"of",
"Multiples",
"on",
"Skill"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/SkillDomainTrait.php#L2907-L2925 |
6,909 | gossi/trixionary | src/domain/base/SkillDomainTrait.php | SkillDomainTrait.doUpdateParents | protected function doUpdateParents(Skill $model, $data) {
// remove all relationships before
SkillDependencyQuery::create()->filterBySkillRelatedByDependencyId($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} ... | php | protected function doUpdateParents(Skill $model, $data) {
// remove all relationships before
SkillDependencyQuery::create()->filterBySkillRelatedByDependencyId($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} ... | [
"protected",
"function",
"doUpdateParents",
"(",
"Skill",
"$",
"model",
",",
"$",
"data",
")",
"{",
"// remove all relationships before",
"SkillDependencyQuery",
"::",
"create",
"(",
")",
"->",
"filterBySkillRelatedByDependencyId",
"(",
"$",
"model",
")",
"->",
"del... | Internal update mechanism of Parents on Skill
@param Skill $model
@param mixed $data | [
"Internal",
"update",
"mechanism",
"of",
"Parents",
"on",
"Skill"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/SkillDomainTrait.php#L2933-L2951 |
6,910 | gossi/trixionary | src/domain/base/SkillDomainTrait.php | SkillDomainTrait.doUpdateParts | protected function doUpdateParts(Skill $model, $data) {
// remove all relationships before
SkillPartQuery::create()->filterBySkillRelatedByCompositeId($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} else {
... | php | protected function doUpdateParts(Skill $model, $data) {
// remove all relationships before
SkillPartQuery::create()->filterBySkillRelatedByCompositeId($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} else {
... | [
"protected",
"function",
"doUpdateParts",
"(",
"Skill",
"$",
"model",
",",
"$",
"data",
")",
"{",
"// remove all relationships before",
"SkillPartQuery",
"::",
"create",
"(",
")",
"->",
"filterBySkillRelatedByCompositeId",
"(",
"$",
"model",
")",
"->",
"delete",
"... | Internal update mechanism of Parts on Skill
@param Skill $model
@param mixed $data | [
"Internal",
"update",
"mechanism",
"of",
"Parts",
"on",
"Skill"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/SkillDomainTrait.php#L2959-L2977 |
6,911 | gossi/trixionary | src/domain/base/SkillDomainTrait.php | SkillDomainTrait.doUpdatePictures | protected function doUpdatePictures(Skill $model, $data) {
// remove all relationships before
PictureQuery::create()->filterBySkill($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Picture';
} else {
$related = Pict... | php | protected function doUpdatePictures(Skill $model, $data) {
// remove all relationships before
PictureQuery::create()->filterBySkill($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Picture';
} else {
$related = Pict... | [
"protected",
"function",
"doUpdatePictures",
"(",
"Skill",
"$",
"model",
",",
"$",
"data",
")",
"{",
"// remove all relationships before",
"PictureQuery",
"::",
"create",
"(",
")",
"->",
"filterBySkill",
"(",
"$",
"model",
")",
"->",
"delete",
"(",
")",
";",
... | Internal update mechanism of Pictures on Skill
@param Skill $model
@param mixed $data | [
"Internal",
"update",
"mechanism",
"of",
"Pictures",
"on",
"Skill"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/SkillDomainTrait.php#L2985-L3003 |
6,912 | gossi/trixionary | src/domain/base/SkillDomainTrait.php | SkillDomainTrait.doUpdateReferences | protected function doUpdateReferences(Skill $model, $data) {
// remove all relationships before
SkillReferenceQuery::create()->filterBySkill($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Reference';
} else {
$rel... | php | protected function doUpdateReferences(Skill $model, $data) {
// remove all relationships before
SkillReferenceQuery::create()->filterBySkill($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Reference';
} else {
$rel... | [
"protected",
"function",
"doUpdateReferences",
"(",
"Skill",
"$",
"model",
",",
"$",
"data",
")",
"{",
"// remove all relationships before",
"SkillReferenceQuery",
"::",
"create",
"(",
")",
"->",
"filterBySkill",
"(",
"$",
"model",
")",
"->",
"delete",
"(",
")",... | Internal update mechanism of References on Skill
@param Skill $model
@param mixed $data | [
"Internal",
"update",
"mechanism",
"of",
"References",
"on",
"Skill"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/SkillDomainTrait.php#L3011-L3029 |
6,913 | gossi/trixionary | src/domain/base/SkillDomainTrait.php | SkillDomainTrait.doUpdateVariations | protected function doUpdateVariations(Skill $model, $data) {
// remove all relationships before
SkillQuery::create()->filterByVariationOf($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} else {
$related = ... | php | protected function doUpdateVariations(Skill $model, $data) {
// remove all relationships before
SkillQuery::create()->filterByVariationOf($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Skill';
} else {
$related = ... | [
"protected",
"function",
"doUpdateVariations",
"(",
"Skill",
"$",
"model",
",",
"$",
"data",
")",
"{",
"// remove all relationships before",
"SkillQuery",
"::",
"create",
"(",
")",
"->",
"filterByVariationOf",
"(",
"$",
"model",
")",
"->",
"delete",
"(",
")",
... | Internal update mechanism of Variations on Skill
@param Skill $model
@param mixed $data | [
"Internal",
"update",
"mechanism",
"of",
"Variations",
"on",
"Skill"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/SkillDomainTrait.php#L3037-L3055 |
6,914 | gossi/trixionary | src/domain/base/SkillDomainTrait.php | SkillDomainTrait.doUpdateVideos | protected function doUpdateVideos(Skill $model, $data) {
// remove all relationships before
VideoQuery::create()->filterBySkill($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Video';
} else {
$related = VideoQuery... | php | protected function doUpdateVideos(Skill $model, $data) {
// remove all relationships before
VideoQuery::create()->filterBySkill($model)->delete();
// add them
$errors = [];
foreach ($data as $entry) {
if (!isset($entry['id'])) {
$errors[] = 'Missing id for Video';
} else {
$related = VideoQuery... | [
"protected",
"function",
"doUpdateVideos",
"(",
"Skill",
"$",
"model",
",",
"$",
"data",
")",
"{",
"// remove all relationships before",
"VideoQuery",
"::",
"create",
"(",
")",
"->",
"filterBySkill",
"(",
"$",
"model",
")",
"->",
"delete",
"(",
")",
";",
"//... | Internal update mechanism of Videos on Skill
@param Skill $model
@param mixed $data | [
"Internal",
"update",
"mechanism",
"of",
"Videos",
"on",
"Skill"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/domain/base/SkillDomainTrait.php#L3063-L3081 |
6,915 | inc2734/wp-pure-css-gallery | src/Pure_CSS_Gallery.php | Pure_CSS_Gallery._post_gallery | public function _post_gallery( $output, $attr, $instance ) {
$post = get_post();
if ( ! empty( $attr['ids'] ) ) {
if ( empty( $attr['orderby'] ) ) {
$attr['orderby'] = 'post__in';
}
$attr['include'] = $attr['ids'];
}
$atts = shortcode_atts( [
'id' => $post ? $post->ID : 0,
'link' =>... | php | public function _post_gallery( $output, $attr, $instance ) {
$post = get_post();
if ( ! empty( $attr['ids'] ) ) {
if ( empty( $attr['orderby'] ) ) {
$attr['orderby'] = 'post__in';
}
$attr['include'] = $attr['ids'];
}
$atts = shortcode_atts( [
'id' => $post ? $post->ID : 0,
'link' =>... | [
"public",
"function",
"_post_gallery",
"(",
"$",
"output",
",",
"$",
"attr",
",",
"$",
"instance",
")",
"{",
"$",
"post",
"=",
"get_post",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"attr",
"[",
"'ids'",
"]",
")",
")",
"{",
"if",
"(",
"e... | Filters the default gallery shortcode output
@param string $output The gallery output. Default empty.
@param array $attr Attributes of the gallery shortcode.
@var link string null|file|none
@var size string null|thumbnail|medium|large|full
@var columns int
@var ids string
@var orderby string rand|null
@param int $inst... | [
"Filters",
"the",
"default",
"gallery",
"shortcode",
"output"
] | 31010deb9224ed57b6f03d35b52ee42133f1aac5 | https://github.com/inc2734/wp-pure-css-gallery/blob/31010deb9224ed57b6f03d35b52ee42133f1aac5/src/Pure_CSS_Gallery.php#L33-L89 |
6,916 | inc2734/wp-pure-css-gallery | src/Pure_CSS_Gallery.php | Pure_CSS_Gallery._tiny_mce_before_init | public function _tiny_mce_before_init( $mce_init ) {
$styles = '#tinymce .wpview .gallery { margin: 0; display: block; border: 2px solid #666; text-align: center; height: 80px; }';
$styles .= '#tinymce .wpview .gallery > * { display: none; }';
$styles .= '#tinymce .wpview .gallery::before { margin-top: 20px; dis... | php | public function _tiny_mce_before_init( $mce_init ) {
$styles = '#tinymce .wpview .gallery { margin: 0; display: block; border: 2px solid #666; text-align: center; height: 80px; }';
$styles .= '#tinymce .wpview .gallery > * { display: none; }';
$styles .= '#tinymce .wpview .gallery::before { margin-top: 20px; dis... | [
"public",
"function",
"_tiny_mce_before_init",
"(",
"$",
"mce_init",
")",
"{",
"$",
"styles",
"=",
"'#tinymce .wpview .gallery { margin: 0; display: block; border: 2px solid #666; text-align: center; height: 80px; }'",
";",
"$",
"styles",
".=",
"'#tinymce .wpview .gallery > * { displ... | Change style of gallery in wysiwyg
@param array $mce_init | [
"Change",
"style",
"of",
"gallery",
"in",
"wysiwyg"
] | 31010deb9224ed57b6f03d35b52ee42133f1aac5 | https://github.com/inc2734/wp-pure-css-gallery/blob/31010deb9224ed57b6f03d35b52ee42133f1aac5/src/Pure_CSS_Gallery.php#L96-L106 |
6,917 | ferguson-mr/yii2-base | widgets/emailCaptcha/EmailCaptchaAction.php | EmailCaptchaAction.init | public function init()
{
if (!isset(Yii::$app->params['user.emailCaptchaExpire'])) {
Yii::$app->params['user.emailCaptchaExpire'] = $this->expire;
}
$this->expire = Yii::$app->params['user.emailCaptchaExpire'];
$data = Yii::$app->request->post(Yii::$app->request->get('f... | php | public function init()
{
if (!isset(Yii::$app->params['user.emailCaptchaExpire'])) {
Yii::$app->params['user.emailCaptchaExpire'] = $this->expire;
}
$this->expire = Yii::$app->params['user.emailCaptchaExpire'];
$data = Yii::$app->request->post(Yii::$app->request->get('f... | [
"public",
"function",
"init",
"(",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"Yii",
"::",
"$",
"app",
"->",
"params",
"[",
"'user.emailCaptchaExpire'",
"]",
")",
")",
"{",
"Yii",
"::",
"$",
"app",
"->",
"params",
"[",
"'user.emailCaptchaExpire'",
"]",
"=... | Initializes the action. | [
"Initializes",
"the",
"action",
"."
] | 627a6907003421d6db48f400d878bce33db79c50 | https://github.com/ferguson-mr/yii2-base/blob/627a6907003421d6db48f400d878bce33db79c50/widgets/emailCaptcha/EmailCaptchaAction.php#L43-L54 |
6,918 | marando/phpSOFA | src/Marando/IAU/iauFal03.php | iauFal03.Fal03 | public static function Fal03($t) {
$a;
/* Mean anomaly of the Moon (IERS Conventions 2003). */
$a = fmod(485868.249036 +
$t * ( 1717915923.2178 +
$t * ( 31.8792 +
$t * ( 0.051635 +
$t * ( - 0.00024470 ) ) ) ), TURNAS) * DAS2R;
... | php | public static function Fal03($t) {
$a;
/* Mean anomaly of the Moon (IERS Conventions 2003). */
$a = fmod(485868.249036 +
$t * ( 1717915923.2178 +
$t * ( 31.8792 +
$t * ( 0.051635 +
$t * ( - 0.00024470 ) ) ) ), TURNAS) * DAS2R;
... | [
"public",
"static",
"function",
"Fal03",
"(",
"$",
"t",
")",
"{",
"$",
"a",
";",
"/* Mean anomaly of the Moon (IERS Conventions 2003). */",
"$",
"a",
"=",
"fmod",
"(",
"485868.249036",
"+",
"$",
"t",
"*",
"(",
"1717915923.2178",
"+",
"$",
"t",
"*",
"(",
"3... | - - - - - - - - -
i a u F a l 0 3
- - - - - - - - -
Fundamental argument, IERS Conventions (2003):
mean anomaly of the Moon.
This function is part of the International Astronomical Union's
SOFA (Standards Of Fundamental Astronomy) software collection.
Status: canonical model.
Given:
t double TDB, Julian cen... | [
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"i",
"a",
"u",
"F",
"a",
"l",
"0",
"3",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-"
] | 757fa49fe335ae1210eaa7735473fd4388b13f07 | https://github.com/marando/phpSOFA/blob/757fa49fe335ae1210eaa7735473fd4388b13f07/src/Marando/IAU/iauFal03.php#L48-L59 |
6,919 | marando/phpSOFA | src/Marando/IAU/iauEe00.php | iauEe00.Ee00 | public static function Ee00($date1, $date2, $epsa, $dpsi) {
$ee;
/* Equation of the equinoxes. */
$ee = $dpsi * cos($epsa) + IAU::Eect00($date1, $date2);
return $ee;
} | php | public static function Ee00($date1, $date2, $epsa, $dpsi) {
$ee;
/* Equation of the equinoxes. */
$ee = $dpsi * cos($epsa) + IAU::Eect00($date1, $date2);
return $ee;
} | [
"public",
"static",
"function",
"Ee00",
"(",
"$",
"date1",
",",
"$",
"date2",
",",
"$",
"epsa",
",",
"$",
"dpsi",
")",
"{",
"$",
"ee",
";",
"/* Equation of the equinoxes. */",
"$",
"ee",
"=",
"$",
"dpsi",
"*",
"cos",
"(",
"$",
"epsa",
")",
"+",
"IA... | - - - - - - - -
i a u E e 0 0
- - - - - - - -
The equation of the equinoxes, compatible with IAU 2000 resolutions,
given the nutation in longitude and the mean obliquity.
This function is part of the International Astronomical Union's
SOFA (Standards Of Fundamental Astronomy) software collection.
Status: canonical ... | [
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"i",
"a",
"u",
"E",
"e",
"0",
"0",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-"
] | 757fa49fe335ae1210eaa7735473fd4388b13f07 | https://github.com/marando/phpSOFA/blob/757fa49fe335ae1210eaa7735473fd4388b13f07/src/Marando/IAU/iauEe00.php#L77-L84 |
6,920 | ciims/cii | widgets/input/CiiInputVertical.php | CiiInputVertical.datepickerField | protected function datepickerField()
{
if (isset($this->htmlOptions['options']))
{
$options = $this->htmlOptions['options'];
unset($this->htmlOptions['options']);
}
if (isset($this->htmlOptions['events']))
{
$events = $this->htmlOptions['events'];
unset($this->htmlOptions['events']);
... | php | protected function datepickerField()
{
if (isset($this->htmlOptions['options']))
{
$options = $this->htmlOptions['options'];
unset($this->htmlOptions['options']);
}
if (isset($this->htmlOptions['events']))
{
$events = $this->htmlOptions['events'];
unset($this->htmlOptions['events']);
... | [
"protected",
"function",
"datepickerField",
"(",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"htmlOptions",
"[",
"'options'",
"]",
")",
")",
"{",
"$",
"options",
"=",
"$",
"this",
"->",
"htmlOptions",
"[",
"'options'",
"]",
";",
"unset",
"(",... | Renders a datepicker field.
@return string the rendered content
@author antonio ramirez <antonio@clevertech.biz> | [
"Renders",
"a",
"datepicker",
"field",
"."
] | cc8550b9a3a6a0bf0214554679de8743d50dc9ef | https://github.com/ciims/cii/blob/cc8550b9a3a6a0bf0214554679de8743d50dc9ef/widgets/input/CiiInputVertical.php#L222-L247 |
6,921 | ciims/cii | widgets/input/CiiInputVertical.php | CiiInputVertical.redactorJs | protected function redactorJs()
{
if (isset($this->htmlOptions['options']))
{
$options = $this->htmlOptions['options'];
unset($this->htmlOptions['options']);
}
if (isset($this->htmlOptions['width']))
{
$width = $this->htmlOptions['width'];
unset($this->htmlOptions['width']);
}
if ... | php | protected function redactorJs()
{
if (isset($this->htmlOptions['options']))
{
$options = $this->htmlOptions['options'];
unset($this->htmlOptions['options']);
}
if (isset($this->htmlOptions['width']))
{
$width = $this->htmlOptions['width'];
unset($this->htmlOptions['width']);
}
if ... | [
"protected",
"function",
"redactorJs",
"(",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"htmlOptions",
"[",
"'options'",
"]",
")",
")",
"{",
"$",
"options",
"=",
"$",
"this",
"->",
"htmlOptions",
"[",
"'options'",
"]",
";",
"unset",
"(",
"$... | Renders a redactorJs.
@return string the rendered content | [
"Renders",
"a",
"redactorJs",
"."
] | cc8550b9a3a6a0bf0214554679de8743d50dc9ef | https://github.com/ciims/cii/blob/cc8550b9a3a6a0bf0214554679de8743d50dc9ef/widgets/input/CiiInputVertical.php#L286-L313 |
6,922 | Puzzlout/FrameworkMvcLegacy | src/Helpers/NetworkInfoHelper.php | NetworkInfoHelper.GetClientIpEnvironnement | public static function GetClientIpEnvironnement() {
$ipaddress = '';
if (getenv('HTTP_CLIENT_IP'))
$ipaddress = getenv('HTTP_CLIENT_IP');
else if (getenv('HTTP_X_FORWARDED_FOR'))
$ipaddress = getenv('HTTP_X_FORWARDED_FOR');
else if (getenv('HTTP_X_FORWARDED'))
... | php | public static function GetClientIpEnvironnement() {
$ipaddress = '';
if (getenv('HTTP_CLIENT_IP'))
$ipaddress = getenv('HTTP_CLIENT_IP');
else if (getenv('HTTP_X_FORWARDED_FOR'))
$ipaddress = getenv('HTTP_X_FORWARDED_FOR');
else if (getenv('HTTP_X_FORWARDED'))
... | [
"public",
"static",
"function",
"GetClientIpEnvironnement",
"(",
")",
"{",
"$",
"ipaddress",
"=",
"''",
";",
"if",
"(",
"getenv",
"(",
"'HTTP_CLIENT_IP'",
")",
")",
"$",
"ipaddress",
"=",
"getenv",
"(",
"'HTTP_CLIENT_IP'",
")",
";",
"else",
"if",
"(",
"get... | Get the client ip from the environnement.
@return string
The IP address of client. | [
"Get",
"the",
"client",
"ip",
"from",
"the",
"environnement",
"."
] | 14e0fc5b16978cbd209f552ee9c649f66a0dfc6e | https://github.com/Puzzlout/FrameworkMvcLegacy/blob/14e0fc5b16978cbd209f552ee9c649f66a0dfc6e/src/Helpers/NetworkInfoHelper.php#L23-L41 |
6,923 | Puzzlout/FrameworkMvcLegacy | src/Helpers/NetworkInfoHelper.php | NetworkInfoHelper.GetClientIpServer | public static function GetClientIpServer() {
$ipaddress = '';
if ($_SERVER['HTTP_CLIENT_IP'])
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
else if ($_SERVER['HTTP_X_FORWARDED_FOR'])
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
else if ($_SERVER['HTTP_X_FORWARDED'])
... | php | public static function GetClientIpServer() {
$ipaddress = '';
if ($_SERVER['HTTP_CLIENT_IP'])
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
else if ($_SERVER['HTTP_X_FORWARDED_FOR'])
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
else if ($_SERVER['HTTP_X_FORWARDED'])
... | [
"public",
"static",
"function",
"GetClientIpServer",
"(",
")",
"{",
"$",
"ipaddress",
"=",
"''",
";",
"if",
"(",
"$",
"_SERVER",
"[",
"'HTTP_CLIENT_IP'",
"]",
")",
"$",
"ipaddress",
"=",
"$",
"_SERVER",
"[",
"'HTTP_CLIENT_IP'",
"]",
";",
"else",
"if",
"(... | Get the client ip from the server global variable.
@return string
The IP address of client. | [
"Get",
"the",
"client",
"ip",
"from",
"the",
"server",
"global",
"variable",
"."
] | 14e0fc5b16978cbd209f552ee9c649f66a0dfc6e | https://github.com/Puzzlout/FrameworkMvcLegacy/blob/14e0fc5b16978cbd209f552ee9c649f66a0dfc6e/src/Helpers/NetworkInfoHelper.php#L49-L67 |
6,924 | gourmet/common | Model/Behavior/DetailableBehavior.php | DetailableBehavior.details | public function details(Model $Model, $queryData = null, $schema = false, $format = true) {
$DetailModel = ClassRegistry::init($this->settings[$Model->alias]['alias']);
if (is_string($queryData)) {
$queryData = array('section' => $queryData);
}
$conditions = array($DetailModel->alias . '.foreign_key' => $M... | php | public function details(Model $Model, $queryData = null, $schema = false, $format = true) {
$DetailModel = ClassRegistry::init($this->settings[$Model->alias]['alias']);
if (is_string($queryData)) {
$queryData = array('section' => $queryData);
}
$conditions = array($DetailModel->alias . '.foreign_key' => $M... | [
"public",
"function",
"details",
"(",
"Model",
"$",
"Model",
",",
"$",
"queryData",
"=",
"null",
",",
"$",
"schema",
"=",
"false",
",",
"$",
"format",
"=",
"true",
")",
"{",
"$",
"DetailModel",
"=",
"ClassRegistry",
"::",
"init",
"(",
"$",
"this",
"-... | Custom method to find all attached details or by section.
@param Model $model Model to query.
@param string $func
@param string $state Either "before" or "after"
@param array $query
@param array $result
@return array | [
"Custom",
"method",
"to",
"find",
"all",
"attached",
"details",
"or",
"by",
"section",
"."
] | 53ad4e919c51606dc81f2c716267d01ee768ade5 | https://github.com/gourmet/common/blob/53ad4e919c51606dc81f2c716267d01ee768ade5/Model/Behavior/DetailableBehavior.php#L186-L214 |
6,925 | znframework/package-generator | Databases.php | Databases.setActiveDatabaseEncoding | protected function setActiveDatabaseEncoding(&$encoding)
{
if( stristr('pdo:mysql|mysqli', Config::get('Database', 'database')['driver']) )
{
$encoding = $this->db->encoding();
}
else
{
$encoding = NULL;
}
} | php | protected function setActiveDatabaseEncoding(&$encoding)
{
if( stristr('pdo:mysql|mysqli', Config::get('Database', 'database')['driver']) )
{
$encoding = $this->db->encoding();
}
else
{
$encoding = NULL;
}
} | [
"protected",
"function",
"setActiveDatabaseEncoding",
"(",
"&",
"$",
"encoding",
")",
"{",
"if",
"(",
"stristr",
"(",
"'pdo:mysql|mysqli'",
",",
"Config",
"::",
"get",
"(",
"'Database'",
",",
"'database'",
")",
"[",
"'driver'",
"]",
")",
")",
"{",
"$",
"en... | Protected set active database encoding | [
"Protected",
"set",
"active",
"database",
"encoding"
] | 4524c28c607d8a5799b60bd39bee8be4fd1e7fba | https://github.com/znframework/package-generator/blob/4524c28c607d8a5799b60bd39bee8be4fd1e7fba/Databases.php#L60-L70 |
6,926 | znframework/package-generator | Databases.php | Databases.addIdColumnToActiveTableIfNotExists | protected function addIdColumnToActiveTableIfNotExists(&$activeTable)
{
if( ! array_key_exists('id', $activeTable) )
{
$activeTable = array_merge
([
'id' => [$this->db->int(11), $this->db->notNull(), $this->db->autoIncrement(), $this->db->primaryKey()]
... | php | protected function addIdColumnToActiveTableIfNotExists(&$activeTable)
{
if( ! array_key_exists('id', $activeTable) )
{
$activeTable = array_merge
([
'id' => [$this->db->int(11), $this->db->notNull(), $this->db->autoIncrement(), $this->db->primaryKey()]
... | [
"protected",
"function",
"addIdColumnToActiveTableIfNotExists",
"(",
"&",
"$",
"activeTable",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"'id'",
",",
"$",
"activeTable",
")",
")",
"{",
"$",
"activeTable",
"=",
"array_merge",
"(",
"[",
"'id'",
"=>",
"... | Protected add id column to active table if not exists | [
"Protected",
"add",
"id",
"column",
"to",
"active",
"table",
"if",
"not",
"exists"
] | 4524c28c607d8a5799b60bd39bee8be4fd1e7fba | https://github.com/znframework/package-generator/blob/4524c28c607d8a5799b60bd39bee8be4fd1e7fba/Databases.php#L139-L148 |
6,927 | znframework/package-generator | Databases.php | Databases.getActiveTableKeyAndColumns | protected function getActiveTableKeyAndColumns($columns, &$tableKey, &$tableColumns)
{
$pregGrepArray = preg_grep('/_000/', $columns);
$tableKey = strtolower(current($pregGrepArray));
$tableColumns = Arrays\RemoveElement::element($columns, $pregGrepArray);
} | php | protected function getActiveTableKeyAndColumns($columns, &$tableKey, &$tableColumns)
{
$pregGrepArray = preg_grep('/_000/', $columns);
$tableKey = strtolower(current($pregGrepArray));
$tableColumns = Arrays\RemoveElement::element($columns, $pregGrepArray);
} | [
"protected",
"function",
"getActiveTableKeyAndColumns",
"(",
"$",
"columns",
",",
"&",
"$",
"tableKey",
",",
"&",
"$",
"tableColumns",
")",
"{",
"$",
"pregGrepArray",
"=",
"preg_grep",
"(",
"'/_000/'",
",",
"$",
"columns",
")",
";",
"$",
"tableKey",
"=",
"... | Protected active table key and columns | [
"Protected",
"active",
"table",
"key",
"and",
"columns"
] | 4524c28c607d8a5799b60bd39bee8be4fd1e7fba | https://github.com/znframework/package-generator/blob/4524c28c607d8a5799b60bd39bee8be4fd1e7fba/Databases.php#L161-L166 |
6,928 | znframework/package-generator | Databases.php | Databases.dropColumnFromActiveTable | protected function dropColumnFromActiveTable($table, $key, $dbForge, &$status)
{
$dbForge->dropColumn($table, $key);
$status = true;
} | php | protected function dropColumnFromActiveTable($table, $key, $dbForge, &$status)
{
$dbForge->dropColumn($table, $key);
$status = true;
} | [
"protected",
"function",
"dropColumnFromActiveTable",
"(",
"$",
"table",
",",
"$",
"key",
",",
"$",
"dbForge",
",",
"&",
"$",
"status",
")",
"{",
"$",
"dbForge",
"->",
"dropColumn",
"(",
"$",
"table",
",",
"$",
"key",
")",
";",
"$",
"status",
"=",
"t... | Protected drop column from active table | [
"Protected",
"drop",
"column",
"from",
"active",
"table"
] | 4524c28c607d8a5799b60bd39bee8be4fd1e7fba | https://github.com/znframework/package-generator/blob/4524c28c607d8a5799b60bd39bee8be4fd1e7fba/Databases.php#L179-L183 |
6,929 | znframework/package-generator | Databases.php | Databases.modifyColumnFromActiveTable | protected function modifyColumnFromActiveTable($table, $key, $val, $dbForge, &$status, $active, $current)
{
if( $active !== $current )
{
$dbForge->modifyColumn($table, [$key => $val]);
$status = true;
}
else
{
$status = false;
}
... | php | protected function modifyColumnFromActiveTable($table, $key, $val, $dbForge, &$status, $active, $current)
{
if( $active !== $current )
{
$dbForge->modifyColumn($table, [$key => $val]);
$status = true;
}
else
{
$status = false;
}
... | [
"protected",
"function",
"modifyColumnFromActiveTable",
"(",
"$",
"table",
",",
"$",
"key",
",",
"$",
"val",
",",
"$",
"dbForge",
",",
"&",
"$",
"status",
",",
"$",
"active",
",",
"$",
"current",
")",
"{",
"if",
"(",
"$",
"active",
"!==",
"$",
"curre... | Protected modify column from active table | [
"Protected",
"modify",
"column",
"from",
"active",
"table"
] | 4524c28c607d8a5799b60bd39bee8be4fd1e7fba | https://github.com/znframework/package-generator/blob/4524c28c607d8a5799b60bd39bee8be4fd1e7fba/Databases.php#L188-L199 |
6,930 | znframework/package-generator | Databases.php | Databases.addColumnFromActiveTable | protected function addColumnFromActiveTable($table, $key, $val, $dbForge, &$status)
{
$dbForge->addColumn($table, [$key => $val]);
$status = true;
} | php | protected function addColumnFromActiveTable($table, $key, $val, $dbForge, &$status)
{
$dbForge->addColumn($table, [$key => $val]);
$status = true;
} | [
"protected",
"function",
"addColumnFromActiveTable",
"(",
"$",
"table",
",",
"$",
"key",
",",
"$",
"val",
",",
"$",
"dbForge",
",",
"&",
"$",
"status",
")",
"{",
"$",
"dbForge",
"->",
"addColumn",
"(",
"$",
"table",
",",
"[",
"$",
"key",
"=>",
"$",
... | Protected add column from active table | [
"Protected",
"add",
"column",
"from",
"active",
"table"
] | 4524c28c607d8a5799b60bd39bee8be4fd1e7fba | https://github.com/znframework/package-generator/blob/4524c28c607d8a5799b60bd39bee8be4fd1e7fba/Databases.php#L204-L208 |
6,931 | znframework/package-generator | Databases.php | Databases.active | protected function active()
{
if( empty($activeDatabaseList = $this->getActiveDatabaseList()) )
{
return false;
}
$this->setActiveDatabaseEncoding($encoding);
$status = false;
$tableKeyColumnDesignData = $this->getTableKeyColumnDesignData();
... | php | protected function active()
{
if( empty($activeDatabaseList = $this->getActiveDatabaseList()) )
{
return false;
}
$this->setActiveDatabaseEncoding($encoding);
$status = false;
$tableKeyColumnDesignData = $this->getTableKeyColumnDesignData();
... | [
"protected",
"function",
"active",
"(",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"activeDatabaseList",
"=",
"$",
"this",
"->",
"getActiveDatabaseList",
"(",
")",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"this",
"->",
"setActiveDatabaseEncoding",
"("... | Protected Actives Databases | [
"Protected",
"Actives",
"Databases"
] | 4524c28c607d8a5799b60bd39bee8be4fd1e7fba | https://github.com/znframework/package-generator/blob/4524c28c607d8a5799b60bd39bee8be4fd1e7fba/Databases.php#L213-L281 |
6,932 | znframework/package-generator | Databases.php | Databases.addTableToArchive | protected function addTableToArchive($database, $table)
{
$this->createArchiveDatabaseDirectoryIfNotExists($database);
file_put_contents
(
$this->getArchiveTableFilePath($path = $database . '/' . $table),
$this->getActiveTableFileContent($path)
);
} | php | protected function addTableToArchive($database, $table)
{
$this->createArchiveDatabaseDirectoryIfNotExists($database);
file_put_contents
(
$this->getArchiveTableFilePath($path = $database . '/' . $table),
$this->getActiveTableFileContent($path)
);
} | [
"protected",
"function",
"addTableToArchive",
"(",
"$",
"database",
",",
"$",
"table",
")",
"{",
"$",
"this",
"->",
"createArchiveDatabaseDirectoryIfNotExists",
"(",
"$",
"database",
")",
";",
"file_put_contents",
"(",
"$",
"this",
"->",
"getArchiveTableFilePath",
... | Protected add table to archive | [
"Protected",
"add",
"table",
"to",
"archive"
] | 4524c28c607d8a5799b60bd39bee8be4fd1e7fba | https://github.com/znframework/package-generator/blob/4524c28c607d8a5799b60bd39bee8be4fd1e7fba/Databases.php#L286-L295 |
6,933 | znframework/package-generator | Databases.php | Databases.createArchiveDatabaseDirectoryIfNotExists | protected function createArchiveDatabaseDirectoryIfNotExists($database)
{
$path = $this->archivesPath . $database . '/';
if( ! is_dir($path) )
{
Filesystem::createFolder($path);
}
} | php | protected function createArchiveDatabaseDirectoryIfNotExists($database)
{
$path = $this->archivesPath . $database . '/';
if( ! is_dir($path) )
{
Filesystem::createFolder($path);
}
} | [
"protected",
"function",
"createArchiveDatabaseDirectoryIfNotExists",
"(",
"$",
"database",
")",
"{",
"$",
"path",
"=",
"$",
"this",
"->",
"archivesPath",
".",
"$",
"database",
".",
"'/'",
";",
"if",
"(",
"!",
"is_dir",
"(",
"$",
"path",
")",
")",
"{",
"... | Protected create archive database directory if not exists | [
"Protected",
"create",
"archive",
"database",
"directory",
"if",
"not",
"exists"
] | 4524c28c607d8a5799b60bd39bee8be4fd1e7fba | https://github.com/znframework/package-generator/blob/4524c28c607d8a5799b60bd39bee8be4fd1e7fba/Databases.php#L316-L324 |
6,934 | znframework/package-generator | Databases.php | Databases.getArchiveDatabaseTableList | protected function getArchiveDatabaseTableList($database)
{
$databasePath = $this->archivesPath . $database . '/';
$tables = Filesystem::getFiles($databasePath, 'php');
$pregGrep = preg_grep("/\_[0-9]*\.php/", $tables);
return Arrays\RemoveElement::element($tables, $pregG... | php | protected function getArchiveDatabaseTableList($database)
{
$databasePath = $this->archivesPath . $database . '/';
$tables = Filesystem::getFiles($databasePath, 'php');
$pregGrep = preg_grep("/\_[0-9]*\.php/", $tables);
return Arrays\RemoveElement::element($tables, $pregG... | [
"protected",
"function",
"getArchiveDatabaseTableList",
"(",
"$",
"database",
")",
"{",
"$",
"databasePath",
"=",
"$",
"this",
"->",
"archivesPath",
".",
"$",
"database",
".",
"'/'",
";",
"$",
"tables",
"=",
"Filesystem",
"::",
"getFiles",
"(",
"$",
"databas... | Protected get archive database table list | [
"Protected",
"get",
"archive",
"database",
"table",
"list"
] | 4524c28c607d8a5799b60bd39bee8be4fd1e7fba | https://github.com/znframework/package-generator/blob/4524c28c607d8a5799b60bd39bee8be4fd1e7fba/Databases.php#L329-L337 |
6,935 | znframework/package-generator | Databases.php | Databases.archive | protected function archive()
{
if( $archiveDatabaseList = $this->getArchiveDatabaseList() )
{
foreach( $archiveDatabaseList as $database )
{
if( ! empty($tables = $this->getArchiveDatabaseTableList($database)) )
{
$dbForge =... | php | protected function archive()
{
if( $archiveDatabaseList = $this->getArchiveDatabaseList() )
{
foreach( $archiveDatabaseList as $database )
{
if( ! empty($tables = $this->getArchiveDatabaseTableList($database)) )
{
$dbForge =... | [
"protected",
"function",
"archive",
"(",
")",
"{",
"if",
"(",
"$",
"archiveDatabaseList",
"=",
"$",
"this",
"->",
"getArchiveDatabaseList",
"(",
")",
")",
"{",
"foreach",
"(",
"$",
"archiveDatabaseList",
"as",
"$",
"database",
")",
"{",
"if",
"(",
"!",
"... | Protected Archives Database | [
"Protected",
"Archives",
"Database"
] | 4524c28c607d8a5799b60bd39bee8be4fd1e7fba | https://github.com/znframework/package-generator/blob/4524c28c607d8a5799b60bd39bee8be4fd1e7fba/Databases.php#L342-L370 |
6,936 | n0m4dz/laracasa | Zend/Gdata/YouTube/PlaylistListEntry.php | Zend_Gdata_YouTube_PlaylistListEntry.setDescription | public function setDescription($description = null)
{
if ($this->getMajorProtocolVersion() >= 2) {
$this->setSummary($description);
} else {
$this->_description = $description;
}
return $this;
} | php | public function setDescription($description = null)
{
if ($this->getMajorProtocolVersion() >= 2) {
$this->setSummary($description);
} else {
$this->_description = $description;
}
return $this;
} | [
"public",
"function",
"setDescription",
"(",
"$",
"description",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getMajorProtocolVersion",
"(",
")",
">=",
"2",
")",
"{",
"$",
"this",
"->",
"setSummary",
"(",
"$",
"description",
")",
";",
"}",
"el... | Sets the description relating to the playlist.
@deprecated Deprecated as of version 2 of the YouTube API.
@param Zend_Gdata_YouTube_Extension_Description $description The description relating to the video
@return Zend_Gdata_YouTube_PlaylistListEntry Provides a fluent interface | [
"Sets",
"the",
"description",
"relating",
"to",
"the",
"playlist",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/YouTube/PlaylistListEntry.php#L183-L191 |
6,937 | n0m4dz/laracasa | Zend/Gdata/YouTube/PlaylistListEntry.php | Zend_Gdata_YouTube_PlaylistListEntry.getPlaylistVideoFeedUrl | public function getPlaylistVideoFeedUrl()
{
if ($this->getMajorProtocolVersion() >= 2) {
return $this->getContent()->getSrc();
} else {
return $this->getFeedLink(Zend_Gdata_YouTube::PLAYLIST_REL)->href;
}
} | php | public function getPlaylistVideoFeedUrl()
{
if ($this->getMajorProtocolVersion() >= 2) {
return $this->getContent()->getSrc();
} else {
return $this->getFeedLink(Zend_Gdata_YouTube::PLAYLIST_REL)->href;
}
} | [
"public",
"function",
"getPlaylistVideoFeedUrl",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getMajorProtocolVersion",
"(",
")",
">=",
"2",
")",
"{",
"return",
"$",
"this",
"->",
"getContent",
"(",
")",
"->",
"getSrc",
"(",
")",
";",
"}",
"else",
"{"... | Returns the URL of the playlist video feed
@return string The URL of the playlist video feed | [
"Returns",
"the",
"URL",
"of",
"the",
"playlist",
"video",
"feed"
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/YouTube/PlaylistListEntry.php#L291-L298 |
6,938 | faithmade/rock | inc/customizer.php | Rock_Customizer.selective_refresh | public function selective_refresh( WP_Customize_Manager $wp_customize ) {
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
if ( ... | php | public function selective_refresh( WP_Customize_Manager $wp_customize ) {
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
if ( ... | [
"public",
"function",
"selective_refresh",
"(",
"WP_Customize_Manager",
"$",
"wp_customize",
")",
"{",
"$",
"wp_customize",
"->",
"get_setting",
"(",
"'blogname'",
")",
"->",
"transport",
"=",
"'postMessage'",
";",
"$",
"wp_customize",
"->",
"get_setting",
"(",
"'... | Adds postMessage support for site title and description for the Customizer.
@action customize_register
@since 1.0.0
@uses $this->blogname()
@uses $this->blogdescription()
@param WP_Customize_Manager $wp_customize | [
"Adds",
"postMessage",
"support",
"for",
"site",
"title",
"and",
"description",
"for",
"the",
"Customizer",
"."
] | 2a95ae1ed38cff3d0c20e21530bac30734e434ce | https://github.com/faithmade/rock/blob/2a95ae1ed38cff3d0c20e21530bac30734e434ce/inc/customizer.php#L92-L122 |
6,939 | faithmade/rock | inc/customizer.php | Rock_Customizer.parse_css_rules | public static function parse_css_rules( array $rules ) {
ob_start();
foreach ( $rules as $rule => $properties ) {
printf(
"%s {\n",
implode( ",\n", array_map( 'trim', explode( ',', $rule ) ) )
);
foreach ( $properties as $property => $value ) {
printf( "\t%s: %s;\n", $property, $value );
... | php | public static function parse_css_rules( array $rules ) {
ob_start();
foreach ( $rules as $rule => $properties ) {
printf(
"%s {\n",
implode( ",\n", array_map( 'trim', explode( ',', $rule ) ) )
);
foreach ( $properties as $property => $value ) {
printf( "\t%s: %s;\n", $property, $value );
... | [
"public",
"static",
"function",
"parse_css_rules",
"(",
"array",
"$",
"rules",
")",
"{",
"ob_start",
"(",
")",
";",
"foreach",
"(",
"$",
"rules",
"as",
"$",
"rule",
"=>",
"$",
"properties",
")",
"{",
"printf",
"(",
"\"%s {\\n\"",
",",
"implode",
"(",
"... | Return an array of CSS rules as plain CSS.
@since 1.0.0
@param array $rules
@return string | [
"Return",
"an",
"array",
"of",
"CSS",
"rules",
"as",
"plain",
"CSS",
"."
] | 2a95ae1ed38cff3d0c20e21530bac30734e434ce | https://github.com/faithmade/rock/blob/2a95ae1ed38cff3d0c20e21530bac30734e434ce/inc/customizer.php#L204-L227 |
6,940 | SolidWorx/Util | src/ArrayUtil.php | ArrayUtil.column | public static function column($array, string $column, bool $filter = true): array
{
if (!is_array($array) && !$array instanceof \Traversable) {
throw new \Exception(sprintf('Array or instance of Traversable expected, "%s" given', gettype($array)));
}
$filterFunc = function (arra... | php | public static function column($array, string $column, bool $filter = true): array
{
if (!is_array($array) && !$array instanceof \Traversable) {
throw new \Exception(sprintf('Array or instance of Traversable expected, "%s" given', gettype($array)));
}
$filterFunc = function (arra... | [
"public",
"static",
"function",
"column",
"(",
"$",
"array",
",",
"string",
"$",
"column",
",",
"bool",
"$",
"filter",
"=",
"true",
")",
":",
"array",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"array",
")",
"&&",
"!",
"$",
"array",
"instanceof",
"... | Returns a specific column from an array.
@param array|\Traversable $array
@param string $column
@param bool $filter To filter out empty values
@return array
@throws \Exception | [
"Returns",
"a",
"specific",
"column",
"from",
"an",
"array",
"."
] | e7f4d1d3b701a2b8364d6a5c5a5ef35ed18b1592 | https://github.com/SolidWorx/Util/blob/e7f4d1d3b701a2b8364d6a5c5a5ef35ed18b1592/src/ArrayUtil.php#L31-L65 |
6,941 | weavephp/middleware-relay | src/Relay.php | Relay.executePipeline | public function executePipeline($pipeline, Request $request, Response $response = null)
{
$relayBuilder = new \Relay\RelayBuilder($this->resolver);
$relay = $relayBuilder->newInstance($pipeline);
return $relay($request, $response);
} | php | public function executePipeline($pipeline, Request $request, Response $response = null)
{
$relayBuilder = new \Relay\RelayBuilder($this->resolver);
$relay = $relayBuilder->newInstance($pipeline);
return $relay($request, $response);
} | [
"public",
"function",
"executePipeline",
"(",
"$",
"pipeline",
",",
"Request",
"$",
"request",
",",
"Response",
"$",
"response",
"=",
"null",
")",
"{",
"$",
"relayBuilder",
"=",
"new",
"\\",
"Relay",
"\\",
"RelayBuilder",
"(",
"$",
"this",
"->",
"resolver"... | Trigger execution of the supplied pipeline through Relay.
@param mixed $pipeline The stack of middleware definitions.
@param Request $request The PSR7 request.
@param Response $response The PSR7 response (for double-pass stacks).
@return Response | [
"Trigger",
"execution",
"of",
"the",
"supplied",
"pipeline",
"through",
"Relay",
"."
] | 09e12a05875f428dc7ada5b179e47775da2d12b3 | https://github.com/weavephp/middleware-relay/blob/09e12a05875f428dc7ada5b179e47775da2d12b3/src/Relay.php#L53-L58 |
6,942 | vitodtagliente/pure-routing | Router.php | Router.rule | public function rule($key, $regex){
if(!array_key_exists($key, $this->rules))
$this->rules[$key] = $regex;
} | php | public function rule($key, $regex){
if(!array_key_exists($key, $this->rules))
$this->rules[$key] = $regex;
} | [
"public",
"function",
"rule",
"(",
"$",
"key",
",",
"$",
"regex",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"key",
",",
"$",
"this",
"->",
"rules",
")",
")",
"$",
"this",
"->",
"rules",
"[",
"$",
"key",
"]",
"=",
"$",
"regex",
";"... | aggiungi una nuova regola | [
"aggiungi",
"una",
"nuova",
"regola"
] | f36396e20838464bf7ccd4b34ef5660cdb255ae1 | https://github.com/vitodtagliente/pure-routing/blob/f36396e20838464bf7ccd4b34ef5660cdb255ae1/Router.php#L33-L36 |
6,943 | vitodtagliente/pure-routing | Router.php | Router.namespace | public function namespace($key, $value){
if(!array_key_exists($key, $this->namespaces))
$this->namespaces[$key] = $value;
} | php | public function namespace($key, $value){
if(!array_key_exists($key, $this->namespaces))
$this->namespaces[$key] = $value;
} | [
"public",
"function",
"namespace",
"(",
"$",
"key",
",",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"key",
",",
"$",
"this",
"->",
"namespaces",
")",
")",
"$",
"this",
"->",
"namespaces",
"[",
"$",
"key",
"]",
"=",
"$",
... | aggiungi un nuovo namespace | [
"aggiungi",
"un",
"nuovo",
"namespace"
] | f36396e20838464bf7ccd4b34ef5660cdb255ae1 | https://github.com/vitodtagliente/pure-routing/blob/f36396e20838464bf7ccd4b34ef5660cdb255ae1/Router.php#L39-L42 |
6,944 | vitodtagliente/pure-routing | Router.php | Router.map | public function map($method, $action, $callback){
$route = new Route($method, $action, $callback);
array_push($this->routes, $route);
return $route;
} | php | public function map($method, $action, $callback){
$route = new Route($method, $action, $callback);
array_push($this->routes, $route);
return $route;
} | [
"public",
"function",
"map",
"(",
"$",
"method",
",",
"$",
"action",
",",
"$",
"callback",
")",
"{",
"$",
"route",
"=",
"new",
"Route",
"(",
"$",
"method",
",",
"$",
"action",
",",
"$",
"callback",
")",
";",
"array_push",
"(",
"$",
"this",
"->",
... | mappature delle richieste | [
"mappature",
"delle",
"richieste"
] | f36396e20838464bf7ccd4b34ef5660cdb255ae1 | https://github.com/vitodtagliente/pure-routing/blob/f36396e20838464bf7ccd4b34ef5660cdb255ae1/Router.php#L45-L49 |
6,945 | vitodtagliente/pure-routing | Router.php | Router.uri | public function uri(){
$basepath = implode('/', array_slice(explode('/', $_SERVER['SCRIPT_NAME']), 0, -1)) . '/';
$uri = substr($_SERVER['REQUEST_URI'], strlen($basepath));
if (strstr($uri, '?')) $uri = substr($uri, 0, strpos($uri, '?'));
$uri = '/' . trim($uri, '/');
return $uri... | php | public function uri(){
$basepath = implode('/', array_slice(explode('/', $_SERVER['SCRIPT_NAME']), 0, -1)) . '/';
$uri = substr($_SERVER['REQUEST_URI'], strlen($basepath));
if (strstr($uri, '?')) $uri = substr($uri, 0, strpos($uri, '?'));
$uri = '/' . trim($uri, '/');
return $uri... | [
"public",
"function",
"uri",
"(",
")",
"{",
"$",
"basepath",
"=",
"implode",
"(",
"'/'",
",",
"array_slice",
"(",
"explode",
"(",
"'/'",
",",
"$",
"_SERVER",
"[",
"'SCRIPT_NAME'",
"]",
")",
",",
"0",
",",
"-",
"1",
")",
")",
".",
"'/'",
";",
"$",... | ritorna l'uri corrente | [
"ritorna",
"l",
"uri",
"corrente"
] | f36396e20838464bf7ccd4b34ef5660cdb255ae1 | https://github.com/vitodtagliente/pure-routing/blob/f36396e20838464bf7ccd4b34ef5660cdb255ae1/Router.php#L57-L63 |
6,946 | vitodtagliente/pure-routing | Router.php | Router.dispatch | public function dispatch()
{
// prendi l'uri corrente priva di argomenti get
$current_uri = $this->base_uri();
// memorizza il metodo corrente
$current_method = $this->method();
foreach($this->routes as $route)
{
// confronta l'uri corrente con
// la rotta, se corrispondono
// eseguila
if($ro... | php | public function dispatch()
{
// prendi l'uri corrente priva di argomenti get
$current_uri = $this->base_uri();
// memorizza il metodo corrente
$current_method = $this->method();
foreach($this->routes as $route)
{
// confronta l'uri corrente con
// la rotta, se corrispondono
// eseguila
if($ro... | [
"public",
"function",
"dispatch",
"(",
")",
"{",
"// prendi l'uri corrente priva di argomenti get",
"$",
"current_uri",
"=",
"$",
"this",
"->",
"base_uri",
"(",
")",
";",
"// memorizza il metodo corrente",
"$",
"current_method",
"=",
"$",
"this",
"->",
"method",
"("... | elaborazione della richiesta dell'utente | [
"elaborazione",
"della",
"richiesta",
"dell",
"utente"
] | f36396e20838464bf7ccd4b34ef5660cdb255ae1 | https://github.com/vitodtagliente/pure-routing/blob/f36396e20838464bf7ccd4b34ef5660cdb255ae1/Router.php#L80-L98 |
6,947 | allebb/clip | src/Utilities/ClassMethodHandler.php | ClassMethodHandler.call | public function call($params = null)
{
$method = $this->method;
if (!empty($this->constructor_arguments)) {
$instance = new $this->class($this->constructor_arguments);
} else {
$instance = new $this->class();
}
if (!is_null($params)) {
ret... | php | public function call($params = null)
{
$method = $this->method;
if (!empty($this->constructor_arguments)) {
$instance = new $this->class($this->constructor_arguments);
} else {
$instance = new $this->class();
}
if (!is_null($params)) {
ret... | [
"public",
"function",
"call",
"(",
"$",
"params",
"=",
"null",
")",
"{",
"$",
"method",
"=",
"$",
"this",
"->",
"method",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"constructor_arguments",
")",
")",
"{",
"$",
"instance",
"=",
"new",
"$"... | Calls the requested class and method name passing in the optional arguments.
@param mixed $params Optional parameters to pass to the class method.
@return void | [
"Calls",
"the",
"requested",
"class",
"and",
"method",
"name",
"passing",
"in",
"the",
"optional",
"arguments",
"."
] | a7963801a58406f49a1d441ac53ee4decca6db30 | https://github.com/allebb/clip/blob/a7963801a58406f49a1d441ac53ee4decca6db30/src/Utilities/ClassMethodHandler.php#L66-L79 |
6,948 | allebb/clip | src/Utilities/ClassMethodHandler.php | ClassMethodHandler.extract | private function extract($handler)
{
if (is_array($handler)) {
return $this->fromClassMethodArray($handler);
}
if (strpos($handler, self::CHAR_AT) !== false) {
return $this->fromAtNotation($handler);
}
if (strpos($handler, self::CHAR_DOT) !== false) {
... | php | private function extract($handler)
{
if (is_array($handler)) {
return $this->fromClassMethodArray($handler);
}
if (strpos($handler, self::CHAR_AT) !== false) {
return $this->fromAtNotation($handler);
}
if (strpos($handler, self::CHAR_DOT) !== false) {
... | [
"private",
"function",
"extract",
"(",
"$",
"handler",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"handler",
")",
")",
"{",
"return",
"$",
"this",
"->",
"fromClassMethodArray",
"(",
"$",
"handler",
")",
";",
"}",
"if",
"(",
"strpos",
"(",
"$",
"handl... | Extracts the class and method name.
@param string|array $handler The handler parameter
@return void | [
"Extracts",
"the",
"class",
"and",
"method",
"name",
"."
] | a7963801a58406f49a1d441ac53ee4decca6db30 | https://github.com/allebb/clip/blob/a7963801a58406f49a1d441ac53ee4decca6db30/src/Utilities/ClassMethodHandler.php#L86-L98 |
6,949 | allebb/clip | src/Utilities/ClassMethodHandler.php | ClassMethodHandler.validate | private function validate()
{
if (!class_exists($this->class)) {
throw new \RuntimeException(sprintf('Class %s does not exist, is this the correct namespace?', $this->class));
}
if (!in_array($this->method, get_class_methods($this->class))) {
throw new \RuntimeExcepti... | php | private function validate()
{
if (!class_exists($this->class)) {
throw new \RuntimeException(sprintf('Class %s does not exist, is this the correct namespace?', $this->class));
}
if (!in_array($this->method, get_class_methods($this->class))) {
throw new \RuntimeExcepti... | [
"private",
"function",
"validate",
"(",
")",
"{",
"if",
"(",
"!",
"class_exists",
"(",
"$",
"this",
"->",
"class",
")",
")",
"{",
"throw",
"new",
"\\",
"RuntimeException",
"(",
"sprintf",
"(",
"'Class %s does not exist, is this the correct namespace?'",
",",
"$"... | Validates that the current class and methods exist and are callable.
@return void
@throws \RuntimeException | [
"Validates",
"that",
"the",
"current",
"class",
"and",
"methods",
"exist",
"and",
"are",
"callable",
"."
] | a7963801a58406f49a1d441ac53ee4decca6db30 | https://github.com/allebb/clip/blob/a7963801a58406f49a1d441ac53ee4decca6db30/src/Utilities/ClassMethodHandler.php#L105-L113 |
6,950 | allebb/clip | src/Utilities/ClassMethodHandler.php | ClassMethodHandler.fromAtNotation | private function fromAtNotation($handler)
{
$parts = explode(self::CHAR_AT, $handler);
if (count($parts) != 2) {
throw new \InvalidArgumentException('Invalid Class Method format from "at" notation.');
}
$this->class = $parts[0];
$this->method = $parts[1];
} | php | private function fromAtNotation($handler)
{
$parts = explode(self::CHAR_AT, $handler);
if (count($parts) != 2) {
throw new \InvalidArgumentException('Invalid Class Method format from "at" notation.');
}
$this->class = $parts[0];
$this->method = $parts[1];
} | [
"private",
"function",
"fromAtNotation",
"(",
"$",
"handler",
")",
"{",
"$",
"parts",
"=",
"explode",
"(",
"self",
"::",
"CHAR_AT",
",",
"$",
"handler",
")",
";",
"if",
"(",
"count",
"(",
"$",
"parts",
")",
"!=",
"2",
")",
"{",
"throw",
"new",
"\\"... | Extracts the class name and method from the Class Method string in "@" notation (eg. Class@Method).
@param string|array $handler The handler parameter
@return void
@throws \InvalidArgumentException | [
"Extracts",
"the",
"class",
"name",
"and",
"method",
"from",
"the",
"Class",
"Method",
"string",
"in"
] | a7963801a58406f49a1d441ac53ee4decca6db30 | https://github.com/allebb/clip/blob/a7963801a58406f49a1d441ac53ee4decca6db30/src/Utilities/ClassMethodHandler.php#L121-L129 |
6,951 | FuturaSoft/Pabana | src/Type/ArrayType.php | ArrayType.remove | public function remove($indexOrName)
{
if (isset($this->arrayVar[$indexOrName])) {
unset($this->arrayVar[$indexOrName]);
return true;
}
return false;
} | php | public function remove($indexOrName)
{
if (isset($this->arrayVar[$indexOrName])) {
unset($this->arrayVar[$indexOrName]);
return true;
}
return false;
} | [
"public",
"function",
"remove",
"(",
"$",
"indexOrName",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"arrayVar",
"[",
"$",
"indexOrName",
"]",
")",
")",
"{",
"unset",
"(",
"$",
"this",
"->",
"arrayVar",
"[",
"$",
"indexOrName",
"]",
")",
... | Remove an item
@since 1.1
@param int|string $indexOrName Index or name of key
@return bool True if success or false if not exist | [
"Remove",
"an",
"item"
] | b3a95eeb976042ac2a393cc10755a7adbc164c24 | https://github.com/FuturaSoft/Pabana/blob/b3a95eeb976042ac2a393cc10755a7adbc164c24/src/Type/ArrayType.php#L240-L247 |
6,952 | FuturaSoft/Pabana | src/Type/ArrayType.php | ArrayType.set | public function set($indexOrName, $value, $force = true)
{
if (isset($this->arrayVar[$indexOrName]) && $force === false) {
return false;
}
$this->arrayVar[$indexOrName] = $value;
return true;
} | php | public function set($indexOrName, $value, $force = true)
{
if (isset($this->arrayVar[$indexOrName]) && $force === false) {
return false;
}
$this->arrayVar[$indexOrName] = $value;
return true;
} | [
"public",
"function",
"set",
"(",
"$",
"indexOrName",
",",
"$",
"value",
",",
"$",
"force",
"=",
"true",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"arrayVar",
"[",
"$",
"indexOrName",
"]",
")",
"&&",
"$",
"force",
"===",
"false",
")",
... | Define an item in Array
@since 1.1
@param int|string $indexOrName Index or name of key
@param mixed $value Value of item
@param bool $force Force change of value if key already exist
@return bool True if success or false if not exist | [
"Define",
"an",
"item",
"in",
"Array"
] | b3a95eeb976042ac2a393cc10755a7adbc164c24 | https://github.com/FuturaSoft/Pabana/blob/b3a95eeb976042ac2a393cc10755a7adbc164c24/src/Type/ArrayType.php#L258-L265 |
6,953 | FuturaSoft/Pabana | src/Type/ArrayType.php | ArrayType.sort | public function sort($order = self::SORT_ASC, $type = self::SORT_REGULAR, $caseSensitive = true)
{
if ($caseSensitive === false) {
$type = $type + SORT_FLAG_CASE;
}
if ($this->isAssociative() === true) {
if ($order == self::SORT_ASC) {
asort($this->arr... | php | public function sort($order = self::SORT_ASC, $type = self::SORT_REGULAR, $caseSensitive = true)
{
if ($caseSensitive === false) {
$type = $type + SORT_FLAG_CASE;
}
if ($this->isAssociative() === true) {
if ($order == self::SORT_ASC) {
asort($this->arr... | [
"public",
"function",
"sort",
"(",
"$",
"order",
"=",
"self",
"::",
"SORT_ASC",
",",
"$",
"type",
"=",
"self",
"::",
"SORT_REGULAR",
",",
"$",
"caseSensitive",
"=",
"true",
")",
"{",
"if",
"(",
"$",
"caseSensitive",
"===",
"false",
")",
"{",
"$",
"ty... | Sort an array by value
@since 1.1
@param int $order Sort order (SORT_ASC or SORT_DESC)
@param int $type Sort type (SORT_REGULAR, SORT_NUMERIC, SORT_STRING, SORT_LOCALE_STRING or SORT_NATURAL)
@param bool $caseSensitive Define if sort is case sensitive
@return $this Return current object | [
"Sort",
"an",
"array",
"by",
"value"
] | b3a95eeb976042ac2a393cc10755a7adbc164c24 | https://github.com/FuturaSoft/Pabana/blob/b3a95eeb976042ac2a393cc10755a7adbc164c24/src/Type/ArrayType.php#L276-L296 |
6,954 | FuturaSoft/Pabana | src/Type/ArrayType.php | ArrayType.sortByKey | public function sortByKey($order = self::SORT_ASC, $type = self::SORT_REGULAR, $caseSensitive = true)
{
if ($caseSensitive === false) {
$type = $type + SORT_FLAG_CASE;
}
if ($this->isAssociative() === true) {
array_multisort(array_keys($this->arrayVar), $order, $type,... | php | public function sortByKey($order = self::SORT_ASC, $type = self::SORT_REGULAR, $caseSensitive = true)
{
if ($caseSensitive === false) {
$type = $type + SORT_FLAG_CASE;
}
if ($this->isAssociative() === true) {
array_multisort(array_keys($this->arrayVar), $order, $type,... | [
"public",
"function",
"sortByKey",
"(",
"$",
"order",
"=",
"self",
"::",
"SORT_ASC",
",",
"$",
"type",
"=",
"self",
"::",
"SORT_REGULAR",
",",
"$",
"caseSensitive",
"=",
"true",
")",
"{",
"if",
"(",
"$",
"caseSensitive",
"===",
"false",
")",
"{",
"$",
... | Sort an array by key
@since 1.1
@param int $order Sort order (SORT_ASC or SORT_DESC)
@param int $type Sort type (SORT_REGULAR, SORT_NUMERIC, SORT_STRING, SORT_LOCALE_STRING or SORT_NATURAL)
@param bool $caseSensitive Define if sort is case sensitive
@return $this Return current object | [
"Sort",
"an",
"array",
"by",
"key"
] | b3a95eeb976042ac2a393cc10755a7adbc164c24 | https://github.com/FuturaSoft/Pabana/blob/b3a95eeb976042ac2a393cc10755a7adbc164c24/src/Type/ArrayType.php#L307-L322 |
6,955 | tweedegolf/generator | src/TweedeGolf/Generator/Console/Questioner.php | Questioner.update | public function update(Arguments $arguments, $property, $type, array $options = [])
{
if (!isset($arguments[$property]) || (isset($options['force']) && $options['force'])) {
$this->set($arguments, $property, $type, $options);
}
} | php | public function update(Arguments $arguments, $property, $type, array $options = [])
{
if (!isset($arguments[$property]) || (isset($options['force']) && $options['force'])) {
$this->set($arguments, $property, $type, $options);
}
} | [
"public",
"function",
"update",
"(",
"Arguments",
"$",
"arguments",
",",
"$",
"property",
",",
"$",
"type",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"arguments",
"[",
"$",
"property",
"]",
")",
"||",... | Set the value of a property in arguments to the value interactively retrieved if it wasn't set previously.
Will also forcefully request an update for the property if the option 'force' is set.
@param Arguments $arguments
@param string $property
@param string|InputTypeInterface $type
@... | [
"Set",
"the",
"value",
"of",
"a",
"property",
"in",
"arguments",
"to",
"the",
"value",
"interactively",
"retrieved",
"if",
"it",
"wasn",
"t",
"set",
"previously",
".",
"Will",
"also",
"forcefully",
"request",
"an",
"update",
"for",
"the",
"property",
"if",
... | f931d659ddf6a531ebf00bbfc11d417c527cd21b | https://github.com/tweedegolf/generator/blob/f931d659ddf6a531ebf00bbfc11d417c527cd21b/src/TweedeGolf/Generator/Console/Questioner.php#L115-L120 |
6,956 | tweedegolf/generator | src/TweedeGolf/Generator/Console/Questioner.php | Questioner.set | public function set(Arguments $arguments, $property, $type, array $options = [])
{
$options = $this->validateAndUpdateOptions($options, $type);
$constraints = [];
if (is_array($this->constraints) && isset($this->constraints[$property])) {
$constraints = $this->constraints[$proper... | php | public function set(Arguments $arguments, $property, $type, array $options = [])
{
$options = $this->validateAndUpdateOptions($options, $type);
$constraints = [];
if (is_array($this->constraints) && isset($this->constraints[$property])) {
$constraints = $this->constraints[$proper... | [
"public",
"function",
"set",
"(",
"Arguments",
"$",
"arguments",
",",
"$",
"property",
",",
"$",
"type",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"options",
"=",
"$",
"this",
"->",
"validateAndUpdateOptions",
"(",
"$",
"options",
","... | Set the value of a property in arguments to the value interactively retrieved.
@param Arguments $arguments
@param string $property
@param string|InputTypeInterface $type
@param array $options | [
"Set",
"the",
"value",
"of",
"a",
"property",
"in",
"arguments",
"to",
"the",
"value",
"interactively",
"retrieved",
"."
] | f931d659ddf6a531ebf00bbfc11d417c527cd21b | https://github.com/tweedegolf/generator/blob/f931d659ddf6a531ebf00bbfc11d417c527cd21b/src/TweedeGolf/Generator/Console/Questioner.php#L129-L146 |
6,957 | tweedegolf/generator | src/TweedeGolf/Generator/Console/Questioner.php | Questioner.validateAndUpdateOptions | private function validateAndUpdateOptions(array $options, $type)
{
if (is_string($type)) {
$type = $this->types->getType($type);
}
if (!($type instanceof InputTypeInterface)) {
throw new InputTypeNotFoundException("Type should be an instance of InputTypeInterface or ... | php | private function validateAndUpdateOptions(array $options, $type)
{
if (is_string($type)) {
$type = $this->types->getType($type);
}
if (!($type instanceof InputTypeInterface)) {
throw new InputTypeNotFoundException("Type should be an instance of InputTypeInterface or ... | [
"private",
"function",
"validateAndUpdateOptions",
"(",
"array",
"$",
"options",
",",
"$",
"type",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"type",
")",
")",
"{",
"$",
"type",
"=",
"$",
"this",
"->",
"types",
"->",
"getType",
"(",
"$",
"type",
")"... | Validate options does not contain non-existant options and update with defaults where not defined.
@param array $options
@param string|InputTypeInterface $type
@return array
@throws InvalidInputException
@throws InputTypeNotFoundException | [
"Validate",
"options",
"does",
"not",
"contain",
"non",
"-",
"existant",
"options",
"and",
"update",
"with",
"defaults",
"where",
"not",
"defined",
"."
] | f931d659ddf6a531ebf00bbfc11d417c527cd21b | https://github.com/tweedegolf/generator/blob/f931d659ddf6a531ebf00bbfc11d417c527cd21b/src/TweedeGolf/Generator/Console/Questioner.php#L156-L176 |
6,958 | tweedegolf/generator | src/TweedeGolf/Generator/Console/Questioner.php | Questioner.getDefaultOptions | private function getDefaultOptions(InputTypeInterface $type)
{
return array_merge([
'force' => false,
'property' => '',
'constraints' => null,
'required' => false,
'default' => null,
'modify' => null,
], $type->getDefaultOptions... | php | private function getDefaultOptions(InputTypeInterface $type)
{
return array_merge([
'force' => false,
'property' => '',
'constraints' => null,
'required' => false,
'default' => null,
'modify' => null,
], $type->getDefaultOptions... | [
"private",
"function",
"getDefaultOptions",
"(",
"InputTypeInterface",
"$",
"type",
")",
"{",
"return",
"array_merge",
"(",
"[",
"'force'",
"=>",
"false",
",",
"'property'",
"=>",
"''",
",",
"'constraints'",
"=>",
"null",
",",
"'required'",
"=>",
"false",
",",... | Return the default options for the InputTypeInterface combined with the default options
required by the questioner.
@param InputTypeInterface $type
@return array | [
"Return",
"the",
"default",
"options",
"for",
"the",
"InputTypeInterface",
"combined",
"with",
"the",
"default",
"options",
"required",
"by",
"the",
"questioner",
"."
] | f931d659ddf6a531ebf00bbfc11d417c527cd21b | https://github.com/tweedegolf/generator/blob/f931d659ddf6a531ebf00bbfc11d417c527cd21b/src/TweedeGolf/Generator/Console/Questioner.php#L184-L194 |
6,959 | tweedegolf/generator | src/TweedeGolf/Generator/Console/Questioner.php | Questioner.message | public function message($message, $lineWidth = 80, $style = 'info')
{
if (null === $lineWidth) {
$lineWidth = 80;
}
if (is_string($message)) {
$message = explode("\n", wordwrap($message, $lineWidth, "\n", true));
}
foreach ($message as $line) {
... | php | public function message($message, $lineWidth = 80, $style = 'info')
{
if (null === $lineWidth) {
$lineWidth = 80;
}
if (is_string($message)) {
$message = explode("\n", wordwrap($message, $lineWidth, "\n", true));
}
foreach ($message as $line) {
... | [
"public",
"function",
"message",
"(",
"$",
"message",
",",
"$",
"lineWidth",
"=",
"80",
",",
"$",
"style",
"=",
"'info'",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"lineWidth",
")",
"{",
"$",
"lineWidth",
"=",
"80",
";",
"}",
"if",
"(",
"is_string",... | Write a message in the given style, with line breaks at the given length.
@param string|array $message Message to be formatted.
@param int $lineWidth Maximum line width of the message.
@param string $style Style to be used for formatting the message. | [
"Write",
"a",
"message",
"in",
"the",
"given",
"style",
"with",
"line",
"breaks",
"at",
"the",
"given",
"length",
"."
] | f931d659ddf6a531ebf00bbfc11d417c527cd21b | https://github.com/tweedegolf/generator/blob/f931d659ddf6a531ebf00bbfc11d417c527cd21b/src/TweedeGolf/Generator/Console/Questioner.php#L227-L241 |
6,960 | setrun/setrun-component-sys | src/services/LanguageService.php | LanguageService.create | public function create(LanguageForm $form): Language
{
$model = Language::create(
$form->name,
$form->slug,
$form->locale,
$form->alias,
$form->icon
);
$this->assertIsUniqueSlug($model);
$this->repository->save($model);
... | php | public function create(LanguageForm $form): Language
{
$model = Language::create(
$form->name,
$form->slug,
$form->locale,
$form->alias,
$form->icon
);
$this->assertIsUniqueSlug($model);
$this->repository->save($model);
... | [
"public",
"function",
"create",
"(",
"LanguageForm",
"$",
"form",
")",
":",
"Language",
"{",
"$",
"model",
"=",
"Language",
"::",
"create",
"(",
"$",
"form",
"->",
"name",
",",
"$",
"form",
"->",
"slug",
",",
"$",
"form",
"->",
"locale",
",",
"$",
... | Language item create.
@param LanguageForm $form
@return Language | [
"Language",
"item",
"create",
"."
] | ad9a6442a2921e0f061ed4e455b050c56029d565 | https://github.com/setrun/setrun-component-sys/blob/ad9a6442a2921e0f061ed4e455b050c56029d565/src/services/LanguageService.php#L38-L50 |
6,961 | setrun/setrun-component-sys | src/services/LanguageService.php | LanguageService.edit | public function edit($id, LanguageForm $form): void
{
$model = $this->repository->get($id);
$model->edit(
$form->name,
$form->slug,
$form->locale,
$form->alias,
$form->icon
);
$this->assertIsUniqueSlug($model);
$this... | php | public function edit($id, LanguageForm $form): void
{
$model = $this->repository->get($id);
$model->edit(
$form->name,
$form->slug,
$form->locale,
$form->alias,
$form->icon
);
$this->assertIsUniqueSlug($model);
$this... | [
"public",
"function",
"edit",
"(",
"$",
"id",
",",
"LanguageForm",
"$",
"form",
")",
":",
"void",
"{",
"$",
"model",
"=",
"$",
"this",
"->",
"repository",
"->",
"get",
"(",
"$",
"id",
")",
";",
"$",
"model",
"->",
"edit",
"(",
"$",
"form",
"->",
... | Language item edit.
@param $id
@param LanguageForm $form
@return void | [
"Language",
"item",
"edit",
"."
] | ad9a6442a2921e0f061ed4e455b050c56029d565 | https://github.com/setrun/setrun-component-sys/blob/ad9a6442a2921e0f061ed4e455b050c56029d565/src/services/LanguageService.php#L58-L70 |
6,962 | infinity-se/infinity-base | src/InfinityBase/Mvc/View/Http/XhrListener.php | XhrListener.check | public function check(EventInterface $event)
{
// Check result
$result = $event->getResult();
if (!$result instanceof ViewModel) {
return;
}
// Check for xhr request
$request = $event->getRequest();
if ($request->isXmlHttpRequest()) {
... | php | public function check(EventInterface $event)
{
// Check result
$result = $event->getResult();
if (!$result instanceof ViewModel) {
return;
}
// Check for xhr request
$request = $event->getRequest();
if ($request->isXmlHttpRequest()) {
... | [
"public",
"function",
"check",
"(",
"EventInterface",
"$",
"event",
")",
"{",
"// Check result",
"$",
"result",
"=",
"$",
"event",
"->",
"getResult",
"(",
")",
";",
"if",
"(",
"!",
"$",
"result",
"instanceof",
"ViewModel",
")",
"{",
"return",
";",
"}",
... | Check for XmlHttpRequest
@param EventInterface $event | [
"Check",
"for",
"XmlHttpRequest"
] | 4f869ae4b549e779560a83528d2ed2664f6deb5b | https://github.com/infinity-se/infinity-base/blob/4f869ae4b549e779560a83528d2ed2664f6deb5b/src/InfinityBase/Mvc/View/Http/XhrListener.php#L45-L61 |
6,963 | helthe/Mandrill | Mailer/Mailer.php | Mailer.sendMessage | public function sendMessage($recipients, $sender, $subject, $content)
{
$this->client->sendMessage($this->createMessage($recipients, $sender, $subject, $content));
} | php | public function sendMessage($recipients, $sender, $subject, $content)
{
$this->client->sendMessage($this->createMessage($recipients, $sender, $subject, $content));
} | [
"public",
"function",
"sendMessage",
"(",
"$",
"recipients",
",",
"$",
"sender",
",",
"$",
"subject",
",",
"$",
"content",
")",
"{",
"$",
"this",
"->",
"client",
"->",
"sendMessage",
"(",
"$",
"this",
"->",
"createMessage",
"(",
"$",
"recipients",
",",
... | Send a transactional message.
@param mixed $recipients
@param mixed $sender
@param string $subject
@param string $content | [
"Send",
"a",
"transactional",
"message",
"."
] | 5d4ddd71079d9308e6d117311e96be1b9eb95637 | https://github.com/helthe/Mandrill/blob/5d4ddd71079d9308e6d117311e96be1b9eb95637/Mailer/Mailer.php#L29-L32 |
6,964 | anklimsk/cakephp-basic-functions | Vendor/langcode-conv/zendframework/zend-filter/src/Compress/Rar.php | Rar.setCallback | public function setCallback($callback)
{
if (!is_callable($callback)) {
throw new Exception\InvalidArgumentException('Invalid callback provided');
}
$this->options['callback'] = $callback;
return $this;
} | php | public function setCallback($callback)
{
if (!is_callable($callback)) {
throw new Exception\InvalidArgumentException('Invalid callback provided');
}
$this->options['callback'] = $callback;
return $this;
} | [
"public",
"function",
"setCallback",
"(",
"$",
"callback",
")",
"{",
"if",
"(",
"!",
"is_callable",
"(",
"$",
"callback",
")",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"InvalidArgumentException",
"(",
"'Invalid callback provided'",
")",
";",
"}",
"$",
"t... | Sets the callback to use
@param string $callback
@return self
@throws Exception\InvalidArgumentException if invalid callback provided | [
"Sets",
"the",
"callback",
"to",
"use"
] | 7554e8b0b420fd3155593af7bf76b7ccbdc8701e | https://github.com/anklimsk/cakephp-basic-functions/blob/7554e8b0b420fd3155593af7bf76b7ccbdc8701e/Vendor/langcode-conv/zendframework/zend-filter/src/Compress/Rar.php#L68-L76 |
6,965 | popy-dev/popy-calendar | src/Converter/UnixTimeConverter/Time.php | Time.convertMicrosecondsToTime | public function convertMicrosecondsToTime($time)
{
// Calculating day-ratio;
// Dividing microseconds per seconds results in the intended value
$ratio = intval($time / $this->dayLengthInSeconds);
// If using a different time format, apply ratio
$timeScale = array_product($th... | php | public function convertMicrosecondsToTime($time)
{
// Calculating day-ratio;
// Dividing microseconds per seconds results in the intended value
$ratio = intval($time / $this->dayLengthInSeconds);
// If using a different time format, apply ratio
$timeScale = array_product($th... | [
"public",
"function",
"convertMicrosecondsToTime",
"(",
"$",
"time",
")",
"{",
"// Calculating day-ratio;",
"// Dividing microseconds per seconds results in the intended value",
"$",
"ratio",
"=",
"intval",
"(",
"$",
"time",
"/",
"$",
"this",
"->",
"dayLengthInSeconds",
"... | Convert a time expressed in microseconds, into a Time object.
@param integer $time
@return TimeObject | [
"Convert",
"a",
"time",
"expressed",
"in",
"microseconds",
"into",
"a",
"Time",
"object",
"."
] | 989048be18451c813cfce926229c6aaddd1b0639 | https://github.com/popy-dev/popy-calendar/blob/989048be18451c813cfce926229c6aaddd1b0639/src/Converter/UnixTimeConverter/Time.php#L131-L155 |
6,966 | popy-dev/popy-calendar | src/Converter/UnixTimeConverter/Time.php | Time.convertTimeToMicroseconds | public function convertTimeToMicroseconds(TimeObject $time)
{
$meaningfull = $time->countMeaningfull() > 0;
// IF time had no meaningfull informations, fallback to a day ratio.
if (!$meaningfull && null !== $ratio = $time->getRatio()) {
return $ratio * $this->dayLengthInSeconds;... | php | public function convertTimeToMicroseconds(TimeObject $time)
{
$meaningfull = $time->countMeaningfull() > 0;
// IF time had no meaningfull informations, fallback to a day ratio.
if (!$meaningfull && null !== $ratio = $time->getRatio()) {
return $ratio * $this->dayLengthInSeconds;... | [
"public",
"function",
"convertTimeToMicroseconds",
"(",
"TimeObject",
"$",
"time",
")",
"{",
"$",
"meaningfull",
"=",
"$",
"time",
"->",
"countMeaningfull",
"(",
")",
">",
"0",
";",
"// IF time had no meaningfull informations, fallback to a day ratio.",
"if",
"(",
"!"... | Converts a "Time" into its value in its lower unit.
@param TimeObject $time
@return integer | [
"Converts",
"a",
"Time",
"into",
"its",
"value",
"in",
"its",
"lower",
"unit",
"."
] | 989048be18451c813cfce926229c6aaddd1b0639 | https://github.com/popy-dev/popy-calendar/blob/989048be18451c813cfce926229c6aaddd1b0639/src/Converter/UnixTimeConverter/Time.php#L164-L196 |
6,967 | easy-system/es-http | src/Factory/UriPathFactory.php | UriPathFactory.make | public static function make(array $server = null)
{
if (empty($server)) {
$server = $_SERVER;
}
if (isset($server['REQUEST_URI'])) {
return parse_url($server['REQUEST_URI'], PHP_URL_PATH);
}
} | php | public static function make(array $server = null)
{
if (empty($server)) {
$server = $_SERVER;
}
if (isset($server['REQUEST_URI'])) {
return parse_url($server['REQUEST_URI'], PHP_URL_PATH);
}
} | [
"public",
"static",
"function",
"make",
"(",
"array",
"$",
"server",
"=",
"null",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"server",
")",
")",
"{",
"$",
"server",
"=",
"$",
"_SERVER",
";",
"}",
"if",
"(",
"isset",
"(",
"$",
"server",
"[",
"'REQUES... | Makes a string with Uri path.
@param array $server Optional; null by default or empty array means
global $_SERVER. The source data
@return string|null Returns the Uri path if any, null otherwise | [
"Makes",
"a",
"string",
"with",
"Uri",
"path",
"."
] | dd5852e94901e147a7546a8715133408ece767a1 | https://github.com/easy-system/es-http/blob/dd5852e94901e147a7546a8715133408ece767a1/src/Factory/UriPathFactory.php#L25-L34 |
6,968 | wasabi-cms/cms | src/View/Helper/MetaHelper.php | MetaHelper.robots | public function robots($entity)
{
$robots = [];
$index = (bool)Configure::read('Settings.Cms.SEO.meta-robots-index');
if ($entity->meta_robots_index !== null) {
$index = $entity->meta_robots_index;
}
$robots[] = ($index) ? 'index' : 'noindex';
$follow = ... | php | public function robots($entity)
{
$robots = [];
$index = (bool)Configure::read('Settings.Cms.SEO.meta-robots-index');
if ($entity->meta_robots_index !== null) {
$index = $entity->meta_robots_index;
}
$robots[] = ($index) ? 'index' : 'noindex';
$follow = ... | [
"public",
"function",
"robots",
"(",
"$",
"entity",
")",
"{",
"$",
"robots",
"=",
"[",
"]",
";",
"$",
"index",
"=",
"(",
"bool",
")",
"Configure",
"::",
"read",
"(",
"'Settings.Cms.SEO.meta-robots-index'",
")",
";",
"if",
"(",
"$",
"entity",
"->",
"met... | Render the robots meta tag.
@param PublishableEntity $entity The entity, e.g. Page or Post.
@return string | [
"Render",
"the",
"robots",
"meta",
"tag",
"."
] | 2787b6422ea1d719cf49951b3253fd0ac31d22ca | https://github.com/wasabi-cms/cms/blob/2787b6422ea1d719cf49951b3253fd0ac31d22ca/src/View/Helper/MetaHelper.php#L92-L114 |
6,969 | wasabi-cms/cms | src/View/Helper/MetaHelper.php | MetaHelper.opengraph | public function opengraph($entity)
{
$attributes = [
'og:locale' => Wasabi::contentLanguage()->lang,
'og:type' => $entity->attributes['og:type'] ?? 'article',
'og:title' => $this->_getTitle($entity),
'og:description' => $entity->attributes['og:description'] ??... | php | public function opengraph($entity)
{
$attributes = [
'og:locale' => Wasabi::contentLanguage()->lang,
'og:type' => $entity->attributes['og:type'] ?? 'article',
'og:title' => $this->_getTitle($entity),
'og:description' => $entity->attributes['og:description'] ??... | [
"public",
"function",
"opengraph",
"(",
"$",
"entity",
")",
"{",
"$",
"attributes",
"=",
"[",
"'og:locale'",
"=>",
"Wasabi",
"::",
"contentLanguage",
"(",
")",
"->",
"lang",
",",
"'og:type'",
"=>",
"$",
"entity",
"->",
"attributes",
"[",
"'og:type'",
"]",
... | Render all og meta tags.
@param PublishableEntity $entity The entity, e.g. Page or Post.
@return string | [
"Render",
"all",
"og",
"meta",
"tags",
"."
] | 2787b6422ea1d719cf49951b3253fd0ac31d22ca | https://github.com/wasabi-cms/cms/blob/2787b6422ea1d719cf49951b3253fd0ac31d22ca/src/View/Helper/MetaHelper.php#L122-L152 |
6,970 | wasabi-cms/cms | src/View/Helper/MetaHelper.php | MetaHelper.twitter | public function twitter($entity)
{
$twitterName = Configure::read('Settings.Cms.SEO.Social.twitter_username');
if ($twitterName !== null) {
$twitterName = '@' . $twitterName;
}
$attributes = [
'twitter:card' => 'summary',
'twitter:title' => $this-... | php | public function twitter($entity)
{
$twitterName = Configure::read('Settings.Cms.SEO.Social.twitter_username');
if ($twitterName !== null) {
$twitterName = '@' . $twitterName;
}
$attributes = [
'twitter:card' => 'summary',
'twitter:title' => $this-... | [
"public",
"function",
"twitter",
"(",
"$",
"entity",
")",
"{",
"$",
"twitterName",
"=",
"Configure",
"::",
"read",
"(",
"'Settings.Cms.SEO.Social.twitter_username'",
")",
";",
"if",
"(",
"$",
"twitterName",
"!==",
"null",
")",
"{",
"$",
"twitterName",
"=",
"... | Render all twitter tags.
@param PublishableEntity $entity The entity, e.g. Page or Post.
@return string | [
"Render",
"all",
"twitter",
"tags",
"."
] | 2787b6422ea1d719cf49951b3253fd0ac31d22ca | https://github.com/wasabi-cms/cms/blob/2787b6422ea1d719cf49951b3253fd0ac31d22ca/src/View/Helper/MetaHelper.php#L160-L182 |
6,971 | wasabi-cms/cms | src/View/Helper/MetaHelper.php | MetaHelper.article | public function article($entity)
{
if (!$entity->displayArticleMetaTags) {
return '';
}
$attributes = [
'article:publisher' => Configure::read('Settings.Cms.SEO.Social.facebook_url'),
'article:tag' => '',
'article:section' => ''
];
... | php | public function article($entity)
{
if (!$entity->displayArticleMetaTags) {
return '';
}
$attributes = [
'article:publisher' => Configure::read('Settings.Cms.SEO.Social.facebook_url'),
'article:tag' => '',
'article:section' => ''
];
... | [
"public",
"function",
"article",
"(",
"$",
"entity",
")",
"{",
"if",
"(",
"!",
"$",
"entity",
"->",
"displayArticleMetaTags",
")",
"{",
"return",
"''",
";",
"}",
"$",
"attributes",
"=",
"[",
"'article:publisher'",
"=>",
"Configure",
"::",
"read",
"(",
"'... | Render all article meta tags.
@param PublishableEntity $entity The entity, e.g. Page or Post.
@return string | [
"Render",
"all",
"article",
"meta",
"tags",
"."
] | 2787b6422ea1d719cf49951b3253fd0ac31d22ca | https://github.com/wasabi-cms/cms/blob/2787b6422ea1d719cf49951b3253fd0ac31d22ca/src/View/Helper/MetaHelper.php#L190-L213 |
6,972 | wasabi-cms/cms | src/View/Helper/MetaHelper.php | MetaHelper.dcDateIssued | public function dcDateIssued($entity)
{
if (!$entity->displayMetaDates) {
return '';
}
$published = ($entity->published !== null) ? $entity->published->format('c') : null;
return $this->_render(self::ATTR_PROP, 'DC.date.issued', $published);
} | php | public function dcDateIssued($entity)
{
if (!$entity->displayMetaDates) {
return '';
}
$published = ($entity->published !== null) ? $entity->published->format('c') : null;
return $this->_render(self::ATTR_PROP, 'DC.date.issued', $published);
} | [
"public",
"function",
"dcDateIssued",
"(",
"$",
"entity",
")",
"{",
"if",
"(",
"!",
"$",
"entity",
"->",
"displayMetaDates",
")",
"{",
"return",
"''",
";",
"}",
"$",
"published",
"=",
"(",
"$",
"entity",
"->",
"published",
"!==",
"null",
")",
"?",
"$... | Render the DC.date.issued meta tag.
@param PublishableEntity $entity The entity, e.g. Page or Post.
@return string | [
"Render",
"the",
"DC",
".",
"date",
".",
"issued",
"meta",
"tag",
"."
] | 2787b6422ea1d719cf49951b3253fd0ac31d22ca | https://github.com/wasabi-cms/cms/blob/2787b6422ea1d719cf49951b3253fd0ac31d22ca/src/View/Helper/MetaHelper.php#L221-L228 |
6,973 | wasabi-cms/cms | src/View/Helper/MetaHelper.php | MetaHelper.googleSiteVerification | public function googleSiteVerification()
{
$token = Configure::read('Settings.Cms.SEO.google-site-verification');
if (empty($token)) {
return '';
}
return $this->_render(self::ATTR_NAME, 'google-site-verification', $token);
} | php | public function googleSiteVerification()
{
$token = Configure::read('Settings.Cms.SEO.google-site-verification');
if (empty($token)) {
return '';
}
return $this->_render(self::ATTR_NAME, 'google-site-verification', $token);
} | [
"public",
"function",
"googleSiteVerification",
"(",
")",
"{",
"$",
"token",
"=",
"Configure",
"::",
"read",
"(",
"'Settings.Cms.SEO.google-site-verification'",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"token",
")",
")",
"{",
"return",
"''",
";",
"}",
"return... | Render the google site verification meta tag.
@return string | [
"Render",
"the",
"google",
"site",
"verification",
"meta",
"tag",
"."
] | 2787b6422ea1d719cf49951b3253fd0ac31d22ca | https://github.com/wasabi-cms/cms/blob/2787b6422ea1d719cf49951b3253fd0ac31d22ca/src/View/Helper/MetaHelper.php#L235-L242 |
6,974 | wasabi-cms/cms | src/View/Helper/MetaHelper.php | MetaHelper.displaySearchBox | public function displaySearchBox()
{
$displaySearchBox = (bool)Configure::read('Settings.Cms.SEO.display-search-box');
if ($displaySearchBox) {
return '';
}
return $this->_render(self::ATTR_NAME, 'google', 'nositelinkssearchbox');
} | php | public function displaySearchBox()
{
$displaySearchBox = (bool)Configure::read('Settings.Cms.SEO.display-search-box');
if ($displaySearchBox) {
return '';
}
return $this->_render(self::ATTR_NAME, 'google', 'nositelinkssearchbox');
} | [
"public",
"function",
"displaySearchBox",
"(",
")",
"{",
"$",
"displaySearchBox",
"=",
"(",
"bool",
")",
"Configure",
"::",
"read",
"(",
"'Settings.Cms.SEO.display-search-box'",
")",
";",
"if",
"(",
"$",
"displaySearchBox",
")",
"{",
"return",
"''",
";",
"}",
... | Render the google nositelinkssearchbox meta tag to not display a search box beneath the
search engine result for your site.
@return string | [
"Render",
"the",
"google",
"nositelinkssearchbox",
"meta",
"tag",
"to",
"not",
"display",
"a",
"search",
"box",
"beneath",
"the",
"search",
"engine",
"result",
"for",
"your",
"site",
"."
] | 2787b6422ea1d719cf49951b3253fd0ac31d22ca | https://github.com/wasabi-cms/cms/blob/2787b6422ea1d719cf49951b3253fd0ac31d22ca/src/View/Helper/MetaHelper.php#L250-L257 |
6,975 | wasabi-cms/cms | src/View/Helper/MetaHelper.php | MetaHelper.ldJson | public function ldJson()
{
$attributes = [
'@context' => 'http://schema.org',
'@type' => 'WebSite',
'url' => $this->Url->build('/', true),
'potentialAction' => [
'@type' => 'SearchAction',
'query-input' => 'required name=search_... | php | public function ldJson()
{
$attributes = [
'@context' => 'http://schema.org',
'@type' => 'WebSite',
'url' => $this->Url->build('/', true),
'potentialAction' => [
'@type' => 'SearchAction',
'query-input' => 'required name=search_... | [
"public",
"function",
"ldJson",
"(",
")",
"{",
"$",
"attributes",
"=",
"[",
"'@context'",
"=>",
"'http://schema.org'",
",",
"'@type'",
"=>",
"'WebSite'",
",",
"'url'",
"=>",
"$",
"this",
"->",
"Url",
"->",
"build",
"(",
"'/'",
",",
"true",
")",
",",
"'... | Render the ld+json script tag to set the schema.org context for a page.
@return string | [
"Render",
"the",
"ld",
"+",
"json",
"script",
"tag",
"to",
"set",
"the",
"schema",
".",
"org",
"context",
"for",
"a",
"page",
"."
] | 2787b6422ea1d719cf49951b3253fd0ac31d22ca | https://github.com/wasabi-cms/cms/blob/2787b6422ea1d719cf49951b3253fd0ac31d22ca/src/View/Helper/MetaHelper.php#L264-L314 |
6,976 | morrelinko/simple-photo | src/Storage/RemoteHostStorage.php | RemoteHostStorage.createDirectory | public function createDirectory($directory)
{
// create parent directory if needed
$parent = dirname($directory);
if (!$this->directoryExists($parent)) {
$this->createDirectory($parent);
}
if (ftp_mkdir($this->connection(), $directory) === false) {
th... | php | public function createDirectory($directory)
{
// create parent directory if needed
$parent = dirname($directory);
if (!$this->directoryExists($parent)) {
$this->createDirectory($parent);
}
if (ftp_mkdir($this->connection(), $directory) === false) {
th... | [
"public",
"function",
"createDirectory",
"(",
"$",
"directory",
")",
"{",
"// create parent directory if needed",
"$",
"parent",
"=",
"dirname",
"(",
"$",
"directory",
")",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"directoryExists",
"(",
"$",
"parent",
")",
"... | Creates the specified directory recursively
@param string $directory Directory to create
@return bool
@throws \RuntimeException if the directory could not be created | [
"Creates",
"the",
"specified",
"directory",
"recursively"
] | be1fbe3139d32eb39e88cff93f847154bb6a8cb2 | https://github.com/morrelinko/simple-photo/blob/be1fbe3139d32eb39e88cff93f847154bb6a8cb2/src/Storage/RemoteHostStorage.php#L365-L381 |
6,977 | noordawod/php-util | src/Http.php | Http.getDocumentRoot | public static function getDocumentRoot() {
if(null === self::$docRoot) {
self::$docRoot = System::realPath($_SERVER['DOCUMENT_ROOT']);
if(!self::$docRoot) {
self::$docRoot = System::realPath(getcwd());
}
}
return self::$docRoot;
} | php | public static function getDocumentRoot() {
if(null === self::$docRoot) {
self::$docRoot = System::realPath($_SERVER['DOCUMENT_ROOT']);
if(!self::$docRoot) {
self::$docRoot = System::realPath(getcwd());
}
}
return self::$docRoot;
} | [
"public",
"static",
"function",
"getDocumentRoot",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"self",
"::",
"$",
"docRoot",
")",
"{",
"self",
"::",
"$",
"docRoot",
"=",
"System",
"::",
"realPath",
"(",
"$",
"_SERVER",
"[",
"'DOCUMENT_ROOT'",
"]",
")",
";... | Returns the website's document root, if found, or current directory.
The path is always absolute.
@return string|NULL document root on success, FALSE otherwise | [
"Returns",
"the",
"website",
"s",
"document",
"root",
"if",
"found",
"or",
"current",
"directory",
".",
"The",
"path",
"is",
"always",
"absolute",
"."
] | 6458690cc2c8457914a2aa74b131451d4a8e5797 | https://github.com/noordawod/php-util/blob/6458690cc2c8457914a2aa74b131451d4a8e5797/src/Http.php#L129-L137 |
6,978 | noordawod/php-util | src/Http.php | Http.getMethod | public static function getMethod() {
if(null === self::$method) {
// Make the method upper case.
self::$method = @strtoupper($_SERVER['REQUEST_METHOD']);
// A quick-and-dirty test to drop invalid methods.
if(!self::$method || !ctype_upper(self::$method)) {
self::$method = '';
... | php | public static function getMethod() {
if(null === self::$method) {
// Make the method upper case.
self::$method = @strtoupper($_SERVER['REQUEST_METHOD']);
// A quick-and-dirty test to drop invalid methods.
if(!self::$method || !ctype_upper(self::$method)) {
self::$method = '';
... | [
"public",
"static",
"function",
"getMethod",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"self",
"::",
"$",
"method",
")",
"{",
"// Make the method upper case.",
"self",
"::",
"$",
"method",
"=",
"@",
"strtoupper",
"(",
"$",
"_SERVER",
"[",
"'REQUEST_METHOD'",
... | Returns the method of this request. In the case of HTTP, this might be GET,
POST, HEAD, etc.
@return string | [
"Returns",
"the",
"method",
"of",
"this",
"request",
".",
"In",
"the",
"case",
"of",
"HTTP",
"this",
"might",
"be",
"GET",
"POST",
"HEAD",
"etc",
"."
] | 6458690cc2c8457914a2aa74b131451d4a8e5797 | https://github.com/noordawod/php-util/blob/6458690cc2c8457914a2aa74b131451d4a8e5797/src/Http.php#L191-L202 |
6,979 | noordawod/php-util | src/Http.php | Http.getLanguages | public static function getLanguages() {
if(null === self::$languages) {
// The pattern to match languages.
$pattern = '/([a-z]{1,8}(-[a-z]{1,8})?)\s*(;\s*q\s*=\s*(1|0\.[0-9]+))?/i';
// Get a list of languages.
$languages = explode(',', @trim($_SERVER['HTTP_USER_AGENT']));
// Any matc... | php | public static function getLanguages() {
if(null === self::$languages) {
// The pattern to match languages.
$pattern = '/([a-z]{1,8}(-[a-z]{1,8})?)\s*(;\s*q\s*=\s*(1|0\.[0-9]+))?/i';
// Get a list of languages.
$languages = explode(',', @trim($_SERVER['HTTP_USER_AGENT']));
// Any matc... | [
"public",
"static",
"function",
"getLanguages",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"self",
"::",
"$",
"languages",
")",
"{",
"// The pattern to match languages.",
"$",
"pattern",
"=",
"'/([a-z]{1,8}(-[a-z]{1,8})?)\\s*(;\\s*q\\s*=\\s*(1|0\\.[0-9]+))?/i'",
";",
"// ... | Returns a list of detected languages that the user-agent currently
supports. The accuracy of this list is on par with that of the relevant
header sent by the remote browser.
@return array | [
"Returns",
"a",
"list",
"of",
"detected",
"languages",
"that",
"the",
"user",
"-",
"agent",
"currently",
"supports",
".",
"The",
"accuracy",
"of",
"this",
"list",
"is",
"on",
"par",
"with",
"that",
"of",
"the",
"relevant",
"header",
"sent",
"by",
"the",
... | 6458690cc2c8457914a2aa74b131451d4a8e5797 | https://github.com/noordawod/php-util/blob/6458690cc2c8457914a2aa74b131451d4a8e5797/src/Http.php#L237-L254 |
6,980 | noordawod/php-util | src/Http.php | Http.getParams | public static function getParams(array $methods = null) {
if(null === $methods) {
$methods = [self::getMethod()];
}
$params = [];
if($methods) {
// This will uniquefy the methods.
$methods = array_flip(array_flip($methods));
// Run over the methods.
foreach($methods as $me... | php | public static function getParams(array $methods = null) {
if(null === $methods) {
$methods = [self::getMethod()];
}
$params = [];
if($methods) {
// This will uniquefy the methods.
$methods = array_flip(array_flip($methods));
// Run over the methods.
foreach($methods as $me... | [
"public",
"static",
"function",
"getParams",
"(",
"array",
"$",
"methods",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"methods",
")",
"{",
"$",
"methods",
"=",
"[",
"self",
"::",
"getMethod",
"(",
")",
"]",
";",
"}",
"$",
"params",
"=",
... | Returns a list of parameters associated with the last request.
If the specified parameter is NULL, then the list depends on the method
used. So a GET request will get return query parameters, while a POST
request will return those.
To change this behavior, send in a list of the types to consider, as an
array of metho... | [
"Returns",
"a",
"list",
"of",
"parameters",
"associated",
"with",
"the",
"last",
"request",
"."
] | 6458690cc2c8457914a2aa74b131451d4a8e5797 | https://github.com/noordawod/php-util/blob/6458690cc2c8457914a2aa74b131451d4a8e5797/src/Http.php#L269-L291 |
6,981 | noordawod/php-util | src/Http.php | Http.getContentType | public static function getContentType() {
if(null === self::$contentType) {
self::$contentType = @trim($_SERVER['HTTP_CONTENT_TYPE']);
if(!self::$contentType) {
self::$contentType = @trim($_SERVER['CONTENT_TYPE']);
if(!self::$contentType) {
self::$contentType = false;
}... | php | public static function getContentType() {
if(null === self::$contentType) {
self::$contentType = @trim($_SERVER['HTTP_CONTENT_TYPE']);
if(!self::$contentType) {
self::$contentType = @trim($_SERVER['CONTENT_TYPE']);
if(!self::$contentType) {
self::$contentType = false;
}... | [
"public",
"static",
"function",
"getContentType",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"self",
"::",
"$",
"contentType",
")",
"{",
"self",
"::",
"$",
"contentType",
"=",
"@",
"trim",
"(",
"$",
"_SERVER",
"[",
"'HTTP_CONTENT_TYPE'",
"]",
")",
";",
"... | Returns the request's content type as supplied by remote user agent. If
none was detected, FALSE is returned.
@return string|FALSE detected content type, FALSE otherwise | [
"Returns",
"the",
"request",
"s",
"content",
"type",
"as",
"supplied",
"by",
"remote",
"user",
"agent",
".",
"If",
"none",
"was",
"detected",
"FALSE",
"is",
"returned",
"."
] | 6458690cc2c8457914a2aa74b131451d4a8e5797 | https://github.com/noordawod/php-util/blob/6458690cc2c8457914a2aa74b131451d4a8e5797/src/Http.php#L299-L310 |
6,982 | emaphp/eMapper | lib/eMapper/Query/Field.php | Field.range | public function range($from, $to, $condition = true) {
$range = new Range($this, !$condition);
$range->setFrom($from);
$range->setTo($to);
return $range;
} | php | public function range($from, $to, $condition = true) {
$range = new Range($this, !$condition);
$range->setFrom($from);
$range->setTo($to);
return $range;
} | [
"public",
"function",
"range",
"(",
"$",
"from",
",",
"$",
"to",
",",
"$",
"condition",
"=",
"true",
")",
"{",
"$",
"range",
"=",
"new",
"Range",
"(",
"$",
"this",
",",
"!",
"$",
"condition",
")",
";",
"$",
"range",
"->",
"setFrom",
"(",
"$",
"... | Returns a Range predicate for the current field
@param mixed $from
@param mixed $to
@param boolean $condition
@return \eMapper\SQL\Predicate\Range | [
"Returns",
"a",
"Range",
"predicate",
"for",
"the",
"current",
"field"
] | df7100e601d2a1363d07028a786b6ceb22271829 | https://github.com/emaphp/eMapper/blob/df7100e601d2a1363d07028a786b6ceb22271829/lib/eMapper/Query/Field.php#L271-L276 |
6,983 | matical/nana | src/Fetch.php | Fetch.post | public function post(string $url, array $params = [])
{
return $this->send('POST', $url, [
$this->bodyFormat => $params,
]);
} | php | public function post(string $url, array $params = [])
{
return $this->send('POST', $url, [
$this->bodyFormat => $params,
]);
} | [
"public",
"function",
"post",
"(",
"string",
"$",
"url",
",",
"array",
"$",
"params",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"send",
"(",
"'POST'",
",",
"$",
"url",
",",
"[",
"$",
"this",
"->",
"bodyFormat",
"=>",
"$",
"params",
",... | Executes a POST.
@param string $url
@param array $params
@return \ksmz\nana\Consume
@throws \GuzzleHttp\Exception\GuzzleException | [
"Executes",
"a",
"POST",
"."
] | 4d1cf7e6a8a62faa0accc7cef3b481c22440c12e | https://github.com/matical/nana/blob/4d1cf7e6a8a62faa0accc7cef3b481c22440c12e/src/Fetch.php#L188-L193 |
6,984 | matical/nana | src/Fetch.php | Fetch.patch | public function patch(string $url, array $params = [])
{
return $this->send('PATCH', $url, [
$this->bodyFormat => $params,
]);
} | php | public function patch(string $url, array $params = [])
{
return $this->send('PATCH', $url, [
$this->bodyFormat => $params,
]);
} | [
"public",
"function",
"patch",
"(",
"string",
"$",
"url",
",",
"array",
"$",
"params",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"send",
"(",
"'PATCH'",
",",
"$",
"url",
",",
"[",
"$",
"this",
"->",
"bodyFormat",
"=>",
"$",
"params",
... | Executes a PATCH.
@param string $url
@param array $params
@return \ksmz\nana\Consume
@throws \GuzzleHttp\Exception\GuzzleException | [
"Executes",
"a",
"PATCH",
"."
] | 4d1cf7e6a8a62faa0accc7cef3b481c22440c12e | https://github.com/matical/nana/blob/4d1cf7e6a8a62faa0accc7cef3b481c22440c12e/src/Fetch.php#L204-L209 |
6,985 | matical/nana | src/Fetch.php | Fetch.put | public function put(string $url, array $params = [])
{
return $this->send('PUT', $url, [
$this->bodyFormat => $params,
]);
} | php | public function put(string $url, array $params = [])
{
return $this->send('PUT', $url, [
$this->bodyFormat => $params,
]);
} | [
"public",
"function",
"put",
"(",
"string",
"$",
"url",
",",
"array",
"$",
"params",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"send",
"(",
"'PUT'",
",",
"$",
"url",
",",
"[",
"$",
"this",
"->",
"bodyFormat",
"=>",
"$",
"params",
",",... | Executes a PUT.
@param string $url
@param array $params
@return \ksmz\nana\Consume
@throws \GuzzleHttp\Exception\GuzzleException | [
"Executes",
"a",
"PUT",
"."
] | 4d1cf7e6a8a62faa0accc7cef3b481c22440c12e | https://github.com/matical/nana/blob/4d1cf7e6a8a62faa0accc7cef3b481c22440c12e/src/Fetch.php#L220-L225 |
6,986 | matical/nana | src/Fetch.php | Fetch.send | public function send(string $method, string $url, array $options)
{
try {
// Guzzle overwrites all query string values in the URI if queries are specified
// in the 'query' option, so they need to be extracted first.
$optionsPayload = $this->mergeOptions(
... | php | public function send(string $method, string $url, array $options)
{
try {
// Guzzle overwrites all query string values in the URI if queries are specified
// in the 'query' option, so they need to be extracted first.
$optionsPayload = $this->mergeOptions(
... | [
"public",
"function",
"send",
"(",
"string",
"$",
"method",
",",
"string",
"$",
"url",
",",
"array",
"$",
"options",
")",
"{",
"try",
"{",
"// Guzzle overwrites all query string values in the URI if queries are specified",
"// in the 'query' option, so they need to be extract... | Build the client and send the request.
@param string $method
@param string $url
@param array $options
@return \ksmz\nana\Consume
@throws \GuzzleHttp\Exception\GuzzleException | [
"Build",
"the",
"client",
"and",
"send",
"the",
"request",
"."
] | 4d1cf7e6a8a62faa0accc7cef3b481c22440c12e | https://github.com/matical/nana/blob/4d1cf7e6a8a62faa0accc7cef3b481c22440c12e/src/Fetch.php#L253-L270 |
6,987 | matical/nana | src/Fetch.php | Fetch.parseQueryParams | protected function parseQueryParams($url)
{
$queries = [];
$querySegment = \parse_url($url, PHP_URL_QUERY);
\parse_str($querySegment, $queries);
return $queries;
} | php | protected function parseQueryParams($url)
{
$queries = [];
$querySegment = \parse_url($url, PHP_URL_QUERY);
\parse_str($querySegment, $queries);
return $queries;
} | [
"protected",
"function",
"parseQueryParams",
"(",
"$",
"url",
")",
"{",
"$",
"queries",
"=",
"[",
"]",
";",
"$",
"querySegment",
"=",
"\\",
"parse_url",
"(",
"$",
"url",
",",
"PHP_URL_QUERY",
")",
";",
"\\",
"parse_str",
"(",
"$",
"querySegment",
",",
... | Extracts query params into an array.
@param string $url
@return array
@see http://docs.guzzlephp.org/en/stable/request-options.html#query | [
"Extracts",
"query",
"params",
"into",
"an",
"array",
"."
] | 4d1cf7e6a8a62faa0accc7cef3b481c22440c12e | https://github.com/matical/nana/blob/4d1cf7e6a8a62faa0accc7cef3b481c22440c12e/src/Fetch.php#L345-L353 |
6,988 | sebardo/core_extra | CoreExtraBundle/Controller/MenuItemController.php | MenuItemController.showAction | public function showAction(MenuItem $menuItem)
{
$em = $this->getDoctrine()->getManager();
$deleteForm = $this->createDeleteForm($menuItem);
// $menuItem = $em->getRepository('CoreExtraBundle:MenuItem')->getItemsWithTranslations($menuItem);
return array(
'entity' ... | php | public function showAction(MenuItem $menuItem)
{
$em = $this->getDoctrine()->getManager();
$deleteForm = $this->createDeleteForm($menuItem);
// $menuItem = $em->getRepository('CoreExtraBundle:MenuItem')->getItemsWithTranslations($menuItem);
return array(
'entity' ... | [
"public",
"function",
"showAction",
"(",
"MenuItem",
"$",
"menuItem",
")",
"{",
"$",
"em",
"=",
"$",
"this",
"->",
"getDoctrine",
"(",
")",
"->",
"getManager",
"(",
")",
";",
"$",
"deleteForm",
"=",
"$",
"this",
"->",
"createDeleteForm",
"(",
"$",
"men... | Finds and displays a MenuItem entity.
@Route("/admin/menuitems/{id}")
@Method("GET")
@Template() | [
"Finds",
"and",
"displays",
"a",
"MenuItem",
"entity",
"."
] | b18f2eb40c5396eb4520a566971c6c0f27603f5f | https://github.com/sebardo/core_extra/blob/b18f2eb40c5396eb4520a566971c6c0f27603f5f/CoreExtraBundle/Controller/MenuItemController.php#L132-L142 |
6,989 | ncuesta/pinocchio | src/Pinocchio/Worker.php | Worker.process | public function process()
{
$logger = $this->getLogger();
$logger->log("Starting...\n");
$formatter = $this->createFormatter();
$parser = $this->createParser();
$outputDir = $this->configuration->get('output');
$sources = $this->configuration->getSources();
... | php | public function process()
{
$logger = $this->getLogger();
$logger->log("Starting...\n");
$formatter = $this->createFormatter();
$parser = $this->createParser();
$outputDir = $this->configuration->get('output');
$sources = $this->configuration->getSources();
... | [
"public",
"function",
"process",
"(",
")",
"{",
"$",
"logger",
"=",
"$",
"this",
"->",
"getLogger",
"(",
")",
";",
"$",
"logger",
"->",
"log",
"(",
"\"Starting...\\n\"",
")",
";",
"$",
"formatter",
"=",
"$",
"this",
"->",
"createFormatter",
"(",
")",
... | Process the source files and generate their corresponding output files. | [
"Process",
"the",
"source",
"files",
"and",
"generate",
"their",
"corresponding",
"output",
"files",
"."
] | 01b119a003362fd3a50e843341c62c95374d87cf | https://github.com/ncuesta/pinocchio/blob/01b119a003362fd3a50e843341c62c95374d87cf/src/Pinocchio/Worker.php#L63-L93 |
6,990 | ncuesta/pinocchio | src/Pinocchio/Worker.php | Worker.createOutputDir | public function createOutputDir()
{
$outputDir = $this->configuration->get('output');
if (!is_writable($outputDir)) {
@mkdir($outputDir, 0777, true);
if (!is_writable($outputDir)) {
throw new \RuntimeException("Output directory {$outputDir} is not writable."... | php | public function createOutputDir()
{
$outputDir = $this->configuration->get('output');
if (!is_writable($outputDir)) {
@mkdir($outputDir, 0777, true);
if (!is_writable($outputDir)) {
throw new \RuntimeException("Output directory {$outputDir} is not writable."... | [
"public",
"function",
"createOutputDir",
"(",
")",
"{",
"$",
"outputDir",
"=",
"$",
"this",
"->",
"configuration",
"->",
"get",
"(",
"'output'",
")",
";",
"if",
"(",
"!",
"is_writable",
"(",
"$",
"outputDir",
")",
")",
"{",
"@",
"mkdir",
"(",
"$",
"o... | Create - if needed - the output directory provided by the configuration.
@throws \RuntimeException If the directory cannot be created. | [
"Create",
"-",
"if",
"needed",
"-",
"the",
"output",
"directory",
"provided",
"by",
"the",
"configuration",
"."
] | 01b119a003362fd3a50e843341c62c95374d87cf | https://github.com/ncuesta/pinocchio/blob/01b119a003362fd3a50e843341c62c95374d87cf/src/Pinocchio/Worker.php#L121-L132 |
6,991 | ncuesta/pinocchio | src/Pinocchio/Worker.php | Worker.getLogger | public function getLogger()
{
if ($this->logger === null) {
if ($this->configuration->get('silent')) {
$this->logger = new Logger\NullLogger();
} else {
$loggerClass = $this->configuration->get('logger') ?: '\\Pinocchio\\Logger\\StandardLogger';
... | php | public function getLogger()
{
if ($this->logger === null) {
if ($this->configuration->get('silent')) {
$this->logger = new Logger\NullLogger();
} else {
$loggerClass = $this->configuration->get('logger') ?: '\\Pinocchio\\Logger\\StandardLogger';
... | [
"public",
"function",
"getLogger",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"logger",
"===",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"configuration",
"->",
"get",
"(",
"'silent'",
")",
")",
"{",
"$",
"this",
"->",
"logger",
"=",
"new",
... | Get the Logger instance.
@return \Pinocchio\Logger\LoggerInterface | [
"Get",
"the",
"Logger",
"instance",
"."
] | 01b119a003362fd3a50e843341c62c95374d87cf | https://github.com/ncuesta/pinocchio/blob/01b119a003362fd3a50e843341c62c95374d87cf/src/Pinocchio/Worker.php#L159-L173 |
6,992 | standardlibrary/collection | src/Helpers/ArrayFunctionsHelperMethods.php | ArrayFunctionsHelperMethods.keys | public function keys($search = null, bool $strict = true): array
{
return array_keys($this->getData(), $search, $strict);
} | php | public function keys($search = null, bool $strict = true): array
{
return array_keys($this->getData(), $search, $strict);
} | [
"public",
"function",
"keys",
"(",
"$",
"search",
"=",
"null",
",",
"bool",
"$",
"strict",
"=",
"true",
")",
":",
"array",
"{",
"return",
"array_keys",
"(",
"$",
"this",
"->",
"getData",
"(",
")",
",",
"$",
"search",
",",
"$",
"strict",
")",
";",
... | Returns all the keys in an array
@param mixed $search - OPTIONAL search parameter
@param bool $strict - OPTIONAL strict search comparison
@return array | [
"Returns",
"all",
"the",
"keys",
"in",
"an",
"array"
] | cbe284e77ed6816dccacc857c65bd3f956f59230 | https://github.com/standardlibrary/collection/blob/cbe284e77ed6816dccacc857c65bd3f956f59230/src/Helpers/ArrayFunctionsHelperMethods.php#L54-L57 |
6,993 | standardlibrary/collection | src/Helpers/ArrayFunctionsHelperMethods.php | ArrayFunctionsHelperMethods.pad | public function pad(int $length, $value = null)
{
$this->setData(
array_pad($this->getData(), $length, $value)
);
return $this;
} | php | public function pad(int $length, $value = null)
{
$this->setData(
array_pad($this->getData(), $length, $value)
);
return $this;
} | [
"public",
"function",
"pad",
"(",
"int",
"$",
"length",
",",
"$",
"value",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"setData",
"(",
"array_pad",
"(",
"$",
"this",
"->",
"getData",
"(",
")",
",",
"$",
"length",
",",
"$",
"value",
")",
")",
";",
... | Pads out an array to a specified length
Note that PHP has an upper limit of 1048576 elements that can be added to
an array {@see http://php.net/manual/en/function.array-pad.php}
@param int $length - The length add to the array
@param mixed $value - The default value to add to the array
@return self | [
"Pads",
"out",
"an",
"array",
"to",
"a",
"specified",
"length"
] | cbe284e77ed6816dccacc857c65bd3f956f59230 | https://github.com/standardlibrary/collection/blob/cbe284e77ed6816dccacc857c65bd3f956f59230/src/Helpers/ArrayFunctionsHelperMethods.php#L69-L76 |
6,994 | standardlibrary/collection | src/Helpers/ArrayFunctionsHelperMethods.php | ArrayFunctionsHelperMethods.unshift | public function unshift(...$values)
{
array_unshift(
$this->getData(),
extract($values,
EXTR_PREFIX_IF_EXISTS | EXTR_PREFIX_INVALID,
'_collection_unshift'
)
);
return $this;
} | php | public function unshift(...$values)
{
array_unshift(
$this->getData(),
extract($values,
EXTR_PREFIX_IF_EXISTS | EXTR_PREFIX_INVALID,
'_collection_unshift'
)
);
return $this;
} | [
"public",
"function",
"unshift",
"(",
"...",
"$",
"values",
")",
"{",
"array_unshift",
"(",
"$",
"this",
"->",
"getData",
"(",
")",
",",
"extract",
"(",
"$",
"values",
",",
"EXTR_PREFIX_IF_EXISTS",
"|",
"EXTR_PREFIX_INVALID",
",",
"'_collection_unshift'",
")",... | Add one or more elements to the front of the array
@param mixed ...$values
@return self | [
"Add",
"one",
"or",
"more",
"elements",
"to",
"the",
"front",
"of",
"the",
"array"
] | cbe284e77ed6816dccacc857c65bd3f956f59230 | https://github.com/standardlibrary/collection/blob/cbe284e77ed6816dccacc857c65bd3f956f59230/src/Helpers/ArrayFunctionsHelperMethods.php#L124-L135 |
6,995 | sebardo/core_extra | CoreExtraBundle/Controller/SliderController.php | SliderController.newAction | public function newAction(Request $request)
{
$slider = new Slider();
$form = $this->createForm('CoreExtraBundle\Form\SliderType', $slider, array('uploadDir'=> 'uploads/images/slider' ));
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$e... | php | public function newAction(Request $request)
{
$slider = new Slider();
$form = $this->createForm('CoreExtraBundle\Form\SliderType', $slider, array('uploadDir'=> 'uploads/images/slider' ));
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$e... | [
"public",
"function",
"newAction",
"(",
"Request",
"$",
"request",
")",
"{",
"$",
"slider",
"=",
"new",
"Slider",
"(",
")",
";",
"$",
"form",
"=",
"$",
"this",
"->",
"createForm",
"(",
"'CoreExtraBundle\\Form\\SliderType'",
",",
"$",
"slider",
",",
"array"... | Creates a new Slider entity.
@Route("/new")
@Method({"GET", "POST"})
@Template() | [
"Creates",
"a",
"new",
"Slider",
"entity",
"."
] | b18f2eb40c5396eb4520a566971c6c0f27603f5f | https://github.com/sebardo/core_extra/blob/b18f2eb40c5396eb4520a566971c6c0f27603f5f/CoreExtraBundle/Controller/SliderController.php#L67-L91 |
6,996 | sebardo/core_extra | CoreExtraBundle/Controller/SliderController.php | SliderController.showAction | public function showAction(Slider $slider)
{
$deleteForm = $this->createDeleteForm($slider);
return array(
'entity' => $slider,
'delete_form' => $deleteForm->createView(),
);
} | php | public function showAction(Slider $slider)
{
$deleteForm = $this->createDeleteForm($slider);
return array(
'entity' => $slider,
'delete_form' => $deleteForm->createView(),
);
} | [
"public",
"function",
"showAction",
"(",
"Slider",
"$",
"slider",
")",
"{",
"$",
"deleteForm",
"=",
"$",
"this",
"->",
"createDeleteForm",
"(",
"$",
"slider",
")",
";",
"return",
"array",
"(",
"'entity'",
"=>",
"$",
"slider",
",",
"'delete_form'",
"=>",
... | Finds and displays a Slider entity.
@Route("/{id}")
@Method("GET")
@Template() | [
"Finds",
"and",
"displays",
"a",
"Slider",
"entity",
"."
] | b18f2eb40c5396eb4520a566971c6c0f27603f5f | https://github.com/sebardo/core_extra/blob/b18f2eb40c5396eb4520a566971c6c0f27603f5f/CoreExtraBundle/Controller/SliderController.php#L100-L108 |
6,997 | sebardo/core_extra | CoreExtraBundle/Controller/SliderController.php | SliderController.editAction | public function editAction(Request $request, Slider $slider)
{
$deleteForm = $this->createDeleteForm($slider);
$editForm = $this->createForm('CoreExtraBundle\Form\SliderType', $slider);
$editForm->handleRequest($request);
if ($editForm->isSubmitted() && $editForm->isValid()... | php | public function editAction(Request $request, Slider $slider)
{
$deleteForm = $this->createDeleteForm($slider);
$editForm = $this->createForm('CoreExtraBundle\Form\SliderType', $slider);
$editForm->handleRequest($request);
if ($editForm->isSubmitted() && $editForm->isValid()... | [
"public",
"function",
"editAction",
"(",
"Request",
"$",
"request",
",",
"Slider",
"$",
"slider",
")",
"{",
"$",
"deleteForm",
"=",
"$",
"this",
"->",
"createDeleteForm",
"(",
"$",
"slider",
")",
";",
"$",
"editForm",
"=",
"$",
"this",
"->",
"createForm"... | Displays a form to edit an existing Slider entity.
@Route("/{id}/edit")
@Method({"GET", "POST"})
@Template()
@I18nDoctrine | [
"Displays",
"a",
"form",
"to",
"edit",
"an",
"existing",
"Slider",
"entity",
"."
] | b18f2eb40c5396eb4520a566971c6c0f27603f5f | https://github.com/sebardo/core_extra/blob/b18f2eb40c5396eb4520a566971c6c0f27603f5f/CoreExtraBundle/Controller/SliderController.php#L118-L145 |
6,998 | sebardo/core_extra | CoreExtraBundle/Controller/SliderController.php | SliderController.createDeleteForm | private function createDeleteForm(Slider $slider)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('coreextra_slider_delete', array('id' => $slider->getId())))
->setMethod('DELETE')
->getForm()
;
} | php | private function createDeleteForm(Slider $slider)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('coreextra_slider_delete', array('id' => $slider->getId())))
->setMethod('DELETE')
->getForm()
;
} | [
"private",
"function",
"createDeleteForm",
"(",
"Slider",
"$",
"slider",
")",
"{",
"return",
"$",
"this",
"->",
"createFormBuilder",
"(",
")",
"->",
"setAction",
"(",
"$",
"this",
"->",
"generateUrl",
"(",
"'coreextra_slider_delete'",
",",
"array",
"(",
"'id'"... | Creates a form to delete a Slider entity.
@param Slider $slider The Slider entity
@return \Symfony\Component\Form\Form The form | [
"Creates",
"a",
"form",
"to",
"delete",
"a",
"Slider",
"entity",
"."
] | b18f2eb40c5396eb4520a566971c6c0f27603f5f | https://github.com/sebardo/core_extra/blob/b18f2eb40c5396eb4520a566971c6c0f27603f5f/CoreExtraBundle/Controller/SliderController.php#L176-L183 |
6,999 | noordawod/php-util | src/Shutdown.php | Shutdown.register | public function register(
/*string*/ $id,
callable $callback,
/*int*/ $priority = self::PRIO_EARLY
) {
// Normalize priority.
$priority = intval($priority);
// The priority must be valid.
if(self::PRIO_START <= $priority && self::PRIO_END >= $priority) {
// Register new callback.
... | php | public function register(
/*string*/ $id,
callable $callback,
/*int*/ $priority = self::PRIO_EARLY
) {
// Normalize priority.
$priority = intval($priority);
// The priority must be valid.
if(self::PRIO_START <= $priority && self::PRIO_END >= $priority) {
// Register new callback.
... | [
"public",
"function",
"register",
"(",
"/*string*/",
"$",
"id",
",",
"callable",
"$",
"callback",
",",
"/*int*/",
"$",
"priority",
"=",
"self",
"::",
"PRIO_EARLY",
")",
"{",
"// Normalize priority.",
"$",
"priority",
"=",
"intval",
"(",
"$",
"priority",
")",... | Registers a new shutdown callback with the specified priority.
@param string $id unique identifier of this callback
@param callable $callback to register
@param int $priority of the callback | [
"Registers",
"a",
"new",
"shutdown",
"callback",
"with",
"the",
"specified",
"priority",
"."
] | 6458690cc2c8457914a2aa74b131451d4a8e5797 | https://github.com/noordawod/php-util/blob/6458690cc2c8457914a2aa74b131451d4a8e5797/src/Shutdown.php#L100-L113 |
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.