id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
188,800
taq/pdooci
src/PDO.php
PDO.lastInsertId
public function lastInsertId($sequence=null) { if (!$sequence) { throw new \PDOException("SQLSTATE[IM001]: Driver does not support this function: driver does not support getting attributes in system_requirements"); } $id = 0; try { $stmt = $this->query("select...
php
public function lastInsertId($sequence=null) { if (!$sequence) { throw new \PDOException("SQLSTATE[IM001]: Driver does not support this function: driver does not support getting attributes in system_requirements"); } $id = 0; try { $stmt = $this->query("select...
[ "public", "function", "lastInsertId", "(", "$", "sequence", "=", "null", ")", "{", "if", "(", "!", "$", "sequence", ")", "{", "throw", "new", "\\", "PDOException", "(", "\"SQLSTATE[IM001]: Driver does not support this function: driver does not support getting attributes i...
Return the last inserted id If the sequence name is not sent, throws an exception @param string $sequence name @return mixed last id @throws \PDOException
[ "Return", "the", "last", "inserted", "id", "If", "the", "sequence", "name", "is", "not", "sent", "throws", "an", "exception" ]
45d2cb5791f3d374e776f5d7eb1666876e0e30d1
https://github.com/taq/pdooci/blob/45d2cb5791f3d374e776f5d7eb1666876e0e30d1/src/PDO.php#L409-L423
188,801
notamedia/console-jedi
src/Application/Application.php
Application.getBitrixCommands
protected function getBitrixCommands() { return array_merge( [ new OnCronCommand(), new ExecuteCommand(), new ClearCommand(), new InitCommand(), new ReIndexCommand(), new ExportCommand(), ...
php
protected function getBitrixCommands() { return array_merge( [ new OnCronCommand(), new ExecuteCommand(), new ClearCommand(), new InitCommand(), new ReIndexCommand(), new ExportCommand(), ...
[ "protected", "function", "getBitrixCommands", "(", ")", "{", "return", "array_merge", "(", "[", "new", "OnCronCommand", "(", ")", ",", "new", "ExecuteCommand", "(", ")", ",", "new", "ClearCommand", "(", ")", ",", "new", "InitCommand", "(", ")", ",", "new",...
Gets Bitrix console commands from this package. @return Command[]
[ "Gets", "Bitrix", "console", "commands", "from", "this", "package", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Application/Application.php#L147-L162
188,802
notamedia/console-jedi
src/Application/Application.php
Application.getModulesCommands
protected function getModulesCommands() { $commands = []; foreach (ModuleManager::getInstalledModules() as $module) { $cliFile = getLocalPath('modules/' . $module['ID'] . '/cli.php'); if ($cliFile === false) { continue; } elseif (!Loader::include...
php
protected function getModulesCommands() { $commands = []; foreach (ModuleManager::getInstalledModules() as $module) { $cliFile = getLocalPath('modules/' . $module['ID'] . '/cli.php'); if ($cliFile === false) { continue; } elseif (!Loader::include...
[ "protected", "function", "getModulesCommands", "(", ")", "{", "$", "commands", "=", "[", "]", ";", "foreach", "(", "ModuleManager", "::", "getInstalledModules", "(", ")", "as", "$", "module", ")", "{", "$", "cliFile", "=", "getLocalPath", "(", "'modules/'", ...
Gets console commands from modules. @return Command[] @throws \Bitrix\Main\LoaderException
[ "Gets", "console", "commands", "from", "modules", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Application/Application.php#L171-L192
188,803
notamedia/console-jedi
src/Application/Application.php
Application.loadConfiguration
public function loadConfiguration($path = self::CONFIG_DEFAULT_FILE) { if (!is_file($path)) { return false; } $this->configuration = include $path; if (!is_array($this->configuration)) { throw new ConfigurationException('Configuration file ' . $path . ' must...
php
public function loadConfiguration($path = self::CONFIG_DEFAULT_FILE) { if (!is_file($path)) { return false; } $this->configuration = include $path; if (!is_array($this->configuration)) { throw new ConfigurationException('Configuration file ' . $path . ' must...
[ "public", "function", "loadConfiguration", "(", "$", "path", "=", "self", "::", "CONFIG_DEFAULT_FILE", ")", "{", "if", "(", "!", "is_file", "(", "$", "path", ")", ")", "{", "return", "false", ";", "}", "$", "this", "->", "configuration", "=", "include", ...
Loading application configuration. @param string $path Path to configuration file. @return bool @throws ConfigurationException
[ "Loading", "application", "configuration", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Application/Application.php#L203-L228
188,804
notamedia/console-jedi
src/Application/Application.php
Application.initializeBitrix
public function initializeBitrix() { if ($this->bitrixStatus === static::BITRIX_STATUS_COMPLETE) { return static::BITRIX_STATUS_COMPLETE; } elseif (!$this->checkBitrix()) { return static::BITRIX_STATUS_UNAVAILABLE; } define('NO_KEEP_STATISTIC', true); ...
php
public function initializeBitrix() { if ($this->bitrixStatus === static::BITRIX_STATUS_COMPLETE) { return static::BITRIX_STATUS_COMPLETE; } elseif (!$this->checkBitrix()) { return static::BITRIX_STATUS_UNAVAILABLE; } define('NO_KEEP_STATISTIC', true); ...
[ "public", "function", "initializeBitrix", "(", ")", "{", "if", "(", "$", "this", "->", "bitrixStatus", "===", "static", "::", "BITRIX_STATUS_COMPLETE", ")", "{", "return", "static", "::", "BITRIX_STATUS_COMPLETE", ";", "}", "elseif", "(", "!", "$", "this", "...
Initialize kernel of Bitrix. @return int The status of readiness kernel.
[ "Initialize", "kernel", "of", "Bitrix", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Application/Application.php#L245-L276
188,805
socialite-manager/socialite
src/One/AbstractProvider.php
AbstractProvider.hasNecessaryVerifier
protected function hasNecessaryVerifier() { $query = $this->request->getQueryParams(); $hasToken = A::get($query, 'oauth_token') !== null; $hasVerifier = A::get($query, 'oauth_verifier') !== null; return $hasToken && $hasVerifier; }
php
protected function hasNecessaryVerifier() { $query = $this->request->getQueryParams(); $hasToken = A::get($query, 'oauth_token') !== null; $hasVerifier = A::get($query, 'oauth_verifier') !== null; return $hasToken && $hasVerifier; }
[ "protected", "function", "hasNecessaryVerifier", "(", ")", "{", "$", "query", "=", "$", "this", "->", "request", "->", "getQueryParams", "(", ")", ";", "$", "hasToken", "=", "A", "::", "get", "(", "$", "query", ",", "'oauth_token'", ")", "!==", "null", ...
Determine if the request has the necessary OAuth verifier. @return bool
[ "Determine", "if", "the", "request", "has", "the", "necessary", "OAuth", "verifier", "." ]
80c3a00f83b12b052cbcebe798f553eb8f735100
https://github.com/socialite-manager/socialite/blob/80c3a00f83b12b052cbcebe798f553eb8f735100/src/One/AbstractProvider.php#L134-L141
188,806
cybercog/youtrack-rest-php
src/Client/YouTrackClient.php
YouTrackClient.get
public function get(string $uri, array $params = [], array $options = []): ResponseContract { return $this->request('GET', $uri, $params, $options); }
php
public function get(string $uri, array $params = [], array $options = []): ResponseContract { return $this->request('GET', $uri, $params, $options); }
[ "public", "function", "get", "(", "string", "$", "uri", ",", "array", "$", "params", "=", "[", "]", ",", "array", "$", "options", "=", "[", "]", ")", ":", "ResponseContract", "{", "return", "$", "this", "->", "request", "(", "'GET'", ",", "$", "uri...
Create and send an GET HTTP request. @param string $uri @param array $params @param array $options @return \Cog\Contracts\YouTrack\Rest\Response\Response @throws \Cog\Contracts\YouTrack\Rest\Authenticator\Exceptions\AuthenticationException @throws \Cog\Contracts\YouTrack\Rest\Authorizer\Exceptions\InvalidAuthorizatio...
[ "Create", "and", "send", "an", "GET", "HTTP", "request", "." ]
28ed6eacf505a13966e49b2f3dae9027c7d3f213
https://github.com/cybercog/youtrack-rest-php/blob/28ed6eacf505a13966e49b2f3dae9027c7d3f213/src/Client/YouTrackClient.php#L124-L127
188,807
cybercog/youtrack-rest-php
src/Client/YouTrackClient.php
YouTrackClient.post
public function post(string $uri, array $params = [], array $options = []): ResponseContract { return $this->request('POST', $uri, $params, $options); }
php
public function post(string $uri, array $params = [], array $options = []): ResponseContract { return $this->request('POST', $uri, $params, $options); }
[ "public", "function", "post", "(", "string", "$", "uri", ",", "array", "$", "params", "=", "[", "]", ",", "array", "$", "options", "=", "[", "]", ")", ":", "ResponseContract", "{", "return", "$", "this", "->", "request", "(", "'POST'", ",", "$", "u...
Create and send an POST HTTP request. @param string $uri @param array $params @param array $options @return \Cog\Contracts\YouTrack\Rest\Response\Response @throws \Cog\Contracts\YouTrack\Rest\Authenticator\Exceptions\AuthenticationException @throws \Cog\Contracts\YouTrack\Rest\Authorizer\Exceptions\InvalidAuthorizati...
[ "Create", "and", "send", "an", "POST", "HTTP", "request", "." ]
28ed6eacf505a13966e49b2f3dae9027c7d3f213
https://github.com/cybercog/youtrack-rest-php/blob/28ed6eacf505a13966e49b2f3dae9027c7d3f213/src/Client/YouTrackClient.php#L141-L144
188,808
cybercog/youtrack-rest-php
src/Client/YouTrackClient.php
YouTrackClient.put
public function put(string $uri, array $params = [], array $options = []): ResponseContract { return $this->request('PUT', $uri, $params, $options); }
php
public function put(string $uri, array $params = [], array $options = []): ResponseContract { return $this->request('PUT', $uri, $params, $options); }
[ "public", "function", "put", "(", "string", "$", "uri", ",", "array", "$", "params", "=", "[", "]", ",", "array", "$", "options", "=", "[", "]", ")", ":", "ResponseContract", "{", "return", "$", "this", "->", "request", "(", "'PUT'", ",", "$", "uri...
Create and send an PUT HTTP request. @param string $uri @param array $params @param array $options @return \Cog\Contracts\YouTrack\Rest\Response\Response @throws \Cog\Contracts\YouTrack\Rest\Authenticator\Exceptions\AuthenticationException @throws \Cog\Contracts\YouTrack\Rest\Authorizer\Exceptions\InvalidAuthorizatio...
[ "Create", "and", "send", "an", "PUT", "HTTP", "request", "." ]
28ed6eacf505a13966e49b2f3dae9027c7d3f213
https://github.com/cybercog/youtrack-rest-php/blob/28ed6eacf505a13966e49b2f3dae9027c7d3f213/src/Client/YouTrackClient.php#L158-L161
188,809
cybercog/youtrack-rest-php
src/Client/YouTrackClient.php
YouTrackClient.delete
public function delete(string $uri, array $params = [], array $options = []): ResponseContract { return $this->request('DELETE', $uri, $params, $options); }
php
public function delete(string $uri, array $params = [], array $options = []): ResponseContract { return $this->request('DELETE', $uri, $params, $options); }
[ "public", "function", "delete", "(", "string", "$", "uri", ",", "array", "$", "params", "=", "[", "]", ",", "array", "$", "options", "=", "[", "]", ")", ":", "ResponseContract", "{", "return", "$", "this", "->", "request", "(", "'DELETE'", ",", "$", ...
Create and send an DELETE HTTP request. @param string $uri @param array $params @param array $options @return \Cog\Contracts\YouTrack\Rest\Response\Response @throws \Cog\Contracts\YouTrack\Rest\Authenticator\Exceptions\AuthenticationException @throws \Cog\Contracts\YouTrack\Rest\Authorizer\Exceptions\InvalidAuthoriza...
[ "Create", "and", "send", "an", "DELETE", "HTTP", "request", "." ]
28ed6eacf505a13966e49b2f3dae9027c7d3f213
https://github.com/cybercog/youtrack-rest-php/blob/28ed6eacf505a13966e49b2f3dae9027c7d3f213/src/Client/YouTrackClient.php#L175-L178
188,810
cybercog/youtrack-rest-php
src/Client/YouTrackClient.php
YouTrackClient.withHeader
public function withHeader(string $key, string $value): void { $this->headers[$key] = $value; }
php
public function withHeader(string $key, string $value): void { $this->headers[$key] = $value; }
[ "public", "function", "withHeader", "(", "string", "$", "key", ",", "string", "$", "value", ")", ":", "void", "{", "$", "this", "->", "headers", "[", "$", "key", "]", "=", "$", "value", ";", "}" ]
Write header value. @param string $key @param string $value @return void
[ "Write", "header", "value", "." ]
28ed6eacf505a13966e49b2f3dae9027c7d3f213
https://github.com/cybercog/youtrack-rest-php/blob/28ed6eacf505a13966e49b2f3dae9027c7d3f213/src/Client/YouTrackClient.php#L187-L190
188,811
cybercog/youtrack-rest-php
src/Client/YouTrackClient.php
YouTrackClient.buildOptions
protected function buildOptions(array $params = [], array $options = []): array { $defaultOptions = [ 'form_params' => $params, 'headers' => $this->buildHeaders(), ]; if (isset($options['multipart'])) { unset($defaultOptions['form_params']); f...
php
protected function buildOptions(array $params = [], array $options = []): array { $defaultOptions = [ 'form_params' => $params, 'headers' => $this->buildHeaders(), ]; if (isset($options['multipart'])) { unset($defaultOptions['form_params']); f...
[ "protected", "function", "buildOptions", "(", "array", "$", "params", "=", "[", "]", ",", "array", "$", "options", "=", "[", "]", ")", ":", "array", "{", "$", "defaultOptions", "=", "[", "'form_params'", "=>", "$", "params", ",", "'headers'", "=>", "$"...
Build request options. @param array $params @param array $options @return array
[ "Build", "request", "options", "." ]
28ed6eacf505a13966e49b2f3dae9027c7d3f213
https://github.com/cybercog/youtrack-rest-php/blob/28ed6eacf505a13966e49b2f3dae9027c7d3f213/src/Client/YouTrackClient.php#L221-L245
188,812
cybercog/youtrack-rest-php
src/Client/YouTrackClient.php
YouTrackClient.buildHeaders
protected function buildHeaders(): array { $this->headers = [ 'User-Agent' => 'Cog-YouTrack-REST-PHP/' . self::VERSION, 'Accept' => 'application/json', ]; $this->authorizer->appendHeadersTo($this); return $this->headers; }
php
protected function buildHeaders(): array { $this->headers = [ 'User-Agent' => 'Cog-YouTrack-REST-PHP/' . self::VERSION, 'Accept' => 'application/json', ]; $this->authorizer->appendHeadersTo($this); return $this->headers; }
[ "protected", "function", "buildHeaders", "(", ")", ":", "array", "{", "$", "this", "->", "headers", "=", "[", "'User-Agent'", "=>", "'Cog-YouTrack-REST-PHP/'", ".", "self", "::", "VERSION", ",", "'Accept'", "=>", "'application/json'", ",", "]", ";", "$", "th...
Build request headers. @return array
[ "Build", "request", "headers", "." ]
28ed6eacf505a13966e49b2f3dae9027c7d3f213
https://github.com/cybercog/youtrack-rest-php/blob/28ed6eacf505a13966e49b2f3dae9027c7d3f213/src/Client/YouTrackClient.php#L252-L262
188,813
notamedia/console-jedi
src/Application/Command/InitCommand.php
InitCommand.createEnvironmentsDir
protected function createEnvironmentsDir(InputInterface $input, OutputInterface $output) { $targetDir = getcwd() . '/' . $this->envDir; $tmplDir = $this->tmplDir . '/environments'; $output->writeln(' - Environment settings'); if (file_exists($targetDir)) { $question = ...
php
protected function createEnvironmentsDir(InputInterface $input, OutputInterface $output) { $targetDir = getcwd() . '/' . $this->envDir; $tmplDir = $this->tmplDir . '/environments'; $output->writeln(' - Environment settings'); if (file_exists($targetDir)) { $question = ...
[ "protected", "function", "createEnvironmentsDir", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "targetDir", "=", "getcwd", "(", ")", ".", "'/'", ".", "$", "this", "->", "envDir", ";", "$", "tmplDir", "=", "$", ...
Creates directory with environments settings. @param InputInterface $input @param OutputInterface $output
[ "Creates", "directory", "with", "environments", "settings", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Application/Command/InitCommand.php#L112-L147
188,814
notamedia/console-jedi
src/Application/Command/InitCommand.php
InitCommand.createConfiguration
protected function createConfiguration(InputInterface $input, OutputInterface $output) { $path = $this->getApplication()->getRoot() . '/.jedi.php'; $output->writeln(' - Configuration'); if (file_exists($path)) { $question = new ConfirmationQuestion( ' <error...
php
protected function createConfiguration(InputInterface $input, OutputInterface $output) { $path = $this->getApplication()->getRoot() . '/.jedi.php'; $output->writeln(' - Configuration'); if (file_exists($path)) { $question = new ConfirmationQuestion( ' <error...
[ "protected", "function", "createConfiguration", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "path", "=", "$", "this", "->", "getApplication", "(", ")", "->", "getRoot", "(", ")", ".", "'/.jedi.php'", ";", "$", ...
Creates configuration file of application. @param InputInterface $input @param OutputInterface $output
[ "Creates", "configuration", "file", "of", "application", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Application/Command/InitCommand.php#L155-L207
188,815
notamedia/console-jedi
src/Application/Exception/BitrixException.php
BitrixException.generate
public static function generate($message = null, \CMain $APPLICATION = null) { if (null === $APPLICATION) { $APPLICATION = $GLOBALS['APPLICATION']; } if ($ex = $APPLICATION->GetException()) { throw new static($message ? $message . ': ' . $ex->GetString() : $ex->GetSt...
php
public static function generate($message = null, \CMain $APPLICATION = null) { if (null === $APPLICATION) { $APPLICATION = $GLOBALS['APPLICATION']; } if ($ex = $APPLICATION->GetException()) { throw new static($message ? $message . ': ' . $ex->GetString() : $ex->GetSt...
[ "public", "static", "function", "generate", "(", "$", "message", "=", "null", ",", "\\", "CMain", "$", "APPLICATION", "=", "null", ")", "{", "if", "(", "null", "===", "$", "APPLICATION", ")", "{", "$", "APPLICATION", "=", "$", "GLOBALS", "[", "'APPLICA...
Check for legacy bitrix exception, throws new self if any @param string $message [optional] Additional error message @param \CMain $APPLICATION [optional] $APPLICATION instance @throws static
[ "Check", "for", "legacy", "bitrix", "exception", "throws", "new", "self", "if", "any" ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Application/Exception/BitrixException.php#L32-L43
188,816
notamedia/console-jedi
src/Environment/Command/InitCommand.php
InitCommand.copyFiles
protected function copyFiles(InputInterface $input, OutputInterface $output) { $output->writeln('<comment>Copy files from the environment directory</comment>'); $fs = new Filesystem(); $directoryIterator = new \RecursiveDirectoryIterator($this->dir, \RecursiveDirectoryIterator::SKIP_DOTS);...
php
protected function copyFiles(InputInterface $input, OutputInterface $output) { $output->writeln('<comment>Copy files from the environment directory</comment>'); $fs = new Filesystem(); $directoryIterator = new \RecursiveDirectoryIterator($this->dir, \RecursiveDirectoryIterator::SKIP_DOTS);...
[ "protected", "function", "copyFiles", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "output", "->", "writeln", "(", "'<comment>Copy files from the environment directory</comment>'", ")", ";", "$", "fs", "=", "new", "Files...
Copy files and directories from the environment directory to application. @param InputInterface $input @param OutputInterface $output
[ "Copy", "files", "and", "directories", "from", "the", "environment", "directory", "to", "application", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Environment/Command/InitCommand.php#L144-L168
188,817
notamedia/console-jedi
src/Environment/Command/InitCommand.php
InitCommand.configureLicenseKey
protected function configureLicenseKey(InputInterface $input, OutputInterface $output, $licenseKey) { if (!is_string($licenseKey)) { throw new \InvalidArgumentException('Config "licenseKey" must be string type.'); } $licenseFileContent = "<" . "? $" . "LICENSE_KEY = \"" . Escape...
php
protected function configureLicenseKey(InputInterface $input, OutputInterface $output, $licenseKey) { if (!is_string($licenseKey)) { throw new \InvalidArgumentException('Config "licenseKey" must be string type.'); } $licenseFileContent = "<" . "? $" . "LICENSE_KEY = \"" . Escape...
[ "protected", "function", "configureLicenseKey", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ",", "$", "licenseKey", ")", "{", "if", "(", "!", "is_string", "(", "$", "licenseKey", ")", ")", "{", "throw", "new", "\\", "InvalidAr...
Sets license key Bitrix CMS. @param InputInterface $input @param OutputInterface $output @param string $licenseKey
[ "Sets", "license", "key", "Bitrix", "CMS", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Environment/Command/InitCommand.php#L188-L196
188,818
notamedia/console-jedi
src/Environment/Command/InitCommand.php
InitCommand.configureModules
protected function configureModules(InputInterface $input, OutputInterface $output, array $modules) { $app = $this->getApplication(); if ($app->getConfiguration()) { $app->addCommands(ModuleCommand::getCommands()); if ($app->getBitrixStatus() != \Notamedia\ConsoleJedi\Applica...
php
protected function configureModules(InputInterface $input, OutputInterface $output, array $modules) { $app = $this->getApplication(); if ($app->getConfiguration()) { $app->addCommands(ModuleCommand::getCommands()); if ($app->getBitrixStatus() != \Notamedia\ConsoleJedi\Applica...
[ "protected", "function", "configureModules", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ",", "array", "$", "modules", ")", "{", "$", "app", "=", "$", "this", "->", "getApplication", "(", ")", ";", "if", "(", "$", "app", "...
Installation modules. @param InputInterface $input @param OutputInterface $output @param array $modules @throws BitrixException @throws \LogicException @throws ModuleException
[ "Installation", "modules", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Environment/Command/InitCommand.php#L208-L259
188,819
notamedia/console-jedi
src/Environment/Command/InitCommand.php
InitCommand.configureSettings
protected function configureSettings(InputInterface $input, OutputInterface $output, array $settings) { $configuration = Configuration::getInstance(); foreach ($settings as $name => $value) { $configuration->setValue($name, $value); } }
php
protected function configureSettings(InputInterface $input, OutputInterface $output, array $settings) { $configuration = Configuration::getInstance(); foreach ($settings as $name => $value) { $configuration->setValue($name, $value); } }
[ "protected", "function", "configureSettings", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ",", "array", "$", "settings", ")", "{", "$", "configuration", "=", "Configuration", "::", "getInstance", "(", ")", ";", "foreach", "(", "...
Sets configs to .settings.php. @param InputInterface $input @param OutputInterface $output @param array $settings
[ "Sets", "configs", "to", ".", "settings", ".", "php", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Environment/Command/InitCommand.php#L268-L275
188,820
notamedia/console-jedi
src/Environment/Command/InitCommand.php
InitCommand.configureCluster
protected function configureCluster(InputInterface $input, OutputInterface $output, array $cluster) { global $APPLICATION; if (!Loader::includeModule('cluster')) { throw new \Exception('Failed to load module "cluster"'); } $memcache = new \CClusterMemcache; if ...
php
protected function configureCluster(InputInterface $input, OutputInterface $output, array $cluster) { global $APPLICATION; if (!Loader::includeModule('cluster')) { throw new \Exception('Failed to load module "cluster"'); } $memcache = new \CClusterMemcache; if ...
[ "protected", "function", "configureCluster", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ",", "array", "$", "cluster", ")", "{", "global", "$", "APPLICATION", ";", "if", "(", "!", "Loader", "::", "includeModule", "(", "'cluster'...
Installation config to module "cluster". @param InputInterface $input @param OutputInterface $output @param array $cluster @throws \Bitrix\Main\LoaderException @throws \Exception
[ "Installation", "config", "to", "module", "cluster", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Environment/Command/InitCommand.php#L287-L327
188,821
notamedia/console-jedi
src/Environment/Command/InitCommand.php
InitCommand.configureOptions
protected function configureOptions(InputInterface $input, OutputInterface $output, array $options) { if (empty($options)) { return; } foreach ($options as $module => $moduleOptions) { if (!is_array($moduleOptions) || empty($moduleOptions)) { continue...
php
protected function configureOptions(InputInterface $input, OutputInterface $output, array $options) { if (empty($options)) { return; } foreach ($options as $module => $moduleOptions) { if (!is_array($moduleOptions) || empty($moduleOptions)) { continue...
[ "protected", "function", "configureOptions", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ",", "array", "$", "options", ")", "{", "if", "(", "empty", "(", "$", "options", ")", ")", "{", "return", ";", "}", "foreach", "(", "...
Installation of option modules. @param InputInterface $input @param OutputInterface $output @param array $options
[ "Installation", "of", "option", "modules", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Environment/Command/InitCommand.php#L336-L361
188,822
cybercog/youtrack-rest-php
src/HttpClient/GuzzleHttpClient.php
GuzzleHttpClient.appendUserAgent
private function appendUserAgent(array $options): array { $defaultAgent = 'GuzzleHttp/' . Client::VERSION; if (extension_loaded('curl') && function_exists('curl_version')) { $defaultAgent .= ' curl/' . \curl_version()['version']; } $defaultAgent .= ' PHP/' . PHP_VERSION; ...
php
private function appendUserAgent(array $options): array { $defaultAgent = 'GuzzleHttp/' . Client::VERSION; if (extension_loaded('curl') && function_exists('curl_version')) { $defaultAgent .= ' curl/' . \curl_version()['version']; } $defaultAgent .= ' PHP/' . PHP_VERSION; ...
[ "private", "function", "appendUserAgent", "(", "array", "$", "options", ")", ":", "array", "{", "$", "defaultAgent", "=", "'GuzzleHttp/'", ".", "Client", "::", "VERSION", ";", "if", "(", "extension_loaded", "(", "'curl'", ")", "&&", "function_exists", "(", "...
Append User-Agent header to Request options. @param array $options @return array
[ "Append", "User", "-", "Agent", "header", "to", "Request", "options", "." ]
28ed6eacf505a13966e49b2f3dae9027c7d3f213
https://github.com/cybercog/youtrack-rest-php/blob/28ed6eacf505a13966e49b2f3dae9027c7d3f213/src/HttpClient/GuzzleHttpClient.php#L92-L107
188,823
notamedia/console-jedi
src/Agent/AgentTask.php
AgentTask.convertation
protected function convertation() { if ($this->executionTime instanceof DateTime) { $this->executionTime = $this->executionTime->toString(); } elseif ($this->executionTime === null) { $time = new DateTime(); $this->executionTime = $time->toString(); } ...
php
protected function convertation() { if ($this->executionTime instanceof DateTime) { $this->executionTime = $this->executionTime->toString(); } elseif ($this->executionTime === null) { $time = new DateTime(); $this->executionTime = $time->toString(); } ...
[ "protected", "function", "convertation", "(", ")", "{", "if", "(", "$", "this", "->", "executionTime", "instanceof", "DateTime", ")", "{", "$", "this", "->", "executionTime", "=", "$", "this", "->", "executionTime", "->", "toString", "(", ")", ";", "}", ...
Convertation property for creation agent in queue through the old and dirty Bitrix API.
[ "Convertation", "property", "for", "creation", "agent", "in", "queue", "through", "the", "old", "and", "dirty", "Bitrix", "API", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Agent/AgentTask.php#L198-L214
188,824
notamedia/console-jedi
src/Agent/AgentTask.php
AgentTask.create
public function create($checkExist = false) { $this->convertation(); $model = new \CAgent; return $model->AddAgent( AgentHelper::createName($this->class, $this->constructorArgs, $this->callChain), $this->module, $this->periodically, $this->in...
php
public function create($checkExist = false) { $this->convertation(); $model = new \CAgent; return $model->AddAgent( AgentHelper::createName($this->class, $this->constructorArgs, $this->callChain), $this->module, $this->periodically, $this->in...
[ "public", "function", "create", "(", "$", "checkExist", "=", "false", ")", "{", "$", "this", "->", "convertation", "(", ")", ";", "$", "model", "=", "new", "\\", "CAgent", ";", "return", "$", "model", "->", "AddAgent", "(", "AgentHelper", "::", "create...
Create agent in Bitrix queue. @param bool $checkExist Return false and set `CAdminException`, if agent already exist. @return bool|int ID of agent or false if `$checkExist` is true and agent already exist.
[ "Create", "agent", "in", "Bitrix", "queue", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Agent/AgentTask.php#L223-L241
188,825
socialite-manager/socialite
src/SessionTrait.php
SessionTrait.setSessionData
protected function setSessionData(string $key, $val) { if (method_exists($this->getSession(), 'put')) { return $this->getSession()->put($key, $val); } elseif (method_exists($this->getSession(), 'set')) { return $this->getSession()->set($key, $val); } elseif (method_ex...
php
protected function setSessionData(string $key, $val) { if (method_exists($this->getSession(), 'put')) { return $this->getSession()->put($key, $val); } elseif (method_exists($this->getSession(), 'set')) { return $this->getSession()->set($key, $val); } elseif (method_ex...
[ "protected", "function", "setSessionData", "(", "string", "$", "key", ",", "$", "val", ")", "{", "if", "(", "method_exists", "(", "$", "this", "->", "getSession", "(", ")", ",", "'put'", ")", ")", "{", "return", "$", "this", "->", "getSession", "(", ...
Set Session data @param string $key @param mixed $val @return bool|mixed
[ "Set", "Session", "data" ]
80c3a00f83b12b052cbcebe798f553eb8f735100
https://github.com/socialite-manager/socialite/blob/80c3a00f83b12b052cbcebe798f553eb8f735100/src/SessionTrait.php#L43-L54
188,826
socialite-manager/socialite
src/SessionTrait.php
SessionTrait.getSessionData
protected function getSessionData(string $key) { if (method_exists($this->getSession(), 'get')) { return $this->getSession()->get($key); } elseif (method_exists($this->getSession(), 'read')) { return $this->getSession()->read($key); } return false; }
php
protected function getSessionData(string $key) { if (method_exists($this->getSession(), 'get')) { return $this->getSession()->get($key); } elseif (method_exists($this->getSession(), 'read')) { return $this->getSession()->read($key); } return false; }
[ "protected", "function", "getSessionData", "(", "string", "$", "key", ")", "{", "if", "(", "method_exists", "(", "$", "this", "->", "getSession", "(", ")", ",", "'get'", ")", ")", "{", "return", "$", "this", "->", "getSession", "(", ")", "->", "get", ...
Get Session data @param string $key @return bool|mixed
[ "Get", "Session", "data" ]
80c3a00f83b12b052cbcebe798f553eb8f735100
https://github.com/socialite-manager/socialite/blob/80c3a00f83b12b052cbcebe798f553eb8f735100/src/SessionTrait.php#L62-L71
188,827
cybercog/youtrack-rest-php
src/Authorizer/CookieAuthorizer.php
CookieAuthorizer.appendHeadersTo
public function appendHeadersTo(ClientContract $client): void { $this->authenticator->authenticate($client); $client->withHeader('Cookie', $this->authenticator->token()); }
php
public function appendHeadersTo(ClientContract $client): void { $this->authenticator->authenticate($client); $client->withHeader('Cookie', $this->authenticator->token()); }
[ "public", "function", "appendHeadersTo", "(", "ClientContract", "$", "client", ")", ":", "void", "{", "$", "this", "->", "authenticator", "->", "authenticate", "(", "$", "client", ")", ";", "$", "client", "->", "withHeader", "(", "'Cookie'", ",", "$", "thi...
Append authorization headers to REST client. @param \Cog\Contracts\YouTrack\Rest\Client\Client $client @return void @throws \Cog\Contracts\YouTrack\Rest\Authenticator\Exceptions\AuthenticationException
[ "Append", "authorization", "headers", "to", "REST", "client", "." ]
28ed6eacf505a13966e49b2f3dae9027c7d3f213
https://github.com/cybercog/youtrack-rest-php/blob/28ed6eacf505a13966e49b2f3dae9027c7d3f213/src/Authorizer/CookieAuthorizer.php#L50-L55
188,828
notamedia/console-jedi
src/Agent/AgentHelper.php
AgentHelper.createName
public static function createName($className, array $args = [], array $callChain = []) { $chain = ''; if (!empty($callChain)) { foreach ($callChain as $method => $methodArgs) { if (!is_array($methodArgs)) { throw new ArgumentTypeException('callChain',...
php
public static function createName($className, array $args = [], array $callChain = []) { $chain = ''; if (!empty($callChain)) { foreach ($callChain as $method => $methodArgs) { if (!is_array($methodArgs)) { throw new ArgumentTypeException('callChain',...
[ "public", "static", "function", "createName", "(", "$", "className", ",", "array", "$", "args", "=", "[", "]", ",", "array", "$", "callChain", "=", "[", "]", ")", "{", "$", "chain", "=", "''", ";", "if", "(", "!", "empty", "(", "$", "callChain", ...
Creates and returns agent name by class name and parameters. Use to return this name from the executed method of agent. @param string $className Agent class name. @param array $args Arguments for `__constructor` of agent class. @param array $callChain @return string @throws ArgumentTypeException
[ "Creates", "and", "returns", "agent", "name", "by", "class", "name", "and", "parameters", ".", "Use", "to", "return", "this", "name", "from", "the", "executed", "method", "of", "agent", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Agent/AgentHelper.php#L29-L44
188,829
notamedia/console-jedi
src/Agent/AgentTrait.php
AgentTrait.agent
public static function agent() { static::$constructorArgs = func_get_args(); static::$agentMode = true; $reflection = new \ReflectionClass(get_called_class()); return $reflection->newInstanceArgs(static::$constructorArgs); }
php
public static function agent() { static::$constructorArgs = func_get_args(); static::$agentMode = true; $reflection = new \ReflectionClass(get_called_class()); return $reflection->newInstanceArgs(static::$constructorArgs); }
[ "public", "static", "function", "agent", "(", ")", "{", "static", "::", "$", "constructorArgs", "=", "func_get_args", "(", ")", ";", "static", "::", "$", "agentMode", "=", "true", ";", "$", "reflection", "=", "new", "\\", "ReflectionClass", "(", "get_calle...
Factory method for create object of agent class. Bitrix calls this method to run agent. Your agents should be registered through `\Notamedia\ConsoleJedi\Agent\AgentTask`. All arguments from this method should be duplicated in the object constructor: `agent($arg1, …, $arg2)` → `__construct($arg1, …, $arg2)`. @return ...
[ "Factory", "method", "for", "create", "object", "of", "agent", "class", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Agent/AgentTrait.php#L60-L68
188,830
notamedia/console-jedi
src/Agent/AgentTrait.php
AgentTrait.pingAgent
protected function pingAgent($interval, array $callChain) { if (!$this->isAgentMode()) { return; } $name = $this->getAgentName($callChain); $model = new \CAgent(); $rsAgent = $model->GetList([], ['NAME' => $name]); if ($agent = $rsAgent->Fetch()) { ...
php
protected function pingAgent($interval, array $callChain) { if (!$this->isAgentMode()) { return; } $name = $this->getAgentName($callChain); $model = new \CAgent(); $rsAgent = $model->GetList([], ['NAME' => $name]); if ($agent = $rsAgent->Fetch()) { ...
[ "protected", "function", "pingAgent", "(", "$", "interval", ",", "array", "$", "callChain", ")", "{", "if", "(", "!", "$", "this", "->", "isAgentMode", "(", ")", ")", "{", "return", ";", "}", "$", "name", "=", "$", "this", "->", "getAgentName", "(", ...
Ping from the agent to inform that it still works correctly. Use this method if your agent works more 10 minutes, otherwise Bitrix will be consider your agent as non-working. Usage: ```php public function executeAgent($param1, $param2) { // start a heavy (big) cycle $this->pingAgent(20, ['executeAgent' => [$param1, $...
[ "Ping", "from", "the", "agent", "to", "inform", "that", "it", "still", "works", "correctly", ".", "Use", "this", "method", "if", "your", "agent", "works", "more", "10", "minutes", "otherwise", "Bitrix", "will", "be", "consider", "your", "agent", "as", "non...
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Agent/AgentTrait.php#L89-L111
188,831
notamedia/console-jedi
src/Module/Module.php
Module.register
public function register() { if (!$this->isRegistered()) { $moduleObject =& $this->getObject(); /** * It's important to check if module class defines InstallDB method (it must register module) * Thus absent InstallDB indicates that the module does not suppo...
php
public function register() { if (!$this->isRegistered()) { $moduleObject =& $this->getObject(); /** * It's important to check if module class defines InstallDB method (it must register module) * Thus absent InstallDB indicates that the module does not suppo...
[ "public", "function", "register", "(", ")", "{", "if", "(", "!", "$", "this", "->", "isRegistered", "(", ")", ")", "{", "$", "moduleObject", "=", "&", "$", "this", "->", "getObject", "(", ")", ";", "/**\n * It's important to check if module class d...
Install module. @throws Exception\ModuleException @throws BitrixException
[ "Install", "module", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Module/Module.php#L108-L150
188,832
notamedia/console-jedi
src/Module/Module.php
Module.load
public function load() { if (!$this->isRegistered()) { if (!$this->exist()) { require_once($_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/classes/general/update_client_partner.php'); if (!\CUpdateClientPartner::LoadModuleNoDemand( $this->ge...
php
public function load() { if (!$this->isRegistered()) { if (!$this->exist()) { require_once($_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/classes/general/update_client_partner.php'); if (!\CUpdateClientPartner::LoadModuleNoDemand( $this->ge...
[ "public", "function", "load", "(", ")", "{", "if", "(", "!", "$", "this", "->", "isRegistered", "(", ")", ")", "{", "if", "(", "!", "$", "this", "->", "exist", "(", ")", ")", "{", "require_once", "(", "$", "_SERVER", "[", "\"DOCUMENT_ROOT\"", "]", ...
Download module from Marketplace. @return $this
[ "Download", "module", "from", "Marketplace", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Module/Module.php#L157-L175
188,833
notamedia/console-jedi
src/Module/Module.php
Module.unRegister
public function unRegister() { $moduleObject = $this->getObject(); if ($this->isRegistered()) { /** * It's important to check if module class defines UnInstallDB method (it should unregister module) * Thus absent UnInstallDB indicates that the module does not s...
php
public function unRegister() { $moduleObject = $this->getObject(); if ($this->isRegistered()) { /** * It's important to check if module class defines UnInstallDB method (it should unregister module) * Thus absent UnInstallDB indicates that the module does not s...
[ "public", "function", "unRegister", "(", ")", "{", "$", "moduleObject", "=", "$", "this", "->", "getObject", "(", ")", ";", "if", "(", "$", "this", "->", "isRegistered", "(", ")", ")", "{", "/**\n * It's important to check if module class defines UnIns...
Uninstall module. @throws Exception\ModuleException @throws BitrixException
[ "Uninstall", "module", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Module/Module.php#L183-L223
188,834
notamedia/console-jedi
src/Module/Module.php
Module.remove
public function remove() { if ($this->isRegistered()) { $this->unRegister(); } $path = getLocalPath('modules/' . $this->getName()); if ($path) { (new Filesystem())->remove($_SERVER['DOCUMENT_ROOT'] . $path); } unset($this->object); ...
php
public function remove() { if ($this->isRegistered()) { $this->unRegister(); } $path = getLocalPath('modules/' . $this->getName()); if ($path) { (new Filesystem())->remove($_SERVER['DOCUMENT_ROOT'] . $path); } unset($this->object); ...
[ "public", "function", "remove", "(", ")", "{", "if", "(", "$", "this", "->", "isRegistered", "(", ")", ")", "{", "$", "this", "->", "unRegister", "(", ")", ";", "}", "$", "path", "=", "getLocalPath", "(", "'modules/'", ".", "$", "this", "->", "getN...
Uninstall and remove module directory.
[ "Uninstall", "and", "remove", "module", "directory", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Module/Module.php#L228-L243
188,835
notamedia/console-jedi
src/Module/Module.php
Module.update
public function update(&$modulesUpdated = null) { require_once($_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/classes/general/update_client_partner.php'); if (!$this->isThirdParty()) { throw new Exception\ModuleUpdateException('Kernel module updates are currently not supported.', ...
php
public function update(&$modulesUpdated = null) { require_once($_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/classes/general/update_client_partner.php'); if (!$this->isThirdParty()) { throw new Exception\ModuleUpdateException('Kernel module updates are currently not supported.', ...
[ "public", "function", "update", "(", "&", "$", "modulesUpdated", "=", "null", ")", "{", "require_once", "(", "$", "_SERVER", "[", "\"DOCUMENT_ROOT\"", "]", ".", "'/bitrix/modules/main/classes/general/update_client_partner.php'", ")", ";", "if", "(", "!", "$", "thi...
Update module. It must be called repeatedly until the method returns false. After each call php must be restarted (new process created) to update module class and function definitions. @param array $modulesUpdated [optional] @return bool
[ "Update", "module", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Module/Module.php#L254-L328
188,836
notamedia/console-jedi
src/Module/Module.php
Module.validateUpdate
protected function validateUpdate($updateDir) { $errorMessage = null; if (!\CUpdateClientPartner::CheckUpdatability($updateDir, $errorMessage)) { throw new Exception\ModuleUpdateException('[CL03] CheckUpdatability failed. ' . $errorMessage, $this->getName()); } ...
php
protected function validateUpdate($updateDir) { $errorMessage = null; if (!\CUpdateClientPartner::CheckUpdatability($updateDir, $errorMessage)) { throw new Exception\ModuleUpdateException('[CL03] CheckUpdatability failed. ' . $errorMessage, $this->getName()); } ...
[ "protected", "function", "validateUpdate", "(", "$", "updateDir", ")", "{", "$", "errorMessage", "=", "null", ";", "if", "(", "!", "\\", "CUpdateClientPartner", "::", "CheckUpdatability", "(", "$", "updateDir", ",", "$", "errorMessage", ")", ")", "{", "throw...
Check update files. @param string $updateDir
[ "Check", "update", "files", "." ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Module/Module.php#L335-L350
188,837
socialite-manager/socialite
src/Two/AbstractProvider.php
AbstractProvider.userFromToken
public function userFromToken(string $token) { $user = $this->mapUserToObject($this->getUserByToken($token)); return $user->setToken($token); }
php
public function userFromToken(string $token) { $user = $this->mapUserToObject($this->getUserByToken($token)); return $user->setToken($token); }
[ "public", "function", "userFromToken", "(", "string", "$", "token", ")", "{", "$", "user", "=", "$", "this", "->", "mapUserToObject", "(", "$", "this", "->", "getUserByToken", "(", "$", "token", ")", ")", ";", "return", "$", "user", "->", "setToken", "...
Get a Social User instance from a known access token. @param string $token @return \Socialite\Two\User
[ "Get", "a", "Social", "User", "instance", "from", "a", "known", "access", "token", "." ]
80c3a00f83b12b052cbcebe798f553eb8f735100
https://github.com/socialite-manager/socialite/blob/80c3a00f83b12b052cbcebe798f553eb8f735100/src/Two/AbstractProvider.php#L235-L239
188,838
cybercog/youtrack-rest-php
src/Authenticator/CookieAuthenticator.php
CookieAuthenticator.authenticate
public function authenticate(ClientContract $client): void { if ($this->cookie !== '' || $this->isAuthenticating) { return; } $this->isAuthenticating = true; $response = $client->request('POST', '/user/login', [ 'login' => $this->username, 'passwo...
php
public function authenticate(ClientContract $client): void { if ($this->cookie !== '' || $this->isAuthenticating) { return; } $this->isAuthenticating = true; $response = $client->request('POST', '/user/login', [ 'login' => $this->username, 'passwo...
[ "public", "function", "authenticate", "(", "ClientContract", "$", "client", ")", ":", "void", "{", "if", "(", "$", "this", "->", "cookie", "!==", "''", "||", "$", "this", "->", "isAuthenticating", ")", "{", "return", ";", "}", "$", "this", "->", "isAut...
Authenticate client and returns cookie on success login. @param \Cog\Contracts\YouTrack\Rest\Client\Client $client @return void @throws \Cog\Contracts\YouTrack\Rest\Authenticator\Exceptions\AuthenticationException
[ "Authenticate", "client", "and", "returns", "cookie", "on", "success", "login", "." ]
28ed6eacf505a13966e49b2f3dae9027c7d3f213
https://github.com/cybercog/youtrack-rest-php/blob/28ed6eacf505a13966e49b2f3dae9027c7d3f213/src/Authenticator/CookieAuthenticator.php#L68-L84
188,839
notamedia/console-jedi
src/Application/CanRestartTrait.php
CanRestartTrait.restartScript
protected function restartScript(InputInterface $input, OutputInterface $output) { $proc = popen('php -f ' . join(' ', $GLOBALS['argv']) . ' 2>&1', 'r'); while (!feof($proc)) { $output->write(fread($proc, 4096)); } return pclose($proc); }
php
protected function restartScript(InputInterface $input, OutputInterface $output) { $proc = popen('php -f ' . join(' ', $GLOBALS['argv']) . ' 2>&1', 'r'); while (!feof($proc)) { $output->write(fread($proc, 4096)); } return pclose($proc); }
[ "protected", "function", "restartScript", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ")", "{", "$", "proc", "=", "popen", "(", "'php -f '", ".", "join", "(", "' '", ",", "$", "GLOBALS", "[", "'argv'", "]", ")", ".", "' 2>...
Executes another copy of console process to continue updates We may encounter problems when module update scripts (update.php or update_post.php) requires module files, they are included only once and stay in most early version. Bitrix update system always run update scripts in separate requests to web-server. This en...
[ "Executes", "another", "copy", "of", "console", "process", "to", "continue", "updates" ]
c2af9676e6a068f702b9f587befea8f533d3cffa
https://github.com/notamedia/console-jedi/blob/c2af9676e6a068f702b9f587befea8f533d3cffa/src/Application/CanRestartTrait.php#L32-L40
188,840
voku/email-check
src/voku/helper/EmailCheck.php
EmailCheck.isDnsError
public static function isDnsError(string $domain): bool { if (\function_exists('checkdnsrr')) { /** @noinspection IfReturnReturnSimplificationInspection */ $mxFound = \checkdnsrr($domain . '.', 'MX'); if ($mxFound === true) { return false; } ...
php
public static function isDnsError(string $domain): bool { if (\function_exists('checkdnsrr')) { /** @noinspection IfReturnReturnSimplificationInspection */ $mxFound = \checkdnsrr($domain . '.', 'MX'); if ($mxFound === true) { return false; } ...
[ "public", "static", "function", "isDnsError", "(", "string", "$", "domain", ")", ":", "bool", "{", "if", "(", "\\", "function_exists", "(", "'checkdnsrr'", ")", ")", "{", "/** @noinspection IfReturnReturnSimplificationInspection */", "$", "mxFound", "=", "\\", "ch...
Check if the domain has a MX- or A-record in the DNS. @param string $domain @throws \Exception @return bool
[ "Check", "if", "the", "domain", "has", "a", "MX", "-", "or", "A", "-", "record", "in", "the", "DNS", "." ]
402a24de1ff451b82729c1a72703f43bdc6a0312
https://github.com/voku/email-check/blob/402a24de1ff451b82729c1a72703f43bdc6a0312/src/voku/helper/EmailCheck.php#L46-L65
188,841
voku/email-check
src/voku/helper/EmailCheck.php
EmailCheck.isExampleDomain
public static function isExampleDomain(string $domain): bool { if (self::$domainsExample === null) { self::$domainsExample = self::getData('domainsExample'); } if (\in_array($domain, self::$domainsExample, true)) { return true; } return false; }
php
public static function isExampleDomain(string $domain): bool { if (self::$domainsExample === null) { self::$domainsExample = self::getData('domainsExample'); } if (\in_array($domain, self::$domainsExample, true)) { return true; } return false; }
[ "public", "static", "function", "isExampleDomain", "(", "string", "$", "domain", ")", ":", "bool", "{", "if", "(", "self", "::", "$", "domainsExample", "===", "null", ")", "{", "self", "::", "$", "domainsExample", "=", "self", "::", "getData", "(", "'dom...
Check if the domain is a example domain. @param string $domain @return bool
[ "Check", "if", "the", "domain", "is", "a", "example", "domain", "." ]
402a24de1ff451b82729c1a72703f43bdc6a0312
https://github.com/voku/email-check/blob/402a24de1ff451b82729c1a72703f43bdc6a0312/src/voku/helper/EmailCheck.php#L74-L85
188,842
voku/email-check
src/voku/helper/EmailCheck.php
EmailCheck.isTemporaryDomain
public static function isTemporaryDomain(string $domain): bool { if (self::$domainsTemporary === null) { self::$domainsTemporary = self::getData('domainsTemporary'); } if (\in_array($domain, self::$domainsTemporary, true)) { return true; } if (\preg_...
php
public static function isTemporaryDomain(string $domain): bool { if (self::$domainsTemporary === null) { self::$domainsTemporary = self::getData('domainsTemporary'); } if (\in_array($domain, self::$domainsTemporary, true)) { return true; } if (\preg_...
[ "public", "static", "function", "isTemporaryDomain", "(", "string", "$", "domain", ")", ":", "bool", "{", "if", "(", "self", "::", "$", "domainsTemporary", "===", "null", ")", "{", "self", "::", "$", "domainsTemporary", "=", "self", "::", "getData", "(", ...
Check if the domain is a temporary domain. @param string $domain @return bool
[ "Check", "if", "the", "domain", "is", "a", "temporary", "domain", "." ]
402a24de1ff451b82729c1a72703f43bdc6a0312
https://github.com/voku/email-check/blob/402a24de1ff451b82729c1a72703f43bdc6a0312/src/voku/helper/EmailCheck.php#L94-L109
188,843
voku/email-check
src/voku/helper/EmailCheck.php
EmailCheck.isTypoInDomain
public static function isTypoInDomain(string $domain): bool { if (self::$domainsTypo === null) { self::$domainsTypo = self::getData('domainsTypo'); } if (\in_array($domain, self::$domainsTypo, true)) { return true; } return false; }
php
public static function isTypoInDomain(string $domain): bool { if (self::$domainsTypo === null) { self::$domainsTypo = self::getData('domainsTypo'); } if (\in_array($domain, self::$domainsTypo, true)) { return true; } return false; }
[ "public", "static", "function", "isTypoInDomain", "(", "string", "$", "domain", ")", ":", "bool", "{", "if", "(", "self", "::", "$", "domainsTypo", "===", "null", ")", "{", "self", "::", "$", "domainsTypo", "=", "self", "::", "getData", "(", "'domainsTyp...
Check if the domain has a typo. @param string $domain @return bool
[ "Check", "if", "the", "domain", "has", "a", "typo", "." ]
402a24de1ff451b82729c1a72703f43bdc6a0312
https://github.com/voku/email-check/blob/402a24de1ff451b82729c1a72703f43bdc6a0312/src/voku/helper/EmailCheck.php#L118-L129
188,844
voku/email-check
src/voku/helper/EmailCheck.php
EmailCheck.isValid
public static function isValid(string $email, bool $useExampleDomainCheck = false, bool $useTypoInDomainCheck = false, bool $useTemporaryDomainCheck = false, bool $useDnsCheck = false): bool { if (!isset($email[0])) { return false; } // make sure string length is limited to avoi...
php
public static function isValid(string $email, bool $useExampleDomainCheck = false, bool $useTypoInDomainCheck = false, bool $useTemporaryDomainCheck = false, bool $useDnsCheck = false): bool { if (!isset($email[0])) { return false; } // make sure string length is limited to avoi...
[ "public", "static", "function", "isValid", "(", "string", "$", "email", ",", "bool", "$", "useExampleDomainCheck", "=", "false", ",", "bool", "$", "useTypoInDomainCheck", "=", "false", ",", "bool", "$", "useTemporaryDomainCheck", "=", "false", ",", "bool", "$"...
Check if the email is valid. @param string $email @param bool $useExampleDomainCheck @param bool $useTypoInDomainCheck @param bool $useTemporaryDomainCheck @param bool $useDnsCheck (do not use, if you don't need it) @return bool
[ "Check", "if", "the", "email", "is", "valid", "." ]
402a24de1ff451b82729c1a72703f43bdc6a0312
https://github.com/voku/email-check/blob/402a24de1ff451b82729c1a72703f43bdc6a0312/src/voku/helper/EmailCheck.php#L142-L248
188,845
ozdemirburak/skyscanner-php
src/Traits/ConsoleTrait.php
ConsoleTrait.printSuccessMessage
public function printSuccessMessage($joinString, $force = true): void { if ($this->isPrintable($force)) { $this->printMessage(implode(': ', ['Success', $joinString]), 'info'); } }
php
public function printSuccessMessage($joinString, $force = true): void { if ($this->isPrintable($force)) { $this->printMessage(implode(': ', ['Success', $joinString]), 'info'); } }
[ "public", "function", "printSuccessMessage", "(", "$", "joinString", ",", "$", "force", "=", "true", ")", ":", "void", "{", "if", "(", "$", "this", "->", "isPrintable", "(", "$", "force", ")", ")", "{", "$", "this", "->", "printMessage", "(", "implode"...
Print error message @param $joinString @param bool $force
[ "Print", "error", "message" ]
ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee
https://github.com/ozdemirburak/skyscanner-php/blob/ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee/src/Traits/ConsoleTrait.php#L72-L77
188,846
ozdemirburak/skyscanner-php
src/Traits/ConsoleTrait.php
ConsoleTrait.printMessage
public function printMessage($string, $type = 'comment', $force = true): void { if ($this->isPrintable($force)) { echo $this->getMessageWithColor($string, $this->getMessageBackgroundColor($type)); echo "\n"; } }
php
public function printMessage($string, $type = 'comment', $force = true): void { if ($this->isPrintable($force)) { echo $this->getMessageWithColor($string, $this->getMessageBackgroundColor($type)); echo "\n"; } }
[ "public", "function", "printMessage", "(", "$", "string", ",", "$", "type", "=", "'comment'", ",", "$", "force", "=", "true", ")", ":", "void", "{", "if", "(", "$", "this", "->", "isPrintable", "(", "$", "force", ")", ")", "{", "echo", "$", "this",...
Pretty print information messages to console @param string $string @param string $type @param bool $force
[ "Pretty", "print", "information", "messages", "to", "console" ]
ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee
https://github.com/ozdemirburak/skyscanner-php/blob/ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee/src/Traits/ConsoleTrait.php#L99-L105
188,847
ozdemirburak/skyscanner-php
src/Traits/ImageTrait.php
ImageTrait.saveImage
public function saveImage($imagePath, $saveDirPath, $separator = '-'): string { if (strpos($image = str_replace(' ', '%20', $imagePath), DIRECTORY_SEPARATOR) !== false) { $filename = str_replace('%20', $separator, pathinfo($image, PATHINFO_BASENAME)); if (!empty($filename)) { ...
php
public function saveImage($imagePath, $saveDirPath, $separator = '-'): string { if (strpos($image = str_replace(' ', '%20', $imagePath), DIRECTORY_SEPARATOR) !== false) { $filename = str_replace('%20', $separator, pathinfo($image, PATHINFO_BASENAME)); if (!empty($filename)) { ...
[ "public", "function", "saveImage", "(", "$", "imagePath", ",", "$", "saveDirPath", ",", "$", "separator", "=", "'-'", ")", ":", "string", "{", "if", "(", "strpos", "(", "$", "image", "=", "str_replace", "(", "' '", ",", "'%20'", ",", "$", "imagePath", ...
Save image to specified path and return the full path with image name and extension @param $imagePath @param $saveDirPath @param string $separator @return string
[ "Save", "image", "to", "specified", "path", "and", "return", "the", "full", "path", "with", "image", "name", "and", "extension" ]
ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee
https://github.com/ozdemirburak/skyscanner-php/blob/ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee/src/Traits/ImageTrait.php#L23-L50
188,848
ozdemirburak/skyscanner-php
src/Travel/Flights/LivePricing.php
LivePricing.getFlights
public function getFlights($onlyFirstAgentPerItinerary = true): array { if ($this->init()) { $this->flights = []; $this->addItineraries($onlyFirstAgentPerItinerary); $this->beautifyFlights($onlyFirstAgentPerItinerary); } else { $this->printErrorMessage...
php
public function getFlights($onlyFirstAgentPerItinerary = true): array { if ($this->init()) { $this->flights = []; $this->addItineraries($onlyFirstAgentPerItinerary); $this->beautifyFlights($onlyFirstAgentPerItinerary); } else { $this->printErrorMessage...
[ "public", "function", "getFlights", "(", "$", "onlyFirstAgentPerItinerary", "=", "true", ")", ":", "array", "{", "if", "(", "$", "this", "->", "init", "(", ")", ")", "{", "$", "this", "->", "flights", "=", "[", "]", ";", "$", "this", "->", "addItiner...
Get modified data where the each agent and carrier is assigned to each itinerary If you only want to get get the first one, it will remove Agents property Whereas Agent property will hold the first agent within the array sorted with given sorttype property @param bool $onlyFirstAgentPerItinerary @return array @throws...
[ "Get", "modified", "data", "where", "the", "each", "agent", "and", "carrier", "is", "assigned", "to", "each", "itinerary", "If", "you", "only", "want", "to", "get", "get", "the", "first", "one", "it", "will", "remove", "Agents", "property", "Whereas", "Age...
ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee
https://github.com/ozdemirburak/skyscanner-php/blob/ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee/src/Travel/Flights/LivePricing.php#L318-L328
188,849
ozdemirburak/skyscanner-php
src/Travel/Flights/LivePricing.php
LivePricing.beautifyFlights
private function beautifyFlights($onlyFirstAgentPerItinerary): void { [$agents, $carriers, $legs] = $this->getMeta(); foreach ($this->flights as &$flight) { // Find and assign each agent by ID foreach ($flight['Agents'] as $key => &$flightAgent) { $agent = $ag...
php
private function beautifyFlights($onlyFirstAgentPerItinerary): void { [$agents, $carriers, $legs] = $this->getMeta(); foreach ($this->flights as &$flight) { // Find and assign each agent by ID foreach ($flight['Agents'] as $key => &$flightAgent) { $agent = $ag...
[ "private", "function", "beautifyFlights", "(", "$", "onlyFirstAgentPerItinerary", ")", ":", "void", "{", "[", "$", "agents", ",", "$", "carriers", ",", "$", "legs", "]", "=", "$", "this", "->", "getMeta", "(", ")", ";", "foreach", "(", "$", "this", "->...
Assign flight specific agents, carriers and legs to the each @param bool $onlyFirstAgentPerItinerary @throws \GuzzleHttp\Exception\GuzzleException
[ "Assign", "flight", "specific", "agents", "carriers", "and", "legs", "to", "the", "each" ]
ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee
https://github.com/ozdemirburak/skyscanner-php/blob/ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee/src/Travel/Flights/LivePricing.php#L389-L423
188,850
ozdemirburak/skyscanner-php
src/PlacesService.php
PlacesService.get
public function get() { $data = $this->request(implode('/', [$this->url, 'geo', 'v1.0'])); if (empty($data)) { throw new RestrictedMethodException(implode(' ', [ 'You don\'t have the permission to call this method.', 'For more information, contact with Sky...
php
public function get() { $data = $this->request(implode('/', [$this->url, 'geo', 'v1.0'])); if (empty($data)) { throw new RestrictedMethodException(implode(' ', [ 'You don\'t have the permission to call this method.', 'For more information, contact with Sky...
[ "public", "function", "get", "(", ")", "{", "$", "data", "=", "$", "this", "->", "request", "(", "implode", "(", "'/'", ",", "[", "$", "this", "->", "url", ",", "'geo'", ",", "'v1.0'", "]", ")", ")", ";", "if", "(", "empty", "(", "$", "data", ...
Get the full list of all the places that SkyScanner supports. You need to contact and grant permission from SkyScanner to use this method https://partners.skyscanner.net/contact/ @return mixed @throws \OzdemirBurak\SkyScanner\Exceptions\RestrictedMethodException @throws \GuzzleHttp\Exception\GuzzleException
[ "Get", "the", "full", "list", "of", "all", "the", "places", "that", "SkyScanner", "supports", ".", "You", "need", "to", "contact", "and", "grant", "permission", "from", "SkyScanner", "to", "use", "this", "method" ]
ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee
https://github.com/ozdemirburak/skyscanner-php/blob/ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee/src/PlacesService.php#L32-L42
188,851
ozdemirburak/skyscanner-php
src/PlacesService.php
PlacesService.getList
public function getList($country, $currency, $locale, $query) { $url = implode('/', [$this->url, 'autosuggest', 'v1.0', $country, $currency, $locale]); $data = $this->request($url, compact('query')); return $data->Places ?? []; }
php
public function getList($country, $currency, $locale, $query) { $url = implode('/', [$this->url, 'autosuggest', 'v1.0', $country, $currency, $locale]); $data = $this->request($url, compact('query')); return $data->Places ?? []; }
[ "public", "function", "getList", "(", "$", "country", ",", "$", "currency", ",", "$", "locale", ",", "$", "query", ")", "{", "$", "url", "=", "implode", "(", "'/'", ",", "[", "$", "this", "->", "url", ",", "'autosuggest'", ",", "'v1.0'", ",", "$", ...
Get a list of places that match a query string. @param string $country @param string $currency @param string $locale @param string $query @return mixed @throws \GuzzleHttp\Exception\GuzzleException
[ "Get", "a", "list", "of", "places", "that", "match", "a", "query", "string", "." ]
ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee
https://github.com/ozdemirburak/skyscanner-php/blob/ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee/src/PlacesService.php#L55-L60
188,852
ozdemirburak/skyscanner-php
src/PlacesService.php
PlacesService.getInformation
public function getInformation($market, $currency, $locale, $id) { $url = implode('/', [$this->url, 'autosuggest', 'v1.0', $market, $currency, $locale]); $data = $this->request($url, compact('id')); return $data->Places ?? []; }
php
public function getInformation($market, $currency, $locale, $id) { $url = implode('/', [$this->url, 'autosuggest', 'v1.0', $market, $currency, $locale]); $data = $this->request($url, compact('id')); return $data->Places ?? []; }
[ "public", "function", "getInformation", "(", "$", "market", ",", "$", "currency", ",", "$", "locale", ",", "$", "id", ")", "{", "$", "url", "=", "implode", "(", "'/'", ",", "[", "$", "this", "->", "url", ",", "'autosuggest'", ",", "'v1.0'", ",", "$...
Get information about a country, city or airport using its ID. @param string $market @param string $currency @param string $locale @param string $id @return mixed @throws \GuzzleHttp\Exception\GuzzleException
[ "Get", "information", "about", "a", "country", "city", "or", "airport", "using", "its", "ID", "." ]
ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee
https://github.com/ozdemirburak/skyscanner-php/blob/ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee/src/PlacesService.php#L73-L78
188,853
ozdemirburak/skyscanner-php
src/TravelService.php
TravelService.get
public function get($property = null, $reset = false) { if (empty($this->data) || $reset === true) { $this->makeRequest($this->getUrl(), 'GET'); $this->data = $this->getResponseBody(); } if ($property !== null) { return $this->data->{$property} ?? []; ...
php
public function get($property = null, $reset = false) { if (empty($this->data) || $reset === true) { $this->makeRequest($this->getUrl(), 'GET'); $this->data = $this->getResponseBody(); } if ($property !== null) { return $this->data->{$property} ?? []; ...
[ "public", "function", "get", "(", "$", "property", "=", "null", ",", "$", "reset", "=", "false", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "data", ")", "||", "$", "reset", "===", "true", ")", "{", "$", "this", "->", "makeRequest", "("...
Just return data property without doing any modifications to the original one @param string $property @param bool $reset @return mixed @throws \GuzzleHttp\Exception\GuzzleException
[ "Just", "return", "data", "property", "without", "doing", "any", "modifications", "to", "the", "original", "one" ]
ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee
https://github.com/ozdemirburak/skyscanner-php/blob/ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee/src/TravelService.php#L180-L190
188,854
ozdemirburak/skyscanner-php
src/TravelService.php
TravelService.getResponseHeader
public function getResponseHeader($key, $first = true): string { $header = $this->response->getHeader($key); $headerFirst = $header[0] ?? ''; return $first ? $headerFirst : $header; }
php
public function getResponseHeader($key, $first = true): string { $header = $this->response->getHeader($key); $headerFirst = $header[0] ?? ''; return $first ? $headerFirst : $header; }
[ "public", "function", "getResponseHeader", "(", "$", "key", ",", "$", "first", "=", "true", ")", ":", "string", "{", "$", "header", "=", "$", "this", "->", "response", "->", "getHeader", "(", "$", "key", ")", ";", "$", "headerFirst", "=", "$", "heade...
Returns specific response header defined by key @param $key @param bool $first @return string
[ "Returns", "specific", "response", "header", "defined", "by", "key" ]
ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee
https://github.com/ozdemirburak/skyscanner-php/blob/ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee/src/TravelService.php#L267-L272
188,855
ozdemirburak/skyscanner-php
src/TravelService.php
TravelService.getSessionId
protected function getSessionId($url, $method = 'POST') { if ($this->makeRequest($url, $method) === false) { $this->printErrorMessage('Could not fetch a valid session id.'); return false; } $location = $this->getResponseHeader('Location'); $locationParameters ...
php
protected function getSessionId($url, $method = 'POST') { if ($this->makeRequest($url, $method) === false) { $this->printErrorMessage('Could not fetch a valid session id.'); return false; } $location = $this->getResponseHeader('Location'); $locationParameters ...
[ "protected", "function", "getSessionId", "(", "$", "url", ",", "$", "method", "=", "'POST'", ")", "{", "if", "(", "$", "this", "->", "makeRequest", "(", "$", "url", ",", "$", "method", ")", "===", "false", ")", "{", "$", "this", "->", "printErrorMess...
If you make too many requests, then you will probably have issues on rate limiting. So, until a non-empty location is received, it will make a request to get a session key. In other words, until the rate limit is reset, it will make a request to obtain a session key @param string $url @param string $method Message: ...
[ "If", "you", "make", "too", "many", "requests", "then", "you", "will", "probably", "have", "issues", "on", "rate", "limiting", ".", "So", "until", "a", "non", "-", "empty", "location", "is", "received", "it", "will", "make", "a", "request", "to", "get", ...
ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee
https://github.com/ozdemirburak/skyscanner-php/blob/ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee/src/TravelService.php#L298-L312
188,856
ozdemirburak/skyscanner-php
src/TravelService.php
TravelService.getUri
public function getUri(): string { foreach ($this->getParameterArray() as $parameter) { if (property_exists($this, $parameter)) { if (isset($this->$parameter)) { $this->uri = str_replace('{' . $parameter . '}', $this->$parameter, $this->uri); }...
php
public function getUri(): string { foreach ($this->getParameterArray() as $parameter) { if (property_exists($this, $parameter)) { if (isset($this->$parameter)) { $this->uri = str_replace('{' . $parameter . '}', $this->$parameter, $this->uri); }...
[ "public", "function", "getUri", "(", ")", ":", "string", "{", "foreach", "(", "$", "this", "->", "getParameterArray", "(", ")", "as", "$", "parameter", ")", "{", "if", "(", "property_exists", "(", "$", "this", ",", "$", "parameter", ")", ")", "{", "i...
Create direct query link via replacing uri @return string
[ "Create", "direct", "query", "link", "via", "replacing", "uri" ]
ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee
https://github.com/ozdemirburak/skyscanner-php/blob/ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee/src/TravelService.php#L343-L358
188,857
ozdemirburak/skyscanner-php
src/TravelService.php
TravelService.getParameters
public function getParameters(array $parameters = []): array { foreach (array_merge($parameters, $this->getParameterArray()) as $parameter) { if (isset($this->$parameter)) { $parameters[$parameter] = $this->$parameter; } } foreach ($this->extraParamete...
php
public function getParameters(array $parameters = []): array { foreach (array_merge($parameters, $this->getParameterArray()) as $parameter) { if (isset($this->$parameter)) { $parameters[$parameter] = $this->$parameter; } } foreach ($this->extraParamete...
[ "public", "function", "getParameters", "(", "array", "$", "parameters", "=", "[", "]", ")", ":", "array", "{", "foreach", "(", "array_merge", "(", "$", "parameters", ",", "$", "this", "->", "getParameterArray", "(", ")", ")", "as", "$", "parameter", ")",...
Get parameter array to create query string from parameters @param array $parameters @return array
[ "Get", "parameter", "array", "to", "create", "query", "string", "from", "parameters" ]
ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee
https://github.com/ozdemirburak/skyscanner-php/blob/ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee/src/TravelService.php#L367-L378
188,858
ozdemirburak/skyscanner-php
src/TravelService.php
TravelService.arraySearch
protected function arraySearch($needle, $haystack, $property) { return array_search($needle, array_map(function ($value) use ($property) { return \is_object($value) ? $value->$property : $value[$property]; }, $haystack), true); }
php
protected function arraySearch($needle, $haystack, $property) { return array_search($needle, array_map(function ($value) use ($property) { return \is_object($value) ? $value->$property : $value[$property]; }, $haystack), true); }
[ "protected", "function", "arraySearch", "(", "$", "needle", ",", "$", "haystack", ",", "$", "property", ")", "{", "return", "array_search", "(", "$", "needle", ",", "array_map", "(", "function", "(", "$", "value", ")", "use", "(", "$", "property", ")", ...
Helper method for array search to locate the property with the given property @param $needle @param $haystack @param $property @return false|int|string
[ "Helper", "method", "for", "array", "search", "to", "locate", "the", "property", "with", "the", "given", "property" ]
ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee
https://github.com/ozdemirburak/skyscanner-php/blob/ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee/src/TravelService.php#L414-L419
188,859
ozdemirburak/skyscanner-php
src/Travel/Flights/BrowseCache.php
BrowseCache.addDates
protected function addDates(array $dates = []) { foreach (['OutboundDates', 'InboundDates'] as $date) { if (!empty($this->data->Dates->$date)) { foreach ($this->data->Dates->$date as $key => $datum) { $dates[$key] = $this->syncQuotes($datum, [], 'QuoteIds'); ...
php
protected function addDates(array $dates = []) { foreach (['OutboundDates', 'InboundDates'] as $date) { if (!empty($this->data->Dates->$date)) { foreach ($this->data->Dates->$date as $key => $datum) { $dates[$key] = $this->syncQuotes($datum, [], 'QuoteIds'); ...
[ "protected", "function", "addDates", "(", "array", "$", "dates", "=", "[", "]", ")", "{", "foreach", "(", "[", "'OutboundDates'", ",", "'InboundDates'", "]", "as", "$", "date", ")", "{", "if", "(", "!", "empty", "(", "$", "this", "->", "data", "->", ...
Get the cheapest price from one place to another for each day of a given month Get the cheapest price from one place to another for each month within the next year Case I: Find me the cheapest prices from Edinburgh to London in the next year. This gives the cheapest known price for each month of the coming year. Case...
[ "Get", "the", "cheapest", "price", "from", "one", "place", "to", "another", "for", "each", "day", "of", "a", "given", "month", "Get", "the", "cheapest", "price", "from", "one", "place", "to", "another", "for", "each", "month", "within", "the", "next", "y...
ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee
https://github.com/ozdemirburak/skyscanner-php/blob/ff557f3555e63bcccaf7c44ff1a3f1ff52bf3cee/src/Travel/Flights/BrowseCache.php#L224-L234
188,860
unicodeveloper/laravel-email-validator
src/EmailValidator.php
EmailValidator.setClient
public function setClient() { if(empty($this->apiKey)) { throw new InvalidArgumentException('Api key can not be empty'); } $this->client = new Client($this->apiKey); }
php
public function setClient() { if(empty($this->apiKey)) { throw new InvalidArgumentException('Api key can not be empty'); } $this->client = new Client($this->apiKey); }
[ "public", "function", "setClient", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "apiKey", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'Api key can not be empty'", ")", ";", "}", "$", "this", "->", "client", "=", "new", ...
Instantiate QuickEmailVerification Client with api Key @return void
[ "Instantiate", "QuickEmailVerification", "Client", "with", "api", "Key" ]
2a3057e36f89703b37e29382f63b163f9b34535e
https://github.com/unicodeveloper/laravel-email-validator/blob/2a3057e36f89703b37e29382f63b163f9b34535e/src/EmailValidator.php#L66-L74
188,861
unicodeveloper/laravel-email-validator
src/EmailValidator.php
EmailValidator.verify
public function verify($emailAddress) { $this->response = $this->client->quickemailverification()->verify($emailAddress); return $this; }
php
public function verify($emailAddress) { $this->response = $this->client->quickemailverification()->verify($emailAddress); return $this; }
[ "public", "function", "verify", "(", "$", "emailAddress", ")", "{", "$", "this", "->", "response", "=", "$", "this", "->", "client", "->", "quickemailverification", "(", ")", "->", "verify", "(", "$", "emailAddress", ")", ";", "return", "$", "this", ";",...
Verifies email Address and returns an API Object response @param string $emailAddress @return instance
[ "Verifies", "email", "Address", "and", "returns", "an", "API", "Object", "response" ]
2a3057e36f89703b37e29382f63b163f9b34535e
https://github.com/unicodeveloper/laravel-email-validator/blob/2a3057e36f89703b37e29382f63b163f9b34535e/src/EmailValidator.php#L81-L86
188,862
panique/pdo-debug
pdo-debug.php
PdoDebugger.show
static public function show($raw_sql, $parameters) { $keys = array(); $values = array(); /* * Get longest keys first, sot the regex replacement doesn't * cut markers (ex : replace ":username" with "'joe'name" * if we have a param name :user ) */ $...
php
static public function show($raw_sql, $parameters) { $keys = array(); $values = array(); /* * Get longest keys first, sot the regex replacement doesn't * cut markers (ex : replace ":username" with "'joe'name" * if we have a param name :user ) */ $...
[ "static", "public", "function", "show", "(", "$", "raw_sql", ",", "$", "parameters", ")", "{", "$", "keys", "=", "array", "(", ")", ";", "$", "values", "=", "array", "(", ")", ";", "/*\n * Get longest keys first, sot the regex replacement doesn't\n ...
Returns the emulated SQL string @param $raw_sql @param $parameters @return mixed
[ "Returns", "the", "emulated", "SQL", "string" ]
ea1b5534b5ea47f9c1a126d46264e5e92417a640
https://github.com/panique/pdo-debug/blob/ea1b5534b5ea47f9c1a126d46264e5e92417a640/pdo-debug.php#L17-L61
188,863
Algo-Web/POData-Laravel
src/Serialisers/ModelSerialiser.php
ModelSerialiser.bulkSerialise
public function bulkSerialise($model) { $class = get_class($model); if (!$model instanceof Model) { throw new InvalidOperationException($class); } // dig up metadata if (!isset(self::$metadataCache[$class])) { self::$metadataCache[$class] = $model->met...
php
public function bulkSerialise($model) { $class = get_class($model); if (!$model instanceof Model) { throw new InvalidOperationException($class); } // dig up metadata if (!isset(self::$metadataCache[$class])) { self::$metadataCache[$class] = $model->met...
[ "public", "function", "bulkSerialise", "(", "$", "model", ")", "{", "$", "class", "=", "get_class", "(", "$", "model", ")", ";", "if", "(", "!", "$", "model", "instanceof", "Model", ")", "{", "throw", "new", "InvalidOperationException", "(", "$", "class"...
Serialise needed bits of supplied model, taking fast path where possible. @param $model @return mixed
[ "Serialise", "needed", "bits", "of", "supplied", "model", "taking", "fast", "path", "where", "possible", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Serialisers/ModelSerialiser.php#L29-L66
188,864
BeatSwitch/lock-laravel
src/LockServiceProvider.php
LockServiceProvider.registerManager
protected function registerManager() { $this->app->singleton(Manager::class, function () { $manager = new Manager($this->driver()); // If we're using the array driver, we'll try to bootstrap the permissions from the config file. if ($manager->getDriver() instanceof Array...
php
protected function registerManager() { $this->app->singleton(Manager::class, function () { $manager = new Manager($this->driver()); // If we're using the array driver, we'll try to bootstrap the permissions from the config file. if ($manager->getDriver() instanceof Array...
[ "protected", "function", "registerManager", "(", ")", "{", "$", "this", "->", "app", "->", "singleton", "(", "Manager", "::", "class", ",", "function", "(", ")", "{", "$", "manager", "=", "new", "Manager", "(", "$", "this", "->", "driver", "(", ")", ...
This method will register the lock manager instance
[ "This", "method", "will", "register", "the", "lock", "manager", "instance" ]
4f891c222c2ac59cd2634ca2eab32df3241f1665
https://github.com/BeatSwitch/lock-laravel/blob/4f891c222c2ac59cd2634ca2eab32df3241f1665/src/LockServiceProvider.php#L39-L57
188,865
BeatSwitch/lock-laravel
src/LockServiceProvider.php
LockServiceProvider.registerAuthenticatedUserLock
protected function registerAuthenticatedUserLock() { $this->app->singleton(Lock::class, function($app) { return new UserLock($app[Manager::class], $app['auth.driver'], config('lock.user_caller_type')); }); }
php
protected function registerAuthenticatedUserLock() { $this->app->singleton(Lock::class, function($app) { return new UserLock($app[Manager::class], $app['auth.driver'], config('lock.user_caller_type')); }); }
[ "protected", "function", "registerAuthenticatedUserLock", "(", ")", "{", "$", "this", "->", "app", "->", "singleton", "(", "Lock", "::", "class", ",", "function", "(", "$", "app", ")", "{", "return", "new", "UserLock", "(", "$", "app", "[", "Manager", ":...
This will register the lock instance for the authenticated user
[ "This", "will", "register", "the", "lock", "instance", "for", "the", "authenticated", "user" ]
4f891c222c2ac59cd2634ca2eab32df3241f1665
https://github.com/BeatSwitch/lock-laravel/blob/4f891c222c2ac59cd2634ca2eab32df3241f1665/src/LockServiceProvider.php#L79-L84
188,866
Algo-Web/POData-Laravel
src/Query/LaravelExpressionProvider.php
LaravelExpressionProvider.setResourceType
public function setResourceType(ResourceType $resourceType) { $this->iteratorName = '$' . $resourceType->getName(); $this->resourceType = $resourceType; }
php
public function setResourceType(ResourceType $resourceType) { $this->iteratorName = '$' . $resourceType->getName(); $this->resourceType = $resourceType; }
[ "public", "function", "setResourceType", "(", "ResourceType", "$", "resourceType", ")", "{", "$", "this", "->", "iteratorName", "=", "'$'", ".", "$", "resourceType", "->", "getName", "(", ")", ";", "$", "this", "->", "resourceType", "=", "$", "resourceType",...
call-back for setting the resource type. @param ResourceType $resourceType The resource type on which the filter is going to be applied
[ "call", "-", "back", "for", "setting", "the", "resource", "type", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Query/LaravelExpressionProvider.php#L157-L161
188,867
Algo-Web/POData-Laravel
src/Query/LaravelExpressionProvider.php
LaravelExpressionProvider.onLogicalExpression
public function onLogicalExpression($expressionType, $left, $right) { $type = $this->unpackExpressionType($expressionType); switch ($type) { case ExpressionType::AND_LOGICAL: return $this->prepareBinaryExpression(self::LOGICAL_AND, $left, $right); case Express...
php
public function onLogicalExpression($expressionType, $left, $right) { $type = $this->unpackExpressionType($expressionType); switch ($type) { case ExpressionType::AND_LOGICAL: return $this->prepareBinaryExpression(self::LOGICAL_AND, $left, $right); case Express...
[ "public", "function", "onLogicalExpression", "(", "$", "expressionType", ",", "$", "left", ",", "$", "right", ")", "{", "$", "type", "=", "$", "this", "->", "unpackExpressionType", "(", "$", "expressionType", ")", ";", "switch", "(", "$", "type", ")", "{...
Call-back for logical expression. @param ExpressionType $expressionType The type of logical expression @param string $left The left expression @param string $right The left expression @return string
[ "Call", "-", "back", "for", "logical", "expression", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Query/LaravelExpressionProvider.php#L171-L182
188,868
Algo-Web/POData-Laravel
src/Query/LaravelExpressionProvider.php
LaravelExpressionProvider.onArithmeticExpression
public function onArithmeticExpression($expressionType, $left, $right) { $type = $this->unpackExpressionType($expressionType); switch ($type) { case ExpressionType::MULTIPLY: return $this->prepareBinaryExpression(self::MULTIPLY, $left, $right); case Expression...
php
public function onArithmeticExpression($expressionType, $left, $right) { $type = $this->unpackExpressionType($expressionType); switch ($type) { case ExpressionType::MULTIPLY: return $this->prepareBinaryExpression(self::MULTIPLY, $left, $right); case Expression...
[ "public", "function", "onArithmeticExpression", "(", "$", "expressionType", ",", "$", "left", ",", "$", "right", ")", "{", "$", "type", "=", "$", "this", "->", "unpackExpressionType", "(", "$", "expressionType", ")", ";", "switch", "(", "$", "type", ")", ...
Call-back for arithmetic expression. @param ExpressionType $expressionType The type of arithmetic expression @param string $left The left expression @param string $right The left expression @return string
[ "Call", "-", "back", "for", "arithmetic", "expression", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Query/LaravelExpressionProvider.php#L192-L209
188,869
Algo-Web/POData-Laravel
src/Query/LaravelExpressionProvider.php
LaravelExpressionProvider.onRelationalExpression
public function onRelationalExpression($expressionType, $left, $right) { $type = $this->unpackExpressionType($expressionType); switch ($type) { case ExpressionType::GREATERTHAN: return $this->prepareBinaryExpression(self::GREATER_THAN, $left, $right); case Exp...
php
public function onRelationalExpression($expressionType, $left, $right) { $type = $this->unpackExpressionType($expressionType); switch ($type) { case ExpressionType::GREATERTHAN: return $this->prepareBinaryExpression(self::GREATER_THAN, $left, $right); case Exp...
[ "public", "function", "onRelationalExpression", "(", "$", "expressionType", ",", "$", "left", ",", "$", "right", ")", "{", "$", "type", "=", "$", "this", "->", "unpackExpressionType", "(", "$", "expressionType", ")", ";", "switch", "(", "$", "type", ")", ...
Call-back for relational expression. @param ExpressionType $expressionType The type of relation expression @param string $left The left expression @param string $right The left expression @return string
[ "Call", "-", "back", "for", "relational", "expression", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Query/LaravelExpressionProvider.php#L219-L238
188,870
Algo-Web/POData-Laravel
src/Query/LaravelExpressionProvider.php
LaravelExpressionProvider.onUnaryExpression
public function onUnaryExpression($expressionType, $child) { $type = $this->unpackExpressionType($expressionType); switch ($type) { case ExpressionType::NEGATE: return $this->prepareUnaryExpression(self::NEGATE, $child); case ExpressionType::NOT_LOGICAL: ...
php
public function onUnaryExpression($expressionType, $child) { $type = $this->unpackExpressionType($expressionType); switch ($type) { case ExpressionType::NEGATE: return $this->prepareUnaryExpression(self::NEGATE, $child); case ExpressionType::NOT_LOGICAL: ...
[ "public", "function", "onUnaryExpression", "(", "$", "expressionType", ",", "$", "child", ")", "{", "$", "type", "=", "$", "this", "->", "unpackExpressionType", "(", "$", "expressionType", ")", ";", "switch", "(", "$", "type", ")", "{", "case", "Expression...
Call-back for unary expression. @param ExpressionType $expressionType The type of unary expression @param string $child The child expression @return string
[ "Call", "-", "back", "for", "unary", "expression", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Query/LaravelExpressionProvider.php#L247-L258
188,871
Algo-Web/POData-Laravel
src/Query/LaravelExpressionProvider.php
LaravelExpressionProvider.onConstantExpression
public function onConstantExpression(IType $type, $value) { if (is_bool($value)) { return var_export($value, true); } elseif (null === $value) { return var_export(null, true); } return $value; }
php
public function onConstantExpression(IType $type, $value) { if (is_bool($value)) { return var_export($value, true); } elseif (null === $value) { return var_export(null, true); } return $value; }
[ "public", "function", "onConstantExpression", "(", "IType", "$", "type", ",", "$", "value", ")", "{", "if", "(", "is_bool", "(", "$", "value", ")", ")", "{", "return", "var_export", "(", "$", "value", ",", "true", ")", ";", "}", "elseif", "(", "null"...
Call-back for constant expression. @param IType $type The type of constant @param mixed $value The value of the constant @return string
[ "Call", "-", "back", "for", "constant", "expression", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Query/LaravelExpressionProvider.php#L267-L275
188,872
Algo-Web/POData-Laravel
src/Query/LaravelExpressionProvider.php
LaravelExpressionProvider.onPropertyAccessExpression
public function onPropertyAccessExpression($expression) { $parent = $expression; $variable = null; do { $variable = $parent->getResourceProperty()->getName() . self::MEMBER_ACCESS . $variable; $parent = $parent->getParent(); } while ($parent != null); ...
php
public function onPropertyAccessExpression($expression) { $parent = $expression; $variable = null; do { $variable = $parent->getResourceProperty()->getName() . self::MEMBER_ACCESS . $variable; $parent = $parent->getParent(); } while ($parent != null); ...
[ "public", "function", "onPropertyAccessExpression", "(", "$", "expression", ")", "{", "$", "parent", "=", "$", "expression", ";", "$", "variable", "=", "null", ";", "do", "{", "$", "variable", "=", "$", "parent", "->", "getResourceProperty", "(", ")", "->"...
Call-back for property access expression. @param PropertyAccessExpression $expression The property access expression @return string
[ "Call", "-", "back", "for", "property", "access", "expression", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Query/LaravelExpressionProvider.php#L283-L294
188,873
Algo-Web/POData-Laravel
src/Query/LaravelExpressionProvider.php
LaravelExpressionProvider.onFunctionCallExpression
public function onFunctionCallExpression($functionDescription, $params) { if (!isset($functionDescription)) { throw new \InvalidArgumentException('onFunctionCallExpression'); } if (!array_key_exists($functionDescription->name, $this->functionDescriptionParsers)) { thr...
php
public function onFunctionCallExpression($functionDescription, $params) { if (!isset($functionDescription)) { throw new \InvalidArgumentException('onFunctionCallExpression'); } if (!array_key_exists($functionDescription->name, $this->functionDescriptionParsers)) { thr...
[ "public", "function", "onFunctionCallExpression", "(", "$", "functionDescription", ",", "$", "params", ")", "{", "if", "(", "!", "isset", "(", "$", "functionDescription", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'onFunctionCallExpress...
Call-back for function call expression. @param \POData\UriProcessor\QueryProcessor\FunctionDescription $functionDescription Description of the function @param array<string> $params Parameters to the function @return string
[ "Call", "-", "back", "for", "function", "call", "expression", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Query/LaravelExpressionProvider.php#L303-L312
188,874
Algo-Web/POData-Laravel
src/Query/LaravelExpressionProvider.php
LaravelExpressionProvider.prepareBinaryExpression
private function prepareBinaryExpression($operator, $left, $right) { return self::OPEN_BRACKET . $left . ' ' . $operator . ' ' . $right . self::CLOSE_BRACKET; }
php
private function prepareBinaryExpression($operator, $left, $right) { return self::OPEN_BRACKET . $left . ' ' . $operator . ' ' . $right . self::CLOSE_BRACKET; }
[ "private", "function", "prepareBinaryExpression", "(", "$", "operator", ",", "$", "left", ",", "$", "right", ")", "{", "return", "self", "::", "OPEN_BRACKET", ".", "$", "left", ".", "' '", ".", "$", "operator", ".", "' '", ".", "$", "right", ".", "self...
To format binary expression. @param string $operator The binary operator @param string $left The left operand @param string $right The right operand @return string
[ "To", "format", "binary", "expression", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Query/LaravelExpressionProvider.php#L322-L325
188,875
Algo-Web/POData-Laravel
src/Query/LaravelHookQuery.php
LaravelHookQuery.unhookSingleModel
public function unhookSingleModel( ResourceSet $sourceResourceSet, $sourceEntityInstance, ResourceSet $targetResourceSet, $targetEntityInstance, $navPropName ) { $relation = $this->isModelHookInputsOk($sourceEntityInstance, $targetEntityInstance, $navPropName); ...
php
public function unhookSingleModel( ResourceSet $sourceResourceSet, $sourceEntityInstance, ResourceSet $targetResourceSet, $targetEntityInstance, $navPropName ) { $relation = $this->isModelHookInputsOk($sourceEntityInstance, $targetEntityInstance, $navPropName); ...
[ "public", "function", "unhookSingleModel", "(", "ResourceSet", "$", "sourceResourceSet", ",", "$", "sourceEntityInstance", ",", "ResourceSet", "$", "targetResourceSet", ",", "$", "targetEntityInstance", ",", "$", "navPropName", ")", "{", "$", "relation", "=", "$", ...
Removes child model from parent model. @param ResourceSet $sourceResourceSet @param object $sourceEntityInstance @param ResourceSet $targetResourceSet @param object $targetEntityInstance @param $navPropName @return bool
[ "Removes", "child", "model", "from", "parent", "model", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Query/LaravelHookQuery.php#L84-L127
188,876
Algo-Web/POData-Laravel
src/Models/MetadataTrait.php
MetadataTrait.metadataMask
public function metadataMask() { $attribs = array_keys($this->getAllAttributes()); $visible = $this->getVisible(); $hidden = $this->getHidden(); if (0 < count($visible)) { $attribs = array_intersect($visible, $attribs); } elseif (0 < count($hidden)) { ...
php
public function metadataMask() { $attribs = array_keys($this->getAllAttributes()); $visible = $this->getVisible(); $hidden = $this->getHidden(); if (0 < count($visible)) { $attribs = array_intersect($visible, $attribs); } elseif (0 < count($hidden)) { ...
[ "public", "function", "metadataMask", "(", ")", "{", "$", "attribs", "=", "array_keys", "(", "$", "this", "->", "getAllAttributes", "(", ")", ")", ";", "$", "visible", "=", "$", "this", "->", "getVisible", "(", ")", ";", "$", "hidden", "=", "$", "thi...
Return the set of fields that are permitted to be in metadata - following same visible-trumps-hidden guideline as Laravel. @return array
[ "Return", "the", "set", "of", "fields", "that", "are", "permitted", "to", "be", "in", "metadata", "-", "following", "same", "visible", "-", "trumps", "-", "hidden", "guideline", "as", "Laravel", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Models/MetadataTrait.php#L120-L133
188,877
Algo-Web/POData-Laravel
src/Models/MetadataTrait.php
MetadataTrait.getRelationships
public function getRelationships() { if (empty(static::$relationHooks)) { $hooks = []; $rels = $this->getRelationshipsFromMethods(true); $this->getRelationshipsUnknownPolyMorph($rels, $hooks); $this->getRelationshipsKnownPolyMorph($rels, $hooks); ...
php
public function getRelationships() { if (empty(static::$relationHooks)) { $hooks = []; $rels = $this->getRelationshipsFromMethods(true); $this->getRelationshipsUnknownPolyMorph($rels, $hooks); $this->getRelationshipsKnownPolyMorph($rels, $hooks); ...
[ "public", "function", "getRelationships", "(", ")", "{", "if", "(", "empty", "(", "static", "::", "$", "relationHooks", ")", ")", "{", "$", "hooks", "=", "[", "]", ";", "$", "rels", "=", "$", "this", "->", "getRelationshipsFromMethods", "(", "true", ")...
Get model's relationships. @return array
[ "Get", "model", "s", "relationships", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Models/MetadataTrait.php#L157-L176
188,878
Algo-Web/POData-Laravel
src/Models/MetadataTrait.php
MetadataTrait.collectGetters
protected function collectGetters() { $getterz = []; $methods = get_class_methods($this); foreach ($methods as $method) { if (12 < strlen($method) && 'get' == substr($method, 0, 3)) { if ('Attribute' == substr($method, -9)) { $getterz[] = $meth...
php
protected function collectGetters() { $getterz = []; $methods = get_class_methods($this); foreach ($methods as $method) { if (12 < strlen($method) && 'get' == substr($method, 0, 3)) { if ('Attribute' == substr($method, -9)) { $getterz[] = $meth...
[ "protected", "function", "collectGetters", "(", ")", "{", "$", "getterz", "=", "[", "]", ";", "$", "methods", "=", "get_class_methods", "(", "$", "this", ")", ";", "foreach", "(", "$", "methods", "as", "$", "method", ")", "{", "if", "(", "12", "<", ...
Dig up all defined getters on the model. @return array
[ "Dig", "up", "all", "defined", "getters", "on", "the", "model", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Models/MetadataTrait.php#L371-L390
188,879
Algo-Web/POData-Laravel
src/Models/MetadataTrait.php
MetadataTrait.getTableColumns
protected function getTableColumns() { if (0 === count(self::$tableColumns)) { $table = $this->getTable(); $connect = $this->getConnection(); $builder = $connect->getSchemaBuilder(); $columns = $builder->getColumnListing($table); self::$tableColum...
php
protected function getTableColumns() { if (0 === count(self::$tableColumns)) { $table = $this->getTable(); $connect = $this->getConnection(); $builder = $connect->getSchemaBuilder(); $columns = $builder->getColumnListing($table); self::$tableColum...
[ "protected", "function", "getTableColumns", "(", ")", "{", "if", "(", "0", "===", "count", "(", "self", "::", "$", "tableColumns", ")", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "connect", "=", "$", "this", "->...
Get columns for selected table. @return array
[ "Get", "columns", "for", "selected", "table", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Models/MetadataTrait.php#L776-L787
188,880
Algo-Web/POData-Laravel
src/Models/MetadataTrait.php
MetadataTrait.getTableDoctrineColumns
protected function getTableDoctrineColumns() { if (0 === count(self::$tableColumnsDoctrine)) { $table = $this->getTable(); $connect = $this->getConnection(); $columns = $connect->getDoctrineSchemaManager()->listTableColumns($table); self::$tableColumnsDoctrin...
php
protected function getTableDoctrineColumns() { if (0 === count(self::$tableColumnsDoctrine)) { $table = $this->getTable(); $connect = $this->getConnection(); $columns = $connect->getDoctrineSchemaManager()->listTableColumns($table); self::$tableColumnsDoctrin...
[ "protected", "function", "getTableDoctrineColumns", "(", ")", "{", "if", "(", "0", "===", "count", "(", "self", "::", "$", "tableColumnsDoctrine", ")", ")", "{", "$", "table", "=", "$", "this", "->", "getTable", "(", ")", ";", "$", "connect", "=", "$",...
Get Doctrine columns for selected table. @return array
[ "Get", "Doctrine", "columns", "for", "selected", "table", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Models/MetadataTrait.php#L794-L804
188,881
Algo-Web/POData-Laravel
src/Providers/MetadataProvider.php
MetadataProvider.register
public function register() { $this->app->singleton('metadata', function ($app) { return new SimpleMetadataProvider('Data', self::$metaNAMESPACE); }); $this->app->singleton('objectmap', function ($app) { return new Map(); }); }
php
public function register() { $this->app->singleton('metadata', function ($app) { return new SimpleMetadataProvider('Data', self::$metaNAMESPACE); }); $this->app->singleton('objectmap', function ($app) { return new Map(); }); }
[ "public", "function", "register", "(", ")", "{", "$", "this", "->", "app", "->", "singleton", "(", "'metadata'", ",", "function", "(", "$", "app", ")", "{", "return", "new", "SimpleMetadataProvider", "(", "'Data'", ",", "self", "::", "$", "metaNAMESPACE", ...
Register the application services. Boot-time only. @return void
[ "Register", "the", "application", "services", ".", "Boot", "-", "time", "only", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Providers/MetadataProvider.php#L308-L316
188,882
Algo-Web/POData-Laravel
src/Providers/MetadataProvider.php
MetadataProvider.resolveReverseProperty
public function resolveReverseProperty(Model $source, $propName) { if (!is_string($propName)) { throw new InvalidOperationException('Property name must be string'); } $entity = $this->getObjectMap()->resolveEntity(get_class($source)); if (null === $entity) { $...
php
public function resolveReverseProperty(Model $source, $propName) { if (!is_string($propName)) { throw new InvalidOperationException('Property name must be string'); } $entity = $this->getObjectMap()->resolveEntity(get_class($source)); if (null === $entity) { $...
[ "public", "function", "resolveReverseProperty", "(", "Model", "$", "source", ",", "$", "propName", ")", "{", "if", "(", "!", "is_string", "(", "$", "propName", ")", ")", "{", "throw", "new", "InvalidOperationException", "(", "'Property name must be string'", ")"...
Resolve possible reverse relation property names. @param Model $source @param $propName @return null|string @internal param Model $target
[ "Resolve", "possible", "reverse", "relation", "property", "names", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Providers/MetadataProvider.php#L363-L387
188,883
BeatSwitch/lock-laravel
src/DatabaseDriver.php
DatabaseDriver.storeCallerPermission
public function storeCallerPermission(Caller $caller, Permission $permission) { $this->getTable()->insert([ 'caller_type' => $caller->getCallerType(), 'caller_id' => $caller->getCallerId(), 'type' => $permission->getType(), 'action' => $permission->getAction()...
php
public function storeCallerPermission(Caller $caller, Permission $permission) { $this->getTable()->insert([ 'caller_type' => $caller->getCallerType(), 'caller_id' => $caller->getCallerId(), 'type' => $permission->getType(), 'action' => $permission->getAction()...
[ "public", "function", "storeCallerPermission", "(", "Caller", "$", "caller", ",", "Permission", "$", "permission", ")", "{", "$", "this", "->", "getTable", "(", ")", "->", "insert", "(", "[", "'caller_type'", "=>", "$", "caller", "->", "getCallerType", "(", ...
Stores a new permission for a caller @return void
[ "Stores", "a", "new", "permission", "for", "a", "caller" ]
4f891c222c2ac59cd2634ca2eab32df3241f1665
https://github.com/BeatSwitch/lock-laravel/blob/4f891c222c2ac59cd2634ca2eab32df3241f1665/src/DatabaseDriver.php#L77-L89
188,884
BeatSwitch/lock-laravel
src/DatabaseDriver.php
DatabaseDriver.removeCallerPermission
public function removeCallerPermission(Caller $caller, Permission $permission) { $query = $this->getTable() ->where('caller_type', $caller->getCallerType()) ->where('caller_id', $caller->getCallerId()) ->where('type', $permission->getType()) ->where('action', ...
php
public function removeCallerPermission(Caller $caller, Permission $permission) { $query = $this->getTable() ->where('caller_type', $caller->getCallerType()) ->where('caller_id', $caller->getCallerId()) ->where('type', $permission->getType()) ->where('action', ...
[ "public", "function", "removeCallerPermission", "(", "Caller", "$", "caller", ",", "Permission", "$", "permission", ")", "{", "$", "query", "=", "$", "this", "->", "getTable", "(", ")", "->", "where", "(", "'caller_type'", ",", "$", "caller", "->", "getCal...
Removes a permission for a caller @return void
[ "Removes", "a", "permission", "for", "a", "caller" ]
4f891c222c2ac59cd2634ca2eab32df3241f1665
https://github.com/BeatSwitch/lock-laravel/blob/4f891c222c2ac59cd2634ca2eab32df3241f1665/src/DatabaseDriver.php#L96-L119
188,885
BeatSwitch/lock-laravel
src/DatabaseDriver.php
DatabaseDriver.hasCallerPermission
public function hasCallerPermission(Caller $caller, Permission $permission) { $query = $this->getTable() ->where('caller_type', $caller->getCallerType()) ->where('caller_id', $caller->getCallerId()) ->where('type', $permission->getType()) ->where('action', $pe...
php
public function hasCallerPermission(Caller $caller, Permission $permission) { $query = $this->getTable() ->where('caller_type', $caller->getCallerType()) ->where('caller_id', $caller->getCallerId()) ->where('type', $permission->getType()) ->where('action', $pe...
[ "public", "function", "hasCallerPermission", "(", "Caller", "$", "caller", ",", "Permission", "$", "permission", ")", "{", "$", "query", "=", "$", "this", "->", "getTable", "(", ")", "->", "where", "(", "'caller_type'", ",", "$", "caller", "->", "getCaller...
Checks if a permission is stored for a caller @return bool
[ "Checks", "if", "a", "permission", "is", "stored", "for", "a", "caller" ]
4f891c222c2ac59cd2634ca2eab32df3241f1665
https://github.com/BeatSwitch/lock-laravel/blob/4f891c222c2ac59cd2634ca2eab32df3241f1665/src/DatabaseDriver.php#L126-L147
188,886
Algo-Web/POData-Laravel
src/Query/LaravelQuery.php
LaravelQuery.deleteResource
public function deleteResource( ResourceSet $sourceResourceSet, $sourceEntityInstance ) { $source = $this->unpackSourceEntity($sourceEntityInstance); $verb = 'delete'; if (!($source instanceof Model)) { throw new InvalidArgumentException('Source entity must be an...
php
public function deleteResource( ResourceSet $sourceResourceSet, $sourceEntityInstance ) { $source = $this->unpackSourceEntity($sourceEntityInstance); $verb = 'delete'; if (!($source instanceof Model)) { throw new InvalidArgumentException('Source entity must be an...
[ "public", "function", "deleteResource", "(", "ResourceSet", "$", "sourceResourceSet", ",", "$", "sourceEntityInstance", ")", "{", "$", "source", "=", "$", "this", "->", "unpackSourceEntity", "(", "$", "sourceEntityInstance", ")", ";", "$", "verb", "=", "'delete'...
Delete resource from a resource set. @param ResourceSet $sourceResourceSet @param object $sourceEntityInstance return bool true if resources sucessfully deteled, otherwise false
[ "Delete", "resource", "from", "a", "resource", "set", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Query/LaravelQuery.php#L338-L361
188,887
Algo-Web/POData-Laravel
src/Query/LaravelQuery.php
LaravelQuery.startTransaction
public function startTransaction($isBulk = false) { self::$touchList = []; self::$inBatch = true === $isBulk; DB::beginTransaction(); }
php
public function startTransaction($isBulk = false) { self::$touchList = []; self::$inBatch = true === $isBulk; DB::beginTransaction(); }
[ "public", "function", "startTransaction", "(", "$", "isBulk", "=", "false", ")", "{", "self", "::", "$", "touchList", "=", "[", "]", ";", "self", "::", "$", "inBatch", "=", "true", "===", "$", "isBulk", ";", "DB", "::", "beginTransaction", "(", ")", ...
Start database transaction. @param mixed $isBulk
[ "Start", "database", "transaction", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Query/LaravelQuery.php#L651-L656
188,888
Algo-Web/POData-Laravel
src/Query/LaravelQuery.php
LaravelQuery.commitTransaction
public function commitTransaction() { // fire model save again, to give Laravel app final chance to finalise anything that needs finalising after // batch processing foreach (self::$touchList as $model) { $model->save(); } DB::commit(); self::$touchList =...
php
public function commitTransaction() { // fire model save again, to give Laravel app final chance to finalise anything that needs finalising after // batch processing foreach (self::$touchList as $model) { $model->save(); } DB::commit(); self::$touchList =...
[ "public", "function", "commitTransaction", "(", ")", "{", "// fire model save again, to give Laravel app final chance to finalise anything that needs finalising after", "// batch processing", "foreach", "(", "self", "::", "$", "touchList", "as", "$", "model", ")", "{", "$", "...
Commit database transaction.
[ "Commit", "database", "transaction", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Query/LaravelQuery.php#L661-L672
188,889
Algo-Web/POData-Laravel
src/Serialisers/IronicSerialiser.php
IronicSerialiser.writeUrlElement
public function writeUrlElement(QueryResult $entryObject) { $url = new ODataURL(); if (null !== $entryObject->results) { $currentResourceType = $this->getCurrentResourceSetWrapper()->getResourceType(); $relativeUri = $this->getEntryInstanceKey( $entryObject->r...
php
public function writeUrlElement(QueryResult $entryObject) { $url = new ODataURL(); if (null !== $entryObject->results) { $currentResourceType = $this->getCurrentResourceSetWrapper()->getResourceType(); $relativeUri = $this->getEntryInstanceKey( $entryObject->r...
[ "public", "function", "writeUrlElement", "(", "QueryResult", "$", "entryObject", ")", "{", "$", "url", "=", "new", "ODataURL", "(", ")", ";", "if", "(", "null", "!==", "$", "entryObject", "->", "results", ")", "{", "$", "currentResourceType", "=", "$", "...
Write top level url element. @param QueryResult $entryObject The entry resource whose url to be written @return ODataURL
[ "Write", "top", "level", "url", "element", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Serialisers/IronicSerialiser.php#L375-L390
188,890
Algo-Web/POData-Laravel
src/Serialisers/IronicSerialiser.php
IronicSerialiser.writeUrlElements
public function writeUrlElements(QueryResult $entryObjects) { $urls = new ODataURLCollection(); if (!empty($entryObjects->results)) { $i = 0; foreach ($entryObjects->results as $entryObject) { if (!$entryObject instanceof QueryResult) { $qu...
php
public function writeUrlElements(QueryResult $entryObjects) { $urls = new ODataURLCollection(); if (!empty($entryObjects->results)) { $i = 0; foreach ($entryObjects->results as $entryObject) { if (!$entryObject instanceof QueryResult) { $qu...
[ "public", "function", "writeUrlElements", "(", "QueryResult", "$", "entryObjects", ")", "{", "$", "urls", "=", "new", "ODataURLCollection", "(", ")", ";", "if", "(", "!", "empty", "(", "$", "entryObjects", "->", "results", ")", ")", "{", "$", "i", "=", ...
Write top level url collection. @param QueryResult $entryObjects Array of entry resources whose url to be written @return ODataURLCollection
[ "Write", "top", "level", "url", "collection", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Serialisers/IronicSerialiser.php#L399-L431
188,891
Algo-Web/POData-Laravel
src/Serialisers/IronicSerialiser.php
IronicSerialiser.writeTopLevelComplexObject
public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType) { $result = $complexValue->results; $propertyContent = new ODataPropertyContent(); $odataProperty = new ODataProperty(); $odataProperty->name = $propertyName; ...
php
public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType) { $result = $complexValue->results; $propertyContent = new ODataPropertyContent(); $odataProperty = new ODataProperty(); $odataProperty->name = $propertyName; ...
[ "public", "function", "writeTopLevelComplexObject", "(", "QueryResult", "&", "$", "complexValue", ",", "$", "propertyName", ",", "ResourceType", "&", "$", "resourceType", ")", "{", "$", "result", "=", "$", "complexValue", "->", "results", ";", "$", "propertyCont...
Write top level complex resource. @param QueryResult &$complexValue The complex object to be written @param string $propertyName The name of the complex property @param ResourceType &$resourceType Describes the type of complex object @return ODataPropertyContent
[ "Write", "top", "level", "complex", "resource", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Serialisers/IronicSerialiser.php#L442-L458
188,892
Algo-Web/POData-Laravel
src/Serialisers/IronicSerialiser.php
IronicSerialiser.writeTopLevelBagObject
public function writeTopLevelBagObject(QueryResult & $BagValue, $propertyName, ResourceType & $resourceType) { $result = $BagValue->results; $propertyContent = new ODataPropertyContent(); $odataProperty = new ODataProperty(); $odataProperty->name = $propertyName; $odataPrope...
php
public function writeTopLevelBagObject(QueryResult & $BagValue, $propertyName, ResourceType & $resourceType) { $result = $BagValue->results; $propertyContent = new ODataPropertyContent(); $odataProperty = new ODataProperty(); $odataProperty->name = $propertyName; $odataPrope...
[ "public", "function", "writeTopLevelBagObject", "(", "QueryResult", "&", "$", "BagValue", ",", "$", "propertyName", ",", "ResourceType", "&", "$", "resourceType", ")", "{", "$", "result", "=", "$", "BagValue", "->", "results", ";", "$", "propertyContent", "=",...
Write top level bag resource. @param QueryResult &$BagValue The bag object to be written @param string $propertyName The name of the bag property @param ResourceType &$resourceType Describes the type of bag object @return ODataPropertyContent
[ "Write", "top", "level", "bag", "resource", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Serialisers/IronicSerialiser.php#L472-L484
188,893
Algo-Web/POData-Laravel
src/Serialisers/IronicSerialiser.php
IronicSerialiser.writeTopLevelPrimitive
public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null) { if (null === $resourceProperty) { throw new InvalidOperationException('Resource property must not be null'); } $propertyContent = new ODataPropertyContent(); ...
php
public function writeTopLevelPrimitive(QueryResult & $primitiveValue, ResourceProperty & $resourceProperty = null) { if (null === $resourceProperty) { throw new InvalidOperationException('Resource property must not be null'); } $propertyContent = new ODataPropertyContent(); ...
[ "public", "function", "writeTopLevelPrimitive", "(", "QueryResult", "&", "$", "primitiveValue", ",", "ResourceProperty", "&", "$", "resourceProperty", "=", "null", ")", "{", "if", "(", "null", "===", "$", "resourceProperty", ")", "{", "throw", "new", "InvalidOpe...
Write top level primitive value. @param QueryResult &$primitiveValue The primitive value to be written @param ResourceProperty &$resourceProperty Resource property describing the primitive property to be written @return ODataPropertyContent
[ "Write", "top", "level", "primitive", "value", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Serialisers/IronicSerialiser.php#L495-L522
188,894
Algo-Web/POData-Laravel
src/Serialisers/IronicSerialiser.php
IronicSerialiser.setRequest
public function setRequest(RequestDescription $request) { $this->request = $request; $this->stack->setRequest($request); }
php
public function setRequest(RequestDescription $request) { $this->request = $request; $this->stack->setRequest($request); }
[ "public", "function", "setRequest", "(", "RequestDescription", "$", "request", ")", "{", "$", "this", "->", "request", "=", "$", "request", ";", "$", "this", "->", "stack", "->", "setRequest", "(", "$", "request", ")", ";", "}" ]
Sets reference to the request submitted by client. @param RequestDescription $request
[ "Sets", "reference", "to", "the", "request", "submitted", "by", "client", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Serialisers/IronicSerialiser.php#L543-L547
188,895
Algo-Web/POData-Laravel
src/Serialisers/IronicSerialiser.php
IronicSerialiser.getProjectionNodes
protected function getProjectionNodes() { $expandedProjectionNode = $this->getCurrentExpandedProjectionNode(); if (null === $expandedProjectionNode || $expandedProjectionNode->canSelectAllProperties()) { return null; } return $expandedProjectionNode->getChildNodes(); ...
php
protected function getProjectionNodes() { $expandedProjectionNode = $this->getCurrentExpandedProjectionNode(); if (null === $expandedProjectionNode || $expandedProjectionNode->canSelectAllProperties()) { return null; } return $expandedProjectionNode->getChildNodes(); ...
[ "protected", "function", "getProjectionNodes", "(", ")", "{", "$", "expandedProjectionNode", "=", "$", "this", "->", "getCurrentExpandedProjectionNode", "(", ")", ";", "if", "(", "null", "===", "$", "expandedProjectionNode", "||", "$", "expandedProjectionNode", "->"...
Gets collection of projection nodes under the current node. @return ProjectionNode[]|ExpandedProjectionNode[]|null List of nodes describing projections for the current segment, If this method returns null it means no projections are to be applied and the entire resource for the current segment should be serialized, If...
[ "Gets", "collection", "of", "projection", "nodes", "under", "the", "current", "node", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Serialisers/IronicSerialiser.php#L669-L677
188,896
Algo-Web/POData-Laravel
src/Serialisers/IronicSerialiser.php
IronicSerialiser.getCurrentExpandedProjectionNode
protected function getCurrentExpandedProjectionNode() { if (null === $this->rootNode) { $this->rootNode = $this->getRequest()->getRootProjectionNode(); } $expandedProjectionNode = $this->rootNode; if (null === $expandedProjectionNode) { return null; } ...
php
protected function getCurrentExpandedProjectionNode() { if (null === $this->rootNode) { $this->rootNode = $this->getRequest()->getRootProjectionNode(); } $expandedProjectionNode = $this->rootNode; if (null === $expandedProjectionNode) { return null; } ...
[ "protected", "function", "getCurrentExpandedProjectionNode", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "rootNode", ")", "{", "$", "this", "->", "rootNode", "=", "$", "this", "->", "getRequest", "(", ")", "->", "getRootProjectionNode", "(", ...
Find a 'ExpandedProjectionNode' instance in the projection tree which describes the current segment. @return null|RootProjectionNode|ExpandedProjectionNode
[ "Find", "a", "ExpandedProjectionNode", "instance", "in", "the", "projection", "tree", "which", "describes", "the", "current", "segment", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Serialisers/IronicSerialiser.php#L685-L718
188,897
Algo-Web/POData-Laravel
src/Serialisers/IronicSerialiser.php
IronicSerialiser.shouldExpandSegment
protected function shouldExpandSegment($navigationPropertyName) { $expandedProjectionNode = $this->getCurrentExpandedProjectionNode(); if (null === $expandedProjectionNode) { return false; } $expandedProjectionNode = $expandedProjectionNode->findNode($navigationPropertyNa...
php
protected function shouldExpandSegment($navigationPropertyName) { $expandedProjectionNode = $this->getCurrentExpandedProjectionNode(); if (null === $expandedProjectionNode) { return false; } $expandedProjectionNode = $expandedProjectionNode->findNode($navigationPropertyNa...
[ "protected", "function", "shouldExpandSegment", "(", "$", "navigationPropertyName", ")", "{", "$", "expandedProjectionNode", "=", "$", "this", "->", "getCurrentExpandedProjectionNode", "(", ")", ";", "if", "(", "null", "===", "$", "expandedProjectionNode", ")", "{",...
Check whether to expand a navigation property or not. @param string $navigationPropertyName Name of naviagtion property in question @return bool True if the given navigation should be expanded, otherwise false
[ "Check", "whether", "to", "expand", "a", "navigation", "property", "or", "not", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Serialisers/IronicSerialiser.php#L727-L737
188,898
Algo-Web/POData-Laravel
src/Serialisers/IronicSerialiser.php
IronicSerialiser.getCurrentResourceSetWrapper
protected function getCurrentResourceSetWrapper() { $segmentWrappers = $this->getStack()->getSegmentWrappers(); $count = count($segmentWrappers); return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count-1]; }
php
protected function getCurrentResourceSetWrapper() { $segmentWrappers = $this->getStack()->getSegmentWrappers(); $count = count($segmentWrappers); return 0 == $count ? $this->getRequest()->getTargetResourceSetWrapper() : $segmentWrappers[$count-1]; }
[ "protected", "function", "getCurrentResourceSetWrapper", "(", ")", "{", "$", "segmentWrappers", "=", "$", "this", "->", "getStack", "(", ")", "->", "getSegmentWrappers", "(", ")", ";", "$", "count", "=", "count", "(", "$", "segmentWrappers", ")", ";", "retur...
Resource set wrapper for the resource being serialized. @return ResourceSetWrapper
[ "Resource", "set", "wrapper", "for", "the", "resource", "being", "serialized", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Serialisers/IronicSerialiser.php#L769-L775
188,899
Algo-Web/POData-Laravel
src/Serialisers/IronicSerialiser.php
IronicSerialiser.getNextLinkUri
protected function getNextLinkUri(&$lastObject) { $currentExpandedProjectionNode = $this->getCurrentExpandedProjectionNode(); $internalOrderByInfo = $currentExpandedProjectionNode->getInternalOrderByInfo(); if (!$internalOrderByInfo instanceof InternalOrderByInfo) { throw new Inv...
php
protected function getNextLinkUri(&$lastObject) { $currentExpandedProjectionNode = $this->getCurrentExpandedProjectionNode(); $internalOrderByInfo = $currentExpandedProjectionNode->getInternalOrderByInfo(); if (!$internalOrderByInfo instanceof InternalOrderByInfo) { throw new Inv...
[ "protected", "function", "getNextLinkUri", "(", "&", "$", "lastObject", ")", "{", "$", "currentExpandedProjectionNode", "=", "$", "this", "->", "getCurrentExpandedProjectionNode", "(", ")", ";", "$", "internalOrderByInfo", "=", "$", "currentExpandedProjectionNode", "-...
Get next page link from the given entity instance. @param mixed &$lastObject Last object serialized to be used for generating $skiptoken @throws ODataException @return string for the link for next page
[ "Get", "next", "page", "link", "from", "the", "given", "entity", "instance", "." ]
8f4d7ff8fe7774e1296690bb3432636bb8cffb0b
https://github.com/Algo-Web/POData-Laravel/blob/8f4d7ff8fe7774e1296690bb3432636bb8cffb0b/src/Serialisers/IronicSerialiser.php#L786-L805