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
esperecyan/dictionary-php
src/Serializer.php
Serializer.serialize
public function serialize(Dictionary $dictionary, $csvOnly = false): array { switch ($this->to) { case 'キャッチフィーリング': $serializer = new serializer\CatchfeelingSerializer(); break; case 'きゃっちま': $serializer = new serializer\CatchmSerializ...
php
public function serialize(Dictionary $dictionary, $csvOnly = false): array { switch ($this->to) { case 'キャッチフィーリング': $serializer = new serializer\CatchfeelingSerializer(); break; case 'きゃっちま': $serializer = new serializer\CatchmSerializ...
[ "public", "function", "serialize", "(", "Dictionary", "$", "dictionary", ",", "$", "csvOnly", "=", "false", ")", ":", "array", "{", "switch", "(", "$", "this", "->", "to", ")", "{", "case", "'キャッチフィーリング':", "", "$", "serializer", "=", "new", "serializer"...
直列化したデータを返します。 @see https://github.com/esperecyan/dictionary-php#void-esperecyandictionary_phpserializerserializedictionary-dictionary @param Dictionary $dictionary @param bool|string $csvOnly `汎用辞書` `Inteligenceω クイズ` の場合、ZIPファイルの代わりにCSVファイル、txtファイルのみを返すときに真に設定します。 真の代わりに `https://example.ne.jp/dictionaries/1/files/%s...
[ "直列化したデータを返します。" ]
train
https://github.com/esperecyan/dictionary-php/blob/14fad08fb43006995c763094e8e7ed0dc0e26676/src/Serializer.php#L29-L53
link0/profiler
src/Link0/Profiler/Serializer.php
Serializer.unserialize
public function unserialize($data) { $object = @unserialize($data); if($object === false) { throw new SerializerException("Unable to unserialize data: " . $data); } return $object; }
php
public function unserialize($data) { $object = @unserialize($data); if($object === false) { throw new SerializerException("Unable to unserialize data: " . $data); } return $object; }
[ "public", "function", "unserialize", "(", "$", "data", ")", "{", "$", "object", "=", "@", "unserialize", "(", "$", "data", ")", ";", "if", "(", "$", "object", "===", "false", ")", "{", "throw", "new", "SerializerException", "(", "\"Unable to unserialize da...
@param string $data @throws SerializerException @return string
[ "@param", "string", "$data" ]
train
https://github.com/link0/profiler/blob/0573073ff029743734de747619ab65ab2476052d/src/Link0/Profiler/Serializer.php#L30-L38
FrenchFrogs/framework
src/Table/Renderer/Remote.php
Remote.table
public function table(Table\Table $table) { $data = []; foreach($table->getRows() as $row) { $line = []; foreach($table->getColumns() as $name => $column) { $line[] = $column->render((array) $row); } $data[] = $line; } ...
php
public function table(Table\Table $table) { $data = []; foreach($table->getRows() as $row) { $line = []; foreach($table->getColumns() as $name => $column) { $line[] = $column->render((array) $row); } $data[] = $line; } ...
[ "public", "function", "table", "(", "Table", "\\", "Table", "$", "table", ")", "{", "$", "data", "=", "[", "]", ";", "foreach", "(", "$", "table", "->", "getRows", "(", ")", "as", "$", "row", ")", "{", "$", "line", "=", "[", "]", ";", "foreach"...
Overload render for array data output @param \FrenchFrogs\Table\Table\Table $table @return array
[ "Overload", "render", "for", "array", "data", "output" ]
train
https://github.com/FrenchFrogs/framework/blob/a4838c698a5600437e87dac6d35ba8ebe32c4395/src/Table/Renderer/Remote.php#L14-L28
GokulSrinivas/Sangria
src/Sangria/JSONResponse.php
JSONResponse.response
public static function response($status_code=400, $data=NULL, $strict_mode=false) { /** * [$HTTP_MESSAGES Default Message Phrases for all the HTTP Status Codes] * @var [array] */ $HTTP_MESSAGES = array( "100" => "Continue", "101" => "Switching Protocols", "200" => "OK", "201" => "Created", "202"...
php
public static function response($status_code=400, $data=NULL, $strict_mode=false) { /** * [$HTTP_MESSAGES Default Message Phrases for all the HTTP Status Codes] * @var [array] */ $HTTP_MESSAGES = array( "100" => "Continue", "101" => "Switching Protocols", "200" => "OK", "201" => "Created", "202"...
[ "public", "static", "function", "response", "(", "$", "status_code", "=", "400", ",", "$", "data", "=", "NULL", ",", "$", "strict_mode", "=", "false", ")", "{", "/**\n\t\t * [$HTTP_MESSAGES Default Message Phrases for all the HTTP Status Codes]\n\t\t * @var [array]\n\t\t */...
[response JSON string that represents the data given] @param [type] $status_code [HTTP status code or Custom Status Code] @param [type] $data [description] @return [string] [description]
[ "[", "response", "JSON", "string", "that", "represents", "the", "data", "given", "]" ]
train
https://github.com/GokulSrinivas/Sangria/blob/e69076655da30ef74b9b6f4a7b7317b3d37d5710/src/Sangria/JSONResponse.php#L25-L137
etki/opencart-core-installer
src/Plugin.php
Plugin.activate
public function activate(Composer $composer, IOInterface $ioc) { $installer = new Installer($ioc, $composer); /** @type InstallationManager $manager */ $manager = $composer->getInstallationManager(); $manager->addInstaller($installer); }
php
public function activate(Composer $composer, IOInterface $ioc) { $installer = new Installer($ioc, $composer); /** @type InstallationManager $manager */ $manager = $composer->getInstallationManager(); $manager->addInstaller($installer); }
[ "public", "function", "activate", "(", "Composer", "$", "composer", ",", "IOInterface", "$", "ioc", ")", "{", "$", "installer", "=", "new", "Installer", "(", "$", "ioc", ",", "$", "composer", ")", ";", "/** @type InstallationManager $manager */", "$", "manager...
Activates plugin and registers installer. @param Composer $composer Composer instance. @param IOInterface $ioc I/O controller @return void @since 0.1.0
[ "Activates", "plugin", "and", "registers", "installer", "." ]
train
https://github.com/etki/opencart-core-installer/blob/e651c94982afe966cd36977bbdc2ff4f7e785475/src/Plugin.php#L28-L34
crossjoin/Css
src/Crossjoin/Css/Writer/WriterAbstract.php
WriterAbstract.getRulesContent
protected function getRulesContent(array $rules = null, $level = 0) { if ($level === 0) { $rules = $this->getStyleSheet()->getRules(); $this->errorMessages = []; } // Get format options $options = $this->getOptions($level); $content = ""; for...
php
protected function getRulesContent(array $rules = null, $level = 0) { if ($level === 0) { $rules = $this->getStyleSheet()->getRules(); $this->errorMessages = []; } // Get format options $options = $this->getOptions($level); $content = ""; for...
[ "protected", "function", "getRulesContent", "(", "array", "$", "rules", "=", "null", ",", "$", "level", "=", "0", ")", "{", "if", "(", "$", "level", "===", "0", ")", "{", "$", "rules", "=", "$", "this", "->", "getStyleSheet", "(", ")", "->", "getRu...
Generates the content for the given rules, depending on the set format options. @param RuleAbstract[] $rules @param int $level @return string
[ "Generates", "the", "content", "for", "the", "given", "rules", "depending", "on", "the", "set", "format", "options", "." ]
train
https://github.com/crossjoin/Css/blob/7b50ca94c4bdad60d01cfa327f00b7a600d6f9f3/src/Crossjoin/Css/Writer/WriterAbstract.php#L84-L499
Laralum/Roles
src/Traits/HasRolesAndPermissions.php
HasRolesAndPermissions.hasPermission
public function hasPermission($permission) { $permission = !is_string($permission) ?: Permission::where(['slug' => $permission])->first(); if (config('laralum.superadmin_bypass_haspermission')) { return true; } if ($permission) { foreach ($th...
php
public function hasPermission($permission) { $permission = !is_string($permission) ?: Permission::where(['slug' => $permission])->first(); if (config('laralum.superadmin_bypass_haspermission')) { return true; } if ($permission) { foreach ($th...
[ "public", "function", "hasPermission", "(", "$", "permission", ")", "{", "$", "permission", "=", "!", "is_string", "(", "$", "permission", ")", "?", ":", "Permission", "::", "where", "(", "[", "'slug'", "=>", "$", "permission", "]", ")", "->", "first", ...
Returns true if the role has a permission. @param mixed $role @return bool
[ "Returns", "true", "if", "the", "role", "has", "a", "permission", "." ]
train
https://github.com/Laralum/Roles/blob/f934967a5dcebebf81915dd50fccdbcb7e23c113/src/Traits/HasRolesAndPermissions.php#L18-L35
BugBuster1701/banner
modules/ModuleBannerStatistics.php
ModuleBannerStatistics.compile
protected function compile() { $arrBanners = array(); $arrBannersStat = array(); $intCatIdAllowed = false; //alle Kategorien holen die der User sehen darf $arrBannerCategories = $this->getBannerCategoriesByUsergroups(); // no categories : array('id' => '0', 'ti...
php
protected function compile() { $arrBanners = array(); $arrBannersStat = array(); $intCatIdAllowed = false; //alle Kategorien holen die der User sehen darf $arrBannerCategories = $this->getBannerCategoriesByUsergroups(); // no categories : array('id' => '0', 'ti...
[ "protected", "function", "compile", "(", ")", "{", "$", "arrBanners", "=", "array", "(", ")", ";", "$", "arrBannersStat", "=", "array", "(", ")", ";", "$", "intCatIdAllowed", "=", "false", ";", "//alle Kategorien holen die der User sehen darf", "$", "arrBannerCa...
Generate module
[ "Generate", "module" ]
train
https://github.com/BugBuster1701/banner/blob/3ffac36837923194ab0ebaf308c0b23a3684b005/modules/ModuleBannerStatistics.php#L70-L171
BugBuster1701/banner
modules/ModuleBannerStatistics.php
ModuleBannerStatistics.addBannerText
protected function addBannerText( &$Banner ) { $arrBannersStat = array(); // Kurz URL (nur Domain) $this->setBannerURL($Banner); $Banner['banner_url'] = \Idna::decode($Banner['banner_url']); // #79 $treffer = parse_url($Banner['banner_url']); $banner_url_kurz = $treff...
php
protected function addBannerText( &$Banner ) { $arrBannersStat = array(); // Kurz URL (nur Domain) $this->setBannerURL($Banner); $Banner['banner_url'] = \Idna::decode($Banner['banner_url']); // #79 $treffer = parse_url($Banner['banner_url']); $banner_url_kurz = $treff...
[ "protected", "function", "addBannerText", "(", "&", "$", "Banner", ")", "{", "$", "arrBannersStat", "=", "array", "(", ")", ";", "// Kurz URL (nur Domain)", "$", "this", "->", "setBannerURL", "(", "$", "Banner", ")", ";", "$", "Banner", "[", "'banner_url'", ...
Add textbanner @param referenz $Banner @return array $arrBannersStat
[ "Add", "textbanner" ]
train
https://github.com/BugBuster1701/banner/blob/3ffac36837923194ab0ebaf308c0b23a3684b005/modules/ModuleBannerStatistics.php#L179-L211
BugBuster1701/banner
modules/ModuleBannerStatistics.php
ModuleBannerStatistics.addBannerIntern
protected function addBannerIntern( &$Banner ) { $arrBannersStat = array(); $oriSize = false; // return array(bool $intMaxViews, bool $intMaxClicks) $MaxViewsClicks = $this->getMaxViewsClicksStatus($Banner); // set $Banner['banner_active'] as HTML Text // an...
php
protected function addBannerIntern( &$Banner ) { $arrBannersStat = array(); $oriSize = false; // return array(bool $intMaxViews, bool $intMaxClicks) $MaxViewsClicks = $this->getMaxViewsClicksStatus($Banner); // set $Banner['banner_active'] as HTML Text // an...
[ "protected", "function", "addBannerIntern", "(", "&", "$", "Banner", ")", "{", "$", "arrBannersStat", "=", "array", "(", ")", ";", "$", "oriSize", "=", "false", ";", "// return array(bool $intMaxViews, bool $intMaxClicks)", "$", "MaxViewsClicks", "=", "$", "this",...
Add internal banner @param referenz $Banner @return array $arrBannersStat
[ "Add", "internal", "banner" ]
train
https://github.com/BugBuster1701/banner/blob/3ffac36837923194ab0ebaf308c0b23a3684b005/modules/ModuleBannerStatistics.php#L219-L332
BugBuster1701/banner
modules/ModuleBannerStatistics.php
ModuleBannerStatistics.addBannerExtern
protected function addBannerExtern( &$Banner ) { $arrBannersStat = array(); $oriSize = false; // return array(bool $intMaxViews, bool $intMaxClicks) $MaxViewsClicks = $this->getMaxViewsClicksStatus($Banner); // set $Banner['banner_active'] as HTML Text ...
php
protected function addBannerExtern( &$Banner ) { $arrBannersStat = array(); $oriSize = false; // return array(bool $intMaxViews, bool $intMaxClicks) $MaxViewsClicks = $this->getMaxViewsClicksStatus($Banner); // set $Banner['banner_active'] as HTML Text ...
[ "protected", "function", "addBannerExtern", "(", "&", "$", "Banner", ")", "{", "$", "arrBannersStat", "=", "array", "(", ")", ";", "$", "oriSize", "=", "false", ";", "// return array(bool $intMaxViews, bool $intMaxClicks)", "$", "MaxViewsClicks", "=", "$", "this",...
addBannerIntern
[ "addBannerIntern" ]
train
https://github.com/BugBuster1701/banner/blob/3ffac36837923194ab0ebaf308c0b23a3684b005/modules/ModuleBannerStatistics.php#L335-L441
stubbles/stubbles-webapp-core
src/main/php/interceptor/AddAccessControlAllowOriginHeader.php
AddAccessControlAllowOriginHeader.postProcess
public function postProcess(Request $request, Response $response) { if (empty($this->allowedOriginHosts) || !$request->hasHeader('HTTP_ORIGIN')) { return; } $originHost = $request->readHeader('HTTP_ORIGIN')->unsecure(); foreach ($this->allowedOriginHosts as $allowedOrigi...
php
public function postProcess(Request $request, Response $response) { if (empty($this->allowedOriginHosts) || !$request->hasHeader('HTTP_ORIGIN')) { return; } $originHost = $request->readHeader('HTTP_ORIGIN')->unsecure(); foreach ($this->allowedOriginHosts as $allowedOrigi...
[ "public", "function", "postProcess", "(", "Request", "$", "request", ",", "Response", "$", "response", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "allowedOriginHosts", ")", "||", "!", "$", "request", "->", "hasHeader", "(", "'HTTP_ORIGIN'", ")",...
does the postprocessing stuff @param \stubbles\webapp\Request $request current request @param \stubbles\webapp\Response $response response to send
[ "does", "the", "postprocessing", "stuff" ]
train
https://github.com/stubbles/stubbles-webapp-core/blob/7705f129011a81d5cc3c76b4b150fab3dadac6a3/src/main/php/interceptor/AddAccessControlAllowOriginHeader.php#L64-L76
aindong/pluggables
src/Aindong/Pluggables/Handlers/PluggableMakeMigrationHandler.php
PluggableMakeMigrationHandler.fire
public function fire(Command $console, $slug, $table) { $this->console = $console; $this->pluggableName = Str::studly($slug); $this->table = strtolower($table); $this->migrationName = snake_case($this->table); $this->className = studly_case($this->migrationName); if ...
php
public function fire(Command $console, $slug, $table) { $this->console = $console; $this->pluggableName = Str::studly($slug); $this->table = strtolower($table); $this->migrationName = snake_case($this->table); $this->className = studly_case($this->migrationName); if ...
[ "public", "function", "fire", "(", "Command", "$", "console", ",", "$", "slug", ",", "$", "table", ")", "{", "$", "this", "->", "console", "=", "$", "console", ";", "$", "this", "->", "pluggableName", "=", "Str", "::", "studly", "(", "$", "slug", "...
Fire off the handler. @param \Aindong\Pluggables\Console\PluggableMakeMigrationCommand $console @param string $slug @return string
[ "Fire", "off", "the", "handler", "." ]
train
https://github.com/aindong/pluggables/blob/bf8bab46fb65268043fb4b98db21f8e0338b5e96/src/Aindong/Pluggables/Handlers/PluggableMakeMigrationHandler.php#L67-L84
kingsquare/communibase-connector-php
src/Communibase/Logging/DebugStack.php
DebugStack.startQuery
public function startQuery($query, array $params = null, array $data = null) { if (!$this->enabled) { return; } $this->start = microtime(true); $this->queries[++$this->currentQuery] = [ 'query' => $query, 'params' => $params, 'data' => ...
php
public function startQuery($query, array $params = null, array $data = null) { if (!$this->enabled) { return; } $this->start = microtime(true); $this->queries[++$this->currentQuery] = [ 'query' => $query, 'params' => $params, 'data' => ...
[ "public", "function", "startQuery", "(", "$", "query", ",", "array", "$", "params", "=", "null", ",", "array", "$", "data", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "enabled", ")", "{", "return", ";", "}", "$", "this", "->", "sta...
{@inheritdoc}
[ "{" ]
train
https://github.com/kingsquare/communibase-connector-php/blob/f1f9699e1a8acf066fab308f1e86cb8b5548e2db/src/Communibase/Logging/DebugStack.php#L37-L49
activecollab/databasestructure
src/Field/Scalar/JsonField.php
JsonField.getGeneratedFields
public function getGeneratedFields() { $result = []; foreach ($this->getValueExtractors() as $value_extractor) { $result[$value_extractor->getFieldName()] = $value_extractor->getValueCaster(); } return $result; }
php
public function getGeneratedFields() { $result = []; foreach ($this->getValueExtractors() as $value_extractor) { $result[$value_extractor->getFieldName()] = $value_extractor->getValueCaster(); } return $result; }
[ "public", "function", "getGeneratedFields", "(", ")", "{", "$", "result", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "getValueExtractors", "(", ")", "as", "$", "value_extractor", ")", "{", "$", "result", "[", "$", "value_extractor", "->", "ge...
{@inheritdoc}
[ "{" ]
train
https://github.com/activecollab/databasestructure/blob/4b2353c4422186bcfce63b3212da3e70e63eb5df/src/Field/Scalar/JsonField.php#L41-L50
activecollab/databasestructure
src/Field/Scalar/JsonField.php
JsonField.&
public function &addValueExtractor(ValueExtractorInterface $extractor) { $extract_as_field = $extractor->getFieldName(); foreach ($this->value_extractors as $value_extractor) { if ($value_extractor->getFieldName() === $extract_as_field) { throw new InvalidArgumentExcepti...
php
public function &addValueExtractor(ValueExtractorInterface $extractor) { $extract_as_field = $extractor->getFieldName(); foreach ($this->value_extractors as $value_extractor) { if ($value_extractor->getFieldName() === $extract_as_field) { throw new InvalidArgumentExcepti...
[ "public", "function", "&", "addValueExtractor", "(", "ValueExtractorInterface", "$", "extractor", ")", "{", "$", "extract_as_field", "=", "$", "extractor", "->", "getFieldName", "(", ")", ";", "foreach", "(", "$", "this", "->", "value_extractors", "as", "$", "...
{@inheritdoc}
[ "{" ]
train
https://github.com/activecollab/databasestructure/blob/4b2353c4422186bcfce63b3212da3e70e63eb5df/src/Field/Scalar/JsonField.php#L68-L81
activecollab/databasestructure
src/Field/Scalar/JsonField.php
JsonField.&
public function &extractValue($extract_as_field, $expression, $default_value = null, $extractor_type = ValueExtractor::class, $is_stored = true, $is_indexed = false) { if (!empty($this->value_extractors[$extract_as_field])) { throw new InvalidArgumentException("Field name '$extract_as_field' is ...
php
public function &extractValue($extract_as_field, $expression, $default_value = null, $extractor_type = ValueExtractor::class, $is_stored = true, $is_indexed = false) { if (!empty($this->value_extractors[$extract_as_field])) { throw new InvalidArgumentException("Field name '$extract_as_field' is ...
[ "public", "function", "&", "extractValue", "(", "$", "extract_as_field", ",", "$", "expression", ",", "$", "default_value", "=", "null", ",", "$", "extractor_type", "=", "ValueExtractor", "::", "class", ",", "$", "is_stored", "=", "true", ",", "$", "is_index...
{@inheritdoc}
[ "{" ]
train
https://github.com/activecollab/databasestructure/blob/4b2353c4422186bcfce63b3212da3e70e63eb5df/src/Field/Scalar/JsonField.php#L86-L104
movoin/one-swoole
src/Protocol/Factory.php
Factory.newProtocol
public static function newProtocol(string $protocol): Protocol { if (! isset(static::$protocols[$protocol])) { throw ProtocolException::notSupport($protocol); } return Reflection::newInstance( '\\One\\Protocol\\Protocols\\' . static::$protocols[$protocol] ); ...
php
public static function newProtocol(string $protocol): Protocol { if (! isset(static::$protocols[$protocol])) { throw ProtocolException::notSupport($protocol); } return Reflection::newInstance( '\\One\\Protocol\\Protocols\\' . static::$protocols[$protocol] ); ...
[ "public", "static", "function", "newProtocol", "(", "string", "$", "protocol", ")", ":", "Protocol", "{", "if", "(", "!", "isset", "(", "static", "::", "$", "protocols", "[", "$", "protocol", "]", ")", ")", "{", "throw", "ProtocolException", "::", "notSu...
创建协议 @param string $protocol @return \One\Protocol\Contracts\Protocol @throws \One\Protocol\Exceptions\ProtocolException
[ "创建协议" ]
train
https://github.com/movoin/one-swoole/blob/b9b175963ead91416cc50902a04e05ff3ef571de/src/Protocol/Factory.php#L54-L63
movoin/one-swoole
src/Protocol/Factory.php
Factory.newHttpRequest
public static function newHttpRequest(SwooleRequest $swoole): RequestInterface { // {{ Headers $headers = new Headers; $swHeaders = $swoole->header ?? []; foreach ($swHeaders as $key => $value) { $headers->add( implode('-', array_map('ucfirst', explode('-...
php
public static function newHttpRequest(SwooleRequest $swoole): RequestInterface { // {{ Headers $headers = new Headers; $swHeaders = $swoole->header ?? []; foreach ($swHeaders as $key => $value) { $headers->add( implode('-', array_map('ucfirst', explode('-...
[ "public", "static", "function", "newHttpRequest", "(", "SwooleRequest", "$", "swoole", ")", ":", "RequestInterface", "{", "// {{ Headers", "$", "headers", "=", "new", "Headers", ";", "$", "swHeaders", "=", "$", "swoole", "->", "header", "??", "[", "]", ";", ...
创建 HTTP 请求对象 @param Swoole\Http\Request $swoole @return \One\Protocol\Contracts\Request
[ "创建", "HTTP", "请求对象" ]
train
https://github.com/movoin/one-swoole/blob/b9b175963ead91416cc50902a04e05ff3ef571de/src/Protocol/Factory.php#L72-L144
movoin/one-swoole
src/Protocol/Factory.php
Factory.newStream
public static function newStream($body = null): StreamInterface { if ($body instanceof StreamInterface) { return $body; } if (is_resource($body)) { return new Stream($body); } $stream = new Stream(fopen('php://temp', 'w+')); ! empty($body) &&...
php
public static function newStream($body = null): StreamInterface { if ($body instanceof StreamInterface) { return $body; } if (is_resource($body)) { return new Stream($body); } $stream = new Stream(fopen('php://temp', 'w+')); ! empty($body) &&...
[ "public", "static", "function", "newStream", "(", "$", "body", "=", "null", ")", ":", "StreamInterface", "{", "if", "(", "$", "body", "instanceof", "StreamInterface", ")", "{", "return", "$", "body", ";", "}", "if", "(", "is_resource", "(", "$", "body", ...
创建文件流对象 @param \Psr\Http\Message\StreamInterface|resource|string|null $body @return \Psr\Http\Message\StreamInterface @throws \InvalidArgumentException
[ "创建文件流对象" ]
train
https://github.com/movoin/one-swoole/blob/b9b175963ead91416cc50902a04e05ff3ef571de/src/Protocol/Factory.php#L166-L180
crossjoin/Css
src/Crossjoin/Css/Format/Rule/DeclarationAbstract.php
DeclarationAbstract.checkProperty
public function checkProperty(&$property) { if (is_string($property)) { $property = Placeholder::replaceStringsAndComments($property); $property = Placeholder::removeCommentPlaceholders($property, true); $property = Placeholder::replaceStringPlaceholders($property, true);...
php
public function checkProperty(&$property) { if (is_string($property)) { $property = Placeholder::replaceStringsAndComments($property); $property = Placeholder::removeCommentPlaceholders($property, true); $property = Placeholder::replaceStringPlaceholders($property, true);...
[ "public", "function", "checkProperty", "(", "&", "$", "property", ")", "{", "if", "(", "is_string", "(", "$", "property", ")", ")", "{", "$", "property", "=", "Placeholder", "::", "replaceStringsAndComments", "(", "$", "property", ")", ";", "$", "property"...
Sets the declaration property. @param string $property @return bool
[ "Sets", "the", "declaration", "property", "." ]
train
https://github.com/crossjoin/Css/blob/7b50ca94c4bdad60d01cfa327f00b7a600d6f9f3/src/Crossjoin/Css/Format/Rule/DeclarationAbstract.php#L56-L69
crossjoin/Css
src/Crossjoin/Css/Format/Rule/DeclarationAbstract.php
DeclarationAbstract.checkValue
public function checkValue(&$value) { if (is_string($value)) { $value = Placeholder::replaceStringsAndComments($value); $value = Placeholder::removeCommentPlaceholders($value, true); $value = Placeholder::replaceStringPlaceholders($value, true); $value = trim(...
php
public function checkValue(&$value) { if (is_string($value)) { $value = Placeholder::replaceStringsAndComments($value); $value = Placeholder::removeCommentPlaceholders($value, true); $value = Placeholder::replaceStringPlaceholders($value, true); $value = trim(...
[ "public", "function", "checkValue", "(", "&", "$", "value", ")", "{", "if", "(", "is_string", "(", "$", "value", ")", ")", "{", "$", "value", "=", "Placeholder", "::", "replaceStringsAndComments", "(", "$", "value", ")", ";", "$", "value", "=", "Placeh...
Checks the declaration value. @param string $value @return bool
[ "Checks", "the", "declaration", "value", "." ]
train
https://github.com/crossjoin/Css/blob/7b50ca94c4bdad60d01cfa327f00b7a600d6f9f3/src/Crossjoin/Css/Format/Rule/DeclarationAbstract.php#L99-L117
bdunogier/xmlrpcbundle
XmlRpc/Handler/Ext/RequestParser.php
RequestParser.fixupParameter
protected function fixupParameter( &$parameter ) { if ( is_array( $parameter ) ) { foreach ( $parameter as &$subParameter ) { $this->fixupParameter( $subParameter ); } } if ( $parameter instanceof stdClass ) { i...
php
protected function fixupParameter( &$parameter ) { if ( is_array( $parameter ) ) { foreach ( $parameter as &$subParameter ) { $this->fixupParameter( $subParameter ); } } if ( $parameter instanceof stdClass ) { i...
[ "protected", "function", "fixupParameter", "(", "&", "$", "parameter", ")", "{", "if", "(", "is_array", "(", "$", "parameter", ")", ")", "{", "foreach", "(", "$", "parameter", "as", "&", "$", "subParameter", ")", "{", "$", "this", "->", "fixupParameter",...
Fixes up parameters that aren't properly handled by ext/xmlrpc
[ "Fixes", "up", "parameters", "that", "aren", "t", "properly", "handled", "by", "ext", "/", "xmlrpc" ]
train
https://github.com/bdunogier/xmlrpcbundle/blob/9a3d59609131d438d259b3ae2c113bb4b813a16b/XmlRpc/Handler/Ext/RequestParser.php#L62-L83
huasituo/hstcms
src/Database/Migrations/2016_12_06_044026_create_manage_operation_log_table.php
CreateManageOperationLogTable.up
public function up() { Schema::create('manage_operation_log', function (Blueprint $table) { $table->increments('id')->comment('ID'); $table->string('uid')->nullable()->comment('UID'); $table->string('username')->nullable()->comment(hst_lang('hstcms::public.username')); ...
php
public function up() { Schema::create('manage_operation_log', function (Blueprint $table) { $table->increments('id')->comment('ID'); $table->string('uid')->nullable()->comment('UID'); $table->string('username')->nullable()->comment(hst_lang('hstcms::public.username')); ...
[ "public", "function", "up", "(", ")", "{", "Schema", "::", "create", "(", "'manage_operation_log'", ",", "function", "(", "Blueprint", "$", "table", ")", "{", "$", "table", "->", "increments", "(", "'id'", ")", "->", "comment", "(", "'ID'", ")", ";", "...
Run the migrations. @return void
[ "Run", "the", "migrations", "." ]
train
https://github.com/huasituo/hstcms/blob/12819979289e58ce38e3e92540aeeb16e205e525/src/Database/Migrations/2016_12_06_044026_create_manage_operation_log_table.php#L18-L38
sulu/SuluSalesShippingBundle
src/Sulu/Bundle/Sales/ShippingBundle/Api/Shipping.php
Shipping.getOrder
public function getOrder() { $productFactory = new ProductFactory(); $itemFactory = new ItemFactory($productFactory, 'EUR'); return new ApiOrder($this->entity->getOrder(), $this->locale, $itemFactory); }
php
public function getOrder() { $productFactory = new ProductFactory(); $itemFactory = new ItemFactory($productFactory, 'EUR'); return new ApiOrder($this->entity->getOrder(), $this->locale, $itemFactory); }
[ "public", "function", "getOrder", "(", ")", "{", "$", "productFactory", "=", "new", "ProductFactory", "(", ")", ";", "$", "itemFactory", "=", "new", "ItemFactory", "(", "$", "productFactory", ",", "'EUR'", ")", ";", "return", "new", "ApiOrder", "(", "$", ...
Get order @VirtualProperty @SerializedName("order") @return ApiOrder
[ "Get", "order" ]
train
https://github.com/sulu/SuluSalesShippingBundle/blob/0d39de262d58579e5679db99a77dbf717d600b5e/src/Sulu/Bundle/Sales/ShippingBundle/Api/Shipping.php#L651-L657
gbprod/elastica-provider-bundle
src/ElasticaProviderBundle/Provider/Handler.php
Handler.handle
public function handle(Client $client, $index, $type, $alias = null) { $alias = $alias ?: $index; $entries = $this->registry->get($alias, $type); $this->dispatchHandlingStartedEvent($entries); foreach ($entries as $entry) { $this->dispatchProvidingStartedEvent($entry);...
php
public function handle(Client $client, $index, $type, $alias = null) { $alias = $alias ?: $index; $entries = $this->registry->get($alias, $type); $this->dispatchHandlingStartedEvent($entries); foreach ($entries as $entry) { $this->dispatchProvidingStartedEvent($entry);...
[ "public", "function", "handle", "(", "Client", "$", "client", ",", "$", "index", ",", "$", "type", ",", "$", "alias", "=", "null", ")", "{", "$", "alias", "=", "$", "alias", "?", ":", "$", "index", ";", "$", "entries", "=", "$", "this", "->", "...
Handle provide command
[ "Handle", "provide", "command" ]
train
https://github.com/gbprod/elastica-provider-bundle/blob/ee1e2ca78651d570b7400049bf81d8405fc744fc/src/ElasticaProviderBundle/Provider/Handler.php#L41-L61
antarctica/laravel-token-auth
src/Antarctica/LaravelTokenAuth/Filter/AuthFilter.php
AuthFilter.filter
public function filter($request) { // Check if user is authenticated via an auth session $this->session_authenticated = $this->isUserSessionAuthenticated(); // Check if user is authenticated via an auth token $this->token_authenticated = $this->isUserTokenAuthenticated($request); ...
php
public function filter($request) { // Check if user is authenticated via an auth session $this->session_authenticated = $this->isUserSessionAuthenticated(); // Check if user is authenticated via an auth token $this->token_authenticated = $this->isUserTokenAuthenticated($request); ...
[ "public", "function", "filter", "(", "$", "request", ")", "{", "// Check if user is authenticated via an auth session", "$", "this", "->", "session_authenticated", "=", "$", "this", "->", "isUserSessionAuthenticated", "(", ")", ";", "// Check if user is authenticated via an...
Main method, if 'successful' this method should not return anything (even true). @param $request @return \Illuminate\Http\RedirectResponse @throws Exception
[ "Main", "method", "if", "successful", "this", "method", "should", "not", "return", "anything", "(", "even", "true", ")", "." ]
train
https://github.com/antarctica/laravel-token-auth/blob/58a0cb29197d78294363df2be61eca4419ce755a/src/Antarctica/LaravelTokenAuth/Filter/AuthFilter.php#L42-L71
antarctica/laravel-token-auth
src/Antarctica/LaravelTokenAuth/Filter/AuthFilter.php
AuthFilter.isUserTokenAuthenticated
private function isUserTokenAuthenticated() { try { $token = $this->TokenUser->getTokenInterface()->get(); $this->TokenUser->validate($token); } catch (Exception $exception) { // We will re-throw this error later if no other authentication ...
php
private function isUserTokenAuthenticated() { try { $token = $this->TokenUser->getTokenInterface()->get(); $this->TokenUser->validate($token); } catch (Exception $exception) { // We will re-throw this error later if no other authentication ...
[ "private", "function", "isUserTokenAuthenticated", "(", ")", "{", "try", "{", "$", "token", "=", "$", "this", "->", "TokenUser", "->", "getTokenInterface", "(", ")", "->", "get", "(", ")", ";", "$", "this", "->", "TokenUser", "->", "validate", "(", "$", ...
Validates an authentication token if provided, otherwise returns an exception that can be re-thrown later. @return bool|Exception
[ "Validates", "an", "authentication", "token", "if", "provided", "otherwise", "returns", "an", "exception", "that", "can", "be", "re", "-", "thrown", "later", "." ]
train
https://github.com/antarctica/laravel-token-auth/blob/58a0cb29197d78294363df2be61eca4419ce755a/src/Antarctica/LaravelTokenAuth/Filter/AuthFilter.php#L91-L105
activecollab/databasestructure
src/Field/Composite/ForeignKeyField.php
ForeignKeyField.getFields
public function getFields() { return [(new IntegerField($this->getName()))->unsigned(true)->size($this->getSize())->required($this->isRequired())]; }
php
public function getFields() { return [(new IntegerField($this->getName()))->unsigned(true)->size($this->getSize())->required($this->isRequired())]; }
[ "public", "function", "getFields", "(", ")", "{", "return", "[", "(", "new", "IntegerField", "(", "$", "this", "->", "getName", "(", ")", ")", ")", "->", "unsigned", "(", "true", ")", "->", "size", "(", "$", "this", "->", "getSize", "(", ")", ")", ...
Return fields that this field is composed of. @return FieldInterface[]
[ "Return", "fields", "that", "this", "field", "is", "composed", "of", "." ]
train
https://github.com/activecollab/databasestructure/blob/4b2353c4422186bcfce63b3212da3e70e63eb5df/src/Field/Composite/ForeignKeyField.php#L63-L66
hrevert/HtUserRegistration
src/Module.php
Module.onBootstrap
public function onBootstrap(EventInterface $e) { /** @var \Zend\Mvc\Application */ $application = $e->getParam('application'); $eventManager = $application->getEventManager(); $sharedManager = $eventManager->getSharedManager(); $sharedManager->attach('ZfcUser\Service\Us...
php
public function onBootstrap(EventInterface $e) { /** @var \Zend\Mvc\Application */ $application = $e->getParam('application'); $eventManager = $application->getEventManager(); $sharedManager = $eventManager->getSharedManager(); $sharedManager->attach('ZfcUser\Service\Us...
[ "public", "function", "onBootstrap", "(", "EventInterface", "$", "e", ")", "{", "/** @var \\Zend\\Mvc\\Application */", "$", "application", "=", "$", "e", "->", "getParam", "(", "'application'", ")", ";", "$", "eventManager", "=", "$", "application", "->", "getE...
{@inheritDoc}
[ "{" ]
train
https://github.com/hrevert/HtUserRegistration/blob/6b4a0cc364153757290ab5eed9ffafe1228f3bd6/src/Module.php#L19-L30
phramework/validate
src/URLValidator.php
URLValidator.validate
public function validate($value) { //Use string's validator $return = parent::validate($value); //Apply additional rules if ($return->status == true) { if (filter_var($value, FILTER_VALIDATE_URL) === false) { //error $return->status = fals...
php
public function validate($value) { //Use string's validator $return = parent::validate($value); //Apply additional rules if ($return->status == true) { if (filter_var($value, FILTER_VALIDATE_URL) === false) { //error $return->status = fals...
[ "public", "function", "validate", "(", "$", "value", ")", "{", "//Use string's validator", "$", "return", "=", "parent", "::", "validate", "(", "$", "value", ")", ";", "//Apply additional rules", "if", "(", "$", "return", "->", "status", "==", "true", ")", ...
Validate value @see \Phramework\Validate\ValidateResult for ValidateResult object @see https://secure.php.net/manual/en/filter.filters.validate.php @param mixed $value Value to validate @return ValidateResult
[ "Validate", "value" ]
train
https://github.com/phramework/validate/blob/22dd3c4e5f7a77a1a75d92f98444f3e4b7ce5cfc/src/URLValidator.php#L59-L79
acasademont/wurfl
WURFL/Request/GenericRequestFactory.php
WURFL_Request_GenericRequestFactory.createRequest
public function createRequest($request, $override_sideloaded_browser_ua = true) { $userAgent = WURFL_WURFLUtils::getUserAgent($request, $override_sideloaded_browser_ua); $userAgentProfile = WURFL_WURFLUtils::getUserAgentProfile($request); $isXhtmlDevice = WURFL_WURFLUtils::isXhtmlRequester($...
php
public function createRequest($request, $override_sideloaded_browser_ua = true) { $userAgent = WURFL_WURFLUtils::getUserAgent($request, $override_sideloaded_browser_ua); $userAgentProfile = WURFL_WURFLUtils::getUserAgentProfile($request); $isXhtmlDevice = WURFL_WURFLUtils::isXhtmlRequester($...
[ "public", "function", "createRequest", "(", "$", "request", ",", "$", "override_sideloaded_browser_ua", "=", "true", ")", "{", "$", "userAgent", "=", "WURFL_WURFLUtils", "::", "getUserAgent", "(", "$", "request", ",", "$", "override_sideloaded_browser_ua", ")", ";...
Creates Generic Request from the given HTTP Request (normally $_SERVER) @param array $request HTTP Request @param bool $override_sideloaded_browser_ua @return WURFL_Request_GenericRequest
[ "Creates", "Generic", "Request", "from", "the", "given", "HTTP", "Request", "(", "normally", "$_SERVER", ")" ]
train
https://github.com/acasademont/wurfl/blob/0f4fb6e06b452ba95ad1d15e7d8226d0974b60c2/WURFL/Request/GenericRequestFactory.php#L31-L38
stubbles/stubbles-webapp-core
src/main/php/response/mimetypes/Xml.php
Xml.serialize
public function serialize($resource, OutputStream $out): OutputStream { $out->write($this->xmlSerializerFacade->serializeToXml($resource)); return $out; }
php
public function serialize($resource, OutputStream $out): OutputStream { $out->write($this->xmlSerializerFacade->serializeToXml($resource)); return $out; }
[ "public", "function", "serialize", "(", "$", "resource", ",", "OutputStream", "$", "out", ")", ":", "OutputStream", "{", "$", "out", "->", "write", "(", "$", "this", "->", "xmlSerializerFacade", "->", "serializeToXml", "(", "$", "resource", ")", ")", ";", ...
serializes resource to output stream @param mixed $resource @param \stubbles\streams\OutputStream $out @return \stubbles\streams\OutputStream
[ "serializes", "resource", "to", "output", "stream" ]
train
https://github.com/stubbles/stubbles-webapp-core/blob/7705f129011a81d5cc3c76b4b150fab3dadac6a3/src/main/php/response/mimetypes/Xml.php#L55-L59
blast-project/CoreBundle
src/Generator/AdminGenerator.php
AdminGenerator.generate
public function generate(BundleInterface $bundle, $adminClassBasename, $modelClass) { $this->class = sprintf('%s\Admin\%s', $bundle->getNamespace(), $adminClassBasename); $this->file = sprintf('%s/Admin/%s.php', $bundle->getPath(), str_replace('\\', '/', $adminClassBasename)); $parts = explo...
php
public function generate(BundleInterface $bundle, $adminClassBasename, $modelClass) { $this->class = sprintf('%s\Admin\%s', $bundle->getNamespace(), $adminClassBasename); $this->file = sprintf('%s/Admin/%s.php', $bundle->getPath(), str_replace('\\', '/', $adminClassBasename)); $parts = explo...
[ "public", "function", "generate", "(", "BundleInterface", "$", "bundle", ",", "$", "adminClassBasename", ",", "$", "modelClass", ")", "{", "$", "this", "->", "class", "=", "sprintf", "(", "'%s\\Admin\\%s'", ",", "$", "bundle", "->", "getNamespace", "(", ")",...
@param BundleInterface $bundle @param string $adminClassBasename @param string $modelClass @throws \RuntimeException
[ "@param", "BundleInterface", "$bundle", "@param", "string", "$adminClassBasename", "@param", "string", "$modelClass" ]
train
https://github.com/blast-project/CoreBundle/blob/7a0832758ca14e5bc5d65515532c1220df3930ae/src/Generator/AdminGenerator.php#L53-L82
tequila/mongodb-php-lib
src/Command.php
Command.getOptions
public function getOptions(Server $server) { if (null !== $this->compatibilityResolver) { $this->compatibilityResolver->resolveCompatibilities($server, $this->options); } return $this->options; }
php
public function getOptions(Server $server) { if (null !== $this->compatibilityResolver) { $this->compatibilityResolver->resolveCompatibilities($server, $this->options); } return $this->options; }
[ "public", "function", "getOptions", "(", "Server", "$", "server", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "compatibilityResolver", ")", "{", "$", "this", "->", "compatibilityResolver", "->", "resolveCompatibilities", "(", "$", "server", ",", "...
{@inheritdoc}
[ "{" ]
train
https://github.com/tequila/mongodb-php-lib/blob/49a25f45268df358f5ceb40a655d9a7ddc6db4f7/src/Command.php#L30-L37
elkuku/crowdin-api
src/Languageproject.php
Languageproject.toQuery
public function toQuery() : array { $array = []; foreach (get_object_vars($this) as $name => $value) { if (null === $value) { continue; } if (is_array($value)) { if (count($value)) { foreach ($value as $v) { $array[] = [ 'name' => $name . '[]', 'cont...
php
public function toQuery() : array { $array = []; foreach (get_object_vars($this) as $name => $value) { if (null === $value) { continue; } if (is_array($value)) { if (count($value)) { foreach ($value as $v) { $array[] = [ 'name' => $name . '[]', 'cont...
[ "public", "function", "toQuery", "(", ")", ":", "array", "{", "$", "array", "=", "[", "]", ";", "foreach", "(", "get_object_vars", "(", "$", "this", ")", "as", "$", "name", "=>", "$", "value", ")", "{", "if", "(", "null", "===", "$", "value", ")"...
Convert tye object to query string. @return array
[ "Convert", "tye", "object", "to", "query", "string", "." ]
train
https://github.com/elkuku/crowdin-api/blob/690f00eed8f91a875b3f288d319750d6d8ae0453/src/Languageproject.php#L162-L196
FrenchFrogs/framework
src/Business/Business.php
Business.getId
public function getId($format = 'bytes') { return static::isUuid() && $format != false ? uuid($format, $this->id) : $this->id; }
php
public function getId($format = 'bytes') { return static::isUuid() && $format != false ? uuid($format, $this->id) : $this->id; }
[ "public", "function", "getId", "(", "$", "format", "=", "'bytes'", ")", "{", "return", "static", "::", "isUuid", "(", ")", "&&", "$", "format", "!=", "false", "?", "uuid", "(", "$", "format", ",", "$", "this", "->", "id", ")", ":", "$", "this", "...
Getter for ID @return mixed
[ "Getter", "for", "ID" ]
train
https://github.com/FrenchFrogs/framework/blob/a4838c698a5600437e87dac6d35ba8ebe32c4395/src/Business/Business.php#L70-L73
FrenchFrogs/framework
src/Business/Business.php
Business.getModel
public function getModel($reload = false) { if (!isset($this->model) || $reload) { $class = static::$modelClass; $this->model = $class::findOrFail($this->getId()); } return $this->model; }
php
public function getModel($reload = false) { if (!isset($this->model) || $reload) { $class = static::$modelClass; $this->model = $class::findOrFail($this->getId()); } return $this->model; }
[ "public", "function", "getModel", "(", "$", "reload", "=", "false", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "model", ")", "||", "$", "reload", ")", "{", "$", "class", "=", "static", "::", "$", "modelClass", ";", "$", "this", "-...
return the main model @param bool|false $reload @return \Illuminate\Database\Eloquent\Model
[ "return", "the", "main", "model" ]
train
https://github.com/FrenchFrogs/framework/blob/a4838c698a5600437e87dac6d35ba8ebe32c4395/src/Business/Business.php#L91-L99
FrenchFrogs/framework
src/Business/Business.php
Business.create
static public function create(array $data) { $class = static::$modelClass; /** @var \Illuminate\Database\Eloquent\Model $model */ $model = new $class; // set primarye key if(static::isUuid() && empty($data[$model->getKeyName()])) { $data[$model->getKeyName()] = ...
php
static public function create(array $data) { $class = static::$modelClass; /** @var \Illuminate\Database\Eloquent\Model $model */ $model = new $class; // set primarye key if(static::isUuid() && empty($data[$model->getKeyName()])) { $data[$model->getKeyName()] = ...
[ "static", "public", "function", "create", "(", "array", "$", "data", ")", "{", "$", "class", "=", "static", "::", "$", "modelClass", ";", "/** @var \\Illuminate\\Database\\Eloquent\\Model $model */", "$", "model", "=", "new", "$", "class", ";", "// set primarye ke...
Factory @param $data @return Business
[ "Factory" ]
train
https://github.com/FrenchFrogs/framework/blob/a4838c698a5600437e87dac6d35ba8ebe32c4395/src/Business/Business.php#L121-L136
FrenchFrogs/framework
src/Business/Business.php
Business.exists
static public function exists($id) { try { $class = static::$modelClass; $class::findOrFail(static::isUuid() ? uuid('bytes', $id) : $id); return true; } catch(\Exception $e) { return false; } }
php
static public function exists($id) { try { $class = static::$modelClass; $class::findOrFail(static::isUuid() ? uuid('bytes', $id) : $id); return true; } catch(\Exception $e) { return false; } }
[ "static", "public", "function", "exists", "(", "$", "id", ")", "{", "try", "{", "$", "class", "=", "static", "::", "$", "modelClass", ";", "$", "class", "::", "findOrFail", "(", "static", "::", "isUuid", "(", ")", "?", "uuid", "(", "'bytes'", ",", ...
return true id user exist @param $id @return bool
[ "return", "true", "id", "user", "exist" ]
train
https://github.com/FrenchFrogs/framework/blob/a4838c698a5600437e87dac6d35ba8ebe32c4395/src/Business/Business.php#L157-L166
gdbots/pbjx-bundle-php
src/Command/DescribeEventStoreStorageCommand.php
DescribeEventStoreStorageCommand.execute
protected function execute(InputInterface $input, OutputInterface $output) { $context = json_decode($input->getOption('context') ?: '{}', true); $context['tenant_id'] = (string)$input->getOption('tenant-id'); $io = new SymfonyStyle($input, $output); $io->title('EventStore Storage De...
php
protected function execute(InputInterface $input, OutputInterface $output) { $context = json_decode($input->getOption('context') ?: '{}', true); $context['tenant_id'] = (string)$input->getOption('tenant-id'); $io = new SymfonyStyle($input, $output); $io->title('EventStore Storage De...
[ "protected", "function", "execute", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "context", "=", "json_decode", "(", "$", "input", "->", "getOption", "(", "'context'", ")", "?", ":", "'{}'", ",", "true", ")", ...
@param InputInterface $input @param OutputInterface $output @return null @throws \Exception
[ "@param", "InputInterface", "$input", "@param", "OutputInterface", "$output" ]
train
https://github.com/gdbots/pbjx-bundle-php/blob/f3c0088583879fc92f13247a0752634bd8696eac/src/Command/DescribeEventStoreStorageCommand.php#L63-L75
gbv/orcid-jskos
src/ORCIDService.php
ORCIDService.getOAuthToken
protected function getOAuthToken() { # TODO: use session to store the token if ($this->client_id and $this->client_secret) { $response = $this->httpQuery( 'POST', 'https://orcid.org/oauth/token', [ 'Accept' => 'application/json', ...
php
protected function getOAuthToken() { # TODO: use session to store the token if ($this->client_id and $this->client_secret) { $response = $this->httpQuery( 'POST', 'https://orcid.org/oauth/token', [ 'Accept' => 'application/json', ...
[ "protected", "function", "getOAuthToken", "(", ")", "{", "# TODO: use session to store the token", "if", "(", "$", "this", "->", "client_id", "and", "$", "this", "->", "client_secret", ")", "{", "$", "response", "=", "$", "this", "->", "httpQuery", "(", "'POST...
Get an OAuth access token
[ "Get", "an", "OAuth", "access", "token" ]
train
https://github.com/gbv/orcid-jskos/blob/1b7db5d11e8f8fde47e2d068f32770b33fa427a5/src/ORCIDService.php#L54-L75
gbv/orcid-jskos
src/ORCIDService.php
ORCIDService.query
public function query(array $query, string $path=''): Result { // search for ORCID profiles if (isset($query['search'])) { $response = $this->searchProfiles($query['search']); if ($response) { $concepts = []; foreach ($response->{'orcid-search-res...
php
public function query(array $query, string $path=''): Result { // search for ORCID profiles if (isset($query['search'])) { $response = $this->searchProfiles($query['search']); if ($response) { $concepts = []; foreach ($response->{'orcid-search-res...
[ "public", "function", "query", "(", "array", "$", "query", ",", "string", "$", "path", "=", "''", ")", ":", "Result", "{", "// search for ORCID profiles", "if", "(", "isset", "(", "$", "query", "[", "'search'", "]", ")", ")", "{", "$", "response", "=",...
main method
[ "main", "method" ]
train
https://github.com/gbv/orcid-jskos/blob/1b7db5d11e8f8fde47e2d068f32770b33fa427a5/src/ORCIDService.php#L87-L113
gbv/orcid-jskos
src/ORCIDService.php
ORCIDService.getProfile
protected function getProfile( $id ) { $token = $this->getOAuthToken(); if (!$token) return; $response = $this->httpQuery( 'GET', "https://pub.orcid.org/v1.2/$id/orcid-bio/", [ 'Authorization' => "Bearer $token", 'Accept' =...
php
protected function getProfile( $id ) { $token = $this->getOAuthToken(); if (!$token) return; $response = $this->httpQuery( 'GET', "https://pub.orcid.org/v1.2/$id/orcid-bio/", [ 'Authorization' => "Bearer $token", 'Accept' =...
[ "protected", "function", "getProfile", "(", "$", "id", ")", "{", "$", "token", "=", "$", "this", "->", "getOAuthToken", "(", ")", ";", "if", "(", "!", "$", "token", ")", "return", ";", "$", "response", "=", "$", "this", "->", "httpQuery", "(", "'GE...
get an indentified profile by ORCID ID
[ "get", "an", "indentified", "profile", "by", "ORCID", "ID" ]
train
https://github.com/gbv/orcid-jskos/blob/1b7db5d11e8f8fde47e2d068f32770b33fa427a5/src/ORCIDService.php#L116-L133
gbv/orcid-jskos
src/ORCIDService.php
ORCIDService.searchProfiles
protected function searchProfiles( $query ) { $token = $this->getOAuthToken(); if (!$token) return; $response = Unirest\Request::get( "https://pub.orcid.org/v1.2/search/orcid-bio/", [ 'Authorization' => "Bearer $token", 'Content-Type' ...
php
protected function searchProfiles( $query ) { $token = $this->getOAuthToken(); if (!$token) return; $response = Unirest\Request::get( "https://pub.orcid.org/v1.2/search/orcid-bio/", [ 'Authorization' => "Bearer $token", 'Content-Type' ...
[ "protected", "function", "searchProfiles", "(", "$", "query", ")", "{", "$", "token", "=", "$", "this", "->", "getOAuthToken", "(", ")", ";", "if", "(", "!", "$", "token", ")", "return", ";", "$", "response", "=", "Unirest", "\\", "Request", "::", "g...
search for an ORCID profile
[ "search", "for", "an", "ORCID", "profile" ]
train
https://github.com/gbv/orcid-jskos/blob/1b7db5d11e8f8fde47e2d068f32770b33fa427a5/src/ORCIDService.php#L136-L154
gbv/orcid-jskos
src/ORCIDService.php
ORCIDService.mapProfile
public function mapProfile($profile) { if (!$profile) return; $jskos = new Concept([ 'uri' => $profile->{'orcid-identifier'}->uri, 'notation' => [ $profile->{'orcid-identifier'}->path ], ]); $bio = $profile->{'orcid-bio'}; // names $details = $b...
php
public function mapProfile($profile) { if (!$profile) return; $jskos = new Concept([ 'uri' => $profile->{'orcid-identifier'}->uri, 'notation' => [ $profile->{'orcid-identifier'}->path ], ]); $bio = $profile->{'orcid-bio'}; // names $details = $b...
[ "public", "function", "mapProfile", "(", "$", "profile", ")", "{", "if", "(", "!", "$", "profile", ")", "return", ";", "$", "jskos", "=", "new", "Concept", "(", "[", "'uri'", "=>", "$", "profile", "->", "{", "'orcid-identifier'", "}", "->", "uri", ",...
Maps an ORCID profile from JSON/XML format to JSKOS. See <https://members.orcid.org/api/xml-orcid-bio> for reference.
[ "Maps", "an", "ORCID", "profile", "from", "JSON", "/", "XML", "format", "to", "JSKOS", "." ]
train
https://github.com/gbv/orcid-jskos/blob/1b7db5d11e8f8fde47e2d068f32770b33fa427a5/src/ORCIDService.php#L161-L243
chriswoodford/foursquare-php
lib/TheTwelve/Foursquare/ListsGateway.php
ListsGateway.getList
public function getList(array $options = array()) { $uri = $this->buildListResourceUri($this->listId); $response = $this->makeApiRequest($uri, $options); return $response->list; }
php
public function getList(array $options = array()) { $uri = $this->buildListResourceUri($this->listId); $response = $this->makeApiRequest($uri, $options); return $response->list; }
[ "public", "function", "getList", "(", "array", "$", "options", "=", "array", "(", ")", ")", "{", "$", "uri", "=", "$", "this", "->", "buildListResourceUri", "(", "$", "this", "->", "listId", ")", ";", "$", "response", "=", "$", "this", "->", "makeApi...
Get a List. @see https://developer.foursquare.com/docs/lists/lists @param array $options
[ "Get", "a", "List", "." ]
train
https://github.com/chriswoodford/foursquare-php/blob/edbfcba2993a101ead8f381394742a4689aec398/lib/TheTwelve/Foursquare/ListsGateway.php#L26-L31
huasituo/hstcms
src/Libraries/Fields/Area.php
Area.option
public function option($option) { $option['areaid1'] = isset($option['areaid1']) ? $option['areaid1'] : 0; $option['areaid2'] = isset($option['areaid2']) ? $option['areaid2'] : 0; $option['areaid3'] = isset($option['areaid3']) ? $option['areaid3'] : 0; $option['value'] = isset($option['value']) ? $option['va...
php
public function option($option) { $option['areaid1'] = isset($option['areaid1']) ? $option['areaid1'] : 0; $option['areaid2'] = isset($option['areaid2']) ? $option['areaid2'] : 0; $option['areaid3'] = isset($option['areaid3']) ? $option['areaid3'] : 0; $option['value'] = isset($option['value']) ? $option['va...
[ "public", "function", "option", "(", "$", "option", ")", "{", "$", "option", "[", "'areaid1'", "]", "=", "isset", "(", "$", "option", "[", "'areaid1'", "]", ")", "?", "$", "option", "[", "'areaid1'", "]", ":", "0", ";", "$", "option", "[", "'areaid...
字段相关属性参数 @param array $value 值 @return string
[ "字段相关属性参数" ]
train
https://github.com/huasituo/hstcms/blob/12819979289e58ce38e3e92540aeeb16e205e525/src/Libraries/Fields/Area.php#L33-L107
huasituo/hstcms
src/Libraries/Fields/Area.php
Area.input
public function input($cname, $name, $cfg, $value = NULL, $id = 0) { $areaid1 = isset($cfg['option']['areaid1']) ? $cfg['option']['areaid1'] : ''; $areaid2 = isset($cfg['option']['areaid2']) ? $cfg['option']['areaid2'] : ''; $areaid3 = isset($cfg['option']['areaid3']) ? $cfg['option']['areaid3'] : ''; // 字段显...
php
public function input($cname, $name, $cfg, $value = NULL, $id = 0) { $areaid1 = isset($cfg['option']['areaid1']) ? $cfg['option']['areaid1'] : ''; $areaid2 = isset($cfg['option']['areaid2']) ? $cfg['option']['areaid2'] : ''; $areaid3 = isset($cfg['option']['areaid3']) ? $cfg['option']['areaid3'] : ''; // 字段显...
[ "public", "function", "input", "(", "$", "cname", ",", "$", "name", ",", "$", "cfg", ",", "$", "value", "=", "NULL", ",", "$", "id", "=", "0", ")", "{", "$", "areaid1", "=", "isset", "(", "$", "cfg", "[", "'option'", "]", "[", "'areaid1'", "]",...
字段表单输入 @param string $cname 字段别名 @param string $name 字段名称 @param array $cfg 字段配置 @param string $value 值 @return string
[ "字段表单输入" ]
train
https://github.com/huasituo/hstcms/blob/12819979289e58ce38e3e92540aeeb16e205e525/src/Libraries/Fields/Area.php#L141-L233
huasituo/hstcms
src/Libraries/Fields/Area.php
Area.insert_value
public function insert_value(Request $request, $field, $postData = []) { $value1 = $request->get($field['fieldname'].'1'); $value2 = $request->get($field['fieldname'].'2'); $value3 = $request->get($field['fieldname'].'3'); $postData[$field['relatedtable']][$field['fieldname'].'1'] = $value1; $postData[$field...
php
public function insert_value(Request $request, $field, $postData = []) { $value1 = $request->get($field['fieldname'].'1'); $value2 = $request->get($field['fieldname'].'2'); $value3 = $request->get($field['fieldname'].'3'); $postData[$field['relatedtable']][$field['fieldname'].'1'] = $value1; $postData[$field...
[ "public", "function", "insert_value", "(", "Request", "$", "request", ",", "$", "field", ",", "$", "postData", "=", "[", "]", ")", "{", "$", "value1", "=", "$", "request", "->", "get", "(", "$", "field", "[", "'fieldname'", "]", ".", "'1'", ")", ";...
处理输入数据,提供给入库
[ "处理输入数据,提供给入库" ]
train
https://github.com/huasituo/hstcms/blob/12819979289e58ce38e3e92540aeeb16e205e525/src/Libraries/Fields/Area.php#L238-L247
huasituo/hstcms
src/Libraries/Fields/Area.php
Area.output_data
public function output_data($data, $field = []) { if(!isset($data[$field['fieldname'].'3'])) { return $data; } $value = $data[$field['fieldname'].'3']; if(!$value) { return $data; } $data[$field['fieldname']] = CommonAreaModel::getInfoByAreaid($value, false); $data[$field['fieldname'].'_str'] = $d...
php
public function output_data($data, $field = []) { if(!isset($data[$field['fieldname'].'3'])) { return $data; } $value = $data[$field['fieldname'].'3']; if(!$value) { return $data; } $data[$field['fieldname']] = CommonAreaModel::getInfoByAreaid($value, false); $data[$field['fieldname'].'_str'] = $d...
[ "public", "function", "output_data", "(", "$", "data", ",", "$", "field", "=", "[", "]", ")", "{", "if", "(", "!", "isset", "(", "$", "data", "[", "$", "field", "[", "'fieldname'", "]", ".", "'3'", "]", ")", ")", "{", "return", "$", "data", ";"...
字段输出
[ "字段输出" ]
train
https://github.com/huasituo/hstcms/blob/12819979289e58ce38e3e92540aeeb16e205e525/src/Libraries/Fields/Area.php#L252-L264
gmazzap/Url_To_Query
UrlToQueryItem.php
UrlToQueryItem.resolve
function resolve( $url = '', Array $query_string_vars = [ ] ) { if ( $this->done && empty( $this->error ) ) { return $this->query_vars; } $this->parseUrl( $url, $query_string_vars ); $rewrite = (array) $this->resolver->getRewrite(); if ( ! empty( $rewrite ) ) { ...
php
function resolve( $url = '', Array $query_string_vars = [ ] ) { if ( $this->done && empty( $this->error ) ) { return $this->query_vars; } $this->parseUrl( $url, $query_string_vars ); $rewrite = (array) $this->resolver->getRewrite(); if ( ! empty( $rewrite ) ) { ...
[ "function", "resolve", "(", "$", "url", "=", "''", ",", "Array", "$", "query_string_vars", "=", "[", "]", ")", "{", "if", "(", "$", "this", "->", "done", "&&", "empty", "(", "$", "this", "->", "error", ")", ")", "{", "return", "$", "this", "->", ...
Resolve an url to an array of WP_Query arguments for main query. @param string $url Url to resolve @param type $query_string_vars Query variables to be added to the url @return array|\WP_Error Resolved query or WP_Error is something goes wrong
[ "Resolve", "an", "url", "to", "an", "array", "of", "WP_Query", "arguments", "for", "main", "query", "." ]
train
https://github.com/gmazzap/Url_To_Query/blob/2537affbbb8b9062d46bb2deec1933acab63d007/UrlToQueryItem.php#L80-L92
gmazzap/Url_To_Query
UrlToQueryItem.php
UrlToQueryItem.parseUrl
private function parseUrl( $url = '', Array $query_string_vars = [ ] ) { parse_str( parse_url( $url, PHP_URL_QUERY ), $this->query_string ); $request_uri = trim( parse_url( $url, PHP_URL_PATH ), '/' ); $this->request = trim( preg_replace( '#^/*index\.php#', '', $request_uri ), '/' ); if ...
php
private function parseUrl( $url = '', Array $query_string_vars = [ ] ) { parse_str( parse_url( $url, PHP_URL_QUERY ), $this->query_string ); $request_uri = trim( parse_url( $url, PHP_URL_PATH ), '/' ); $this->request = trim( preg_replace( '#^/*index\.php#', '', $request_uri ), '/' ); if ...
[ "private", "function", "parseUrl", "(", "$", "url", "=", "''", ",", "Array", "$", "query_string_vars", "=", "[", "]", ")", "{", "parse_str", "(", "parse_url", "(", "$", "url", ",", "PHP_URL_QUERY", ")", ",", "$", "this", "->", "query_string", ")", ";",...
Parse the url to be resolved taking only relative part and stripping out query vars. @param type string @param array $query_string_vars
[ "Parse", "the", "url", "to", "be", "resolved", "taking", "only", "relative", "part", "and", "stripping", "out", "query", "vars", "." ]
train
https://github.com/gmazzap/Url_To_Query/blob/2537affbbb8b9062d46bb2deec1933acab63d007/UrlToQueryItem.php#L161-L168
gmazzap/Url_To_Query
UrlToQueryItem.php
UrlToQueryItem.parseRewriteRules
private function parseRewriteRules( Array $rewrite ) { $this->error = '404'; $request_match = $this->request; if ( empty( $request_match ) && isset( $rewrite['$'] ) ) { $this->matched_rule = '$'; $matches = [ '' ]; $query = $rewrite['$']; } else { ...
php
private function parseRewriteRules( Array $rewrite ) { $this->error = '404'; $request_match = $this->request; if ( empty( $request_match ) && isset( $rewrite['$'] ) ) { $this->matched_rule = '$'; $matches = [ '' ]; $query = $rewrite['$']; } else { ...
[ "private", "function", "parseRewriteRules", "(", "Array", "$", "rewrite", ")", "{", "$", "this", "->", "error", "=", "'404'", ";", "$", "request_match", "=", "$", "this", "->", "request", ";", "if", "(", "empty", "(", "$", "request_match", ")", "&&", "...
Loop throught registered rewrite rule and check them against the url to resolve. @param array $rewrite @return array @uses \GM\UrlToQueryItem::parseRewriteRule()
[ "Loop", "throught", "registered", "rewrite", "rule", "and", "check", "them", "against", "the", "url", "to", "resolve", "." ]
train
https://github.com/gmazzap/Url_To_Query/blob/2537affbbb8b9062d46bb2deec1933acab63d007/UrlToQueryItem.php#L177-L193
gmazzap/Url_To_Query
UrlToQueryItem.php
UrlToQueryItem.parseRewriteRule
private function parseRewriteRule( $match, $query ) { $matches = [ ]; $request_match = $this->request; if ( ! empty( $this->request ) && strpos( $match, $this->request ) === 0 ) { $request_match = $this->request . '/' . $this->request; } if ( preg_match( "...
php
private function parseRewriteRule( $match, $query ) { $matches = [ ]; $request_match = $this->request; if ( ! empty( $this->request ) && strpos( $match, $this->request ) === 0 ) { $request_match = $this->request . '/' . $this->request; } if ( preg_match( "...
[ "private", "function", "parseRewriteRule", "(", "$", "match", ",", "$", "query", ")", "{", "$", "matches", "=", "[", "]", ";", "$", "request_match", "=", "$", "this", "->", "request", ";", "if", "(", "!", "empty", "(", "$", "this", "->", "request", ...
Take the two part of a rewriote rule (the url and the query) and compare against the url to be resolved to find a match. @param string $match The url part of the rewrite rule @param string $query The query part of the rewrite rule @return array
[ "Take", "the", "two", "part", "of", "a", "rewriote", "rule", "(", "the", "url", "and", "the", "query", ")", "and", "compare", "against", "the", "url", "to", "be", "resolved", "to", "find", "a", "match", "." ]
train
https://github.com/gmazzap/Url_To_Query/blob/2537affbbb8b9062d46bb2deec1933acab63d007/UrlToQueryItem.php#L203-L223
gmazzap/Url_To_Query
UrlToQueryItem.php
UrlToQueryItem.setMatchedQuery
private function setMatchedQuery( $matches = [ ], $query = '' ) { if ( ! is_null( $this->matched_rule ) ) { $mathed = \WP_MatchesMapRegex::apply( preg_replace( "!^.+\?!", '', $query ), $matches ); $this->matched_query = addslashes( $mathed ); parse_str( $this->matched_query, ...
php
private function setMatchedQuery( $matches = [ ], $query = '' ) { if ( ! is_null( $this->matched_rule ) ) { $mathed = \WP_MatchesMapRegex::apply( preg_replace( "!^.+\?!", '', $query ), $matches ); $this->matched_query = addslashes( $mathed ); parse_str( $this->matched_query, ...
[ "private", "function", "setMatchedQuery", "(", "$", "matches", "=", "[", "]", ",", "$", "query", "=", "''", ")", "{", "if", "(", "!", "is_null", "(", "$", "this", "->", "matched_rule", ")", ")", "{", "$", "mathed", "=", "\\", "WP_MatchesMapRegex", ":...
When a rute matches, save matched query string and matched query array. @param array $matches Matches coming from regex compare matched rule to url @param string $query Query part of the matched rule
[ "When", "a", "rute", "matches", "save", "matched", "query", "string", "and", "matched", "query", "array", "." ]
train
https://github.com/gmazzap/Url_To_Query/blob/2537affbbb8b9062d46bb2deec1933acab63d007/UrlToQueryItem.php#L231-L238
gmazzap/Url_To_Query
UrlToQueryItem.php
UrlToQueryItem.maybeAdmin
private function maybeAdmin() { if ( empty( $this->request ) || strpos( $this->request, 'wp-admin/' ) !== FALSE ) { $this->error = NULL; if ( ! is_null( $this->perma_q_vars ) && strpos( $this->request, 'wp-admin/' ) !== FALSE ) { ...
php
private function maybeAdmin() { if ( empty( $this->request ) || strpos( $this->request, 'wp-admin/' ) !== FALSE ) { $this->error = NULL; if ( ! is_null( $this->perma_q_vars ) && strpos( $this->request, 'wp-admin/' ) !== FALSE ) { ...
[ "private", "function", "maybeAdmin", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "request", ")", "||", "strpos", "(", "$", "this", "->", "request", ",", "'wp-admin/'", ")", "!==", "FALSE", ")", "{", "$", "this", "->", "error", "=", "...
Check if the url is for admin, in that case unset all the frontend query variables
[ "Check", "if", "the", "url", "is", "for", "admin", "in", "that", "case", "unset", "all", "the", "frontend", "query", "variables" ]
train
https://github.com/gmazzap/Url_To_Query/blob/2537affbbb8b9062d46bb2deec1933acab63d007/UrlToQueryItem.php#L243-L253
gmazzap/Url_To_Query
UrlToQueryItem.php
UrlToQueryItem.resolveVars
private function resolveVars() { $this->setCptQueryVars(); $wp = $this->resolver->getWp(); $public_query_vars = (array) apply_filters( 'query_vars', $wp->public_query_vars ); $extra_query_vars = (array) $this->resolver->getExtraQueryVars(); $this->parseQueryVars( $public_query_va...
php
private function resolveVars() { $this->setCptQueryVars(); $wp = $this->resolver->getWp(); $public_query_vars = (array) apply_filters( 'query_vars', $wp->public_query_vars ); $extra_query_vars = (array) $this->resolver->getExtraQueryVars(); $this->parseQueryVars( $public_query_va...
[ "private", "function", "resolveVars", "(", ")", "{", "$", "this", "->", "setCptQueryVars", "(", ")", ";", "$", "wp", "=", "$", "this", "->", "resolver", "->", "getWp", "(", ")", ";", "$", "public_query_vars", "=", "(", "array", ")", "apply_filters", "(...
Setup the query variables if a rewrite rule matched or if some variables are passed as query string. Strips out not registered query variables and perform the 'request' filter before saving and return found query vars. @return array @uses \GM\UrlToQueryItem::parseQueryVars() @uses \GM\UrlToQueryItem::parseTaxQueryVars...
[ "Setup", "the", "query", "variables", "if", "a", "rewrite", "rule", "matched", "or", "if", "some", "variables", "are", "passed", "as", "query", "string", ".", "Strips", "out", "not", "registered", "query", "variables", "and", "perform", "the", "request", "fi...
train
https://github.com/gmazzap/Url_To_Query/blob/2537affbbb8b9062d46bb2deec1933acab63d007/UrlToQueryItem.php#L266-L281
gmazzap/Url_To_Query
UrlToQueryItem.php
UrlToQueryItem.setCptQueryVars
private function setCptQueryVars() { foreach ( get_post_types( [ ], 'objects' ) as $post_type => $t ) { if ( $t->query_var ) $this->post_type_query_vars[$t->query_var] = $post_type; } }
php
private function setCptQueryVars() { foreach ( get_post_types( [ ], 'objects' ) as $post_type => $t ) { if ( $t->query_var ) $this->post_type_query_vars[$t->query_var] = $post_type; } }
[ "private", "function", "setCptQueryVars", "(", ")", "{", "foreach", "(", "get_post_types", "(", "[", "]", ",", "'objects'", ")", "as", "$", "post_type", "=>", "$", "t", ")", "{", "if", "(", "$", "t", "->", "query_var", ")", "$", "this", "->", "post_t...
Store all the query rewrite slugs for all registered post types
[ "Store", "all", "the", "query", "rewrite", "slugs", "for", "all", "registered", "post", "types" ]
train
https://github.com/gmazzap/Url_To_Query/blob/2537affbbb8b9062d46bb2deec1933acab63d007/UrlToQueryItem.php#L286-L290
gmazzap/Url_To_Query
UrlToQueryItem.php
UrlToQueryItem.parseQueryVars
private function parseQueryVars( Array $public_vars = [ ], Array $extra = [ ] ) { foreach ( $public_vars as $wpvar ) { if ( isset( $extra[$wpvar] ) ) { $this->query_vars[$wpvar] = $extra[$wpvar]; } elseif ( isset( $this->query_string[$wpvar] ) ) { $this->q...
php
private function parseQueryVars( Array $public_vars = [ ], Array $extra = [ ] ) { foreach ( $public_vars as $wpvar ) { if ( isset( $extra[$wpvar] ) ) { $this->query_vars[$wpvar] = $extra[$wpvar]; } elseif ( isset( $this->query_string[$wpvar] ) ) { $this->q...
[ "private", "function", "parseQueryVars", "(", "Array", "$", "public_vars", "=", "[", "]", ",", "Array", "$", "extra", "=", "[", "]", ")", "{", "foreach", "(", "$", "public_vars", "as", "$", "wpvar", ")", "{", "if", "(", "isset", "(", "$", "extra", ...
Store query variables to be returned, merging ones coming from matched rule (if any) and ones coming from query string or configs @param array $public_vars @param array $extra @uses \GM\UrlToQueryItem::parseQueryVar()
[ "Store", "query", "variables", "to", "be", "returned", "merging", "ones", "coming", "from", "matched", "rule", "(", "if", "any", ")", "and", "ones", "coming", "from", "query", "string", "or", "configs" ]
train
https://github.com/gmazzap/Url_To_Query/blob/2537affbbb8b9062d46bb2deec1933acab63d007/UrlToQueryItem.php#L300-L313
gmazzap/Url_To_Query
UrlToQueryItem.php
UrlToQueryItem.parseQueryVar
private function parseQueryVar( $wpvar = '' ) { if ( ! is_array( $this->query_vars[$wpvar] ) ) { $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar]; } else { foreach ( $this->query_vars[$wpvar] as $vkey => $v ) { if ( ! is_object( $v ) ) { ...
php
private function parseQueryVar( $wpvar = '' ) { if ( ! is_array( $this->query_vars[$wpvar] ) ) { $this->query_vars[$wpvar] = (string) $this->query_vars[$wpvar]; } else { foreach ( $this->query_vars[$wpvar] as $vkey => $v ) { if ( ! is_object( $v ) ) { ...
[ "private", "function", "parseQueryVar", "(", "$", "wpvar", "=", "''", ")", "{", "if", "(", "!", "is_array", "(", "$", "this", "->", "query_vars", "[", "$", "wpvar", "]", ")", ")", "{", "$", "this", "->", "query_vars", "[", "$", "wpvar", "]", "=", ...
Parse a query variable, "flattening" it if is an array or an object, also set 'post_type' and 'name' query var, if a slug of a registered post type is present among query vars @param string $wpvar
[ "Parse", "a", "query", "variable", "flattening", "it", "if", "is", "an", "array", "or", "an", "object", "also", "set", "post_type", "and", "name", "query", "var", "if", "a", "slug", "of", "a", "registered", "post", "type", "is", "present", "among", "quer...
train
https://github.com/gmazzap/Url_To_Query/blob/2537affbbb8b9062d46bb2deec1933acab63d007/UrlToQueryItem.php#L321-L335
gmazzap/Url_To_Query
UrlToQueryItem.php
UrlToQueryItem.parseTaxQueryVars
private function parseTaxQueryVars() { foreach ( get_taxonomies( [ ], 'objects' ) as $t ) { if ( $t->query_var && isset( $this->query_vars[$t->query_var] ) ) { $encoded = str_replace( ' ', '+', $this->query_vars[$t->query_var] ); $this->query_vars[$t->query_var] = $en...
php
private function parseTaxQueryVars() { foreach ( get_taxonomies( [ ], 'objects' ) as $t ) { if ( $t->query_var && isset( $this->query_vars[$t->query_var] ) ) { $encoded = str_replace( ' ', '+', $this->query_vars[$t->query_var] ); $this->query_vars[$t->query_var] = $en...
[ "private", "function", "parseTaxQueryVars", "(", ")", "{", "foreach", "(", "get_taxonomies", "(", "[", "]", ",", "'objects'", ")", "as", "$", "t", ")", "{", "if", "(", "$", "t", "->", "query_var", "&&", "isset", "(", "$", "this", "->", "query_vars", ...
Convert spacet to '+' in the query variables for custom taxonomies
[ "Convert", "spacet", "to", "+", "in", "the", "query", "variables", "for", "custom", "taxonomies" ]
train
https://github.com/gmazzap/Url_To_Query/blob/2537affbbb8b9062d46bb2deec1933acab63d007/UrlToQueryItem.php#L340-L347
gmazzap/Url_To_Query
UrlToQueryItem.php
UrlToQueryItem.parseCptQueryVars
private function parseCptQueryVars() { if ( isset( $this->query_vars['post_type'] ) ) { $queryable = get_post_types( [ 'publicly_queryable' => TRUE ] ); if ( ! is_array( $this->query_vars['post_type'] ) && ! in_array( $this->query_vars['post_type'], $query...
php
private function parseCptQueryVars() { if ( isset( $this->query_vars['post_type'] ) ) { $queryable = get_post_types( [ 'publicly_queryable' => TRUE ] ); if ( ! is_array( $this->query_vars['post_type'] ) && ! in_array( $this->query_vars['post_type'], $query...
[ "private", "function", "parseCptQueryVars", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "query_vars", "[", "'post_type'", "]", ")", ")", "{", "$", "queryable", "=", "get_post_types", "(", "[", "'publicly_queryable'", "=>", "TRUE", "]", ")", ...
Remove from query variables any non publicly queriable post type rewrite slug
[ "Remove", "from", "query", "variables", "any", "non", "publicly", "queriable", "post", "type", "rewrite", "slug" ]
train
https://github.com/gmazzap/Url_To_Query/blob/2537affbbb8b9062d46bb2deec1933acab63d007/UrlToQueryItem.php#L352-L365
gmazzap/Url_To_Query
UrlToQueryItem.php
UrlToQueryItem.parsePrivateQueryVars
private function parsePrivateQueryVars( Array $extra = [ ], Array $private = [ ] ) { if ( ! empty( $extra ) ) { foreach ( $private as $var ) { if ( isset( $extra[$var] ) ) { $this->query_vars[$var] = $extra[$var]; } } } }
php
private function parsePrivateQueryVars( Array $extra = [ ], Array $private = [ ] ) { if ( ! empty( $extra ) ) { foreach ( $private as $var ) { if ( isset( $extra[$var] ) ) { $this->query_vars[$var] = $extra[$var]; } } } }
[ "private", "function", "parsePrivateQueryVars", "(", "Array", "$", "extra", "=", "[", "]", ",", "Array", "$", "private", "=", "[", "]", ")", "{", "if", "(", "!", "empty", "(", "$", "extra", ")", ")", "{", "foreach", "(", "$", "private", "as", "$", ...
Look in extra query variables passed to resolver and compare to WP object private variables if some variables are found they are added to query variables to be returned @param array $extra @param array $private
[ "Look", "in", "extra", "query", "variables", "passed", "to", "resolver", "and", "compare", "to", "WP", "object", "private", "variables", "if", "some", "variables", "are", "found", "they", "are", "added", "to", "query", "variables", "to", "be", "returned" ]
train
https://github.com/gmazzap/Url_To_Query/blob/2537affbbb8b9062d46bb2deec1933acab63d007/UrlToQueryItem.php#L374-L382
drunomics/service-utils
src/Core/File/FileSystemTrait.php
FileSystemTrait.getFileSystem
public function getFileSystem() { if (empty($this->fileSystem)) { $this->fileSystem = \Drupal::service('file_system'); } return $this->fileSystem; }
php
public function getFileSystem() { if (empty($this->fileSystem)) { $this->fileSystem = \Drupal::service('file_system'); } return $this->fileSystem; }
[ "public", "function", "getFileSystem", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "fileSystem", ")", ")", "{", "$", "this", "->", "fileSystem", "=", "\\", "Drupal", "::", "service", "(", "'file_system'", ")", ";", "}", "return", "$", ...
Gets the file system. @return \Drupal\Core\File\FileSystemInterface The file system.
[ "Gets", "the", "file", "system", "." ]
train
https://github.com/drunomics/service-utils/blob/56761750043132365ef4ae5d9e0cf4263459328f/src/Core/File/FileSystemTrait.php#L38-L43
pageon/SlackWebhookMonolog
src/Slack/Attachment/TraceAttachment.php
TraceAttachment.parseTraceItem
private function parseTraceItem(array $traceItem) { $text = ''; $info = [ 'file' => $this->getArrayValue($traceItem, 'file', 'unknown'), 'function' => $this->getArrayValue($traceItem, 'function', 'unknown'), 'line' => $this->getArrayValue($traceItem, 'line', 'unkn...
php
private function parseTraceItem(array $traceItem) { $text = ''; $info = [ 'file' => $this->getArrayValue($traceItem, 'file', 'unknown'), 'function' => $this->getArrayValue($traceItem, 'function', 'unknown'), 'line' => $this->getArrayValue($traceItem, 'line', 'unkn...
[ "private", "function", "parseTraceItem", "(", "array", "$", "traceItem", ")", "{", "$", "text", "=", "''", ";", "$", "info", "=", "[", "'file'", "=>", "$", "this", "->", "getArrayValue", "(", "$", "traceItem", ",", "'file'", ",", "'unknown'", ")", ",",...
Parse all the data into the markup of slack. @param array $traceItem @return string
[ "Parse", "all", "the", "data", "into", "the", "markup", "of", "slack", "." ]
train
https://github.com/pageon/SlackWebhookMonolog/blob/6755060ddd6429620fd4c7decbb95f05463fc36b/src/Slack/Attachment/TraceAttachment.php#L61-L74
esperecyan/dictionary-php
src/parser/CatchfeelingParser.php
CatchfeelingParser.parseLine
protected function parseLine(Dictionary $dictionary, string $line) { // コメントの分離 $textAndDescription = preg_split('#[\\t  ]*//#u', $line, 2); if (str_replace(["\t", ' ', ' '], '', $textAndDescription[0]) === '') { throw new SyntaxException(_('空行 (スペース、コメントのみの行) があります。'));...
php
protected function parseLine(Dictionary $dictionary, string $line) { // コメントの分離 $textAndDescription = preg_split('#[\\t  ]*//#u', $line, 2); if (str_replace(["\t", ' ', ' '], '', $textAndDescription[0]) === '') { throw new SyntaxException(_('空行 (スペース、コメントのみの行) があります。'));...
[ "protected", "function", "parseLine", "(", "Dictionary", "$", "dictionary", ",", "string", "$", "line", ")", "{", "// コメントの分離", "$", "textAndDescription", "=", "preg_split", "(", "'#[\\\\t  ]*//#u', ", "$", "i", "ne, ", "2", ";", "", "", "if", "(", "str_repl...
行を解析し、textフィールドとdescriptionフィールドに対応する文字列を取り出します。 @param Dictionary $dictionary @param string $line
[ "行を解析し、textフィールドとdescriptionフィールドに対応する文字列を取り出します。" ]
train
https://github.com/esperecyan/dictionary-php/blob/14fad08fb43006995c763094e8e7ed0dc0e26676/src/parser/CatchfeelingParser.php#L13-L39
lara-cms/lara
src/LaraServiceProvider.php
LaraServiceProvider.boot
public function boot() { $this->loadViewsFrom(__DIR__.'/../views', 'lara'); $this->publishes([ __DIR__.'/../views' => base_path('resources/views/vendor/lara'), __DIR__.'/../public/' => base_path('/public'), __DIR__.'/../app/' => base_pat...
php
public function boot() { $this->loadViewsFrom(__DIR__.'/../views', 'lara'); $this->publishes([ __DIR__.'/../views' => base_path('resources/views/vendor/lara'), __DIR__.'/../public/' => base_path('/public'), __DIR__.'/../app/' => base_pat...
[ "public", "function", "boot", "(", ")", "{", "$", "this", "->", "loadViewsFrom", "(", "__DIR__", ".", "'/../views'", ",", "'lara'", ")", ";", "$", "this", "->", "publishes", "(", "[", "__DIR__", ".", "'/../views'", "=>", "base_path", "(", "'resources/views...
Bootstrap the application services. @return void
[ "Bootstrap", "the", "application", "services", "." ]
train
https://github.com/lara-cms/lara/blob/cc430c9325f9f702257ab403453af887a3b33e0d/src/LaraServiceProvider.php#L12-L28
FrenchFrogs/framework
src/Ruler/Ruler/Navigation.php
Navigation.hasPage
public function hasPage($index, $is_recursive = true) { if (isset($this->pages[$index])) { return true; } if ($is_recursive) { foreach ($this->pages as $page) { /**@var $page Page */ if ($page->hasChild($index, $is_recursive)) { ...
php
public function hasPage($index, $is_recursive = true) { if (isset($this->pages[$index])) { return true; } if ($is_recursive) { foreach ($this->pages as $page) { /**@var $page Page */ if ($page->hasChild($index, $is_recursive)) { ...
[ "public", "function", "hasPage", "(", "$", "index", ",", "$", "is_recursive", "=", "true", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "pages", "[", "$", "index", "]", ")", ")", "{", "return", "true", ";", "}", "if", "(", "$", "is_recur...
Return TRUE if a page $index exist in $pages container @param $index @return bool
[ "Return", "TRUE", "if", "a", "page", "$index", "exist", "in", "$pages", "container" ]
train
https://github.com/FrenchFrogs/framework/blob/a4838c698a5600437e87dac6d35ba8ebe32c4395/src/Ruler/Ruler/Navigation.php#L73-L89
FrenchFrogs/framework
src/Ruler/Ruler/Navigation.php
Navigation.getPage
public function getPage($index, $is_recursive = true) { if (!$this->hasPage($index, $is_recursive)) { throw new \InvalidArgumentException('The page "' . $index . '" doesn\'t exists'); } if (isset($this->pages[$index])) { return $this->pages[$index]; } else { ...
php
public function getPage($index, $is_recursive = true) { if (!$this->hasPage($index, $is_recursive)) { throw new \InvalidArgumentException('The page "' . $index . '" doesn\'t exists'); } if (isset($this->pages[$index])) { return $this->pages[$index]; } else { ...
[ "public", "function", "getPage", "(", "$", "index", ",", "$", "is_recursive", "=", "true", ")", "{", "if", "(", "!", "$", "this", "->", "hasPage", "(", "$", "index", ",", "$", "is_recursive", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentExcepti...
Return page $index from ages container @param $index @return Page
[ "Return", "page", "$index", "from", "ages", "container" ]
train
https://github.com/FrenchFrogs/framework/blob/a4838c698a5600437e87dac6d35ba8ebe32c4395/src/Ruler/Ruler/Navigation.php#L97-L119
gregorybesson/PlaygroundCore
src/Service/Recaptcha.php
Recaptcha.recaptcha
public function recaptcha($response, $ipClient = null) { if ($this->getOptions()->getGRecaptchaKey()) { $client = new \Zend\Http\Client($this->getOptions()->getGRecaptchaUrl()); $client->setParameterPost(array( 'secret' => $this->getOptions()->getGRecaptchaKey(), ...
php
public function recaptcha($response, $ipClient = null) { if ($this->getOptions()->getGRecaptchaKey()) { $client = new \Zend\Http\Client($this->getOptions()->getGRecaptchaUrl()); $client->setParameterPost(array( 'secret' => $this->getOptions()->getGRecaptchaKey(), ...
[ "public", "function", "recaptcha", "(", "$", "response", ",", "$", "ipClient", "=", "null", ")", "{", "if", "(", "$", "this", "->", "getOptions", "(", ")", "->", "getGRecaptchaKey", "(", ")", ")", "{", "$", "client", "=", "new", "\\", "Zend", "\\", ...
This method calls Google ReCaptcha. @param unknown_type $url @return unknown
[ "This", "method", "calls", "Google", "ReCaptcha", "." ]
train
https://github.com/gregorybesson/PlaygroundCore/blob/f8dfa4c7660b54354933b3c28c0cf35304a649df/src/Service/Recaptcha.php#L36-L57
polidog/esa-php
src/Client/Client.php
Client.request
public function request($method, $path, array $data = []) { try { $response = $this->httpClient->request($method, $path, $data); return json_decode($response->getBody()->getContents(), true); } catch (GuzzleException $e) { throw ClientException::newException($e, ...
php
public function request($method, $path, array $data = []) { try { $response = $this->httpClient->request($method, $path, $data); return json_decode($response->getBody()->getContents(), true); } catch (GuzzleException $e) { throw ClientException::newException($e, ...
[ "public", "function", "request", "(", "$", "method", ",", "$", "path", ",", "array", "$", "data", "=", "[", "]", ")", "{", "try", "{", "$", "response", "=", "$", "this", "->", "httpClient", "->", "request", "(", "$", "method", ",", "$", "path", "...
@param string $method @param string $path @param array $data @return array @throws ClientException @throws \RuntimeException
[ "@param", "string", "$method", "@param", "string", "$path", "@param", "array", "$data" ]
train
https://github.com/polidog/esa-php/blob/c5badbd027d73eebcd3cd388487b7c793323bb14/src/Client/Client.php#L55-L64
polidog/esa-php
src/Client/Client.php
Client.factory
public static function factory($accessToken, $httpOptions = []) { $httpOptions = array_merge(static::$httpOptions, $httpOptions); $authorization = new Authorization($accessToken); $httpOptions['handler'] = HandlerStack::create(); $authorization->push($httpOptions['handler']); ...
php
public static function factory($accessToken, $httpOptions = []) { $httpOptions = array_merge(static::$httpOptions, $httpOptions); $authorization = new Authorization($accessToken); $httpOptions['handler'] = HandlerStack::create(); $authorization->push($httpOptions['handler']); ...
[ "public", "static", "function", "factory", "(", "$", "accessToken", ",", "$", "httpOptions", "=", "[", "]", ")", "{", "$", "httpOptions", "=", "array_merge", "(", "static", "::", "$", "httpOptions", ",", "$", "httpOptions", ")", ";", "$", "authorization", ...
@param $accessToken @param array $httpOptions @return Client
[ "@param", "$accessToken", "@param", "array", "$httpOptions" ]
train
https://github.com/polidog/esa-php/blob/c5badbd027d73eebcd3cd388487b7c793323bb14/src/Client/Client.php#L72-L81
kingsquare/communibase-connector-php
src/Communibase/Logging/EchoQueryLogger.php
EchoQueryLogger.startQuery
public function startQuery($query, array $params = null, array $data = null) { echo $query . PHP_EOL; if ($params) { var_dump($params); } if ($data) { var_dump($data); } }
php
public function startQuery($query, array $params = null, array $data = null) { echo $query . PHP_EOL; if ($params) { var_dump($params); } if ($data) { var_dump($data); } }
[ "public", "function", "startQuery", "(", "$", "query", ",", "array", "$", "params", "=", "null", ",", "array", "$", "data", "=", "null", ")", "{", "echo", "$", "query", ".", "PHP_EOL", ";", "if", "(", "$", "params", ")", "{", "var_dump", "(", "$", ...
{@inheritdoc}
[ "{" ]
train
https://github.com/kingsquare/communibase-connector-php/blob/f1f9699e1a8acf066fab308f1e86cb8b5548e2db/src/Communibase/Logging/EchoQueryLogger.php#L13-L24
nkt/flame
src/QueryBuilder/Expression.php
Expression.equal
public function equal($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' = ' . $argument]; return $this; }
php
public function equal($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' = ' . $argument]; return $this; }
[ "public", "function", "equal", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "=", "[", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' = '", ".", "$", "argument", "]", ";", "ret...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L44-L49
nkt/flame
src/QueryBuilder/Expression.php
Expression.notEqual
public function notEqual($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' <> ' . $argument]; return $this; }
php
public function notEqual($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' <> ' . $argument]; return $this; }
[ "public", "function", "notEqual", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "=", "[", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' <> '", ".", "$", "argument", "]", ";", ...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L57-L62
nkt/flame
src/QueryBuilder/Expression.php
Expression.less
public function less($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' < ' . $argument]; return $this; }
php
public function less($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' < ' . $argument]; return $this; }
[ "public", "function", "less", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "=", "[", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' < '", ".", "$", "argument", "]", ";", "retu...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L70-L75
nkt/flame
src/QueryBuilder/Expression.php
Expression.lessOrEqual
public function lessOrEqual($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' <= ' . $argument]; return $this; }
php
public function lessOrEqual($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' <= ' . $argument]; return $this; }
[ "public", "function", "lessOrEqual", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "=", "[", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' <= '", ".", "$", "argument", "]", ";",...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L83-L88
nkt/flame
src/QueryBuilder/Expression.php
Expression.more
public function more($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' > ' . $argument]; return $this; }
php
public function more($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' > ' . $argument]; return $this; }
[ "public", "function", "more", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "=", "[", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' > '", ".", "$", "argument", "]", ";", "retu...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L96-L101
nkt/flame
src/QueryBuilder/Expression.php
Expression.moreOrEqual
public function moreOrEqual($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' >= ' . $argument]; return $this; }
php
public function moreOrEqual($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' >= ' . $argument]; return $this; }
[ "public", "function", "moreOrEqual", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "=", "[", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' >= '", ".", "$", "argument", "]", ";",...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L109-L114
nkt/flame
src/QueryBuilder/Expression.php
Expression.in
public function in($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' IN(' . $argument . ')']; return $this; }
php
public function in($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' IN(' . $argument . ')']; return $this; }
[ "public", "function", "in", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "=", "[", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' IN('", ".", "$", "argument", ".", "')'", "]",...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L122-L127
nkt/flame
src/QueryBuilder/Expression.php
Expression.notIn
public function notIn($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' NOT IN(' . $argument . ')']; return $this; }
php
public function notIn($column, $argument) { $this->conditions = [$this->grammar->buildId($column) . ' NOT IN(' . $argument . ')']; return $this; }
[ "public", "function", "notIn", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "=", "[", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' NOT IN('", ".", "$", "argument", ".", "')'",...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L135-L140
nkt/flame
src/QueryBuilder/Expression.php
Expression.between
public function between($column, $left, $right) { $this->conditions = [$this->grammar->buildId($column) . ' BETWEEN ' . $left . ' AND ' . $right]; return $this; }
php
public function between($column, $left, $right) { $this->conditions = [$this->grammar->buildId($column) . ' BETWEEN ' . $left . ' AND ' . $right]; return $this; }
[ "public", "function", "between", "(", "$", "column", ",", "$", "left", ",", "$", "right", ")", "{", "$", "this", "->", "conditions", "=", "[", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' BETWEEN '", ".", "$", "le...
@param string $column @param string $left @param string $right @return static
[ "@param", "string", "$column", "@param", "string", "$left", "@param", "string", "$right" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L149-L154
nkt/flame
src/QueryBuilder/Expression.php
Expression.notBetween
public function notBetween($column, $left, $right) { $this->conditions = [$this->grammar->buildId($column) . ' NOT BETWEEN ' . $left . ' AND ' . $right]; return $this; }
php
public function notBetween($column, $left, $right) { $this->conditions = [$this->grammar->buildId($column) . ' NOT BETWEEN ' . $left . ' AND ' . $right]; return $this; }
[ "public", "function", "notBetween", "(", "$", "column", ",", "$", "left", ",", "$", "right", ")", "{", "$", "this", "->", "conditions", "=", "[", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' NOT BETWEEN '", ".", "$"...
@param string $column @param string $left @param string $right @return static
[ "@param", "string", "$column", "@param", "string", "$left", "@param", "string", "$right" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L163-L168
nkt/flame
src/QueryBuilder/Expression.php
Expression.like
public function like($column, $pattern) { $this->conditions = [$this->grammar->buildId($column) . ' LIKE ' . $pattern]; return $this; }
php
public function like($column, $pattern) { $this->conditions = [$this->grammar->buildId($column) . ' LIKE ' . $pattern]; return $this; }
[ "public", "function", "like", "(", "$", "column", ",", "$", "pattern", ")", "{", "$", "this", "->", "conditions", "=", "[", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' LIKE '", ".", "$", "pattern", "]", ";", "ret...
@param string $column @param string $pattern @return static
[ "@param", "string", "$column", "@param", "string", "$pattern" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L200-L205
nkt/flame
src/QueryBuilder/Expression.php
Expression.notLike
public function notLike($column, $pattern) { $this->conditions = [$this->grammar->buildId($column) . ' NOT LIKE ' . $pattern]; return $this; }
php
public function notLike($column, $pattern) { $this->conditions = [$this->grammar->buildId($column) . ' NOT LIKE ' . $pattern]; return $this; }
[ "public", "function", "notLike", "(", "$", "column", ",", "$", "pattern", ")", "{", "$", "this", "->", "conditions", "=", "[", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' NOT LIKE '", ".", "$", "pattern", "]", ";",...
@param string $column @param string $pattern @return static
[ "@param", "string", "$column", "@param", "string", "$pattern" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L213-L218
nkt/flame
src/QueryBuilder/Expression.php
Expression.andEqual
public function andEqual($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' = ' . $argument; return $this; }
php
public function andEqual($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' = ' . $argument; return $this; }
[ "public", "function", "andEqual", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "[", "]", "=", "'AND '", ".", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' = '", ".", "$", "ar...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L226-L231
nkt/flame
src/QueryBuilder/Expression.php
Expression.andNotEqual
public function andNotEqual($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' <> ' . $argument; return $this; }
php
public function andNotEqual($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' <> ' . $argument; return $this; }
[ "public", "function", "andNotEqual", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "[", "]", "=", "'AND '", ".", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' <> '", ".", "$", ...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L239-L244
nkt/flame
src/QueryBuilder/Expression.php
Expression.andLess
public function andLess($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' < ' . $argument; return $this; }
php
public function andLess($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' < ' . $argument; return $this; }
[ "public", "function", "andLess", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "[", "]", "=", "'AND '", ".", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' < '", ".", "$", "arg...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L252-L257
nkt/flame
src/QueryBuilder/Expression.php
Expression.andLessOrEqual
public function andLessOrEqual($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' <= ' . $argument; return $this; }
php
public function andLessOrEqual($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' <= ' . $argument; return $this; }
[ "public", "function", "andLessOrEqual", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "[", "]", "=", "'AND '", ".", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' <= '", ".", "$"...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L265-L270
nkt/flame
src/QueryBuilder/Expression.php
Expression.andMore
public function andMore($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' > ' . $argument; return $this; }
php
public function andMore($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' > ' . $argument; return $this; }
[ "public", "function", "andMore", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "[", "]", "=", "'AND '", ".", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' > '", ".", "$", "arg...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L278-L283
nkt/flame
src/QueryBuilder/Expression.php
Expression.andMoreOrEqual
public function andMoreOrEqual($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' >= ' . $argument; return $this; }
php
public function andMoreOrEqual($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' >= ' . $argument; return $this; }
[ "public", "function", "andMoreOrEqual", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "[", "]", "=", "'AND '", ".", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' >= '", ".", "$"...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L291-L296
nkt/flame
src/QueryBuilder/Expression.php
Expression.andIn
public function andIn($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' IN(' . $argument . ')'; return $this; }
php
public function andIn($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' IN(' . $argument . ')'; return $this; }
[ "public", "function", "andIn", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "[", "]", "=", "'AND '", ".", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' IN('", ".", "$", "argu...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L304-L309
nkt/flame
src/QueryBuilder/Expression.php
Expression.andNotIn
public function andNotIn($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' NOT IN(' . $argument . ')'; return $this; }
php
public function andNotIn($column, $argument) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' NOT IN(' . $argument . ')'; return $this; }
[ "public", "function", "andNotIn", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "[", "]", "=", "'AND '", ".", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' NOT IN('", ".", "$", ...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L317-L322
nkt/flame
src/QueryBuilder/Expression.php
Expression.andBetween
public function andBetween($column, $left, $right) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' BETWEEN ' . $left . ' AND ' . $right; return $this; }
php
public function andBetween($column, $left, $right) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' BETWEEN ' . $left . ' AND ' . $right; return $this; }
[ "public", "function", "andBetween", "(", "$", "column", ",", "$", "left", ",", "$", "right", ")", "{", "$", "this", "->", "conditions", "[", "]", "=", "'AND '", ".", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' BE...
@param string $column @param string $left @param string $right @return static
[ "@param", "string", "$column", "@param", "string", "$left", "@param", "string", "$right" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L331-L336
nkt/flame
src/QueryBuilder/Expression.php
Expression.andNotBetween
public function andNotBetween($column, $left, $right) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' NOT BETWEEN ' . $left . ' AND ' . $right; return $this; }
php
public function andNotBetween($column, $left, $right) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' NOT BETWEEN ' . $left . ' AND ' . $right; return $this; }
[ "public", "function", "andNotBetween", "(", "$", "column", ",", "$", "left", ",", "$", "right", ")", "{", "$", "this", "->", "conditions", "[", "]", "=", "'AND '", ".", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "'...
@param string $column @param string $left @param string $right @return static
[ "@param", "string", "$column", "@param", "string", "$left", "@param", "string", "$right" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L345-L350
nkt/flame
src/QueryBuilder/Expression.php
Expression.andLike
public function andLike($column, $pattern) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' LIKE ' . $pattern; return $this; }
php
public function andLike($column, $pattern) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' LIKE ' . $pattern; return $this; }
[ "public", "function", "andLike", "(", "$", "column", ",", "$", "pattern", ")", "{", "$", "this", "->", "conditions", "[", "]", "=", "'AND '", ".", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' LIKE '", ".", "$", "p...
@param string $column @param string $pattern @return static
[ "@param", "string", "$column", "@param", "string", "$pattern" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L382-L387
nkt/flame
src/QueryBuilder/Expression.php
Expression.andNotLike
public function andNotLike($column, $pattern) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' NOT LIKE ' . $pattern; return $this; }
php
public function andNotLike($column, $pattern) { $this->conditions[] = 'AND ' . $this->grammar->buildId($column) . ' NOT LIKE ' . $pattern; return $this; }
[ "public", "function", "andNotLike", "(", "$", "column", ",", "$", "pattern", ")", "{", "$", "this", "->", "conditions", "[", "]", "=", "'AND '", ".", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' NOT LIKE '", ".", "$...
@param string $column @param string $pattern @return static
[ "@param", "string", "$column", "@param", "string", "$pattern" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L395-L400
nkt/flame
src/QueryBuilder/Expression.php
Expression.orEqual
public function orEqual($column, $argument) { $this->conditions[] = 'OR ' . $this->grammar->buildId($column) . ' = ' . $argument; return $this; }
php
public function orEqual($column, $argument) { $this->conditions[] = 'OR ' . $this->grammar->buildId($column) . ' = ' . $argument; return $this; }
[ "public", "function", "orEqual", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "[", "]", "=", "'OR '", ".", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' = '", ".", "$", "argu...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L408-L413
nkt/flame
src/QueryBuilder/Expression.php
Expression.orNotEqual
public function orNotEqual($column, $argument) { $this->conditions[] = 'OR ' . $this->grammar->buildId($column) . ' <> ' . $argument; return $this; }
php
public function orNotEqual($column, $argument) { $this->conditions[] = 'OR ' . $this->grammar->buildId($column) . ' <> ' . $argument; return $this; }
[ "public", "function", "orNotEqual", "(", "$", "column", ",", "$", "argument", ")", "{", "$", "this", "->", "conditions", "[", "]", "=", "'OR '", ".", "$", "this", "->", "grammar", "->", "buildId", "(", "$", "column", ")", ".", "' <> '", ".", "$", "...
@param string $column @param string $argument @return static
[ "@param", "string", "$column", "@param", "string", "$argument" ]
train
https://github.com/nkt/flame/blob/16f9f172db5a8a618b628429e0986eacb089d217/src/QueryBuilder/Expression.php#L421-L426