repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
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" ]
train
https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/util/file/ImageFileImpl.php#L314-L327
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", "." ]
train
https://github.com/xylemical/php-expressions/blob/4dc7c3a4bb3f335a04cb05b0d41871529cfc9b73/src/Operator.php#L122-L130
baleen/migrations
src/Common/Collection/AbstractCollection.php
AbstractCollection.contains
final public function contains($key) { $key = (string) $key; return isset($this->elements[$key]) || array_key_exists($key, $this->elements); }
php
final public function contains($key) { $key = (string) $key; return isset($this->elements[$key]) || array_key_exists($key, $this->elements); }
[ "final", "public", "function", "contains", "(", "$", "key", ")", "{", "$", "key", "=", "(", "string", ")", "$", "key", ";", "return", "isset", "(", "$", "this", "->", "elements", "[", "$", "key", "]", ")", "||", "array_key_exists", "(", "$", "key",...
{@inheritDoc}
[ "{" ]
train
https://github.com/baleen/migrations/blob/cfc8c439858cf4f0d4119af9eb67de493da8d95c/src/Common/Collection/AbstractCollection.php#L143-L147
baleen/migrations
src/Common/Collection/AbstractCollection.php
AbstractCollection.containsVersion
final public function containsVersion(DeltaInterface $version) { $key = (string) $version->getId(); return $this->contains($key); }
php
final public function containsVersion(DeltaInterface $version) { $key = (string) $version->getId(); return $this->contains($key); }
[ "final", "public", "function", "containsVersion", "(", "DeltaInterface", "$", "version", ")", "{", "$", "key", "=", "(", "string", ")", "$", "version", "->", "getId", "(", ")", ";", "return", "$", "this", "->", "contains", "(", "$", "key", ")", ";", ...
{@inheritDoc}
[ "{" ]
train
https://github.com/baleen/migrations/blob/cfc8c439858cf4f0d4119af9eb67de493da8d95c/src/Common/Collection/AbstractCollection.php#L152-L156
baleen/migrations
src/Common/Collection/AbstractCollection.php
AbstractCollection.get
final public function get($key) { $key = (string) $key; return isset($this->elements[$key]) ? $this->elements[$key] : null; }
php
final public function get($key) { $key = (string) $key; return isset($this->elements[$key]) ? $this->elements[$key] : null; }
[ "final", "public", "function", "get", "(", "$", "key", ")", "{", "$", "key", "=", "(", "string", ")", "$", "key", ";", "return", "isset", "(", "$", "this", "->", "elements", "[", "$", "key", "]", ")", "?", "$", "this", "->", "elements", "[", "$...
{@inheritDoc}
[ "{" ]
train
https://github.com/baleen/migrations/blob/cfc8c439858cf4f0d4119af9eb67de493da8d95c/src/Common/Collection/AbstractCollection.php#L175-L179
baleen/migrations
src/Common/Collection/AbstractCollection.php
AbstractCollection.replace
public function replace(DeltaInterface $version) { $key = $version->getId()->toString(); $replacedElement = $this->contains($key) ? $this->get($key) : null; $this->elements[$key] = $version; return $replacedElement; }
php
public function replace(DeltaInterface $version) { $key = $version->getId()->toString(); $replacedElement = $this->contains($key) ? $this->get($key) : null; $this->elements[$key] = $version; return $replacedElement; }
[ "public", "function", "replace", "(", "DeltaInterface", "$", "version", ")", "{", "$", "key", "=", "$", "version", "->", "getId", "(", ")", "->", "toString", "(", ")", ";", "$", "replacedElement", "=", "$", "this", "->", "contains", "(", "$", "key", ...
{@inheritDoc}
[ "{" ]
train
https://github.com/baleen/migrations/blob/cfc8c439858cf4f0d4119af9eb67de493da8d95c/src/Common/Collection/AbstractCollection.php#L208-L215
baleen/migrations
src/Common/Collection/AbstractCollection.php
AbstractCollection.add
public function add(DeltaInterface $value) { $key = $value->getId()->toString(); if ($this->contains($key)) { throw new AlreadyExistsException(sprintf( 'Element with key "%s" already exists. Remove it first or use replace() if you want to overwrite it.', $...
php
public function add(DeltaInterface $value) { $key = $value->getId()->toString(); if ($this->contains($key)) { throw new AlreadyExistsException(sprintf( 'Element with key "%s" already exists. Remove it first or use replace() if you want to overwrite it.', $...
[ "public", "function", "add", "(", "DeltaInterface", "$", "value", ")", "{", "$", "key", "=", "$", "value", "->", "getId", "(", ")", "->", "toString", "(", ")", ";", "if", "(", "$", "this", "->", "contains", "(", "$", "key", ")", ")", "{", "throw"...
{@inheritDoc}
[ "{" ]
train
https://github.com/baleen/migrations/blob/cfc8c439858cf4f0d4119af9eb67de493da8d95c/src/Common/Collection/AbstractCollection.php#L220-L231
baleen/migrations
src/Common/Collection/AbstractCollection.php
AbstractCollection.partition
final public function partition(Closure $p) { $matches = $noMatches = array(); foreach ($this->elements as $key => $element) { if ($p($key, $element)) { $matches[$key] = $element; } else { $noMatches[$key] = $element; } } ...
php
final public function partition(Closure $p) { $matches = $noMatches = array(); foreach ($this->elements as $key => $element) { if ($p($key, $element)) { $matches[$key] = $element; } else { $noMatches[$key] = $element; } } ...
[ "final", "public", "function", "partition", "(", "Closure", "$", "p", ")", "{", "$", "matches", "=", "$", "noMatches", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "elements", "as", "$", "key", "=>", "$", "element", ")", "{", "if...
{@inheritDoc}
[ "{" ]
train
https://github.com/baleen/migrations/blob/cfc8c439858cf4f0d4119af9eb67de493da8d95c/src/Common/Collection/AbstractCollection.php#L284-L297
MW-Peachy/Peachy
Includes/PeachyAWBFunctions.php
PeachyAWBFunctions.fixTypos
public static function fixTypos( $text, $title ) { if( !count( self::$typo_list ) ) { global $script; $str = $script->getWiki()->initPage( 'Wikipedia:AutoWikiBrowser/Typos' )->get_text(); foreach( explode( "\n", $str ) as $line ){ if( substr( $line, 0, 5 ) == "<Typo" ) { preg_match( '/\<Typo wor...
php
public static function fixTypos( $text, $title ) { if( !count( self::$typo_list ) ) { global $script; $str = $script->getWiki()->initPage( 'Wikipedia:AutoWikiBrowser/Typos' )->get_text(); foreach( explode( "\n", $str ) as $line ){ if( substr( $line, 0, 5 ) == "<Typo" ) { preg_match( '/\<Typo wor...
[ "public", "static", "function", "fixTypos", "(", "$", "text", ",", "$", "title", ")", "{", "if", "(", "!", "count", "(", "self", "::", "$", "typo_list", ")", ")", "{", "global", "$", "script", ";", "$", "str", "=", "$", "script", "->", "getWiki", ...
@Fixme Method getWiki() not found. @see getWiki() @param string $text @param string $title @return mixed
[ "@Fixme", "Method", "getWiki", "()", "not", "found", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/PeachyAWBFunctions.php#L283-L323
wardrobecms/core-archived
src/migrations/2013_05_31_140553_create_posts_table.php
CreatePostsTable.up
public function up() { Schema::create('posts', function($table) { $table->increments('id'); $table->string('title'); $table->string('slug'); $table->text('content'); $table->string('image')->default(''); $table->string('type')->default('post'); $table->timestamp('publish_date'); $table->tin...
php
public function up() { Schema::create('posts', function($table) { $table->increments('id'); $table->string('title'); $table->string('slug'); $table->text('content'); $table->string('image')->default(''); $table->string('type')->default('post'); $table->timestamp('publish_date'); $table->tin...
[ "public", "function", "up", "(", ")", "{", "Schema", "::", "create", "(", "'posts'", ",", "function", "(", "$", "table", ")", "{", "$", "table", "->", "increments", "(", "'id'", ")", ";", "$", "table", "->", "string", "(", "'title'", ")", ";", "$",...
Run the migrations. @return void
[ "Run", "the", "migrations", "." ]
train
https://github.com/wardrobecms/core-archived/blob/5c0836ea2e6885a428c852dc392073f2a2541c71/src/migrations/2013_05_31_140553_create_posts_table.php#L12-L26
wardrobecms/core-archived
src/Wardrobe/Core/Controllers/Api/UserController.php
UserController.store
public function store() { $messages = $this->users->validForCreation( Input::get('first_name'), Input::get('last_name'), Input::get('email'), Input::get('password') ); if (count($messages) > 0) { return Response::json($messages->all(), 400); } return $this->users->create( Input::get('fi...
php
public function store() { $messages = $this->users->validForCreation( Input::get('first_name'), Input::get('last_name'), Input::get('email'), Input::get('password') ); if (count($messages) > 0) { return Response::json($messages->all(), 400); } return $this->users->create( Input::get('fi...
[ "public", "function", "store", "(", ")", "{", "$", "messages", "=", "$", "this", "->", "users", "->", "validForCreation", "(", "Input", "::", "get", "(", "'first_name'", ")", ",", "Input", "::", "get", "(", "'last_name'", ")", ",", "Input", "::", "get"...
Store a newly created resource in storage. @return Response
[ "Store", "a", "newly", "created", "resource", "in", "storage", "." ]
train
https://github.com/wardrobecms/core-archived/blob/5c0836ea2e6885a428c852dc392073f2a2541c71/src/Wardrobe/Core/Controllers/Api/UserController.php#L50-L71
wardrobecms/core-archived
src/Wardrobe/Core/Controllers/Api/UserController.php
UserController.update
public function update($id) { $messages = $this->users->validForUpdate( $id, Input::get('first_name'), Input::get('last_name'), Input::get('email'), Input::get('password') ); if (count($messages) > 0) { return Response::json($messages->all(), 400); } return $this->users->update( $id,...
php
public function update($id) { $messages = $this->users->validForUpdate( $id, Input::get('first_name'), Input::get('last_name'), Input::get('email'), Input::get('password') ); if (count($messages) > 0) { return Response::json($messages->all(), 400); } return $this->users->update( $id,...
[ "public", "function", "update", "(", "$", "id", ")", "{", "$", "messages", "=", "$", "this", "->", "users", "->", "validForUpdate", "(", "$", "id", ",", "Input", "::", "get", "(", "'first_name'", ")", ",", "Input", "::", "get", "(", "'last_name'", ")...
Update the specified resource in storage. @param int $id @return Response
[ "Update", "the", "specified", "resource", "in", "storage", "." ]
train
https://github.com/wardrobecms/core-archived/blob/5c0836ea2e6885a428c852dc392073f2a2541c71/src/Wardrobe/Core/Controllers/Api/UserController.php#L101-L124
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" ]
train
https://github.com/jkphl/dom-factory/blob/460595b73b214510b29f483d61358296d2825143/src/Domfactory/Infrastructure/Dom.php#L61-L74
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" ]
train
https://github.com/jkphl/dom-factory/blob/460595b73b214510b29f483d61358296d2825143/src/Domfactory/Infrastructure/Dom.php#L95-L113
baleen/migrations
src/Service/MigrationBus/Middleware/TransactionMiddleware.php
TransactionMiddleware.execute
public function execute($command, callable $next) { $migration = $command->getMigration(); if (!$migration instanceof TransactionAwareInterface) { $next($command); return; } $result = null; try { $migration->begin(); $next($com...
php
public function execute($command, callable $next) { $migration = $command->getMigration(); if (!$migration instanceof TransactionAwareInterface) { $next($command); return; } $result = null; try { $migration->begin(); $next($com...
[ "public", "function", "execute", "(", "$", "command", ",", "callable", "$", "next", ")", "{", "$", "migration", "=", "$", "command", "->", "getMigration", "(", ")", ";", "if", "(", "!", "$", "migration", "instanceof", "TransactionAwareInterface", ")", "{",...
execute @param MigrateCommand $command @param callable $next @return void
[ "execute" ]
train
https://github.com/baleen/migrations/blob/cfc8c439858cf4f0d4119af9eb67de493da8d95c/src/Service/MigrationBus/Middleware/TransactionMiddleware.php#L42-L58
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", "." ]
train
https://github.com/fastnloud/zf2-dkim/blob/64d33ca67b0076b147656b22aaf2dff500b530e4/src/Dkim/Signer/Signer.php#L88-L104
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", "." ]
train
https://github.com/fastnloud/zf2-dkim/blob/64d33ca67b0076b147656b22aaf2dff500b530e4/src/Dkim/Signer/Signer.php#L114-L121
fastnloud/zf2-dkim
src/Dkim/Signer/Signer.php
Signer.setPrivateKey
public function setPrivateKey($privateKey) { $privateKey = <<<PKEY -----BEGIN RSA PRIVATE KEY----- $privateKey -----END RSA PRIVATE KEY----- PKEY; if (!$privateKey = @openssl_pkey_get_private($privateKey)) { throw new \Exception("Invalid private key given."); } $this->p...
php
public function setPrivateKey($privateKey) { $privateKey = <<<PKEY -----BEGIN RSA PRIVATE KEY----- $privateKey -----END RSA PRIVATE KEY----- PKEY; if (!$privateKey = @openssl_pkey_get_private($privateKey)) { throw new \Exception("Invalid private key given."); } $this->p...
[ "public", "function", "setPrivateKey", "(", "$", "privateKey", ")", "{", "$", "privateKey", "=", " <<<PKEY\n-----BEGIN RSA PRIVATE KEY-----\n$privateKey\n-----END RSA PRIVATE KEY-----\nPKEY", ";", "if", "(", "!", "$", "privateKey", "=", "@", "openssl_pkey_get_private", "(",...
Set (generate) OpenSSL key. @param string $privateKey @throws \Exception @return void
[ "Set", "(", "generate", ")", "OpenSSL", "key", "." ]
train
https://github.com/fastnloud/zf2-dkim/blob/64d33ca67b0076b147656b22aaf2dff500b530e4/src/Dkim/Signer/Signer.php#L145-L158
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", "." ]
train
https://github.com/fastnloud/zf2-dkim/blob/64d33ca67b0076b147656b22aaf2dff500b530e4/src/Dkim/Signer/Signer.php#L166-L177
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", "." ]
train
https://github.com/fastnloud/zf2-dkim/blob/64d33ca67b0076b147656b22aaf2dff500b530e4/src/Dkim/Signer/Signer.php#L196-L213
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", "." ]
train
https://github.com/fastnloud/zf2-dkim/blob/64d33ca67b0076b147656b22aaf2dff500b530e4/src/Dkim/Signer/Signer.php#L222-L251
fastnloud/zf2-dkim
src/Dkim/Signer/Signer.php
Signer.generateSignature
private function generateSignature() { if (!$this->getPrivateKey()) { throw new \Exception('No private key given.'); } $signature = ''; openssl_sign($this->getCanonizedHeaders(), $signature, $this->getPrivateKey()); return trim(chunk_split(base64_encode($signatu...
php
private function generateSignature() { if (!$this->getPrivateKey()) { throw new \Exception('No private key given.'); } $signature = ''; openssl_sign($this->getCanonizedHeaders(), $signature, $this->getPrivateKey()); return trim(chunk_split(base64_encode($signatu...
[ "private", "function", "generateSignature", "(", ")", "{", "if", "(", "!", "$", "this", "->", "getPrivateKey", "(", ")", ")", "{", "throw", "new", "\\", "Exception", "(", "'No private key given.'", ")", ";", "}", "$", "signature", "=", "''", ";", "openss...
Generate signature. @return string @throws \Exception
[ "Generate", "signature", "." ]
train
https://github.com/fastnloud/zf2-dkim/blob/64d33ca67b0076b147656b22aaf2dff500b530e4/src/Dkim/Signer/Signer.php#L259-L269
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", "." ]
train
https://github.com/fastnloud/zf2-dkim/blob/64d33ca67b0076b147656b22aaf2dff500b530e4/src/Dkim/Signer/Signer.php#L277-L299
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", "." ]
train
https://github.com/yarcode/yii2-email-manager/blob/4e83eae67199fc2b9eca9f08dcf59cc0440c385a/src/backend/controllers/TemplateController.php#L80-L91
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", "." ]
train
https://github.com/budde377/Part/blob/9ab5ce43dd809f9c563040ae0f7dcb7f56a52c5d/lib/util/traits/FilePathTrait.php#L86-L100
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" ]
train
https://github.com/baleen/migrations/blob/cfc8c439858cf4f0d4119af9eb67de493da8d95c/src/Common/Event/Progress.php#L79-L87
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", "." ]
train
https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L44-L53
toni-kolev/MultilingualExtension
src/Context/MultilingualContext.php
MultilingualContext.languageDetection
public function languageDetection() { $current_url = $this->getSession()->getCurrentUrl(); $base_url = $this->getMinkParameter('base_url'); // Checks whether the last symbol in the base_url is /, if not it adds it if (substr($base_url, -1) != "/") { $base_url = $base_url."/";...
php
public function languageDetection() { $current_url = $this->getSession()->getCurrentUrl(); $base_url = $this->getMinkParameter('base_url'); // Checks whether the last symbol in the base_url is /, if not it adds it if (substr($base_url, -1) != "/") { $base_url = $base_url."/";...
[ "public", "function", "languageDetection", "(", ")", "{", "$", "current_url", "=", "$", "this", "->", "getSession", "(", ")", "->", "getCurrentUrl", "(", ")", ";", "$", "base_url", "=", "$", "this", "->", "getMinkParameter", "(", "'base_url'", ")", ";", ...
/* This function detects site's language based on URL. If no URL language is detected the default_language is used.
[ "/", "*", "This", "function", "detects", "site", "s", "language", "based", "on", "URL", ".", "If", "no", "URL", "language", "is", "detected", "the", "default_language", "is", "used", "." ]
train
https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L74-L92
toni-kolev/MultilingualExtension
src/Context/MultilingualContext.php
MultilingualContext.localizeTarget
public function localizeTarget($target) { $translations = $this->multilingual_parameters['translations']; if(isset($this->translations[$target][$this->multilingual_parameters['default_language']])){ $target = $this->translations[$target][$this->languageDetection()]; return $targe...
php
public function localizeTarget($target) { $translations = $this->multilingual_parameters['translations']; if(isset($this->translations[$target][$this->multilingual_parameters['default_language']])){ $target = $this->translations[$target][$this->languageDetection()]; return $targe...
[ "public", "function", "localizeTarget", "(", "$", "target", ")", "{", "$", "translations", "=", "$", "this", "->", "multilingual_parameters", "[", "'translations'", "]", ";", "if", "(", "isset", "(", "$", "this", "->", "translations", "[", "$", "target", "...
This function localizes the targeted string. It tries to find a definition of the provided text (in English) in the translations file that is provided within the profile parameters. If it fails to find translation for the requested language it falls back to English. If the string is not defined at all in the translatio...
[ "This", "function", "localizes", "the", "targeted", "string", ".", "It", "tries", "to", "find", "a", "definition", "of", "the", "provided", "text", "(", "in", "English", ")", "in", "the", "translations", "file", "that", "is", "provided", "within", "the", "...
train
https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L101-L111
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", "." ]
train
https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L117-L122
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" ]
train
https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L177-L180
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" ]
train
https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L188-L191
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" ]
train
https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L198-L202
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" ]
train
https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L209-L212
toni-kolev/MultilingualExtension
src/Context/MultilingualContext.php
MultilingualContext.fillLocalizedField
public function fillLocalizedField($field, $value) { $field = $this->localizeField($field); $this->getSession()->getPage()->fillField($field, $value); }
php
public function fillLocalizedField($field, $value) { $field = $this->localizeField($field); $this->getSession()->getPage()->fillField($field, $value); }
[ "public", "function", "fillLocalizedField", "(", "$", "field", ",", "$", "value", ")", "{", "$", "field", "=", "$", "this", "->", "localizeField", "(", "$", "field", ")", ";", "$", "this", "->", "getSession", "(", ")", "->", "getPage", "(", ")", "->"...
Fills in form field with specified id|name|label|value Example: When I fill in "username" with: "bwayne" Example: And I fill in "bwayne" for "username" @When /^(?:|I )fill in localized "(?P<field>(?:[^"]|\\")*)" with "(?P<value>(?:[^"]|\\")*)"$/ @When /^(?:|I )fill in localized "(?P<field>(?:[^"]|\\")*)" with:$/ @When...
[ "Fills", "in", "form", "field", "with", "specified", "id|name|label|value", "Example", ":", "When", "I", "fill", "in", "username", "with", ":", "bwayne", "Example", ":", "And", "I", "fill", "in", "bwayne", "for", "username" ]
train
https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L223-L227
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" ]
train
https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L262-L265
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" ]
train
https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L272-L275
toni-kolev/MultilingualExtension
src/Context/MultilingualContext.php
MultilingualContext.assertSelectLocalizedRadioById
public function assertSelectLocalizedRadioById($label, $id = '') { $label = $this->localizeTarget($label); $this->assertSelectRadioById($label, $id); }
php
public function assertSelectLocalizedRadioById($label, $id = '') { $label = $this->localizeTarget($label); $this->assertSelectRadioById($label, $id); }
[ "public", "function", "assertSelectLocalizedRadioById", "(", "$", "label", ",", "$", "id", "=", "''", ")", "{", "$", "label", "=", "$", "this", "->", "localizeTarget", "(", "$", "label", ")", ";", "$", "this", "->", "assertSelectRadioById", "(", "$", "la...
@When I select the localized radio button :label with the id :id @When I select the localized radio button :label
[ "@When", "I", "select", "the", "localized", "radio", "button", ":", "label", "with", "the", "id", ":", "id", "@When", "I", "select", "the", "localized", "radio", "button", ":", "label" ]
train
https://github.com/toni-kolev/MultilingualExtension/blob/e0e1a9fc30e176e597bebb467ddf195cd5d555c3/src/Context/MultilingualContext.php#L282-L285
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L252-L283
MW-Peachy/Peachy
Includes/Image.php
Image.get_history
public function get_history( $dir = 'older', $limit = null, $force = false ) { if( !count( $this->history ) || $force ) { $this->history = $this->page->history( $limit, $dir ); } return $this->history; }
php
public function get_history( $dir = 'older', $limit = null, $force = false ) { if( !count( $this->history ) || $force ) { $this->history = $this->page->history( $limit, $dir ); } return $this->history; }
[ "public", "function", "get_history", "(", "$", "dir", "=", "'older'", ",", "$", "limit", "=", "null", ",", "$", "force", "=", "false", ")", "{", "if", "(", "!", "count", "(", "$", "this", "->", "history", ")", "||", "$", "force", ")", "{", "$", ...
Returns the upload history of the image. If function was already called earlier in the script, it will return the local cache unless $force is set to true. @access public @param string $dir Which direction to go. Default 'older' @param int $limit Number of revisions to get. Default null (all revisions) @param bool $fo...
[ "Returns", "the", "upload", "history", "of", "the", "image", ".", "If", "function", "was", "already", "called", "earlier", "in", "the", "script", "it", "will", "return", "the", "local", "cache", "unless", "$force", "is", "set", "to", "true", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L294-L299
MW-Peachy/Peachy
Includes/Image.php
Image.get_usage
public function get_usage( $namespace = null, $redirects = "all", $followRedir = false, $limit = null, $force = false ) { if( $force || !count( $this->usage ) ) { $iuArray = array( 'list' => 'imageusage', '_code' => 'iu', '_lhtitle' => 'title', 'iutitle' => $this->titl...
php
public function get_usage( $namespace = null, $redirects = "all", $followRedir = false, $limit = null, $force = false ) { if( $force || !count( $this->usage ) ) { $iuArray = array( 'list' => 'imageusage', '_code' => 'iu', '_lhtitle' => 'title', 'iutitle' => $this->titl...
[ "public", "function", "get_usage", "(", "$", "namespace", "=", "null", ",", "$", "redirects", "=", "\"all\"", ",", "$", "followRedir", "=", "false", ",", "$", "limit", "=", "null", ",", "$", "force", "=", "false", ")", "{", "if", "(", "$", "force", ...
Returns all pages where the image is used. If function was already called earlier in the script, it will return the local cache unless $force is set to true. @access public @param string|array $namespace Namespaces to look in. If set as a string, must be set in the syntax "0|1|2|...". If an array, simply the namespace...
[ "Returns", "all", "pages", "where", "the", "image", "is", "used", ".", "If", "function", "was", "already", "called", "earlier", "in", "the", "script", "it", "will", "return", "the", "local", "cache", "unless", "$force", "is", "set", "to", "true", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L312-L343
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L352-L398
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L408-L450
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", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L458-L489
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L504-L549
MW-Peachy/Peachy
Includes/Image.php
Image.api_upload
public function api_upload( $file, $text = '', $comment = '', $watch = null, $ignorewarnings = true, $async = false, $filekey = null ) { $tokens = $this->wiki->get_tokens(); $apiArr = array( 'action' => 'upload', 'filename' => $this->rawtitle, 'comment' => $comment, 'text' ...
php
public function api_upload( $file, $text = '', $comment = '', $watch = null, $ignorewarnings = true, $async = false, $filekey = null ) { $tokens = $this->wiki->get_tokens(); $apiArr = array( 'action' => 'upload', 'filename' => $this->rawtitle, 'comment' => $comment, 'text' ...
[ "public", "function", "api_upload", "(", "$", "file", ",", "$", "text", "=", "''", ",", "$", "comment", "=", "''", ",", "$", "watch", "=", "null", ",", "$", "ignorewarnings", "=", "true", ",", "$", "async", "=", "false", ",", "$", "filekey", "=", ...
Upload an image to the wiki using api.php @access public @param mixed $file Absolute path to the image, a URL, or an array containing file chunks for a chunk upload. @param string $text Text on the image file page (default: '') @param string $comment Comment for inthe upload in logs (default: '') @param bool $watch Sh...
[ "Upload", "an", "image", "to", "the", "wiki", "using", "api", ".", "php" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L565-L651
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L661-L691
MW-Peachy/Peachy
Includes/Image.php
Image.resize
public function resize( $width = null, $height = null, $reupload = false, $text = '', $comment = '', $watch = null, $ignorewarnings = true ) { global $pgIP, $pgNotag, $pgTag; try{ $this->preEditChecks( "Resize" ); } catch( EditError $e ){ pecho( "Error: $e\n\n", PECHO_FATAL ); return false; } if( !...
php
public function resize( $width = null, $height = null, $reupload = false, $text = '', $comment = '', $watch = null, $ignorewarnings = true ) { global $pgIP, $pgNotag, $pgTag; try{ $this->preEditChecks( "Resize" ); } catch( EditError $e ){ pecho( "Error: $e\n\n", PECHO_FATAL ); return false; } if( !...
[ "public", "function", "resize", "(", "$", "width", "=", "null", ",", "$", "height", "=", "null", ",", "$", "reupload", "=", "false", ",", "$", "text", "=", "''", ",", "$", "comment", "=", "''", ",", "$", "watch", "=", "null", ",", "$", "ignorewar...
Resize an image @access public @param int $width Width of resized image. Default null @param int $height Height of resized image. Default null. @param bool $reupload Whether or not to automatically upload the image again. Default false @param string $text Text to use for the image name @param string $comment Upload co...
[ "Resize", "an", "image" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L708-L785
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", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Image.php#L809-L811
baleen/migrations
src/Service/DomainBus/Factory/DomainCommandBusFactory.php
DomainCommandBusFactory.getCommandHandlerMapping
public function getCommandHandlerMapping() { /** @var MigrationRunnerInterface $migrationRunner */ $migrationRunner = $this->getRunner(); $factory = new CollectionRunnerFactory($this->publisher, $migrationRunner); return [ CollectionCommand::class => new CollectionHandler...
php
public function getCommandHandlerMapping() { /** @var MigrationRunnerInterface $migrationRunner */ $migrationRunner = $this->getRunner(); $factory = new CollectionRunnerFactory($this->publisher, $migrationRunner); return [ CollectionCommand::class => new CollectionHandler...
[ "public", "function", "getCommandHandlerMapping", "(", ")", "{", "/** @var MigrationRunnerInterface $migrationRunner */", "$", "migrationRunner", "=", "$", "this", "->", "getRunner", "(", ")", ";", "$", "factory", "=", "new", "CollectionRunnerFactory", "(", "$", "this...
getCommandHandlerMapping @return array
[ "getCommandHandlerMapping" ]
train
https://github.com/baleen/migrations/blob/cfc8c439858cf4f0d4119af9eb67de493da8d95c/src/Service/DomainBus/Factory/DomainCommandBusFactory.php#L80-L90
wa0x6e/php-resque-ex-scheduler
lib/ResqueScheduler/Worker.php
Worker.work
public function work($interval = null) { if ($interval !== null) { $this->interval = $interval; } $this->updateProcLine('Starting'); $this->startup(); while (true) { if ($this->shutdown) { break; } $this->hand...
php
public function work($interval = null) { if ($interval !== null) { $this->interval = $interval; } $this->updateProcLine('Starting'); $this->startup(); while (true) { if ($this->shutdown) { break; } $this->hand...
[ "public", "function", "work", "(", "$", "interval", "=", "null", ")", "{", "if", "(", "$", "interval", "!==", "null", ")", "{", "$", "this", "->", "interval", "=", "$", "interval", ";", "}", "$", "this", "->", "updateProcLine", "(", "'Starting'", ")"...
The primary loop for a worker. Every $interval (seconds), the scheduled queue will be checked for jobs that should be pushed to Resque. @param int $interval How often to check schedules.
[ "The", "primary", "loop", "for", "a", "worker", "." ]
train
https://github.com/wa0x6e/php-resque-ex-scheduler/blob/aebd32014e44d2a1037392961dede2875b525f6f/lib/ResqueScheduler/Worker.php#L30-L49
wa0x6e/php-resque-ex-scheduler
lib/ResqueScheduler/Worker.php
Worker.enqueueDelayedItemsForTimestamp
public function enqueueDelayedItemsForTimestamp($timestamp) { $item = null; while ($item = ResqueScheduler::nextItemForTimestamp($timestamp)) { $this->log( array( 'message' => 'Moving scheduled job ' . strtoupper($item['class']) . ' to ' . strtoupper($item...
php
public function enqueueDelayedItemsForTimestamp($timestamp) { $item = null; while ($item = ResqueScheduler::nextItemForTimestamp($timestamp)) { $this->log( array( 'message' => 'Moving scheduled job ' . strtoupper($item['class']) . ' to ' . strtoupper($item...
[ "public", "function", "enqueueDelayedItemsForTimestamp", "(", "$", "timestamp", ")", "{", "$", "item", "=", "null", ";", "while", "(", "$", "item", "=", "ResqueScheduler", "::", "nextItemForTimestamp", "(", "$", "timestamp", ")", ")", "{", "$", "this", "->",...
Schedule all of the delayed jobs for a given timestamp. Searches for all items for a given timestamp, pulls them off the list of delayed jobs and pushes them across to Resque. @param DateTime|int $timestamp Search for any items up to this timestamp to schedule.
[ "Schedule", "all", "of", "the", "delayed", "jobs", "for", "a", "given", "timestamp", "." ]
train
https://github.com/wa0x6e/php-resque-ex-scheduler/blob/aebd32014e44d2a1037392961dede2875b525f6f/lib/ResqueScheduler/Worker.php#L75-L108
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", "." ]
train
https://github.com/wa0x6e/php-resque-ex-scheduler/blob/aebd32014e44d2a1037392961dede2875b525f6f/lib/ResqueScheduler/Worker.php#L113-L123
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Plugins/SiteMatrix.php#L34-L81
yeephp/yeephp
Yee/Managers/CacheManager.php
Cache.jsonCacheStart
public function jsonCacheStart( $name, $language = '', $cache_timer=900 ) { $cache_folder = $this->app->config('cache.path')."/json/"; $cache_name = md5($name.$language).".json"; $ntime = strtotime( date("Y-m-d H:i:s") ); $ftime = @filemtime( $cache_folder.$cache_name ); $product = $ntime-$ftime; ...
php
public function jsonCacheStart( $name, $language = '', $cache_timer=900 ) { $cache_folder = $this->app->config('cache.path')."/json/"; $cache_name = md5($name.$language).".json"; $ntime = strtotime( date("Y-m-d H:i:s") ); $ftime = @filemtime( $cache_folder.$cache_name ); $product = $ntime-$ftime; ...
[ "public", "function", "jsonCacheStart", "(", "$", "name", ",", "$", "language", "=", "''", ",", "$", "cache_timer", "=", "900", ")", "{", "$", "cache_folder", "=", "$", "this", "->", "app", "->", "config", "(", "'cache.path'", ")", ".", "\"/json/\"", "...
/* Control Data Function or Init Cache start
[ "/", "*", "Control", "Data", "Function", "or", "Init", "Cache", "start" ]
train
https://github.com/yeephp/yeephp/blob/6107f60ceaf0811a6550872bd669580ac282cb1f/Yee/Managers/CacheManager.php#L46-L61
yeephp/yeephp
Yee/Managers/CacheManager.php
Cache.jsonCacheSave
public function jsonCacheSave( $name, $language = '', $data ) { $cache_folder = $this->app->config('cache.path')."json/"; $cache_name = md5( $name.$language ).".json"; file_put_contents( $cache_folder.$cache_name, $this->jsonCacheCompress( json_encode($data) ) ); }
php
public function jsonCacheSave( $name, $language = '', $data ) { $cache_folder = $this->app->config('cache.path')."json/"; $cache_name = md5( $name.$language ).".json"; file_put_contents( $cache_folder.$cache_name, $this->jsonCacheCompress( json_encode($data) ) ); }
[ "public", "function", "jsonCacheSave", "(", "$", "name", ",", "$", "language", "=", "''", ",", "$", "data", ")", "{", "$", "cache_folder", "=", "$", "this", "->", "app", "->", "config", "(", "'cache.path'", ")", ".", "\"json/\"", ";", "$", "cache_name"...
/* Save compressed and json encoded Data
[ "/", "*", "Save", "compressed", "and", "json", "encoded", "Data" ]
train
https://github.com/yeephp/yeephp/blob/6107f60ceaf0811a6550872bd669580ac282cb1f/Yee/Managers/CacheManager.php#L66-L71
wardrobecms/core-archived
src/migrations/2013_06_02_233121_create_password_reminders_table.php
CreatePasswordRemindersTable.up
public function up() { Schema::create('password_reminders', function($t) { $t->string('email'); $t->string('token'); $t->timestamp('created_at'); }); }
php
public function up() { Schema::create('password_reminders', function($t) { $t->string('email'); $t->string('token'); $t->timestamp('created_at'); }); }
[ "public", "function", "up", "(", ")", "{", "Schema", "::", "create", "(", "'password_reminders'", ",", "function", "(", "$", "t", ")", "{", "$", "t", "->", "string", "(", "'email'", ")", ";", "$", "t", "->", "string", "(", "'token'", ")", ";", "$",...
Run the migrations. @return void
[ "Run", "the", "migrations", "." ]
train
https://github.com/wardrobecms/core-archived/blob/5c0836ea2e6885a428c852dc392073f2a2541c71/src/migrations/2013_06_02_233121_create_password_reminders_table.php#L12-L20
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", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L600-L625
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.apiQuery
public function apiQuery( $arrayParams = array(), $post = false, $errorcheck = true, $recursed = false, $assertcheck = true, $talktoOauth = false ) { global $pgIP, $pgMaxAttempts, $pgThrowExceptions, $pgDisplayGetOutData, $pgLogSuccessfulCommunicationData, $pgLogFailedCommunicationData, $pgLogGetCommunicationData, $...
php
public function apiQuery( $arrayParams = array(), $post = false, $errorcheck = true, $recursed = false, $assertcheck = true, $talktoOauth = false ) { global $pgIP, $pgMaxAttempts, $pgThrowExceptions, $pgDisplayGetOutData, $pgLogSuccessfulCommunicationData, $pgLogFailedCommunicationData, $pgLogGetCommunicationData, $...
[ "public", "function", "apiQuery", "(", "$", "arrayParams", "=", "array", "(", ")", ",", "$", "post", "=", "false", ",", "$", "errorcheck", "=", "true", ",", "$", "recursed", "=", "false", ",", "$", "assertcheck", "=", "true", ",", "$", "talktoOauth", ...
Queries the API. @access public @param array $arrayParams Parameters given to query with (default: array()) @param bool $post Should it be a POST request? (default: false) @param bool $errorcheck @param bool $recursed Is this a recursed request (default: false) @param bool $assertcheck Use MediaWiki's assert feature t...
[ "Queries", "the", "API", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L720-L1018
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.listHandler
public function listHandler( $tArray = array(), &$resume = null ) { if( isset( $tArray['_code'] ) ) { $code = $tArray['_code']; unset( $tArray['_code'] ); } else { throw new BadEntryError( "listHandler", "Parameter _code is required." ); } if( isset( $tArray['_limit'] ) ) { $limit = $tArray['_limit...
php
public function listHandler( $tArray = array(), &$resume = null ) { if( isset( $tArray['_code'] ) ) { $code = $tArray['_code']; unset( $tArray['_code'] ); } else { throw new BadEntryError( "listHandler", "Parameter _code is required." ); } if( isset( $tArray['_limit'] ) ) { $limit = $tArray['_limit...
[ "public", "function", "listHandler", "(", "$", "tArray", "=", "array", "(", ")", ",", "&", "$", "resume", "=", "null", ")", "{", "if", "(", "isset", "(", "$", "tArray", "[", "'_code'", "]", ")", ")", "{", "$", "code", "=", "$", "tArray", "[", "...
Simplifies the running of API queries, especially with continues and other parameters. @access public @link http://wiki.peachy.compwhizii.net/wiki/Manual/Wiki::listHandler @param array $tArray Parameters given to query with (default: array()). In addition to those recognised by the API, ['_code'] should be set to the ...
[ "Simplifies", "the", "running", "of", "API", "queries", "especially", "with", "continues", "and", "other", "parameters", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1048-L1166
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1297-L1303
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1322-L1375
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1398-L1477
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1491-L1511
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", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1529-L1558
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1574-L1596
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1614-L1639
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1659-L1689
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1705-L1727
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1742-L1762
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1778-L1798
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.embeddedin
public function embeddedin( $title, $namespace = null, $limit = 50 ) { Peachy::deprecatedWarn( 'Wiki::embeddedin()', 'Page::embeddedin()' ); $page = $this->initPage( $title ); return $page->embeddedin( $namespace, $limit ); }
php
public function embeddedin( $title, $namespace = null, $limit = 50 ) { Peachy::deprecatedWarn( 'Wiki::embeddedin()', 'Page::embeddedin()' ); $page = $this->initPage( $title ); return $page->embeddedin( $namespace, $limit ); }
[ "public", "function", "embeddedin", "(", "$", "title", ",", "$", "namespace", "=", "null", ",", "$", "limit", "=", "50", ")", "{", "Peachy", "::", "deprecatedWarn", "(", "'Wiki::embeddedin()'", ",", "'Page::embeddedin()'", ")", ";", "$", "page", "=", "$", ...
Returns array of pages that embed (transclude) the page given. @see Page::embeddedin() @access public @param string $title The title of the page being embedded. @param array $namespace Which namespaces to search (default: null). @param int $limit How many results to retrieve (default: null i.e. all). @return array A l...
[ "Returns", "array", "of", "pages", "that", "embed", "(", "transclude", ")", "the", "page", "given", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1810-L1814
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", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1824-L1837
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.get_watchlist
public function get_watchlist( $minor = null, $bot = null, $anon = null, $patrolled = null, $namespace = null, $user = null, $excludeuser = null, $start = null, $end = null, $prop = array( 'ids', 'title', 'flags', 'user', 'comment', 'parsedcomment', 'timestamp', 'patrol', 'sizes', 'notificationtimes...
php
public function get_watchlist( $minor = null, $bot = null, $anon = null, $patrolled = null, $namespace = null, $user = null, $excludeuser = null, $start = null, $end = null, $prop = array( 'ids', 'title', 'flags', 'user', 'comment', 'parsedcomment', 'timestamp', 'patrol', 'sizes', 'notificationtimes...
[ "public", "function", "get_watchlist", "(", "$", "minor", "=", "null", ",", "$", "bot", "=", "null", ",", "$", "anon", "=", "null", ",", "$", "patrolled", "=", "null", ",", "$", "namespace", "=", "null", ",", "$", "user", "=", "null", ",", "$", "...
@FIXME Implement this method @param null $minor @param null $bot @param null $anon @param null $patrolled @param null $namespace @param null $user @param null $excludeuser @param null $start @param null $end @param array $prop @param int $limit
[ "@FIXME", "Implement", "this", "method" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1854-L1869
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", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1892-L1912
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", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1936-L1951
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L1971-L1994
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.allmessages
public function allmessages( $filter = null, $messages = array(), $parse = false, $args = array(), $lang = null ) { $amArray = array( 'action' => 'query', 'meta' => 'allmessages', ); if( !is_null( $filter ) ) $amArray['amfilter'] = $filter; if( count( $messages ) ) $amArray['ammessages'] = implode( '|'...
php
public function allmessages( $filter = null, $messages = array(), $parse = false, $args = array(), $lang = null ) { $amArray = array( 'action' => 'query', 'meta' => 'allmessages', ); if( !is_null( $filter ) ) $amArray['amfilter'] = $filter; if( count( $messages ) ) $amArray['ammessages'] = implode( '|'...
[ "public", "function", "allmessages", "(", "$", "filter", "=", "null", ",", "$", "messages", "=", "array", "(", ")", ",", "$", "parse", "=", "false", ",", "$", "args", "=", "array", "(", ")", ",", "$", "lang", "=", "null", ")", "{", "$", "amArray"...
Returns a list of system messages (MediaWiki:... pages) @access public @param string $filter Return only messages that contain this string. Default null @param array $messages Which messages to output. Default array(), which means all. @param bool $parse Set to true to enable parser, will preprocess the wikitext of me...
[ "Returns", "a", "list", "of", "system", "messages", "(", "MediaWiki", ":", "...", "pages", ")" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2007-L2024
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" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2035-L2051
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.parse
public function parse( $text = null, $title = null, $summary = null, $pst = false, $onlypst = false, $prop = null, $uselang = 'en', $page = null, $oldid = null, $pageid = null, $redirects = false, $section = null, $disablepp = false, $generatexml = false, $contentformat = null, $contentmodel = null, $mobileformat = nul...
php
public function parse( $text = null, $title = null, $summary = null, $pst = false, $onlypst = false, $prop = null, $uselang = 'en', $page = null, $oldid = null, $pageid = null, $redirects = false, $section = null, $disablepp = false, $generatexml = false, $contentformat = null, $contentmodel = null, $mobileformat = nul...
[ "public", "function", "parse", "(", "$", "text", "=", "null", ",", "$", "title", "=", "null", ",", "$", "summary", "=", "null", ",", "$", "pst", "=", "false", ",", "$", "onlypst", "=", "false", ",", "$", "prop", "=", "null", ",", "$", "uselang", ...
Parses wikitext and returns parser output @access public @param string $text Wikitext to parse. Default null. @param string $title Title of page the text belongs to, used for {{PAGENAME}}. Default null. @param string $summary Summary to parse. Default null. @param bool $pst Run a pre-save transform, expanding {{subst:...
[ "Parses", "wikitext", "and", "returns", "parser", "output" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2078-L2134
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.patrol
public function patrol( $rcid = 0 ) { Hooks::runHook( 'PrePatrol', array( &$rcid ) ); pecho( "Patrolling $rcid...\n\n", PECHO_NORMAL ); $this->get_tokens(); return $this->apiQuery( array( 'action' => 'patrol', 'rcid' => $rcid, 'token' => $this->tokens['patrol'] ) ); }
php
public function patrol( $rcid = 0 ) { Hooks::runHook( 'PrePatrol', array( &$rcid ) ); pecho( "Patrolling $rcid...\n\n", PECHO_NORMAL ); $this->get_tokens(); return $this->apiQuery( array( 'action' => 'patrol', 'rcid' => $rcid, 'token' => $this->tokens['patrol'] ) ); }
[ "public", "function", "patrol", "(", "$", "rcid", "=", "0", ")", "{", "Hooks", "::", "runHook", "(", "'PrePatrol'", ",", "array", "(", "&", "$", "rcid", ")", ")", ";", "pecho", "(", "\"Patrolling $rcid...\\n\\n\"", ",", "PECHO_NORMAL", ")", ";", "$", "...
Patrols a page or revision @access public @param int $rcid Recent changes ID to patrol @return array
[ "Patrols", "a", "page", "or", "revision" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2143-L2157
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.import
public function import( $page = null, $summary = '', $site = null, $fullhistory = true, $templates = true, $namespace = null, $root = false ) { $tokens = $this->get_tokens(); $apiArray = array( 'action' => 'import', 'summary' => $summary, 'token' => $tokens['import'] ); if( $root ) $apiArray['roo...
php
public function import( $page = null, $summary = '', $site = null, $fullhistory = true, $templates = true, $namespace = null, $root = false ) { $tokens = $this->get_tokens(); $apiArray = array( 'action' => 'import', 'summary' => $summary, 'token' => $tokens['import'] ); if( $root ) $apiArray['roo...
[ "public", "function", "import", "(", "$", "page", "=", "null", ",", "$", "summary", "=", "''", ",", "$", "site", "=", "null", ",", "$", "fullhistory", "=", "true", ",", "$", "templates", "=", "true", ",", "$", "namespace", "=", "null", ",", "$", ...
Import a page from another wiki, or an XML file. @access public @param mixed|string $page local XML file or page to another wiki. @param string $summary Import summary. Default ''. @param string $site For interwiki imports: wiki to import from. Default null. @param bool $fullhistory For interwiki imports: import the ...
[ "Import", "a", "page", "from", "another", "wiki", "or", "an", "XML", "file", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2172-L2220
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.diff
public function diff( $method = 'unified', $rev1, $rev2, $rev3 = null ) { $r1array = array( 'action' => 'query', 'prop' => 'revisions', 'revids' => $rev1, 'rvprop' => 'content' ); $r2array = array( 'action' => 'query', 'prop' => 'revisions', 'revids' => $rev2, 'rvprop' => 'content' )...
php
public function diff( $method = 'unified', $rev1, $rev2, $rev3 = null ) { $r1array = array( 'action' => 'query', 'prop' => 'revisions', 'revids' => $rev1, 'rvprop' => 'content' ); $r2array = array( 'action' => 'query', 'prop' => 'revisions', 'revids' => $rev2, 'rvprop' => 'content' )...
[ "public", "function", "diff", "(", "$", "method", "=", "'unified'", ",", "$", "rev1", ",", "$", "rev2", ",", "$", "rev3", "=", "null", ")", "{", "$", "r1array", "=", "array", "(", "'action'", "=>", "'query'", ",", "'prop'", "=>", "'revisions'", ",", ...
Generate a diff between two or three revision IDs @access public @param string $method Revision method. Options: unified, inline, context, threeway, raw (default: 'unified') @param mixed $rev1 @param mixed $rev2 @param mixed $rev3 @return string|bool False on failure @see Diff::load @fixme: this uses Diff::load, wh...
[ "Generate", "a", "diff", "between", "two", "or", "three", "revision", "IDs" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2242-L2301
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.get_tokens
public function get_tokens( $force = false ) { Hooks::runHook( 'GetTokens', array( &$this->tokens ) ); if( !$force && !empty( $this->tokens ) ) return $this->tokens; $tokens = $this->apiQuery( array( 'action' => 'tokens', 'type' => 'block|delete|deleteglobalaccount|edit|email|import|move|options|pa...
php
public function get_tokens( $force = false ) { Hooks::runHook( 'GetTokens', array( &$this->tokens ) ); if( !$force && !empty( $this->tokens ) ) return $this->tokens; $tokens = $this->apiQuery( array( 'action' => 'tokens', 'type' => 'block|delete|deleteglobalaccount|edit|email|import|move|options|pa...
[ "public", "function", "get_tokens", "(", "$", "force", "=", "false", ")", "{", "Hooks", "::", "runHook", "(", "'GetTokens'", ",", "array", "(", "&", "$", "this", "->", "tokens", ")", ")", ";", "if", "(", "!", "$", "force", "&&", "!", "empty", "(", ...
Regenerate and return edit tokens @access public @param bool $force Whether to force use of the API, not cache. @return array Edit tokens
[ "Regenerate", "and", "return", "edit", "tokens" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2310-L2346
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.get_namespaces
public function get_namespaces( $force = false ) { if( is_null( $this->namespaces ) || $force ) { $tArray = array( 'meta' => 'siteinfo', 'action' => 'query', 'siprop' => 'namespaces' ); $tRes = $this->apiQuery( $tArray ); foreach( $tRes['query']['namespaces'] as $namespace ){ $this->nam...
php
public function get_namespaces( $force = false ) { if( is_null( $this->namespaces ) || $force ) { $tArray = array( 'meta' => 'siteinfo', 'action' => 'query', 'siprop' => 'namespaces' ); $tRes = $this->apiQuery( $tArray ); foreach( $tRes['query']['namespaces'] as $namespace ){ $this->nam...
[ "public", "function", "get_namespaces", "(", "$", "force", "=", "false", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "namespaces", ")", "||", "$", "force", ")", "{", "$", "tArray", "=", "array", "(", "'meta'", "=>", "'siteinfo'", ",", "'a...
Returns an array of the namespaces used on the current wiki. @access public @param bool $force Whether or not to force an update of any cached values first. @return array The namespaces in use in the format index => local name.
[ "Returns", "an", "array", "of", "the", "namespaces", "used", "on", "the", "current", "wiki", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2366-L2381
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.removeNamespace
public function removeNamespace( $title ) { $this->get_namespaces(); $exploded = explode( ':', $title, 2 ); foreach( $this->namespaces as $namespace ){ if( $namespace == $exploded[0] ) { return $exploded[1]; } } return $title; }
php
public function removeNamespace( $title ) { $this->get_namespaces(); $exploded = explode( ':', $title, 2 ); foreach( $this->namespaces as $namespace ){ if( $namespace == $exploded[0] ) { return $exploded[1]; } } return $title; }
[ "public", "function", "removeNamespace", "(", "$", "title", ")", "{", "$", "this", "->", "get_namespaces", "(", ")", ";", "$", "exploded", "=", "explode", "(", "':'", ",", "$", "title", ",", "2", ")", ";", "foreach", "(", "$", "this", "->", "namespac...
Removes the namespace from a title @access public @param string $title Title to remove namespace from @return string
[ "Removes", "the", "namespace", "from", "a", "title" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2391-L2403
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.get_allow_subpages
public function get_allow_subpages( $force = false ) { if( is_null( $this->allowSubpages ) || $force ) { $this->get_namespaces( true ); } return $this->allowSubpages; }
php
public function get_allow_subpages( $force = false ) { if( is_null( $this->allowSubpages ) || $force ) { $this->get_namespaces( true ); } return $this->allowSubpages; }
[ "public", "function", "get_allow_subpages", "(", "$", "force", "=", "false", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "allowSubpages", ")", "||", "$", "force", ")", "{", "$", "this", "->", "get_namespaces", "(", "true", ")", ";", "}", ...
Returns an array of subpage-allowing namespaces. @access public @param bool $force Whether or not to force an update of any cached values first. @return array An array of namespaces that allow subpages.
[ "Returns", "an", "array", "of", "subpage", "-", "allowing", "namespaces", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2412-L2417
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.prefixindex
public function prefixindex( $prefix = null, $namespace = array( 0 ), $limit = 50 ) { return $this->allpages( $namespace, $prefix, null, 'all', null, null, array(), array(), 'ascending', 'all', $limit ); }
php
public function prefixindex( $prefix = null, $namespace = array( 0 ), $limit = 50 ) { return $this->allpages( $namespace, $prefix, null, 'all', null, null, array(), array(), 'ascending', 'all', $limit ); }
[ "public", "function", "prefixindex", "(", "$", "prefix", "=", "null", ",", "$", "namespace", "=", "array", "(", "0", ")", ",", "$", "limit", "=", "50", ")", "{", "return", "$", "this", "->", "allpages", "(", "$", "namespace", ",", "$", "prefix", ",...
Returns all the pages which start with a certain prefix, shortcut for {@link Wiki}::{@link allpages}() @param string $prefix Prefix to search for @param array $namespace Namespace IDs to search in. Default array( 0 ) @param int $limit A hard limit on the number of pages to fetch. Default null (all). @return array Titl...
[ "Returns", "all", "the", "pages", "which", "start", "with", "a", "certain", "prefix", "shortcut", "for", "{", "@link", "Wiki", "}", "::", "{", "@link", "allpages", "}", "()" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2451-L2453
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.&
public function &initPage( $title = null, $pageid = null, $followRedir = true, $normalize = true, $timestamp = null ) { $page = new Page( $this, $title, $pageid, $followRedir, $normalize, $timestamp ); return $page; }
php
public function &initPage( $title = null, $pageid = null, $followRedir = true, $normalize = true, $timestamp = null ) { $page = new Page( $this, $title, $pageid, $followRedir, $normalize, $timestamp ); return $page; }
[ "public", "function", "&", "initPage", "(", "$", "title", "=", "null", ",", "$", "pageid", "=", "null", ",", "$", "followRedir", "=", "true", ",", "$", "normalize", "=", "true", ",", "$", "timestamp", "=", "null", ")", "{", "$", "page", "=", "new",...
Returns an instance of the Page class as specified by $title or $pageid @access public @param mixed $title Title of the page (default: null) @param mixed $pageid ID of the page (default: null) @param bool $followRedir Should it follow a redirect when retrieving the page (default: true) @param bool $normalize Should th...
[ "Returns", "an", "instance", "of", "the", "Page", "class", "as", "specified", "by", "$title", "or", "$pageid" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2467-L2470
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.&
public function &initImage( $filename = null, $pageid = null ) { $image = new Image( $this, $filename, $pageid ); return $image; }
php
public function &initImage( $filename = null, $pageid = null ) { $image = new Image( $this, $filename, $pageid ); return $image; }
[ "public", "function", "&", "initImage", "(", "$", "filename", "=", "null", ",", "$", "pageid", "=", "null", ")", "{", "$", "image", "=", "new", "Image", "(", "$", "this", ",", "$", "filename", ",", "$", "pageid", ")", ";", "return", "$", "image", ...
Returns an instance of the Image class as specified by $filename or $pageid @access public @param string $filename Filename @param int $pageid Page ID of image @param array $prop Informatation to set. Default array( 'timestamp', 'user', 'comment', 'url', 'size', 'dimensions', 'sha1', 'mime', 'metadata', 'archivename',...
[ "Returns", "an", "instance", "of", "the", "Image", "class", "as", "specified", "by", "$filename", "or", "$pageid" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2494-L2497
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.compare
public function compare( $fromtitle = null, $fromid = null, $fromrev = null, $totitle = null, $toid = null, $torev = null ) { pecho( "Getting differences...\n\n", PECHO_NORMAL ); $apiArray = array( 'action' => 'compare' ); if( !is_null( $fromrev ) ) { $apiArray['fromrev'] = $fromrev; } else { if( !i...
php
public function compare( $fromtitle = null, $fromid = null, $fromrev = null, $totitle = null, $toid = null, $torev = null ) { pecho( "Getting differences...\n\n", PECHO_NORMAL ); $apiArray = array( 'action' => 'compare' ); if( !is_null( $fromrev ) ) { $apiArray['fromrev'] = $fromrev; } else { if( !i...
[ "public", "function", "compare", "(", "$", "fromtitle", "=", "null", ",", "$", "fromid", "=", "null", ",", "$", "fromrev", "=", "null", ",", "$", "totitle", "=", "null", ",", "$", "toid", "=", "null", ",", "$", "torev", "=", "null", ")", "{", "pe...
Get the difference between 2 pages @access public @param string $fromtitle First title to compare @param string $fromid First page ID to compare @param string $fromrev First revision to compare @param string $totitle Second title to compare @param string $toid Second page ID to compare @param string $torev Second revi...
[ "Get", "the", "difference", "between", "2", "pages" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2511-L2553
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.opensearch
public function opensearch( $text = '', $limit = 10, $namespaces = array( 0 ), $suggest = true ) { $apiArray = array( 'search' => $text, 'action' => 'opensearch', 'limit' => $limit, 'namespace' => implode( '|', $namespaces ) ); if( $suggest ) $apiArray['suggest'] = ''; $OSres = $this->ge...
php
public function opensearch( $text = '', $limit = 10, $namespaces = array( 0 ), $suggest = true ) { $apiArray = array( 'search' => $text, 'action' => 'opensearch', 'limit' => $limit, 'namespace' => implode( '|', $namespaces ) ); if( $suggest ) $apiArray['suggest'] = ''; $OSres = $this->ge...
[ "public", "function", "opensearch", "(", "$", "text", "=", "''", ",", "$", "limit", "=", "10", ",", "$", "namespaces", "=", "array", "(", "0", ")", ",", "$", "suggest", "=", "true", ")", "{", "$", "apiArray", "=", "array", "(", "'search'", "=>", ...
Search the wiki using the OpenSearch protocol. @access public @param string $text Search string. Default empty. @param int $limit Maximum amount of results to return. Default 10. @param array $namespaces Namespaces to search. Default array(0). @param bool $suggest Do nothing if $wgEnableOpenSearchSuggest is false. D...
[ "Search", "the", "wiki", "using", "the", "OpenSearch", "protocol", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2565-L2578
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.rsd
public function rsd() { $apiArray = array( 'action' => 'rsd' ); $OSres = $this->get_http()->get( $this->get_base_url(), $apiArray ); return ( $OSres === false || is_null( $OSres ) ? false : XMLParse::load( $OSres ) ); }
php
public function rsd() { $apiArray = array( 'action' => 'rsd' ); $OSres = $this->get_http()->get( $this->get_base_url(), $apiArray ); return ( $OSres === false || is_null( $OSres ) ? false : XMLParse::load( $OSres ) ); }
[ "public", "function", "rsd", "(", ")", "{", "$", "apiArray", "=", "array", "(", "'action'", "=>", "'rsd'", ")", ";", "$", "OSres", "=", "$", "this", "->", "get_http", "(", ")", "->", "get", "(", "$", "this", "->", "get_base_url", "(", ")", ",", "...
Export an RSD (Really Simple Discovery) schema. @access public @return array
[ "Export", "an", "RSD", "(", "Really", "Simple", "Discovery", ")", "schema", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2586-L2594
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.options
public function options( $reset = false, $resetoptions = array( 'all' ), $changeoptions = array(), $optionname = null, $optionvalue = null ) { $this->get_tokens(); $apiArray = array( 'action' => 'options', 'token' => $this->tokens['options'] ); if( $reset ) { $apiArray['reset'] = ''; $apiArray['re...
php
public function options( $reset = false, $resetoptions = array( 'all' ), $changeoptions = array(), $optionname = null, $optionvalue = null ) { $this->get_tokens(); $apiArray = array( 'action' => 'options', 'token' => $this->tokens['options'] ); if( $reset ) { $apiArray['reset'] = ''; $apiArray['re...
[ "public", "function", "options", "(", "$", "reset", "=", "false", ",", "$", "resetoptions", "=", "array", "(", "'all'", ")", ",", "$", "changeoptions", "=", "array", "(", ")", ",", "$", "optionname", "=", "null", ",", "$", "optionvalue", "=", "null", ...
Change preferences of the current user. @access public @param bool $reset Resets preferences to the site defaults. Default false. @param array|string $resetoptions List of types of options to reset when the "reset" option is set. Default 'all'. @param array|string $changeoptions PartList of changes, formatted name=val...
[ "Change", "preferences", "of", "the", "current", "user", "." ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2607-L2632
MW-Peachy/Peachy
Includes/Wiki.php
Wiki.preEditChecks
public function preEditChecks( $action = "Edit", $title = null, $pageidp = null ) { global $pgDisablechecks, $pgMasterrunpage; if( $pgDisablechecks ) return; $preeditinfo = array( 'action' => 'query', 'meta' => 'userinfo', 'uiprop' => 'hasmsg|blockinfo', 'prop' => 'revisions', 'rvprop' => 'cont...
php
public function preEditChecks( $action = "Edit", $title = null, $pageidp = null ) { global $pgDisablechecks, $pgMasterrunpage; if( $pgDisablechecks ) return; $preeditinfo = array( 'action' => 'query', 'meta' => 'userinfo', 'uiprop' => 'hasmsg|blockinfo', 'prop' => 'revisions', 'rvprop' => 'cont...
[ "public", "function", "preEditChecks", "(", "$", "action", "=", "\"Edit\"", ",", "$", "title", "=", "null", ",", "$", "pageidp", "=", "null", ")", "{", "global", "$", "pgDisablechecks", ",", "$", "pgMasterrunpage", ";", "if", "(", "$", "pgDisablechecks", ...
Performs nobots checking, new message checking, etc @param string $action Name of action. @param null|string $title Name of page to check for nobots @param null $pageidp @throws AssertFailure @throws EditError @throws LoggedOut @throws MWAPIError @access public
[ "Performs", "nobots", "checking", "new", "message", "checking", "etc" ]
train
https://github.com/MW-Peachy/Peachy/blob/2cd3f93fd48e06c8a9f9eaaf17c5547947f9613c/Includes/Wiki.php#L2657-L2721
skrz/meta
gen-src/Google/Protobuf/Meta/DescriptorProtoMeta.php
DescriptorProtoMeta.create
public static function create() { switch (func_num_args()) { case 0: return new DescriptorProto(); case 1: return new DescriptorProto(func_get_arg(0)); case 2: return new DescriptorProto(func_get_arg(0), func_get_arg(1)); case 3: return new DescriptorProto(func_get_arg(0), func_get_arg(1)...
php
public static function create() { switch (func_num_args()) { case 0: return new DescriptorProto(); case 1: return new DescriptorProto(func_get_arg(0)); case 2: return new DescriptorProto(func_get_arg(0), func_get_arg(1)); case 3: return new DescriptorProto(func_get_arg(0), func_get_arg(1)...
[ "public", "static", "function", "create", "(", ")", "{", "switch", "(", "func_num_args", "(", ")", ")", "{", "case", "0", ":", "return", "new", "DescriptorProto", "(", ")", ";", "case", "1", ":", "return", "new", "DescriptorProto", "(", "func_get_arg", "...
Creates new instance of \Google\Protobuf\DescriptorProto @throws \InvalidArgumentException @return DescriptorProto
[ "Creates", "new", "instance", "of", "\\", "Google", "\\", "Protobuf", "\\", "DescriptorProto" ]
train
https://github.com/skrz/meta/blob/013af6435d3885ab5b2e91fb8ebb051d0f874ab2/gen-src/Google/Protobuf/Meta/DescriptorProtoMeta.php#L68-L92
skrz/meta
gen-src/Google/Protobuf/Meta/DescriptorProtoMeta.php
DescriptorProtoMeta.reset
public static function reset($object) { if (!($object instanceof DescriptorProto)) { throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\DescriptorProto.'); } $object->name = NULL; $object->field = NULL; $object->extension = NULL; $object->nestedType = NULL; $object->...
php
public static function reset($object) { if (!($object instanceof DescriptorProto)) { throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\DescriptorProto.'); } $object->name = NULL; $object->field = NULL; $object->extension = NULL; $object->nestedType = NULL; $object->...
[ "public", "static", "function", "reset", "(", "$", "object", ")", "{", "if", "(", "!", "(", "$", "object", "instanceof", "DescriptorProto", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'You have to pass object of class Google\\Protobuf\\Des...
Resets properties of \Google\Protobuf\DescriptorProto to default values @param DescriptorProto $object @throws \InvalidArgumentException @return void
[ "Resets", "properties", "of", "\\", "Google", "\\", "Protobuf", "\\", "DescriptorProto", "to", "default", "values" ]
train
https://github.com/skrz/meta/blob/013af6435d3885ab5b2e91fb8ebb051d0f874ab2/gen-src/Google/Protobuf/Meta/DescriptorProtoMeta.php#L105-L120
skrz/meta
gen-src/Google/Protobuf/Meta/DescriptorProtoMeta.php
DescriptorProtoMeta.hash
public static function hash($object, $algoOrCtx = 'md5', $raw = FALSE) { if (is_string($algoOrCtx)) { $ctx = hash_init($algoOrCtx); } else { $ctx = $algoOrCtx; } if (isset($object->name)) { hash_update($ctx, 'name'); hash_update($ctx, (string)$object->name); } if (isset($object->field)) { ...
php
public static function hash($object, $algoOrCtx = 'md5', $raw = FALSE) { if (is_string($algoOrCtx)) { $ctx = hash_init($algoOrCtx); } else { $ctx = $algoOrCtx; } if (isset($object->name)) { hash_update($ctx, 'name'); hash_update($ctx, (string)$object->name); } if (isset($object->field)) { ...
[ "public", "static", "function", "hash", "(", "$", "object", ",", "$", "algoOrCtx", "=", "'md5'", ",", "$", "raw", "=", "FALSE", ")", "{", "if", "(", "is_string", "(", "$", "algoOrCtx", ")", ")", "{", "$", "ctx", "=", "hash_init", "(", "$", "algoOrC...
Computes hash of \Google\Protobuf\DescriptorProto @param object $object @param string|resource $algoOrCtx @param bool $raw @return string|void
[ "Computes", "hash", "of", "\\", "Google", "\\", "Protobuf", "\\", "DescriptorProto" ]
train
https://github.com/skrz/meta/blob/013af6435d3885ab5b2e91fb8ebb051d0f874ab2/gen-src/Google/Protobuf/Meta/DescriptorProtoMeta.php#L132-L211
skrz/meta
gen-src/Google/Protobuf/Meta/DescriptorProtoMeta.php
DescriptorProtoMeta.fromProtobuf
public static function fromProtobuf($input, $object = NULL, &$start = 0, $end = NULL) { if ($object === null) { $object = new DescriptorProto(); } if ($end === null) { $end = strlen($input); } while ($start < $end) { $tag = Binary::decodeVarint($input, $start); $wireType = $tag & 0x7; $numbe...
php
public static function fromProtobuf($input, $object = NULL, &$start = 0, $end = NULL) { if ($object === null) { $object = new DescriptorProto(); } if ($end === null) { $end = strlen($input); } while ($start < $end) { $tag = Binary::decodeVarint($input, $start); $wireType = $tag & 0x7; $numbe...
[ "public", "static", "function", "fromProtobuf", "(", "$", "input", ",", "$", "object", "=", "NULL", ",", "&", "$", "start", "=", "0", ",", "$", "end", "=", "NULL", ")", "{", "if", "(", "$", "object", "===", "null", ")", "{", "$", "object", "=", ...
Creates \Google\Protobuf\DescriptorProto object from serialized Protocol Buffers message. @param string $input @param DescriptorProto $object @param int $start @param int $end @throws \Exception @return DescriptorProto
[ "Creates", "\\", "Google", "\\", "Protobuf", "\\", "DescriptorProto", "object", "from", "serialized", "Protocol", "Buffers", "message", "." ]
train
https://github.com/skrz/meta/blob/013af6435d3885ab5b2e91fb8ebb051d0f874ab2/gen-src/Google/Protobuf/Meta/DescriptorProtoMeta.php#L226-L428
skrz/meta
gen-src/Google/Protobuf/Meta/DescriptorProtoMeta.php
DescriptorProtoMeta.toProtobuf
public static function toProtobuf($object, $filter = NULL) { $output = ''; if (isset($object->name) && ($filter === null || isset($filter['name']))) { $output .= "\x0a"; $output .= Binary::encodeVarint(strlen($object->name)); $output .= $object->name; } if (isset($object->field) && ($filter === null...
php
public static function toProtobuf($object, $filter = NULL) { $output = ''; if (isset($object->name) && ($filter === null || isset($filter['name']))) { $output .= "\x0a"; $output .= Binary::encodeVarint(strlen($object->name)); $output .= $object->name; } if (isset($object->field) && ($filter === null...
[ "public", "static", "function", "toProtobuf", "(", "$", "object", ",", "$", "filter", "=", "NULL", ")", "{", "$", "output", "=", "''", ";", "if", "(", "isset", "(", "$", "object", "->", "name", ")", "&&", "(", "$", "filter", "===", "null", "||", ...
Serialized \Google\Protobuf\DescriptorProto to Protocol Buffers message. @param DescriptorProto $object @param array $filter @throws \Exception @return string
[ "Serialized", "\\", "Google", "\\", "Protobuf", "\\", "DescriptorProto", "to", "Protocol", "Buffers", "message", "." ]
train
https://github.com/skrz/meta/blob/013af6435d3885ab5b2e91fb8ebb051d0f874ab2/gen-src/Google/Protobuf/Meta/DescriptorProtoMeta.php#L441-L530