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
231,200
cygnite/framework
src/Cygnite/Translation/Translator.php
Translator.get
public function get($key, $locale = null) { if (!$locale) { // Use the global target language $locale = $this->locale(); } if (string_has($key, ':')) { $exp = string_split($key, ':'); // Load the translation table for this language ...
php
public function get($key, $locale = null) { if (!$locale) { // Use the global target language $locale = $this->locale(); } if (string_has($key, ':')) { $exp = string_split($key, ':'); // Load the translation table for this language ...
[ "public", "function", "get", "(", "$", "key", ",", "$", "locale", "=", "null", ")", "{", "if", "(", "!", "$", "locale", ")", "{", "// Use the global target language", "$", "locale", "=", "$", "this", "->", "locale", "(", ")", ";", "}", "if", "(", "...
Returns Translator of a string. If no Translator exists, the original string will be returned. trans('Hello, :user', array(':user' => $username)); $hello = $trans->get('welcome.Hello friends, my name is :name'); @param $key to translate @param null $locale target language @return string
[ "Returns", "Translator", "of", "a", "string", ".", "If", "no", "Translator", "exists", "the", "original", "string", "will", "be", "returned", "." ]
58d0cc1c946415eb0867d76218bd35166e999093
https://github.com/cygnite/framework/blob/58d0cc1c946415eb0867d76218bd35166e999093/src/Cygnite/Translation/Translator.php#L121-L146
231,201
cygnite/framework
src/Cygnite/Translation/Translator.php
Translator.findLanguageFile
public function findLanguageFile($file) { // Create a partial path of the filename $path = DS.$file.$this->getFileExtension(); // Include paths must be searched in reverse $paths = array_reverse([$this->getRootDirectory().$this->getLangDir()]); // Array of files that have be...
php
public function findLanguageFile($file) { // Create a partial path of the filename $path = DS.$file.$this->getFileExtension(); // Include paths must be searched in reverse $paths = array_reverse([$this->getRootDirectory().$this->getLangDir()]); // Array of files that have be...
[ "public", "function", "findLanguageFile", "(", "$", "file", ")", "{", "// Create a partial path of the filename", "$", "path", "=", "DS", ".", "$", "file", ".", "$", "this", "->", "getFileExtension", "(", ")", ";", "// Include paths must be searched in reverse", "$"...
Find the language file if exists load it into list else search for fallback locale and load. @param $file @return array
[ "Find", "the", "language", "file", "if", "exists", "load", "it", "into", "list", "else", "search", "for", "fallback", "locale", "and", "load", "." ]
58d0cc1c946415eb0867d76218bd35166e999093
https://github.com/cygnite/framework/blob/58d0cc1c946415eb0867d76218bd35166e999093/src/Cygnite/Translation/Translator.php#L243-L271
231,202
cygnite/framework
src/Cygnite/Translation/Translator.php
Translator.load
public function load($locale) { if (isset($this->cache[$locale])) { return $this->cache[$locale]; } // New Translator array $trans = []; // Split the language: language, region, locale, etc $parts = string_split($locale, '-'); do { //...
php
public function load($locale) { if (isset($this->cache[$locale])) { return $this->cache[$locale]; } // New Translator array $trans = []; // Split the language: language, region, locale, etc $parts = string_split($locale, '-'); do { //...
[ "public", "function", "load", "(", "$", "locale", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "cache", "[", "$", "locale", "]", ")", ")", "{", "return", "$", "this", "->", "cache", "[", "$", "locale", "]", ";", "}", "// New Translator arr...
Returns the Translator array for a given language. // Get all defined Spanish messages $messages = $trans->load('es'); @param string $locale language to load @return array
[ "Returns", "the", "Translator", "array", "for", "a", "given", "language", "." ]
58d0cc1c946415eb0867d76218bd35166e999093
https://github.com/cygnite/framework/blob/58d0cc1c946415eb0867d76218bd35166e999093/src/Cygnite/Translation/Translator.php#L283-L308
231,203
cygnite/framework
src/Cygnite/Translation/Translator.php
Translator.loadMessages
private function loadMessages($files, $trans) { $message = []; foreach ($files as $file) { // Merge the language strings into the sub message array if (is_readable($file)) { $message = array_merge($message, include $file); } } // Ap...
php
private function loadMessages($files, $trans) { $message = []; foreach ($files as $file) { // Merge the language strings into the sub message array if (is_readable($file)) { $message = array_merge($message, include $file); } } // Ap...
[ "private", "function", "loadMessages", "(", "$", "files", ",", "$", "trans", ")", "{", "$", "message", "=", "[", "]", ";", "foreach", "(", "$", "files", "as", "$", "file", ")", "{", "// Merge the language strings into the sub message array", "if", "(", "is_r...
We will load all messages into array. @param $files @param $trans @return array
[ "We", "will", "load", "all", "messages", "into", "array", "." ]
58d0cc1c946415eb0867d76218bd35166e999093
https://github.com/cygnite/framework/blob/58d0cc1c946415eb0867d76218bd35166e999093/src/Cygnite/Translation/Translator.php#L318-L331
231,204
tapestry-cloud/tapestry
src/Entities/CachedFile.php
CachedFile.check
public function check(File $file) { if ($file->getUid() !== $this->uid) { throw new \Exception('This CachedFile is not for uid ['.$file->getUid().']'); } return $this->hash === $this->hashFile($file); }
php
public function check(File $file) { if ($file->getUid() !== $this->uid) { throw new \Exception('This CachedFile is not for uid ['.$file->getUid().']'); } return $this->hash === $this->hashFile($file); }
[ "public", "function", "check", "(", "File", "$", "file", ")", "{", "if", "(", "$", "file", "->", "getUid", "(", ")", "!==", "$", "this", "->", "uid", ")", "{", "throw", "new", "\\", "Exception", "(", "'This CachedFile is not for uid ['", ".", "$", "fil...
Check to see if the current cache entry is still valid. @param File $file @return bool @throws \Exception
[ "Check", "to", "see", "if", "the", "current", "cache", "entry", "is", "still", "valid", "." ]
f3fc980b2484ccbe609a7f811c65b91254e8720e
https://github.com/tapestry-cloud/tapestry/blob/f3fc980b2484ccbe609a7f811c65b91254e8720e/src/Entities/CachedFile.php#L53-L60
231,205
tapestry-cloud/tapestry
src/Entities/CachedFile.php
CachedFile.hashFile
private function hashFile(File $file) { $arr = []; foreach ($this->layouts as $layout) { if (strpos($layout, '_templates') === false) { $layout = '_templates'.DIRECTORY_SEPARATOR.$layout; } $layoutPathName = $this->sourceDirectory.DIRECTORY_SEPAR...
php
private function hashFile(File $file) { $arr = []; foreach ($this->layouts as $layout) { if (strpos($layout, '_templates') === false) { $layout = '_templates'.DIRECTORY_SEPARATOR.$layout; } $layoutPathName = $this->sourceDirectory.DIRECTORY_SEPAR...
[ "private", "function", "hashFile", "(", "File", "$", "file", ")", "{", "$", "arr", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "layouts", "as", "$", "layout", ")", "{", "if", "(", "strpos", "(", "$", "layout", ",", "'_templates'", ")", ...
Calculates the invalidation hash for the given File. @param File $file @return string
[ "Calculates", "the", "invalidation", "hash", "for", "the", "given", "File", "." ]
f3fc980b2484ccbe609a7f811c65b91254e8720e
https://github.com/tapestry-cloud/tapestry/blob/f3fc980b2484ccbe609a7f811c65b91254e8720e/src/Entities/CachedFile.php#L68-L86
231,206
ctbsea/phalapi-smarty
src/Smarty/sysplugins/smarty_internal_config_file_compiler.php
Smarty_Internal_Config_File_Compiler.compileTemplate
public function compileTemplate(Smarty_Internal_Template $template) { $this->template = $template; $this->template->compiled->file_dependency[$this->template->source->uid] = array($this->template->source->filepath, ...
php
public function compileTemplate(Smarty_Internal_Template $template) { $this->template = $template; $this->template->compiled->file_dependency[$this->template->source->uid] = array($this->template->source->filepath, ...
[ "public", "function", "compileTemplate", "(", "Smarty_Internal_Template", "$", "template", ")", "{", "$", "this", "->", "template", "=", "$", "template", ";", "$", "this", "->", "template", "->", "compiled", "->", "file_dependency", "[", "$", "this", "->", "...
Method to compile Smarty config source. @param Smarty_Internal_Template $template @return bool true if compiling succeeded, false if it failed
[ "Method", "to", "compile", "Smarty", "config", "source", "." ]
4d40da3e4482c0749f3cfd1605265a109a1c495f
https://github.com/ctbsea/phalapi-smarty/blob/4d40da3e4482c0749f3cfd1605265a109a1c495f/src/Smarty/sysplugins/smarty_internal_config_file_compiler.php#L101-L151
231,207
ctbsea/phalapi-smarty
src/Smarty/sysplugins/smarty_internal_template.php
Smarty_Internal_Template._getTemplateId
public function _getTemplateId() { return isset($this->templateId) ? $this->templateId : $this->templateId = $this->smarty->_getTemplateId($this->template_resource, $this->cache_id, $this->compile_id); }
php
public function _getTemplateId() { return isset($this->templateId) ? $this->templateId : $this->templateId = $this->smarty->_getTemplateId($this->template_resource, $this->cache_id, $this->compile_id); }
[ "public", "function", "_getTemplateId", "(", ")", "{", "return", "isset", "(", "$", "this", "->", "templateId", ")", "?", "$", "this", "->", "templateId", ":", "$", "this", "->", "templateId", "=", "$", "this", "->", "smarty", "->", "_getTemplateId", "("...
Get unique template id @return string
[ "Get", "unique", "template", "id" ]
4d40da3e4482c0749f3cfd1605265a109a1c495f
https://github.com/ctbsea/phalapi-smarty/blob/4d40da3e4482c0749f3cfd1605265a109a1c495f/src/Smarty/sysplugins/smarty_internal_template.php#L240-L244
231,208
ctbsea/phalapi-smarty
src/Smarty/sysplugins/smarty_internal_template.php
Smarty_Internal_Template.loadCompiler
public function loadCompiler() { if (!class_exists($this->source->handler->compiler_class)) { $this->smarty->loadPlugin($this->source->handler->compiler_class); } $this->compiler = new $this->source->handler->compiler_class($this->source->handler->template_lexer_class, ...
php
public function loadCompiler() { if (!class_exists($this->source->handler->compiler_class)) { $this->smarty->loadPlugin($this->source->handler->compiler_class); } $this->compiler = new $this->source->handler->compiler_class($this->source->handler->template_lexer_class, ...
[ "public", "function", "loadCompiler", "(", ")", "{", "if", "(", "!", "class_exists", "(", "$", "this", "->", "source", "->", "handler", "->", "compiler_class", ")", ")", "{", "$", "this", "->", "smarty", "->", "loadPlugin", "(", "$", "this", "->", "sou...
Load compiler object @throws \SmartyException
[ "Load", "compiler", "object" ]
4d40da3e4482c0749f3cfd1605265a109a1c495f
https://github.com/ctbsea/phalapi-smarty/blob/4d40da3e4482c0749f3cfd1605265a109a1c495f/src/Smarty/sysplugins/smarty_internal_template.php#L281-L289
231,209
cygnite/framework
src/Cygnite/Console/Generator/Form.php
Form.generate
public function generate() { $filePath = ''; $formName = Inflector::classify($this->formCommand->tableName); if (file_exists($this->getFormTemplatePath().'Form'.EXT)) { //We will generate Form Component $formContent = file_get_contents($this->getFormTemplatePath().'F...
php
public function generate() { $filePath = ''; $formName = Inflector::classify($this->formCommand->tableName); if (file_exists($this->getFormTemplatePath().'Form'.EXT)) { //We will generate Form Component $formContent = file_get_contents($this->getFormTemplatePath().'F...
[ "public", "function", "generate", "(", ")", "{", "$", "filePath", "=", "''", ";", "$", "formName", "=", "Inflector", "::", "classify", "(", "$", "this", "->", "formCommand", "->", "tableName", ")", ";", "if", "(", "file_exists", "(", "$", "this", "->",...
Generate Form.
[ "Generate", "Form", "." ]
58d0cc1c946415eb0867d76218bd35166e999093
https://github.com/cygnite/framework/blob/58d0cc1c946415eb0867d76218bd35166e999093/src/Cygnite/Console/Generator/Form.php#L77-L97
231,210
php-task/TaskBundle
src/DependencyInjection/TaskExtension.php
TaskExtension.loadDoctrineAdapter
private function loadDoctrineAdapter(array $config, ContainerBuilder $container) { if ($config['clear']) { $definition = new Definition( DoctrineTaskExecutionListener::class, [new Reference('doctrine.orm.entity_manager', ContainerInterface::IGNORE_ON_INVALID_REFER...
php
private function loadDoctrineAdapter(array $config, ContainerBuilder $container) { if ($config['clear']) { $definition = new Definition( DoctrineTaskExecutionListener::class, [new Reference('doctrine.orm.entity_manager', ContainerInterface::IGNORE_ON_INVALID_REFER...
[ "private", "function", "loadDoctrineAdapter", "(", "array", "$", "config", ",", "ContainerBuilder", "$", "container", ")", "{", "if", "(", "$", "config", "[", "'clear'", "]", ")", "{", "$", "definition", "=", "new", "Definition", "(", "DoctrineTaskExecutionLis...
Load doctrine adapter. @param array $config @param ContainerBuilder $container
[ "Load", "doctrine", "adapter", "." ]
be8f0bbdfa3dc9dcaf0e01814166730a336eea07
https://github.com/php-task/TaskBundle/blob/be8f0bbdfa3dc9dcaf0e01814166730a336eea07/src/DependencyInjection/TaskExtension.php#L68-L81
231,211
php-task/TaskBundle
src/DependencyInjection/TaskExtension.php
TaskExtension.loadLockingComponent
private function loadLockingComponent(array $config, ContainerBuilder $container, LoaderInterface $loader) { if (!$config['enabled']) { return $loader->load('locking/null.xml'); } $loader->load('locking/services.xml'); $container->setParameter('task.lock.ttl', $config['t...
php
private function loadLockingComponent(array $config, ContainerBuilder $container, LoaderInterface $loader) { if (!$config['enabled']) { return $loader->load('locking/null.xml'); } $loader->load('locking/services.xml'); $container->setParameter('task.lock.ttl', $config['t...
[ "private", "function", "loadLockingComponent", "(", "array", "$", "config", ",", "ContainerBuilder", "$", "container", ",", "LoaderInterface", "$", "loader", ")", "{", "if", "(", "!", "$", "config", "[", "'enabled'", "]", ")", "{", "return", "$", "loader", ...
Load services for locking component. @param array $config @param LoaderInterface $loader @param ContainerBuilder $container
[ "Load", "services", "for", "locking", "component", "." ]
be8f0bbdfa3dc9dcaf0e01814166730a336eea07
https://github.com/php-task/TaskBundle/blob/be8f0bbdfa3dc9dcaf0e01814166730a336eea07/src/DependencyInjection/TaskExtension.php#L90-L98
231,212
php-task/TaskBundle
src/DependencyInjection/TaskExtension.php
TaskExtension.loadExecutorComponent
private function loadExecutorComponent(array $config, ContainerBuilder $container, LoaderInterface $loader) { $loader->load('executor/' . $config['type'] . '.xml'); $container->setAlias('task.executor', 'task.executor.' . $config['type']); if (!array_key_exists($config['type'], $config)) { ...
php
private function loadExecutorComponent(array $config, ContainerBuilder $container, LoaderInterface $loader) { $loader->load('executor/' . $config['type'] . '.xml'); $container->setAlias('task.executor', 'task.executor.' . $config['type']); if (!array_key_exists($config['type'], $config)) { ...
[ "private", "function", "loadExecutorComponent", "(", "array", "$", "config", ",", "ContainerBuilder", "$", "container", ",", "LoaderInterface", "$", "loader", ")", "{", "$", "loader", "->", "load", "(", "'executor/'", ".", "$", "config", "[", "'type'", "]", ...
Load services for executor component. @param array $config @param LoaderInterface $loader @param ContainerBuilder $container
[ "Load", "services", "for", "executor", "component", "." ]
be8f0bbdfa3dc9dcaf0e01814166730a336eea07
https://github.com/php-task/TaskBundle/blob/be8f0bbdfa3dc9dcaf0e01814166730a336eea07/src/DependencyInjection/TaskExtension.php#L107-L125
231,213
php-task/TaskBundle
src/DependencyInjection/TaskExtension.php
TaskExtension.getLockingStorageAliases
private function getLockingStorageAliases(ContainerBuilder $container) { $taggedServices = $container->findTaggedServiceIds('task.lock.storage'); $result = []; foreach ($taggedServices as $id => $tags) { foreach ($tags as $tag) { $result[$tag['alias']] = $id; ...
php
private function getLockingStorageAliases(ContainerBuilder $container) { $taggedServices = $container->findTaggedServiceIds('task.lock.storage'); $result = []; foreach ($taggedServices as $id => $tags) { foreach ($tags as $tag) { $result[$tag['alias']] = $id; ...
[ "private", "function", "getLockingStorageAliases", "(", "ContainerBuilder", "$", "container", ")", "{", "$", "taggedServices", "=", "$", "container", "->", "findTaggedServiceIds", "(", "'task.lock.storage'", ")", ";", "$", "result", "=", "[", "]", ";", "foreach", ...
Find storage aliases and related ids. @param ContainerBuilder $container @return array
[ "Find", "storage", "aliases", "and", "related", "ids", "." ]
be8f0bbdfa3dc9dcaf0e01814166730a336eea07
https://github.com/php-task/TaskBundle/blob/be8f0bbdfa3dc9dcaf0e01814166730a336eea07/src/DependencyInjection/TaskExtension.php#L134-L146
231,214
php-task/TaskBundle
src/Command/ScheduleSystemTasksCommand.php
ScheduleSystemTasksCommand.processSystemTask
private function processSystemTask($systemKey, array $systemTask, OutputInterface $output) { if (!$systemTask['enabled']) { if ($this->disableSystemTask($systemKey)) { $output->writeln(sprintf(' * System-task "%s" was <comment>disabled</comment>', $systemKey)); } ...
php
private function processSystemTask($systemKey, array $systemTask, OutputInterface $output) { if (!$systemTask['enabled']) { if ($this->disableSystemTask($systemKey)) { $output->writeln(sprintf(' * System-task "%s" was <comment>disabled</comment>', $systemKey)); } ...
[ "private", "function", "processSystemTask", "(", "$", "systemKey", ",", "array", "$", "systemTask", ",", "OutputInterface", "$", "output", ")", "{", "if", "(", "!", "$", "systemTask", "[", "'enabled'", "]", ")", "{", "if", "(", "$", "this", "->", "disabl...
Process single system task. @param string $systemKey @param array $systemTask @param OutputInterface $output
[ "Process", "single", "system", "task", "." ]
be8f0bbdfa3dc9dcaf0e01814166730a336eea07
https://github.com/php-task/TaskBundle/blob/be8f0bbdfa3dc9dcaf0e01814166730a336eea07/src/Command/ScheduleSystemTasksCommand.php#L120-L148
231,215
php-task/TaskBundle
src/Command/ScheduleSystemTasksCommand.php
ScheduleSystemTasksCommand.disableSystemTask
private function disableSystemTask($systemKey) { if (!$task = $this->taskRepository->findBySystemKey($systemKey)) { return false; } $this->disableTask($task); return true; }
php
private function disableSystemTask($systemKey) { if (!$task = $this->taskRepository->findBySystemKey($systemKey)) { return false; } $this->disableTask($task); return true; }
[ "private", "function", "disableSystemTask", "(", "$", "systemKey", ")", "{", "if", "(", "!", "$", "task", "=", "$", "this", "->", "taskRepository", "->", "findBySystemKey", "(", "$", "systemKey", ")", ")", "{", "return", "false", ";", "}", "$", "this", ...
Disable task identified by system-key. @param string $systemKey @return bool
[ "Disable", "task", "identified", "by", "system", "-", "key", "." ]
be8f0bbdfa3dc9dcaf0e01814166730a336eea07
https://github.com/php-task/TaskBundle/blob/be8f0bbdfa3dc9dcaf0e01814166730a336eea07/src/Command/ScheduleSystemTasksCommand.php#L157-L166
231,216
php-task/TaskBundle
src/Command/ScheduleSystemTasksCommand.php
ScheduleSystemTasksCommand.disableTask
public function disableTask(TaskInterface $task) { $task->setInterval($task->getInterval(), $task->getFirstExecution(), new \DateTime()); return $this->abortPending($task); }
php
public function disableTask(TaskInterface $task) { $task->setInterval($task->getInterval(), $task->getFirstExecution(), new \DateTime()); return $this->abortPending($task); }
[ "public", "function", "disableTask", "(", "TaskInterface", "$", "task", ")", "{", "$", "task", "->", "setInterval", "(", "$", "task", "->", "getInterval", "(", ")", ",", "$", "task", "->", "getFirstExecution", "(", ")", ",", "new", "\\", "DateTime", "(",...
Disable given task identified. @param TaskInterface $task @return bool
[ "Disable", "given", "task", "identified", "." ]
be8f0bbdfa3dc9dcaf0e01814166730a336eea07
https://github.com/php-task/TaskBundle/blob/be8f0bbdfa3dc9dcaf0e01814166730a336eea07/src/Command/ScheduleSystemTasksCommand.php#L175-L180
231,217
php-task/TaskBundle
src/Command/ScheduleSystemTasksCommand.php
ScheduleSystemTasksCommand.updateTask
private function updateTask($systemKey, array $systemTask, TaskInterface $task) { if ($task->getHandlerClass() !== $systemTask['handler_class'] || $task->getWorkload() !== $systemTask['workload'] ) { throw new \InvalidArgumentException( sprintf('No update of h...
php
private function updateTask($systemKey, array $systemTask, TaskInterface $task) { if ($task->getHandlerClass() !== $systemTask['handler_class'] || $task->getWorkload() !== $systemTask['workload'] ) { throw new \InvalidArgumentException( sprintf('No update of h...
[ "private", "function", "updateTask", "(", "$", "systemKey", ",", "array", "$", "systemTask", ",", "TaskInterface", "$", "task", ")", "{", "if", "(", "$", "task", "->", "getHandlerClass", "(", ")", "!==", "$", "systemTask", "[", "'handler_class'", "]", "||"...
Update given task. @param string $systemKey @param array $systemTask @param TaskInterface $task
[ "Update", "given", "task", "." ]
be8f0bbdfa3dc9dcaf0e01814166730a336eea07
https://github.com/php-task/TaskBundle/blob/be8f0bbdfa3dc9dcaf0e01814166730a336eea07/src/Command/ScheduleSystemTasksCommand.php#L189-L207
231,218
php-task/TaskBundle
src/Command/ScheduleSystemTasksCommand.php
ScheduleSystemTasksCommand.abortPending
private function abortPending(TaskInterface $task) { if (!$execution = $this->taskExecutionRepository->findPending($task)) { return false; } $execution->setStatus(TaskStatus::ABORTED); $this->taskExecutionRepository->save($execution); return true; }
php
private function abortPending(TaskInterface $task) { if (!$execution = $this->taskExecutionRepository->findPending($task)) { return false; } $execution->setStatus(TaskStatus::ABORTED); $this->taskExecutionRepository->save($execution); return true; }
[ "private", "function", "abortPending", "(", "TaskInterface", "$", "task", ")", "{", "if", "(", "!", "$", "execution", "=", "$", "this", "->", "taskExecutionRepository", "->", "findPending", "(", "$", "task", ")", ")", "{", "return", "false", ";", "}", "$...
Abort pending execution for given task. @param TaskInterface $task @return bool
[ "Abort", "pending", "execution", "for", "given", "task", "." ]
be8f0bbdfa3dc9dcaf0e01814166730a336eea07
https://github.com/php-task/TaskBundle/blob/be8f0bbdfa3dc9dcaf0e01814166730a336eea07/src/Command/ScheduleSystemTasksCommand.php#L216-L226
231,219
PaymentSuite/paymentsuite
src/PaymentSuite/PaymentCoreBundle/DependencyInjection/Abstracts/AbstractPaymentSuiteConfiguration.php
AbstractPaymentSuiteConfiguration.addRouteConfiguration
protected function addRouteConfiguration($routeName) { $builder = new TreeBuilder(); $node = $builder->root($routeName); $node ->isRequired() ->children() ->scalarNode('route') ->isRequired() ->cannotBeEmpty() ...
php
protected function addRouteConfiguration($routeName) { $builder = new TreeBuilder(); $node = $builder->root($routeName); $node ->isRequired() ->children() ->scalarNode('route') ->isRequired() ->cannotBeEmpty() ...
[ "protected", "function", "addRouteConfiguration", "(", "$", "routeName", ")", "{", "$", "builder", "=", "new", "TreeBuilder", "(", ")", ";", "$", "node", "=", "$", "builder", "->", "root", "(", "$", "routeName", ")", ";", "$", "node", "->", "isRequired",...
Add a new success route in configuration. @param string $routeName Route name @return NodeDefinition Node
[ "Add", "a", "new", "success", "route", "in", "configuration", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/PaymentCoreBundle/DependencyInjection/Abstracts/AbstractPaymentSuiteConfiguration.php#L34-L54
231,220
php-task/TaskBundle
src/Entity/TaskRepository.php
TaskRepository.findEndBefore
public function findEndBefore(\DateTime $dateTime) { return $this->createQueryBuilder('t') ->where('t.lastExecution IS NULL OR t.lastExecution > :dateTime') ->setParameter('dateTime', $dateTime) ->getQuery() ->getResult(); }
php
public function findEndBefore(\DateTime $dateTime) { return $this->createQueryBuilder('t') ->where('t.lastExecution IS NULL OR t.lastExecution > :dateTime') ->setParameter('dateTime', $dateTime) ->getQuery() ->getResult(); }
[ "public", "function", "findEndBefore", "(", "\\", "DateTime", "$", "dateTime", ")", "{", "return", "$", "this", "->", "createQueryBuilder", "(", "'t'", ")", "->", "where", "(", "'t.lastExecution IS NULL OR t.lastExecution > :dateTime'", ")", "->", "setParameter", "(...
Returns task where last-execution is before given date-time. @param \DateTime $dateTime @return TaskInterface[]
[ "Returns", "task", "where", "last", "-", "execution", "is", "before", "given", "date", "-", "time", "." ]
be8f0bbdfa3dc9dcaf0e01814166730a336eea07
https://github.com/php-task/TaskBundle/blob/be8f0bbdfa3dc9dcaf0e01814166730a336eea07/src/Entity/TaskRepository.php#L93-L100
231,221
php-task/TaskBundle
src/Entity/TaskRepository.php
TaskRepository.findBySystemKey
public function findBySystemKey($systemKey) { try { return $this->createQueryBuilder('t') ->where('t.systemKey = :systemKey') ->setParameter('systemKey', $systemKey) ->getQuery() ->getSingleResult(); } catch (NoResultExcepti...
php
public function findBySystemKey($systemKey) { try { return $this->createQueryBuilder('t') ->where('t.systemKey = :systemKey') ->setParameter('systemKey', $systemKey) ->getQuery() ->getSingleResult(); } catch (NoResultExcepti...
[ "public", "function", "findBySystemKey", "(", "$", "systemKey", ")", "{", "try", "{", "return", "$", "this", "->", "createQueryBuilder", "(", "'t'", ")", "->", "where", "(", "'t.systemKey = :systemKey'", ")", "->", "setParameter", "(", "'systemKey'", ",", "$",...
Returns task identified by system-key. @param string $systemKey @return TaskInterface
[ "Returns", "task", "identified", "by", "system", "-", "key", "." ]
be8f0bbdfa3dc9dcaf0e01814166730a336eea07
https://github.com/php-task/TaskBundle/blob/be8f0bbdfa3dc9dcaf0e01814166730a336eea07/src/Entity/TaskRepository.php#L109-L120
231,222
dnadesign/silverstripe-elemental-subsites
src/Extensions/ElementalSubsiteExtension.php
ElementalSubsiteExtension.augmentSQL
public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) { if (!class_exists(Subsite::class)) { return; } if (Subsite::$disable_subsite_filter) { return; } if ($dataQuery && $dataQuery->getQueryParam('Subsite.filter') === false) { ...
php
public function augmentSQL(SQLSelect $query, DataQuery $dataQuery = null) { if (!class_exists(Subsite::class)) { return; } if (Subsite::$disable_subsite_filter) { return; } if ($dataQuery && $dataQuery->getQueryParam('Subsite.filter') === false) { ...
[ "public", "function", "augmentSQL", "(", "SQLSelect", "$", "query", ",", "DataQuery", "$", "dataQuery", "=", "null", ")", "{", "if", "(", "!", "class_exists", "(", "Subsite", "::", "class", ")", ")", "{", "return", ";", "}", "if", "(", "Subsite", "::",...
Update any requests for elements to limit the results to the current site @param SQLSelect $query @param DataQuery|null $dataQuery
[ "Update", "any", "requests", "for", "elements", "to", "limit", "the", "results", "to", "the", "current", "site" ]
c6b0581779e39ffecf033ec72ab455ace2cf6951
https://github.com/dnadesign/silverstripe-elemental-subsites/blob/c6b0581779e39ffecf033ec72ab455ace2cf6951/src/Extensions/ElementalSubsiteExtension.php#L42-L77
231,223
benmag/laravel-rancher
src/Factories/Entity/AbstractEntity.php
AbstractEntity.setProperty
public function setProperty($property, $value) { $this->$property = $value; // Parse $value. Is it an entity or an array containing entities? // We've got an array, lets see if we can instantiate an entity if(is_array($value) && !empty($value) && is_object(head($value))) { ...
php
public function setProperty($property, $value) { $this->$property = $value; // Parse $value. Is it an entity or an array containing entities? // We've got an array, lets see if we can instantiate an entity if(is_array($value) && !empty($value) && is_object(head($value))) { ...
[ "public", "function", "setProperty", "(", "$", "property", ",", "$", "value", ")", "{", "$", "this", "->", "$", "property", "=", "$", "value", ";", "// Parse $value. Is it an entity or an array containing entities?", "// We've got an array, lets see if we can instantiate an...
By default, simply set the property to the specified value When the value is an array of objects with a `type` parameter, check if instantiation is possible. The value of `type` is used to decide which class to attempt to instantiate @param $property @param $value
[ "By", "default", "simply", "set", "the", "property", "to", "the", "specified", "value" ]
8cd933757c206588215c72b6691f72515eaa0f38
https://github.com/benmag/laravel-rancher/blob/8cd933757c206588215c72b6691f72515eaa0f38/src/Factories/Entity/AbstractEntity.php#L80-L130
231,224
niklongstone/regex-reverse
src/RegRev/Configuration.php
Configuration.setUp
public function setUp($parameters) { $expressions = new ExpressionContainer(); foreach ($parameters as $param) { $charType = $this->buildCharType($param); $expressions->set($charType); } return $expressions; }
php
public function setUp($parameters) { $expressions = new ExpressionContainer(); foreach ($parameters as $param) { $charType = $this->buildCharType($param); $expressions->set($charType); } return $expressions; }
[ "public", "function", "setUp", "(", "$", "parameters", ")", "{", "$", "expressions", "=", "new", "ExpressionContainer", "(", ")", ";", "foreach", "(", "$", "parameters", "as", "$", "param", ")", "{", "$", "charType", "=", "$", "this", "->", "buildCharTyp...
Setup the configuration. @param array $parameters @return ExpressionContainer
[ "Setup", "the", "configuration", "." ]
a93bb266fbc0621094a5d1ad2583b8a54999ea25
https://github.com/niklongstone/regex-reverse/blob/a93bb266fbc0621094a5d1ad2583b8a54999ea25/src/RegRev/Configuration.php#L230-L239
231,225
lukasdev/DRouter
src/Router.php
Router.validatePath
private function validatePath($path) { $last = strlen($path)-1; if ($path[$last] == '/') { $path = substr($path, 0, -1); } return $path; }
php
private function validatePath($path) { $last = strlen($path)-1; if ($path[$last] == '/') { $path = substr($path, 0, -1); } return $path; }
[ "private", "function", "validatePath", "(", "$", "path", ")", "{", "$", "last", "=", "strlen", "(", "$", "path", ")", "-", "1", ";", "if", "(", "$", "path", "[", "$", "last", "]", "==", "'/'", ")", "{", "$", "path", "=", "substr", "(", "$", "...
Valida os paths das rotas, retirando a ultima barra caso exista para evitar conflitos no dispatch @param $path string
[ "Valida", "os", "paths", "das", "rotas", "retirando", "a", "ultima", "barra", "caso", "exista", "para", "evitar", "conflitos", "no", "dispatch" ]
b02e9fb595f00b89122886ccb77f623bae09141a
https://github.com/lukasdev/DRouter/blob/b02e9fb595f00b89122886ccb77f623bae09141a/src/Router.php#L96-L103
231,226
lukasdev/DRouter
src/Router.php
Router.group
public function group($prefix, $fnc) { $this->routePrefix = $prefix; if ($fnc instanceof \Closure) { $fnc(); } else { throw new \InvalidArgumentException('Callable do metodo group DEVE ser um Closure'); } $this->routePrefix = null; $this->group...
php
public function group($prefix, $fnc) { $this->routePrefix = $prefix; if ($fnc instanceof \Closure) { $fnc(); } else { throw new \InvalidArgumentException('Callable do metodo group DEVE ser um Closure'); } $this->routePrefix = null; $this->group...
[ "public", "function", "group", "(", "$", "prefix", ",", "$", "fnc", ")", "{", "$", "this", "->", "routePrefix", "=", "$", "prefix", ";", "if", "(", "$", "fnc", "instanceof", "\\", "Closure", ")", "{", "$", "fnc", "(", ")", ";", "}", "else", "{", ...
Define o prefixo para agrupamento das rotas @param $prefix string @param $fnc callable Closure
[ "Define", "o", "prefixo", "para", "agrupamento", "das", "rotas" ]
b02e9fb595f00b89122886ccb77f623bae09141a
https://github.com/lukasdev/DRouter/blob/b02e9fb595f00b89122886ccb77f623bae09141a/src/Router.php#L143-L156
231,227
lukasdev/DRouter
src/Router.php
Router.setName
public function setName($routeName) { $lastMethod = $this->lastRouteMethod; $lastIndex = count($this->routes[$lastMethod])-1; $indexName = $lastMethod.':'.$lastIndex; $this->routeNames[$indexName] = $routeName; $rota = $this->routes[$lastMethod][$lastIndex]; $rota->s...
php
public function setName($routeName) { $lastMethod = $this->lastRouteMethod; $lastIndex = count($this->routes[$lastMethod])-1; $indexName = $lastMethod.':'.$lastIndex; $this->routeNames[$indexName] = $routeName; $rota = $this->routes[$lastMethod][$lastIndex]; $rota->s...
[ "public", "function", "setName", "(", "$", "routeName", ")", "{", "$", "lastMethod", "=", "$", "this", "->", "lastRouteMethod", ";", "$", "lastIndex", "=", "count", "(", "$", "this", "->", "routes", "[", "$", "lastMethod", "]", ")", "-", "1", ";", "$...
Define o nome de uma rota recem criada @param $routeName string
[ "Define", "o", "nome", "de", "uma", "rota", "recem", "criada" ]
b02e9fb595f00b89122886ccb77f623bae09141a
https://github.com/lukasdev/DRouter/blob/b02e9fb595f00b89122886ccb77f623bae09141a/src/Router.php#L162-L174
231,228
lukasdev/DRouter
src/Router.php
Router.findRouteByName
public function findRouteByName($routeName) { $routePath = array_search($routeName, $this->routeNames); list($method, $index) = explode(':', $routePath); return $this->routes[$method][$index]; }
php
public function findRouteByName($routeName) { $routePath = array_search($routeName, $this->routeNames); list($method, $index) = explode(':', $routePath); return $this->routes[$method][$index]; }
[ "public", "function", "findRouteByName", "(", "$", "routeName", ")", "{", "$", "routePath", "=", "array_search", "(", "$", "routeName", ",", "$", "this", "->", "routeNames", ")", ";", "list", "(", "$", "method", ",", "$", "index", ")", "=", "explode", ...
Encontra um objeto de uma rota por seu nome
[ "Encontra", "um", "objeto", "de", "uma", "rota", "por", "seu", "nome" ]
b02e9fb595f00b89122886ccb77f623bae09141a
https://github.com/lukasdev/DRouter/blob/b02e9fb595f00b89122886ccb77f623bae09141a/src/Router.php#L179-L184
231,229
lukasdev/DRouter
src/Router.php
Router.findLastRoute
private function findLastRoute() { $method = $this->lastRouteMethod; $index = count($this->routes[$method])-1; return $this->routes[$method][$index]; }
php
private function findLastRoute() { $method = $this->lastRouteMethod; $index = count($this->routes[$method])-1; return $this->routes[$method][$index]; }
[ "private", "function", "findLastRoute", "(", ")", "{", "$", "method", "=", "$", "this", "->", "lastRouteMethod", ";", "$", "index", "=", "count", "(", "$", "this", "->", "routes", "[", "$", "method", "]", ")", "-", "1", ";", "return", "$", "this", ...
Encontra o ultimo objeto de rota declarada idependente de seu name
[ "Encontra", "o", "ultimo", "objeto", "de", "rota", "declarada", "idependente", "de", "seu", "name" ]
b02e9fb595f00b89122886ccb77f623bae09141a
https://github.com/lukasdev/DRouter/blob/b02e9fb595f00b89122886ccb77f623bae09141a/src/Router.php#L189-L195
231,230
lukasdev/DRouter
src/Router.php
Router.redirectTo
public function redirectTo($routeName, $query = array(), $params = array()) { $path = $this->pathFor($routeName, $params); if (!is_array($query)) { throw new \UnexpectedValueException('Router::redirectTo A query deve ser um array!'); } if (count($query) > 0) { ...
php
public function redirectTo($routeName, $query = array(), $params = array()) { $path = $this->pathFor($routeName, $params); if (!is_array($query)) { throw new \UnexpectedValueException('Router::redirectTo A query deve ser um array!'); } if (count($query) > 0) { ...
[ "public", "function", "redirectTo", "(", "$", "routeName", ",", "$", "query", "=", "array", "(", ")", ",", "$", "params", "=", "array", "(", ")", ")", "{", "$", "path", "=", "$", "this", "->", "pathFor", "(", "$", "routeName", ",", "$", "params", ...
Efetua um redirecionamento para um path, passando gets opcionais convertidos de array, como parametros @param string $routeName @param array $query @param array $params
[ "Efetua", "um", "redirecionamento", "para", "um", "path", "passando", "gets", "opcionais", "convertidos", "de", "array", "como", "parametros" ]
b02e9fb595f00b89122886ccb77f623bae09141a
https://github.com/lukasdev/DRouter/blob/b02e9fb595f00b89122886ccb77f623bae09141a/src/Router.php#L304-L318
231,231
lukasdev/DRouter
src/Router.php
Router.dispatchCandidateRoutes
public function dispatchCandidateRoutes($requestUri) { $expUri = explode('/',$requestUri); $similaridades = []; if (count($this->candidateRoutes) > 1) { foreach ($this->candidateRoutes as $n => $rota) { $padrao = $rota->getPattern(); if (preg_match('/...
php
public function dispatchCandidateRoutes($requestUri) { $expUri = explode('/',$requestUri); $similaridades = []; if (count($this->candidateRoutes) > 1) { foreach ($this->candidateRoutes as $n => $rota) { $padrao = $rota->getPattern(); if (preg_match('/...
[ "public", "function", "dispatchCandidateRoutes", "(", "$", "requestUri", ")", "{", "$", "expUri", "=", "explode", "(", "'/'", ",", "$", "requestUri", ")", ";", "$", "similaridades", "=", "[", "]", ";", "if", "(", "count", "(", "$", "this", "->", "candi...
Determina qual rota deve ser despachada, com base em sua similaridade com a request URI,para evitar conflitos entre rotas parecidas. @param $requestUri string
[ "Determina", "qual", "rota", "deve", "ser", "despachada", "com", "base", "em", "sua", "similaridade", "com", "a", "request", "URI", "para", "evitar", "conflitos", "entre", "rotas", "parecidas", "." ]
b02e9fb595f00b89122886ccb77f623bae09141a
https://github.com/lukasdev/DRouter/blob/b02e9fb595f00b89122886ccb77f623bae09141a/src/Router.php#L375-L412
231,232
schemaio/schema-php-client
lib/Connection.php
Connection.request_write
private function request_write($args) { $request = json_encode($args)."\n"; $this->last_request = $request; if (!$this->stream) { $desc = $this->request_description(); throw new NetworkException("Unable to execute request ({$desc}): Connection closed"); } ...
php
private function request_write($args) { $request = json_encode($args)."\n"; $this->last_request = $request; if (!$this->stream) { $desc = $this->request_description(); throw new NetworkException("Unable to execute request ({$desc}): Connection closed"); } ...
[ "private", "function", "request_write", "(", "$", "args", ")", "{", "$", "request", "=", "json_encode", "(", "$", "args", ")", ".", "\"\\n\"", ";", "$", "this", "->", "last_request", "=", "$", "request", ";", "if", "(", "!", "$", "this", "->", "strea...
Write request to stream @param array $args
[ "Write", "request", "to", "stream" ]
20759434a6dd7fcc38910eca5ad228287472751b
https://github.com/schemaio/schema-php-client/blob/20759434a6dd7fcc38910eca5ad228287472751b/lib/Connection.php#L120-L140
231,233
schemaio/schema-php-client
lib/Connection.php
Connection.request_response
private function request_response() { // Must not block while reading stream_set_blocking($this->stream, false); $response = ''; while (true) { $buffer = fgets($this->stream); $response .= $buffer; if (strstr($buffer, "\n")) { ...
php
private function request_response() { // Must not block while reading stream_set_blocking($this->stream, false); $response = ''; while (true) { $buffer = fgets($this->stream); $response .= $buffer; if (strstr($buffer, "\n")) { ...
[ "private", "function", "request_response", "(", ")", "{", "// Must not block while reading", "stream_set_blocking", "(", "$", "this", "->", "stream", ",", "false", ")", ";", "$", "response", "=", "''", ";", "while", "(", "true", ")", "{", "$", "buffer", "=",...
Get server response @return mixed
[ "Get", "server", "response" ]
20759434a6dd7fcc38910eca5ad228287472751b
https://github.com/schemaio/schema-php-client/blob/20759434a6dd7fcc38910eca5ad228287472751b/lib/Connection.php#L147-L184
231,234
schemaio/schema-php-client
lib/Connection.php
Connection.request_description
private function request_description() { $request = json_decode(trim($this->last_request), true); $desc = strtoupper($request[0]); if (isset($request[1])) { $desc .= ' '.json_encode($request[1]); } return $desc; }
php
private function request_description() { $request = json_decode(trim($this->last_request), true); $desc = strtoupper($request[0]); if (isset($request[1])) { $desc .= ' '.json_encode($request[1]); } return $desc; }
[ "private", "function", "request_description", "(", ")", "{", "$", "request", "=", "json_decode", "(", "trim", "(", "$", "this", "->", "last_request", ")", ",", "true", ")", ";", "$", "desc", "=", "strtoupper", "(", "$", "request", "[", "0", "]", ")", ...
Get description of last request @return string
[ "Get", "description", "of", "last", "request" ]
20759434a6dd7fcc38910eca5ad228287472751b
https://github.com/schemaio/schema-php-client/blob/20759434a6dd7fcc38910eca5ad228287472751b/lib/Connection.php#L191-L199
231,235
schemaio/schema-php-client
lib/Connection.php
Connection.close
public function close() { fclose($this->stream); $this->stream = null; $this->connected = false; }
php
public function close() { fclose($this->stream); $this->stream = null; $this->connected = false; }
[ "public", "function", "close", "(", ")", "{", "fclose", "(", "$", "this", "->", "stream", ")", ";", "$", "this", "->", "stream", "=", "null", ";", "$", "this", "->", "connected", "=", "false", ";", "}" ]
Close connection stream @return void
[ "Close", "connection", "stream" ]
20759434a6dd7fcc38910eca5ad228287472751b
https://github.com/schemaio/schema-php-client/blob/20759434a6dd7fcc38910eca5ad228287472751b/lib/Connection.php#L206-L211
231,236
juliushaertl/phpdoc-to-rst
src/ApiDocBuilder.php
ApiDocBuilder.createDirectoryStructure
private function createDirectoryStructure() { foreach ($this->project->getNamespaces() as $namespace) { $namespaceDir = $this->dstDir . str_replace('\\', '/', $namespace->getFqsen()); if (is_dir($namespaceDir)) { continue; } if (!mkdir($namespaceDi...
php
private function createDirectoryStructure() { foreach ($this->project->getNamespaces() as $namespace) { $namespaceDir = $this->dstDir . str_replace('\\', '/', $namespace->getFqsen()); if (is_dir($namespaceDir)) { continue; } if (!mkdir($namespaceDi...
[ "private", "function", "createDirectoryStructure", "(", ")", "{", "foreach", "(", "$", "this", "->", "project", "->", "getNamespaces", "(", ")", "as", "$", "namespace", ")", "{", "$", "namespaceDir", "=", "$", "this", "->", "dstDir", ".", "str_replace", "(...
Create directory structure for the rst output @throws WriteException
[ "Create", "directory", "structure", "for", "the", "rst", "output" ]
9a695417d1f3bb709f60cd5c519e46f1ad08c843
https://github.com/juliushaertl/phpdoc-to-rst/blob/9a695417d1f3bb709f60cd5c519e46f1ad08c843/src/ApiDocBuilder.php#L215-L225
231,237
PaymentSuite/paymentsuite
src/PaymentSuite/PaypalWebCheckoutBundle/Services/PaypalWebCheckoutMethodFactory.php
PaypalWebCheckoutMethodFactory.create
public function create( $mcGross = null, $paymentStatus = null, $notifyVersion = null, $payerStatus = null, $business = null, $quantity = null, $verifySign = null, $payerEmail = null, $txnId = null, $paymentType = null, $receiverEma...
php
public function create( $mcGross = null, $paymentStatus = null, $notifyVersion = null, $payerStatus = null, $business = null, $quantity = null, $verifySign = null, $payerEmail = null, $txnId = null, $paymentType = null, $receiverEma...
[ "public", "function", "create", "(", "$", "mcGross", "=", "null", ",", "$", "paymentStatus", "=", "null", ",", "$", "notifyVersion", "=", "null", ",", "$", "payerStatus", "=", "null", ",", "$", "business", "=", "null", ",", "$", "quantity", "=", "null"...
Initialize Paypal Method using an array which represents the parameters coming from the IPN message as shown in. https://developer.paypal.com/docs/classic/ipn/integration-guide/IPNandPDTVariables/#id091EAB0105Z @param float $mcGross Mc gross @param string $paymentStatus Payment status @param string $notifyVers...
[ "Initialize", "Paypal", "Method", "using", "an", "array", "which", "represents", "the", "parameters", "coming", "from", "the", "IPN", "message", "as", "shown", "in", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/PaypalWebCheckoutBundle/Services/PaypalWebCheckoutMethodFactory.php#L63-L103
231,238
jupeter/DoctrineDumpFixturesBundle
Command/DoctrineDumpCommand.php
DoctrineDumpCommand.loadCollaction
protected function loadCollaction($name, $entityName, $fields) { $em = $this->getContainer()->get('doctrine')->getManager(); $entityRepository = $em->getRepository($entityName); $meta = $em->getClassMetadata($entityName); $identifier = $meta->getSingleIdentifierFieldName(); ...
php
protected function loadCollaction($name, $entityName, $fields) { $em = $this->getContainer()->get('doctrine')->getManager(); $entityRepository = $em->getRepository($entityName); $meta = $em->getClassMetadata($entityName); $identifier = $meta->getSingleIdentifierFieldName(); ...
[ "protected", "function", "loadCollaction", "(", "$", "name", ",", "$", "entityName", ",", "$", "fields", ")", "{", "$", "em", "=", "$", "this", "->", "getContainer", "(", ")", "->", "get", "(", "'doctrine'", ")", "->", "getManager", "(", ")", ";", "$...
Load Collection of Doctrine entities. @param $name @param $entityName @param $fields @return array @throws \Exception
[ "Load", "Collection", "of", "Doctrine", "entities", "." ]
7207417ae847fb1aaa6bd2014217976c5b121cb3
https://github.com/jupeter/DoctrineDumpFixturesBundle/blob/7207417ae847fb1aaa6bd2014217976c5b121cb3/Command/DoctrineDumpCommand.php#L121-L169
231,239
jupeter/DoctrineDumpFixturesBundle
Command/DoctrineDumpCommand.php
DoctrineDumpCommand.loadItem
protected function loadItem($em, $data, $attributes, $association) { if (is_object($data)) { if (get_class($data) === 'DateTime') { return array('type' => 'DateTime', 'name' => $data->format('r')); } if (array_key_exists('targetEntity', $attributes)) { ...
php
protected function loadItem($em, $data, $attributes, $association) { if (is_object($data)) { if (get_class($data) === 'DateTime') { return array('type' => 'DateTime', 'name' => $data->format('r')); } if (array_key_exists('targetEntity', $attributes)) { ...
[ "protected", "function", "loadItem", "(", "$", "em", ",", "$", "data", ",", "$", "attributes", ",", "$", "association", ")", "{", "if", "(", "is_object", "(", "$", "data", ")", ")", "{", "if", "(", "get_class", "(", "$", "data", ")", "===", "'DateT...
Render one Entity item. @param $em @param $data @param $attributes @param $association @return array|mixed @throws \Exception
[ "Render", "one", "Entity", "item", "." ]
7207417ae847fb1aaa6bd2014217976c5b121cb3
https://github.com/jupeter/DoctrineDumpFixturesBundle/blob/7207417ae847fb1aaa6bd2014217976c5b121cb3/Command/DoctrineDumpCommand.php#L183-L217
231,240
leomarquine/eloquent-uuid
src/Uuid.php
Uuid.bootUuid
protected static function bootUuid() { static::creating(function ($model) { if (! Generator::isValid($model->{$model->getKeyName()})) { $model->{$model->getKeyName()} = Generator::uuid4()->toString(); } }); }
php
protected static function bootUuid() { static::creating(function ($model) { if (! Generator::isValid($model->{$model->getKeyName()})) { $model->{$model->getKeyName()} = Generator::uuid4()->toString(); } }); }
[ "protected", "static", "function", "bootUuid", "(", ")", "{", "static", "::", "creating", "(", "function", "(", "$", "model", ")", "{", "if", "(", "!", "Generator", "::", "isValid", "(", "$", "model", "->", "{", "$", "model", "->", "getKeyName", "(", ...
Boot uuid trait. @return void
[ "Boot", "uuid", "trait", "." ]
6f3d8384e332cf0be07b5800ca38a8cf12ae120d
https://github.com/leomarquine/eloquent-uuid/blob/6f3d8384e332cf0be07b5800ca38a8cf12ae120d/src/Uuid.php#L14-L21
231,241
codescheme/postcodes
src/Classes/Postcode.php
Postcode.validate
public function validate($postcode) { $url = '/postcodes/' . rawurlencode($postcode) . '/validate'; $request = new Request('GET', $url); $response = $this->httpTransport($request); return ($response && (200 === $response->status) && $response->result); }
php
public function validate($postcode) { $url = '/postcodes/' . rawurlencode($postcode) . '/validate'; $request = new Request('GET', $url); $response = $this->httpTransport($request); return ($response && (200 === $response->status) && $response->result); }
[ "public", "function", "validate", "(", "$", "postcode", ")", "{", "$", "url", "=", "'/postcodes/'", ".", "rawurlencode", "(", "$", "postcode", ")", ".", "'/validate'", ";", "$", "request", "=", "new", "Request", "(", "'GET'", ",", "$", "url", ")", ";",...
Validates a postcode @param string $postcode to be validated @return boolean
[ "Validates", "a", "postcode" ]
51d948f3350507dbafcc693d10fc426b02143ec3
https://github.com/codescheme/postcodes/blob/51d948f3350507dbafcc693d10fc426b02143ec3/src/Classes/Postcode.php#L54-L61
231,242
codescheme/postcodes
src/Classes/Postcode.php
Postcode.nearest
public function nearest($postcode) { $url = '/postcodes/' . rawurlencode($postcode) . '/nearest'; $request = new Request('GET', $url); return $this->httpTransport($request); }
php
public function nearest($postcode) { $url = '/postcodes/' . rawurlencode($postcode) . '/nearest'; $request = new Request('GET', $url); return $this->httpTransport($request); }
[ "public", "function", "nearest", "(", "$", "postcode", ")", "{", "$", "url", "=", "'/postcodes/'", ".", "rawurlencode", "(", "$", "postcode", ")", ".", "'/nearest'", ";", "$", "request", "=", "new", "Request", "(", "'GET'", ",", "$", "url", ")", ";", ...
Find nearest postcodes to given @param string $postcode @return object | null on Exception
[ "Find", "nearest", "postcodes", "to", "given" ]
51d948f3350507dbafcc693d10fc426b02143ec3
https://github.com/codescheme/postcodes/blob/51d948f3350507dbafcc693d10fc426b02143ec3/src/Classes/Postcode.php#L69-L75
231,243
codescheme/postcodes
src/Classes/Postcode.php
Postcode.reverseGeocode
public function reverseGeocode($lon, $lat) { $url = '/postcodes?lon=' . (float) $lon . '&lat=' . (float) $lat; $request = new Request('GET', $url); return $this->httpTransport($request); }
php
public function reverseGeocode($lon, $lat) { $url = '/postcodes?lon=' . (float) $lon . '&lat=' . (float) $lat; $request = new Request('GET', $url); return $this->httpTransport($request); }
[ "public", "function", "reverseGeocode", "(", "$", "lon", ",", "$", "lat", ")", "{", "$", "url", "=", "'/postcodes?lon='", ".", "(", "float", ")", "$", "lon", ".", "'&lat='", ".", "(", "float", ")", "$", "lat", ";", "$", "request", "=", "new", "Requ...
Get postcode from coordinates @params string $lon, $lat the coordinates @return object | null on Exception
[ "Get", "postcode", "from", "coordinates" ]
51d948f3350507dbafcc693d10fc426b02143ec3
https://github.com/codescheme/postcodes/blob/51d948f3350507dbafcc693d10fc426b02143ec3/src/Classes/Postcode.php#L83-L89
231,244
codescheme/postcodes
src/Classes/Postcode.php
Postcode.autocomplete
public function autocomplete($postcode) { $url = '/postcodes/' . rawurlencode($postcode) . '/autocomplete'; $request = new Request('GET', $url); return $this->httpTransport($request); }
php
public function autocomplete($postcode) { $url = '/postcodes/' . rawurlencode($postcode) . '/autocomplete'; $request = new Request('GET', $url); return $this->httpTransport($request); }
[ "public", "function", "autocomplete", "(", "$", "postcode", ")", "{", "$", "url", "=", "'/postcodes/'", ".", "rawurlencode", "(", "$", "postcode", ")", ".", "'/autocomplete'", ";", "$", "request", "=", "new", "Request", "(", "'GET'", ",", "$", "url", ")"...
Autocomplete a postcode, @param string $postcode, partial, especially outcode @return object | null on Exception
[ "Autocomplete", "a", "postcode" ]
51d948f3350507dbafcc693d10fc426b02143ec3
https://github.com/codescheme/postcodes/blob/51d948f3350507dbafcc693d10fc426b02143ec3/src/Classes/Postcode.php#L97-L103
231,245
codescheme/postcodes
src/Classes/Postcode.php
Postcode.postcodeLookup
public function postcodeLookup($postcode) { $url = '/postcodes/' . rawurlencode($postcode); $request = new Request('GET', $url); return $this->httpTransport($request); }
php
public function postcodeLookup($postcode) { $url = '/postcodes/' . rawurlencode($postcode); $request = new Request('GET', $url); return $this->httpTransport($request); }
[ "public", "function", "postcodeLookup", "(", "$", "postcode", ")", "{", "$", "url", "=", "'/postcodes/'", ".", "rawurlencode", "(", "$", "postcode", ")", ";", "$", "request", "=", "new", "Request", "(", "'GET'", ",", "$", "url", ")", ";", "return", "$"...
Look up a postcode, @param string $postcode, @return object | null on Exception
[ "Look", "up", "a", "postcode" ]
51d948f3350507dbafcc693d10fc426b02143ec3
https://github.com/codescheme/postcodes/blob/51d948f3350507dbafcc693d10fc426b02143ec3/src/Classes/Postcode.php#L111-L117
231,246
codescheme/postcodes
src/Classes/Postcode.php
Postcode.outcodeLookup
public function outcodeLookup($outcode) { $url = '/outcodes/' . rawurlencode($outcode); $request = new Request('GET', $url); return $this->httpTransport($request); }
php
public function outcodeLookup($outcode) { $url = '/outcodes/' . rawurlencode($outcode); $request = new Request('GET', $url); return $this->httpTransport($request); }
[ "public", "function", "outcodeLookup", "(", "$", "outcode", ")", "{", "$", "url", "=", "'/outcodes/'", ".", "rawurlencode", "(", "$", "outcode", ")", ";", "$", "request", "=", "new", "Request", "(", "'GET'", ",", "$", "url", ")", ";", "return", "$", ...
Look up a outcode, @param string $outcode, @return object | null on Exception
[ "Look", "up", "a", "outcode" ]
51d948f3350507dbafcc693d10fc426b02143ec3
https://github.com/codescheme/postcodes/blob/51d948f3350507dbafcc693d10fc426b02143ec3/src/Classes/Postcode.php#L125-L131
231,247
codescheme/postcodes
src/Classes/Postcode.php
Postcode.postcodeLookupBulk
public function postcodeLookupBulk($postcodes) { $headers = ['Content-Type' => 'application/json']; $body = ['postcodes' => $postcodes]; $request = new Request('POST', '/postcodes', $headers, json_encode($body)); return $this->httpTransport($request); }
php
public function postcodeLookupBulk($postcodes) { $headers = ['Content-Type' => 'application/json']; $body = ['postcodes' => $postcodes]; $request = new Request('POST', '/postcodes', $headers, json_encode($body)); return $this->httpTransport($request); }
[ "public", "function", "postcodeLookupBulk", "(", "$", "postcodes", ")", "{", "$", "headers", "=", "[", "'Content-Type'", "=>", "'application/json'", "]", ";", "$", "body", "=", "[", "'postcodes'", "=>", "$", "postcodes", "]", ";", "$", "request", "=", "new...
Bulk information lookup for multiple postcodes @param array $postcodes @return object | null on RequestException
[ "Bulk", "information", "lookup", "for", "multiple", "postcodes" ]
51d948f3350507dbafcc693d10fc426b02143ec3
https://github.com/codescheme/postcodes/blob/51d948f3350507dbafcc693d10fc426b02143ec3/src/Classes/Postcode.php#L139-L147
231,248
codescheme/postcodes
src/Classes/Postcode.php
Postcode.httpTransport
protected function httpTransport($request) { try { $response = $this->client->send($request); $results = json_decode($response->getBody()); return $results; } catch (RequestException $e) { Log::error(Psr7\str($e->getRequest())); if ($e->ha...
php
protected function httpTransport($request) { try { $response = $this->client->send($request); $results = json_decode($response->getBody()); return $results; } catch (RequestException $e) { Log::error(Psr7\str($e->getRequest())); if ($e->ha...
[ "protected", "function", "httpTransport", "(", "$", "request", ")", "{", "try", "{", "$", "response", "=", "$", "this", "->", "client", "->", "send", "(", "$", "request", ")", ";", "$", "results", "=", "json_decode", "(", "$", "response", "->", "getBod...
Does the http @param GuzzleHttp\Psr7\Request $request @throws RequestException @return object | null on RequestException
[ "Does", "the", "http" ]
51d948f3350507dbafcc693d10fc426b02143ec3
https://github.com/codescheme/postcodes/blob/51d948f3350507dbafcc693d10fc426b02143ec3/src/Classes/Postcode.php#L172-L185
231,249
mapbender/owsproxy3
src/OwsProxy3/CoreBundle/Controller/OwsProxyController.php
OwsProxyController.entryPointAction
public function entryPointAction() { $this->container->get('session')->save(); $this->logger = $this->container->get('logger'); /** @var Request $request */ $request = $this->get('request'); /** @var Signer $signer */ $signer = $this->get('signer'); $proxy_que...
php
public function entryPointAction() { $this->container->get('session')->save(); $this->logger = $this->container->get('logger'); /** @var Request $request */ $request = $this->get('request'); /** @var Signer $signer */ $signer = $this->get('signer'); $proxy_que...
[ "public", "function", "entryPointAction", "(", ")", "{", "$", "this", "->", "container", "->", "get", "(", "'session'", ")", "->", "save", "(", ")", ";", "$", "this", "->", "logger", "=", "$", "this", "->", "container", "->", "get", "(", "'logger'", ...
Handles the client's request @Route("/") @return \Symfony\Component\HttpFoundation\Response the response
[ "Handles", "the", "client", "s", "request" ]
7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3
https://github.com/mapbender/owsproxy3/blob/7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3/src/OwsProxy3/CoreBundle/Controller/OwsProxyController.php#L90-L144
231,250
mapbender/owsproxy3
src/OwsProxy3/CoreBundle/Controller/OwsProxyController.php
OwsProxyController.exceptionHtml
private function exceptionHtml(\Exception $e) { $response = new Response(); $html = $this->render("OwsProxy3CoreBundle::exception.html.twig", array("exception" => $e)); $response->headers->set('Content-Type', 'text/html'); $response->setStatusCode($e->getCode() ?: 500); $resp...
php
private function exceptionHtml(\Exception $e) { $response = new Response(); $html = $this->render("OwsProxy3CoreBundle::exception.html.twig", array("exception" => $e)); $response->headers->set('Content-Type', 'text/html'); $response->setStatusCode($e->getCode() ?: 500); $resp...
[ "private", "function", "exceptionHtml", "(", "\\", "Exception", "$", "e", ")", "{", "$", "response", "=", "new", "Response", "(", ")", ";", "$", "html", "=", "$", "this", "->", "render", "(", "\"OwsProxy3CoreBundle::exception.html.twig\"", ",", "array", "(",...
Creates a response with an exception as HTML @param \Exception $e the exception @return \Symfony\Component\HttpFoundation\Response the response
[ "Creates", "a", "response", "with", "an", "exception", "as", "HTML" ]
7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3
https://github.com/mapbender/owsproxy3/blob/7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3/src/OwsProxy3/CoreBundle/Controller/OwsProxyController.php#L152-L160
231,251
PaymentSuite/paymentsuite
src/PaymentSuite/StripeBundle/Services/StripeTemplateRender.php
StripeTemplateRender.renderStripeForm
public function renderStripeForm(Twig_Environment $environment, $viewTemplate = null) { $formType = $this->formFactory->create('stripe_view'); $environment->display($viewTemplate ?: $this->viewTemplate, [ 'stripe_form' => $formType->createView(), 'stripe_execute_route' => 'p...
php
public function renderStripeForm(Twig_Environment $environment, $viewTemplate = null) { $formType = $this->formFactory->create('stripe_view'); $environment->display($viewTemplate ?: $this->viewTemplate, [ 'stripe_form' => $formType->createView(), 'stripe_execute_route' => 'p...
[ "public", "function", "renderStripeForm", "(", "Twig_Environment", "$", "environment", ",", "$", "viewTemplate", "=", "null", ")", "{", "$", "formType", "=", "$", "this", "->", "formFactory", "->", "create", "(", "'stripe_view'", ")", ";", "$", "environment", ...
Render stripe form. @param Twig_Environment $environment Environment @param bool $viewTemplate View template
[ "Render", "stripe", "form", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/StripeBundle/Services/StripeTemplateRender.php#L92-L100
231,252
PaymentSuite/paymentsuite
src/PaymentSuite/StripeBundle/Services/StripeTemplateRender.php
StripeTemplateRender.renderStripeScripts
public function renderStripeScripts(Twig_Environment $environment) { $environment->display($this->scriptsTemplate, [ 'public_key' => $this->publicKey, 'currency' => $this->paymentBridgeInterface->getCurrency(), ]); }
php
public function renderStripeScripts(Twig_Environment $environment) { $environment->display($this->scriptsTemplate, [ 'public_key' => $this->publicKey, 'currency' => $this->paymentBridgeInterface->getCurrency(), ]); }
[ "public", "function", "renderStripeScripts", "(", "Twig_Environment", "$", "environment", ")", "{", "$", "environment", "->", "display", "(", "$", "this", "->", "scriptsTemplate", ",", "[", "'public_key'", "=>", "$", "this", "->", "publicKey", ",", "'currency'",...
Render stripe scripts. @param Twig_Environment $environment Environment
[ "Render", "stripe", "scripts", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/StripeBundle/Services/StripeTemplateRender.php#L107-L113
231,253
swoft-cloud/swoft-http-client
src/Client.php
Client.request
public function request(string $method, $uri, array $options = []): HttpResultInterface { $options = $this->prepareDefaults($options); $headers = $options['headers'] ?? []; $body = $options['body'] ?? null; $version = $options['version'] ?? '1.1'; // Merge the URI into the ba...
php
public function request(string $method, $uri, array $options = []): HttpResultInterface { $options = $this->prepareDefaults($options); $headers = $options['headers'] ?? []; $body = $options['body'] ?? null; $version = $options['version'] ?? '1.1'; // Merge the URI into the ba...
[ "public", "function", "request", "(", "string", "$", "method", ",", "$", "uri", ",", "array", "$", "options", "=", "[", "]", ")", ":", "HttpResultInterface", "{", "$", "options", "=", "$", "this", "->", "prepareDefaults", "(", "$", "options", ")", ";",...
Send a Http request @param string $method @param string|UriInterface $uri @param array $options @return HttpResultInterface @throws \InvalidArgumentException
[ "Send", "a", "Http", "request" ]
980ac3701cc100ec605ccb5f7e974861f900d0e9
https://github.com/swoft-cloud/swoft-http-client/blob/980ac3701cc100ec605ccb5f7e974861f900d0e9/src/Client.php#L84-L100
231,254
swoft-cloud/swoft-http-client
src/Client.php
Client.prepareDefaults
protected function prepareDefaults($options): array { $defaults = $this->configs; if (! empty($defaults['headers'])) { // Default headers are only added if they are not present. $defaults['_headers'] = $defaults['headers']; unset($defaults['headers']); } ...
php
protected function prepareDefaults($options): array { $defaults = $this->configs; if (! empty($defaults['headers'])) { // Default headers are only added if they are not present. $defaults['_headers'] = $defaults['headers']; unset($defaults['headers']); } ...
[ "protected", "function", "prepareDefaults", "(", "$", "options", ")", ":", "array", "{", "$", "defaults", "=", "$", "this", "->", "configs", ";", "if", "(", "!", "empty", "(", "$", "defaults", "[", "'headers'", "]", ")", ")", "{", "// Default headers are...
Merges default options into the array. @param array $options Options to modify by reference @return array @throws \InvalidArgumentException
[ "Merges", "default", "options", "into", "the", "array", "." ]
980ac3701cc100ec605ccb5f7e974861f900d0e9
https://github.com/swoft-cloud/swoft-http-client/blob/980ac3701cc100ec605ccb5f7e974861f900d0e9/src/Client.php#L298-L330
231,255
swoft-cloud/swoft-http-client
src/Client.php
Client.getDefaultUserAgent
public function getDefaultUserAgent(): string { if (! $this->defaultUserAgent) { $currentMethodName = __FUNCTION__; $isAdapterUserAgent = method_exists($this->getAdapter(), $currentMethodName); if ($isAdapterUserAgent) { $this->defaultUserAgent = $this->ge...
php
public function getDefaultUserAgent(): string { if (! $this->defaultUserAgent) { $currentMethodName = __FUNCTION__; $isAdapterUserAgent = method_exists($this->getAdapter(), $currentMethodName); if ($isAdapterUserAgent) { $this->defaultUserAgent = $this->ge...
[ "public", "function", "getDefaultUserAgent", "(", ")", ":", "string", "{", "if", "(", "!", "$", "this", "->", "defaultUserAgent", ")", "{", "$", "currentMethodName", "=", "__FUNCTION__", ";", "$", "isAdapterUserAgent", "=", "method_exists", "(", "$", "this", ...
Get the default User-Agent string @return string @throws \InvalidArgumentException
[ "Get", "the", "default", "User", "-", "Agent", "string" ]
980ac3701cc100ec605ccb5f7e974861f900d0e9
https://github.com/swoft-cloud/swoft-http-client/blob/980ac3701cc100ec605ccb5f7e974861f900d0e9/src/Client.php#L338-L356
231,256
swoft-cloud/swoft-http-client
src/Client.php
Client.setDefaultUserAgent
private function setDefaultUserAgent() { // Add the default user-agent header. if (! isset($this->configs['headers'])) { $this->configs['headers'] = ['User-Agent' => $this->getDefaultUserAgent()]; } else { // Add the User-Agent header if one was not already set. ...
php
private function setDefaultUserAgent() { // Add the default user-agent header. if (! isset($this->configs['headers'])) { $this->configs['headers'] = ['User-Agent' => $this->getDefaultUserAgent()]; } else { // Add the User-Agent header if one was not already set. ...
[ "private", "function", "setDefaultUserAgent", "(", ")", "{", "// Add the default user-agent header.", "if", "(", "!", "isset", "(", "$", "this", "->", "configs", "[", "'headers'", "]", ")", ")", "{", "$", "this", "->", "configs", "[", "'headers'", "]", "=", ...
Set default User-Agent to Client. @important Notice that this method should always use after setAdapter() method, or else getDefaultUserAgent() and getAdapter() methods will automated get an Adapter, probably is not the adapter you wanted. @return void @throws \InvalidArgumentException
[ "Set", "default", "User", "-", "Agent", "to", "Client", "." ]
980ac3701cc100ec605ccb5f7e974861f900d0e9
https://github.com/swoft-cloud/swoft-http-client/blob/980ac3701cc100ec605ccb5f7e974861f900d0e9/src/Client.php#L368-L382
231,257
PaymentSuite/paymentsuite
src/PaymentSuite/PaylandsBundle/DependencyInjection/PaylandsExtension.php
PaylandsExtension.registerEndpointServices
protected function registerEndpointServices(ContainerBuilder $containerBuilder, array $config) { $resolverDefinition = $containerBuilder->getDefinition('paymentsuite.paylands.currency_service_resolver'); foreach ($config as $option) { $resolverDefinition->addMethodCall('addService', [ ...
php
protected function registerEndpointServices(ContainerBuilder $containerBuilder, array $config) { $resolverDefinition = $containerBuilder->getDefinition('paymentsuite.paylands.currency_service_resolver'); foreach ($config as $option) { $resolverDefinition->addMethodCall('addService', [ ...
[ "protected", "function", "registerEndpointServices", "(", "ContainerBuilder", "$", "containerBuilder", ",", "array", "$", "config", ")", "{", "$", "resolverDefinition", "=", "$", "containerBuilder", "->", "getDefinition", "(", "'paymentsuite.paylands.currency_service_resolv...
Registers the list of available currency dependant Paylands' services to use. @param ContainerBuilder $containerBuilder @param array $config
[ "Registers", "the", "list", "of", "available", "currency", "dependant", "Paylands", "services", "to", "use", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/PaylandsBundle/DependencyInjection/PaylandsExtension.php#L70-L80
231,258
PaymentSuite/paymentsuite
src/PaymentSuite/PaylandsBundle/DependencyInjection/PaylandsExtension.php
PaylandsExtension.resolveApiClientInterfaces
protected function resolveApiClientInterfaces(ContainerBuilder $containerBuilder, array $config) { $requestFactoryDefinition = $containerBuilder->getDefinition('paymentsuite.paylands.api.request_factory'); $requestFactoryDefinition->addMethodCall('setRequestFactory', [ $config['request_...
php
protected function resolveApiClientInterfaces(ContainerBuilder $containerBuilder, array $config) { $requestFactoryDefinition = $containerBuilder->getDefinition('paymentsuite.paylands.api.request_factory'); $requestFactoryDefinition->addMethodCall('setRequestFactory', [ $config['request_...
[ "protected", "function", "resolveApiClientInterfaces", "(", "ContainerBuilder", "$", "containerBuilder", ",", "array", "$", "config", ")", "{", "$", "requestFactoryDefinition", "=", "$", "containerBuilder", "->", "getDefinition", "(", "'paymentsuite.paylands.api.request_fac...
Resolves configuration of needed psr-7 interfaces. When null is provided, auto-discovery is used. When a service key is provided, that service is injected into related services instead. @param ContainerBuilder $containerBuilder @param array $config
[ "Resolves", "configuration", "of", "needed", "psr", "-", "7", "interfaces", ".", "When", "null", "is", "provided", "auto", "-", "discovery", "is", "used", ".", "When", "a", "service", "key", "is", "provided", "that", "service", "is", "injected", "into", "r...
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/PaylandsBundle/DependencyInjection/PaylandsExtension.php#L89-L106
231,259
PaymentSuite/paymentsuite
src/PaymentSuite/PaylandsBundle/DependencyInjection/PaylandsExtension.php
PaylandsExtension.registerApiClient
protected function registerApiClient(ContainerBuilder $containerBuilder, $config) { $containerBuilder->setAlias('paymentsuite.paylands.api.client', $config['api_client']); if (Configuration::API_CLIENT_DEFAULT == $config['api_client']) { $this->resolveApiClientInterfaces($containerBuild...
php
protected function registerApiClient(ContainerBuilder $containerBuilder, $config) { $containerBuilder->setAlias('paymentsuite.paylands.api.client', $config['api_client']); if (Configuration::API_CLIENT_DEFAULT == $config['api_client']) { $this->resolveApiClientInterfaces($containerBuild...
[ "protected", "function", "registerApiClient", "(", "ContainerBuilder", "$", "containerBuilder", ",", "$", "config", ")", "{", "$", "containerBuilder", "->", "setAlias", "(", "'paymentsuite.paylands.api.client'", ",", "$", "config", "[", "'api_client'", "]", ")", ";"...
Registers final API client to use, default or custom. @param ContainerBuilder $containerBuilder @param array $config
[ "Registers", "final", "API", "client", "to", "use", "default", "or", "custom", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/PaylandsBundle/DependencyInjection/PaylandsExtension.php#L114-L123
231,260
PaymentSuite/paymentsuite
src/PaymentSuite/StripeBundle/Services/StripeManager.php
StripeManager.processPayment
public function processPayment(StripeMethod $paymentMethod, $amount) { /** * check and set payment data. */ $chargeParams = $this->prepareData( $paymentMethod, $amount ); /** * make payment. */ $transaction = $this ...
php
public function processPayment(StripeMethod $paymentMethod, $amount) { /** * check and set payment data. */ $chargeParams = $this->prepareData( $paymentMethod, $amount ); /** * make payment. */ $transaction = $this ...
[ "public", "function", "processPayment", "(", "StripeMethod", "$", "paymentMethod", ",", "$", "amount", ")", "{", "/**\n * check and set payment data.\n */", "$", "chargeParams", "=", "$", "this", "->", "prepareData", "(", "$", "paymentMethod", ",", "$"...
Tries to process a payment through Stripe. @param StripeMethod $paymentMethod Payment method @param float $amount Amount @throws PaymentAmountsNotMatchException @throws PaymentException @return StripeManager Self object
[ "Tries", "to", "process", "a", "payment", "through", "Stripe", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/StripeBundle/Services/StripeManager.php#L80-L147
231,261
PaymentSuite/paymentsuite
src/PaymentSuite/StripeBundle/Services/StripeManager.php
StripeManager.prepareData
private function prepareData(StripeMethod $paymentMethod, $amount) { /// first check that amounts are the same $cartAmount = intval($this->paymentBridge->getAmount()); /** * If both amounts are different, execute Exception. */ if (abs($amount - $cartAmount) > 0.000...
php
private function prepareData(StripeMethod $paymentMethod, $amount) { /// first check that amounts are the same $cartAmount = intval($this->paymentBridge->getAmount()); /** * If both amounts are different, execute Exception. */ if (abs($amount - $cartAmount) > 0.000...
[ "private", "function", "prepareData", "(", "StripeMethod", "$", "paymentMethod", ",", "$", "amount", ")", "{", "/// first check that amounts are the same", "$", "cartAmount", "=", "intval", "(", "$", "this", "->", "paymentBridge", "->", "getAmount", "(", ")", ")",...
Check and set param for payment. @param StripeMethod $paymentMethod Payment method @param float $amount Amount @return StripeTransaction Charge params @throws PaymentAmountsNotMatchException @throws PaymentOrderNotFoundException
[ "Check", "and", "set", "param", "for", "payment", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/StripeBundle/Services/StripeManager.php#L160-L206
231,262
PaymentSuite/paymentsuite
src/PaymentSuite/RedsysBundle/Services/RedsysFormTypeBuilder.php
RedsysFormTypeBuilder.shopSignature
private function shopSignature( $amount, $order, $merchantCode, $currency, $transactionType, $merchantURL, $secret ) { return strtoupper(sha1(implode('', [ $amount, $order, $merchantCode, $currency, ...
php
private function shopSignature( $amount, $order, $merchantCode, $currency, $transactionType, $merchantURL, $secret ) { return strtoupper(sha1(implode('', [ $amount, $order, $merchantCode, $currency, ...
[ "private", "function", "shopSignature", "(", "$", "amount", ",", "$", "order", ",", "$", "merchantCode", ",", "$", "currency", ",", "$", "transactionType", ",", "$", "merchantURL", ",", "$", "secret", ")", "{", "return", "strtoupper", "(", "sha1", "(", "...
Creates signature to be sent to Redsys. @param string $amount Amount @param string $order Order number @param string $merchantCode Merchant code @param string $currency Currency @param string $transactionType Transaction type @param string $merchantURL Merchant url @param string $secre...
[ "Creates", "signature", "to", "be", "sent", "to", "Redsys", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/RedsysBundle/Services/RedsysFormTypeBuilder.php#L247-L265
231,263
PaymentSuite/paymentsuite
src/PaymentSuite/RedsysBundle/Services/RedsysFormTypeBuilder.php
RedsysFormTypeBuilder.formatOrderNumber
private function formatOrderNumber($orderNumber) { $length = strlen($orderNumber); $minLength = 4; if ($length < $minLength) { $orderNumber = str_pad($orderNumber, $minLength, '0', STR_PAD_LEFT); } return $orderNumber; }
php
private function formatOrderNumber($orderNumber) { $length = strlen($orderNumber); $minLength = 4; if ($length < $minLength) { $orderNumber = str_pad($orderNumber, $minLength, '0', STR_PAD_LEFT); } return $orderNumber; }
[ "private", "function", "formatOrderNumber", "(", "$", "orderNumber", ")", "{", "$", "length", "=", "strlen", "(", "$", "orderNumber", ")", ";", "$", "minLength", "=", "4", ";", "if", "(", "$", "length", "<", "$", "minLength", ")", "{", "$", "orderNumbe...
Formats order number to be Redsys compliant. @param string $orderNumber Order number @return string $orderNumber @todo Check that start with 4 numbers and that at least is 12 chars long
[ "Formats", "order", "number", "to", "be", "Redsys", "compliant", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/RedsysBundle/Services/RedsysFormTypeBuilder.php#L323-L333
231,264
davin-bao/workflow
src/DavinBao/Workflow/MigrationCommand.php
MigrationCommand.createMigration
protected function createMigration() { // migrations目录应该是根目录 app->path => base_pash $migration_file = base_path()."/database/migrations/".date('Y_m_d_His')."_workflow_setup_tables.php"; $app = app(); $resource_type = ''; if(is_array($app['config']->get('resource_type'))){ $re...
php
protected function createMigration() { // migrations目录应该是根目录 app->path => base_pash $migration_file = base_path()."/database/migrations/".date('Y_m_d_His')."_workflow_setup_tables.php"; $app = app(); $resource_type = ''; if(is_array($app['config']->get('resource_type'))){ $re...
[ "protected", "function", "createMigration", "(", ")", "{", "// migrations目录应该是根目录 app->path => base_pash", "$", "migration_file", "=", "base_path", "(", ")", ".", "\"/database/migrations/\"", ".", "date", "(", "'Y_m_d_His'", ")", ".", "\"_workflow_setup_tables.php\"", ";"...
Create the migration @param string $name @return bool
[ "Create", "the", "migration" ]
8af8b33ef63e455a2a5a1cdf6ac7bc154d590488
https://github.com/davin-bao/workflow/blob/8af8b33ef63e455a2a5a1cdf6ac7bc154d590488/src/DavinBao/Workflow/MigrationCommand.php#L79-L109
231,265
php-task/TaskBundle
src/Builder/TaskBuilder.php
TaskBuilder.setSystemKey
public function setSystemKey($systemKey) { if (!$this->task instanceof Task) { throw new NotSupportedMethodException('systemKey', $this->task); } $this->task->setSystemKey($systemKey); return $this; }
php
public function setSystemKey($systemKey) { if (!$this->task instanceof Task) { throw new NotSupportedMethodException('systemKey', $this->task); } $this->task->setSystemKey($systemKey); return $this; }
[ "public", "function", "setSystemKey", "(", "$", "systemKey", ")", "{", "if", "(", "!", "$", "this", "->", "task", "instanceof", "Task", ")", "{", "throw", "new", "NotSupportedMethodException", "(", "'systemKey'", ",", "$", "this", "->", "task", ")", ";", ...
Set system-key. @param string $systemKey @return TaskBuilderInterface @throws NotSupportedMethodException
[ "Set", "system", "-", "key", "." ]
be8f0bbdfa3dc9dcaf0e01814166730a336eea07
https://github.com/php-task/TaskBundle/blob/be8f0bbdfa3dc9dcaf0e01814166730a336eea07/src/Builder/TaskBuilder.php#L32-L41
231,266
PaymentSuite/paymentsuite
src/PaymentSuite/PaymentCoreBundle/Services/PaymentLogger.php
PaymentLogger.log
public function log( $level, $message, $paymentMethod, array $context = [] ) { if (!$this->active) { return $this; } $this ->logger ->log( $level, "[$paymentMethod] - $message", ...
php
public function log( $level, $message, $paymentMethod, array $context = [] ) { if (!$this->active) { return $this; } $this ->logger ->log( $level, "[$paymentMethod] - $message", ...
[ "public", "function", "log", "(", "$", "level", ",", "$", "message", ",", "$", "paymentMethod", ",", "array", "$", "context", "=", "[", "]", ")", "{", "if", "(", "!", "$", "this", "->", "active", ")", "{", "return", "$", "this", ";", "}", "$", ...
Log payment message, prepending payment bundle name if set. @param string $level Level @param string $message Message to log @param string $paymentMethod Payment method @param array $context Context @return PaymentLogger Self object
[ "Log", "payment", "message", "prepending", "payment", "bundle", "name", "if", "set", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/PaymentCoreBundle/Services/PaymentLogger.php#L63-L82
231,267
mapbender/owsproxy3
src/OwsProxy3/CoreBundle/Component/ProxyQuery.php
ProxyQuery.createFromUrl
public static function createFromUrl($url, $user = null, $password = null, $headers = array(), $getParams = array(), $postParams = array(), $content = null) { $rowUrl = parse_url($url); if (empty($rowUrl["host"])) { throw new HTTPStatus502Exception("The ho...
php
public static function createFromUrl($url, $user = null, $password = null, $headers = array(), $getParams = array(), $postParams = array(), $content = null) { $rowUrl = parse_url($url); if (empty($rowUrl["host"])) { throw new HTTPStatus502Exception("The ho...
[ "public", "static", "function", "createFromUrl", "(", "$", "url", ",", "$", "user", "=", "null", ",", "$", "password", "=", "null", ",", "$", "headers", "=", "array", "(", ")", ",", "$", "getParams", "=", "array", "(", ")", ",", "$", "postParams", ...
Creates an instance from parameters @param string $url the url @param string $user the user name for basic authentication @param string $password the user password for basic authentication @param array $headers the HTTP headers @param array $getParams the GET parameters @param array $postParams the POST parameters @pa...
[ "Creates", "an", "instance", "from", "parameters" ]
7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3
https://github.com/mapbender/owsproxy3/blob/7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3/src/OwsProxy3/CoreBundle/Component/ProxyQuery.php#L67-L98
231,268
mapbender/owsproxy3
src/OwsProxy3/CoreBundle/Component/ProxyQuery.php
ProxyQuery.createFromRequest
public static function createFromRequest(Request $request) { $rowUrl = urldecode(Utils::getParamValue($request, Utils::$PARAMETER_URL, Utils::$METHOD_GET, false)); $rowUrl = parse_url($rowUrl); if (empty($rowUrl["host"])) { throw new HTTPStatus502E...
php
public static function createFromRequest(Request $request) { $rowUrl = urldecode(Utils::getParamValue($request, Utils::$PARAMETER_URL, Utils::$METHOD_GET, false)); $rowUrl = parse_url($rowUrl); if (empty($rowUrl["host"])) { throw new HTTPStatus502E...
[ "public", "static", "function", "createFromRequest", "(", "Request", "$", "request", ")", "{", "$", "rowUrl", "=", "urldecode", "(", "Utils", "::", "getParamValue", "(", "$", "request", ",", "Utils", "::", "$", "PARAMETER_URL", ",", "Utils", "::", "$", "ME...
Creates an instance @param Request $request @return ProxyQuery a new instance @throws HTTPStatus502Exception if the host is not defined
[ "Creates", "an", "instance" ]
7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3
https://github.com/mapbender/owsproxy3/blob/7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3/src/OwsProxy3/CoreBundle/Component/ProxyQuery.php#L107-L158
231,269
mapbender/owsproxy3
src/OwsProxy3/CoreBundle/Component/ProxyQuery.php
ProxyQuery.addPostParameter
public function addPostParameter($name, $value) { if (!$this->hasGetPostParamValue($name, true)) { $this->postParams[$name] = $value; return true; } else { return false; } }
php
public function addPostParameter($name, $value) { if (!$this->hasGetPostParamValue($name, true)) { $this->postParams[$name] = $value; return true; } else { return false; } }
[ "public", "function", "addPostParameter", "(", "$", "name", ",", "$", "value", ")", "{", "if", "(", "!", "$", "this", "->", "hasGetPostParamValue", "(", "$", "name", ",", "true", ")", ")", "{", "$", "this", "->", "postParams", "[", "$", "name", "]", ...
Adds a POST parameter if not already present @param string $name @param string $value @return boolean true if added false if not
[ "Adds", "a", "POST", "parameter", "if", "not", "already", "present" ]
7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3
https://github.com/mapbender/owsproxy3/blob/7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3/src/OwsProxy3/CoreBundle/Component/ProxyQuery.php#L202-L213
231,270
mapbender/owsproxy3
src/OwsProxy3/CoreBundle/Component/ProxyQuery.php
ProxyQuery.addGetParameter
public function addGetParameter($name, $value) { if (!$this->hasGetPostParamValue($name, true)) { $this->getParams[$name] = $value; return true; } else { return false; } }
php
public function addGetParameter($name, $value) { if (!$this->hasGetPostParamValue($name, true)) { $this->getParams[$name] = $value; return true; } else { return false; } }
[ "public", "function", "addGetParameter", "(", "$", "name", ",", "$", "value", ")", "{", "if", "(", "!", "$", "this", "->", "hasGetPostParamValue", "(", "$", "name", ",", "true", ")", ")", "{", "$", "this", "->", "getParams", "[", "$", "name", "]", ...
Adds a GET parameter if not already present @param string $name @param string $value @return boolean true if added false if not
[ "Adds", "a", "GET", "parameter", "if", "not", "already", "present" ]
7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3
https://github.com/mapbender/owsproxy3/blob/7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3/src/OwsProxy3/CoreBundle/Component/ProxyQuery.php#L222-L233
231,271
mapbender/owsproxy3
src/OwsProxy3/CoreBundle/Component/ProxyQuery.php
ProxyQuery.getGetUrl
public function getGetUrl() { $scheme = empty($this->rowUrl["scheme"]) ? "http://" : $this->rowUrl["scheme"] . "://"; $user = empty($this->rowUrl["user"]) ? "" : $this->rowUrl["user"]; $pass = empty($this->rowUrl["pass"]) ? "" : $this->rowUrl["pass"]; // if pass is there, put a ...
php
public function getGetUrl() { $scheme = empty($this->rowUrl["scheme"]) ? "http://" : $this->rowUrl["scheme"] . "://"; $user = empty($this->rowUrl["user"]) ? "" : $this->rowUrl["user"]; $pass = empty($this->rowUrl["pass"]) ? "" : $this->rowUrl["pass"]; // if pass is there, put a ...
[ "public", "function", "getGetUrl", "(", ")", "{", "$", "scheme", "=", "empty", "(", "$", "this", "->", "rowUrl", "[", "\"scheme\"", "]", ")", "?", "\"http://\"", ":", "$", "this", "->", "rowUrl", "[", "\"scheme\"", "]", ".", "\"://\"", ";", "$", "use...
Generats the url for HTTP GET @return string the HTTP GET url
[ "Generats", "the", "url", "for", "HTTP", "GET" ]
7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3
https://github.com/mapbender/owsproxy3/blob/7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3/src/OwsProxy3/CoreBundle/Component/ProxyQuery.php#L346-L373
231,272
mapbender/owsproxy3
src/OwsProxy3/CoreBundle/Component/ProxyQuery.php
ProxyQuery.getGetParamValue
public function getGetParamValue($name, $ignoreCase = false) { if ($ignoreCase) { $name = strtolower($name); foreach ($this->getParams as $key => $value) { if (strtolower($key) === $name) { return $value; ...
php
public function getGetParamValue($name, $ignoreCase = false) { if ($ignoreCase) { $name = strtolower($name); foreach ($this->getParams as $key => $value) { if (strtolower($key) === $name) { return $value; ...
[ "public", "function", "getGetParamValue", "(", "$", "name", ",", "$", "ignoreCase", "=", "false", ")", "{", "if", "(", "$", "ignoreCase", ")", "{", "$", "name", "=", "strtolower", "(", "$", "name", ")", ";", "foreach", "(", "$", "this", "->", "getPar...
Returns the parameter value from GET parameters @param string $name the parameter name @param boolean $ignoreCase to ignore the parameter name case sensitivity @return string|null the parameter value or null
[ "Returns", "the", "parameter", "value", "from", "GET", "parameters" ]
7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3
https://github.com/mapbender/owsproxy3/blob/7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3/src/OwsProxy3/CoreBundle/Component/ProxyQuery.php#L402-L426
231,273
mapbender/owsproxy3
src/OwsProxy3/CoreBundle/Component/ProxyQuery.php
ProxyQuery.getPostParamValue
public function getPostParamValue($name, $ignoreCase = false) { if ($ignoreCase) { $name = strtolower($name); foreach ($this->postParams as $key => $value) { if (strtolower($key) === $name) { return $value; ...
php
public function getPostParamValue($name, $ignoreCase = false) { if ($ignoreCase) { $name = strtolower($name); foreach ($this->postParams as $key => $value) { if (strtolower($key) === $name) { return $value; ...
[ "public", "function", "getPostParamValue", "(", "$", "name", ",", "$", "ignoreCase", "=", "false", ")", "{", "if", "(", "$", "ignoreCase", ")", "{", "$", "name", "=", "strtolower", "(", "$", "name", ")", ";", "foreach", "(", "$", "this", "->", "postP...
Returns the parameter value from POST parameters @param string $name the parameter name @param boolean $ignoreCase to ignore the parameter name case sensitivity @return string|null the parameter value or null
[ "Returns", "the", "parameter", "value", "from", "POST", "parameters" ]
7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3
https://github.com/mapbender/owsproxy3/blob/7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3/src/OwsProxy3/CoreBundle/Component/ProxyQuery.php#L435-L459
231,274
mapbender/owsproxy3
src/OwsProxy3/CoreBundle/Component/ProxyQuery.php
ProxyQuery.removeGetParameter
public function removeGetParameter($name) { if (isset($this->getParams[$name])) { unset($this->getParams[$name]); return true; } else return false; }
php
public function removeGetParameter($name) { if (isset($this->getParams[$name])) { unset($this->getParams[$name]); return true; } else return false; }
[ "public", "function", "removeGetParameter", "(", "$", "name", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "getParams", "[", "$", "name", "]", ")", ")", "{", "unset", "(", "$", "this", "->", "getParams", "[", "$", "name", "]", ")", ";", ...
Removes a GET parameter. @param string $name parameter name @return boolean true if parameter removed
[ "Removes", "a", "GET", "parameter", "." ]
7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3
https://github.com/mapbender/owsproxy3/blob/7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3/src/OwsProxy3/CoreBundle/Component/ProxyQuery.php#L466-L474
231,275
mapbender/owsproxy3
src/OwsProxy3/CoreBundle/Component/ProxyQuery.php
ProxyQuery.removePostParameter
public function removePostParameter($name) { if (isset($this->postParams[$name])) { unset($this->postParams[$name]); return true; } else return false; }
php
public function removePostParameter($name) { if (isset($this->postParams[$name])) { unset($this->postParams[$name]); return true; } else return false; }
[ "public", "function", "removePostParameter", "(", "$", "name", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "postParams", "[", "$", "name", "]", ")", ")", "{", "unset", "(", "$", "this", "->", "postParams", "[", "$", "name", "]", ")", ";",...
Removes a POST parameter. @param string $name parameter name @return boolean true if parameter removed
[ "Removes", "a", "POST", "parameter", "." ]
7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3
https://github.com/mapbender/owsproxy3/blob/7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3/src/OwsProxy3/CoreBundle/Component/ProxyQuery.php#L481-L489
231,276
mapbender/owsproxy3
src/OwsProxy3/CoreBundle/Component/ProxyQuery.php
ProxyQuery.hasGetParamValue
public function hasGetParamValue($name, $ignoreCase = false) { if ($ignoreCase) { $name = strtolower($name); foreach ($this->getParams as $key => $value) { if (strtolower($key) === $name) { return true; ...
php
public function hasGetParamValue($name, $ignoreCase = false) { if ($ignoreCase) { $name = strtolower($name); foreach ($this->getParams as $key => $value) { if (strtolower($key) === $name) { return true; ...
[ "public", "function", "hasGetParamValue", "(", "$", "name", ",", "$", "ignoreCase", "=", "false", ")", "{", "if", "(", "$", "ignoreCase", ")", "{", "$", "name", "=", "strtolower", "(", "$", "name", ")", ";", "foreach", "(", "$", "this", "->", "getPar...
Checks if a GET parameter exists @param string $name the parameter name @param boolean $ignoreCase to ignore the parameter name case sensitivity @return boolean true if a parameter exists
[ "Checks", "if", "a", "GET", "parameter", "exists" ]
7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3
https://github.com/mapbender/owsproxy3/blob/7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3/src/OwsProxy3/CoreBundle/Component/ProxyQuery.php#L518-L542
231,277
mapbender/owsproxy3
src/OwsProxy3/CoreBundle/Component/ProxyQuery.php
ProxyQuery.hasPostParamValue
public function hasPostParamValue($name, $ignoreCase = false) { if ($ignoreCase) { $name = strtolower($name); foreach ($this->postParams as $key => $value) { if (strtolower($key) === $name) { return true; ...
php
public function hasPostParamValue($name, $ignoreCase = false) { if ($ignoreCase) { $name = strtolower($name); foreach ($this->postParams as $key => $value) { if (strtolower($key) === $name) { return true; ...
[ "public", "function", "hasPostParamValue", "(", "$", "name", ",", "$", "ignoreCase", "=", "false", ")", "{", "if", "(", "$", "ignoreCase", ")", "{", "$", "name", "=", "strtolower", "(", "$", "name", ")", ";", "foreach", "(", "$", "this", "->", "postP...
Checks if a POST parameter exists @param string $name the parameter name @param boolean $ignoreCase to ignore the parameter name case sensitivity @return boolean true if a parameter exists
[ "Checks", "if", "a", "POST", "parameter", "exists" ]
7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3
https://github.com/mapbender/owsproxy3/blob/7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3/src/OwsProxy3/CoreBundle/Component/ProxyQuery.php#L551-L575
231,278
markenwerk/php-string-builder
src/StringBuilder.php
StringBuilder.append
public function append($string) { ArgumentValidator::validateScalar($string); $this->string .= (string)$string; return $this; }
php
public function append($string) { ArgumentValidator::validateScalar($string); $this->string .= (string)$string; return $this; }
[ "public", "function", "append", "(", "$", "string", ")", "{", "ArgumentValidator", "::", "validateScalar", "(", "$", "string", ")", ";", "$", "this", "->", "string", ".=", "(", "string", ")", "$", "string", ";", "return", "$", "this", ";", "}" ]
Appends the given string @param string $string @return $this @throws \InvalidArgumentException
[ "Appends", "the", "given", "string" ]
ce02ea5c81d24102075bd7d3b0fcb20209dab865
https://github.com/markenwerk/php-string-builder/blob/ce02ea5c81d24102075bd7d3b0fcb20209dab865/src/StringBuilder.php#L43-L48
231,279
markenwerk/php-string-builder
src/StringBuilder.php
StringBuilder.prepend
public function prepend($string) { ArgumentValidator::validateScalar($string); $this->string = (string)$string . $this->string; return $this; }
php
public function prepend($string) { ArgumentValidator::validateScalar($string); $this->string = (string)$string . $this->string; return $this; }
[ "public", "function", "prepend", "(", "$", "string", ")", "{", "ArgumentValidator", "::", "validateScalar", "(", "$", "string", ")", ";", "$", "this", "->", "string", "=", "(", "string", ")", "$", "string", ".", "$", "this", "->", "string", ";", "retur...
Prepends the given string @param string $string @return $this @throws \InvalidArgumentException
[ "Prepends", "the", "given", "string" ]
ce02ea5c81d24102075bd7d3b0fcb20209dab865
https://github.com/markenwerk/php-string-builder/blob/ce02ea5c81d24102075bd7d3b0fcb20209dab865/src/StringBuilder.php#L57-L62
231,280
markenwerk/php-string-builder
src/StringBuilder.php
StringBuilder.insert
public function insert($position, $string) { ArgumentValidator::validateUnsignedInteger($position); ArgumentValidator::validateScalar($string); if ($position >= $this->length()) { throw new \InvalidArgumentException('Position invalid'); } $this->string = mb_substr($this->string, 0, $position) . (string)$s...
php
public function insert($position, $string) { ArgumentValidator::validateUnsignedInteger($position); ArgumentValidator::validateScalar($string); if ($position >= $this->length()) { throw new \InvalidArgumentException('Position invalid'); } $this->string = mb_substr($this->string, 0, $position) . (string)$s...
[ "public", "function", "insert", "(", "$", "position", ",", "$", "string", ")", "{", "ArgumentValidator", "::", "validateUnsignedInteger", "(", "$", "position", ")", ";", "ArgumentValidator", "::", "validateScalar", "(", "$", "string", ")", ";", "if", "(", "$...
Inserts the given string at the given position @param int $position @param string $string @return $this @throws \InvalidArgumentException
[ "Inserts", "the", "given", "string", "at", "the", "given", "position" ]
ce02ea5c81d24102075bd7d3b0fcb20209dab865
https://github.com/markenwerk/php-string-builder/blob/ce02ea5c81d24102075bd7d3b0fcb20209dab865/src/StringBuilder.php#L72-L81
231,281
markenwerk/php-string-builder
src/StringBuilder.php
StringBuilder.replace
public function replace($position, $length, $string) { ArgumentValidator::validateUnsignedInteger($position); ArgumentValidator::validateUnsignedInteger($length); ArgumentValidator::validateScalar($string); if ($position >= $this->length()) { throw new \InvalidArgumentException('Position invalid'); } if...
php
public function replace($position, $length, $string) { ArgumentValidator::validateUnsignedInteger($position); ArgumentValidator::validateUnsignedInteger($length); ArgumentValidator::validateScalar($string); if ($position >= $this->length()) { throw new \InvalidArgumentException('Position invalid'); } if...
[ "public", "function", "replace", "(", "$", "position", ",", "$", "length", ",", "$", "string", ")", "{", "ArgumentValidator", "::", "validateUnsignedInteger", "(", "$", "position", ")", ";", "ArgumentValidator", "::", "validateUnsignedInteger", "(", "$", "length...
Replaces the characters defined by the given position and length with the given string @param int $position @param int $length @param string $string @return $this @throws \InvalidArgumentException
[ "Replaces", "the", "characters", "defined", "by", "the", "given", "position", "and", "length", "with", "the", "given", "string" ]
ce02ea5c81d24102075bd7d3b0fcb20209dab865
https://github.com/markenwerk/php-string-builder/blob/ce02ea5c81d24102075bd7d3b0fcb20209dab865/src/StringBuilder.php#L92-L105
231,282
markenwerk/php-string-builder
src/StringBuilder.php
StringBuilder.setCharAt
public function setCharAt($position, $character) { ArgumentValidator::validateUnsignedInteger($position); ArgumentValidator::validateScalar($character); if ($position >= $this->length()) { throw new \InvalidArgumentException('Position invalid'); } if (mb_strlen((string)$character) !== 1) { throw new \I...
php
public function setCharAt($position, $character) { ArgumentValidator::validateUnsignedInteger($position); ArgumentValidator::validateScalar($character); if ($position >= $this->length()) { throw new \InvalidArgumentException('Position invalid'); } if (mb_strlen((string)$character) !== 1) { throw new \I...
[ "public", "function", "setCharAt", "(", "$", "position", ",", "$", "character", ")", "{", "ArgumentValidator", "::", "validateUnsignedInteger", "(", "$", "position", ")", ";", "ArgumentValidator", "::", "validateScalar", "(", "$", "character", ")", ";", "if", ...
Sets the character at the given position @param int $position @param string $character @return $this @throws \InvalidArgumentException
[ "Sets", "the", "character", "at", "the", "given", "position" ]
ce02ea5c81d24102075bd7d3b0fcb20209dab865
https://github.com/markenwerk/php-string-builder/blob/ce02ea5c81d24102075bd7d3b0fcb20209dab865/src/StringBuilder.php#L115-L127
231,283
markenwerk/php-string-builder
src/StringBuilder.php
StringBuilder.reverse
public function reverse() { $length = $this->length(); $reversed = ''; while ($length-- > 0) { $reversed .= mb_substr($this->string, $length, 1, mb_detect_encoding($this->string)); } $this->string = $reversed; return $this; }
php
public function reverse() { $length = $this->length(); $reversed = ''; while ($length-- > 0) { $reversed .= mb_substr($this->string, $length, 1, mb_detect_encoding($this->string)); } $this->string = $reversed; return $this; }
[ "public", "function", "reverse", "(", ")", "{", "$", "length", "=", "$", "this", "->", "length", "(", ")", ";", "$", "reversed", "=", "''", ";", "while", "(", "$", "length", "--", ">", "0", ")", "{", "$", "reversed", ".=", "mb_substr", "(", "$", ...
Reverts the string to build @return $this
[ "Reverts", "the", "string", "to", "build" ]
ce02ea5c81d24102075bd7d3b0fcb20209dab865
https://github.com/markenwerk/php-string-builder/blob/ce02ea5c81d24102075bd7d3b0fcb20209dab865/src/StringBuilder.php#L134-L143
231,284
markenwerk/php-string-builder
src/StringBuilder.php
StringBuilder.delete
public function delete($position, $length = null) { ArgumentValidator::validateUnsignedInteger($position); ArgumentValidator::validateUnsignedIntegerOrNull($length); if ($position >= $this->length()) { throw new \InvalidArgumentException('Position invalid'); } if ($length === null) { $this->string = mb...
php
public function delete($position, $length = null) { ArgumentValidator::validateUnsignedInteger($position); ArgumentValidator::validateUnsignedIntegerOrNull($length); if ($position >= $this->length()) { throw new \InvalidArgumentException('Position invalid'); } if ($length === null) { $this->string = mb...
[ "public", "function", "delete", "(", "$", "position", ",", "$", "length", "=", "null", ")", "{", "ArgumentValidator", "::", "validateUnsignedInteger", "(", "$", "position", ")", ";", "ArgumentValidator", "::", "validateUnsignedIntegerOrNull", "(", "$", "length", ...
Removes the portion defined by the given position and length @param int $position @param int $length @return $this @throws \InvalidArgumentException
[ "Removes", "the", "portion", "defined", "by", "the", "given", "position", "and", "length" ]
ce02ea5c81d24102075bd7d3b0fcb20209dab865
https://github.com/markenwerk/php-string-builder/blob/ce02ea5c81d24102075bd7d3b0fcb20209dab865/src/StringBuilder.php#L153-L166
231,285
markenwerk/php-string-builder
src/StringBuilder.php
StringBuilder.deleteCharAt
public function deleteCharAt($position) { ArgumentValidator::validateUnsignedInteger($position); if ($position >= $this->length()) { throw new \InvalidArgumentException('Position invalid'); } $this->string = mb_substr($this->string, 0, $position) . mb_substr($this->string, $position + 1); return $this; }
php
public function deleteCharAt($position) { ArgumentValidator::validateUnsignedInteger($position); if ($position >= $this->length()) { throw new \InvalidArgumentException('Position invalid'); } $this->string = mb_substr($this->string, 0, $position) . mb_substr($this->string, $position + 1); return $this; }
[ "public", "function", "deleteCharAt", "(", "$", "position", ")", "{", "ArgumentValidator", "::", "validateUnsignedInteger", "(", "$", "position", ")", ";", "if", "(", "$", "position", ">=", "$", "this", "->", "length", "(", ")", ")", "{", "throw", "new", ...
Removes the character at the given position @param int $position @return $this @throws \InvalidArgumentException
[ "Removes", "the", "character", "at", "the", "given", "position" ]
ce02ea5c81d24102075bd7d3b0fcb20209dab865
https://github.com/markenwerk/php-string-builder/blob/ce02ea5c81d24102075bd7d3b0fcb20209dab865/src/StringBuilder.php#L175-L183
231,286
markenwerk/php-string-builder
src/StringBuilder.php
StringBuilder.contains
public function contains($substring) { ArgumentValidator::validateScalar($substring); return strpos($this->string, (string)$substring) !== false; }
php
public function contains($substring) { ArgumentValidator::validateScalar($substring); return strpos($this->string, (string)$substring) !== false; }
[ "public", "function", "contains", "(", "$", "substring", ")", "{", "ArgumentValidator", "::", "validateScalar", "(", "$", "substring", ")", ";", "return", "strpos", "(", "$", "this", "->", "string", ",", "(", "string", ")", "$", "substring", ")", "!==", ...
Whether the string to build contains the given substring @param string $substring @return bool @throws \InvalidArgumentException
[ "Whether", "the", "string", "to", "build", "contains", "the", "given", "substring" ]
ce02ea5c81d24102075bd7d3b0fcb20209dab865
https://github.com/markenwerk/php-string-builder/blob/ce02ea5c81d24102075bd7d3b0fcb20209dab865/src/StringBuilder.php#L192-L196
231,287
markenwerk/php-string-builder
src/StringBuilder.php
StringBuilder.indexOf
public function indexOf($string, $offset = 0) { ArgumentValidator::validateScalar($string); ArgumentValidator::validateEmpty($string); ArgumentValidator::validateUnsignedInteger($offset); $index = mb_strpos($this->string, (string)$string, $offset); return $index === false ? null : $index; }
php
public function indexOf($string, $offset = 0) { ArgumentValidator::validateScalar($string); ArgumentValidator::validateEmpty($string); ArgumentValidator::validateUnsignedInteger($offset); $index = mb_strpos($this->string, (string)$string, $offset); return $index === false ? null : $index; }
[ "public", "function", "indexOf", "(", "$", "string", ",", "$", "offset", "=", "0", ")", "{", "ArgumentValidator", "::", "validateScalar", "(", "$", "string", ")", ";", "ArgumentValidator", "::", "validateEmpty", "(", "$", "string", ")", ";", "ArgumentValidat...
Returns the index of the first occurence of the given substring or null Takes an optional parameter to begin searching after the given offset @param string $string @param int $offset @return int @throws \InvalidArgumentException
[ "Returns", "the", "index", "of", "the", "first", "occurence", "of", "the", "given", "substring", "or", "null" ]
ce02ea5c81d24102075bd7d3b0fcb20209dab865
https://github.com/markenwerk/php-string-builder/blob/ce02ea5c81d24102075bd7d3b0fcb20209dab865/src/StringBuilder.php#L208-L215
231,288
markenwerk/php-string-builder
src/StringBuilder.php
StringBuilder.lastIndexOf
public function lastIndexOf($string, $offset = 0) { ArgumentValidator::validateScalar($string); ArgumentValidator::validateEmpty($string); ArgumentValidator::validateUnsignedInteger($offset); $index = mb_strrpos($this->string, (string)$string, -1 * $offset); return $index === false ? null : $index; }
php
public function lastIndexOf($string, $offset = 0) { ArgumentValidator::validateScalar($string); ArgumentValidator::validateEmpty($string); ArgumentValidator::validateUnsignedInteger($offset); $index = mb_strrpos($this->string, (string)$string, -1 * $offset); return $index === false ? null : $index; }
[ "public", "function", "lastIndexOf", "(", "$", "string", ",", "$", "offset", "=", "0", ")", "{", "ArgumentValidator", "::", "validateScalar", "(", "$", "string", ")", ";", "ArgumentValidator", "::", "validateEmpty", "(", "$", "string", ")", ";", "ArgumentVal...
Returns the index of the last occurence of the given substring or null Takes an optional parameter to end searching before the given offset @param string $string @param int $offset @return int @throws \InvalidArgumentException
[ "Returns", "the", "index", "of", "the", "last", "occurence", "of", "the", "given", "substring", "or", "null" ]
ce02ea5c81d24102075bd7d3b0fcb20209dab865
https://github.com/markenwerk/php-string-builder/blob/ce02ea5c81d24102075bd7d3b0fcb20209dab865/src/StringBuilder.php#L227-L234
231,289
markenwerk/php-string-builder
src/StringBuilder.php
StringBuilder.charAt
public function charAt($position) { ArgumentValidator::validateUnsignedInteger($position); if ($position >= $this->length()) { throw new \InvalidArgumentException('Position invalid'); } return mb_substr($this->string, $position, 1); }
php
public function charAt($position) { ArgumentValidator::validateUnsignedInteger($position); if ($position >= $this->length()) { throw new \InvalidArgumentException('Position invalid'); } return mb_substr($this->string, $position, 1); }
[ "public", "function", "charAt", "(", "$", "position", ")", "{", "ArgumentValidator", "::", "validateUnsignedInteger", "(", "$", "position", ")", ";", "if", "(", "$", "position", ">=", "$", "this", "->", "length", "(", ")", ")", "{", "throw", "new", "\\",...
Returns the character at the given position @param int $position @return string @throws \InvalidArgumentException
[ "Returns", "the", "character", "at", "the", "given", "position" ]
ce02ea5c81d24102075bd7d3b0fcb20209dab865
https://github.com/markenwerk/php-string-builder/blob/ce02ea5c81d24102075bd7d3b0fcb20209dab865/src/StringBuilder.php#L263-L270
231,290
markenwerk/php-string-builder
src/StringBuilder.php
StringBuilder.buildSubstring
public function buildSubstring($startPosition, $length = null) { ArgumentValidator::validateUnsignedInteger($startPosition); ArgumentValidator::validateUnsignedIntegerOrNull($length); if ($startPosition >= $this->length()) { throw new \InvalidArgumentException('Start position ' . (string)$startPosition . ' in...
php
public function buildSubstring($startPosition, $length = null) { ArgumentValidator::validateUnsignedInteger($startPosition); ArgumentValidator::validateUnsignedIntegerOrNull($length); if ($startPosition >= $this->length()) { throw new \InvalidArgumentException('Start position ' . (string)$startPosition . ' in...
[ "public", "function", "buildSubstring", "(", "$", "startPosition", ",", "$", "length", "=", "null", ")", "{", "ArgumentValidator", "::", "validateUnsignedInteger", "(", "$", "startPosition", ")", ";", "ArgumentValidator", "::", "validateUnsignedIntegerOrNull", "(", ...
Returns an substring defined by startPosition and length @param int $startPosition @param int $length @return string @throws \InvalidArgumentException
[ "Returns", "an", "substring", "defined", "by", "startPosition", "and", "length" ]
ce02ea5c81d24102075bd7d3b0fcb20209dab865
https://github.com/markenwerk/php-string-builder/blob/ce02ea5c81d24102075bd7d3b0fcb20209dab865/src/StringBuilder.php#L300-L311
231,291
mapbender/owsproxy3
src/OwsProxy3/CoreBundle/Component/CommonProxy.php
CommonProxy.createBrowser
protected function createBrowser() { $this->logger->debug("CommonProxy->createBrowser rowUrl:" . print_r($this->proxy_query->getRowUrl(), true)); $rowUrl = $this->proxy_query->getRowUrl(); $proxy_config = $this->proxy_config; $curl = new Curl(); $curl->setOption(CURLOPT_TIME...
php
protected function createBrowser() { $this->logger->debug("CommonProxy->createBrowser rowUrl:" . print_r($this->proxy_query->getRowUrl(), true)); $rowUrl = $this->proxy_query->getRowUrl(); $proxy_config = $this->proxy_config; $curl = new Curl(); $curl->setOption(CURLOPT_TIME...
[ "protected", "function", "createBrowser", "(", ")", "{", "$", "this", "->", "logger", "->", "debug", "(", "\"CommonProxy->createBrowser rowUrl:\"", ".", "print_r", "(", "$", "this", "->", "proxy_query", "->", "getRowUrl", "(", ")", ",", "true", ")", ")", ";"...
Creates the browser @return \Buzz\Browser
[ "Creates", "the", "browser" ]
7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3
https://github.com/mapbender/owsproxy3/blob/7aa0d22d489489bde3df6722ac3f9cfb2a5b7ce3/src/OwsProxy3/CoreBundle/Component/CommonProxy.php#L93-L127
231,292
oanhnn/laravel-presets
src/PresetCommand.php
PresetCommand.bootstrap
protected function bootstrap() { (new Presets\Bootstrap($this->filesystem))->install(); $this->info('Bootstrap scaffolding installed successfully.'); $this->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.'); }
php
protected function bootstrap() { (new Presets\Bootstrap($this->filesystem))->install(); $this->info('Bootstrap scaffolding installed successfully.'); $this->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.'); }
[ "protected", "function", "bootstrap", "(", ")", "{", "(", "new", "Presets", "\\", "Bootstrap", "(", "$", "this", "->", "filesystem", ")", ")", "->", "install", "(", ")", ";", "$", "this", "->", "info", "(", "'Bootstrap scaffolding installed successfully.'", ...
Install the "fresh" preset. @return void
[ "Install", "the", "fresh", "preset", "." ]
b30d731bb23b764e0767715ae243876faf13408e
https://github.com/oanhnn/laravel-presets/blob/b30d731bb23b764e0767715ae243876faf13408e/src/PresetCommand.php#L68-L73
231,293
oanhnn/laravel-presets
src/PresetCommand.php
PresetCommand.vue
public function vue() { (new Presets\Vue($this->filesystem))->install(); $this->info('Vue scaffolding installed successfully.'); $this->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.'); }
php
public function vue() { (new Presets\Vue($this->filesystem))->install(); $this->info('Vue scaffolding installed successfully.'); $this->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.'); }
[ "public", "function", "vue", "(", ")", "{", "(", "new", "Presets", "\\", "Vue", "(", "$", "this", "->", "filesystem", ")", ")", "->", "install", "(", ")", ";", "$", "this", "->", "info", "(", "'Vue scaffolding installed successfully.'", ")", ";", "$", ...
Install the "vue" preset. @return void
[ "Install", "the", "vue", "preset", "." ]
b30d731bb23b764e0767715ae243876faf13408e
https://github.com/oanhnn/laravel-presets/blob/b30d731bb23b764e0767715ae243876faf13408e/src/PresetCommand.php#L79-L84
231,294
oanhnn/laravel-presets
src/PresetCommand.php
PresetCommand.react
public function react() { (new Presets\React($this->filesystem))->install(); $this->info('React scaffolding installed successfully.'); $this->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.'); }
php
public function react() { (new Presets\React($this->filesystem))->install(); $this->info('React scaffolding installed successfully.'); $this->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.'); }
[ "public", "function", "react", "(", ")", "{", "(", "new", "Presets", "\\", "React", "(", "$", "this", "->", "filesystem", ")", ")", "->", "install", "(", ")", ";", "$", "this", "->", "info", "(", "'React scaffolding installed successfully.'", ")", ";", "...
Install the "react" preset. @return void
[ "Install", "the", "react", "preset", "." ]
b30d731bb23b764e0767715ae243876faf13408e
https://github.com/oanhnn/laravel-presets/blob/b30d731bb23b764e0767715ae243876faf13408e/src/PresetCommand.php#L90-L95
231,295
PaymentSuite/paymentsuite
src/PaymentSuite/StripeBundle/Services/StripeTransactionFactory.php
StripeTransactionFactory.create
public function create(StripeTransaction $transaction) { try { Stripe::setApiKey($this->privateKey); $this->dispatcher->notifyCustomerPreCreate($transaction); $customer = Customer::create($transaction->getCustomerData()); $transaction->setCustomerId($custom...
php
public function create(StripeTransaction $transaction) { try { Stripe::setApiKey($this->privateKey); $this->dispatcher->notifyCustomerPreCreate($transaction); $customer = Customer::create($transaction->getCustomerData()); $transaction->setCustomerId($custom...
[ "public", "function", "create", "(", "StripeTransaction", "$", "transaction", ")", "{", "try", "{", "Stripe", "::", "setApiKey", "(", "$", "this", "->", "privateKey", ")", ";", "$", "this", "->", "dispatcher", "->", "notifyCustomerPreCreate", "(", "$", "tran...
Create new Transaction with a set of params. @param array $transaction Set of params [source, amount, currency] @return \ArrayAccess|array Result of transaction
[ "Create", "new", "Transaction", "with", "a", "set", "of", "params", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/StripeBundle/Services/StripeTransactionFactory.php#L58-L78
231,296
PaymentSuite/paymentsuite
src/PaymentSuite/PaymentCoreBundle/DependencyInjection/Abstracts/AbstractPaymentSuiteExtension.php
AbstractPaymentSuiteExtension.registerRedirectRoutesDefinition
protected function registerRedirectRoutesDefinition( ContainerBuilder $containerBuilder, $paymentName, array $redirectionRoutesConfiguration ) { $collectionDefinition = $containerBuilder->register( "paymentsuite.{$paymentName}.routes", 'PaymentSuite\PaymentCor...
php
protected function registerRedirectRoutesDefinition( ContainerBuilder $containerBuilder, $paymentName, array $redirectionRoutesConfiguration ) { $collectionDefinition = $containerBuilder->register( "paymentsuite.{$paymentName}.routes", 'PaymentSuite\PaymentCor...
[ "protected", "function", "registerRedirectRoutesDefinition", "(", "ContainerBuilder", "$", "containerBuilder", ",", "$", "paymentName", ",", "array", "$", "redirectionRoutesConfiguration", ")", "{", "$", "collectionDefinition", "=", "$", "containerBuilder", "->", "registe...
Create a new service for the RedirectRoutes collection given a configuration array. This method will register each redirection route in a separated service and will create a new service for the collection The value entered must have this format [ 'name' => [ 'route' => 'xxx', 'order_append' => 'xxx', 'order_append_f...
[ "Create", "a", "new", "service", "for", "the", "RedirectRoutes", "collection", "given", "a", "configuration", "array", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/PaymentCoreBundle/DependencyInjection/Abstracts/AbstractPaymentSuiteExtension.php#L57-L87
231,297
PaymentSuite/paymentsuite
src/PaymentSuite/PaymentCoreBundle/DependencyInjection/Abstracts/AbstractPaymentSuiteExtension.php
AbstractPaymentSuiteExtension.addParameters
protected function addParameters( ContainerBuilder $containerBuilder, $paymentName, array $configuration ) { foreach ($configuration as $key => $value) { $parameterName = '' === $paymentName ? "paymentsuite.$key" : "paymentsuite.$paymentNam...
php
protected function addParameters( ContainerBuilder $containerBuilder, $paymentName, array $configuration ) { foreach ($configuration as $key => $value) { $parameterName = '' === $paymentName ? "paymentsuite.$key" : "paymentsuite.$paymentNam...
[ "protected", "function", "addParameters", "(", "ContainerBuilder", "$", "containerBuilder", ",", "$", "paymentName", ",", "array", "$", "configuration", ")", "{", "foreach", "(", "$", "configuration", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "par...
Add parameters and values in a bulk way. @param ContainerBuilder $containerBuilder Container builder @param string $paymentName Payment name @param array $configuration Configuration
[ "Add", "parameters", "and", "values", "in", "a", "bulk", "way", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/PaymentCoreBundle/DependencyInjection/Abstracts/AbstractPaymentSuiteExtension.php#L96-L111
231,298
PaymentSuite/paymentsuite
src/PaymentSuite/BankwireBundle/Services/BankwireManager.php
BankwireManager.processPayment
public function processPayment() { $bankwireMethod = $this ->methodFactory ->create(); /** * At this point, order must be created given a cart, and placed in PaymentBridge. * * So, $this->paymentBridge->getOrder() must return an object */ ...
php
public function processPayment() { $bankwireMethod = $this ->methodFactory ->create(); /** * At this point, order must be created given a cart, and placed in PaymentBridge. * * So, $this->paymentBridge->getOrder() must return an object */ ...
[ "public", "function", "processPayment", "(", ")", "{", "$", "bankwireMethod", "=", "$", "this", "->", "methodFactory", "->", "create", "(", ")", ";", "/**\n * At this point, order must be created given a cart, and placed in PaymentBridge.\n *\n * So, $this...
Tries to process a payment through Bankwire. @return BankwireManager Self object @throws PaymentOrderNotFoundException
[ "Tries", "to", "process", "a", "payment", "through", "Bankwire", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/BankwireBundle/Services/BankwireManager.php#L72-L120
231,299
PaymentSuite/paymentsuite
src/PaymentSuite/BankwireBundle/Services/BankwireManager.php
BankwireManager.validatePayment
public function validatePayment($orderId) { /** * Loads order to validate. */ $this ->paymentBridge ->findOrder($orderId); /** * Order Not found Exception must be thrown just here. */ if (!$this->paymentBridge->getOrder()) ...
php
public function validatePayment($orderId) { /** * Loads order to validate. */ $this ->paymentBridge ->findOrder($orderId); /** * Order Not found Exception must be thrown just here. */ if (!$this->paymentBridge->getOrder()) ...
[ "public", "function", "validatePayment", "(", "$", "orderId", ")", "{", "/**\n * Loads order to validate.\n */", "$", "this", "->", "paymentBridge", "->", "findOrder", "(", "$", "orderId", ")", ";", "/**\n * Order Not found Exception must be thrown jus...
Validates payment, given an Id of an existing order. @param int $orderId Id from order to validate @return BankwireManager self Object @throws PaymentOrderNotFoundException
[ "Validates", "payment", "given", "an", "Id", "of", "an", "existing", "order", "." ]
8ae57df57fa07aff7e59701a0b3c83c504095b92
https://github.com/PaymentSuite/paymentsuite/blob/8ae57df57fa07aff7e59701a0b3c83c504095b92/src/PaymentSuite/BankwireBundle/Services/BankwireManager.php#L131-L162