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
30,500
SIELOnline/libAcumulus
src/Invoice/Creator.php
Creator.callSourceTypeSpecificMethod
protected function callSourceTypeSpecificMethod($method, $args = array()) { $method .= $this->invoiceSource->getType(); return call_user_func_array(array($this, $method), $args); }
php
protected function callSourceTypeSpecificMethod($method, $args = array()) { $method .= $this->invoiceSource->getType(); return call_user_func_array(array($this, $method), $args); }
[ "protected", "function", "callSourceTypeSpecificMethod", "(", "$", "method", ",", "$", "args", "=", "array", "(", ")", ")", "{", "$", "method", ".=", "$", "this", "->", "invoiceSource", "->", "getType", "(", ")", ";", "return", "call_user_func_array", "(", ...
Calls a method constructed of the method name and the source type. If the implementation/override of a method depends on the type of invoice source it might be better to implement 1 method per source type. This method calls such a method assuming it is named {method}{source-type}. Example: if getLineItem($line) would ...
[ "Calls", "a", "method", "constructed", "of", "the", "method", "name", "and", "the", "source", "type", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Invoice/Creator.php#L1129-L1133
30,501
ipunkt/rancherize
app/Configuration/Services/ProjectConfiguration.php
ProjectConfiguration.save
public function save( Configuration $configuration ) { /** * Only values under the `project` key should be written to the project config */ $prefixDecorator = new PrefixConfigurableDecorator( $configuration, 'project' ); $rancherizePath = $this->getConfigPath(); $this->writer->write( $prefixDecorator, ...
php
public function save( Configuration $configuration ) { /** * Only values under the `project` key should be written to the project config */ $prefixDecorator = new PrefixConfigurableDecorator( $configuration, 'project' ); $rancherizePath = $this->getConfigPath(); $this->writer->write( $prefixDecorator, ...
[ "public", "function", "save", "(", "Configuration", "$", "configuration", ")", "{", "/**\n\t\t * Only values under the `project` key should be written to the project config\n\t\t */", "$", "prefixDecorator", "=", "new", "PrefixConfigurableDecorator", "(", "$", "configuration", ",...
Save the project part of the configuration @param Configuration $configuration
[ "Save", "the", "project", "part", "of", "the", "configuration" ]
3c226da686b283e7fef961a9a79b54db53b8757b
https://github.com/ipunkt/rancherize/blob/3c226da686b283e7fef961a9a79b54db53b8757b/app/Configuration/Services/ProjectConfiguration.php#L74-L85
30,502
ipunkt/rancherize
app/File/FileLoader.php
FileLoader.get
public function get(string $path) : string { if(! file_exists($path) ) throw new FileNotFoundException($path, 200); return file_get_contents($path); }
php
public function get(string $path) : string { if(! file_exists($path) ) throw new FileNotFoundException($path, 200); return file_get_contents($path); }
[ "public", "function", "get", "(", "string", "$", "path", ")", ":", "string", "{", "if", "(", "!", "file_exists", "(", "$", "path", ")", ")", "throw", "new", "FileNotFoundException", "(", "$", "path", ",", "200", ")", ";", "return", "file_get_contents", ...
Load file from disk @param $path @return string
[ "Load", "file", "from", "disk" ]
3c226da686b283e7fef961a9a79b54db53b8757b
https://github.com/ipunkt/rancherize/blob/3c226da686b283e7fef961a9a79b54db53b8757b/app/File/FileLoader.php#L18-L24
30,503
SIELOnline/libAcumulus
src/Helpers/Log.php
Log.getSeverityString
protected function getSeverityString($severity) { switch ($severity) { case Log::Error: return 'Error'; case Log::Warning: return 'Warning'; case Log::Notice: return 'Notice'; case Log::Info: retu...
php
protected function getSeverityString($severity) { switch ($severity) { case Log::Error: return 'Error'; case Log::Warning: return 'Warning'; case Log::Notice: return 'Notice'; case Log::Info: retu...
[ "protected", "function", "getSeverityString", "(", "$", "severity", ")", "{", "switch", "(", "$", "severity", ")", "{", "case", "Log", "::", "Error", ":", "return", "'Error'", ";", "case", "Log", "::", "Warning", ":", "return", "'Warning'", ";", "case", ...
Returns a textual representation of the severity. @param int $severity One of the constants of this class. @return string A textual representation of the severity.
[ "Returns", "a", "textual", "representation", "of", "the", "severity", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Helpers/Log.php#L74-L89
30,504
SIELOnline/libAcumulus
src/Helpers/Log.php
Log.log
public function log($severity, $message, array $args = array()) { if ($severity <= max($this->getLogLevel(), Log::Warning)) { if (count($args) > 0) { $message = vsprintf($message, $args); } $this->write($message, $severity); } return $messa...
php
public function log($severity, $message, array $args = array()) { if ($severity <= max($this->getLogLevel(), Log::Warning)) { if (count($args) > 0) { $message = vsprintf($message, $args); } $this->write($message, $severity); } return $messa...
[ "public", "function", "log", "(", "$", "severity", ",", "$", "message", ",", "array", "$", "args", "=", "array", "(", ")", ")", "{", "if", "(", "$", "severity", "<=", "max", "(", "$", "this", "->", "getLogLevel", "(", ")", ",", "Log", "::", "Warn...
Formats and logs the message if the log level indicates so. Errors and Warnings are always logged, other levels only if the log level is set to do so. Formatting involves: - calling vsprintf() if $args is not empty - adding "Acumulus {version} {severity}: " in front of the message. @param int $severity @param string...
[ "Formats", "and", "logs", "the", "message", "if", "the", "log", "level", "indicates", "so", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Helpers/Log.php#L108-L117
30,505
SIELOnline/libAcumulus
src/Helpers/Log.php
Log.notice
public function notice($message) { $args = func_get_args(); array_shift($args); return $this->log(Log::Notice, $message, $args); }
php
public function notice($message) { $args = func_get_args(); array_shift($args); return $this->log(Log::Notice, $message, $args); }
[ "public", "function", "notice", "(", "$", "message", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "array_shift", "(", "$", "args", ")", ";", "return", "$", "this", "->", "log", "(", "Log", "::", "Notice", ",", "$", "message", ",", "$...
Logs a notice. @param string $message,... The message to log, optionally followed by arguments. If there are arguments the $message is passed through vsprintf(). @return string The full formatted message whether it got logged or not.
[ "Logs", "a", "notice", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Helpers/Log.php#L146-L151
30,506
SIELOnline/libAcumulus
src/Helpers/Log.php
Log.info
public function info($message) { $args = func_get_args(); array_shift($args); return $this->log(Log::Info, $message, $args); }
php
public function info($message) { $args = func_get_args(); array_shift($args); return $this->log(Log::Info, $message, $args); }
[ "public", "function", "info", "(", "$", "message", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "array_shift", "(", "$", "args", ")", ";", "return", "$", "this", "->", "log", "(", "Log", "::", "Info", ",", "$", "message", ",", "$", ...
Logs an informational message. @param string $message,... The message to log, optionally followed by arguments. If there are arguments the $message is passed through vsprintf(). @return string The full formatted message whether it got logged or not.
[ "Logs", "an", "informational", "message", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Helpers/Log.php#L163-L168
30,507
SIELOnline/libAcumulus
src/Helpers/Log.php
Log.warning
public function warning($message) { $args = func_get_args(); array_shift($args); return $this->log(Log::Warning, $message, $args); }
php
public function warning($message) { $args = func_get_args(); array_shift($args); return $this->log(Log::Warning, $message, $args); }
[ "public", "function", "warning", "(", "$", "message", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "array_shift", "(", "$", "args", ")", ";", "return", "$", "this", "->", "log", "(", "Log", "::", "Warning", ",", "$", "message", ",", ...
Logs a warning. @param string $message,... The message to log, optionally followed by arguments. If there are arguments the $message is passed through vsprintf(). @return string The full formatted message whether it got logged or not.
[ "Logs", "a", "warning", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Helpers/Log.php#L180-L185
30,508
SIELOnline/libAcumulus
src/Helpers/Log.php
Log.write
protected function write($message, $severity) { $message = sprintf('Acumulus %s: %s - %s', $this->getLibraryVersion(), $this->getSeverityString($severity), $message); error_log($message); }
php
protected function write($message, $severity) { $message = sprintf('Acumulus %s: %s - %s', $this->getLibraryVersion(), $this->getSeverityString($severity), $message); error_log($message); }
[ "protected", "function", "write", "(", "$", "message", ",", "$", "severity", ")", "{", "$", "message", "=", "sprintf", "(", "'Acumulus %s: %s - %s'", ",", "$", "this", "->", "getLibraryVersion", "(", ")", ",", "$", "this", "->", "getSeverityString", "(", "...
Writes the message to the actual log sink. This base implementation adds the name Acumulus, the version of this library, and the severity and then sends the message to error_log(). Override if the web shop offers its own log mechanism. @param string $message @param int $severity
[ "Writes", "the", "message", "to", "the", "actual", "log", "sink", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Helpers/Log.php#L215-L219
30,509
dreamfactorysoftware/df-user
src/Components/AlternateAuth.php
AlternateAuth.handleLogin
public function handleLogin($request) { $filterString = $this->generateFilter($request); $remoteUser = $this->getRemoteUser($filterString); $password = $request->input($this->passwordField); $passwordHash = array_get($remoteUser, $this->passwordField); if ($this->verifyPassw...
php
public function handleLogin($request) { $filterString = $this->generateFilter($request); $remoteUser = $this->getRemoteUser($filterString); $password = $request->input($this->passwordField); $passwordHash = array_get($remoteUser, $this->passwordField); if ($this->verifyPassw...
[ "public", "function", "handleLogin", "(", "$", "request", ")", "{", "$", "filterString", "=", "$", "this", "->", "generateFilter", "(", "$", "request", ")", ";", "$", "remoteUser", "=", "$", "this", "->", "getRemoteUser", "(", "$", "filterString", ")", "...
Handles login action including creating shadow user if needed @param \DreamFactory\Core\Contracts\ServiceRequestInterface $request @return array @throws \DreamFactory\Core\Exceptions\InternalServerErrorException @throws \DreamFactory\Core\Exceptions\RestException @throws \DreamFactory\Core\Exceptions\UnauthorizedExce...
[ "Handles", "login", "action", "including", "creating", "shadow", "user", "if", "needed" ]
06747c83f03d51693d212d948dd5d49f098192ca
https://github.com/dreamfactorysoftware/df-user/blob/06747c83f03d51693d212d948dd5d49f098192ca/src/Components/AlternateAuth.php#L71-L88
30,510
dreamfactorysoftware/df-user
src/Components/AlternateAuth.php
AlternateAuth.generateFilter
protected function generateFilter($request) { $this->filters[$this->usernameField] = trim($request->input($this->usernameField)); foreach ($this->otherFields as $of) { $of = trim($of); $this->filters[$of] = $request->input($of); } $string = ''; $multi...
php
protected function generateFilter($request) { $this->filters[$this->usernameField] = trim($request->input($this->usernameField)); foreach ($this->otherFields as $of) { $of = trim($of); $this->filters[$of] = $request->input($of); } $string = ''; $multi...
[ "protected", "function", "generateFilter", "(", "$", "request", ")", "{", "$", "this", "->", "filters", "[", "$", "this", "->", "usernameField", "]", "=", "trim", "(", "$", "request", "->", "input", "(", "$", "this", "->", "usernameField", ")", ")", ";...
Generates filter string based on request parameter and configured options @param \DreamFactory\Core\Contracts\ServiceRequestInterface $request @return string
[ "Generates", "filter", "string", "based", "on", "request", "parameter", "and", "configured", "options" ]
06747c83f03d51693d212d948dd5d49f098192ca
https://github.com/dreamfactorysoftware/df-user/blob/06747c83f03d51693d212d948dd5d49f098192ca/src/Components/AlternateAuth.php#L97-L123
30,511
dreamfactorysoftware/df-user
src/Components/AlternateAuth.php
AlternateAuth.getRemoteUser
protected function getRemoteUser($filter) { $resource = '_table/' . $this->table; $response = ServiceManager::handleRequest( $this->service, Verbs::GET, $resource, ['filter' => $filter], [], null, null, false ); $status = $r...
php
protected function getRemoteUser($filter) { $resource = '_table/' . $this->table; $response = ServiceManager::handleRequest( $this->service, Verbs::GET, $resource, ['filter' => $filter], [], null, null, false ); $status = $r...
[ "protected", "function", "getRemoteUser", "(", "$", "filter", ")", "{", "$", "resource", "=", "'_table/'", ".", "$", "this", "->", "table", ";", "$", "response", "=", "ServiceManager", "::", "handleRequest", "(", "$", "this", "->", "service", ",", "Verbs",...
Retrieves the user from remote source @param $filter @return mixed @throws \DreamFactory\Core\Exceptions\BadRequestException @throws \DreamFactory\Core\Exceptions\InternalServerErrorException @throws \DreamFactory\Core\Exceptions\RestException @throws \DreamFactory\Core\Exceptions\UnauthorizedException @throws \Excep...
[ "Retrieves", "the", "user", "from", "remote", "source" ]
06747c83f03d51693d212d948dd5d49f098192ca
https://github.com/dreamfactorysoftware/df-user/blob/06747c83f03d51693d212d948dd5d49f098192ca/src/Components/AlternateAuth.php#L137-L172
30,512
dreamfactorysoftware/df-user
src/Components/AlternateAuth.php
AlternateAuth.verifyPassword
protected function verifyPassword($password, $hash) { // Check plain password. if($password === $hash){ return true; } // Check md5 hash if (md5($password) === $hash) { return true; } // Check bcrypt hash return password_verify(...
php
protected function verifyPassword($password, $hash) { // Check plain password. if($password === $hash){ return true; } // Check md5 hash if (md5($password) === $hash) { return true; } // Check bcrypt hash return password_verify(...
[ "protected", "function", "verifyPassword", "(", "$", "password", ",", "$", "hash", ")", "{", "// Check plain password.", "if", "(", "$", "password", "===", "$", "hash", ")", "{", "return", "true", ";", "}", "// Check md5 hash", "if", "(", "md5", "(", "$", ...
Verifies the password hash @param $password @param $hash @return bool
[ "Verifies", "the", "password", "hash" ]
06747c83f03d51693d212d948dd5d49f098192ca
https://github.com/dreamfactorysoftware/df-user/blob/06747c83f03d51693d212d948dd5d49f098192ca/src/Components/AlternateAuth.php#L182-L194
30,513
dreamfactorysoftware/df-user
src/Components/AlternateAuth.php
AlternateAuth.createShadowUser
protected function createShadowUser($userInfo) { $email = filter_var(array_get($userInfo, $this->emailField), FILTER_SANITIZE_EMAIL); if (empty($email)) { throw new InternalServerErrorException( 'Failed to retrieve alternate user\'s email address using field ' . $this->em...
php
protected function createShadowUser($userInfo) { $email = filter_var(array_get($userInfo, $this->emailField), FILTER_SANITIZE_EMAIL); if (empty($email)) { throw new InternalServerErrorException( 'Failed to retrieve alternate user\'s email address using field ' . $this->em...
[ "protected", "function", "createShadowUser", "(", "$", "userInfo", ")", "{", "$", "email", "=", "filter_var", "(", "array_get", "(", "$", "userInfo", ",", "$", "this", "->", "emailField", ")", ",", "FILTER_SANITIZE_EMAIL", ")", ";", "if", "(", "empty", "("...
Creates the shadow user if needed @param array $userInfo @return \DreamFactory\Core\Models\BaseModel|\Illuminate\Database\Eloquent\Model|null|static @throws \DreamFactory\Core\Exceptions\InternalServerErrorException @throws \Exception
[ "Creates", "the", "shadow", "user", "if", "needed" ]
06747c83f03d51693d212d948dd5d49f098192ca
https://github.com/dreamfactorysoftware/df-user/blob/06747c83f03d51693d212d948dd5d49f098192ca/src/Components/AlternateAuth.php#L205-L226
30,514
dreamfactorysoftware/df-user
src/Components/AlternateAuth.php
AlternateAuth.setService
public function setService($id) { $id = filter_var($id, FILTER_SANITIZE_NUMBER_INT); if (empty($id)) { throw new InternalServerErrorException('No service id provided.'); } if (empty($this->service = ServiceManager::getServiceNameById($id))) { throw new Intern...
php
public function setService($id) { $id = filter_var($id, FILTER_SANITIZE_NUMBER_INT); if (empty($id)) { throw new InternalServerErrorException('No service id provided.'); } if (empty($this->service = ServiceManager::getServiceNameById($id))) { throw new Intern...
[ "public", "function", "setService", "(", "$", "id", ")", "{", "$", "id", "=", "filter_var", "(", "$", "id", ",", "FILTER_SANITIZE_NUMBER_INT", ")", ";", "if", "(", "empty", "(", "$", "id", ")", ")", "{", "throw", "new", "InternalServerErrorException", "(...
Sets the db service name @param integer $id @throws \DreamFactory\Core\Exceptions\InternalServerErrorException
[ "Sets", "the", "db", "service", "name" ]
06747c83f03d51693d212d948dd5d49f098192ca
https://github.com/dreamfactorysoftware/df-user/blob/06747c83f03d51693d212d948dd5d49f098192ca/src/Components/AlternateAuth.php#L235-L245
30,515
dreamfactorysoftware/df-user
src/Components/AlternateAuth.php
AlternateAuth.setTable
public function setTable($table) { $table = trim(filter_var($table, FILTER_SANITIZE_STRING)); if (empty($table)) { throw new InternalServerErrorException('No table name provided.'); } $this->table = $table; }
php
public function setTable($table) { $table = trim(filter_var($table, FILTER_SANITIZE_STRING)); if (empty($table)) { throw new InternalServerErrorException('No table name provided.'); } $this->table = $table; }
[ "public", "function", "setTable", "(", "$", "table", ")", "{", "$", "table", "=", "trim", "(", "filter_var", "(", "$", "table", ",", "FILTER_SANITIZE_STRING", ")", ")", ";", "if", "(", "empty", "(", "$", "table", ")", ")", "{", "throw", "new", "Inter...
Sets the table name @param string $table @throws \DreamFactory\Core\Exceptions\InternalServerErrorException
[ "Sets", "the", "table", "name" ]
06747c83f03d51693d212d948dd5d49f098192ca
https://github.com/dreamfactorysoftware/df-user/blob/06747c83f03d51693d212d948dd5d49f098192ca/src/Components/AlternateAuth.php#L254-L262
30,516
dreamfactorysoftware/df-user
src/Components/AlternateAuth.php
AlternateAuth.setUsernameField
public function setUsernameField($uf) { $uf = trim(filter_var($uf, FILTER_SANITIZE_STRING)); if (empty($uf)) { throw new InternalServerErrorException('No username field provided.'); } $this->usernameField = $uf; }
php
public function setUsernameField($uf) { $uf = trim(filter_var($uf, FILTER_SANITIZE_STRING)); if (empty($uf)) { throw new InternalServerErrorException('No username field provided.'); } $this->usernameField = $uf; }
[ "public", "function", "setUsernameField", "(", "$", "uf", ")", "{", "$", "uf", "=", "trim", "(", "filter_var", "(", "$", "uf", ",", "FILTER_SANITIZE_STRING", ")", ")", ";", "if", "(", "empty", "(", "$", "uf", ")", ")", "{", "throw", "new", "InternalS...
Sets the username field @param string $uf @throws \DreamFactory\Core\Exceptions\InternalServerErrorException
[ "Sets", "the", "username", "field" ]
06747c83f03d51693d212d948dd5d49f098192ca
https://github.com/dreamfactorysoftware/df-user/blob/06747c83f03d51693d212d948dd5d49f098192ca/src/Components/AlternateAuth.php#L271-L279
30,517
dreamfactorysoftware/df-user
src/Components/AlternateAuth.php
AlternateAuth.setPasswordField
public function setPasswordField($pf) { $pf = trim(filter_var($pf, FILTER_SANITIZE_STRING)); if (empty($pf)) { throw new InternalServerErrorException('No password field provided.'); } $this->passwordField = $pf; }
php
public function setPasswordField($pf) { $pf = trim(filter_var($pf, FILTER_SANITIZE_STRING)); if (empty($pf)) { throw new InternalServerErrorException('No password field provided.'); } $this->passwordField = $pf; }
[ "public", "function", "setPasswordField", "(", "$", "pf", ")", "{", "$", "pf", "=", "trim", "(", "filter_var", "(", "$", "pf", ",", "FILTER_SANITIZE_STRING", ")", ")", ";", "if", "(", "empty", "(", "$", "pf", ")", ")", "{", "throw", "new", "InternalS...
Sets the password field @param string $pf @throws \DreamFactory\Core\Exceptions\InternalServerErrorException
[ "Sets", "the", "password", "field" ]
06747c83f03d51693d212d948dd5d49f098192ca
https://github.com/dreamfactorysoftware/df-user/blob/06747c83f03d51693d212d948dd5d49f098192ca/src/Components/AlternateAuth.php#L288-L296
30,518
dreamfactorysoftware/df-user
src/Components/AlternateAuth.php
AlternateAuth.setEmailField
public function setEmailField($ef) { $ef = trim(filter_var($ef, FILTER_SANITIZE_STRING)); if (empty($ef)) { throw new InternalServerErrorException('No email field provided.'); } $this->emailField = $ef; }
php
public function setEmailField($ef) { $ef = trim(filter_var($ef, FILTER_SANITIZE_STRING)); if (empty($ef)) { throw new InternalServerErrorException('No email field provided.'); } $this->emailField = $ef; }
[ "public", "function", "setEmailField", "(", "$", "ef", ")", "{", "$", "ef", "=", "trim", "(", "filter_var", "(", "$", "ef", ",", "FILTER_SANITIZE_STRING", ")", ")", ";", "if", "(", "empty", "(", "$", "ef", ")", ")", "{", "throw", "new", "InternalServ...
Sets the email field @param string $ef @throws \DreamFactory\Core\Exceptions\InternalServerErrorException
[ "Sets", "the", "email", "field" ]
06747c83f03d51693d212d948dd5d49f098192ca
https://github.com/dreamfactorysoftware/df-user/blob/06747c83f03d51693d212d948dd5d49f098192ca/src/Components/AlternateAuth.php#L305-L313
30,519
dreamfactorysoftware/df-user
src/Components/AlternateAuth.php
AlternateAuth.parseFilters
protected function parseFilters($filters) { $parsed = []; if (!empty($filters) && is_string($filters)) { $filters = trim($filters); if (!empty($filters)) { $filterArray = array_filter(explode(',', $filters), function ($value){ return trim($...
php
protected function parseFilters($filters) { $parsed = []; if (!empty($filters) && is_string($filters)) { $filters = trim($filters); if (!empty($filters)) { $filterArray = array_filter(explode(',', $filters), function ($value){ return trim($...
[ "protected", "function", "parseFilters", "(", "$", "filters", ")", "{", "$", "parsed", "=", "[", "]", ";", "if", "(", "!", "empty", "(", "$", "filters", ")", "&&", "is_string", "(", "$", "filters", ")", ")", "{", "$", "filters", "=", "trim", "(", ...
Parses filter string @param string $filters @return array
[ "Parses", "filter", "string" ]
06747c83f03d51693d212d948dd5d49f098192ca
https://github.com/dreamfactorysoftware/df-user/blob/06747c83f03d51693d212d948dd5d49f098192ca/src/Components/AlternateAuth.php#L356-L378
30,520
ICEPAY/deprecated-i
src/icepay_api_pbm.php
Icepay_Api_Pbm.createLink
public function createLink(Icepay_Pbm_Object $pbmObject) { $this->validateSettings(); $linkObj = new StdClass(); $linkObj->merchantid = $this->getMerchantID(); $linkObj->timestamp = $this->getTimestamp(); $linkObj->amount = $pbmObject->getAmount(); $linkObj->...
php
public function createLink(Icepay_Pbm_Object $pbmObject) { $this->validateSettings(); $linkObj = new StdClass(); $linkObj->merchantid = $this->getMerchantID(); $linkObj->timestamp = $this->getTimestamp(); $linkObj->amount = $pbmObject->getAmount(); $linkObj->...
[ "public", "function", "createLink", "(", "Icepay_Pbm_Object", "$", "pbmObject", ")", "{", "$", "this", "->", "validateSettings", "(", ")", ";", "$", "linkObj", "=", "new", "StdClass", "(", ")", ";", "$", "linkObj", "->", "merchantid", "=", "$", "this", "...
Create a PBM link @since 1.0.0 @param Icepay_Pbm_Object $pbmObject @return string
[ "Create", "a", "PBM", "link" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_pbm.php#L78-L97
30,521
ICEPAY/deprecated-i
src/icepay_api_pbm.php
Icepay_Api_Pbm.generateURL
private function generateURL($parameters) { $ch = curl_init(); $parameters = http_build_query($parameters); curl_setopt($ch, CURLOPT_URL, $this->url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIE...
php
private function generateURL($parameters) { $ch = curl_init(); $parameters = http_build_query($parameters); curl_setopt($ch, CURLOPT_URL, $this->url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIE...
[ "private", "function", "generateURL", "(", "$", "parameters", ")", "{", "$", "ch", "=", "curl_init", "(", ")", ";", "$", "parameters", "=", "http_build_query", "(", "$", "parameters", ")", ";", "curl_setopt", "(", "$", "ch", ",", "CURLOPT_URL", ",", "$",...
Calls PBM platform and returns generated PBM link @since 1.0.0 @param object $parameters @return string
[ "Calls", "PBM", "platform", "and", "returns", "generated", "PBM", "link" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_pbm.php#L106-L122
30,522
ICEPAY/deprecated-i
src/icepay_api_pbm.php
Icepay_Api_Pbm.generateChecksum
private function generateChecksum($linkObj) { $arr = (array)$linkObj; $arr[] = $this->getSecretCode(); return sha1(implode("|", $arr)); }
php
private function generateChecksum($linkObj) { $arr = (array)$linkObj; $arr[] = $this->getSecretCode(); return sha1(implode("|", $arr)); }
[ "private", "function", "generateChecksum", "(", "$", "linkObj", ")", "{", "$", "arr", "=", "(", "array", ")", "$", "linkObj", ";", "$", "arr", "[", "]", "=", "$", "this", "->", "getSecretCode", "(", ")", ";", "return", "sha1", "(", "implode", "(", ...
Generates PBM checksum @since 1.0.0 @param obj $linkObj @return string
[ "Generates", "PBM", "checksum" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_pbm.php#L131-L137
30,523
ICEPAY/deprecated-i
src/icepay_api_pbm.php
Icepay_Api_Pbm.validateSettings
private function validateSettings() { // Validate Merchant ID if (!Icepay_Parameter_Validation::merchantID($this->getMerchantID())) throw new Exception('Merchant ID not set, use the setMerchantID() method', 1001); // Validate SecretCode if (!Icepay_Parameter_Validation::...
php
private function validateSettings() { // Validate Merchant ID if (!Icepay_Parameter_Validation::merchantID($this->getMerchantID())) throw new Exception('Merchant ID not set, use the setMerchantID() method', 1001); // Validate SecretCode if (!Icepay_Parameter_Validation::...
[ "private", "function", "validateSettings", "(", ")", "{", "// Validate Merchant ID", "if", "(", "!", "Icepay_Parameter_Validation", "::", "merchantID", "(", "$", "this", "->", "getMerchantID", "(", ")", ")", ")", "throw", "new", "Exception", "(", "'Merchant ID not...
Validate the merchant settings @since 1.0.0 @throws Exception
[ "Validate", "the", "merchant", "settings" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_pbm.php#L145-L154
30,524
SIELOnline/libAcumulus
src/Invoice/CompletorStrategyBase.php
CompletorStrategyBase.getName
public function getName() { $nsClass = get_class($this); $nsClass = substr($nsClass, strrpos($nsClass, '\\') + 1); return $nsClass; }
php
public function getName() { $nsClass = get_class($this); $nsClass = substr($nsClass, strrpos($nsClass, '\\') + 1); return $nsClass; }
[ "public", "function", "getName", "(", ")", "{", "$", "nsClass", "=", "get_class", "(", "$", "this", ")", ";", "$", "nsClass", "=", "substr", "(", "$", "nsClass", ",", "strrpos", "(", "$", "nsClass", ",", "'\\\\'", ")", "+", "1", ")", ";", "return",...
Returns the non namespaced name of the current strategy. @return string
[ "Returns", "the", "non", "namespaced", "name", "of", "the", "current", "strategy", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Invoice/CompletorStrategyBase.php#L134-L139
30,525
SIELOnline/libAcumulus
src/Invoice/CompletorStrategyBase.php
CompletorStrategyBase.initAmounts
protected function initAmounts() { $invoicePart = &$this->invoice[Tag::Customer][Tag::Invoice]; $this->vatAmount = isset($invoicePart[Meta::InvoiceVatAmount]) ? $invoicePart[Meta::InvoiceVatAmount] : $invoicePart[Meta::InvoiceAmountInc] - $invoicePart[Meta::InvoiceAmount]; $this->invoiceAmou...
php
protected function initAmounts() { $invoicePart = &$this->invoice[Tag::Customer][Tag::Invoice]; $this->vatAmount = isset($invoicePart[Meta::InvoiceVatAmount]) ? $invoicePart[Meta::InvoiceVatAmount] : $invoicePart[Meta::InvoiceAmountInc] - $invoicePart[Meta::InvoiceAmount]; $this->invoiceAmou...
[ "protected", "function", "initAmounts", "(", ")", "{", "$", "invoicePart", "=", "&", "$", "this", "->", "invoice", "[", "Tag", "::", "Customer", "]", "[", "Tag", "::", "Invoice", "]", ";", "$", "this", "->", "vatAmount", "=", "isset", "(", "$", "invo...
Initializes the amount properties. to be able to calculate the amounts, at least 2 of the 3 meta amounts meta-invoice-vatamount, meta-invoice-amountinc, or meta-invoice-amount must be known.
[ "Initializes", "the", "amount", "properties", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Invoice/CompletorStrategyBase.php#L199-L219
30,526
SIELOnline/libAcumulus
src/Invoice/CompletorStrategyBase.php
CompletorStrategyBase.getVatBreakDownMinRate
protected function getVatBreakDownMinRate() { $result = array(Tag::VatRate => PHP_INT_MAX); foreach ($this->vatBreakdown as $breakDown) { if ($breakDown[Tag::VatRate] < $result[Tag::VatRate]) { $result = $breakDown; } } return $result; }
php
protected function getVatBreakDownMinRate() { $result = array(Tag::VatRate => PHP_INT_MAX); foreach ($this->vatBreakdown as $breakDown) { if ($breakDown[Tag::VatRate] < $result[Tag::VatRate]) { $result = $breakDown; } } return $result; }
[ "protected", "function", "getVatBreakDownMinRate", "(", ")", "{", "$", "result", "=", "array", "(", "Tag", "::", "VatRate", "=>", "PHP_INT_MAX", ")", ";", "foreach", "(", "$", "this", "->", "vatBreakdown", "as", "$", "breakDown", ")", "{", "if", "(", "$"...
Returns the minimum vat rate on the invoice. @return array A vat rate overview: array with keys vatrate, vatamount, amount, count.
[ "Returns", "the", "minimum", "vat", "rate", "on", "the", "invoice", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Invoice/CompletorStrategyBase.php#L272-L281
30,527
SIELOnline/libAcumulus
src/Invoice/CompletorStrategyBase.php
CompletorStrategyBase.apply
public function apply() { $this->replacingLines = array(); $this->init(); if ($this->checkPreconditions()) { return $this->execute(); } else { if (!empty($this->invoice[Tag::Customer][Tag::Invoice][Meta::CompletorStrategyPreconditionFailed])) { ...
php
public function apply() { $this->replacingLines = array(); $this->init(); if ($this->checkPreconditions()) { return $this->execute(); } else { if (!empty($this->invoice[Tag::Customer][Tag::Invoice][Meta::CompletorStrategyPreconditionFailed])) { ...
[ "public", "function", "apply", "(", ")", "{", "$", "this", "->", "replacingLines", "=", "array", "(", ")", ";", "$", "this", "->", "init", "(", ")", ";", "if", "(", "$", "this", "->", "checkPreconditions", "(", ")", ")", "{", "return", "$", "this",...
Applies the strategy to see if it results in a valid solution. @return bool Success.
[ "Applies", "the", "strategy", "to", "see", "if", "it", "results", "in", "a", "valid", "solution", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Invoice/CompletorStrategyBase.php#L323-L338
30,528
SIELOnline/libAcumulus
src/Shop/BatchForm.php
BatchForm.getInvoiceSourceReferenceList
protected function getInvoiceSourceReferenceList(array $invoiceSources) { $result = array(); foreach ($invoiceSources as $invoiceSource) { $result[] = $invoiceSource->getReference(); } return '{' . implode(',', $result) . '}'; }
php
protected function getInvoiceSourceReferenceList(array $invoiceSources) { $result = array(); foreach ($invoiceSources as $invoiceSource) { $result[] = $invoiceSource->getReference(); } return '{' . implode(',', $result) . '}'; }
[ "protected", "function", "getInvoiceSourceReferenceList", "(", "array", "$", "invoiceSources", ")", "{", "$", "result", "=", "array", "(", ")", ";", "foreach", "(", "$", "invoiceSources", "as", "$", "invoiceSource", ")", "{", "$", "result", "[", "]", "=", ...
Returns a formatted string with the list of ids of the given sources. @param \Siel\Acumulus\Invoice\Source[] $invoiceSources @return string A loggable (formatted) string with a list of ids of the sources.
[ "Returns", "a", "formatted", "string", "with", "the", "list", "of", "ids", "of", "the", "given", "sources", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Shop/BatchForm.php#L303-L310
30,529
SIELOnline/libAcumulus
src/Shop/InvoiceManager.php
InvoiceManager.getSourcesByIdsOrSources
public function getSourcesByIdsOrSources($invoiceSourceType, array $idsOrSources) { $results = array(); foreach ($idsOrSources as $sourceId) { $results[] = $this->getSourceByIdOrSource($invoiceSourceType, $sourceId); } return $results; }
php
public function getSourcesByIdsOrSources($invoiceSourceType, array $idsOrSources) { $results = array(); foreach ($idsOrSources as $sourceId) { $results[] = $this->getSourceByIdOrSource($invoiceSourceType, $sourceId); } return $results; }
[ "public", "function", "getSourcesByIdsOrSources", "(", "$", "invoiceSourceType", ",", "array", "$", "idsOrSources", ")", "{", "$", "results", "=", "array", "(", ")", ";", "foreach", "(", "$", "idsOrSources", "as", "$", "sourceId", ")", "{", "$", "results", ...
Creates a set of Invoice Sources given their ids or shop specific sources. @param string $invoiceSourceType @param array $idsOrSources An array with shop specific orders or credit notes or just their ids. @return \Siel\Acumulus\Invoice\Source[] A non keyed array with invoice Sources.
[ "Creates", "a", "set", "of", "Invoice", "Sources", "given", "their", "ids", "or", "shop", "specific", "sources", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Shop/InvoiceManager.php#L228-L235
30,530
SIELOnline/libAcumulus
src/Shop/InvoiceManager.php
InvoiceManager.sendMultiple
public function sendMultiple(array $invoiceSources, $forceSend, $dryRun, array &$log) { $this->getTranslator()->add(new ResultTranslations()); $errorLogged = false; $success = true; $time_limit = ini_get('max_execution_time'); foreach ($invoiceSources as $invoiceSource) { ...
php
public function sendMultiple(array $invoiceSources, $forceSend, $dryRun, array &$log) { $this->getTranslator()->add(new ResultTranslations()); $errorLogged = false; $success = true; $time_limit = ini_get('max_execution_time'); foreach ($invoiceSources as $invoiceSource) { ...
[ "public", "function", "sendMultiple", "(", "array", "$", "invoiceSources", ",", "$", "forceSend", ",", "$", "dryRun", ",", "array", "&", "$", "log", ")", "{", "$", "this", "->", "getTranslator", "(", ")", "->", "add", "(", "new", "ResultTranslations", "(...
Sends multiple invoices to Acumulus. @param \Siel\Acumulus\Invoice\Source[] $invoiceSources @param bool $forceSend If true, force sending the invoices even if an invoice has already been sent for a given invoice source. @param bool $dryRun If true, return the reason/status only but do not actually send the invoice, no...
[ "Sends", "multiple", "invoices", "to", "Acumulus", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Shop/InvoiceManager.php#L267-L291
30,531
SIELOnline/libAcumulus
src/Shop/InvoiceManager.php
InvoiceManager.send1
public function send1(Source $invoiceSource, $forceSend) { $this->getTranslator()->add(new ResultTranslations()); $result = $this->getInvoiceResult('InvoiceManager::send1()'); $result = $this->createAndSend($invoiceSource, $result, $forceSend); $success = !$result->hasError(); ...
php
public function send1(Source $invoiceSource, $forceSend) { $this->getTranslator()->add(new ResultTranslations()); $result = $this->getInvoiceResult('InvoiceManager::send1()'); $result = $this->createAndSend($invoiceSource, $result, $forceSend); $success = !$result->hasError(); ...
[ "public", "function", "send1", "(", "Source", "$", "invoiceSource", ",", "$", "forceSend", ")", "{", "$", "this", "->", "getTranslator", "(", ")", "->", "add", "(", "new", "ResultTranslations", "(", ")", ")", ";", "$", "result", "=", "$", "this", "->",...
Sends 1 invoice to Acumulus. @param \Siel\Acumulus\Invoice\Source $invoiceSource The invoice source to send the invoice for. @param bool $forceSend If true, force sending the invoices even if an invoice has already been sent for a given invoice source. @return bool Success.
[ "Sends", "1", "invoice", "to", "Acumulus", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Shop/InvoiceManager.php#L304-L312
30,532
SIELOnline/libAcumulus
src/Shop/InvoiceManager.php
InvoiceManager.sourceStatusChange
public function sourceStatusChange(Source $invoiceSource) { $result = $this->getInvoiceResult('InvoiceManager::sourceStatusChange()'); $status = $invoiceSource->getStatus(); $shopEventSettings = $this->getConfig()->getShopEventSettings(); if ($invoiceSource->getType() === Source::Ord...
php
public function sourceStatusChange(Source $invoiceSource) { $result = $this->getInvoiceResult('InvoiceManager::sourceStatusChange()'); $status = $invoiceSource->getStatus(); $shopEventSettings = $this->getConfig()->getShopEventSettings(); if ($invoiceSource->getType() === Source::Ord...
[ "public", "function", "sourceStatusChange", "(", "Source", "$", "invoiceSource", ")", "{", "$", "result", "=", "$", "this", "->", "getInvoiceResult", "(", "'InvoiceManager::sourceStatusChange()'", ")", ";", "$", "status", "=", "$", "invoiceSource", "->", "getStatu...
Processes an invoice source status change event. For now we don't look at credit note statuses, they are always sent. @param \Siel\Acumulus\Invoice\Source $invoiceSource The source whose status has changed. @return \Siel\Acumulus\Invoice\Result The result of sending (or not sending) the invoice.
[ "Processes", "an", "invoice", "source", "status", "change", "event", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Shop/InvoiceManager.php#L325-L349
30,533
SIELOnline/libAcumulus
src/Shop/InvoiceManager.php
InvoiceManager.invoiceCreate
public function invoiceCreate(Source $invoiceSource) { $result = $this->getInvoiceResult('InvoiceManager::invoiceCreate()'); $shopEventSettings = $this->getConfig()->getShopEventSettings(); if ($shopEventSettings['triggerInvoiceEvent'] == PluginConfig::TriggerInvoiceEvent_Create) { ...
php
public function invoiceCreate(Source $invoiceSource) { $result = $this->getInvoiceResult('InvoiceManager::invoiceCreate()'); $shopEventSettings = $this->getConfig()->getShopEventSettings(); if ($shopEventSettings['triggerInvoiceEvent'] == PluginConfig::TriggerInvoiceEvent_Create) { ...
[ "public", "function", "invoiceCreate", "(", "Source", "$", "invoiceSource", ")", "{", "$", "result", "=", "$", "this", "->", "getInvoiceResult", "(", "'InvoiceManager::invoiceCreate()'", ")", ";", "$", "shopEventSettings", "=", "$", "this", "->", "getConfig", "(...
Processes an invoice create event. @param \Siel\Acumulus\Invoice\Source $invoiceSource The source for which a shop invoice was created. @return \Siel\Acumulus\Invoice\Result The result of sending (or not sending) the invoice.
[ "Processes", "an", "invoice", "create", "event", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Shop/InvoiceManager.php#L360-L371
30,534
SIELOnline/libAcumulus
src/Shop/InvoiceManager.php
InvoiceManager.invoiceSend
public function invoiceSend(Source $invoiceSource) { $result = $this->getInvoiceResult('InvoiceManager::invoiceSend()'); $shopEventSettings = $this->getConfig()->getShopEventSettings(); if ($shopEventSettings['triggerInvoiceEvent'] == PluginConfig::TriggerInvoiceEvent_Send) { $re...
php
public function invoiceSend(Source $invoiceSource) { $result = $this->getInvoiceResult('InvoiceManager::invoiceSend()'); $shopEventSettings = $this->getConfig()->getShopEventSettings(); if ($shopEventSettings['triggerInvoiceEvent'] == PluginConfig::TriggerInvoiceEvent_Send) { $re...
[ "public", "function", "invoiceSend", "(", "Source", "$", "invoiceSource", ")", "{", "$", "result", "=", "$", "this", "->", "getInvoiceResult", "(", "'InvoiceManager::invoiceSend()'", ")", ";", "$", "shopEventSettings", "=", "$", "this", "->", "getConfig", "(", ...
Processes a shop invoice send event. This is the invoice created by the shop and that is now sent/mailed to the customer. @param \Siel\Acumulus\Invoice\Source $invoiceSource The source for which a shop invoice was created. @return \Siel\Acumulus\Invoice\Result The result of sending (or not sending) the invoice.
[ "Processes", "a", "shop", "invoice", "send", "event", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Shop/InvoiceManager.php#L385-L396
30,535
SIELOnline/libAcumulus
src/Shop/InvoiceManager.php
InvoiceManager.createAndSend
protected function createAndSend(Source $invoiceSource, Result $result, $forceSend = false, $dryRun = false) { $acumulusEntry = null; if ($this->isTestMode()) { $result->setSendStatus(Result::Send_TestMode); } elseif (($acumulusEntry = $this->getAcumulusEntryManager()->getByInvoi...
php
protected function createAndSend(Source $invoiceSource, Result $result, $forceSend = false, $dryRun = false) { $acumulusEntry = null; if ($this->isTestMode()) { $result->setSendStatus(Result::Send_TestMode); } elseif (($acumulusEntry = $this->getAcumulusEntryManager()->getByInvoi...
[ "protected", "function", "createAndSend", "(", "Source", "$", "invoiceSource", ",", "Result", "$", "result", ",", "$", "forceSend", "=", "false", ",", "$", "dryRun", "=", "false", ")", "{", "$", "acumulusEntry", "=", "null", ";", "if", "(", "$", "this", ...
Creates and sends an invoice to Acumulus for an order. @param \Siel\Acumulus\Invoice\Source $invoiceSource The source object (order, credit note) for which the invoice was created. @param \Siel\Acumulus\Invoice\Result $result @param bool $forceSend If true, force sending the invoice even if an invoice has already been...
[ "Creates", "and", "sends", "an", "invoice", "to", "Acumulus", "for", "an", "order", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Shop/InvoiceManager.php#L415-L471
30,536
SIELOnline/libAcumulus
src/Shop/InvoiceManager.php
InvoiceManager.lockAndSend
protected function lockAndSend(array $invoice, Source $invoiceSource, Result $result) { $doLock = !$this->isTestMode() && in_array($result->getSendStatus(), array(Result::Send_New, Result::Send_LockExpired)); if ($doLock) { // Check if we may expect an expired lock and, if so, remove it...
php
protected function lockAndSend(array $invoice, Source $invoiceSource, Result $result) { $doLock = !$this->isTestMode() && in_array($result->getSendStatus(), array(Result::Send_New, Result::Send_LockExpired)); if ($doLock) { // Check if we may expect an expired lock and, if so, remove it...
[ "protected", "function", "lockAndSend", "(", "array", "$", "invoice", ",", "Source", "$", "invoiceSource", ",", "Result", "$", "result", ")", "{", "$", "doLock", "=", "!", "$", "this", "->", "isTestMode", "(", ")", "&&", "in_array", "(", "$", "result", ...
Locks, if needed, the invoice for sending and, if acquired, sends it. NOTE: the mechanism used to lock and verify if we got the lock is not atomic, nor fool proof for all possible situations. However, it is a relatively easy to understand solution that will catch 99,9% of the situations. If double sending still occurs...
[ "Locks", "if", "needed", "the", "invoice", "for", "sending", "and", "if", "acquired", "sends", "it", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Shop/InvoiceManager.php#L495-L543
30,537
SIELOnline/libAcumulus
src/Shop/InvoiceManager.php
InvoiceManager.doSend
protected function doSend(array $invoice, Source $invoiceSource, Result $result) { /** @var \Siel\Acumulus\Invoice\Result $result */ $result = $this->getService()->invoiceAdd($invoice, $result);// Store the reference between the source of the webshop invoice and the // Save Acumulus entry: ...
php
protected function doSend(array $invoice, Source $invoiceSource, Result $result) { /** @var \Siel\Acumulus\Invoice\Result $result */ $result = $this->getService()->invoiceAdd($invoice, $result);// Store the reference between the source of the webshop invoice and the // Save Acumulus entry: ...
[ "protected", "function", "doSend", "(", "array", "$", "invoice", ",", "Source", "$", "invoiceSource", ",", "Result", "$", "result", ")", "{", "/** @var \\Siel\\Acumulus\\Invoice\\Result $result */", "$", "result", "=", "$", "this", "->", "getService", "(", ")", ...
Unconditionally sends the invoice and update the Acumulus entries table. After sending the invoice: - A successful result gets saved to the acumulus entries table. - If an older submission exists, it will be deleted from Acumulus. @param \Siel\Acumulus\Invoice\Source $invoiceSource @param array $invoice @param \Siel\...
[ "Unconditionally", "sends", "the", "invoice", "and", "update", "the", "Acumulus", "entries", "table", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Shop/InvoiceManager.php#L560-L609
30,538
SIELOnline/libAcumulus
src/Shop/InvoiceManager.php
InvoiceManager.getCol
protected function getCol(array $dbResults, $key) { $results = array(); foreach ($dbResults as $dbResult) { $results[] = (int) $dbResult[$key]; } return $results; }
php
protected function getCol(array $dbResults, $key) { $results = array(); foreach ($dbResults as $dbResult) { $results[] = (int) $dbResult[$key]; } return $results; }
[ "protected", "function", "getCol", "(", "array", "$", "dbResults", ",", "$", "key", ")", "{", "$", "results", "=", "array", "(", ")", ";", "foreach", "(", "$", "dbResults", "as", "$", "dbResult", ")", "{", "$", "results", "[", "]", "=", "(", "int",...
Helper method to retrieve the values from 1 column of a query result. @param array $dbResults @param string $key @return int[]
[ "Helper", "method", "to", "retrieve", "the", "values", "from", "1", "column", "of", "a", "query", "result", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Shop/InvoiceManager.php#L731-L738
30,539
SIELOnline/libAcumulus
src/Shop/InvoiceManager.php
InvoiceManager.getSendResultLogText
protected function getSendResultLogText(Source $invoiceSource, Result $result, $addReqResp = Result::AddReqResp_WithOther) { $invoiceSourceText = sprintf($this->t('message_invoice_source'), $this->t($invoiceSource->getType()), $invoiceSource->getReference() ); $logMes...
php
protected function getSendResultLogText(Source $invoiceSource, Result $result, $addReqResp = Result::AddReqResp_WithOther) { $invoiceSourceText = sprintf($this->t('message_invoice_source'), $this->t($invoiceSource->getType()), $invoiceSource->getReference() ); $logMes...
[ "protected", "function", "getSendResultLogText", "(", "Source", "$", "invoiceSource", ",", "Result", "$", "result", ",", "$", "addReqResp", "=", "Result", "::", "AddReqResp_WithOther", ")", "{", "$", "invoiceSourceText", "=", "sprintf", "(", "$", "this", "->", ...
Returns a string that details the result of the invoice sending. @param \Siel\Acumulus\Invoice\Source $invoiceSource @param \Siel\Acumulus\Invoice\Result $result @param int $addReqResp Whether to add the raw request and response. One of the Result::AddReqResp_... constants @return string
[ "Returns", "a", "string", "that", "details", "the", "result", "of", "the", "invoice", "sending", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Shop/InvoiceManager.php#L752-L764
30,540
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_PaymentObject.loadBasicPaymentMethodClass
protected function loadBasicPaymentMethodClass() { if (!class_exists("Icepay_Api_Basic")) return $this; $this->pm_class = Icepay_Api_Basic::getInstance() ->readFolder() ->getClassByPaymentMethodCode($this->data->ic_paymentmethod); if (count($thi...
php
protected function loadBasicPaymentMethodClass() { if (!class_exists("Icepay_Api_Basic")) return $this; $this->pm_class = Icepay_Api_Basic::getInstance() ->readFolder() ->getClassByPaymentMethodCode($this->data->ic_paymentmethod); if (count($thi...
[ "protected", "function", "loadBasicPaymentMethodClass", "(", ")", "{", "if", "(", "!", "class_exists", "(", "\"Icepay_Api_Basic\"", ")", ")", "return", "$", "this", ";", "$", "this", "->", "pm_class", "=", "Icepay_Api_Basic", "::", "getInstance", "(", ")", "->...
Load a paymentmethod class for Basic @since version 2.1.0 @access protected
[ "Load", "a", "paymentmethod", "class", "for", "Basic" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L205-L219
30,541
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_PaymentObject.setCountry
public function setCountry($country) { $country = strtoupper($country); if (!Icepay_Parameter_Validation::country($country)) throw new Exception('Country not valid'); $this->data->ic_country = $country; return $this; }
php
public function setCountry($country) { $country = strtoupper($country); if (!Icepay_Parameter_Validation::country($country)) throw new Exception('Country not valid'); $this->data->ic_country = $country; return $this; }
[ "public", "function", "setCountry", "(", "$", "country", ")", "{", "$", "country", "=", "strtoupper", "(", "$", "country", ")", ";", "if", "(", "!", "Icepay_Parameter_Validation", "::", "country", "(", "$", "country", ")", ")", "throw", "new", "Exception",...
Set the country field @since version 1.0.0 @access public @param string $currency Country ISO 3166-1-alpha-2 code !Required @example setCountry("NL") // Netherlands
[ "Set", "the", "country", "field" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L239-L246
30,542
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_PaymentObject.setLanguage
public function setLanguage($lang) { if (!Icepay_Parameter_Validation::language($lang)) throw new Exception('Language not valid'); $this->data->ic_language = $lang; return $this; }
php
public function setLanguage($lang) { if (!Icepay_Parameter_Validation::language($lang)) throw new Exception('Language not valid'); $this->data->ic_language = $lang; return $this; }
[ "public", "function", "setLanguage", "(", "$", "lang", ")", "{", "if", "(", "!", "Icepay_Parameter_Validation", "::", "language", "(", "$", "lang", ")", ")", "throw", "new", "Exception", "(", "'Language not valid'", ")", ";", "$", "this", "->", "data", "->...
Set the language field @since version 1.0.0 @access public @param string $lang Language ISO 639-1 code !Required @example setLanguage("EN") // English
[ "Set", "the", "language", "field" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L268-L274
30,543
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_PaymentObject.setAmount
public function setAmount($amount) { $amount = (int) (string) $amount; if (!Icepay_Parameter_Validation::amount($amount)) throw new Exception('Amount not valid'); $this->data->ic_amount = $amount; return $this; }
php
public function setAmount($amount) { $amount = (int) (string) $amount; if (!Icepay_Parameter_Validation::amount($amount)) throw new Exception('Amount not valid'); $this->data->ic_amount = $amount; return $this; }
[ "public", "function", "setAmount", "(", "$", "amount", ")", "{", "$", "amount", "=", "(", "int", ")", "(", "string", ")", "$", "amount", ";", "if", "(", "!", "Icepay_Parameter_Validation", "::", "amount", "(", "$", "amount", ")", ")", "throw", "new", ...
Set the amount field @since version 1.0.0 @access public @param int $amount !Required
[ "Set", "the", "amount", "field" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L282-L290
30,544
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Api_Base.setMerchantID
public function setMerchantID($merchantID) { if (!Icepay_Parameter_Validation::merchantID($merchantID)) throw new Exception('MerchantID not valid'); $this->_merchantID = (int) $merchantID; return $this; }
php
public function setMerchantID($merchantID) { if (!Icepay_Parameter_Validation::merchantID($merchantID)) throw new Exception('MerchantID not valid'); $this->_merchantID = (int) $merchantID; return $this; }
[ "public", "function", "setMerchantID", "(", "$", "merchantID", ")", "{", "if", "(", "!", "Icepay_Parameter_Validation", "::", "merchantID", "(", "$", "merchantID", ")", ")", "throw", "new", "Exception", "(", "'MerchantID not valid'", ")", ";", "$", "this", "->...
Set the Merchant ID field @since 1.0.0 @access public @param (int) $merchantID
[ "Set", "the", "Merchant", "ID", "field" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L691-L699
30,545
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Api_Base.setSecretCode
public function setSecretCode($secretCode) { if (!Icepay_Parameter_Validation::secretCode($secretCode)) throw new Exception('Secretcode not valid'); $this->_secretCode = (string) $secretCode; return $this; }
php
public function setSecretCode($secretCode) { if (!Icepay_Parameter_Validation::secretCode($secretCode)) throw new Exception('Secretcode not valid'); $this->_secretCode = (string) $secretCode; return $this; }
[ "public", "function", "setSecretCode", "(", "$", "secretCode", ")", "{", "if", "(", "!", "Icepay_Parameter_Validation", "::", "secretCode", "(", "$", "secretCode", ")", ")", "throw", "new", "Exception", "(", "'Secretcode not valid'", ")", ";", "$", "this", "->...
Set the Secret Code field @since 1.0.0 @access public @param (string) $secretCode
[ "Set", "the", "Secret", "Code", "field" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L718-L725
30,546
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Api_Base.setPinCode
public function setPinCode($pinCode) { if (!Icepay_Parameter_Validation::pinCode($pinCode)) throw new Exception('Pincode not valid'); $this->_pinCode = (string) $pinCode; return $this; }
php
public function setPinCode($pinCode) { if (!Icepay_Parameter_Validation::pinCode($pinCode)) throw new Exception('Pincode not valid'); $this->_pinCode = (string) $pinCode; return $this; }
[ "public", "function", "setPinCode", "(", "$", "pinCode", ")", "{", "if", "(", "!", "Icepay_Parameter_Validation", "::", "pinCode", "(", "$", "pinCode", ")", ")", "throw", "new", "Exception", "(", "'Pincode not valid'", ")", ";", "$", "this", "->", "_pinCode"...
Set the Pin Code field @since 1.0.1 @access public @param (int) $pinCode
[ "Set", "the", "Pin", "Code", "field" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L744-L752
30,547
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Api_Logger.logToFunction
public function logToFunction($className = null, $logFunction = null, $bool = true) { $this->_logToHook = $bool; if (class_exists($className)) $this->_logHookClass = new $className; if (is_callable($logFunction)) $this->_logHookFunc = $logFunction; return $...
php
public function logToFunction($className = null, $logFunction = null, $bool = true) { $this->_logToHook = $bool; if (class_exists($className)) $this->_logHookClass = new $className; if (is_callable($logFunction)) $this->_logHookFunc = $logFunction; return $...
[ "public", "function", "logToFunction", "(", "$", "className", "=", "null", ",", "$", "logFunction", "=", "null", ",", "$", "bool", "=", "true", ")", "{", "$", "this", "->", "_logToHook", "=", "$", "bool", ";", "if", "(", "class_exists", "(", "$", "cl...
Enable or disable logging to a hooked class @since 2.1.0 @access public @param string $className @param string $logFunction @param bool $bool @return \Icepay_Basicmode
[ "Enable", "or", "disable", "logging", "to", "a", "hooked", "class" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L1020-L1031
30,548
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Api_Logger.setLoggingLevel
public function setLoggingLevel($level) { switch ($level) { case Icepay_Api_Logger::LEVEL_ALL: $this->_setLoggingFlag(Icepay_Api_Logger::NOTICE); $this->_setLoggingFlag(Icepay_Api_Logger::TRANSACTION); $this->_setLoggingFlag(Icepay_Api_Logger::ERRO...
php
public function setLoggingLevel($level) { switch ($level) { case Icepay_Api_Logger::LEVEL_ALL: $this->_setLoggingFlag(Icepay_Api_Logger::NOTICE); $this->_setLoggingFlag(Icepay_Api_Logger::TRANSACTION); $this->_setLoggingFlag(Icepay_Api_Logger::ERRO...
[ "public", "function", "setLoggingLevel", "(", "$", "level", ")", "{", "switch", "(", "$", "level", ")", "{", "case", "Icepay_Api_Logger", "::", "LEVEL_ALL", ":", "$", "this", "->", "_setLoggingFlag", "(", "Icepay_Api_Logger", "::", "NOTICE", ")", ";", "$", ...
Set the logging level @since 2.1.0 @access public @param int $level
[ "Set", "the", "logging", "level" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L1072-L1098
30,549
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Api_Logger.log
public function log($line, $level = 1) { // Check if logging is enabled if (!$this->_loggingEnabled) return false; // Check if the level is within the required level if (!$this->_isLoggingSet($level)) return false; $dateTime = date("H:i:s", time()); ...
php
public function log($line, $level = 1) { // Check if logging is enabled if (!$this->_loggingEnabled) return false; // Check if the level is within the required level if (!$this->_isLoggingSet($level)) return false; $dateTime = date("H:i:s", time()); ...
[ "public", "function", "log", "(", "$", "line", ",", "$", "level", "=", "1", ")", "{", "// Check if logging is enabled", "if", "(", "!", "$", "this", "->", "_loggingEnabled", ")", "return", "false", ";", "// Check if the level is within the required level", "if", ...
Log given line @since 2.1.0 @access public @param string $line @param int $level @return boolean @throws Exception
[ "Log", "given", "line" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L1142-L1178
30,550
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Postback.getTransactionString
public function getTransactionString() { return sprintf( "Paymentmethod: %s \n| OrderID: %s \n| Status: %s \n| StatusCode: %s \n| PaymentID: %s \n| TransactionID: %s \n| Amount: %s", isset($this->data->paymentMethod) ? $this->data->paymentMethod : "", isset($this->data->orderID) ? $this->dat...
php
public function getTransactionString() { return sprintf( "Paymentmethod: %s \n| OrderID: %s \n| Status: %s \n| StatusCode: %s \n| PaymentID: %s \n| TransactionID: %s \n| Amount: %s", isset($this->data->paymentMethod) ? $this->data->paymentMethod : "", isset($this->data->orderID) ? $this->dat...
[ "public", "function", "getTransactionString", "(", ")", "{", "return", "sprintf", "(", "\"Paymentmethod: %s \\n| OrderID: %s \\n| Status: %s \\n| StatusCode: %s \\n| PaymentID: %s \\n| TransactionID: %s \\n| Amount: %s\"", ",", "isset", "(", "$", "this", "->", "data", "->", "paym...
Return minimized transactional data @since version 1.0.0 @access public @return string
[ "Return", "minimized", "transactional", "data" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L1231-L1236
30,551
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Postback.generateChecksumForPostback
protected function generateChecksumForPostback() { return sha1( sprintf("%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s", $this->_secretCode, $this->_merchantID, $this->data->status, $this->data->statusCode, $this->data->orderID, $this->data->paymentID, $this->data->reference, $this->data->transactionI...
php
protected function generateChecksumForPostback() { return sha1( sprintf("%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s", $this->_secretCode, $this->_merchantID, $this->data->status, $this->data->statusCode, $this->data->orderID, $this->data->paymentID, $this->data->reference, $this->data->transactionI...
[ "protected", "function", "generateChecksumForPostback", "(", ")", "{", "return", "sha1", "(", "sprintf", "(", "\"%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s\"", ",", "$", "this", "->", "_secretCode", ",", "$", "this", "->", "_merchantID", ",", "$", "this", "->", "data", ...
Return the postback checksum @since version 1.0.0 @access protected @return string SHA1 encoded
[ "Return", "the", "postback", "checksum" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L1266-L1272
30,552
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Postback.generateChecksumForVersion
protected function generateChecksumForVersion() { return sha1( sprintf("%s|%s|%s|%s", $this->_secretCode, $this->_merchantID, $this->data->status, substr(strval(time()), 0, 8) ) ); }
php
protected function generateChecksumForVersion() { return sha1( sprintf("%s|%s|%s|%s", $this->_secretCode, $this->_merchantID, $this->data->status, substr(strval(time()), 0, 8) ) ); }
[ "protected", "function", "generateChecksumForVersion", "(", ")", "{", "return", "sha1", "(", "sprintf", "(", "\"%s|%s|%s|%s\"", ",", "$", "this", "->", "_secretCode", ",", "$", "this", "->", "_merchantID", ",", "$", "this", "->", "data", "->", "status", ",",...
Return the version checksum @since version 1.0.2 @access protected @return string SHA1 encoded
[ "Return", "the", "version", "checksum" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L1280-L1286
30,553
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Postback.validateVersion
public function validateVersion() { if ($_SERVER['REQUEST_METHOD'] != 'POST') { $this->_logger->log('Invalid request method', Icepay_Api_Logger::ERROR); return false; } if ($this->generateChecksumForVersion() != $this->data->checksum) { $this->_logger->lo...
php
public function validateVersion() { if ($_SERVER['REQUEST_METHOD'] != 'POST') { $this->_logger->log('Invalid request method', Icepay_Api_Logger::ERROR); return false; } if ($this->generateChecksumForVersion() != $this->data->checksum) { $this->_logger->lo...
[ "public", "function", "validateVersion", "(", ")", "{", "if", "(", "$", "_SERVER", "[", "'REQUEST_METHOD'", "]", "!=", "'POST'", ")", "{", "$", "this", "->", "_logger", "->", "log", "(", "'Invalid request method'", ",", "Icepay_Api_Logger", "::", "ERROR", ")...
Validate for version check @since version 1.0.2 @access public @return boolean
[ "Validate", "for", "version", "check" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L1328-L1341
30,554
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Postback.isVersionCheck
public function isVersionCheck() { if ($_SERVER['REQUEST_METHOD'] != 'POST') { $this->_logger->log('Invalid request method', Icepay_Api_Logger::ERROR); return false; } if ($this->data->status != "VCHECK") return false; return true; }
php
public function isVersionCheck() { if ($_SERVER['REQUEST_METHOD'] != 'POST') { $this->_logger->log('Invalid request method', Icepay_Api_Logger::ERROR); return false; } if ($this->data->status != "VCHECK") return false; return true; }
[ "public", "function", "isVersionCheck", "(", ")", "{", "if", "(", "$", "_SERVER", "[", "'REQUEST_METHOD'", "]", "!=", "'POST'", ")", "{", "$", "this", "->", "_logger", "->", "log", "(", "'Invalid request method'", ",", "Icepay_Api_Logger", "::", "ERROR", ")"...
Has Version Check status @since version 1.0.2 @access public @return boolean
[ "Has", "Version", "Check", "status" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L1349-L1360
30,555
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Postback.validate
public function validate() { if ($_SERVER['REQUEST_METHOD'] != 'POST') { $this->_logger->log("Invalid request method", Icepay_Api_Logger::ERROR); return false; }; $this->_logger->log(sprintf("Postback: %s", serialize($_POST)), Icepay_Api_Logger::TRANSACTION); ...
php
public function validate() { if ($_SERVER['REQUEST_METHOD'] != 'POST') { $this->_logger->log("Invalid request method", Icepay_Api_Logger::ERROR); return false; }; $this->_logger->log(sprintf("Postback: %s", serialize($_POST)), Icepay_Api_Logger::TRANSACTION); ...
[ "public", "function", "validate", "(", ")", "{", "if", "(", "$", "_SERVER", "[", "'REQUEST_METHOD'", "]", "!=", "'POST'", ")", "{", "$", "this", "->", "_logger", "->", "log", "(", "\"Invalid request method\"", ",", "Icepay_Api_Logger", "::", "ERROR", ")", ...
Validate the postback data @since version 1.0.0 @access public @return boolean
[ "Validate", "the", "postback", "data" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L1368-L1417
30,556
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Postback.canUpdateStatus
public function canUpdateStatus($currentStatus) { if (!isset($this->data->status)) { $this->_logger->log("Status not set", Icepay_Api_Logger::ERROR); return false; } switch ($this->data->status) { case Icepay_StatusCode::SUCCESS: return ($currentStatus ==...
php
public function canUpdateStatus($currentStatus) { if (!isset($this->data->status)) { $this->_logger->log("Status not set", Icepay_Api_Logger::ERROR); return false; } switch ($this->data->status) { case Icepay_StatusCode::SUCCESS: return ($currentStatus ==...
[ "public", "function", "canUpdateStatus", "(", "$", "currentStatus", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "data", "->", "status", ")", ")", "{", "$", "this", "->", "_logger", "->", "log", "(", "\"Status not set\"", ",", "Icepay_Api_L...
Check between ICEPAY statuscodes whether the status can be updated. @since version 1.0.0 @access public @param string $currentStatus The ICEPAY statuscode of the order before a statuschange @return boolean
[ "Check", "between", "ICEPAY", "statuscodes", "whether", "the", "status", "can", "be", "updated", "." ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L1437-L1454
30,557
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Result.validate
public function validate() { if ($_SERVER['REQUEST_METHOD'] != 'GET') { $this->_logger->log("Invalid request method", Icepay_Api_Logger::ERROR); return false; } $this->_logger->log(sprintf("Page data: %s", serialize($_GET)), Icepay_Api_Logger::NOTICE); $this...
php
public function validate() { if ($_SERVER['REQUEST_METHOD'] != 'GET') { $this->_logger->log("Invalid request method", Icepay_Api_Logger::ERROR); return false; } $this->_logger->log(sprintf("Page data: %s", serialize($_GET)), Icepay_Api_Logger::NOTICE); $this...
[ "public", "function", "validate", "(", ")", "{", "if", "(", "$", "_SERVER", "[", "'REQUEST_METHOD'", "]", "!=", "'GET'", ")", "{", "$", "this", "->", "_logger", "->", "log", "(", "\"Invalid request method\"", ",", "Icepay_Api_Logger", "::", "ERROR", ")", "...
Validate the ICEPAY GET data @since version 1.0.0 @access public @return boolean
[ "Validate", "the", "ICEPAY", "GET", "data" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L1479-L1503
30,558
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Result.getStatus
public function getStatus($includeStatusCode = false) { if (!isset($this->data->status)) return null; return ($includeStatusCode) ? sprintf("%s: %s", $this->data->status, $this->data->statusCode) : $this->data->status; }
php
public function getStatus($includeStatusCode = false) { if (!isset($this->data->status)) return null; return ($includeStatusCode) ? sprintf("%s: %s", $this->data->status, $this->data->statusCode) : $this->data->status; }
[ "public", "function", "getStatus", "(", "$", "includeStatusCode", "=", "false", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "data", "->", "status", ")", ")", "return", "null", ";", "return", "(", "$", "includeStatusCode", ")", "?", "spri...
Get the ICEPAY status @since version 1.0.0 @access public @param boolean $includeStatusCode Add the statuscode message to the returned string for display purposes @return string ICEPAY statuscode (and statuscode message)
[ "Get", "the", "ICEPAY", "status" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L1512-L1517
30,559
ICEPAY/deprecated-i
src/icepay_api_base.php
Icepay_Result.generateChecksumForPage
protected function generateChecksumForPage() { return sha1( sprintf("%s|%s|%s|%s|%s|%s|%s|%s", $this->_secretCode, $this->data->merchant, $this->data->status, $this->data->statusCode, $this->data->orderID, $this->data->paymentID, $this->data->reference, $this->data->transactionID ...
php
protected function generateChecksumForPage() { return sha1( sprintf("%s|%s|%s|%s|%s|%s|%s|%s", $this->_secretCode, $this->data->merchant, $this->data->status, $this->data->statusCode, $this->data->orderID, $this->data->paymentID, $this->data->reference, $this->data->transactionID ...
[ "protected", "function", "generateChecksumForPage", "(", ")", "{", "return", "sha1", "(", "sprintf", "(", "\"%s|%s|%s|%s|%s|%s|%s|%s\"", ",", "$", "this", "->", "_secretCode", ",", "$", "this", "->", "data", "->", "merchant", ",", "$", "this", "->", "data", ...
Return the result page checksum @since version 1.0.0 @access protected @return string SHA1 hash
[ "Return", "the", "result", "page", "checksum" ]
9a22271dfaea7f318a555c00d7e3f8cca9f2a28e
https://github.com/ICEPAY/deprecated-i/blob/9a22271dfaea7f318a555c00d7e3f8cca9f2a28e/src/icepay_api_base.php#L1536-L1542
30,560
SIELOnline/libAcumulus
src/Helpers/Form.php
Form.addWarningMessages
public function addWarningMessages($message) { if (!empty($message)) { if (is_array($message)) { $this->warningMessages = array_merge($this->warningMessages, $message); } else { $this->warningMessages[] = $message; } } retu...
php
public function addWarningMessages($message) { if (!empty($message)) { if (is_array($message)) { $this->warningMessages = array_merge($this->warningMessages, $message); } else { $this->warningMessages[] = $message; } } retu...
[ "public", "function", "addWarningMessages", "(", "$", "message", ")", "{", "if", "(", "!", "empty", "(", "$", "message", ")", ")", "{", "if", "(", "is_array", "(", "$", "message", ")", ")", "{", "$", "this", "->", "warningMessages", "=", "array_merge",...
Adds 1 or more warning messages. To be used by web shop specific form handling to add a message to the list of messages to display. @param string|string[] $message A warning message or an array of warning messages. If empty, nothing will be added. @return $this
[ "Adds", "1", "or", "more", "warning", "messages", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Helpers/Form.php#L232-L243
30,561
SIELOnline/libAcumulus
src/Helpers/Form.php
Form.addErrorMessages
public function addErrorMessages($message) { if (!empty($message)) { if (is_array($message)) { $this->errorMessages = array_merge($this->errorMessages, $message); } else { $this->errorMessages[] = $message; } } return $this...
php
public function addErrorMessages($message) { if (!empty($message)) { if (is_array($message)) { $this->errorMessages = array_merge($this->errorMessages, $message); } else { $this->errorMessages[] = $message; } } return $this...
[ "public", "function", "addErrorMessages", "(", "$", "message", ")", "{", "if", "(", "!", "empty", "(", "$", "message", ")", ")", "{", "if", "(", "is_array", "(", "$", "message", ")", ")", "{", "$", "this", "->", "errorMessages", "=", "array_merge", "...
Adds 1 or more error messages. To be used by web shop specific form handling to add a message to the list of messages to display. @param string|string[] $message An error message or an array of error messages. If empty, nothing will be added. @return $this
[ "Adds", "1", "or", "more", "error", "messages", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Helpers/Form.php#L274-L285
30,562
SIELOnline/libAcumulus
src/Helpers/Form.php
Form.setFormValues
protected function setFormValues() { if (!$this->formValuesSet) { // Start by assuring the field definitions are constructed. $this->getFields(); // 1: Hard coded default value for form fields: empty string. $this->formValues = array_fill_keys($this->getKeys(...
php
protected function setFormValues() { if (!$this->formValuesSet) { // Start by assuring the field definitions are constructed. $this->getFields(); // 1: Hard coded default value for form fields: empty string. $this->formValues = array_fill_keys($this->getKeys(...
[ "protected", "function", "setFormValues", "(", ")", "{", "if", "(", "!", "$", "this", "->", "formValuesSet", ")", "{", "// Start by assuring the field definitions are constructed.", "$", "this", "->", "getFields", "(", ")", ";", "// 1: Hard coded default value for form ...
Sets the form values to use. This is typically the union of the default values, any submitted values, and explicitly set field values.
[ "Sets", "the", "form", "values", "to", "use", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Helpers/Form.php#L313-L358
30,563
SIELOnline/libAcumulus
src/Helpers/Form.php
Form.getFormValue
protected function getFormValue($name) { $this->setFormValues(); return isset($this->formValues[$name]) ? $this->formValues[$name] : ''; }
php
protected function getFormValue($name) { $this->setFormValues(); return isset($this->formValues[$name]) ? $this->formValues[$name] : ''; }
[ "protected", "function", "getFormValue", "(", "$", "name", ")", "{", "$", "this", "->", "setFormValues", "(", ")", ";", "return", "isset", "(", "$", "this", "->", "formValues", "[", "$", "name", "]", ")", "?", "$", "this", "->", "formValues", "[", "$...
Returns the value for a specific form field. @param string $name The name of the form field. @return string The value for this form field or the empty string if not set.
[ "Returns", "the", "value", "for", "a", "specific", "form", "field", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Helpers/Form.php#L385-L389
30,564
SIELOnline/libAcumulus
src/Helpers/Form.php
Form.addValuesToFields
protected function addValuesToFields(array $fields) { foreach ($fields as $name => &$field) { if (!empty($field['fields'])) { $field['fields'] = $this->addValuesToFields($field['fields']); } elseif ($field['type'] === 'checkbox') { // Value is a list o...
php
protected function addValuesToFields(array $fields) { foreach ($fields as $name => &$field) { if (!empty($field['fields'])) { $field['fields'] = $this->addValuesToFields($field['fields']); } elseif ($field['type'] === 'checkbox') { // Value is a list o...
[ "protected", "function", "addValuesToFields", "(", "array", "$", "fields", ")", "{", "foreach", "(", "$", "fields", "as", "$", "name", "=>", "&", "$", "field", ")", "{", "if", "(", "!", "empty", "(", "$", "field", "[", "'fields'", "]", ")", ")", "{...
Adds the form values to the field definitions. This internal version of addValues() passes the fields as a parameter to allow to recursively process field sets. @param array[] $fields @return array[]
[ "Adds", "the", "form", "values", "to", "the", "field", "definitions", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Helpers/Form.php#L427-L449
30,565
SIELOnline/libAcumulus
src/Helpers/Form.php
Form.getFieldValues
protected function getFieldValues($fields) { $result = array(); foreach ($fields as $id => $field) { if (isset($field['value'])) { $result[$id] = $field['value']; } if (!empty($field['fields'])) { /** @noinspection SlowArrayOperatio...
php
protected function getFieldValues($fields) { $result = array(); foreach ($fields as $id => $field) { if (isset($field['value'])) { $result[$id] = $field['value']; } if (!empty($field['fields'])) { /** @noinspection SlowArrayOperatio...
[ "protected", "function", "getFieldValues", "(", "$", "fields", ")", "{", "$", "result", "=", "array", "(", ")", ";", "foreach", "(", "$", "fields", "as", "$", "id", "=>", "$", "field", ")", "{", "if", "(", "isset", "(", "$", "field", "[", "'value'"...
Returns the set of values directly assigned to the field definitions. These take precedence over default values @param array[] $fields @return array An array of values keyed by the form field names. An array of values keyed by the form field names.
[ "Returns", "the", "set", "of", "values", "directly", "assigned", "to", "the", "field", "definitions", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Helpers/Form.php#L475-L488
30,566
SIELOnline/libAcumulus
src/Helpers/Form.php
Form.getSubmittedValue
protected function getSubmittedValue($name, $default = null) { if (empty($this->submittedValues)) { $this->setSubmittedValues(); } return array_key_exists($name, $this->submittedValues) ? $this->submittedValues[$name] : $default; }
php
protected function getSubmittedValue($name, $default = null) { if (empty($this->submittedValues)) { $this->setSubmittedValues(); } return array_key_exists($name, $this->submittedValues) ? $this->submittedValues[$name] : $default; }
[ "protected", "function", "getSubmittedValue", "(", "$", "name", ",", "$", "default", "=", "null", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "submittedValues", ")", ")", "{", "$", "this", "->", "setSubmittedValues", "(", ")", ";", "}", "retu...
Returns a submitted value. @param string $name The name of the value to return @param string|null $default The default to return when this value was not submitted. @return string|null The submitted value, or the default if the value was not submitted.
[ "Returns", "a", "submitted", "value", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Helpers/Form.php#L512-L518
30,567
SIELOnline/libAcumulus
src/Helpers/Form.php
Form.getFields
public function getFields() { if (empty($this->fields)) { $this->fields = $this->getFieldDefinitions(); $this->fields = $this->formHelper->addMetaField($this->fields); } return $this->fields; }
php
public function getFields() { if (empty($this->fields)) { $this->fields = $this->getFieldDefinitions(); $this->fields = $this->formHelper->addMetaField($this->fields); } return $this->fields; }
[ "public", "function", "getFields", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "fields", ")", ")", "{", "$", "this", "->", "fields", "=", "$", "this", "->", "getFieldDefinitions", "(", ")", ";", "$", "this", "->", "fields", "=", "$",...
Returns a definition of the form fields. This should NOT include any: - Submit or cancel buttons. These are often added by the webshop software in their specific way. - Tokens, form-id's or other (hidden) fields used by the webshop software to protect against certain attacks or to facilitate internal form processing. ...
[ "Returns", "a", "definition", "of", "the", "form", "fields", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Helpers/Form.php#L625-L632
30,568
SIELOnline/libAcumulus
src/Helpers/Form.php
Form.addIfIsset
protected function addIfIsset(array &$target, $key, array $source) { if (isset($source[$key])) { $target[$key] = $source[$key]; return true; } return false; }
php
protected function addIfIsset(array &$target, $key, array $source) { if (isset($source[$key])) { $target[$key] = $source[$key]; return true; } return false; }
[ "protected", "function", "addIfIsset", "(", "array", "&", "$", "target", ",", "$", "key", ",", "array", "$", "source", ")", "{", "if", "(", "isset", "(", "$", "source", "[", "$", "key", "]", ")", ")", "{", "$", "target", "[", "$", "key", "]", "...
Helper method to copy a value from one array to another array. @param array $target @param string $key @param array $source @return bool True if the value is set and has been copied, false otherwise.
[ "Helper", "method", "to", "copy", "a", "value", "from", "one", "array", "to", "another", "array", "." ]
82f8d6c9c4929c41948c97d6cfdfac3f27c37255
https://github.com/SIELOnline/libAcumulus/blob/82f8d6c9c4929c41948c97d6cfdfac3f27c37255/src/Helpers/Form.php#L709-L716
30,569
php-cache/cache
src/Encryption/EncryptedItemDecorator.php
EncryptedItemDecorator.transform
private function transform(array $item) { $value = static::jsonDeArmor($item['value']); if ($item['type'] === 'object' || $item['type'] === 'array') { return unserialize($value); } settype($value, $item['type']); return $value; }
php
private function transform(array $item) { $value = static::jsonDeArmor($item['value']); if ($item['type'] === 'object' || $item['type'] === 'array') { return unserialize($value); } settype($value, $item['type']); return $value; }
[ "private", "function", "transform", "(", "array", "$", "item", ")", "{", "$", "value", "=", "static", "::", "jsonDeArmor", "(", "$", "item", "[", "'value'", "]", ")", ";", "if", "(", "$", "item", "[", "'type'", "]", "===", "'object'", "||", "$", "i...
Transform value back to it original type. @param array $item @return mixed
[ "Transform", "value", "back", "to", "it", "original", "type", "." ]
5f7543f58b43714d708b67b233869e4b2ecae9c8
https://github.com/php-cache/cache/blob/5f7543f58b43714d708b67b233869e4b2ecae9c8/src/Encryption/EncryptedItemDecorator.php#L159-L170
30,570
php-cache/cache
src/Adapter/Redis/RedisCachePool.php
RedisCachePool.clearAllObjectsFromCacheCluster
protected function clearAllObjectsFromCacheCluster() { $nodes = $this->cache->_masters(); foreach ($nodes as $node) { if (!$this->cache->flushDB($node)) { return false; } } return true; }
php
protected function clearAllObjectsFromCacheCluster() { $nodes = $this->cache->_masters(); foreach ($nodes as $node) { if (!$this->cache->flushDB($node)) { return false; } } return true; }
[ "protected", "function", "clearAllObjectsFromCacheCluster", "(", ")", "{", "$", "nodes", "=", "$", "this", "->", "cache", "->", "_masters", "(", ")", ";", "foreach", "(", "$", "nodes", "as", "$", "node", ")", "{", "if", "(", "!", "$", "this", "->", "...
Clear all objects from all nodes in the cluster. @return bool false if error
[ "Clear", "all", "objects", "from", "all", "nodes", "in", "the", "cluster", "." ]
5f7543f58b43714d708b67b233869e4b2ecae9c8
https://github.com/php-cache/cache/blob/5f7543f58b43714d708b67b233869e4b2ecae9c8/src/Adapter/Redis/RedisCachePool.php#L93-L104
30,571
php-cache/cache
src/Adapter/PHPArray/ArrayCachePool.php
ArrayCachePool.cacheToolkit
private function cacheToolkit($keys, $value = null, $unset = false) { $element = &$this->cache; while ($keys && ($key = array_shift($keys))) { if (!$keys && is_null($value) && $unset) { unset($element[$key]); unset($element); $element = nu...
php
private function cacheToolkit($keys, $value = null, $unset = false) { $element = &$this->cache; while ($keys && ($key = array_shift($keys))) { if (!$keys && is_null($value) && $unset) { unset($element[$key]); unset($element); $element = nu...
[ "private", "function", "cacheToolkit", "(", "$", "keys", ",", "$", "value", "=", "null", ",", "$", "unset", "=", "false", ")", "{", "$", "element", "=", "&", "$", "this", "->", "cache", ";", "while", "(", "$", "keys", "&&", "(", "$", "key", "=", ...
Used to manipulate cached data by extracting, inserting or deleting value. @param array $keys @param null|mixed $value @param bool $unset @return mixed
[ "Used", "to", "manipulate", "cached", "data", "by", "extracting", "inserting", "or", "deleting", "value", "." ]
5f7543f58b43714d708b67b233869e4b2ecae9c8
https://github.com/php-cache/cache/blob/5f7543f58b43714d708b67b233869e4b2ecae9c8/src/Adapter/PHPArray/ArrayCachePool.php#L211-L230
30,572
php-cache/cache
src/Adapter/PHPArray/ArrayCachePool.php
ArrayCachePool.cacheIsset
private function cacheIsset($keys) { $has = false; $array = $this->cache; foreach ($keys as $key) { if ($has = array_key_exists($key, $array)) { $array = $array[$key]; } } if (is_array($array)) { $has = $has && array_key...
php
private function cacheIsset($keys) { $has = false; $array = $this->cache; foreach ($keys as $key) { if ($has = array_key_exists($key, $array)) { $array = $array[$key]; } } if (is_array($array)) { $has = $has && array_key...
[ "private", "function", "cacheIsset", "(", "$", "keys", ")", "{", "$", "has", "=", "false", ";", "$", "array", "=", "$", "this", "->", "cache", ";", "foreach", "(", "$", "keys", "as", "$", "key", ")", "{", "if", "(", "$", "has", "=", "array_key_ex...
Checking if given keys exists and is valid. @param array $keys @return bool
[ "Checking", "if", "given", "keys", "exists", "and", "is", "valid", "." ]
5f7543f58b43714d708b67b233869e4b2ecae9c8
https://github.com/php-cache/cache/blob/5f7543f58b43714d708b67b233869e4b2ecae9c8/src/Adapter/PHPArray/ArrayCachePool.php#L239-L255
30,573
irazasyed/laravel-gamp
src/LaravelGAMPServiceProvider.php
LaravelGAMPServiceProvider.registerAnalytics
protected function registerAnalytics(Application $app) { $app->singleton('gamp', function ($app) { $config = $app['config']; $analytics = new Analytics($config->get('gamp.is_ssl', false), $config->get('gamp.is_disabled', false)); $analytics->setProtocolVersion($config->...
php
protected function registerAnalytics(Application $app) { $app->singleton('gamp', function ($app) { $config = $app['config']; $analytics = new Analytics($config->get('gamp.is_ssl', false), $config->get('gamp.is_disabled', false)); $analytics->setProtocolVersion($config->...
[ "protected", "function", "registerAnalytics", "(", "Application", "$", "app", ")", "{", "$", "app", "->", "singleton", "(", "'gamp'", ",", "function", "(", "$", "app", ")", "{", "$", "config", "=", "$", "app", "[", "'config'", "]", ";", "$", "analytics...
Initialize Analytics Library with Default Config. @param \Illuminate\Contracts\Container\Container $app
[ "Initialize", "Analytics", "Library", "with", "Default", "Config", "." ]
d935785977bc04930ea58cceb4f023bf36ecae71
https://github.com/irazasyed/laravel-gamp/blob/d935785977bc04930ea58cceb4f023bf36ecae71/src/LaravelGAMPServiceProvider.php#L59-L81
30,574
dpods/plaid-api-php-client
src/Api/AssetReport.php
AssetReport.create
public function create($accessTokens, $daysRequested, $options = []) { return $this->client()->post('/asset_report/create', [ 'access_tokens' => $accessTokens, 'days_requested' => $daysRequested, 'options' => $options, ]); }
php
public function create($accessTokens, $daysRequested, $options = []) { return $this->client()->post('/asset_report/create', [ 'access_tokens' => $accessTokens, 'days_requested' => $daysRequested, 'options' => $options, ]); }
[ "public", "function", "create", "(", "$", "accessTokens", ",", "$", "daysRequested", ",", "$", "options", "=", "[", "]", ")", "{", "return", "$", "this", "->", "client", "(", ")", "->", "post", "(", "'/asset_report/create'", ",", "[", "'access_tokens'", ...
Creates an Asset Report with all accounts linked to each Item associated with passed accessTokens. @link https://plaid.com/docs/#create-asset-report-request @param array $accessTokens An array of access tokens, one token for each Item to be included in the Asset Report. @param int $daysRequested Days of transaction h...
[ "Creates", "an", "Asset", "Report", "with", "all", "accounts", "linked", "to", "each", "Item", "associated", "with", "passed", "accessTokens", "." ]
1c3da929ef87ef96914bd554567510bd32bc6f1d
https://github.com/dpods/plaid-api-php-client/blob/1c3da929ef87ef96914bd554567510bd32bc6f1d/src/Api/AssetReport.php#L19-L26
30,575
dpods/plaid-api-php-client
src/Api/AssetReport.php
AssetReport.refresh
public function refresh($assetReportToken, $daysRequested = null, $options = []) { $data = ['asset_report_token' => $assetReportToken]; if (!is_null($daysRequested)) { $data['days_requested'] = $daysRequested; } if (!empty($options)) { $data['options'] = $op...
php
public function refresh($assetReportToken, $daysRequested = null, $options = []) { $data = ['asset_report_token' => $assetReportToken]; if (!is_null($daysRequested)) { $data['days_requested'] = $daysRequested; } if (!empty($options)) { $data['options'] = $op...
[ "public", "function", "refresh", "(", "$", "assetReportToken", ",", "$", "daysRequested", "=", "null", ",", "$", "options", "=", "[", "]", ")", "{", "$", "data", "=", "[", "'asset_report_token'", "=>", "$", "assetReportToken", "]", ";", "if", "(", "!", ...
Refresh a previously created Asset Report. @link https://plaid.com/docs/#refreshing-an-asset-report @param string $assetReportToken The token returned in create or filter response. @param int $daysRequested Override the days_requested on previously created/filtered report. @param array $options Override the options a...
[ "Refresh", "a", "previously", "created", "Asset", "Report", "." ]
1c3da929ef87ef96914bd554567510bd32bc6f1d
https://github.com/dpods/plaid-api-php-client/blob/1c3da929ef87ef96914bd554567510bd32bc6f1d/src/Api/AssetReport.php#L93-L106
30,576
Sibyx/phpGPX
src/phpGPX/Models/Stats.php
Stats.reset
public function reset() { $this->distance = null; $this->averageSpeed = null; $this->averagePace = null; $this->minAltitude = null; $this->maxAltitude = null; $this->cumulativeElevationGain = null; $this->cumulativeElevationLoss = null; $this->startedAt = null; $this->finishedAt = null; }
php
public function reset() { $this->distance = null; $this->averageSpeed = null; $this->averagePace = null; $this->minAltitude = null; $this->maxAltitude = null; $this->cumulativeElevationGain = null; $this->cumulativeElevationLoss = null; $this->startedAt = null; $this->finishedAt = null; }
[ "public", "function", "reset", "(", ")", "{", "$", "this", "->", "distance", "=", "null", ";", "$", "this", "->", "averageSpeed", "=", "null", ";", "$", "this", "->", "averagePace", "=", "null", ";", "$", "this", "->", "minAltitude", "=", "null", ";"...
Reset all stats
[ "Reset", "all", "stats" ]
13a5b2810915c5cc055f46abd7938419acf14124
https://github.com/Sibyx/phpGPX/blob/13a5b2810915c5cc055f46abd7938419acf14124/src/phpGPX/Models/Stats.php#L82-L93
30,577
Sibyx/phpGPX
src/phpGPX/phpGPX.php
phpGPX.parse
public static function parse($xml) { $xml = simplexml_load_string($xml); $gpx = new GpxFile(); // Parse creator $gpx->creator = isset($xml['creator']) ? (string)$xml['creator'] : null; // Parse metadata $gpx->metadata = isset($xml->metadata) ? MetadataParser::parse($xml->metadata) : null; // Parse wa...
php
public static function parse($xml) { $xml = simplexml_load_string($xml); $gpx = new GpxFile(); // Parse creator $gpx->creator = isset($xml['creator']) ? (string)$xml['creator'] : null; // Parse metadata $gpx->metadata = isset($xml->metadata) ? MetadataParser::parse($xml->metadata) : null; // Parse wa...
[ "public", "static", "function", "parse", "(", "$", "xml", ")", "{", "$", "xml", "=", "simplexml_load_string", "(", "$", "xml", ")", ";", "$", "gpx", "=", "new", "GpxFile", "(", ")", ";", "// Parse creator", "$", "gpx", "->", "creator", "=", "isset", ...
Parse GPX data string. @param $xml @return GpxFile
[ "Parse", "GPX", "data", "string", "." ]
13a5b2810915c5cc055f46abd7938419acf14124
https://github.com/Sibyx/phpGPX/blob/13a5b2810915c5cc055f46abd7938419acf14124/src/phpGPX/phpGPX.php#L112-L134
30,578
Sibyx/phpGPX
src/phpGPX/Models/GpxFile.php
GpxFile.toXML
public function toXML() { $document = new \DOMDocument("1.0", 'UTF-8'); $gpx = $document->createElementNS("http://www.topografix.com/GPX/1/1", "gpx"); $gpx->setAttribute("version", "1.1"); $gpx->setAttribute("creator", $this->creator ? $this->creator : phpGPX::getSignature()); ExtensionParser::$usedNamespa...
php
public function toXML() { $document = new \DOMDocument("1.0", 'UTF-8'); $gpx = $document->createElementNS("http://www.topografix.com/GPX/1/1", "gpx"); $gpx->setAttribute("version", "1.1"); $gpx->setAttribute("creator", $this->creator ? $this->creator : phpGPX::getSignature()); ExtensionParser::$usedNamespa...
[ "public", "function", "toXML", "(", ")", "{", "$", "document", "=", "new", "\\", "DOMDocument", "(", "\"1.0\"", ",", "'UTF-8'", ")", ";", "$", "gpx", "=", "$", "document", "->", "createElementNS", "(", "\"http://www.topografix.com/GPX/1/1\"", ",", "\"gpx\"", ...
Create XML representation of GPX file. @return \DOMDocument
[ "Create", "XML", "representation", "of", "GPX", "file", "." ]
13a5b2810915c5cc055f46abd7938419acf14124
https://github.com/Sibyx/phpGPX/blob/13a5b2810915c5cc055f46abd7938419acf14124/src/phpGPX/Models/GpxFile.php#L103-L163
30,579
Sibyx/phpGPX
src/phpGPX/Models/GpxFile.php
GpxFile.save
public function save($path, $format) { switch ($format) { case phpGPX::XML_FORMAT: $document = $this->toXML(); $document->save($path); break; case phpGPX::JSON_FORMAT: file_put_contents($path, $this->toJSON()); break; default: throw new \RuntimeException("Unsupported file format!"); ...
php
public function save($path, $format) { switch ($format) { case phpGPX::XML_FORMAT: $document = $this->toXML(); $document->save($path); break; case phpGPX::JSON_FORMAT: file_put_contents($path, $this->toJSON()); break; default: throw new \RuntimeException("Unsupported file format!"); ...
[ "public", "function", "save", "(", "$", "path", ",", "$", "format", ")", "{", "switch", "(", "$", "format", ")", "{", "case", "phpGPX", "::", "XML_FORMAT", ":", "$", "document", "=", "$", "this", "->", "toXML", "(", ")", ";", "$", "document", "->",...
Save data to file according to selected format. @param string $path @param string $format
[ "Save", "data", "to", "file", "according", "to", "selected", "format", "." ]
13a5b2810915c5cc055f46abd7938419acf14124
https://github.com/Sibyx/phpGPX/blob/13a5b2810915c5cc055f46abd7938419acf14124/src/phpGPX/Models/GpxFile.php#L170-L183
30,580
Sibyx/phpGPX
src/phpGPX/Parsers/BoundsParser.php
BoundsParser.parse
public static function parse(\SimpleXMLElement $node) { if ($node->getName() != self::$tagName) { return null; } $bounds = new Bounds(); $bounds->minLatitude = isset($node['minlat']) ? (float) $node['minlat'] : null; $bounds->minLongitude = isset($node['minlon']) ? (float) $node['minlon'] : null; $bou...
php
public static function parse(\SimpleXMLElement $node) { if ($node->getName() != self::$tagName) { return null; } $bounds = new Bounds(); $bounds->minLatitude = isset($node['minlat']) ? (float) $node['minlat'] : null; $bounds->minLongitude = isset($node['minlon']) ? (float) $node['minlon'] : null; $bou...
[ "public", "static", "function", "parse", "(", "\\", "SimpleXMLElement", "$", "node", ")", "{", "if", "(", "$", "node", "->", "getName", "(", ")", "!=", "self", "::", "$", "tagName", ")", "{", "return", "null", ";", "}", "$", "bounds", "=", "new", "...
Parse data from XML. @param \SimpleXMLElement $node @return Bounds|null
[ "Parse", "data", "from", "XML", "." ]
13a5b2810915c5cc055f46abd7938419acf14124
https://github.com/Sibyx/phpGPX/blob/13a5b2810915c5cc055f46abd7938419acf14124/src/phpGPX/Parsers/BoundsParser.php#L24-L38
30,581
Sibyx/phpGPX
src/phpGPX/Parsers/BoundsParser.php
BoundsParser.toXML
public static function toXML(Bounds $bounds, \DOMDocument &$document) { $node = $document->createElement(self::$tagName); if (!is_null($bounds->minLatitude)) { $node->setAttribute('minlat', $bounds->minLatitude); } if (!is_null($bounds->minLongitude)) { $node->setAttribute('minlon', $bounds->minLongit...
php
public static function toXML(Bounds $bounds, \DOMDocument &$document) { $node = $document->createElement(self::$tagName); if (!is_null($bounds->minLatitude)) { $node->setAttribute('minlat', $bounds->minLatitude); } if (!is_null($bounds->minLongitude)) { $node->setAttribute('minlon', $bounds->minLongit...
[ "public", "static", "function", "toXML", "(", "Bounds", "$", "bounds", ",", "\\", "DOMDocument", "&", "$", "document", ")", "{", "$", "node", "=", "$", "document", "->", "createElement", "(", "self", "::", "$", "tagName", ")", ";", "if", "(", "!", "i...
Create XML representation. @param Bounds $bounds @param \DOMDocument $document @return \DOMElement
[ "Create", "XML", "representation", "." ]
13a5b2810915c5cc055f46abd7938419acf14124
https://github.com/Sibyx/phpGPX/blob/13a5b2810915c5cc055f46abd7938419acf14124/src/phpGPX/Parsers/BoundsParser.php#L46-L67
30,582
Sibyx/phpGPX
src/phpGPX/Helpers/GeoHelper.php
GeoHelper.getDistance
public static function getDistance(Point $point1, Point $point2) { $latFrom = deg2rad($point1->latitude); $lonFrom = deg2rad($point1->longitude); $latTo = deg2rad($point2->latitude); $lonTo = deg2rad($point2->longitude); $lonDelta = $lonTo - $lonFrom; $a = pow(cos($latTo) * sin($lonDelta), 2) + pow(cos($l...
php
public static function getDistance(Point $point1, Point $point2) { $latFrom = deg2rad($point1->latitude); $lonFrom = deg2rad($point1->longitude); $latTo = deg2rad($point2->latitude); $lonTo = deg2rad($point2->longitude); $lonDelta = $lonTo - $lonFrom; $a = pow(cos($latTo) * sin($lonDelta), 2) + pow(cos($l...
[ "public", "static", "function", "getDistance", "(", "Point", "$", "point1", ",", "Point", "$", "point2", ")", "{", "$", "latFrom", "=", "deg2rad", "(", "$", "point1", "->", "latitude", ")", ";", "$", "lonFrom", "=", "deg2rad", "(", "$", "point1", "->",...
Returns distance in meters between two Points according to GPX coordinates. @see Point @param Point $point1 @param Point $point2 @return float
[ "Returns", "distance", "in", "meters", "between", "two", "Points", "according", "to", "GPX", "coordinates", "." ]
13a5b2810915c5cc055f46abd7938419acf14124
https://github.com/Sibyx/phpGPX/blob/13a5b2810915c5cc055f46abd7938419acf14124/src/phpGPX/Helpers/GeoHelper.php#L27-L40
30,583
tylercd100/lern
src/Components/Notifier.php
Notifier.getMessage
public function getMessage(Exception $e) { $msg = $this->getMessageViaView($e); if ($msg === false) { $msg = $this->getMessageViaCallback($e); } if ($msg === false) { $msg = $this->getMessageViaDefault($e); } return $msg;...
php
public function getMessage(Exception $e) { $msg = $this->getMessageViaView($e); if ($msg === false) { $msg = $this->getMessageViaCallback($e); } if ($msg === false) { $msg = $this->getMessageViaDefault($e); } return $msg;...
[ "public", "function", "getMessage", "(", "Exception", "$", "e", ")", "{", "$", "msg", "=", "$", "this", "->", "getMessageViaView", "(", "$", "e", ")", ";", "if", "(", "$", "msg", "===", "false", ")", "{", "$", "msg", "=", "$", "this", "->", "getM...
Returns the result of the message closure @param Exception $e The Exception instance that you want to build the message around @return string The message string
[ "Returns", "the", "result", "of", "the", "message", "closure" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/Components/Notifier.php#L76-L89
30,584
tylercd100/lern
src/Components/Notifier.php
Notifier.getMessageViaDefault
public function getMessageViaDefault(Exception $e) { $msg = get_class($e)." was thrown! \n".$e->getMessage(); if ($this->config['includeExceptionStackTrace'] === true) { $msg .= "\n\n".$e->getTraceAsString(); } return $msg; }
php
public function getMessageViaDefault(Exception $e) { $msg = get_class($e)." was thrown! \n".$e->getMessage(); if ($this->config['includeExceptionStackTrace'] === true) { $msg .= "\n\n".$e->getTraceAsString(); } return $msg; }
[ "public", "function", "getMessageViaDefault", "(", "Exception", "$", "e", ")", "{", "$", "msg", "=", "get_class", "(", "$", "e", ")", ".", "\" was thrown! \\n\"", ".", "$", "e", "->", "getMessage", "(", ")", ";", "if", "(", "$", "this", "->", "config",...
Gets a basic Exception message @param Exception $e The Exception instance that you want to build the message around @return String Returns the message string
[ "Gets", "a", "basic", "Exception", "message" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/Components/Notifier.php#L96-L103
30,585
tylercd100/lern
src/Components/Notifier.php
Notifier.getMessageViaCallback
public function getMessageViaCallback(Exception $e) { if (is_callable($this->messageCb)) { return $this->messageCb->__invoke($e); } return false; }
php
public function getMessageViaCallback(Exception $e) { if (is_callable($this->messageCb)) { return $this->messageCb->__invoke($e); } return false; }
[ "public", "function", "getMessageViaCallback", "(", "Exception", "$", "e", ")", "{", "if", "(", "is_callable", "(", "$", "this", "->", "messageCb", ")", ")", "{", "return", "$", "this", "->", "messageCb", "->", "__invoke", "(", "$", "e", ")", ";", "}",...
Gets the Exception message using a callback if it is set @param Exception $e The Exception instance that you want to build the message around @return String|false Returns the message string or false
[ "Gets", "the", "Exception", "message", "using", "a", "callback", "if", "it", "is", "set" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/Components/Notifier.php#L110-L116
30,586
tylercd100/lern
src/Components/Notifier.php
Notifier.getMessageViaView
public function getMessageViaView(Exception $e) { $path = @$this->config["view"]; if (!empty($path) && View::exists($path)) { return View::make($path, [ "exception" => $e, "url" => Request::url(), "method" => Request::method(), ...
php
public function getMessageViaView(Exception $e) { $path = @$this->config["view"]; if (!empty($path) && View::exists($path)) { return View::make($path, [ "exception" => $e, "url" => Request::url(), "method" => Request::method(), ...
[ "public", "function", "getMessageViaView", "(", "Exception", "$", "e", ")", "{", "$", "path", "=", "@", "$", "this", "->", "config", "[", "\"view\"", "]", ";", "if", "(", "!", "empty", "(", "$", "path", ")", "&&", "View", "::", "exists", "(", "$", ...
Gets the Exception message using a Laravel view file @param Exception $e The Exception instance that you want to build the message around @return String|false Returns the message string or false
[ "Gets", "the", "Exception", "message", "using", "a", "Laravel", "view", "file" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/Components/Notifier.php#L123-L136
30,587
tylercd100/lern
src/Components/Notifier.php
Notifier.getSubject
public function getSubject(Exception $e) { if (is_callable($this->subjectCb)) { return $this->subjectCb->__invoke($e); } else { return get_class($e); } }
php
public function getSubject(Exception $e) { if (is_callable($this->subjectCb)) { return $this->subjectCb->__invoke($e); } else { return get_class($e); } }
[ "public", "function", "getSubject", "(", "Exception", "$", "e", ")", "{", "if", "(", "is_callable", "(", "$", "this", "->", "subjectCb", ")", ")", "{", "return", "$", "this", "->", "subjectCb", "->", "__invoke", "(", "$", "e", ")", ";", "}", "else", ...
Returns the result of the subject closure @param Exception $e The Exception instance that you want to build the subject around @return string The subject string
[ "Returns", "the", "result", "of", "the", "subject", "closure" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/Components/Notifier.php#L154-L161
30,588
tylercd100/lern
src/Components/Notifier.php
Notifier.getContext
public function getContext(Exception $e, $context = []) { //This needs a better solution. How do I set specific context needs for different drivers? if (in_array('pushover', $this->config['drivers'])) { $context['sound'] = $this->config['pushover']['sound']; } // ...
php
public function getContext(Exception $e, $context = []) { //This needs a better solution. How do I set specific context needs for different drivers? if (in_array('pushover', $this->config['drivers'])) { $context['sound'] = $this->config['pushover']['sound']; } // ...
[ "public", "function", "getContext", "(", "Exception", "$", "e", ",", "$", "context", "=", "[", "]", ")", "{", "//This needs a better solution. How do I set specific context needs for different drivers?\r", "if", "(", "in_array", "(", "'pushover'", ",", "$", "this", "-...
Returns the result of the context closure @param Exception $e The Exception instance that you want to build the context around @return array The context array
[ "Returns", "the", "result", "of", "the", "context", "closure" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/Components/Notifier.php#L179-L192
30,589
tylercd100/lern
src/Components/Notifier.php
Notifier.send
public function send(Exception $e, array $context = []) { if ($this->shouldntHandle($e)) { return false; } $message = $this->getMessage($e); $subject = $this->getSubject($e); $context = $this->getContext($e, $context); try { ...
php
public function send(Exception $e, array $context = []) { if ($this->shouldntHandle($e)) { return false; } $message = $this->getMessage($e); $subject = $this->getSubject($e); $context = $this->getContext($e, $context); try { ...
[ "public", "function", "send", "(", "Exception", "$", "e", ",", "array", "$", "context", "=", "[", "]", ")", "{", "if", "(", "$", "this", "->", "shouldntHandle", "(", "$", "e", ")", ")", "{", "return", "false", ";", "}", "$", "message", "=", "$", ...
Triggers the Monolog Logger instance to log an error to all handlers @param Exception $e The exception to use @param array $context Additional information that you would like to pass to Monolog @return bool @throws NotifierFailedException
[ "Triggers", "the", "Monolog", "Logger", "instance", "to", "log", "an", "error", "to", "all", "handlers" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/Components/Notifier.php#L232-L258
30,590
tylercd100/lern
src/LERN.php
LERN.handle
public function handle(Exception $e) { $this->exception = $e; $this->notify($e); return $this->record($e); }
php
public function handle(Exception $e) { $this->exception = $e; $this->notify($e); return $this->record($e); }
[ "public", "function", "handle", "(", "Exception", "$", "e", ")", "{", "$", "this", "->", "exception", "=", "$", "e", ";", "$", "this", "->", "notify", "(", "$", "e", ")", ";", "return", "$", "this", "->", "record", "(", "$", "e", ")", ";", "}" ...
Will execute record and notify methods @param Exception $e The exception to use @return ExceptionModel the recorded Eloquent Model
[ "Will", "execute", "record", "and", "notify", "methods" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/LERN.php#L47-L52
30,591
tylercd100/lern
src/LERN.php
LERN.record
public function record(Exception $e) { $this->exception = $e; return $this->recorder->record($e); }
php
public function record(Exception $e) { $this->exception = $e; return $this->recorder->record($e); }
[ "public", "function", "record", "(", "Exception", "$", "e", ")", "{", "$", "this", "->", "exception", "=", "$", "e", ";", "return", "$", "this", "->", "recorder", "->", "record", "(", "$", "e", ")", ";", "}" ]
Stores the exception in the database @param Exception $e The exception to use @return \Tylercd100\LERN\Models\ExceptionModel|false The recorded Exception as an Eloquent Model
[ "Stores", "the", "exception", "in", "the", "database" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/LERN.php#L59-L63
30,592
tylercd100/lern
src/LERN.php
LERN.notify
public function notify(Exception $e) { $this->exception = $e; $this->notifier->send($e); }
php
public function notify(Exception $e) { $this->exception = $e; $this->notifier->send($e); }
[ "public", "function", "notify", "(", "Exception", "$", "e", ")", "{", "$", "this", "->", "exception", "=", "$", "e", ";", "$", "this", "->", "notifier", "->", "send", "(", "$", "e", ")", ";", "}" ]
Will send the exception to all monolog handlers @param Exception $e The exception to use @return void
[ "Will", "send", "the", "exception", "to", "all", "monolog", "handlers" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/LERN.php#L70-L74
30,593
tylercd100/lern
src/LERN.php
LERN.buildNotifier
protected function buildNotifier(Notifier $notifier = null) { $class = config('lern.notify.class'); $class = !empty($class) ? $class : Notifier::class; if (empty($notifier)) { $notifier = new $class(); } if ($notifier instanceof Notifier) { ret...
php
protected function buildNotifier(Notifier $notifier = null) { $class = config('lern.notify.class'); $class = !empty($class) ? $class : Notifier::class; if (empty($notifier)) { $notifier = new $class(); } if ($notifier instanceof Notifier) { ret...
[ "protected", "function", "buildNotifier", "(", "Notifier", "$", "notifier", "=", "null", ")", "{", "$", "class", "=", "config", "(", "'lern.notify.class'", ")", ";", "$", "class", "=", "!", "empty", "(", "$", "class", ")", "?", "$", "class", ":", "Noti...
Constructs a Notifier @param Notifier $notifier @return Notifier
[ "Constructs", "a", "Notifier" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/LERN.php#L174-L186
30,594
tylercd100/lern
src/LERN.php
LERN.buildRecorder
protected function buildRecorder(Recorder $recorder = null) { $class = config('lern.record.class'); $class = !empty($class) ? $class : Recorder::class; if (empty($recorder)) { $recorder = new $class(); } if ($recorder instanceof Recorder) { ret...
php
protected function buildRecorder(Recorder $recorder = null) { $class = config('lern.record.class'); $class = !empty($class) ? $class : Recorder::class; if (empty($recorder)) { $recorder = new $class(); } if ($recorder instanceof Recorder) { ret...
[ "protected", "function", "buildRecorder", "(", "Recorder", "$", "recorder", "=", "null", ")", "{", "$", "class", "=", "config", "(", "'lern.record.class'", ")", ";", "$", "class", "=", "!", "empty", "(", "$", "class", ")", "?", "$", "class", ":", "Reco...
Constructs a Recorder @param Recorder $recorder @return Recorder
[ "Constructs", "a", "Recorder" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/LERN.php#L194-L206
30,595
tylercd100/lern
src/Components/Component.php
Component.shouldntHandle
protected function shouldntHandle(Exception $e) { $dontHandle = array_merge($this->dontHandle, $this->absolutelyDontHandle); foreach ($dontHandle as $type) { if ($e instanceof $type) { return true; } } $sent_at = Cache::get($this->getCacheKey($e)...
php
protected function shouldntHandle(Exception $e) { $dontHandle = array_merge($this->dontHandle, $this->absolutelyDontHandle); foreach ($dontHandle as $type) { if ($e instanceof $type) { return true; } } $sent_at = Cache::get($this->getCacheKey($e)...
[ "protected", "function", "shouldntHandle", "(", "Exception", "$", "e", ")", "{", "$", "dontHandle", "=", "array_merge", "(", "$", "this", "->", "dontHandle", ",", "$", "this", "->", "absolutelyDontHandle", ")", ";", "foreach", "(", "$", "dontHandle", "as", ...
Determine if the exception is in the "do not handle" list. @param \Exception $e @return bool
[ "Determine", "if", "the", "exception", "is", "in", "the", "do", "not", "handle", "list", "." ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/Components/Component.php#L29-L44
30,596
tylercd100/lern
src/Components/Recorder.php
Recorder.record
public function record(Exception $e) { if ($this->shouldntHandle($e)) { return false; } $opts = [ 'class' => get_class($e), 'file' => $e->getFile(), 'line' => $e->getLine(), 'code' => (is_int($e...
php
public function record(Exception $e) { if ($this->shouldntHandle($e)) { return false; } $opts = [ 'class' => get_class($e), 'file' => $e->getFile(), 'line' => $e->getLine(), 'code' => (is_int($e...
[ "public", "function", "record", "(", "Exception", "$", "e", ")", "{", "if", "(", "$", "this", "->", "shouldntHandle", "(", "$", "e", ")", ")", "{", "return", "false", ";", "}", "$", "opts", "=", "[", "'class'", "=>", "get_class", "(", "$", "e", "...
Records an Exception to the database @param Exception $e The exception you want to record @return false|ExceptionModel @throws RecorderFailedException
[ "Records", "an", "Exception", "to", "the", "database" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/Components/Recorder.php#L43-L82
30,597
tylercd100/lern
src/Components/Recorder.php
Recorder.canCollect
private function canCollect($type) { if (!empty($this->config) && !empty($this->config['collect']) && !empty($this->config['collect'][$type])) { return $this->config['collect'][$type] === true; } return false; }
php
private function canCollect($type) { if (!empty($this->config) && !empty($this->config['collect']) && !empty($this->config['collect'][$type])) { return $this->config['collect'][$type] === true; } return false; }
[ "private", "function", "canCollect", "(", "$", "type", ")", "{", "if", "(", "!", "empty", "(", "$", "this", "->", "config", ")", "&&", "!", "empty", "(", "$", "this", "->", "config", "[", "'collect'", "]", ")", "&&", "!", "empty", "(", "$", "this...
Checks the config to see if you can collect certain information @param string $type the config value you want to check @return boolean
[ "Checks", "the", "config", "to", "see", "if", "you", "can", "collect", "certain", "information" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/Components/Recorder.php#L89-L94
30,598
tylercd100/lern
src/Components/Recorder.php
Recorder.getUserId
protected function getUserId() { $user = Auth::user(); if (is_object($user) && !empty($user->id)) { return $user->id; } else { return null; } }
php
protected function getUserId() { $user = Auth::user(); if (is_object($user) && !empty($user->id)) { return $user->id; } else { return null; } }
[ "protected", "function", "getUserId", "(", ")", "{", "$", "user", "=", "Auth", "::", "user", "(", ")", ";", "if", "(", "is_object", "(", "$", "user", ")", "&&", "!", "empty", "(", "$", "user", "->", "id", ")", ")", "{", "return", "$", "user", "...
Gets the ID of the User that is logged in @return integer|null The ID of the User or Null if not logged in
[ "Gets", "the", "ID", "of", "the", "User", "that", "is", "logged", "in" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/Components/Recorder.php#L128-L135
30,599
tylercd100/lern
src/Components/Recorder.php
Recorder.getData
protected function getData() { $data = Input::all(); if (is_array($data)) { return $this->excludeKeys($data); } else { return null; } }
php
protected function getData() { $data = Input::all(); if (is_array($data)) { return $this->excludeKeys($data); } else { return null; } }
[ "protected", "function", "getData", "(", ")", "{", "$", "data", "=", "Input", "::", "all", "(", ")", ";", "if", "(", "is_array", "(", "$", "data", ")", ")", "{", "return", "$", "this", "->", "excludeKeys", "(", "$", "data", ")", ";", "}", "else",...
Gets the input data of the Request @return array|null The Input data or null
[ "Gets", "the", "input", "data", "of", "the", "Request" ]
ab6b602d11447d305770aa8cbb79278428dd2244
https://github.com/tylercd100/lern/blob/ab6b602d11447d305770aa8cbb79278428dd2244/src/Components/Recorder.php#L154-L161