id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
233,600 | budde377/Part | lib/model/page/PageImpl.php | PageImpl.setTemplate | public function setTemplate($template)
{
$updateTemplateStm = $this->connection->prepare("UPDATE Page SET template = :template WHERE page_id = :page_id");
$updateTemplateStm->bindParam(":template", $this->template);
$updateTemplateStm->bindParam(":page_id", $this->page_id);
$this->te... | php | public function setTemplate($template)
{
$updateTemplateStm = $this->connection->prepare("UPDATE Page SET template = :template WHERE page_id = :page_id");
$updateTemplateStm->bindParam(":template", $this->template);
$updateTemplateStm->bindParam(":page_id", $this->page_id);
$this->te... | [
"public",
"function",
"setTemplate",
"(",
"$",
"template",
")",
"{",
"$",
"updateTemplateStm",
"=",
"$",
"this",
"->",
"connection",
"->",
"prepare",
"(",
"\"UPDATE Page SET template = :template WHERE page_id = :page_id\"",
")",
";",
"$",
"updateTemplateStm",
"->",
"b... | Set the template, the template should match element in config.
@param $template string
@return void | [
"Set",
"the",
"template",
"the",
"template",
"should",
"match",
"element",
"in",
"config",
"."
] | 9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d | https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/model/page/PageImpl.php#L157-L164 |
233,601 | budde377/Part | lib/model/page/PageImpl.php | PageImpl.setAlias | public function setAlias($alias)
{
if (!$this->isValidAlias($alias)) {
return false;
}
$updateAliasStm = $this->connection->prepare("UPDATE Page SET alias = :alias WHERE page_id = :page_id");
$updateAliasStm->bindParam(":alias", $this->alias);
$updateAliasStm->bi... | php | public function setAlias($alias)
{
if (!$this->isValidAlias($alias)) {
return false;
}
$updateAliasStm = $this->connection->prepare("UPDATE Page SET alias = :alias WHERE page_id = :page_id");
$updateAliasStm->bindParam(":alias", $this->alias);
$updateAliasStm->bi... | [
"public",
"function",
"setAlias",
"(",
"$",
"alias",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isValidAlias",
"(",
"$",
"alias",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"updateAliasStm",
"=",
"$",
"this",
"->",
"connection",
"->",
"prepa... | Will set the alias. This should support RegEx
@param $alias string
@return bool | [
"Will",
"set",
"the",
"alias",
".",
"This",
"should",
"support",
"RegEx"
] | 9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d | https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/model/page/PageImpl.php#L171-L184 |
233,602 | budde377/Part | lib/model/page/PageImpl.php | PageImpl.hide | public function hide()
{
if ($this->isHidden())
return;
$updateHiddenStm = $this->connection->prepare("UPDATE Page SET hidden=? WHERE page_id = ?");
$updateHiddenStm->bindParam(1, $this->hidden);
$updateHiddenStm->bindParam(2, $this->page_id);
$this->hidden = tru... | php | public function hide()
{
if ($this->isHidden())
return;
$updateHiddenStm = $this->connection->prepare("UPDATE Page SET hidden=? WHERE page_id = ?");
$updateHiddenStm->bindParam(1, $this->hidden);
$updateHiddenStm->bindParam(2, $this->page_id);
$this->hidden = tru... | [
"public",
"function",
"hide",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isHidden",
"(",
")",
")",
"return",
";",
"$",
"updateHiddenStm",
"=",
"$",
"this",
"->",
"connection",
"->",
"prepare",
"(",
"\"UPDATE Page SET hidden=? WHERE page_id = ?\"",
")",
";... | This will mark the page as hidden.
If the page is already hidden, nothing will happen.
@return void | [
"This",
"will",
"mark",
"the",
"page",
"as",
"hidden",
".",
"If",
"the",
"page",
"is",
"already",
"hidden",
"nothing",
"will",
"happen",
"."
] | 9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d | https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/model/page/PageImpl.php#L278-L288 |
233,603 | budde377/Part | lib/model/page/PageImpl.php | PageImpl.show | public function show()
{
if (!$this->isHidden())
return;
$updateHiddenStm = $this->connection->prepare("UPDATE Page SET hidden=? WHERE page_id = ?");
$updateHiddenStm->bindParam(1, $this->hidden);
$updateHiddenStm->bindParam(2, $this->page_id);
$this->hidden = fa... | php | public function show()
{
if (!$this->isHidden())
return;
$updateHiddenStm = $this->connection->prepare("UPDATE Page SET hidden=? WHERE page_id = ?");
$updateHiddenStm->bindParam(1, $this->hidden);
$updateHiddenStm->bindParam(2, $this->page_id);
$this->hidden = fa... | [
"public",
"function",
"show",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isHidden",
"(",
")",
")",
"return",
";",
"$",
"updateHiddenStm",
"=",
"$",
"this",
"->",
"connection",
"->",
"prepare",
"(",
"\"UPDATE Page SET hidden=? WHERE page_id = ?\"",
")... | This will un-mark the page as hidden, iff it is hidden.
If the page is not hidden, nothing will happen.
@return void | [
"This",
"will",
"un",
"-",
"mark",
"the",
"page",
"as",
"hidden",
"iff",
"it",
"is",
"hidden",
".",
"If",
"the",
"page",
"is",
"not",
"hidden",
"nothing",
"will",
"happen",
"."
] | 9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d | https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/model/page/PageImpl.php#L295-L305 |
233,604 | budde377/Part | lib/model/page/PageImpl.php | PageImpl.modify | public function modify()
{
$updLastModStm = $this->connection->prepare("UPDATE Page SET last_modified=FROM_UNIXTIME(?) WHERE page_id=?");
$updLastModStm->bindParam(1, $this->lastModified);
$updLastModStm->bindParam(2, $this->page_id);
$this->lastModified = time();
$updLastMod... | php | public function modify()
{
$updLastModStm = $this->connection->prepare("UPDATE Page SET last_modified=FROM_UNIXTIME(?) WHERE page_id=?");
$updLastModStm->bindParam(1, $this->lastModified);
$updLastModStm->bindParam(2, $this->page_id);
$this->lastModified = time();
$updLastMod... | [
"public",
"function",
"modify",
"(",
")",
"{",
"$",
"updLastModStm",
"=",
"$",
"this",
"->",
"connection",
"->",
"prepare",
"(",
"\"UPDATE Page SET last_modified=FROM_UNIXTIME(?) WHERE page_id=?\"",
")",
";",
"$",
"updLastModStm",
"->",
"bindParam",
"(",
"1",
",",
... | Will update the page with a new modify timestamp
@return int New modified time | [
"Will",
"update",
"the",
"page",
"with",
"a",
"new",
"modify",
"timestamp"
] | 9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d | https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/model/page/PageImpl.php#L331-L340 |
233,605 | budde377/Part | lib/model/page/PageImpl.php | PageImpl.getContentLibrary | public function getContentLibrary()
{
return $this->contentLibrary == null ?
$this->contentLibrary = new PageContentLibraryImpl($this->container, $this) :
$this->contentLibrary;
} | php | public function getContentLibrary()
{
return $this->contentLibrary == null ?
$this->contentLibrary = new PageContentLibraryImpl($this->container, $this) :
$this->contentLibrary;
} | [
"public",
"function",
"getContentLibrary",
"(",
")",
"{",
"return",
"$",
"this",
"->",
"contentLibrary",
"==",
"null",
"?",
"$",
"this",
"->",
"contentLibrary",
"=",
"new",
"PageContentLibraryImpl",
"(",
"$",
"this",
"->",
"container",
",",
"$",
"this",
")",... | Will return and reuse a ContentLibrary instance.
@return ContentLibrary | [
"Will",
"return",
"and",
"reuse",
"a",
"ContentLibrary",
"instance",
"."
] | 9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d | https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/model/page/PageImpl.php#L354-L359 |
233,606 | wardrobecms/core-archived | src/Wardrobe/Core/Facades/Wardrobe.php | Wardrobe.route | public function route($route, $param = null)
{
if($route == '/')
{
return route('wardrobe.index');
}
else
{
return \URL::route('wardrobe.'.$route, $param);
}
} | php | public function route($route, $param = null)
{
if($route == '/')
{
return route('wardrobe.index');
}
else
{
return \URL::route('wardrobe.'.$route, $param);
}
} | [
"public",
"function",
"route",
"(",
"$",
"route",
",",
"$",
"param",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"route",
"==",
"'/'",
")",
"{",
"return",
"route",
"(",
"'wardrobe.index'",
")",
";",
"}",
"else",
"{",
"return",
"\\",
"URL",
"::",
"route"... | Generate a route to a named group
@param string $route
@param mixed $param
@return string | [
"Generate",
"a",
"route",
"to",
"a",
"named",
"group"
] | 5c0836ea2e6885a428c852dc392073f2a2541c71 | https://github.com/wardrobecms/core-archived/blob/5c0836ea2e6885a428c852dc392073f2a2541c71/src/Wardrobe/Core/Facades/Wardrobe.php#L66-L76 |
233,607 | skrz/meta | gen-src/Google/Protobuf/Meta/EnumOptionsMeta.php | EnumOptionsMeta.create | public static function create()
{
switch (func_num_args()) {
case 0:
return new EnumOptions();
case 1:
return new EnumOptions(func_get_arg(0));
case 2:
return new EnumOptions(func_get_arg(0), func_get_arg(1));
case 3:
return new EnumOptions(func_get_arg(0), func_get_arg(1), func_get_arg(2... | php | public static function create()
{
switch (func_num_args()) {
case 0:
return new EnumOptions();
case 1:
return new EnumOptions(func_get_arg(0));
case 2:
return new EnumOptions(func_get_arg(0), func_get_arg(1));
case 3:
return new EnumOptions(func_get_arg(0), func_get_arg(1), func_get_arg(2... | [
"public",
"static",
"function",
"create",
"(",
")",
"{",
"switch",
"(",
"func_num_args",
"(",
")",
")",
"{",
"case",
"0",
":",
"return",
"new",
"EnumOptions",
"(",
")",
";",
"case",
"1",
":",
"return",
"new",
"EnumOptions",
"(",
"func_get_arg",
"(",
"0... | Creates new instance of \Google\Protobuf\EnumOptions
@throws \InvalidArgumentException
@return EnumOptions | [
"Creates",
"new",
"instance",
"of",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"EnumOptions"
] | 013af6435d3885ab5b2e91fb8ebb051d0f874ab2 | https://github.com/skrz/meta/blob/013af6435d3885ab5b2e91fb8ebb051d0f874ab2/gen-src/Google/Protobuf/Meta/EnumOptionsMeta.php#L59-L83 |
233,608 | skrz/meta | gen-src/Google/Protobuf/Meta/EnumOptionsMeta.php | EnumOptionsMeta.reset | public static function reset($object)
{
if (!($object instanceof EnumOptions)) {
throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\EnumOptions.');
}
$object->allowAlias = NULL;
$object->deprecated = NULL;
$object->uninterpretedOption = NULL;
} | php | public static function reset($object)
{
if (!($object instanceof EnumOptions)) {
throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\EnumOptions.');
}
$object->allowAlias = NULL;
$object->deprecated = NULL;
$object->uninterpretedOption = NULL;
} | [
"public",
"static",
"function",
"reset",
"(",
"$",
"object",
")",
"{",
"if",
"(",
"!",
"(",
"$",
"object",
"instanceof",
"EnumOptions",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'You have to pass object of class Google\\Protobuf\\EnumOpt... | Resets properties of \Google\Protobuf\EnumOptions to default values
@param EnumOptions $object
@throws \InvalidArgumentException
@return void | [
"Resets",
"properties",
"of",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"EnumOptions",
"to",
"default",
"values"
] | 013af6435d3885ab5b2e91fb8ebb051d0f874ab2 | https://github.com/skrz/meta/blob/013af6435d3885ab5b2e91fb8ebb051d0f874ab2/gen-src/Google/Protobuf/Meta/EnumOptionsMeta.php#L96-L104 |
233,609 | skrz/meta | gen-src/Google/Protobuf/Meta/EnumOptionsMeta.php | EnumOptionsMeta.toProtobuf | public static function toProtobuf($object, $filter = NULL)
{
$output = '';
if (isset($object->allowAlias) && ($filter === null || isset($filter['allowAlias']))) {
$output .= "\x10";
$output .= Binary::encodeVarint((int)$object->allowAlias);
}
if (isset($object->deprecated) && ($filter === null || isset... | php | public static function toProtobuf($object, $filter = NULL)
{
$output = '';
if (isset($object->allowAlias) && ($filter === null || isset($filter['allowAlias']))) {
$output .= "\x10";
$output .= Binary::encodeVarint((int)$object->allowAlias);
}
if (isset($object->deprecated) && ($filter === null || isset... | [
"public",
"static",
"function",
"toProtobuf",
"(",
"$",
"object",
",",
"$",
"filter",
"=",
"NULL",
")",
"{",
"$",
"output",
"=",
"''",
";",
"if",
"(",
"isset",
"(",
"$",
"object",
"->",
"allowAlias",
")",
"&&",
"(",
"$",
"filter",
"===",
"null",
"|... | Serialized \Google\Protobuf\EnumOptions to Protocol Buffers message.
@param EnumOptions $object
@param array $filter
@throws \Exception
@return string | [
"Serialized",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"EnumOptions",
"to",
"Protocol",
"Buffers",
"message",
"."
] | 013af6435d3885ab5b2e91fb8ebb051d0f874ab2 | https://github.com/skrz/meta/blob/013af6435d3885ab5b2e91fb8ebb051d0f874ab2/gen-src/Google/Protobuf/Meta/EnumOptionsMeta.php#L239-L263 |
233,610 | fedemotta/yii2-gridstack | Gridstack.php | Gridstack.endWidget | public function endWidget($tag='div')
{
$widget = array_pop($this->_widgets);
if (!is_null($widget)) {
return Html::endTag($tag);
} else {
throw new InvalidCallException('Mismatching endWidget() call.');
}
} | php | public function endWidget($tag='div')
{
$widget = array_pop($this->_widgets);
if (!is_null($widget)) {
return Html::endTag($tag);
} else {
throw new InvalidCallException('Mismatching endWidget() call.');
}
} | [
"public",
"function",
"endWidget",
"(",
"$",
"tag",
"=",
"'div'",
")",
"{",
"$",
"widget",
"=",
"array_pop",
"(",
"$",
"this",
"->",
"_widgets",
")",
";",
"if",
"(",
"!",
"is_null",
"(",
"$",
"widget",
")",
")",
"{",
"return",
"Html",
"::",
"endTag... | Generates a gridstack widget end tag.
@param string $tag
@return string the generated tag
@see beginWidget() | [
"Generates",
"a",
"gridstack",
"widget",
"end",
"tag",
"."
] | 66bf91eaa53d680e926c23745d9293408d1f298e | https://github.com/fedemotta/yii2-gridstack/blob/66bf91eaa53d680e926c23745d9293408d1f298e/Gridstack.php#L85-L93 |
233,611 | fedemotta/yii2-gridstack | Gridstack.php | Gridstack.run | public function run()
{
if (!empty($this->_widgets)) {
throw new InvalidCallException('Each beginWidget() should have a matching endWidget() call.');
}
$id = $this->options['id'];
$view = $this->getView();
$options = !empty($this->clientOptions) ? Json::encode($th... | php | public function run()
{
if (!empty($this->_widgets)) {
throw new InvalidCallException('Each beginWidget() should have a matching endWidget() call.');
}
$id = $this->options['id'];
$view = $this->getView();
$options = !empty($this->clientOptions) ? Json::encode($th... | [
"public",
"function",
"run",
"(",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"_widgets",
")",
")",
"{",
"throw",
"new",
"InvalidCallException",
"(",
"'Each beginWidget() should have a matching endWidget() call.'",
")",
";",
"}",
"$",
"id",
"=",... | Runs the widget.
This registers the necessary javascript code and renders the gridstack close tag.
@throws InvalidCallException if `beginWidget()` and `endWidget()` calls are not matching | [
"Runs",
"the",
"widget",
".",
"This",
"registers",
"the",
"necessary",
"javascript",
"code",
"and",
"renders",
"the",
"gridstack",
"close",
"tag",
"."
] | 66bf91eaa53d680e926c23745d9293408d1f298e | https://github.com/fedemotta/yii2-gridstack/blob/66bf91eaa53d680e926c23745d9293408d1f298e/Gridstack.php#L111-L122 |
233,612 | yarcode/yii2-email-manager | src/commands/EmailCommand.php | EmailCommand.actionRunSpoolDaemon | public function actionRunSpoolDaemon($loopLimit = 1000, $chunkSize = 100)
{
set_time_limit(0);
for ($i = 1; $i < $loopLimit; $i++) {
$this->runChunk($chunkSize);
sleep(1);
}
} | php | public function actionRunSpoolDaemon($loopLimit = 1000, $chunkSize = 100)
{
set_time_limit(0);
for ($i = 1; $i < $loopLimit; $i++) {
$this->runChunk($chunkSize);
sleep(1);
}
} | [
"public",
"function",
"actionRunSpoolDaemon",
"(",
"$",
"loopLimit",
"=",
"1000",
",",
"$",
"chunkSize",
"=",
"100",
")",
"{",
"set_time_limit",
"(",
"0",
")",
";",
"for",
"(",
"$",
"i",
"=",
"1",
";",
"$",
"i",
"<",
"$",
"loopLimit",
";",
"$",
"i"... | Run daemon based on "for cycle"
@param int $loopLimit
@param int $chunkSize | [
"Run",
"daemon",
"based",
"on",
"for",
"cycle"
] | 4e83eae67199fc2b9eca9f08dcf59cc0440c385a | https://github.com/yarcode/yii2-email-manager/blob/4e83eae67199fc2b9eca9f08dcf59cc0440c385a/src/commands/EmailCommand.php#L25-L32 |
233,613 | yarcode/yii2-email-manager | src/commands/EmailCommand.php | EmailCommand.actionRunLoopDaemon | public function actionRunLoopDaemon() {
$loop = Factory::create();
$loop->addPeriodicTimer(1, function() {
$this->runChunk();
});
$loop->run();
} | php | public function actionRunLoopDaemon() {
$loop = Factory::create();
$loop->addPeriodicTimer(1, function() {
$this->runChunk();
});
$loop->run();
} | [
"public",
"function",
"actionRunLoopDaemon",
"(",
")",
"{",
"$",
"loop",
"=",
"Factory",
"::",
"create",
"(",
")",
";",
"$",
"loop",
"->",
"addPeriodicTimer",
"(",
"1",
",",
"function",
"(",
")",
"{",
"$",
"this",
"->",
"runChunk",
"(",
")",
";",
"}"... | Run daemon based on ReactPHP loop | [
"Run",
"daemon",
"based",
"on",
"ReactPHP",
"loop"
] | 4e83eae67199fc2b9eca9f08dcf59cc0440c385a | https://github.com/yarcode/yii2-email-manager/blob/4e83eae67199fc2b9eca9f08dcf59cc0440c385a/src/commands/EmailCommand.php#L37-L45 |
233,614 | yarcode/yii2-email-manager | src/commands/EmailCommand.php | EmailCommand.sendOne | public function sendOne() {
$db = \Yii::$app->db;
$transaction = $db->beginTransaction();
try {
$id = $db->createCommand('SELECT id FROM {{%email_message}} WHERE status=:status ORDER BY priority DESC, id ASC LIMIT 1 FOR UPDATE', [
'status' => Message::STATUS_NEW,
... | php | public function sendOne() {
$db = \Yii::$app->db;
$transaction = $db->beginTransaction();
try {
$id = $db->createCommand('SELECT id FROM {{%email_message}} WHERE status=:status ORDER BY priority DESC, id ASC LIMIT 1 FOR UPDATE', [
'status' => Message::STATUS_NEW,
... | [
"public",
"function",
"sendOne",
"(",
")",
"{",
"$",
"db",
"=",
"\\",
"Yii",
"::",
"$",
"app",
"->",
"db",
";",
"$",
"transaction",
"=",
"$",
"db",
"->",
"beginTransaction",
"(",
")",
";",
"try",
"{",
"$",
"id",
"=",
"$",
"db",
"->",
"createComma... | Send one email from queue
@return bool
@throws \Exception
@throws \yii\db\Exception | [
"Send",
"one",
"email",
"from",
"queue"
] | 4e83eae67199fc2b9eca9f08dcf59cc0440c385a | https://github.com/yarcode/yii2-email-manager/blob/4e83eae67199fc2b9eca9f08dcf59cc0440c385a/src/commands/EmailCommand.php#L79-L130 |
233,615 | MW-Peachy/Peachy | Includes/Page.php | Page.history | public function history( $count = 1, $dir = "older", $content = false, $revid = null, $rollback_token = false, $recurse = false ) {
if( !$this->exists ) return array();
$historyArray = array(
'action' => 'query',
'prop' => 'revisions',
'titles' => $this->title,
'rvprop' => 'timestamp|ids|user|comment... | php | public function history( $count = 1, $dir = "older", $content = false, $revid = null, $rollback_token = false, $recurse = false ) {
if( !$this->exists ) return array();
$historyArray = array(
'action' => 'query',
'prop' => 'revisions',
'titles' => $this->title,
'rvprop' => 'timestamp|ids|user|comment... | [
"public",
"function",
"history",
"(",
"$",
"count",
"=",
"1",
",",
"$",
"dir",
"=",
"\"older\"",
",",
"$",
"content",
"=",
"false",
",",
"$",
"revid",
"=",
"null",
",",
"$",
"rollback_token",
"=",
"false",
",",
"$",
"recurse",
"=",
"false",
")",
"{... | Returns page history. Can be specified to return content as well
@param int $count Revisions to return (default: 1)
@param string $dir Direction to return revisions (default: "older")
@param bool $content Should content of that revision be returned as well (default: false)
@param int $revid Revision ID to start from (... | [
"Returns",
"page",
"history",
".",
"Can",
"be",
"specified",
"to",
"return",
"content",
"as",
"well"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L319-L366 |
233,616 | MW-Peachy/Peachy | Includes/Page.php | Page.get_links | public function get_links( $force = false, $namespace = array(), $titles = array() ) {
if( !$force && $this->links !== null ) {
return $this->links;
}
$this->links = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' => 'links',
'titles' => $this->title,
'_code' => '... | php | public function get_links( $force = false, $namespace = array(), $titles = array() ) {
if( !$force && $this->links !== null ) {
return $this->links;
}
$this->links = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' => 'links',
'titles' => $this->title,
'_code' => '... | [
"public",
"function",
"get_links",
"(",
"$",
"force",
"=",
"false",
",",
"$",
"namespace",
"=",
"array",
"(",
")",
",",
"$",
"titles",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"!",
"$",
"force",
"&&",
"$",
"this",
"->",
"links",
"!==",
"null"... | Returns links on the page.
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#links_.2F_pl
@param bool $force Force use of API, won't use cached copy (default: false)
@param array $namespace Show links in this namespace(s) only. Default array()
@param array $titles Only list links to these titles. Default ar... | [
"Returns",
"links",
"on",
"the",
"page",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L494-L524 |
233,617 | MW-Peachy/Peachy | Includes/Page.php | Page.get_templates | public function get_templates( $force = false, $namespace = array(), $template = array() ) {
if( !$force && $this->templates !== null && empty( $namespace ) && empty( $template ) ) {
return $this->templates;
}
$this->templates = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' ... | php | public function get_templates( $force = false, $namespace = array(), $template = array() ) {
if( !$force && $this->templates !== null && empty( $namespace ) && empty( $template ) ) {
return $this->templates;
}
$this->templates = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' ... | [
"public",
"function",
"get_templates",
"(",
"$",
"force",
"=",
"false",
",",
"$",
"namespace",
"=",
"array",
"(",
")",
",",
"$",
"template",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"!",
"$",
"force",
"&&",
"$",
"this",
"->",
"templates",
"!=="... | Returns templates on the page
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#templates_.2F_tl
@param bool $force Force use of API, won't use cached copy (default: false)
@param array $namespace Show templates in this namespace(s) only. Default array().
@param array $template Only list these templates. Defa... | [
"Returns",
"templates",
"on",
"the",
"page"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L535-L564 |
233,618 | MW-Peachy/Peachy | Includes/Page.php | Page.get_properties | public function get_properties( $force = false ) {
if( !$force && $this->properties !== null ) {
return $this->properties;
}
$this->properties = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' => 'pageprops',
'titles' => $this->title,
'_code' => 'pp'
);
pecho( "Get... | php | public function get_properties( $force = false ) {
if( !$force && $this->properties !== null ) {
return $this->properties;
}
$this->properties = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' => 'pageprops',
'titles' => $this->title,
'_code' => 'pp'
);
pecho( "Get... | [
"public",
"function",
"get_properties",
"(",
"$",
"force",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"force",
"&&",
"$",
"this",
"->",
"properties",
"!==",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"properties",
";",
"}",
"$",
"this",
"->",
... | Get various properties defined in the page content
@link https://www.mediawiki.org/wiki/API:Properties#pageprops_.2F_pp
@param bool $force Force use of API, won't use cached copy (default: false)
@return bool|array False on error, array of template titles | [
"Get",
"various",
"properties",
"defined",
"in",
"the",
"page",
"content"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L573-L593 |
233,619 | MW-Peachy/Peachy | Includes/Page.php | Page.get_categories | public function get_categories( $force = false, $prop = array(
'sortkey', 'timestamp', 'hidden'
), $hidden = false ) {
if( !$force && $this->categories !== null ) {
return $this->categories;
}
$this->categories = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' => 'categor... | php | public function get_categories( $force = false, $prop = array(
'sortkey', 'timestamp', 'hidden'
), $hidden = false ) {
if( !$force && $this->categories !== null ) {
return $this->categories;
}
$this->categories = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' => 'categor... | [
"public",
"function",
"get_categories",
"(",
"$",
"force",
"=",
"false",
",",
"$",
"prop",
"=",
"array",
"(",
"'sortkey'",
",",
"'timestamp'",
",",
"'hidden'",
")",
",",
"$",
"hidden",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"force",
"&&",
"$",
... | Returns categories of page
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#categories_.2F_cl
@param bool $force Force use of API, won't use cached copy (default: false)
@param array|string $prop Which additional properties to get for each category. Default all
@param bool $hidden Show hidden categories. Def... | [
"Returns",
"categories",
"of",
"page"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L604-L637 |
233,620 | MW-Peachy/Peachy | Includes/Page.php | Page.get_images | public function get_images( $force = false, $images = null ) {
if( !$force && $this->images !== null ) {
return $this->images;
}
$this->images = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' => 'images',
'titles' => $this->title,
'_code' => 'im',
'_lhtitle' =... | php | public function get_images( $force = false, $images = null ) {
if( !$force && $this->images !== null ) {
return $this->images;
}
$this->images = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' => 'images',
'titles' => $this->title,
'_code' => 'im',
'_lhtitle' =... | [
"public",
"function",
"get_images",
"(",
"$",
"force",
"=",
"false",
",",
"$",
"images",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"force",
"&&",
"$",
"this",
"->",
"images",
"!==",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"images",
";",
... | Returns images used in the page
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#images_.2F_im
@param bool $force Force use of API, won't use cached copy (default: false)
@param string|array $images Only list these images. Default null.
@return bool|array False on error, returns array of image titles | [
"Returns",
"images",
"used",
"in",
"the",
"page"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L647-L682 |
233,621 | MW-Peachy/Peachy | Includes/Page.php | Page.get_extlinks | public function get_extlinks( $force = false ) {
if( !$force && $this->extlinks !== null ) {
return $this->extlinks;
}
$this->extlinks = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' => 'extlinks',
'titles' => $this->title,
'_code' => 'el',
'_lhtitle' => 'ext... | php | public function get_extlinks( $force = false ) {
if( !$force && $this->extlinks !== null ) {
return $this->extlinks;
}
$this->extlinks = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' => 'extlinks',
'titles' => $this->title,
'_code' => 'el',
'_lhtitle' => 'ext... | [
"public",
"function",
"get_extlinks",
"(",
"$",
"force",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"force",
"&&",
"$",
"this",
"->",
"extlinks",
"!==",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"extlinks",
";",
"}",
"$",
"this",
"->",
"extl... | Returns external links used in the page
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#extlinks_.2F_el
@param bool $force Force use of API, won't use cached copy (default: false)
@return bool|array False on error, returns array of URLs | [
"Returns",
"external",
"links",
"used",
"in",
"the",
"page"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L691-L718 |
233,622 | MW-Peachy/Peachy | Includes/Page.php | Page.get_langlinks | public function get_langlinks( $force = false, $fullurl = false, $title = null, $lang = null ) {
if( !$force && $this->langlinks !== null ) {
return $this->langlinks;
}
$this->langlinks = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' => 'langlinks',
'titles' => $this->... | php | public function get_langlinks( $force = false, $fullurl = false, $title = null, $lang = null ) {
if( !$force && $this->langlinks !== null ) {
return $this->langlinks;
}
$this->langlinks = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' => 'langlinks',
'titles' => $this->... | [
"public",
"function",
"get_langlinks",
"(",
"$",
"force",
"=",
"false",
",",
"$",
"fullurl",
"=",
"false",
",",
"$",
"title",
"=",
"null",
",",
"$",
"lang",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"force",
"&&",
"$",
"this",
"->",
"langlinks",
... | Returns interlanguage links on the page
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#langlinks_.2F_ll
@param bool $force Force use of API, won't use cached copy (default: false)
@param bool $fullurl Include a list of full of URLs. Output formatting changes. Requires force parameter to be true to return... | [
"Returns",
"interlanguage",
"links",
"on",
"the",
"page"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L730-L764 |
233,623 | MW-Peachy/Peachy | Includes/Page.php | Page.get_interwikilinks | public function get_interwikilinks( $force = false, $fullurl = false, $title = null, $prefix = null ) {
if( !$force && $this->iwlinks !== null ) {
return $this->iwlinks;
}
$this->iwlinks = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' => 'iwlinks',
'titles' => $this->t... | php | public function get_interwikilinks( $force = false, $fullurl = false, $title = null, $prefix = null ) {
if( !$force && $this->iwlinks !== null ) {
return $this->iwlinks;
}
$this->iwlinks = array();
if( !$this->exists ) return array();
$tArray = array(
'prop' => 'iwlinks',
'titles' => $this->t... | [
"public",
"function",
"get_interwikilinks",
"(",
"$",
"force",
"=",
"false",
",",
"$",
"fullurl",
"=",
"false",
",",
"$",
"title",
"=",
"null",
",",
"$",
"prefix",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"force",
"&&",
"$",
"this",
"->",
"iwlin... | Returns interwiki links on the page
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#langlinks_.2F_ll
@param bool $force Force use of API, won't use cached copy (default: false)
@param bool $fullurl Include a list of full of URLs. Output formatting changes. Requires force parameter to be true to return a d... | [
"Returns",
"interwiki",
"links",
"on",
"the",
"page"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L776-L811 |
233,624 | MW-Peachy/Peachy | Includes/Page.php | Page.get_protection | public function get_protection( $force = false ) {
if( !$force && $this->protection !== null ) {
return $this->protection;
}
$this->protection = array();
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'protection',
'titles' => $this->title,
);
pecho( "Getting protec... | php | public function get_protection( $force = false ) {
if( !$force && $this->protection !== null ) {
return $this->protection;
}
$this->protection = array();
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'protection',
'titles' => $this->title,
);
pecho( "Getting protec... | [
"public",
"function",
"get_protection",
"(",
"$",
"force",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"force",
"&&",
"$",
"this",
"->",
"protection",
"!==",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"protection",
";",
"}",
"$",
"this",
"->",
... | Returns the protection level of the page
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#info_.2F_in
@param bool $force Force use of API, won't use cached copy (default: false)
@return bool|array False on error, returns array with protection levels | [
"Returns",
"the",
"protection",
"level",
"of",
"the",
"page"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L820-L843 |
233,625 | MW-Peachy/Peachy | Includes/Page.php | Page.get_talkID | public function get_talkID( $force = false ) {
if( !$force ) {
return $this->talkid;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'talkid',
'titles' => $this->title,
);
pecho( "Getting talk page ID for {$this->title}..\n\n", PECHO_NORMAL );
$tRes = $this->wiki->... | php | public function get_talkID( $force = false ) {
if( !$force ) {
return $this->talkid;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'talkid',
'titles' => $this->title,
);
pecho( "Getting talk page ID for {$this->title}..\n\n", PECHO_NORMAL );
$tRes = $this->wiki->... | [
"public",
"function",
"get_talkID",
"(",
"$",
"force",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"force",
")",
"{",
"return",
"$",
"this",
"->",
"talkid",
";",
"}",
"$",
"tArray",
"=",
"array",
"(",
"'action'",
"=>",
"'query'",
",",
"'prop'",
"=... | Returns the page ID of the talk page for each non-talk page
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#info_.2F_in
@param bool $force Force use of API, won't use cached copy (default: false)
@return int Null or empty if no id exists. | [
"Returns",
"the",
"page",
"ID",
"of",
"the",
"talk",
"page",
"for",
"each",
"non",
"-",
"talk",
"page"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L852-L874 |
233,626 | MW-Peachy/Peachy | Includes/Page.php | Page.is_watched | public function is_watched( $force = false ) {
if( !$force && $this->watched !== null ) {
return $this->watched;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'watched',
'titles' => $this->title,
);
pecho( "Getting watch status for {$this->title}..\n\n", PECHO_NORMA... | php | public function is_watched( $force = false ) {
if( !$force && $this->watched !== null ) {
return $this->watched;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'watched',
'titles' => $this->title,
);
pecho( "Getting watch status for {$this->title}..\n\n", PECHO_NORMA... | [
"public",
"function",
"is_watched",
"(",
"$",
"force",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"force",
"&&",
"$",
"this",
"->",
"watched",
"!==",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"watched",
";",
"}",
"$",
"tArray",
"=",
"array",... | Returns the watch status of the page
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#info_.2F_in
@param bool $force Force use of API, won't use cached copy (default: false)
@return bool | [
"Returns",
"the",
"watch",
"status",
"of",
"the",
"page"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L883-L905 |
233,627 | MW-Peachy/Peachy | Includes/Page.php | Page.get_watchcount | public function get_watchcount( $force = false ) {
if( !$force && $this->watchers !== null ) {
return $this->watchers;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'watchers',
'titles' => $this->title,
);
pecho( "Getting watch count for {$this->title}..\n\n", PECHO... | php | public function get_watchcount( $force = false ) {
if( !$force && $this->watchers !== null ) {
return $this->watchers;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'watchers',
'titles' => $this->title,
);
pecho( "Getting watch count for {$this->title}..\n\n", PECHO... | [
"public",
"function",
"get_watchcount",
"(",
"$",
"force",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"force",
"&&",
"$",
"this",
"->",
"watchers",
"!==",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"watchers",
";",
"}",
"$",
"tArray",
"=",
"a... | Returns the count for the number of watchers of a page.
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#info_.2F_in
@param bool $force Force use of API, won't use cached copy (default: false)
@return int | [
"Returns",
"the",
"count",
"for",
"the",
"number",
"of",
"watchers",
"of",
"a",
"page",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L914-L936 |
233,628 | MW-Peachy/Peachy | Includes/Page.php | Page.get_notificationtimestamp | public function get_notificationtimestamp( $force = false ) {
if( !$force ) {
return $this->watchlisttimestamp;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'notificationtimestamp',
'titles' => $this->title,
);
pecho( "Getting the notification timestamp for {$this-... | php | public function get_notificationtimestamp( $force = false ) {
if( !$force ) {
return $this->watchlisttimestamp;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'notificationtimestamp',
'titles' => $this->title,
);
pecho( "Getting the notification timestamp for {$this-... | [
"public",
"function",
"get_notificationtimestamp",
"(",
"$",
"force",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"force",
")",
"{",
"return",
"$",
"this",
"->",
"watchlisttimestamp",
";",
"}",
"$",
"tArray",
"=",
"array",
"(",
"'action'",
"=>",
"'query... | Returns the watchlist notification timestamp of each page.
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#info_.2F_in
@param bool $force Force use of API, won't use cached copy (default: false)
@return string | [
"Returns",
"the",
"watchlist",
"notification",
"timestamp",
"of",
"each",
"page",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L945-L967 |
233,629 | MW-Peachy/Peachy | Includes/Page.php | Page.get_subjectid | public function get_subjectid( $force = false ) {
if( !$force ) {
return $this->subjectid;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'subjectid',
'titles' => $this->title,
);
pecho( "Getting the parent page ID for {$this->title}..\n\n", PECHO_NORMAL );
$tRes ... | php | public function get_subjectid( $force = false ) {
if( !$force ) {
return $this->subjectid;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'subjectid',
'titles' => $this->title,
);
pecho( "Getting the parent page ID for {$this->title}..\n\n", PECHO_NORMAL );
$tRes ... | [
"public",
"function",
"get_subjectid",
"(",
"$",
"force",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"force",
")",
"{",
"return",
"$",
"this",
"->",
"subjectid",
";",
"}",
"$",
"tArray",
"=",
"array",
"(",
"'action'",
"=>",
"'query'",
",",
"'prop'"... | Returns the page ID of the parent page for each talk page.
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#info_.2F_in
@param bool $force Force use of API, won't use cached copy (default: false)
@return int Null if it doesn't exist. | [
"Returns",
"the",
"page",
"ID",
"of",
"the",
"parent",
"page",
"for",
"each",
"talk",
"page",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L976-L998 |
233,630 | MW-Peachy/Peachy | Includes/Page.php | Page.get_urls | public function get_urls( $force = false ) {
if( !$force && $this->urls !== null ) {
return $this->urls;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'url',
'titles' => $this->title,
);
pecho( "Getting the URLs for {$this->title}..\n\n", PECHO_NORMAL );
$tRes = ... | php | public function get_urls( $force = false ) {
if( !$force && $this->urls !== null ) {
return $this->urls;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'url',
'titles' => $this->title,
);
pecho( "Getting the URLs for {$this->title}..\n\n", PECHO_NORMAL );
$tRes = ... | [
"public",
"function",
"get_urls",
"(",
"$",
"force",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"force",
"&&",
"$",
"this",
"->",
"urls",
"!==",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"urls",
";",
"}",
"$",
"tArray",
"=",
"array",
"(",
... | Gives a full URL to the page, and also an edit URL.
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#info_.2F_in
@param bool $force Force use of API, won't use cached copy (default: false)
@return array | [
"Gives",
"a",
"full",
"URL",
"to",
"the",
"page",
"and",
"also",
"an",
"edit",
"URL",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L1007-L1031 |
233,631 | MW-Peachy/Peachy | Includes/Page.php | Page.get_readability | public function get_readability( $force = false ) {
if( !$force && $this->readable !== null ) {
return $this->readable;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'readable',
'titles' => $this->title,
);
pecho( "Getting the readability status for {$this->title}..... | php | public function get_readability( $force = false ) {
if( !$force && $this->readable !== null ) {
return $this->readable;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'readable',
'titles' => $this->title,
);
pecho( "Getting the readability status for {$this->title}..... | [
"public",
"function",
"get_readability",
"(",
"$",
"force",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"force",
"&&",
"$",
"this",
"->",
"readable",
"!==",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"readable",
";",
"}",
"$",
"tArray",
"=",
"... | Returns whether the user can read this page.
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#info_.2F_in
@param bool $force Force use of API, won't use cached copy (default: false)
@return boolean Null if it doesn't exist. | [
"Returns",
"whether",
"the",
"user",
"can",
"read",
"this",
"page",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L1040-L1062 |
233,632 | MW-Peachy/Peachy | Includes/Page.php | Page.get_preload | public function get_preload( $force = false ) {
if( !$force ) {
return $this->preload;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'preload',
'titles' => $this->title,
);
pecho( "Getting the preload text for {$this->title}..\n\n", PECHO_NORMAL );
$tRes = $this-... | php | public function get_preload( $force = false ) {
if( !$force ) {
return $this->preload;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'preload',
'titles' => $this->title,
);
pecho( "Getting the preload text for {$this->title}..\n\n", PECHO_NORMAL );
$tRes = $this-... | [
"public",
"function",
"get_preload",
"(",
"$",
"force",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"force",
")",
"{",
"return",
"$",
"this",
"->",
"preload",
";",
"}",
"$",
"tArray",
"=",
"array",
"(",
"'action'",
"=>",
"'query'",
",",
"'prop'",
... | Gives the text returned by EditFormPreloadText.
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#info_.2F_in
@param bool $force Force use of API, won't use cached copy (default: false)
@return string | [
"Gives",
"the",
"text",
"returned",
"by",
"EditFormPreloadText",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L1071-L1093 |
233,633 | MW-Peachy/Peachy | Includes/Page.php | Page.get_displaytitle | public function get_displaytitle( $force = false ) {
if( !$force ) {
return $this->displaytitle;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'displaytitle',
'titles' => $this->title,
);
pecho( "Getting the title formatting for {$this->title}..\n\n", PECHO_NORMAL )... | php | public function get_displaytitle( $force = false ) {
if( !$force ) {
return $this->displaytitle;
}
$tArray = array(
'action' => 'query',
'prop' => 'info',
'inprop' => 'displaytitle',
'titles' => $this->title,
);
pecho( "Getting the title formatting for {$this->title}..\n\n", PECHO_NORMAL )... | [
"public",
"function",
"get_displaytitle",
"(",
"$",
"force",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"$",
"force",
")",
"{",
"return",
"$",
"this",
"->",
"displaytitle",
";",
"}",
"$",
"tArray",
"=",
"array",
"(",
"'action'",
"=>",
"'query'",
",",
"'... | Gives the way the page title is actually displayed.
@link http://www.mediawiki.org/wiki/API:Query_-_Properties#info_.2F_in
@param bool $force Force use of API, won't use cached copy (default: false)
@return string | [
"Gives",
"the",
"way",
"the",
"page",
"title",
"is",
"actually",
"displayed",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L1102-L1124 |
233,634 | MW-Peachy/Peachy | Includes/Page.php | Page.protect | public function protect( $levels = null, $reason = null, $expiry = 'indefinite', $cascade = false, $watch = null ) {
global $pgNotag, $pgTag;
if( !in_array( 'protect', $this->wiki->get_userrights() ) ) {
pecho( "User is not allowed to protect pages", PECHO_FATAL );
return false;
}
if( $levels === null ){... | php | public function protect( $levels = null, $reason = null, $expiry = 'indefinite', $cascade = false, $watch = null ) {
global $pgNotag, $pgTag;
if( !in_array( 'protect', $this->wiki->get_userrights() ) ) {
pecho( "User is not allowed to protect pages", PECHO_FATAL );
return false;
}
if( $levels === null ){... | [
"public",
"function",
"protect",
"(",
"$",
"levels",
"=",
"null",
",",
"$",
"reason",
"=",
"null",
",",
"$",
"expiry",
"=",
"'indefinite'",
",",
"$",
"cascade",
"=",
"false",
",",
"$",
"watch",
"=",
"null",
")",
"{",
"global",
"$",
"pgNotag",
",",
... | Protects the page.
@param array $levels Array of protections levels. The key is the type, the value is the level. Default: array( 'edit' => 'sysop', 'move' => 'sysop' )
@param string $reason Reason for protection. Default null
@param string $expiry Expiry time. Default 'indefinite'
@param bool $cascade Whether or not ... | [
"Protects",
"the",
"page",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L1564-L1632 |
233,635 | MW-Peachy/Peachy | Includes/Page.php | Page.unprotect | public function unprotect( $reason = null, $watch = null ) {
return $this->protect( array(), $reason, 'indefinite', false, $watch );
} | php | public function unprotect( $reason = null, $watch = null ) {
return $this->protect( array(), $reason, 'indefinite', false, $watch );
} | [
"public",
"function",
"unprotect",
"(",
"$",
"reason",
"=",
"null",
",",
"$",
"watch",
"=",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"protect",
"(",
"array",
"(",
")",
",",
"$",
"reason",
",",
"'indefinite'",
",",
"false",
",",
"$",
"watch",
... | Unprotects the page.
@param string $reason A reason for the unprotection. Defaults to null (blank).
@param string|bool $watch Unconditionally add or remove the page from your watchlist, use preferences or do not change watch. Default: go by user preference.
@return bool True on success | [
"Unprotects",
"the",
"page",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L1641-L1643 |
233,636 | MW-Peachy/Peachy | Includes/Page.php | Page.delete | public function delete( $reason = null, $watch = null, $oldimage = null ) {
global $pgNotag, $pgTag;
if( !in_array( 'delete', $this->wiki->get_userrights() ) ) {
pecho( "User is not allowed to delete pages", PECHO_FATAL );
return false;
}
$tokens = $this->wiki->get_tokens();
if( !$pgNotag ) $reason .=... | php | public function delete( $reason = null, $watch = null, $oldimage = null ) {
global $pgNotag, $pgTag;
if( !in_array( 'delete', $this->wiki->get_userrights() ) ) {
pecho( "User is not allowed to delete pages", PECHO_FATAL );
return false;
}
$tokens = $this->wiki->get_tokens();
if( !$pgNotag ) $reason .=... | [
"public",
"function",
"delete",
"(",
"$",
"reason",
"=",
"null",
",",
"$",
"watch",
"=",
"null",
",",
"$",
"oldimage",
"=",
"null",
")",
"{",
"global",
"$",
"pgNotag",
",",
"$",
"pgTag",
";",
"if",
"(",
"!",
"in_array",
"(",
"'delete'",
",",
"$",
... | Deletes the page.
@param string $reason A reason for the deletion. Defaults to null (blank).
@param string|bool $watch Unconditionally add or remove the page from your watchlist, use preferences or do not change watch. Default: go by user preference.
@param string $oldimage The name of the old image to delete as provi... | [
"Deletes",
"the",
"page",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L1653-L1709 |
233,637 | MW-Peachy/Peachy | Includes/Page.php | Page.undelete | public function undelete( $reason = null, $timestamps = null, $watch = null ) {
global $pgNotag, $pgTag;
if( !in_array( 'undelete', $this->wiki->get_userrights() ) ) {
pecho( "User is not allowed to undelete pages", PECHO_FATAL );
return false;
}
$tokens = $this->wiki->get_tokens();
if( !$pgNotag ) $re... | php | public function undelete( $reason = null, $timestamps = null, $watch = null ) {
global $pgNotag, $pgTag;
if( !in_array( 'undelete', $this->wiki->get_userrights() ) ) {
pecho( "User is not allowed to undelete pages", PECHO_FATAL );
return false;
}
$tokens = $this->wiki->get_tokens();
if( !$pgNotag ) $re... | [
"public",
"function",
"undelete",
"(",
"$",
"reason",
"=",
"null",
",",
"$",
"timestamps",
"=",
"null",
",",
"$",
"watch",
"=",
"null",
")",
"{",
"global",
"$",
"pgNotag",
",",
"$",
"pgTag",
";",
"if",
"(",
"!",
"in_array",
"(",
"'undelete'",
",",
... | Undeletes the page
@param string $reason Reason for undeletion
@param array $timestamps Array of timestamps to selectively restore
@param string|bool $watch Unconditionally add or remove the page from your watchlist, use preferences or do not change watch. Default: go by user preference.
@return bool | [
"Undeletes",
"the",
"page"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L1719-L1780 |
233,638 | MW-Peachy/Peachy | Includes/Page.php | Page.deletedrevs | public function deletedrevs( $content = false, $user = null, $excludeuser = null, $start = null, $end = null, $dir = 'older', $prop = array(
'revid', 'user', 'parsedcomment', 'minor', 'len', 'content', 'token'
) ) {
if( !in_array( 'deletedhistory', $this->wiki->get_userrights() ) ) {
pecho( "User is not allowed... | php | public function deletedrevs( $content = false, $user = null, $excludeuser = null, $start = null, $end = null, $dir = 'older', $prop = array(
'revid', 'user', 'parsedcomment', 'minor', 'len', 'content', 'token'
) ) {
if( !in_array( 'deletedhistory', $this->wiki->get_userrights() ) ) {
pecho( "User is not allowed... | [
"public",
"function",
"deletedrevs",
"(",
"$",
"content",
"=",
"false",
",",
"$",
"user",
"=",
"null",
",",
"$",
"excludeuser",
"=",
"null",
",",
"$",
"start",
"=",
"null",
",",
"$",
"end",
"=",
"null",
",",
"$",
"dir",
"=",
"'older'",
",",
"$",
... | List deleted revisions of the page
@param bool $content Whether or not to retrieve the content of each revision, Default false
@param string $user Only list revisions by this user. Default null.
@param string $excludeuser Don't list revisions by this user. Default null
@param string $start Timestamp to start at. Defau... | [
"List",
"deleted",
"revisions",
"of",
"the",
"page"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L1794-L1820 |
233,639 | MW-Peachy/Peachy | Includes/Page.php | Page.watch | public function watch( $lang = null ) {
Hooks::runHook( 'StartWatch' );
pecho( "Watching {$this->title}...\n\n", PECHO_NOTICE );
$tokens = $this->wiki->get_tokens();
if( $tokens['watch'] == '+\\' ) {
pecho( "User has logged out.\n\n", PECHO_FATAL );
return false;
}
$apiArray = array(
'action' ... | php | public function watch( $lang = null ) {
Hooks::runHook( 'StartWatch' );
pecho( "Watching {$this->title}...\n\n", PECHO_NOTICE );
$tokens = $this->wiki->get_tokens();
if( $tokens['watch'] == '+\\' ) {
pecho( "User has logged out.\n\n", PECHO_FATAL );
return false;
}
$apiArray = array(
'action' ... | [
"public",
"function",
"watch",
"(",
"$",
"lang",
"=",
"null",
")",
"{",
"Hooks",
"::",
"runHook",
"(",
"'StartWatch'",
")",
";",
"pecho",
"(",
"\"Watching {$this->title}...\\n\\n\"",
",",
"PECHO_NOTICE",
")",
";",
"$",
"tokens",
"=",
"$",
"this",
"->",
"wi... | Adds the page to the logged in user's watchlist
@param string $lang The code for the language to show any error message in (default: user preference)
@return bool True on success | [
"Adds",
"the",
"page",
"to",
"the",
"logged",
"in",
"user",
"s",
"watchlist"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L1842-L1877 |
233,640 | MW-Peachy/Peachy | Includes/Page.php | Page.get_namespace | public function get_namespace( $id = true ) {
if( $id ) {
return $this->namespace_id;
} else {
$namespaces = $this->wiki->get_namespaces();
return $namespaces[$this->namespace_id];
}
} | php | public function get_namespace( $id = true ) {
if( $id ) {
return $this->namespace_id;
} else {
$namespaces = $this->wiki->get_namespaces();
return $namespaces[$this->namespace_id];
}
} | [
"public",
"function",
"get_namespace",
"(",
"$",
"id",
"=",
"true",
")",
"{",
"if",
"(",
"$",
"id",
")",
"{",
"return",
"$",
"this",
"->",
"namespace_id",
";",
"}",
"else",
"{",
"$",
"namespaces",
"=",
"$",
"this",
"->",
"wiki",
"->",
"get_namespaces... | Gets ID or name of the namespace
@param bool $id Set to true to get namespace ID, set to false to get namespace name. Default true
@return int|string | [
"Gets",
"ID",
"or",
"name",
"of",
"the",
"namespace"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L1959-L1967 |
233,641 | MW-Peachy/Peachy | Includes/Page.php | Page.get_backlinks | public function get_backlinks( $namespaces = array( 0 ), $redirects = 'all', $followredir = true ) {
$leArray = array(
'list' => 'backlinks',
'_code' => 'bl',
'blnamespace' => $namespaces,
'blfilterredir' => $redirects,
'bltitle' => $this->title
);
if( $followredir ) $leAr... | php | public function get_backlinks( $namespaces = array( 0 ), $redirects = 'all', $followredir = true ) {
$leArray = array(
'list' => 'backlinks',
'_code' => 'bl',
'blnamespace' => $namespaces,
'blfilterredir' => $redirects,
'bltitle' => $this->title
);
if( $followredir ) $leAr... | [
"public",
"function",
"get_backlinks",
"(",
"$",
"namespaces",
"=",
"array",
"(",
"0",
")",
",",
"$",
"redirects",
"=",
"'all'",
",",
"$",
"followredir",
"=",
"true",
")",
"{",
"$",
"leArray",
"=",
"array",
"(",
"'list'",
"=>",
"'backlinks'",
",",
"'_c... | Returns all links to the page
@param array $namespaces Namespaces to get. Default array( 0 );
@param string $redirects How to handle redirects. 'all' = List all pages. 'redirects' = Only list redirects. 'nonredirects' = Don't list redirects. Default 'all'
@param bool $followredir List links through redirects to the pa... | [
"Returns",
"all",
"links",
"to",
"the",
"page"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Page.php#L2089-L2105 |
233,642 | scherersoftware/cake-model-history | src/Controller/ModelHistoryController.php | ModelHistoryController.diff | public function diff(string $currentId = null): void
{
$historyEntry = $this->ModelHistory->get($currentId);
$this->FrontendBridge->setBoth('diffOutput', $this->ModelHistory->buildDiff($historyEntry));
} | php | public function diff(string $currentId = null): void
{
$historyEntry = $this->ModelHistory->get($currentId);
$this->FrontendBridge->setBoth('diffOutput', $this->ModelHistory->buildDiff($historyEntry));
} | [
"public",
"function",
"diff",
"(",
"string",
"$",
"currentId",
"=",
"null",
")",
":",
"void",
"{",
"$",
"historyEntry",
"=",
"$",
"this",
"->",
"ModelHistory",
"->",
"get",
"(",
"$",
"currentId",
")",
";",
"$",
"this",
"->",
"FrontendBridge",
"->",
"se... | Build diff for a given modelHistory entry
@param string $currentId UUID of ModelHistory entry to get diff for
@return void | [
"Build",
"diff",
"for",
"a",
"given",
"modelHistory",
"entry"
] | 4dceac1cc7db0e6d443750dd9d76b960df385931 | https://github.com/scherersoftware/cake-model-history/blob/4dceac1cc7db0e6d443750dd9d76b960df385931/src/Controller/ModelHistoryController.php#L223-L227 |
233,643 | skrz/meta | gen-src/Google/Protobuf/Meta/SourceCodeInfoMeta.php | SourceCodeInfoMeta.create | public static function create()
{
switch (func_num_args()) {
case 0:
return new SourceCodeInfo();
case 1:
return new SourceCodeInfo(func_get_arg(0));
case 2:
return new SourceCodeInfo(func_get_arg(0), func_get_arg(1));
case 3:
return new SourceCodeInfo(func_get_arg(0), func_get_arg(1), fu... | php | public static function create()
{
switch (func_num_args()) {
case 0:
return new SourceCodeInfo();
case 1:
return new SourceCodeInfo(func_get_arg(0));
case 2:
return new SourceCodeInfo(func_get_arg(0), func_get_arg(1));
case 3:
return new SourceCodeInfo(func_get_arg(0), func_get_arg(1), fu... | [
"public",
"static",
"function",
"create",
"(",
")",
"{",
"switch",
"(",
"func_num_args",
"(",
")",
")",
"{",
"case",
"0",
":",
"return",
"new",
"SourceCodeInfo",
"(",
")",
";",
"case",
"1",
":",
"return",
"new",
"SourceCodeInfo",
"(",
"func_get_arg",
"("... | Creates new instance of \Google\Protobuf\SourceCodeInfo
@throws \InvalidArgumentException
@return SourceCodeInfo | [
"Creates",
"new",
"instance",
"of",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"SourceCodeInfo"
] | 013af6435d3885ab5b2e91fb8ebb051d0f874ab2 | https://github.com/skrz/meta/blob/013af6435d3885ab5b2e91fb8ebb051d0f874ab2/gen-src/Google/Protobuf/Meta/SourceCodeInfoMeta.php#L58-L82 |
233,644 | skrz/meta | gen-src/Google/Protobuf/Meta/SourceCodeInfoMeta.php | SourceCodeInfoMeta.hash | public static function hash($object, $algoOrCtx = 'md5', $raw = FALSE)
{
if (is_string($algoOrCtx)) {
$ctx = hash_init($algoOrCtx);
} else {
$ctx = $algoOrCtx;
}
if (isset($object->location)) {
hash_update($ctx, 'location');
foreach ($object->location instanceof \Traversable ? $object->location : ... | php | public static function hash($object, $algoOrCtx = 'md5', $raw = FALSE)
{
if (is_string($algoOrCtx)) {
$ctx = hash_init($algoOrCtx);
} else {
$ctx = $algoOrCtx;
}
if (isset($object->location)) {
hash_update($ctx, 'location');
foreach ($object->location instanceof \Traversable ? $object->location : ... | [
"public",
"static",
"function",
"hash",
"(",
"$",
"object",
",",
"$",
"algoOrCtx",
"=",
"'md5'",
",",
"$",
"raw",
"=",
"FALSE",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"algoOrCtx",
")",
")",
"{",
"$",
"ctx",
"=",
"hash_init",
"(",
"$",
"algoOrC... | Computes hash of \Google\Protobuf\SourceCodeInfo
@param object $object
@param string|resource $algoOrCtx
@param bool $raw
@return string|void | [
"Computes",
"hash",
"of",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"SourceCodeInfo"
] | 013af6435d3885ab5b2e91fb8ebb051d0f874ab2 | https://github.com/skrz/meta/blob/013af6435d3885ab5b2e91fb8ebb051d0f874ab2/gen-src/Google/Protobuf/Meta/SourceCodeInfoMeta.php#L113-L133 |
233,645 | skrz/meta | gen-src/Google/Protobuf/Meta/SourceCodeInfoMeta.php | SourceCodeInfoMeta.fromProtobuf | public static function fromProtobuf($input, $object = NULL, &$start = 0, $end = NULL)
{
if ($object === null) {
$object = new SourceCodeInfo();
}
if ($end === null) {
$end = strlen($input);
}
while ($start < $end) {
$tag = Binary::decodeVarint($input, $start);
$wireType = $tag & 0x7;
$number... | php | public static function fromProtobuf($input, $object = NULL, &$start = 0, $end = NULL)
{
if ($object === null) {
$object = new SourceCodeInfo();
}
if ($end === null) {
$end = strlen($input);
}
while ($start < $end) {
$tag = Binary::decodeVarint($input, $start);
$wireType = $tag & 0x7;
$number... | [
"public",
"static",
"function",
"fromProtobuf",
"(",
"$",
"input",
",",
"$",
"object",
"=",
"NULL",
",",
"&",
"$",
"start",
"=",
"0",
",",
"$",
"end",
"=",
"NULL",
")",
"{",
"if",
"(",
"$",
"object",
"===",
"null",
")",
"{",
"$",
"object",
"=",
... | Creates \Google\Protobuf\SourceCodeInfo object from serialized Protocol Buffers message.
@param string $input
@param SourceCodeInfo $object
@param int $start
@param int $end
@throws \Exception
@return SourceCodeInfo | [
"Creates",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"SourceCodeInfo",
"object",
"from",
"serialized",
"Protocol",
"Buffers",
"message",
"."
] | 013af6435d3885ab5b2e91fb8ebb051d0f874ab2 | https://github.com/skrz/meta/blob/013af6435d3885ab5b2e91fb8ebb051d0f874ab2/gen-src/Google/Protobuf/Meta/SourceCodeInfoMeta.php#L148-L201 |
233,646 | skrz/meta | gen-src/Google/Protobuf/Meta/SourceCodeInfoMeta.php | SourceCodeInfoMeta.toProtobuf | public static function toProtobuf($object, $filter = NULL)
{
$output = '';
if (isset($object->location) && ($filter === null || isset($filter['location']))) {
foreach ($object->location instanceof \Traversable ? $object->location : (array)$object->location as $k => $v) {
$output .= "\x0a";
$buffer = Lo... | php | public static function toProtobuf($object, $filter = NULL)
{
$output = '';
if (isset($object->location) && ($filter === null || isset($filter['location']))) {
foreach ($object->location instanceof \Traversable ? $object->location : (array)$object->location as $k => $v) {
$output .= "\x0a";
$buffer = Lo... | [
"public",
"static",
"function",
"toProtobuf",
"(",
"$",
"object",
",",
"$",
"filter",
"=",
"NULL",
")",
"{",
"$",
"output",
"=",
"''",
";",
"if",
"(",
"isset",
"(",
"$",
"object",
"->",
"location",
")",
"&&",
"(",
"$",
"filter",
"===",
"null",
"||"... | Serialized \Google\Protobuf\SourceCodeInfo to Protocol Buffers message.
@param SourceCodeInfo $object
@param array $filter
@throws \Exception
@return string | [
"Serialized",
"\\",
"Google",
"\\",
"Protobuf",
"\\",
"SourceCodeInfo",
"to",
"Protocol",
"Buffers",
"message",
"."
] | 013af6435d3885ab5b2e91fb8ebb051d0f874ab2 | https://github.com/skrz/meta/blob/013af6435d3885ab5b2e91fb8ebb051d0f874ab2/gen-src/Google/Protobuf/Meta/SourceCodeInfoMeta.php#L214-L228 |
233,647 | budde377/Part | lib/util/file/ImageFileImpl.php | ImageFileImpl.scaleToOuterBox | public function scaleToOuterBox($width, $height, $saveAsNewFile = false)
{
$width_ratio = $width == 0 ? $height / $this->getHeight() : $width / $this->getWidth();
$height_ratio = $height == 0 ? $width / $this->getWidth() : $height / $this->getHeight();
if ($width_ratio < $height_ratio) {
... | php | public function scaleToOuterBox($width, $height, $saveAsNewFile = false)
{
$width_ratio = $width == 0 ? $height / $this->getHeight() : $width / $this->getWidth();
$height_ratio = $height == 0 ? $width / $this->getWidth() : $height / $this->getHeight();
if ($width_ratio < $height_ratio) {
... | [
"public",
"function",
"scaleToOuterBox",
"(",
"$",
"width",
",",
"$",
"height",
",",
"$",
"saveAsNewFile",
"=",
"false",
")",
"{",
"$",
"width_ratio",
"=",
"$",
"width",
"==",
"0",
"?",
"$",
"height",
"/",
"$",
"this",
"->",
"getHeight",
"(",
")",
":... | Will scale the image such that the image will become the inner box to the box given.
@param int $width
@param int $height
@param bool $saveAsNewFile
@return null | ImageFile | [
"Will",
"scale",
"the",
"image",
"such",
"that",
"the",
"image",
"will",
"become",
"the",
"inner",
"box",
"to",
"the",
"box",
"given",
"."
] | 9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d | https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/util/file/ImageFileImpl.php#L106-L116 |
233,648 | budde377/Part | lib/util/file/ImageFileImpl.php | ImageFileImpl.forceSize | public function forceSize($width, $height, $saveAsNewFile = false)
{
$width = $width <= 0 ? round($this->getRatio() * $height) : $width;
$height = $height <= 0 ? round($width / $this->getRatio()) : $height;
return $this->modifyImageHelper(
function (Imagick $imagick) use ($widt... | php | public function forceSize($width, $height, $saveAsNewFile = false)
{
$width = $width <= 0 ? round($this->getRatio() * $height) : $width;
$height = $height <= 0 ? round($width / $this->getRatio()) : $height;
return $this->modifyImageHelper(
function (Imagick $imagick) use ($widt... | [
"public",
"function",
"forceSize",
"(",
"$",
"width",
",",
"$",
"height",
",",
"$",
"saveAsNewFile",
"=",
"false",
")",
"{",
"$",
"width",
"=",
"$",
"width",
"<=",
"0",
"?",
"round",
"(",
"$",
"this",
"->",
"getRatio",
"(",
")",
"*",
"$",
"height",... | Will force the size of the image, ignoring the ratio.
@param int $width
@param int $height
@param bool $saveAsNewFile
@return null | ImageFile | [
"Will",
"force",
"the",
"size",
"of",
"the",
"image",
"ignoring",
"the",
"ratio",
"."
] | 9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d | https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/util/file/ImageFileImpl.php#L125-L143 |
233,649 | budde377/Part | lib/util/file/ImageFileImpl.php | ImageFileImpl.crop | public function crop($x, $y, $width, $height, $saveAsNewFile = false)
{
return $this->modifyImageHelper(
function (Imagick $imagick) use ($width, $height, $x, $y) {
$imagick->cropImage($width, $height, $x, $y);
},
function () use ($x, $y, $width, $height)... | php | public function crop($x, $y, $width, $height, $saveAsNewFile = false)
{
return $this->modifyImageHelper(
function (Imagick $imagick) use ($width, $height, $x, $y) {
$imagick->cropImage($width, $height, $x, $y);
},
function () use ($x, $y, $width, $height)... | [
"public",
"function",
"crop",
"(",
"$",
"x",
",",
"$",
"y",
",",
"$",
"width",
",",
"$",
"height",
",",
"$",
"saveAsNewFile",
"=",
"false",
")",
"{",
"return",
"$",
"this",
"->",
"modifyImageHelper",
"(",
"function",
"(",
"Imagick",
"$",
"imagick",
"... | Will crop the image. If some of the cropped area is outside of the image,
it will not be in the cropped area.
@param int $x
@param int $y
@param int $width
@param int $height
@param bool $saveAsNewFile
@return null | ImageFile | [
"Will",
"crop",
"the",
"image",
".",
"If",
"some",
"of",
"the",
"cropped",
"area",
"is",
"outside",
"of",
"the",
"image",
"it",
"will",
"not",
"be",
"in",
"the",
"cropped",
"area",
"."
] | 9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d | https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/util/file/ImageFileImpl.php#L155-L170 |
233,650 | budde377/Part | lib/util/file/ImageFileImpl.php | ImageFileImpl.limitToOuterBox | public function limitToOuterBox($width, $height, $saveAsNewFile = false)
{
if ($this->getWidth() < $width && $this->getHeight() < $height) {
return $saveAsNewFile ? $this : null;
}
return $this->scaleToOuterBox($width, $height, $saveAsNewFile);
} | php | public function limitToOuterBox($width, $height, $saveAsNewFile = false)
{
if ($this->getWidth() < $width && $this->getHeight() < $height) {
return $saveAsNewFile ? $this : null;
}
return $this->scaleToOuterBox($width, $height, $saveAsNewFile);
} | [
"public",
"function",
"limitToOuterBox",
"(",
"$",
"width",
",",
"$",
"height",
",",
"$",
"saveAsNewFile",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getWidth",
"(",
")",
"<",
"$",
"width",
"&&",
"$",
"this",
"->",
"getHeight",
"(",
")",
... | Will limit the image to an outer box. If the image is contained in the box, nothing will happen.
@param int $width
@param int $height
@param bool $saveAsNewFile
@return mixed | [
"Will",
"limit",
"the",
"image",
"to",
"an",
"outer",
"box",
".",
"If",
"the",
"image",
"is",
"contained",
"in",
"the",
"box",
"nothing",
"will",
"happen",
"."
] | 9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d | https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/util/file/ImageFileImpl.php#L185-L191 |
233,651 | budde377/Part | lib/util/file/ImageFileImpl.php | ImageFileImpl.limitToInnerBox | public function limitToInnerBox($width, $height, $saveAsNewFile = false)
{
if ($this->getWidth() < $width || $this->getHeight() < $height) {
return $saveAsNewFile ? $this : null;
}
return $this->scaleToInnerBox($width, $height, $saveAsNewFile);
} | php | public function limitToInnerBox($width, $height, $saveAsNewFile = false)
{
if ($this->getWidth() < $width || $this->getHeight() < $height) {
return $saveAsNewFile ? $this : null;
}
return $this->scaleToInnerBox($width, $height, $saveAsNewFile);
} | [
"public",
"function",
"limitToInnerBox",
"(",
"$",
"width",
",",
"$",
"height",
",",
"$",
"saveAsNewFile",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getWidth",
"(",
")",
"<",
"$",
"width",
"||",
"$",
"this",
"->",
"getHeight",
"(",
")",
... | Will limit the image to an inner box. If the image is contained in the box, nothing will happen.
@param int $width
@param int $height
@param bool $saveAsNewFile
@return null | ImageFile | [
"Will",
"limit",
"the",
"image",
"to",
"an",
"inner",
"box",
".",
"If",
"the",
"image",
"is",
"contained",
"in",
"the",
"box",
"nothing",
"will",
"happen",
"."
] | 9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d | https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/util/file/ImageFileImpl.php#L200-L206 |
233,652 | budde377/Part | lib/util/file/ImageFileImpl.php | ImageFileImpl.mirrorVertical | public function mirrorVertical($saveAsNewFile = false)
{
return $this->modifyImageHelper(
function (Imagick $imagick) {
$imagick->flopImage();
},
function () {
return $this->newMirrorBasename(1, 0);
},
function (Ima... | php | public function mirrorVertical($saveAsNewFile = false)
{
return $this->modifyImageHelper(
function (Imagick $imagick) {
$imagick->flopImage();
},
function () {
return $this->newMirrorBasename(1, 0);
},
function (Ima... | [
"public",
"function",
"mirrorVertical",
"(",
"$",
"saveAsNewFile",
"=",
"false",
")",
"{",
"return",
"$",
"this",
"->",
"modifyImageHelper",
"(",
"function",
"(",
"Imagick",
"$",
"imagick",
")",
"{",
"$",
"imagick",
"->",
"flopImage",
"(",
")",
";",
"}",
... | Mirrors the image vertically
@param bool $saveAsNewFile
@return null | ImageFile | [
"Mirrors",
"the",
"image",
"vertically"
] | 9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d | https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/util/file/ImageFileImpl.php#L267-L281 |
233,653 | budde377/Part | lib/util/file/ImageFileImpl.php | ImageFileImpl.mirrorHorizontal | public function mirrorHorizontal($saveAsNewFile = false)
{
return $this->modifyImageHelper(
function (Imagick $imagick) {
$imagick->flipimage();
},
function (){
return $this->newMirrorBasename(0, 1);
},
function (Ima... | php | public function mirrorHorizontal($saveAsNewFile = false)
{
return $this->modifyImageHelper(
function (Imagick $imagick) {
$imagick->flipimage();
},
function (){
return $this->newMirrorBasename(0, 1);
},
function (Ima... | [
"public",
"function",
"mirrorHorizontal",
"(",
"$",
"saveAsNewFile",
"=",
"false",
")",
"{",
"return",
"$",
"this",
"->",
"modifyImageHelper",
"(",
"function",
"(",
"Imagick",
"$",
"imagick",
")",
"{",
"$",
"imagick",
"->",
"flipimage",
"(",
")",
";",
"}",... | Mirrors the image
@param bool $saveAsNewFile
@return null | ImageFile | [
"Mirrors",
"the",
"image"
] | 9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d | https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/util/file/ImageFileImpl.php#L314-L327 |
233,654 | xylemical/php-expressions | src/Operator.php | Operator.evaluate | public function evaluate(array $values, Context $context, Token $token)
{
if (count($values) !== $this->getOperands()) {
throw new ExpressionException('Invalid number of operands for operator.',
$this, $values);
}
$evaluator = $this->evaluator;
return (strin... | php | public function evaluate(array $values, Context $context, Token $token)
{
if (count($values) !== $this->getOperands()) {
throw new ExpressionException('Invalid number of operands for operator.',
$this, $values);
}
$evaluator = $this->evaluator;
return (strin... | [
"public",
"function",
"evaluate",
"(",
"array",
"$",
"values",
",",
"Context",
"$",
"context",
",",
"Token",
"$",
"token",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"values",
")",
"!==",
"$",
"this",
"->",
"getOperands",
"(",
")",
")",
"{",
"throw",
... | Evaluates using the values passed through.
@param string[] $values
@param Context $context
@param Token $token
@return string
@throws \Xylemical\Expressions\ExpressionException | [
"Evaluates",
"using",
"the",
"values",
"passed",
"through",
"."
] | 4dc7c3a4bb3f335a04cb05b0d41871529cfc9b73 | https://github.com/xylemical/php-expressions/blob/4dc7c3a4bb3f335a04cb05b0d41871529cfc9b73/src/Operator.php#L122-L130 |
233,655 | jkphl/dom-factory | src/Domfactory/Infrastructure/Dom.php | Dom.createViaHttpClient | protected static function createViaHttpClient($url, array $options = [])
{
try {
$clientOptions = isset($options['client']) ? (array)$options['client'] : [];
$client = new Client(array_merge(['timeout' => 10.0], $clientOptions));
$requestOptions = isset($options['request'... | php | protected static function createViaHttpClient($url, array $options = [])
{
try {
$clientOptions = isset($options['client']) ? (array)$options['client'] : [];
$client = new Client(array_merge(['timeout' => 10.0], $clientOptions));
$requestOptions = isset($options['request'... | [
"protected",
"static",
"function",
"createViaHttpClient",
"(",
"$",
"url",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"try",
"{",
"$",
"clientOptions",
"=",
"isset",
"(",
"$",
"options",
"[",
"'client'",
"]",
")",
"?",
"(",
"array",
")",
... | Create a DOM document using a HTTP client implementation
@param string $url HTTP / HTTPS URL
@param array $options Connection options
@return \DOMDocument DOM document
@throws RuntimeException If the request wasn't successful
@throws RuntimeException If a runtime exception occurred | [
"Create",
"a",
"DOM",
"document",
"using",
"a",
"HTTP",
"client",
"implementation"
] | 460595b73b214510b29f483d61358296d2825143 | https://github.com/jkphl/dom-factory/blob/460595b73b214510b29f483d61358296d2825143/src/Domfactory/Infrastructure/Dom.php#L61-L74 |
233,656 | jkphl/dom-factory | src/Domfactory/Infrastructure/Dom.php | Dom.createViaStreamWrapper | protected static function createViaStreamWrapper($url, array $options = [])
{
$clientOptions = isset($options['client']) ? (array)$options['client'] : [];
$opts = array_merge_recursive([
'http' => [
'method' => 'GET',
'protocol_version' => 1.1,
... | php | protected static function createViaStreamWrapper($url, array $options = [])
{
$clientOptions = isset($options['client']) ? (array)$options['client'] : [];
$opts = array_merge_recursive([
'http' => [
'method' => 'GET',
'protocol_version' => 1.1,
... | [
"protected",
"static",
"function",
"createViaStreamWrapper",
"(",
"$",
"url",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"clientOptions",
"=",
"isset",
"(",
"$",
"options",
"[",
"'client'",
"]",
")",
"?",
"(",
"array",
")",
"$",
"optio... | Create a DOM document via the PHP stream wrapper
@param string $url URL
@param array $options Connection options
@return \DOMDocument DOM document | [
"Create",
"a",
"DOM",
"document",
"via",
"the",
"PHP",
"stream",
"wrapper"
] | 460595b73b214510b29f483d61358296d2825143 | https://github.com/jkphl/dom-factory/blob/460595b73b214510b29f483d61358296d2825143/src/Domfactory/Infrastructure/Dom.php#L95-L113 |
233,657 | fastnloud/zf2-dkim | src/Dkim/Signer/Signer.php | Signer.signMessage | public function signMessage(Message &$message)
{
// format message
$this->formatMessage($message);
// generate empty dkim header including the body hash
$this->generateEmptyDkimHeader($message);
// add empty (unsigned) dkim header
$message->getHeaders()->addHeader($... | php | public function signMessage(Message &$message)
{
// format message
$this->formatMessage($message);
// generate empty dkim header including the body hash
$this->generateEmptyDkimHeader($message);
// add empty (unsigned) dkim header
$message->getHeaders()->addHeader($... | [
"public",
"function",
"signMessage",
"(",
"Message",
"&",
"$",
"message",
")",
"{",
"// format message",
"$",
"this",
"->",
"formatMessage",
"(",
"$",
"message",
")",
";",
"// generate empty dkim header including the body hash",
"$",
"this",
"->",
"generateEmptyDkimHe... | Sign message with a DKIM signature.
@param Message $message
@return void | [
"Sign",
"message",
"with",
"a",
"DKIM",
"signature",
"."
] | 64d33ca67b0076b147656b22aaf2dff500b530e4 | https://github.com/fastnloud/zf2-dkim/blob/64d33ca67b0076b147656b22aaf2dff500b530e4/src/Dkim/Signer/Signer.php#L88-L104 |
233,658 | fastnloud/zf2-dkim | src/Dkim/Signer/Signer.php | Signer.setParam | public function setParam($key, $value)
{
if (!array_key_exists($key, $this->getParams())) {
throw new \Exception("Invalid param '$key' given.");
}
$this->params[$key] = $value;
} | php | public function setParam($key, $value)
{
if (!array_key_exists($key, $this->getParams())) {
throw new \Exception("Invalid param '$key' given.");
}
$this->params[$key] = $value;
} | [
"public",
"function",
"setParam",
"(",
"$",
"key",
",",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"key",
",",
"$",
"this",
"->",
"getParams",
"(",
")",
")",
")",
"{",
"throw",
"new",
"\\",
"Exception",
"(",
"\"Invalid para... | Set Dkim param.
@param string $key
@param string $value
@throws \Exception
@return void | [
"Set",
"Dkim",
"param",
"."
] | 64d33ca67b0076b147656b22aaf2dff500b530e4 | https://github.com/fastnloud/zf2-dkim/blob/64d33ca67b0076b147656b22aaf2dff500b530e4/src/Dkim/Signer/Signer.php#L114-L121 |
233,659 | fastnloud/zf2-dkim | src/Dkim/Signer/Signer.php | Signer.formatMessage | private function formatMessage(Message &$message)
{
$body = $message->getBody();
if ($body instanceof MimeMessage) {
$body = $body->generateMessage();
}
$body = $this->normalizeNewlines($body);
$message->setBody($body);
} | php | private function formatMessage(Message &$message)
{
$body = $message->getBody();
if ($body instanceof MimeMessage) {
$body = $body->generateMessage();
}
$body = $this->normalizeNewlines($body);
$message->setBody($body);
} | [
"private",
"function",
"formatMessage",
"(",
"Message",
"&",
"$",
"message",
")",
"{",
"$",
"body",
"=",
"$",
"message",
"->",
"getBody",
"(",
")",
";",
"if",
"(",
"$",
"body",
"instanceof",
"MimeMessage",
")",
"{",
"$",
"body",
"=",
"$",
"body",
"->... | Format message for singing.
@param Message $message
@return void | [
"Format",
"message",
"for",
"singing",
"."
] | 64d33ca67b0076b147656b22aaf2dff500b530e4 | https://github.com/fastnloud/zf2-dkim/blob/64d33ca67b0076b147656b22aaf2dff500b530e4/src/Dkim/Signer/Signer.php#L166-L177 |
233,660 | fastnloud/zf2-dkim | src/Dkim/Signer/Signer.php | Signer.canonizeHeaders | private function canonizeHeaders(Message $message)
{
$params = $this->getParams();
$headersToSign = explode(':', $params['h']);
if (!in_array('dkim-signature', $headersToSign)) {
$headersToSign[] = 'dkim-signature';
}
foreach($headersToSign as $fieldName) {
... | php | private function canonizeHeaders(Message $message)
{
$params = $this->getParams();
$headersToSign = explode(':', $params['h']);
if (!in_array('dkim-signature', $headersToSign)) {
$headersToSign[] = 'dkim-signature';
}
foreach($headersToSign as $fieldName) {
... | [
"private",
"function",
"canonizeHeaders",
"(",
"Message",
"$",
"message",
")",
"{",
"$",
"params",
"=",
"$",
"this",
"->",
"getParams",
"(",
")",
";",
"$",
"headersToSign",
"=",
"explode",
"(",
"':'",
",",
"$",
"params",
"[",
"'h'",
"]",
")",
";",
"i... | Canonize headers for signing.
@param Message $message
@return void | [
"Canonize",
"headers",
"for",
"signing",
"."
] | 64d33ca67b0076b147656b22aaf2dff500b530e4 | https://github.com/fastnloud/zf2-dkim/blob/64d33ca67b0076b147656b22aaf2dff500b530e4/src/Dkim/Signer/Signer.php#L196-L213 |
233,661 | fastnloud/zf2-dkim | src/Dkim/Signer/Signer.php | Signer.generateEmptyDkimHeader | private function generateEmptyDkimHeader(Message $message)
{
// fetch configurable params
$configurableParams = $this->getParams();
// check if the required params are set for singing.
if (empty($configurableParams['d']) || empty($configurableParams['h']) || empty($configurableParam... | php | private function generateEmptyDkimHeader(Message $message)
{
// fetch configurable params
$configurableParams = $this->getParams();
// check if the required params are set for singing.
if (empty($configurableParams['d']) || empty($configurableParams['h']) || empty($configurableParam... | [
"private",
"function",
"generateEmptyDkimHeader",
"(",
"Message",
"$",
"message",
")",
"{",
"// fetch configurable params",
"$",
"configurableParams",
"=",
"$",
"this",
"->",
"getParams",
"(",
")",
";",
"// check if the required params are set for singing.",
"if",
"(",
... | Generate empty DKIM header.
@param Message $message
@throws \Exception
@return void | [
"Generate",
"empty",
"DKIM",
"header",
"."
] | 64d33ca67b0076b147656b22aaf2dff500b530e4 | https://github.com/fastnloud/zf2-dkim/blob/64d33ca67b0076b147656b22aaf2dff500b530e4/src/Dkim/Signer/Signer.php#L222-L251 |
233,662 | fastnloud/zf2-dkim | src/Dkim/Signer/Signer.php | Signer.sign | private function sign(Message &$message)
{
// generate signature
$signature = $this->generateSignature();
// first remove the empty dkim header
$message->getHeaders()->removeHeader('DKIM-Signature');
// generate new header set starting with the dkim header
$headerSe... | php | private function sign(Message &$message)
{
// generate signature
$signature = $this->generateSignature();
// first remove the empty dkim header
$message->getHeaders()->removeHeader('DKIM-Signature');
// generate new header set starting with the dkim header
$headerSe... | [
"private",
"function",
"sign",
"(",
"Message",
"&",
"$",
"message",
")",
"{",
"// generate signature",
"$",
"signature",
"=",
"$",
"this",
"->",
"generateSignature",
"(",
")",
";",
"// first remove the empty dkim header",
"$",
"message",
"->",
"getHeaders",
"(",
... | Sign message.
@param Message $message
@return void | [
"Sign",
"message",
"."
] | 64d33ca67b0076b147656b22aaf2dff500b530e4 | https://github.com/fastnloud/zf2-dkim/blob/64d33ca67b0076b147656b22aaf2dff500b530e4/src/Dkim/Signer/Signer.php#L277-L299 |
233,663 | yarcode/yii2-email-manager | src/backend/controllers/TemplateController.php | TemplateController.actionCreate | public function actionCreate()
{
$model = new Template();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['index', 'id' => $model->id]);
} else {
return $this->render('create', [
'model' => $model,
... | php | public function actionCreate()
{
$model = new Template();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['index', 'id' => $model->id]);
} else {
return $this->render('create', [
'model' => $model,
... | [
"public",
"function",
"actionCreate",
"(",
")",
"{",
"$",
"model",
"=",
"new",
"Template",
"(",
")",
";",
"if",
"(",
"$",
"model",
"->",
"load",
"(",
"Yii",
"::",
"$",
"app",
"->",
"request",
"->",
"post",
"(",
")",
")",
"&&",
"$",
"model",
"->",... | Creates a new Template model.
If creation is successful, the browser will be redirected to the 'view' page.
@return mixed | [
"Creates",
"a",
"new",
"Template",
"model",
".",
"If",
"creation",
"is",
"successful",
"the",
"browser",
"will",
"be",
"redirected",
"to",
"the",
"view",
"page",
"."
] | 4e83eae67199fc2b9eca9f08dcf59cc0440c385a | https://github.com/yarcode/yii2-email-manager/blob/4e83eae67199fc2b9eca9f08dcf59cc0440c385a/src/backend/controllers/TemplateController.php#L80-L91 |
233,664 | budde377/Part | lib/util/traits/FilePathTrait.php | FilePathTrait.newFileFromName | public function newFileFromName($path, $name, $hashName = false){
$info = pathinfo($name);
$ext = isset($info['extension'])? ".{$info['extension']}":"";
$name = $info['filename'];
$n = $hashName?md5($name):$name;
$file = new FileImpl("$path/$n$ext");
$i = 0;
while... | php | public function newFileFromName($path, $name, $hashName = false){
$info = pathinfo($name);
$ext = isset($info['extension'])? ".{$info['extension']}":"";
$name = $info['filename'];
$n = $hashName?md5($name):$name;
$file = new FileImpl("$path/$n$ext");
$i = 0;
while... | [
"public",
"function",
"newFileFromName",
"(",
"$",
"path",
",",
"$",
"name",
",",
"$",
"hashName",
"=",
"false",
")",
"{",
"$",
"info",
"=",
"pathinfo",
"(",
"$",
"name",
")",
";",
"$",
"ext",
"=",
"isset",
"(",
"$",
"info",
"[",
"'extension'",
"]"... | Will generate a new file in the given path from name.
@param String $path
@param String $name
@param bool $hashName
@return File | [
"Will",
"generate",
"a",
"new",
"file",
"in",
"the",
"given",
"path",
"from",
"name",
"."
] | 9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d | https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/util/traits/FilePathTrait.php#L86-L100 |
233,665 | baleen/migrations | src/Common/Event/Progress.php | Progress.update | public function update($newProgress) {
if (!is_numeric($newProgress) || (int) $newProgress < 0 || (int) $newProgress > $this->total) {
throw new InvalidArgumentException(sprintf(
'Argument must be an integer between 0 (zero) and %s (total).',
$this->total
... | php | public function update($newProgress) {
if (!is_numeric($newProgress) || (int) $newProgress < 0 || (int) $newProgress > $this->total) {
throw new InvalidArgumentException(sprintf(
'Argument must be an integer between 0 (zero) and %s (total).',
$this->total
... | [
"public",
"function",
"update",
"(",
"$",
"newProgress",
")",
"{",
"if",
"(",
"!",
"is_numeric",
"(",
"$",
"newProgress",
")",
"||",
"(",
"int",
")",
"$",
"newProgress",
"<",
"0",
"||",
"(",
"int",
")",
"$",
"newProgress",
">",
"$",
"this",
"->",
"... | Update the current progress
@param $newProgress
@return void
@throws InvalidArgumentException | [
"Update",
"the",
"current",
"progress"
] | cfc8c439858cf4f0d4119af9eb67de493da8d95c | https://github.com/baleen/migrations/blob/cfc8c439858cf4f0d4119af9eb67de493da8d95c/src/Common/Event/Progress.php#L79-L87 |
233,666 | toni-kolev/MultilingualExtension | src/Context/MultilingualContext.php | MultilingualContext.parseTranslationFile | public function parseTranslationFile() {
$base_path = $this->getMinkParameter('files_path');
$base_path = $base_path."/";
$file_path = $base_path.$this->multilingual_parameters['translations'];
$yaml = file_get_contents($file_path);
$yaml_parse_array_check = Yaml::parse($yaml);
... | php | public function parseTranslationFile() {
$base_path = $this->getMinkParameter('files_path');
$base_path = $base_path."/";
$file_path = $base_path.$this->multilingual_parameters['translations'];
$yaml = file_get_contents($file_path);
$yaml_parse_array_check = Yaml::parse($yaml);
... | [
"public",
"function",
"parseTranslationFile",
"(",
")",
"{",
"$",
"base_path",
"=",
"$",
"this",
"->",
"getMinkParameter",
"(",
"'files_path'",
")",
";",
"$",
"base_path",
"=",
"$",
"base_path",
".",
"\"/\"",
";",
"$",
"file_path",
"=",
"$",
"base_path",
"... | Parse the YAML translations to PHP array variable. | [
"Parse",
"the",
"YAML",
"translations",
"to",
"PHP",
"array",
"variable",
"."
] | e0e1a9fc30e176e597bebb467ddf195cd5d555c3 | https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L44-L53 |
233,667 | toni-kolev/MultilingualExtension | src/Context/MultilingualContext.php | MultilingualContext.localizeField | public function localizeField($field) {
$re = "/(?:[-])(".$this->multilingual_parameters['default_language'].")(?:[-])/";
$language = "-".$this->languageDetection()."-";
$field = preg_replace($re, $language,$field);
return $field;
} | php | public function localizeField($field) {
$re = "/(?:[-])(".$this->multilingual_parameters['default_language'].")(?:[-])/";
$language = "-".$this->languageDetection()."-";
$field = preg_replace($re, $language,$field);
return $field;
} | [
"public",
"function",
"localizeField",
"(",
"$",
"field",
")",
"{",
"$",
"re",
"=",
"\"/(?:[-])(\"",
".",
"$",
"this",
"->",
"multilingual_parameters",
"[",
"'default_language'",
"]",
".",
"\")(?:[-])/\"",
";",
"$",
"language",
"=",
"\"-\"",
".",
"$",
"this"... | This function localizes the field based on Drupal standards. default_language variable is used as a base. | [
"This",
"function",
"localizes",
"the",
"field",
"based",
"on",
"Drupal",
"standards",
".",
"default_language",
"variable",
"is",
"used",
"as",
"a",
"base",
"."
] | e0e1a9fc30e176e597bebb467ddf195cd5d555c3 | https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L117-L122 |
233,668 | toni-kolev/MultilingualExtension | src/Context/MultilingualContext.php | MultilingualContext.iShouldSeeLocalizedValueInInput | public function iShouldSeeLocalizedValueInInput($value, $input) {
$value = $this->localizeTarget($value);
$this->assertValueInInput($value, $input);
} | php | public function iShouldSeeLocalizedValueInInput($value, $input) {
$value = $this->localizeTarget($value);
$this->assertValueInInput($value, $input);
} | [
"public",
"function",
"iShouldSeeLocalizedValueInInput",
"(",
"$",
"value",
",",
"$",
"input",
")",
"{",
"$",
"value",
"=",
"$",
"this",
"->",
"localizeTarget",
"(",
"$",
"value",
")",
";",
"$",
"this",
"->",
"assertValueInInput",
"(",
"$",
"value",
",",
... | Checks, that page contains specified text in input
@Then /^(?:|I )should see localized value "(?P<text>(?:[^"]|\\")*)" in input "([^"]*)"$/ | [
"Checks",
"that",
"page",
"contains",
"specified",
"text",
"in",
"input"
] | e0e1a9fc30e176e597bebb467ddf195cd5d555c3 | https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L177-L180 |
233,669 | toni-kolev/MultilingualExtension | src/Context/MultilingualContext.php | MultilingualContext.iShouldSeeLocalized | public function iShouldSeeLocalized($target) {
$target = $this->localizeTarget($target);
$this->assertSession()->pageTextContains($target);
} | php | public function iShouldSeeLocalized($target) {
$target = $this->localizeTarget($target);
$this->assertSession()->pageTextContains($target);
} | [
"public",
"function",
"iShouldSeeLocalized",
"(",
"$",
"target",
")",
"{",
"$",
"target",
"=",
"$",
"this",
"->",
"localizeTarget",
"(",
"$",
"target",
")",
";",
"$",
"this",
"->",
"assertSession",
"(",
")",
"->",
"pageTextContains",
"(",
"$",
"target",
... | Checks, that page contains specified text
@Then /^(?:|I )should see localized "(?P<text>(?:[^"]|\\")*)"$/ | [
"Checks",
"that",
"page",
"contains",
"specified",
"text"
] | e0e1a9fc30e176e597bebb467ddf195cd5d555c3 | https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L188-L191 |
233,670 | toni-kolev/MultilingualExtension | src/Context/MultilingualContext.php | MultilingualContext.iShouldNotSeeLocalized | public function iShouldNotSeeLocalized($target)
{
$target = $this->localizeTarget($target);
$this->assertSession()->pageTextNotContains($target);
} | php | public function iShouldNotSeeLocalized($target)
{
$target = $this->localizeTarget($target);
$this->assertSession()->pageTextNotContains($target);
} | [
"public",
"function",
"iShouldNotSeeLocalized",
"(",
"$",
"target",
")",
"{",
"$",
"target",
"=",
"$",
"this",
"->",
"localizeTarget",
"(",
"$",
"target",
")",
";",
"$",
"this",
"->",
"assertSession",
"(",
")",
"->",
"pageTextNotContains",
"(",
"$",
"targe... | Checks, that page doesn't contain specified text
@Then /^(?:|I )should not see localized "(?P<text>(?:[^"]|\\")*)"$/ | [
"Checks",
"that",
"page",
"doesn",
"t",
"contain",
"specified",
"text"
] | e0e1a9fc30e176e597bebb467ddf195cd5d555c3 | https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L198-L202 |
233,671 | toni-kolev/MultilingualExtension | src/Context/MultilingualContext.php | MultilingualContext.iWaitForLocalizedTextToAppearWithMaxTime | public function iWaitForLocalizedTextToAppearWithMaxTime($target, $maxExecutionTime){
$target = $this->localizeTarget($target);
$this->iWaitForTextToAppearWithMaxTime($target, $maxExecutionTime);
} | php | public function iWaitForLocalizedTextToAppearWithMaxTime($target, $maxExecutionTime){
$target = $this->localizeTarget($target);
$this->iWaitForTextToAppearWithMaxTime($target, $maxExecutionTime);
} | [
"public",
"function",
"iWaitForLocalizedTextToAppearWithMaxTime",
"(",
"$",
"target",
",",
"$",
"maxExecutionTime",
")",
"{",
"$",
"target",
"=",
"$",
"this",
"->",
"localizeTarget",
"(",
"$",
"target",
")",
";",
"$",
"this",
"->",
"iWaitForTextToAppearWithMaxTime... | Waiting for text to appear on a page with certain execution time
@When /^I wait for localized text "([^"]*)" to appear with max time "([^"]+)"(?: seconds)?$/ | [
"Waiting",
"for",
"text",
"to",
"appear",
"on",
"a",
"page",
"with",
"certain",
"execution",
"time"
] | e0e1a9fc30e176e597bebb467ddf195cd5d555c3 | https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L209-L212 |
233,672 | toni-kolev/MultilingualExtension | src/Context/MultilingualContext.php | MultilingualContext.iClickOnTheLocalizedTextInRegion | public function iClickOnTheLocalizedTextInRegion($text, $region){
$text = $this->localizeTarget($text);
$this->iClickOnTheTextInRegion($text, $region);
} | php | public function iClickOnTheLocalizedTextInRegion($text, $region){
$text = $this->localizeTarget($text);
$this->iClickOnTheTextInRegion($text, $region);
} | [
"public",
"function",
"iClickOnTheLocalizedTextInRegion",
"(",
"$",
"text",
",",
"$",
"region",
")",
"{",
"$",
"text",
"=",
"$",
"this",
"->",
"localizeTarget",
"(",
"$",
"text",
")",
";",
"$",
"this",
"->",
"iClickOnTheTextInRegion",
"(",
"$",
"text",
","... | Click on text in specified region
@When /^I click on the localized text "([^"]*)" in the "(?P<region>[^"]*)"(?:| region)$/ | [
"Click",
"on",
"text",
"in",
"specified",
"region"
] | e0e1a9fc30e176e597bebb467ddf195cd5d555c3 | https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L262-L265 |
233,673 | toni-kolev/MultilingualExtension | src/Context/MultilingualContext.php | MultilingualContext.lselectLocalizedOptionWithJavascript | public function lselectLocalizedOptionWithJavascript($selector, $option) {
$localizedOption = $this->localizeTarget($option);
$this->selectOptionWithJavascript($selector, $localizedOption);
} | php | public function lselectLocalizedOptionWithJavascript($selector, $option) {
$localizedOption = $this->localizeTarget($option);
$this->selectOptionWithJavascript($selector, $localizedOption);
} | [
"public",
"function",
"lselectLocalizedOptionWithJavascript",
"(",
"$",
"selector",
",",
"$",
"option",
")",
"{",
"$",
"localizedOption",
"=",
"$",
"this",
"->",
"localizeTarget",
"(",
"$",
"option",
")",
";",
"$",
"this",
"->",
"selectOptionWithJavascript",
"("... | Choose certain option from given selector
@When I select localized :option from chosen :selector | [
"Choose",
"certain",
"option",
"from",
"given",
"selector"
] | e0e1a9fc30e176e597bebb467ddf195cd5d555c3 | https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L272-L275 |
233,674 | MW-Peachy/Peachy | Includes/Image.php | Image.imageinfo | public function imageinfo( $limit = 1, $width = -1, $height = -1, $start = null, $end = null, $prop = array(
'canonicaltitle', 'timestamp', 'userid', 'user', 'comment', 'parsedcomment', 'url', 'size', 'dimensions', 'sha1', 'mime',
'thumbmime', 'mediatype', 'metadata', 'archivename', 'bitdepth'
), $version = 'lates... | php | public function imageinfo( $limit = 1, $width = -1, $height = -1, $start = null, $end = null, $prop = array(
'canonicaltitle', 'timestamp', 'userid', 'user', 'comment', 'parsedcomment', 'url', 'size', 'dimensions', 'sha1', 'mime',
'thumbmime', 'mediatype', 'metadata', 'archivename', 'bitdepth'
), $version = 'lates... | [
"public",
"function",
"imageinfo",
"(",
"$",
"limit",
"=",
"1",
",",
"$",
"width",
"=",
"-",
"1",
",",
"$",
"height",
"=",
"-",
"1",
",",
"$",
"start",
"=",
"null",
",",
"$",
"end",
"=",
"null",
",",
"$",
"prop",
"=",
"array",
"(",
"'canonicalt... | Returns various information about the image
@access public
@param int $limit Number of revisions to get info about. Default 1
@param int $width Width of image. Default -1 (no width)
@param int $height Height of image. Default -1 (no height)
@param string $start Timestamp to start at. Default null
@param string $end Ti... | [
"Returns",
"various",
"information",
"about",
"the",
"image"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L252-L283 |
233,675 | MW-Peachy/Peachy | Includes/Image.php | Image.get_duplicates | public function get_duplicates( $limit = null, $force = false ) {
if( $force || !count( $this->duplicates ) ) {
if( !$this->get_exists() ) {
return $this->duplicates;
}
$dArray = array(
'action' => 'query',
'prop' => 'duplicatefiles',
'dflimit' => ( ( is_null( $limit ) ? $this->wiki->g... | php | public function get_duplicates( $limit = null, $force = false ) {
if( $force || !count( $this->duplicates ) ) {
if( !$this->get_exists() ) {
return $this->duplicates;
}
$dArray = array(
'action' => 'query',
'prop' => 'duplicatefiles',
'dflimit' => ( ( is_null( $limit ) ? $this->wiki->g... | [
"public",
"function",
"get_duplicates",
"(",
"$",
"limit",
"=",
"null",
",",
"$",
"force",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"force",
"||",
"!",
"count",
"(",
"$",
"this",
"->",
"duplicates",
")",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->"... | Returns an array of all files with identical sha1 hashes
@param int $limit Number of duplicates to get. Default null (all)
@param bool $force Force regeneration of the cache. Default false (use cache).
@return array Duplicate files | [
"Returns",
"an",
"array",
"of",
"all",
"files",
"with",
"identical",
"sha1",
"hashes"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L352-L398 |
233,676 | MW-Peachy/Peachy | Includes/Image.php | Image.revert | public function revert( $comment = '', $revertto = null ) {
global $pgNotag, $pgTag;
$tokens = $this->wiki->get_tokens();
if( !$pgNotag ) $comment .= $pgTag;
$apiArray = array(
'action' => 'filerevert',
'token' => $tokens['edit'],
'comment' => $comment,
'filename' => $this->rawtitle
);
i... | php | public function revert( $comment = '', $revertto = null ) {
global $pgNotag, $pgTag;
$tokens = $this->wiki->get_tokens();
if( !$pgNotag ) $comment .= $pgTag;
$apiArray = array(
'action' => 'filerevert',
'token' => $tokens['edit'],
'comment' => $comment,
'filename' => $this->rawtitle
);
i... | [
"public",
"function",
"revert",
"(",
"$",
"comment",
"=",
"''",
",",
"$",
"revertto",
"=",
"null",
")",
"{",
"global",
"$",
"pgNotag",
",",
"$",
"pgTag",
";",
"$",
"tokens",
"=",
"$",
"this",
"->",
"wiki",
"->",
"get_tokens",
"(",
")",
";",
"if",
... | Revert a file to an old version
@access public
@param string $comment Comment for inthe upload in logs (default: '')
@param string $revertto Archive name of the revision to revert to. Default null.
@return boolean | [
"Revert",
"a",
"file",
"to",
"an",
"old",
"version"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L408-L450 |
233,677 | MW-Peachy/Peachy | Includes/Image.php | Image.rotate | public function rotate( $degree = 90 ) {
$tokens = $this->wiki->get_tokens();
$apiArray = array(
'action' => 'imagerotate',
'token' => $tokens['edit'],
'titles' => $this->title
);
pecho( "Rotating image(s) $degree degrees...\n\n", PECHO_NOTICE );
try{
$this->preEditChecks( "Rotate" );
} catch... | php | public function rotate( $degree = 90 ) {
$tokens = $this->wiki->get_tokens();
$apiArray = array(
'action' => 'imagerotate',
'token' => $tokens['edit'],
'titles' => $this->title
);
pecho( "Rotating image(s) $degree degrees...\n\n", PECHO_NOTICE );
try{
$this->preEditChecks( "Rotate" );
} catch... | [
"public",
"function",
"rotate",
"(",
"$",
"degree",
"=",
"90",
")",
"{",
"$",
"tokens",
"=",
"$",
"this",
"->",
"wiki",
"->",
"get_tokens",
"(",
")",
";",
"$",
"apiArray",
"=",
"array",
"(",
"'action'",
"=>",
"'imagerotate'",
",",
"'token'",
"=>",
"$... | Rotate the image clockwise a certain degree.
@param integer $degree Degrees to rotate image clockwise
@return boolean | [
"Rotate",
"the",
"image",
"clockwise",
"a",
"certain",
"degree",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L458-L489 |
233,678 | MW-Peachy/Peachy | Includes/Image.php | Image.upload | public function upload( $file, $text = '', $comment = '', $watch = null, $ignorewarnings = true, $async = false ) {
global $pgIP, $pgNotag, $pgTag;
if( !$pgNotag ) $comment .= $pgTag;
if( !is_array( $file ) ) {
if( !preg_match( '@((http(s)?:\/\/)?([-\w]+\.[-\w\.]+)+\w(:\d+)?(/([-\w/_\.]*(\?\S+)?)?)*)@', $file... | php | public function upload( $file, $text = '', $comment = '', $watch = null, $ignorewarnings = true, $async = false ) {
global $pgIP, $pgNotag, $pgTag;
if( !$pgNotag ) $comment .= $pgTag;
if( !is_array( $file ) ) {
if( !preg_match( '@((http(s)?:\/\/)?([-\w]+\.[-\w\.]+)+\w(:\d+)?(/([-\w/_\.]*(\?\S+)?)?)*)@', $file... | [
"public",
"function",
"upload",
"(",
"$",
"file",
",",
"$",
"text",
"=",
"''",
",",
"$",
"comment",
"=",
"''",
",",
"$",
"watch",
"=",
"null",
",",
"$",
"ignorewarnings",
"=",
"true",
",",
"$",
"async",
"=",
"false",
")",
"{",
"global",
"$",
"pgI... | Upload an image to the wiki
@access public
@param string $file Identifier of a file. Flexible format (local path, URL)
@param string $text Text on the image file page (default: '')
@param string $comment Comment for inthe upload in logs (default: '')
@param bool $watch Should the upload be added to the watchlist (defa... | [
"Upload",
"an",
"image",
"to",
"the",
"wiki"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L504-L549 |
233,679 | MW-Peachy/Peachy | Includes/Image.php | Image.download | public function download( $localname = null, $width = -1, $height = -1 ) {
global $pgIP;
if( !$this->get_exists() ) {
pecho( "Attempted to download a non-existant file.", PECHO_NOTICE );
}
$ii = $this->imageinfo( 1, $width, $height );
if( is_array( $ii ) ) {
$ii = $ii[0];
if( $width != -1 ) {
... | php | public function download( $localname = null, $width = -1, $height = -1 ) {
global $pgIP;
if( !$this->get_exists() ) {
pecho( "Attempted to download a non-existant file.", PECHO_NOTICE );
}
$ii = $this->imageinfo( 1, $width, $height );
if( is_array( $ii ) ) {
$ii = $ii[0];
if( $width != -1 ) {
... | [
"public",
"function",
"download",
"(",
"$",
"localname",
"=",
"null",
",",
"$",
"width",
"=",
"-",
"1",
",",
"$",
"height",
"=",
"-",
"1",
")",
"{",
"global",
"$",
"pgIP",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"get_exists",
"(",
")",
")",
"{"... | Downloads an image to the local disk
@param string $localname Filename to store image as. Default null.
@param int $width Width of image to download. Default -1.
@param int $height Height of image to download. Default -1.
@return void | [
"Downloads",
"an",
"image",
"to",
"the",
"local",
"disk"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L661-L691 |
233,680 | MW-Peachy/Peachy | Includes/Image.php | Image.delete | public function delete( $reason = null, $watch = null, $oldimage = null ) {
return $this->page->delete( $reason, $watch, $oldimage );
} | php | public function delete( $reason = null, $watch = null, $oldimage = null ) {
return $this->page->delete( $reason, $watch, $oldimage );
} | [
"public",
"function",
"delete",
"(",
"$",
"reason",
"=",
"null",
",",
"$",
"watch",
"=",
"null",
",",
"$",
"oldimage",
"=",
"null",
")",
"{",
"return",
"$",
"this",
"->",
"page",
"->",
"delete",
"(",
"$",
"reason",
",",
"$",
"watch",
",",
"$",
"o... | Deletes the image and page.
@param string $reason A reason for the deletion. Defaults to null (blank).
@param string|bool $watch Unconditionally add or remove the page from your watchlist, use preferences or do not change watch. Default preferences.
@param string $oldimage The name of the old image to delete as provid... | [
"Deletes",
"the",
"image",
"and",
"page",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L809-L811 |
233,681 | wa0x6e/php-resque-ex-scheduler | lib/ResqueScheduler/Worker.php | Worker.sleep | protected function sleep()
{
$this->log(
array(
'message' => 'Sleeping for ' . $this->interval,
'data' => array('type' => 'sleep', 'second' => $this->interval)
),
self::LOG_TYPE_DEBUG
);
sleep($this->interval);
} | php | protected function sleep()
{
$this->log(
array(
'message' => 'Sleeping for ' . $this->interval,
'data' => array('type' => 'sleep', 'second' => $this->interval)
),
self::LOG_TYPE_DEBUG
);
sleep($this->interval);
} | [
"protected",
"function",
"sleep",
"(",
")",
"{",
"$",
"this",
"->",
"log",
"(",
"array",
"(",
"'message'",
"=>",
"'Sleeping for '",
".",
"$",
"this",
"->",
"interval",
",",
"'data'",
"=>",
"array",
"(",
"'type'",
"=>",
"'sleep'",
",",
"'second'",
"=>",
... | Sleep for the defined interval. | [
"Sleep",
"for",
"the",
"defined",
"interval",
"."
] | aebd32014e44d2a1037392961dede2875b525f6f | https://github.com/wa0x6e/php-resque-ex-scheduler/blob/aebd32014e44d2a1037392961dede2875b525f6f/lib/ResqueScheduler/Worker.php#L113-L123 |
233,682 | MW-Peachy/Peachy | Plugins/SiteMatrix.php | SiteMatrix.load | public static function load( Wiki &$wikiClass ) {
if( !array_key_exists( 'SiteMatrix', $wikiClass->get_extensions() ) ) {
throw new DependencyError( "SiteMatrix" );
}
$SMres = $wikiClass->apiQuery(
array(
'action' => 'sitematrix',
)
);
$wikis = $SMres['sitematrix'];
//return $wikis;
$reta... | php | public static function load( Wiki &$wikiClass ) {
if( !array_key_exists( 'SiteMatrix', $wikiClass->get_extensions() ) ) {
throw new DependencyError( "SiteMatrix" );
}
$SMres = $wikiClass->apiQuery(
array(
'action' => 'sitematrix',
)
);
$wikis = $SMres['sitematrix'];
//return $wikis;
$reta... | [
"public",
"static",
"function",
"load",
"(",
"Wiki",
"&",
"$",
"wikiClass",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"'SiteMatrix'",
",",
"$",
"wikiClass",
"->",
"get_extensions",
"(",
")",
")",
")",
"{",
"throw",
"new",
"DependencyError",
"(",
... | Loads list of all SiteMatrix wikis
@static
@access public
@param Wiki &$wikiClass The Wiki class object
@return array List of all wikis
@throws AssertFailure
@throws DependencyError
@throws LoggedOut
@throws MWAPIError | [
"Loads",
"list",
"of",
"all",
"SiteMatrix",
"wikis"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Plugins/SiteMatrix.php#L34-L81 |
233,683 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.runSuccess | protected function runSuccess( &$configuration ) {
$userInfoRes = $this->apiQuery(
array(
'action' => 'query',
'meta' => 'userinfo',
'uiprop' => 'blockinfo|rights|groups'
)
);
if( in_array( 'apihighlimits', $userInfoRes['query']['userinfo']['rights'] ) ) {
$this->apiQueryLimit = 4999;
} ... | php | protected function runSuccess( &$configuration ) {
$userInfoRes = $this->apiQuery(
array(
'action' => 'query',
'meta' => 'userinfo',
'uiprop' => 'blockinfo|rights|groups'
)
);
if( in_array( 'apihighlimits', $userInfoRes['query']['userinfo']['rights'] ) ) {
$this->apiQueryLimit = 4999;
} ... | [
"protected",
"function",
"runSuccess",
"(",
"&",
"$",
"configuration",
")",
"{",
"$",
"userInfoRes",
"=",
"$",
"this",
"->",
"apiQuery",
"(",
"array",
"(",
"'action'",
"=>",
"'query'",
",",
"'meta'",
"=>",
"'userinfo'",
",",
"'uiprop'",
"=>",
"'blockinfo|rig... | runSuccess function.
@access protected
@param mixed &$configuration
@return void | [
"runSuccess",
"function",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L600-L625 |
233,684 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.get_configuration | public function get_configuration( $conf_name = null ) {
if( is_null( $conf_name ) ) {
return $this->configuration;
} else {
return $this->configuration[$conf_name];
}
} | php | public function get_configuration( $conf_name = null ) {
if( is_null( $conf_name ) ) {
return $this->configuration;
} else {
return $this->configuration[$conf_name];
}
} | [
"public",
"function",
"get_configuration",
"(",
"$",
"conf_name",
"=",
"null",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"conf_name",
")",
")",
"{",
"return",
"$",
"this",
"->",
"configuration",
";",
"}",
"else",
"{",
"return",
"$",
"this",
"->",
"conf... | Returns the configuration of the wiki
@param string $conf_name Name of configuration setting to get. Default null, will return all configuration.
@access public
@see Wiki::$configuration
@return array Configuration array | [
"Returns",
"the",
"configuration",
"of",
"the",
"wiki"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1297-L1303 |
233,685 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.purge | public function purge( $titles = null, $pageids = null, $revids = null, $force = false, $redirects = false, $convert = false, $generator = null ) {
$apiArr = array(
'action' => 'purge'
);
if( is_null( $titles ) && is_null( $pageids ) && is_null( $revids ) ) {
pecho( "Error: Nothing to purge.\n\n", PECHO_W... | php | public function purge( $titles = null, $pageids = null, $revids = null, $force = false, $redirects = false, $convert = false, $generator = null ) {
$apiArr = array(
'action' => 'purge'
);
if( is_null( $titles ) && is_null( $pageids ) && is_null( $revids ) ) {
pecho( "Error: Nothing to purge.\n\n", PECHO_W... | [
"public",
"function",
"purge",
"(",
"$",
"titles",
"=",
"null",
",",
"$",
"pageids",
"=",
"null",
",",
"$",
"revids",
"=",
"null",
",",
"$",
"force",
"=",
"false",
",",
"$",
"redirects",
"=",
"false",
",",
"$",
"convert",
"=",
"false",
",",
"$",
... | Purges a list of pages
@access public
@param array|string $titles A list of titles to work on
@param array|string $pageids A list of page IDs to work on
@param array|string $revids A list of revision IDs to work on
@param bool $redirects Automatically resolve redirects. Default false.
@param bool $force Update the lin... | [
"Purges",
"a",
"list",
"of",
"pages"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1322-L1375 |
233,686 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.recentchanges | public function recentchanges( $namespace = 0, $pgTag = null, $start = null, $end = null, $user = null, $excludeuser = null, $dir = 'older', $minor = null, $bot = null, $anon = null, $redirect = null, $patrolled = null, $prop = null, $limit = 50 ) {
if( is_array( $namespace ) ) {
$namespace = implode( '|', $names... | php | public function recentchanges( $namespace = 0, $pgTag = null, $start = null, $end = null, $user = null, $excludeuser = null, $dir = 'older', $minor = null, $bot = null, $anon = null, $redirect = null, $patrolled = null, $prop = null, $limit = 50 ) {
if( is_array( $namespace ) ) {
$namespace = implode( '|', $names... | [
"public",
"function",
"recentchanges",
"(",
"$",
"namespace",
"=",
"0",
",",
"$",
"pgTag",
"=",
"null",
",",
"$",
"start",
"=",
"null",
",",
"$",
"end",
"=",
"null",
",",
"$",
"user",
"=",
"null",
",",
"$",
"excludeuser",
"=",
"null",
",",
"$",
"... | Returns a list of recent changes
@access public
@param integer|array|string $namespace Namespace(s) to check
@param string $pgTag Only list recent changes bearing this tag.
@param int $start Only list changes after this timestamp.
@param int $end Only list changes before this timestamp.
@param string $user Only list c... | [
"Returns",
"a",
"list",
"of",
"recent",
"changes"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1398-L1477 |
233,687 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.search | public function search( $search, $fulltext = true, $namespaces = array( 0 ), $prop = array(
'size', 'wordcount', 'timestamp', 'snippet'
), $includeredirects = true, $limit = 50 ) {
$srArray = array(
'_code' => 'sr',
'list' => 'search',
'_limit' => $limit,
'srsearch' => $search,
... | php | public function search( $search, $fulltext = true, $namespaces = array( 0 ), $prop = array(
'size', 'wordcount', 'timestamp', 'snippet'
), $includeredirects = true, $limit = 50 ) {
$srArray = array(
'_code' => 'sr',
'list' => 'search',
'_limit' => $limit,
'srsearch' => $search,
... | [
"public",
"function",
"search",
"(",
"$",
"search",
",",
"$",
"fulltext",
"=",
"true",
",",
"$",
"namespaces",
"=",
"array",
"(",
"0",
")",
",",
"$",
"prop",
"=",
"array",
"(",
"'size'",
",",
"'wordcount'",
",",
"'timestamp'",
",",
"'snippet'",
")",
... | Performs a search and retrieves the results
@access public
@param string $search What to search for
@param bool $fulltext Whether to search the full text of pages (default, true) or just titles (false; may not be enabled on all wikis).
@param array $namespaces The namespaces to search in (default: array( 0 )).
@param ... | [
"Performs",
"a",
"search",
"and",
"retrieves",
"the",
"results"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1491-L1511 |
233,688 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.logs | public function logs( $type = false, $user = false, $title = false, $start = false, $end = false, $dir = 'older', $pgTag = false, $prop = array(
'ids', 'title', 'type', 'user', 'userid', 'timestamp', 'comment', 'parsedcomment', 'details', 'tags'
), $limit = 50 ) {
$leArray = array(
'list' => 'logevents',
... | php | public function logs( $type = false, $user = false, $title = false, $start = false, $end = false, $dir = 'older', $pgTag = false, $prop = array(
'ids', 'title', 'type', 'user', 'userid', 'timestamp', 'comment', 'parsedcomment', 'details', 'tags'
), $limit = 50 ) {
$leArray = array(
'list' => 'logevents',
... | [
"public",
"function",
"logs",
"(",
"$",
"type",
"=",
"false",
",",
"$",
"user",
"=",
"false",
",",
"$",
"title",
"=",
"false",
",",
"$",
"start",
"=",
"false",
",",
"$",
"end",
"=",
"false",
",",
"$",
"dir",
"=",
"'older'",
",",
"$",
"pgTag",
"... | Retrieves log entries from the wiki.
@access public
@link http://www.mediawiki.org/wiki/API:Query_-_Lists#logevents_.2F_le
@param bool|string $type Type of log to retrieve from the wiki (default: false)
@param bool|string $user Restrict the log to a certain user (default: false)
@param bool|string $title Restrict the ... | [
"Retrieves",
"log",
"entries",
"from",
"the",
"wiki",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1529-L1558 |
233,689 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.allcategories | public function allcategories( $prefix = null, $from = null, $min = null, $max = null, $dir = 'ascending', $prop = array(
'size', 'hidden'
), $limit = 50 ) {
$leArray = array(
'list' => 'allcategories',
'_code' => 'ac',
'acdir' => $dir,
'acprop' => implode( '|', $prop ),
'_limit' => $limit
);
... | php | public function allcategories( $prefix = null, $from = null, $min = null, $max = null, $dir = 'ascending', $prop = array(
'size', 'hidden'
), $limit = 50 ) {
$leArray = array(
'list' => 'allcategories',
'_code' => 'ac',
'acdir' => $dir,
'acprop' => implode( '|', $prop ),
'_limit' => $limit
);
... | [
"public",
"function",
"allcategories",
"(",
"$",
"prefix",
"=",
"null",
",",
"$",
"from",
"=",
"null",
",",
"$",
"min",
"=",
"null",
",",
"$",
"max",
"=",
"null",
",",
"$",
"dir",
"=",
"'ascending'",
",",
"$",
"prop",
"=",
"array",
"(",
"'size'",
... | Enumerate all categories
@access public
@link https://www.mediawiki.org/wiki/API:Allcategories
@param string $prefix Search for all category titles that begin with this value. (default: null)
@param string $from The category to start enumerating from. (default: null)
@param string $min Minimum number of category membe... | [
"Enumerate",
"all",
"categories"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1574-L1596 |
233,690 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.allimages | public function allimages( $prefix = null, $sha1 = null, $base36 = null, $from = null, $minsize = null, $maxsize = null, $dir = 'ascending', $prop = array(
'timestamp', 'user', 'comment', 'url', 'size', 'dimensions', 'sha1', 'mime', 'metadata', 'archivename',
'bitdepth'
), $limit = 50 ) {
$leArray = array(
'l... | php | public function allimages( $prefix = null, $sha1 = null, $base36 = null, $from = null, $minsize = null, $maxsize = null, $dir = 'ascending', $prop = array(
'timestamp', 'user', 'comment', 'url', 'size', 'dimensions', 'sha1', 'mime', 'metadata', 'archivename',
'bitdepth'
), $limit = 50 ) {
$leArray = array(
'l... | [
"public",
"function",
"allimages",
"(",
"$",
"prefix",
"=",
"null",
",",
"$",
"sha1",
"=",
"null",
",",
"$",
"base36",
"=",
"null",
",",
"$",
"from",
"=",
"null",
",",
"$",
"minsize",
"=",
"null",
",",
"$",
"maxsize",
"=",
"null",
",",
"$",
"dir"... | Enumerate all images sequentially
@access public
@link http://www.mediawiki.org/wiki/API:Query_-_Lists#allimages_.2F_le
@param string $prefix Search for all image titles that begin with this value. (default: null)
@param string $sha1 SHA1 hash of image (default: null)
@param string $base36 SHA1 hash of image in base 3... | [
"Enumerate",
"all",
"images",
"sequentially"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1614-L1639 |
233,691 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.allpages | public function allpages( $namespace = array( 0 ), $prefix = null, $from = null, $redirects = 'all', $minsize = null, $maxsize = null, $protectiontypes = array(), $protectionlevels = array(), $dir = 'ascending', $interwiki = 'all', $limit = 50 ) {
$leArray = array(
'list' => 'allpages',
'_code' ... | php | public function allpages( $namespace = array( 0 ), $prefix = null, $from = null, $redirects = 'all', $minsize = null, $maxsize = null, $protectiontypes = array(), $protectionlevels = array(), $dir = 'ascending', $interwiki = 'all', $limit = 50 ) {
$leArray = array(
'list' => 'allpages',
'_code' ... | [
"public",
"function",
"allpages",
"(",
"$",
"namespace",
"=",
"array",
"(",
"0",
")",
",",
"$",
"prefix",
"=",
"null",
",",
"$",
"from",
"=",
"null",
",",
"$",
"redirects",
"=",
"'all'",
",",
"$",
"minsize",
"=",
"null",
",",
"$",
"maxsize",
"=",
... | Enumerate all pages sequentially
@access public
@link http://www.mediawiki.org/wiki/API:Query_-_Lists#allpages_.2F_le
@param array $namespace The namespace to enumerate. (default: array( 0 ))
@param string $prefix Search for all page titles that begin with this value. (default: null)
@param string $from The page title... | [
"Enumerate",
"all",
"pages",
"sequentially"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1659-L1689 |
233,692 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.alllinks | public function alllinks( $namespace = array( 0 ), $prefix = null, $from = null, $continue = null, $unique = false, $prop = array(
'ids', 'title'
), $limit = 50 ) {
$leArray = array(
'list' => 'alllinks',
'_code' => 'al',
'alnamespace' => $namespace,
'alprop' => implode( '|', $prop ),... | php | public function alllinks( $namespace = array( 0 ), $prefix = null, $from = null, $continue = null, $unique = false, $prop = array(
'ids', 'title'
), $limit = 50 ) {
$leArray = array(
'list' => 'alllinks',
'_code' => 'al',
'alnamespace' => $namespace,
'alprop' => implode( '|', $prop ),... | [
"public",
"function",
"alllinks",
"(",
"$",
"namespace",
"=",
"array",
"(",
"0",
")",
",",
"$",
"prefix",
"=",
"null",
",",
"$",
"from",
"=",
"null",
",",
"$",
"continue",
"=",
"null",
",",
"$",
"unique",
"=",
"false",
",",
"$",
"prop",
"=",
"arr... | Enumerate all internal links that point to a given namespace
@access public
@link http://www.mediawiki.org/wiki/API:Query_-_Lists#alllinks_.2F_le
@param array $namespace The namespace to enumerate. (default: array( 0 ))
@param string $prefix Search for all page titles that begin with this value. (default: null)
@param... | [
"Enumerate",
"all",
"internal",
"links",
"that",
"point",
"to",
"a",
"given",
"namespace"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1705-L1727 |
233,693 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.allusers | public function allusers( $prefix = null, $groups = array(), $from = null, $editsonly = false, $prop = array(
'blockinfo', 'groups', 'editcount', 'registration'
), $limit = 50 ) {
$leArray = array(
'list' => 'allusers',
'_code' => 'au',
'auprop' => implode( '|', $prop ),
'_limit' => $limit
);
i... | php | public function allusers( $prefix = null, $groups = array(), $from = null, $editsonly = false, $prop = array(
'blockinfo', 'groups', 'editcount', 'registration'
), $limit = 50 ) {
$leArray = array(
'list' => 'allusers',
'_code' => 'au',
'auprop' => implode( '|', $prop ),
'_limit' => $limit
);
i... | [
"public",
"function",
"allusers",
"(",
"$",
"prefix",
"=",
"null",
",",
"$",
"groups",
"=",
"array",
"(",
")",
",",
"$",
"from",
"=",
"null",
",",
"$",
"editsonly",
"=",
"false",
",",
"$",
"prop",
"=",
"array",
"(",
"'blockinfo'",
",",
"'groups'",
... | Enumerate all registered users
@access public
@link http://www.mediawiki.org/wiki/API:Query_-_Lists#alllinks_.2F_le
@param string $prefix Search for all usernames that begin with this value. (default: null)
@param array $groups Limit users to a given group name (default: array())
@param string $from The username to st... | [
"Enumerate",
"all",
"registered",
"users"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1742-L1762 |
233,694 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.categorymembers | public function categorymembers( $category, $subcat = false, $namespace = null, $limit = 50 ) {
$cmArray = array(
'list' => 'categorymembers',
'_code' => 'cm',
'cmtitle' => $category,
'cmtype' => 'page',
'_limit' => $limit
);
if( $subcat ) $cmArray['cmtype'] = 'page|subcat';
if( $namespac... | php | public function categorymembers( $category, $subcat = false, $namespace = null, $limit = 50 ) {
$cmArray = array(
'list' => 'categorymembers',
'_code' => 'cm',
'cmtitle' => $category,
'cmtype' => 'page',
'_limit' => $limit
);
if( $subcat ) $cmArray['cmtype'] = 'page|subcat';
if( $namespac... | [
"public",
"function",
"categorymembers",
"(",
"$",
"category",
",",
"$",
"subcat",
"=",
"false",
",",
"$",
"namespace",
"=",
"null",
",",
"$",
"limit",
"=",
"50",
")",
"{",
"$",
"cmArray",
"=",
"array",
"(",
"'list'",
"=>",
"'categorymembers'",
",",
"'... | Retrieves the titles of member pages of the given category
@access public
@param string $category Category to retieve
@param bool $subcat Should subcategories be checked (default: false)
@param string|array $namespace Restrict results to the given namespace (default: null i.e. all)
@param int $limit How many results t... | [
"Retrieves",
"the",
"titles",
"of",
"member",
"pages",
"of",
"the",
"given",
"category"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1778-L1798 |
233,695 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.tags | public function tags( $prop = array( 'name', 'displayname', 'description', 'hitcount' ), $limit = 50 ) {
$tgArray = array(
'list' => 'tags',
'_code' => 'tg',
'tgprop' => implode( '|', $prop ),
'_limit' => $limit
);
Hooks::runHook( 'PreQueryTags', array( &$tgArray ) );
pecho( "Getting list of al... | php | public function tags( $prop = array( 'name', 'displayname', 'description', 'hitcount' ), $limit = 50 ) {
$tgArray = array(
'list' => 'tags',
'_code' => 'tg',
'tgprop' => implode( '|', $prop ),
'_limit' => $limit
);
Hooks::runHook( 'PreQueryTags', array( &$tgArray ) );
pecho( "Getting list of al... | [
"public",
"function",
"tags",
"(",
"$",
"prop",
"=",
"array",
"(",
"'name'",
",",
"'displayname'",
",",
"'description'",
",",
"'hitcount'",
")",
",",
"$",
"limit",
"=",
"50",
")",
"{",
"$",
"tgArray",
"=",
"array",
"(",
"'list'",
"=>",
"'tags'",
",",
... | List change tags enabled on the wiki.
@access public
@param array $prop Which properties to retrieve (default: array( 'name', 'displayname', 'description', 'hitcount' ) i.e. all).
@param int $limit How many results to retrieve (default: null i.e. all).
@return array The tags retrieved. | [
"List",
"change",
"tags",
"enabled",
"on",
"the",
"wiki",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1824-L1837 |
233,696 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.exturlusage | public function exturlusage( $url, $pgProtocol = 'http', $prop = array( 'title' ), $namespace = null, $limit = 50 ) {
$tArray = array(
'list' => 'exturlusage',
'_code' => 'eu',
'euquery' => $url,
'euprotocol' => $pgProtocol,
'_limit' => $limit,
'euprop' => implode( '|', $prop )... | php | public function exturlusage( $url, $pgProtocol = 'http', $prop = array( 'title' ), $namespace = null, $limit = 50 ) {
$tArray = array(
'list' => 'exturlusage',
'_code' => 'eu',
'euquery' => $url,
'euprotocol' => $pgProtocol,
'_limit' => $limit,
'euprop' => implode( '|', $prop )... | [
"public",
"function",
"exturlusage",
"(",
"$",
"url",
",",
"$",
"pgProtocol",
"=",
"'http'",
",",
"$",
"prop",
"=",
"array",
"(",
"'title'",
")",
",",
"$",
"namespace",
"=",
"null",
",",
"$",
"limit",
"=",
"50",
")",
"{",
"$",
"tArray",
"=",
"array... | Returns details of usage of an external URL on the wiki.
@access public
@param string $url The url to search for links to, without a protocol. * can be used as a wildcard.
@param string $pgProtocol The protocol to accompany the URL. Only certain values are allowed, depending on how $wgUrlProtocols is set on the wiki; ... | [
"Returns",
"details",
"of",
"usage",
"of",
"an",
"external",
"URL",
"on",
"the",
"wiki",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1892-L1912 |
233,697 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.random | public function random( $namespaces = array( 0 ), $limit = 1, $onlyredirects = false ) {
$rnArray = array(
'_code' => 'rn',
'list' => 'random',
'rnnamespace' => $namespaces,
'_limit' => $limit,
'rnredirect' => ( is_null( $onlyredirects ) || !$onlyredirects ) ? null : "true",
'_lht... | php | public function random( $namespaces = array( 0 ), $limit = 1, $onlyredirects = false ) {
$rnArray = array(
'_code' => 'rn',
'list' => 'random',
'rnnamespace' => $namespaces,
'_limit' => $limit,
'rnredirect' => ( is_null( $onlyredirects ) || !$onlyredirects ) ? null : "true",
'_lht... | [
"public",
"function",
"random",
"(",
"$",
"namespaces",
"=",
"array",
"(",
"0",
")",
",",
"$",
"limit",
"=",
"1",
",",
"$",
"onlyredirects",
"=",
"false",
")",
"{",
"$",
"rnArray",
"=",
"array",
"(",
"'_code'",
"=>",
"'rn'",
",",
"'list'",
"=>",
"'... | Returns the titles of some random pages.
@access public
@param array|string $namespaces Namespaces to select from (default: array( 0 ) ).
@param int $limit The number of titles to return (default: 1).
@param bool $onlyredirects Only include redirects (true) or only include non-redirects (default; false).
@return arra... | [
"Returns",
"the",
"titles",
"of",
"some",
"random",
"pages",
"."
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1936-L1951 |
233,698 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.siteinfo | public function siteinfo( $prop = array(
'general', 'namespaces', 'namespacealiases', 'specialpagealiases', 'magicwords', 'interwikimap', 'dbrepllag',
'statistics', 'usergroups', 'extensions', 'fileextensions', 'rightsinfo', 'languages'
), $iwfilter = null ) {
$siArray = array(
'action' => 'query',
'meta'... | php | public function siteinfo( $prop = array(
'general', 'namespaces', 'namespacealiases', 'specialpagealiases', 'magicwords', 'interwikimap', 'dbrepllag',
'statistics', 'usergroups', 'extensions', 'fileextensions', 'rightsinfo', 'languages'
), $iwfilter = null ) {
$siArray = array(
'action' => 'query',
'meta'... | [
"public",
"function",
"siteinfo",
"(",
"$",
"prop",
"=",
"array",
"(",
"'general'",
",",
"'namespaces'",
",",
"'namespacealiases'",
",",
"'specialpagealiases'",
",",
"'magicwords'",
",",
"'interwikimap'",
",",
"'dbrepllag'",
",",
"'statistics'",
",",
"'usergroups'",... | Returns meta information about the wiki itself
@access public
@param array $prop Information to retrieve. Default: array( 'general', 'namespaces', 'namespacealiases', 'specialpagealiases', 'magicwords', 'interwikimap', 'dbrepllag', 'statistics', 'usergroups', 'extensions', 'fileextensions', 'rightsinfo', 'languages' )... | [
"Returns",
"meta",
"information",
"about",
"the",
"wiki",
"itself"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1971-L1994 |
233,699 | MW-Peachy/Peachy | Includes/Wiki.php | Wiki.expandtemplates | public function expandtemplates( $text, $title = null, $generatexml = false ) {
$etArray = array(
'action' => 'expandtemplates',
'text' => $text
);
if( $generatexml ) $etArray['generatexml'] = '';
if( !is_null( $title ) ) $etArray['title'] = $title;
Hooks::runHook( 'PreQueryExpandtemplates', array( ... | php | public function expandtemplates( $text, $title = null, $generatexml = false ) {
$etArray = array(
'action' => 'expandtemplates',
'text' => $text
);
if( $generatexml ) $etArray['generatexml'] = '';
if( !is_null( $title ) ) $etArray['title'] = $title;
Hooks::runHook( 'PreQueryExpandtemplates', array( ... | [
"public",
"function",
"expandtemplates",
"(",
"$",
"text",
",",
"$",
"title",
"=",
"null",
",",
"$",
"generatexml",
"=",
"false",
")",
"{",
"$",
"etArray",
"=",
"array",
"(",
"'action'",
"=>",
"'expandtemplates'",
",",
"'text'",
"=>",
"$",
"text",
")",
... | Expand and parse all templates in wikitext
@access public
@param string $text Text to parse
@param string $title Title to use for expanding magic words, etc. (e.g. {{PAGENAME}}). Default 'API'.
@param bool $generatexml Generate XML parse tree. Default false
@return string | [
"Expand",
"and",
"parse",
"all",
"templates",
"in",
"wikitext"
] | 2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c | https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2035-L2051 |
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.