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
235,000
makinacorpus/drupal-ucms
ucms_label/src/LabelManager.php
LabelManager.deleteLabel
public function deleteLabel(\stdClass $label) { // Prevents to delete a label which has children. if ($this->hasChildren($label)) { throw new \LogicException("Can't delete a label which has children."); } return taxonomy_term_delete($label->tid); }
php
public function deleteLabel(\stdClass $label) { // Prevents to delete a label which has children. if ($this->hasChildren($label)) { throw new \LogicException("Can't delete a label which has children."); } return taxonomy_term_delete($label->tid); }
[ "public", "function", "deleteLabel", "(", "\\", "stdClass", "$", "label", ")", "{", "// Prevents to delete a label which has children.", "if", "(", "$", "this", "->", "hasChildren", "(", "$", "label", ")", ")", "{", "throw", "new", "\\", "LogicException", "(", ...
Delete the label. @return integer Constant SAVED_DELETED if no exception occurs. @throws \LogicException @see taxonomy_term_delete().
[ "Delete", "the", "label", "." ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_label/src/LabelManager.php#L203-L210
235,001
makinacorpus/drupal-ucms
ucms_label/src/LabelManager.php
LabelManager.canEditLabel
public function canEditLabel(\stdClass $label, AccountInterface $account = null) { if ($account === null) { global $user; $account = $user; } return ($label->is_locked == 0) ? user_access(LabelAccess::PERM_EDIT_NON_LOCKED, $account) : user_acc...
php
public function canEditLabel(\stdClass $label, AccountInterface $account = null) { if ($account === null) { global $user; $account = $user; } return ($label->is_locked == 0) ? user_access(LabelAccess::PERM_EDIT_NON_LOCKED, $account) : user_acc...
[ "public", "function", "canEditLabel", "(", "\\", "stdClass", "$", "label", ",", "AccountInterface", "$", "account", "=", "null", ")", "{", "if", "(", "$", "account", "===", "null", ")", "{", "global", "$", "user", ";", "$", "account", "=", "$", "user",...
Is the user allowed to edit the given label? @param stdClass $label @param AccountInterface $account @return boolean
[ "Is", "the", "user", "allowed", "to", "edit", "the", "given", "label?" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_label/src/LabelManager.php#L220-L230
235,002
makinacorpus/drupal-ucms
ucms_label/src/LabelManager.php
LabelManager.canEditLockedLabels
public function canEditLockedLabels(AccountInterface $account = null) { if ($account === null) { global $user; $account = $user; } return user_access(LabelAccess::PERM_EDIT_LOCKED, $account); }
php
public function canEditLockedLabels(AccountInterface $account = null) { if ($account === null) { global $user; $account = $user; } return user_access(LabelAccess::PERM_EDIT_LOCKED, $account); }
[ "public", "function", "canEditLockedLabels", "(", "AccountInterface", "$", "account", "=", "null", ")", "{", "if", "(", "$", "account", "===", "null", ")", "{", "global", "$", "user", ";", "$", "account", "=", "$", "user", ";", "}", "return", "user_acces...
Is the user allowed to edit locked labels? @param AccountInterface $account @return boolean
[ "Is", "the", "user", "allowed", "to", "edit", "locked", "labels?" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_label/src/LabelManager.php#L259-L267
235,003
makinacorpus/drupal-ucms
ucms_label/src/LabelManager.php
LabelManager.canEditNonLockedLabels
public function canEditNonLockedLabels(AccountInterface $account = null) { if ($account === null) { global $user; $account = $user; } return user_access(LabelAccess::PERM_EDIT_NON_LOCKED, $account); }
php
public function canEditNonLockedLabels(AccountInterface $account = null) { if ($account === null) { global $user; $account = $user; } return user_access(LabelAccess::PERM_EDIT_NON_LOCKED, $account); }
[ "public", "function", "canEditNonLockedLabels", "(", "AccountInterface", "$", "account", "=", "null", ")", "{", "if", "(", "$", "account", "===", "null", ")", "{", "global", "$", "user", ";", "$", "account", "=", "$", "user", ";", "}", "return", "user_ac...
Is the user allowed to edit non locked labels? @param AccountInterface $account @return boolean
[ "Is", "the", "user", "allowed", "to", "edit", "non", "locked", "labels?" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_label/src/LabelManager.php#L276-L284
235,004
makinacorpus/drupal-ucms
ucms_search/src/Aggs/TermFacet.php
TermFacet.getFormattedChoices
public function getFormattedChoices() { $ret = []; $loaded = []; // Populate the raw formatted array with just values as values foreach (array_keys($this->choices) as $value) { $ret[$value] = $value; } // First start with arbitrarily set choices map ...
php
public function getFormattedChoices() { $ret = []; $loaded = []; // Populate the raw formatted array with just values as values foreach (array_keys($this->choices) as $value) { $ret[$value] = $value; } // First start with arbitrarily set choices map ...
[ "public", "function", "getFormattedChoices", "(", ")", "{", "$", "ret", "=", "[", "]", ";", "$", "loaded", "=", "[", "]", ";", "// Populate the raw formatted array with just values as values", "foreach", "(", "array_keys", "(", "$", "this", "->", "choices", ")",...
Get formatter list of choices after query @return string[]
[ "Get", "formatter", "list", "of", "choices", "after", "query" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_search/src/Aggs/TermFacet.php#L151-L200
235,005
PHPixie/HTTP
src/PHPixie/HTTP/Context/Cookies/Update.php
Update.asHeader
public function asHeader() { $header = urlencode($this->name).'='.urlencode((string) $this->value); if($this->domain !== null) { $header.= '; domain='.$this->domain; } if($this->path !== null) { $header.= '; path='.$this->path; } ...
php
public function asHeader() { $header = urlencode($this->name).'='.urlencode((string) $this->value); if($this->domain !== null) { $header.= '; domain='.$this->domain; } if($this->path !== null) { $header.= '; path='.$this->path; } ...
[ "public", "function", "asHeader", "(", ")", "{", "$", "header", "=", "urlencode", "(", "$", "this", "->", "name", ")", ".", "'='", ".", "urlencode", "(", "(", "string", ")", "$", "this", "->", "value", ")", ";", "if", "(", "$", "this", "->", "dom...
Get header representation @return string
[ "Get", "header", "representation" ]
581c0df452fd07ca4ea0b3e24e8ddee8dddc2912
https://github.com/PHPixie/HTTP/blob/581c0df452fd07ca4ea0b3e24e8ddee8dddc2912/src/PHPixie/HTTP/Context/Cookies/Update.php#L141-L166
235,006
NicolasMahe/Laravel-SlackOutput
src/Library/Stats.php
Stats.getClasses
protected function getClasses() { $classes = config('slack-output.stats.classes'); //force classes to have the right format $sanitized_classes = [ ]; foreach ($classes as $classes_name => $constraints) { //check constraints are supplied, if not, correct //th...
php
protected function getClasses() { $classes = config('slack-output.stats.classes'); //force classes to have the right format $sanitized_classes = [ ]; foreach ($classes as $classes_name => $constraints) { //check constraints are supplied, if not, correct //th...
[ "protected", "function", "getClasses", "(", ")", "{", "$", "classes", "=", "config", "(", "'slack-output.stats.classes'", ")", ";", "//force classes to have the right format", "$", "sanitized_classes", "=", "[", "]", ";", "foreach", "(", "$", "classes", "as", "$",...
Get the classes and sanitized them @return array
[ "Get", "the", "classes", "and", "sanitized", "them" ]
fc3722ba64a0ce4d833555bb1a27513e13959b34
https://github.com/NicolasMahe/Laravel-SlackOutput/blob/fc3722ba64a0ce4d833555bb1a27513e13959b34/src/Library/Stats.php#L37-L55
235,007
NicolasMahe/Laravel-SlackOutput
src/Library/Stats.php
Stats.calculateStats
public function calculateStats() { $classes = $this->getClasses(); $dates = $this->getDates(); //explore all class to stated foreach ($classes as $objectClass => $constraints) { //prepare useful data $stats_fields = [ ]; $objectName = last(expl...
php
public function calculateStats() { $classes = $this->getClasses(); $dates = $this->getDates(); //explore all class to stated foreach ($classes as $objectClass => $constraints) { //prepare useful data $stats_fields = [ ]; $objectName = last(expl...
[ "public", "function", "calculateStats", "(", ")", "{", "$", "classes", "=", "$", "this", "->", "getClasses", "(", ")", ";", "$", "dates", "=", "$", "this", "->", "getDates", "(", ")", ";", "//explore all class to stated", "foreach", "(", "$", "classes", ...
Do the stats!
[ "Do", "the", "stats!" ]
fc3722ba64a0ce4d833555bb1a27513e13959b34
https://github.com/NicolasMahe/Laravel-SlackOutput/blob/fc3722ba64a0ce4d833555bb1a27513e13959b34/src/Library/Stats.php#L72-L110
235,008
NicolasMahe/Laravel-SlackOutput
src/Library/Stats.php
Stats.prepareSlackAttachment
protected function prepareSlackAttachment() { $attachments = [ ]; foreach ($this->stats as $stats) { $name = $stats['name']; $fields = [ ]; foreach ($stats['values'] as $stat) { $count = $stat['value']; $since = $stat['since']; ...
php
protected function prepareSlackAttachment() { $attachments = [ ]; foreach ($this->stats as $stats) { $name = $stats['name']; $fields = [ ]; foreach ($stats['values'] as $stat) { $count = $stat['value']; $since = $stat['since']; ...
[ "protected", "function", "prepareSlackAttachment", "(", ")", "{", "$", "attachments", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "stats", "as", "$", "stats", ")", "{", "$", "name", "=", "$", "stats", "[", "'name'", "]", ";", "$", "fields"...
Transform the stats array to a slack attachment
[ "Transform", "the", "stats", "array", "to", "a", "slack", "attachment" ]
fc3722ba64a0ce4d833555bb1a27513e13959b34
https://github.com/NicolasMahe/Laravel-SlackOutput/blob/fc3722ba64a0ce4d833555bb1a27513e13959b34/src/Library/Stats.php#L116-L144
235,009
NicolasMahe/Laravel-SlackOutput
src/Library/Stats.php
Stats.sendToSlack
public function sendToSlack($channel) { $attachments = $this->prepareSlackAttachment(); Artisan::call('slack:post', [ 'to' => $channel, 'attach' => $attachments, 'message' => "Stats of the " . Carbon::now()->toFormattedDateString() ]); }
php
public function sendToSlack($channel) { $attachments = $this->prepareSlackAttachment(); Artisan::call('slack:post', [ 'to' => $channel, 'attach' => $attachments, 'message' => "Stats of the " . Carbon::now()->toFormattedDateString() ]); }
[ "public", "function", "sendToSlack", "(", "$", "channel", ")", "{", "$", "attachments", "=", "$", "this", "->", "prepareSlackAttachment", "(", ")", ";", "Artisan", "::", "call", "(", "'slack:post'", ",", "[", "'to'", "=>", "$", "channel", ",", "'attach'", ...
Send the stats to output @param $channel
[ "Send", "the", "stats", "to", "output" ]
fc3722ba64a0ce4d833555bb1a27513e13959b34
https://github.com/NicolasMahe/Laravel-SlackOutput/blob/fc3722ba64a0ce4d833555bb1a27513e13959b34/src/Library/Stats.php#L152-L161
235,010
PHPixie/HTTP
src/PHPixie/HTTP.php
HTTP.request
public function request($serverRequest = null) { if ($serverRequest === null) { $serverRequest = $this->sapiServerRequest(); } return $this->builder->request($serverRequest); }
php
public function request($serverRequest = null) { if ($serverRequest === null) { $serverRequest = $this->sapiServerRequest(); } return $this->builder->request($serverRequest); }
[ "public", "function", "request", "(", "$", "serverRequest", "=", "null", ")", "{", "if", "(", "$", "serverRequest", "===", "null", ")", "{", "$", "serverRequest", "=", "$", "this", "->", "sapiServerRequest", "(", ")", ";", "}", "return", "$", "this", "...
Create PHPixie request from server request. If the server request is not specified it will be created from globals @param Request\ServerRequest $serverRequest @return HTTP\Request
[ "Create", "PHPixie", "request", "from", "server", "request", "." ]
581c0df452fd07ca4ea0b3e24e8ddee8dddc2912
https://github.com/PHPixie/HTTP/blob/581c0df452fd07ca4ea0b3e24e8ddee8dddc2912/src/PHPixie/HTTP.php#L43-L49
235,011
PHPixie/HTTP
src/PHPixie/HTTP.php
HTTP.output
public function output($response, $context = null) { $this->builder->output()->response($response, $context); }
php
public function output($response, $context = null) { $this->builder->output()->response($response, $context); }
[ "public", "function", "output", "(", "$", "response", ",", "$", "context", "=", "null", ")", "{", "$", "this", "->", "builder", "->", "output", "(", ")", "->", "response", "(", "$", "response", ",", "$", "context", ")", ";", "}" ]
Output a HTTP response @param HTTP\Responses\Response $response @param HTTP\Context $context Optional HTTP context to use (e.g. for cookie data) @return void
[ "Output", "a", "HTTP", "response" ]
581c0df452fd07ca4ea0b3e24e8ddee8dddc2912
https://github.com/PHPixie/HTTP/blob/581c0df452fd07ca4ea0b3e24e8ddee8dddc2912/src/PHPixie/HTTP.php#L57-L60
235,012
PHPixie/HTTP
src/PHPixie/HTTP.php
HTTP.context
public function context($request, $session = null) { $serverRequest = $request->serverRequest(); $cookieArray = $serverRequest->getCookieParams(); $cookies = $this->builder->cookies($cookieArray); if ($session === null) { $session = $this->builder->sapiSession(); ...
php
public function context($request, $session = null) { $serverRequest = $request->serverRequest(); $cookieArray = $serverRequest->getCookieParams(); $cookies = $this->builder->cookies($cookieArray); if ($session === null) { $session = $this->builder->sapiSession(); ...
[ "public", "function", "context", "(", "$", "request", ",", "$", "session", "=", "null", ")", "{", "$", "serverRequest", "=", "$", "request", "->", "serverRequest", "(", ")", ";", "$", "cookieArray", "=", "$", "serverRequest", "->", "getCookieParams", "(", ...
Create a context from a HTTP request @param HTTP\Request $request @param HTTP\Context\Session $session Optional session container, if not specified the default PHP session storage is used @return HTTP\Context
[ "Create", "a", "context", "from", "a", "HTTP", "request" ]
581c0df452fd07ca4ea0b3e24e8ddee8dddc2912
https://github.com/PHPixie/HTTP/blob/581c0df452fd07ca4ea0b3e24e8ddee8dddc2912/src/PHPixie/HTTP.php#L79-L89
235,013
aimeos/ai-admin-extadm
controller/extjs/src/Controller/ExtJS/Base.php
Base.checkFileUpload
protected function checkFileUpload( $filename, $errcode ) { switch( $errcode ) { case UPLOAD_ERR_OK: break; case UPLOAD_ERR_INI_SIZE: case UPLOAD_ERR_FORM_SIZE: throw new \Aimeos\Controller\ExtJS\Exception( 'The uploaded file exceeds the max. allowed filesize' ); case UPLOAD_ERR_PARTIAL: th...
php
protected function checkFileUpload( $filename, $errcode ) { switch( $errcode ) { case UPLOAD_ERR_OK: break; case UPLOAD_ERR_INI_SIZE: case UPLOAD_ERR_FORM_SIZE: throw new \Aimeos\Controller\ExtJS\Exception( 'The uploaded file exceeds the max. allowed filesize' ); case UPLOAD_ERR_PARTIAL: th...
[ "protected", "function", "checkFileUpload", "(", "$", "filename", ",", "$", "errcode", ")", "{", "switch", "(", "$", "errcode", ")", "{", "case", "UPLOAD_ERR_OK", ":", "break", ";", "case", "UPLOAD_ERR_INI_SIZE", ":", "case", "UPLOAD_ERR_FORM_SIZE", ":", "thro...
Checks if the uploaded file is valid. @param string $filename Name of the uploaded file in the file system of the server @param integer $errcode Status code of the uploaded file @throws \Aimeos\Controller\ExtJS\Exception If file upload is invalid
[ "Checks", "if", "the", "uploaded", "file", "is", "valid", "." ]
594ee7cec90fd63a4773c05c93f353e66d9b3408
https://github.com/aimeos/ai-admin-extadm/blob/594ee7cec90fd63a4773c05c93f353e66d9b3408/controller/extjs/src/Controller/ExtJS/Base.php#L265-L291
235,014
aimeos/ai-admin-extadm
controller/extjs/src/Controller/ExtJS/Base.php
Base.getItems
protected function getItems( array $ids, $prefix ) { $search = $this->getManager()->createSearch(); $search->setConditions( $search->compare( '==', $prefix . '.id', $ids ) ); $search->setSlice( 0, count( $ids ) ); $items = $this->toArray( $this->getManager()->searchItems( $search ) ); return array( 'item...
php
protected function getItems( array $ids, $prefix ) { $search = $this->getManager()->createSearch(); $search->setConditions( $search->compare( '==', $prefix . '.id', $ids ) ); $search->setSlice( 0, count( $ids ) ); $items = $this->toArray( $this->getManager()->searchItems( $search ) ); return array( 'item...
[ "protected", "function", "getItems", "(", "array", "$", "ids", ",", "$", "prefix", ")", "{", "$", "search", "=", "$", "this", "->", "getManager", "(", ")", "->", "createSearch", "(", ")", ";", "$", "search", "->", "setConditions", "(", "$", "search", ...
Returns the items for the given domain and IDs @param array $ids List of domain item IDs @param string $prefix Search key prefix @return array Associative array including items and status for ExtJS
[ "Returns", "the", "items", "for", "the", "given", "domain", "and", "IDs" ]
594ee7cec90fd63a4773c05c93f353e66d9b3408
https://github.com/aimeos/ai-admin-extadm/blob/594ee7cec90fd63a4773c05c93f353e66d9b3408/controller/extjs/src/Controller/ExtJS/Base.php#L369-L380
235,015
aimeos/ai-admin-extadm
controller/extjs/src/Controller/ExtJS/Base.php
Base.toArray
protected function toArray( array $list ) { $result = []; foreach( $list as $item ) { $result[] = (object) $item->toArray( true ); } return $result; }
php
protected function toArray( array $list ) { $result = []; foreach( $list as $item ) { $result[] = (object) $item->toArray( true ); } return $result; }
[ "protected", "function", "toArray", "(", "array", "$", "list", ")", "{", "$", "result", "=", "[", "]", ";", "foreach", "(", "$", "list", "as", "$", "item", ")", "{", "$", "result", "[", "]", "=", "(", "object", ")", "$", "item", "->", "toArray", ...
Converts the given list of objects to a list of \stdClass objects @param array $list List of item objects @return array List of \stdClass objects containing the properties of the item objects
[ "Converts", "the", "given", "list", "of", "objects", "to", "a", "list", "of", "\\", "stdClass", "objects" ]
594ee7cec90fd63a4773c05c93f353e66d9b3408
https://github.com/aimeos/ai-admin-extadm/blob/594ee7cec90fd63a4773c05c93f353e66d9b3408/controller/extjs/src/Controller/ExtJS/Base.php#L512-L521
235,016
platformsh/console-form
src/Form.php
Form.addField
public function addField(Field $field, $key = null) { $this->fields[$key] = $field; return $this; }
php
public function addField(Field $field, $key = null) { $this->fields[$key] = $field; return $this; }
[ "public", "function", "addField", "(", "Field", "$", "field", ",", "$", "key", "=", "null", ")", "{", "$", "this", "->", "fields", "[", "$", "key", "]", "=", "$", "field", ";", "return", "$", "this", ";", "}" ]
Add a field to the form. @param Field $field @param string $key @return $this
[ "Add", "a", "field", "to", "the", "form", "." ]
5263fe8c6c976e10f4495c9e00c92cc2d410a673
https://github.com/platformsh/console-form/blob/5263fe8c6c976e10f4495c9e00c92cc2d410a673/src/Form.php#L27-L32
235,017
platformsh/console-form
src/Form.php
Form.getField
public function getField($key) { if (!isset($this->fields[$key])) { return false; } return $this->fields[$key]; }
php
public function getField($key) { if (!isset($this->fields[$key])) { return false; } return $this->fields[$key]; }
[ "public", "function", "getField", "(", "$", "key", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "fields", "[", "$", "key", "]", ")", ")", "{", "return", "false", ";", "}", "return", "$", "this", "->", "fields", "[", "$", "key", "]...
Get a single form field. @param string $key @return Field|false
[ "Get", "a", "single", "form", "field", "." ]
5263fe8c6c976e10f4495c9e00c92cc2d410a673
https://github.com/platformsh/console-form/blob/5263fe8c6c976e10f4495c9e00c92cc2d410a673/src/Form.php#L41-L48
235,018
platformsh/console-form
src/Form.php
Form.fromArray
public static function fromArray(array $fields) { $form = new static(); foreach ($fields as $key => $field) { $form->addField($field, $key); } return $form; }
php
public static function fromArray(array $fields) { $form = new static(); foreach ($fields as $key => $field) { $form->addField($field, $key); } return $form; }
[ "public", "static", "function", "fromArray", "(", "array", "$", "fields", ")", "{", "$", "form", "=", "new", "static", "(", ")", ";", "foreach", "(", "$", "fields", "as", "$", "key", "=>", "$", "field", ")", "{", "$", "form", "->", "addField", "(",...
Create a form from an array of fields. @param Field[] $fields @return static
[ "Create", "a", "form", "from", "an", "array", "of", "fields", "." ]
5263fe8c6c976e10f4495c9e00c92cc2d410a673
https://github.com/platformsh/console-form/blob/5263fe8c6c976e10f4495c9e00c92cc2d410a673/src/Form.php#L57-L65
235,019
platformsh/console-form
src/Form.php
Form.configureInputDefinition
public function configureInputDefinition(InputDefinition $definition) { foreach ($this->fields as $field) { if ($field->includeAsOption()) { $definition->addOption($field->getAsOption()); } } }
php
public function configureInputDefinition(InputDefinition $definition) { foreach ($this->fields as $field) { if ($field->includeAsOption()) { $definition->addOption($field->getAsOption()); } } }
[ "public", "function", "configureInputDefinition", "(", "InputDefinition", "$", "definition", ")", "{", "foreach", "(", "$", "this", "->", "fields", "as", "$", "field", ")", "{", "if", "(", "$", "field", "->", "includeAsOption", "(", ")", ")", "{", "$", "...
Add options to a Symfony Console input definition. @param InputDefinition $definition
[ "Add", "options", "to", "a", "Symfony", "Console", "input", "definition", "." ]
5263fe8c6c976e10f4495c9e00c92cc2d410a673
https://github.com/platformsh/console-form/blob/5263fe8c6c976e10f4495c9e00c92cc2d410a673/src/Form.php#L72-L79
235,020
platformsh/console-form
src/Form.php
Form.resolveOptions
public function resolveOptions(InputInterface $input, OutputInterface $output, QuestionHelper $helper) { $values = []; $stdErr = $output instanceof ConsoleOutput ? $output->getErrorOutput() : $output; foreach ($this->fields as $key => $field) { $field->onChange($values); ...
php
public function resolveOptions(InputInterface $input, OutputInterface $output, QuestionHelper $helper) { $values = []; $stdErr = $output instanceof ConsoleOutput ? $output->getErrorOutput() : $output; foreach ($this->fields as $key => $field) { $field->onChange($values); ...
[ "public", "function", "resolveOptions", "(", "InputInterface", "$", "input", ",", "OutputInterface", "$", "output", ",", "QuestionHelper", "$", "helper", ")", "{", "$", "values", "=", "[", "]", ";", "$", "stdErr", "=", "$", "output", "instanceof", "ConsoleOu...
Validate specified options, and ask questions for any missing values. Values can come from three sources at the moment: - command-line input - defaults - interactive questions @param InputInterface $input @param OutputInterface $output @param QuestionHelper $helper @throws InvalidValueException if any of the input w...
[ "Validate", "specified", "options", "and", "ask", "questions", "for", "any", "missing", "values", "." ]
5263fe8c6c976e10f4495c9e00c92cc2d410a673
https://github.com/platformsh/console-form/blob/5263fe8c6c976e10f4495c9e00c92cc2d410a673/src/Form.php#L109-L141
235,021
platformsh/console-form
src/Form.php
Form.includeField
public function includeField(Field $field, array $previousValues) { foreach ($field->getConditions() as $previousField => $condition) { $previousFieldObject = $this->getField($previousField); if ($previousFieldObject === false || !isset($previousValues[$previousField]...
php
public function includeField(Field $field, array $previousValues) { foreach ($field->getConditions() as $previousField => $condition) { $previousFieldObject = $this->getField($previousField); if ($previousFieldObject === false || !isset($previousValues[$previousField]...
[ "public", "function", "includeField", "(", "Field", "$", "field", ",", "array", "$", "previousValues", ")", "{", "foreach", "(", "$", "field", "->", "getConditions", "(", ")", "as", "$", "previousField", "=>", "$", "condition", ")", "{", "$", "previousFiel...
Determine whether the field should be included. @param Field $field @param array $previousValues @return bool
[ "Determine", "whether", "the", "field", "should", "be", "included", "." ]
5263fe8c6c976e10f4495c9e00c92cc2d410a673
https://github.com/platformsh/console-form/blob/5263fe8c6c976e10f4495c9e00c92cc2d410a673/src/Form.php#L151-L163
235,022
makinacorpus/drupal-ucms
ucms_group/src/Controller/DashboardController.php
DashboardController.viewAction
public function viewAction(Group $group) { $table = $this->createAdminTable('ucms_group'); $table ->addHeader($this->t("Information"), 'basic') ->addRow($this->t("Title"), $group->getTitle()) ->addRow($this->t("Identifier"), $group->getId()) ; $t...
php
public function viewAction(Group $group) { $table = $this->createAdminTable('ucms_group'); $table ->addHeader($this->t("Information"), 'basic') ->addRow($this->t("Title"), $group->getTitle()) ->addRow($this->t("Identifier"), $group->getId()) ; $t...
[ "public", "function", "viewAction", "(", "Group", "$", "group", ")", "{", "$", "table", "=", "$", "this", "->", "createAdminTable", "(", "'ucms_group'", ")", ";", "$", "table", "->", "addHeader", "(", "$", "this", "->", "t", "(", "\"Information\"", ")", ...
Group details action
[ "Group", "details", "action" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_group/src/Controller/DashboardController.php#L71-L84
235,023
makinacorpus/drupal-ucms
ucms_group/src/Controller/DashboardController.php
DashboardController.memberListAction
public function memberListAction(Request $request, Group $group) { return $this->renderPage('ucms_group.list_members', $request, [ 'base_query' => [ 'group' => $group->getId(), ] ]); }
php
public function memberListAction(Request $request, Group $group) { return $this->renderPage('ucms_group.list_members', $request, [ 'base_query' => [ 'group' => $group->getId(), ] ]); }
[ "public", "function", "memberListAction", "(", "Request", "$", "request", ",", "Group", "$", "group", ")", "{", "return", "$", "this", "->", "renderPage", "(", "'ucms_group.list_members'", ",", "$", "request", ",", "[", "'base_query'", "=>", "[", "'group'", ...
View members action
[ "View", "members", "action" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_group/src/Controller/DashboardController.php#L89-L96
235,024
makinacorpus/drupal-ucms
ucms_group/src/Controller/DashboardController.php
DashboardController.siteAttachAction
public function siteAttachAction(Site $site) { if (!$this->isGranted(Access::PERM_GROUP_MANAGE_ALL)) { throw $this->createAccessDeniedException(); } return \Drupal::formBuilder()->getForm(SiteGroupAttach::class, $site); }
php
public function siteAttachAction(Site $site) { if (!$this->isGranted(Access::PERM_GROUP_MANAGE_ALL)) { throw $this->createAccessDeniedException(); } return \Drupal::formBuilder()->getForm(SiteGroupAttach::class, $site); }
[ "public", "function", "siteAttachAction", "(", "Site", "$", "site", ")", "{", "if", "(", "!", "$", "this", "->", "isGranted", "(", "Access", "::", "PERM_GROUP_MANAGE_ALL", ")", ")", "{", "throw", "$", "this", "->", "createAccessDeniedException", "(", ")", ...
Add site action
[ "Add", "site", "action" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_group/src/Controller/DashboardController.php#L117-L124
235,025
makinacorpus/drupal-ucms
ucms_group/src/Controller/DashboardController.php
DashboardController.siteListAction
public function siteListAction(Request $request, Group $group) { return $this->renderPage('ucms_group.list_by_site', $request, [ 'base_query' => [ 'group' => $group->getId(), ] ]); }
php
public function siteListAction(Request $request, Group $group) { return $this->renderPage('ucms_group.list_by_site', $request, [ 'base_query' => [ 'group' => $group->getId(), ] ]); }
[ "public", "function", "siteListAction", "(", "Request", "$", "request", ",", "Group", "$", "group", ")", "{", "return", "$", "this", "->", "renderPage", "(", "'ucms_group.list_by_site'", ",", "$", "request", ",", "[", "'base_query'", "=>", "[", "'group'", "=...
Site list action for group
[ "Site", "list", "action", "for", "group" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_group/src/Controller/DashboardController.php#L129-L136
235,026
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.ping
protected function ping() { // obfuscate data relevant for authentication $config = $this->config->toArray(); $config['customer_number'] = ShopgateLogger::OBFUSCATION_STRING; $config['shop_number'] = ShopgateLogger::OBFUSCATION_STRING; $config[...
php
protected function ping() { // obfuscate data relevant for authentication $config = $this->config->toArray(); $config['customer_number'] = ShopgateLogger::OBFUSCATION_STRING; $config['shop_number'] = ShopgateLogger::OBFUSCATION_STRING; $config[...
[ "protected", "function", "ping", "(", ")", "{", "// obfuscate data relevant for authentication", "$", "config", "=", "$", "this", "->", "config", "->", "toArray", "(", ")", ";", "$", "config", "[", "'customer_number'", "]", "=", "ShopgateLogger", "::", "OBFUSCAT...
Represents the "ping" action. @see http://wiki.shopgate.com/Shopgate_Plugin_API_ping
[ "Represents", "the", "ping", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L295-L327
235,027
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.getDebugInfo
protected function getDebugInfo() { // prepare response data array $this->responseData = $this->plugin->getDebugInfo(); // set data and return response if (empty($this->response)) { $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id); } }
php
protected function getDebugInfo() { // prepare response data array $this->responseData = $this->plugin->getDebugInfo(); // set data and return response if (empty($this->response)) { $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id); } }
[ "protected", "function", "getDebugInfo", "(", ")", "{", "// prepare response data array", "$", "this", "->", "responseData", "=", "$", "this", "->", "plugin", "->", "getDebugInfo", "(", ")", ";", "// set data and return response", "if", "(", "empty", "(", "$", "...
Represents the "debug" action. @see http://wiki.shopgate.com/Shopgate_Plugin_API_ping
[ "Represents", "the", "debug", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L334-L343
235,028
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.cron
protected function cron() { if (empty($this->params['jobs']) || !is_array($this->params['jobs'])) { throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_CRON_NO_JOBS); } $unknownJobs = $this->getUnknownCronJobs($this->params['jobs']); if (!empty($unkno...
php
protected function cron() { if (empty($this->params['jobs']) || !is_array($this->params['jobs'])) { throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_CRON_NO_JOBS); } $unknownJobs = $this->getUnknownCronJobs($this->params['jobs']); if (!empty($unkno...
[ "protected", "function", "cron", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "params", "[", "'jobs'", "]", ")", "||", "!", "is_array", "(", "$", "this", "->", "params", "[", "'jobs'", "]", ")", ")", "{", "throw", "new", "ShopgateLibr...
Represents the "cron" action. @throws ShopgateLibraryException
[ "Represents", "the", "cron", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L350-L410
235,029
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.addOrder
protected function addOrder() { if (!isset($this->params['order_number'])) { throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_ORDER_NUMBER); } /** @var ShopgateOrder[] $orders */ $orders = $this->merchantApi->getOrders( array( ...
php
protected function addOrder() { if (!isset($this->params['order_number'])) { throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_ORDER_NUMBER); } /** @var ShopgateOrder[] $orders */ $orders = $this->merchantApi->getOrders( array( ...
[ "protected", "function", "addOrder", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "params", "[", "'order_number'", "]", ")", ")", "{", "throw", "new", "ShopgateLibraryException", "(", "ShopgateLibraryException", "::", "PLUGIN_API_NO_ORDER_NUMB...
Represents the "add_order" action. @throws ShopgateLibraryException @see http://wiki.shopgate.com/Shopgate_Plugin_API_add_order
[ "Represents", "the", "add_order", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L442-L478
235,030
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.updateOrder
protected function updateOrder() { if (!isset($this->params['order_number'])) { throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_ORDER_NUMBER); } /** @var ShopgateOrder[] $orders */ $orders = $this->merchantApi->getOrders( array( ...
php
protected function updateOrder() { if (!isset($this->params['order_number'])) { throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_ORDER_NUMBER); } /** @var ShopgateOrder[] $orders */ $orders = $this->merchantApi->getOrders( array( ...
[ "protected", "function", "updateOrder", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "params", "[", "'order_number'", "]", ")", ")", "{", "throw", "new", "ShopgateLibraryException", "(", "ShopgateLibraryException", "::", "PLUGIN_API_NO_ORDER_N...
Represents the "update_order" action. @throws ShopgateLibraryException @see http://wiki.shopgate.com/Shopgate_Plugin_API_update_order
[ "Represents", "the", "update_order", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L486-L537
235,031
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.redeemCoupons
protected function redeemCoupons() { if (!isset($this->params['cart'])) { throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_CART); } if (empty($this->response)) { $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id); ...
php
protected function redeemCoupons() { if (!isset($this->params['cart'])) { throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_CART); } if (empty($this->response)) { $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id); ...
[ "protected", "function", "redeemCoupons", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "params", "[", "'cart'", "]", ")", ")", "{", "throw", "new", "ShopgateLibraryException", "(", "ShopgateLibraryException", "::", "PLUGIN_API_NO_CART", ")",...
Represents the "redeem_coupons" action. @throws ShopgateLibraryException @see http://wiki.shopgate.com/Shopgate_Plugin_API_redeem_coupons
[ "Represents", "the", "redeem_coupons", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L545-L588
235,032
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.checkStock
protected function checkStock() { if (!isset($this->params['items'])) { throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_ITEMS); } if (empty($this->response)) { $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id); ...
php
protected function checkStock() { if (!isset($this->params['items'])) { throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_ITEMS); } if (empty($this->response)) { $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id); ...
[ "protected", "function", "checkStock", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "params", "[", "'items'", "]", ")", ")", "{", "throw", "new", "ShopgateLibraryException", "(", "ShopgateLibraryException", "::", "PLUGIN_API_NO_ITEMS", ")", ...
Represents the "check_stock" action. @throws ShopgateLibraryException @see http://wiki.shopgate.com/Shopgate_Plugin_API_check_stock
[ "Represents", "the", "check_stock", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L735-L786
235,033
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.getSettings
protected function getSettings() { $this->responseData = $this->plugin->getSettings(); // set data and return response if (empty($this->response)) { $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id); } }
php
protected function getSettings() { $this->responseData = $this->plugin->getSettings(); // set data and return response if (empty($this->response)) { $this->response = new ShopgatePluginApiResponseAppJson($this->trace_id); } }
[ "protected", "function", "getSettings", "(", ")", "{", "$", "this", "->", "responseData", "=", "$", "this", "->", "plugin", "->", "getSettings", "(", ")", ";", "// set data and return response", "if", "(", "empty", "(", "$", "this", "->", "response", ")", ...
Represents the "get_settings" action. @throws ShopgateLibraryException @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_settings
[ "Represents", "the", "get_settings", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L794-L802
235,034
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.setSettings
protected function setSettings() { if (empty($this->params['shopgate_settings']) || !is_array($this->params['shopgate_settings'])) { throw new ShopgateLibraryException( ShopgateLibraryException::PLUGIN_API_NO_SHOPGATE_SETTINGS, 'Request: ' . var_export($this->para...
php
protected function setSettings() { if (empty($this->params['shopgate_settings']) || !is_array($this->params['shopgate_settings'])) { throw new ShopgateLibraryException( ShopgateLibraryException::PLUGIN_API_NO_SHOPGATE_SETTINGS, 'Request: ' . var_export($this->para...
[ "protected", "function", "setSettings", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "params", "[", "'shopgate_settings'", "]", ")", "||", "!", "is_array", "(", "$", "this", "->", "params", "[", "'shopgate_settings'", "]", ")", ")", "{", ...
Represents the "set_settings" action. @throws ShopgateLibraryException @see http://wiki.shopgate.com/Shopgate_Plugin_API_set_settings
[ "Represents", "the", "set_settings", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L810-L875
235,035
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.getCustomer
protected function getCustomer() { if (!isset($this->params['user'])) { throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_USER); } if (!isset($this->params['pass'])) { throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO...
php
protected function getCustomer() { if (!isset($this->params['user'])) { throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO_USER); } if (!isset($this->params['pass'])) { throw new ShopgateLibraryException(ShopgateLibraryException::PLUGIN_API_NO...
[ "protected", "function", "getCustomer", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "params", "[", "'user'", "]", ")", ")", "{", "throw", "new", "ShopgateLibraryException", "(", "ShopgateLibraryException", "::", "PLUGIN_API_NO_USER", ")", ...
Represents the "get_customer" action. @throws ShopgateLibraryException @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_customer
[ "Represents", "the", "get_customer", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L990-L1029
235,036
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.getMediaCsv
protected function getMediaCsv() { if (isset($this->params['limit']) && isset($this->params['offset'])) { $this->plugin->setExportLimit((int)$this->params['limit']); $this->plugin->setExportOffset((int)$this->params['offset']); $this->plugin->setSplittedExport(true); ...
php
protected function getMediaCsv() { if (isset($this->params['limit']) && isset($this->params['offset'])) { $this->plugin->setExportLimit((int)$this->params['limit']); $this->plugin->setExportOffset((int)$this->params['offset']); $this->plugin->setSplittedExport(true); ...
[ "protected", "function", "getMediaCsv", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "params", "[", "'limit'", "]", ")", "&&", "isset", "(", "$", "this", "->", "params", "[", "'offset'", "]", ")", ")", "{", "$", "this", "->", "plugin"...
Represents the "get_media_csv" action. @throws ShopgateLibraryException @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_media_csv
[ "Represents", "the", "get_media_csv", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L1099-L1114
235,037
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.getItemsCsv
protected function getItemsCsv() { if (isset($this->params['limit']) && isset($this->params['offset'])) { $this->plugin->setExportLimit((int)$this->params['limit']); $this->plugin->setExportOffset((int)$this->params['offset']); $this->plugin->setSplittedExport(true); ...
php
protected function getItemsCsv() { if (isset($this->params['limit']) && isset($this->params['offset'])) { $this->plugin->setExportLimit((int)$this->params['limit']); $this->plugin->setExportOffset((int)$this->params['offset']); $this->plugin->setSplittedExport(true); ...
[ "protected", "function", "getItemsCsv", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "params", "[", "'limit'", "]", ")", "&&", "isset", "(", "$", "this", "->", "params", "[", "'offset'", "]", ")", ")", "{", "$", "this", "->", "plugin"...
Represents the "get_items_csv" action. @throws ShopgateLibraryException @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_items_csv
[ "Represents", "the", "get_items_csv", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L1122-L1137
235,038
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.getItems
protected function getItems() { $limit = isset($this->params['limit']) ? (int)$this->params['limit'] : null; $offset = isset($this->params['offset']) ? (int)$this->params['offset'] : null; $uids = isset($this->params['uids'...
php
protected function getItems() { $limit = isset($this->params['limit']) ? (int)$this->params['limit'] : null; $offset = isset($this->params['offset']) ? (int)$this->params['offset'] : null; $uids = isset($this->params['uids'...
[ "protected", "function", "getItems", "(", ")", "{", "$", "limit", "=", "isset", "(", "$", "this", "->", "params", "[", "'limit'", "]", ")", "?", "(", "int", ")", "$", "this", "->", "params", "[", "'limit'", "]", ":", "null", ";", "$", "offset", "...
Represents the "get_items" action. @throws ShopgateLibraryException @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_items
[ "Represents", "the", "get_items", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L1145-L1188
235,039
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.getCategoriesCsv
protected function getCategoriesCsv() { if (isset($this->params['limit']) && isset($this->params['offset'])) { $this->plugin->setExportLimit((int)$this->params['limit']); $this->plugin->setExportOffset((int)$this->params['offset']); $this->plugin->setSplittedExport(true);...
php
protected function getCategoriesCsv() { if (isset($this->params['limit']) && isset($this->params['offset'])) { $this->plugin->setExportLimit((int)$this->params['limit']); $this->plugin->setExportOffset((int)$this->params['offset']); $this->plugin->setSplittedExport(true);...
[ "protected", "function", "getCategoriesCsv", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "params", "[", "'limit'", "]", ")", "&&", "isset", "(", "$", "this", "->", "params", "[", "'offset'", "]", ")", ")", "{", "$", "this", "->", "pl...
Represents the "get_categories_csv" action. @throws ShopgateLibraryException @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_categories_csv
[ "Represents", "the", "get_categories_csv", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L1247-L1262
235,040
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.getReviewsCsv
protected function getReviewsCsv() { if (isset($this->params['limit']) && isset($this->params['offset'])) { $this->plugin->setExportLimit((int)$this->params['limit']); $this->plugin->setExportOffset((int)$this->params['offset']); $this->plugin->setSplittedExport(true); ...
php
protected function getReviewsCsv() { if (isset($this->params['limit']) && isset($this->params['offset'])) { $this->plugin->setExportLimit((int)$this->params['limit']); $this->plugin->setExportOffset((int)$this->params['offset']); $this->plugin->setSplittedExport(true); ...
[ "protected", "function", "getReviewsCsv", "(", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "params", "[", "'limit'", "]", ")", "&&", "isset", "(", "$", "this", "->", "params", "[", "'offset'", "]", ")", ")", "{", "$", "this", "->", "plugi...
Represents the "get_reviews_csv" action. @throws ShopgateLibraryException @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_reviews_csv
[ "Represents", "the", "get_reviews_csv", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L1270-L1285
235,041
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi.getLogFile
protected function getLogFile() { // disable debug log for this action $logger = ShopgateLogger::getInstance(); $logger->disableDebug(); $logger->keepDebugLog(true); $type = (empty($this->params['log_type'])) ? ShopgateLogger::LOGTYPE_ERROR : $this->...
php
protected function getLogFile() { // disable debug log for this action $logger = ShopgateLogger::getInstance(); $logger->disableDebug(); $logger->keepDebugLog(true); $type = (empty($this->params['log_type'])) ? ShopgateLogger::LOGTYPE_ERROR : $this->...
[ "protected", "function", "getLogFile", "(", ")", "{", "// disable debug log for this action", "$", "logger", "=", "ShopgateLogger", "::", "getInstance", "(", ")", ";", "$", "logger", "->", "disableDebug", "(", ")", ";", "$", "logger", "->", "keepDebugLog", "(", ...
Represents the "get_log_file" action. @throws ShopgateLibraryException @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_log_file
[ "Represents", "the", "get_log_file", "action", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L1344-L1365
235,042
shopgate/cart-integration-sdk
src/apis.php
ShopgatePluginApi._getFileMeta
private function _getFileMeta($file, $parentLevel = 0) { $meta = array('file' => $file); if ($meta['exist'] = (bool)file_exists($file)) { $meta['writeable'] = (bool)is_writable($file); $uid = fileowner($file); if (function_exists('posix_getpwuid')) { ...
php
private function _getFileMeta($file, $parentLevel = 0) { $meta = array('file' => $file); if ($meta['exist'] = (bool)file_exists($file)) { $meta['writeable'] = (bool)is_writable($file); $uid = fileowner($file); if (function_exists('posix_getpwuid')) { ...
[ "private", "function", "_getFileMeta", "(", "$", "file", ",", "$", "parentLevel", "=", "0", ")", "{", "$", "meta", "=", "array", "(", "'file'", "=>", "$", "file", ")", ";", "if", "(", "$", "meta", "[", "'exist'", "]", "=", "(", "bool", ")", "file...
get meta data for given file. if file doesn't exists, move up to parent directory @param string $file (max numbers of parent directory lookups) @param int $parentLevel @return array with file meta data
[ "get", "meta", "data", "for", "given", "file", ".", "if", "file", "doesn", "t", "exists", "move", "up", "to", "parent", "directory" ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L1642-L1677
235,043
shopgate/cart-integration-sdk
src/apis.php
ShopgateMerchantApi.getCurlOptArray
protected function getCurlOptArray($override = array()) { $opt = array(); $opt[CURLOPT_HEADER] = false; $opt[CURLOPT_USERAGENT] = 'ShopgatePlugin/' . (defined( 'SHOPGATE_PLUGIN_VERSION' ) ? SHOPGATE_PLUGIN_VERSION : 'c...
php
protected function getCurlOptArray($override = array()) { $opt = array(); $opt[CURLOPT_HEADER] = false; $opt[CURLOPT_USERAGENT] = 'ShopgatePlugin/' . (defined( 'SHOPGATE_PLUGIN_VERSION' ) ? SHOPGATE_PLUGIN_VERSION : 'c...
[ "protected", "function", "getCurlOptArray", "(", "$", "override", "=", "array", "(", ")", ")", "{", "$", "opt", "=", "array", "(", ")", ";", "$", "opt", "[", "CURLOPT_HEADER", "]", "=", "false", ";", "$", "opt", "[", "CURLOPT_USERAGENT", "]", "=", "'...
Returns an array of curl-options for requests @param mixed[] $override cURL options to override for this request. @return mixed[] The default cURL options for a Shopgate Merchant API request merged with the options in $override.
[ "Returns", "an", "array", "of", "curl", "-", "options", "for", "requests" ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L1743-L1773
235,044
shopgate/cart-integration-sdk
src/apis.php
ShopgateMerchantApi.sendRequest
protected function sendRequest($parameters = array(), $curlOptOverride = array()) { if (!empty($this->shopNumber)) { $parameters['shop_number'] = $this->shopNumber; } $parameters = !empty($parameters) ? array_merge($this->authService->getAuthPostParams(), ...
php
protected function sendRequest($parameters = array(), $curlOptOverride = array()) { if (!empty($this->shopNumber)) { $parameters['shop_number'] = $this->shopNumber; } $parameters = !empty($parameters) ? array_merge($this->authService->getAuthPostParams(), ...
[ "protected", "function", "sendRequest", "(", "$", "parameters", "=", "array", "(", ")", ",", "$", "curlOptOverride", "=", "array", "(", ")", ")", "{", "if", "(", "!", "empty", "(", "$", "this", "->", "shopNumber", ")", ")", "{", "$", "parameters", "[...
Prepares the request and sends it to the configured Shopgate Merchant API. @param mixed[] $parameters The parameters to send. @param mixed[] $curlOptOverride cURL options to override for this request. @throws ShopgateLibraryException in case the connection can't be established, the response is invalid or an erro...
[ "Prepares", "the", "request", "and", "sends", "it", "to", "the", "configured", "Shopgate", "Merchant", "API", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L1787-L1849
235,045
shopgate/cart-integration-sdk
src/apis.php
ShopgateAuthenticationServiceShopgate.buildCustomAuthToken
protected function buildCustomAuthToken($prefix, $customerNumber, $timestamp, $apiKey) { if (empty($customerNumber) || empty($apiKey)) { throw new ShopgateLibraryException( ShopgateLibraryException::CONFIG_INVALID_VALUE, 'Shopgate customer number or API key not s...
php
protected function buildCustomAuthToken($prefix, $customerNumber, $timestamp, $apiKey) { if (empty($customerNumber) || empty($apiKey)) { throw new ShopgateLibraryException( ShopgateLibraryException::CONFIG_INVALID_VALUE, 'Shopgate customer number or API key not s...
[ "protected", "function", "buildCustomAuthToken", "(", "$", "prefix", ",", "$", "customerNumber", ",", "$", "timestamp", ",", "$", "apiKey", ")", "{", "if", "(", "empty", "(", "$", "customerNumber", ")", "||", "empty", "(", "$", "apiKey", ")", ")", "{", ...
Generates the auth token with the given parameters. @param string $prefix @param string $customerNumber @param int $timestamp @param string $apiKey @throws ShopgateLibraryException when no customer number or API key is set @return string The SHA-1 hash Auth Token for Shopgate's Authentication
[ "Generates", "the", "auth", "token", "with", "the", "given", "parameters", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/apis.php#L2319-L2331
235,046
makinacorpus/drupal-ucms
ucms_label/src/EventDispatcher/NodeEventSubscriber.php
NodeEventSubscriber.addLabelChannels
protected function addLabelChannels(ResourceEvent $event) { $nodeId = $event->getResourceIdList()[0]; $node = $this->entityManager->getStorage('node')->load($nodeId); $items = field_get_items('node', $node, 'labels'); if ($items) { foreach ($items as $item) { ...
php
protected function addLabelChannels(ResourceEvent $event) { $nodeId = $event->getResourceIdList()[0]; $node = $this->entityManager->getStorage('node')->load($nodeId); $items = field_get_items('node', $node, 'labels'); if ($items) { foreach ($items as $item) { ...
[ "protected", "function", "addLabelChannels", "(", "ResourceEvent", "$", "event", ")", "{", "$", "nodeId", "=", "$", "event", "->", "getResourceIdList", "(", ")", "[", "0", "]", ";", "$", "node", "=", "$", "this", "->", "entityManager", "->", "getStorage", ...
Adds specific channels of the node's labels to the event. @param ResourceEvent $event
[ "Adds", "specific", "channels", "of", "the", "node", "s", "labels", "to", "the", "event", "." ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_label/src/EventDispatcher/NodeEventSubscriber.php#L108-L119
235,047
pomirleanu/gif-create
src/GifCreate.php
GifCreate.create
public function create($frames, $durations = 10, $loop = null) { if (count($frames) < 2) { throw new \Exception(sprintf($this->errors[ 'ERR06' ])); } // Update loop value if passed in. $this->mergeConfigIfSet('loop', $loop); // Check if $frames is a dir; get all...
php
public function create($frames, $durations = 10, $loop = null) { if (count($frames) < 2) { throw new \Exception(sprintf($this->errors[ 'ERR06' ])); } // Update loop value if passed in. $this->mergeConfigIfSet('loop', $loop); // Check if $frames is a dir; get all...
[ "public", "function", "create", "(", "$", "frames", ",", "$", "durations", "=", "10", ",", "$", "loop", "=", "null", ")", "{", "if", "(", "count", "(", "$", "frames", ")", "<", "2", ")", "{", "throw", "new", "\\", "Exception", "(", "sprintf", "("...
Creates a gif from the given array images sources @param $frames @param int $durations @param null $loop @return \Pomirleanu\GifCreate\GifCreate @throws \Exception
[ "Creates", "a", "gif", "from", "the", "given", "array", "images", "sources" ]
84a840fb53285b8531d2d6e020434f6c501bf5bc
https://github.com/pomirleanu/gif-create/blob/84a840fb53285b8531d2d6e020434f6c501bf5bc/src/GifCreate.php#L115-L149
235,048
pomirleanu/gif-create
src/GifCreate.php
GifCreate.gifAddHeader
protected function gifAddHeader() { $cmap = 0; if (ord($this->sources[ 0 ]{10}) & 0x80) { $cmap = 3 * (2 << (ord($this->sources[ 0 ]{10}) & 0x07)); $this->gif .= substr($this->sources[ 0 ], 6, 7); $this->gif .= substr($this->sources[ 0 ], 13, $cmap); ...
php
protected function gifAddHeader() { $cmap = 0; if (ord($this->sources[ 0 ]{10}) & 0x80) { $cmap = 3 * (2 << (ord($this->sources[ 0 ]{10}) & 0x07)); $this->gif .= substr($this->sources[ 0 ], 6, 7); $this->gif .= substr($this->sources[ 0 ], 13, $cmap); ...
[ "protected", "function", "gifAddHeader", "(", ")", "{", "$", "cmap", "=", "0", ";", "if", "(", "ord", "(", "$", "this", "->", "sources", "[", "0", "]", "{", "10", "}", ")", "&", "0x80", ")", "{", "$", "cmap", "=", "3", "*", "(", "2", "<<", ...
Add the header gif string in its source
[ "Add", "the", "header", "gif", "string", "in", "its", "source" ]
84a840fb53285b8531d2d6e020434f6c501bf5bc
https://github.com/pomirleanu/gif-create/blob/84a840fb53285b8531d2d6e020434f6c501bf5bc/src/GifCreate.php#L260-L270
235,049
pomirleanu/gif-create
src/GifCreate.php
GifCreate.gifBlockCompare
private function gifBlockCompare($globalBlock, $localBlock, $length) { for ($i = 0; $i < $length; $i++) { if ($globalBlock [ 3 * $i + 0 ] != $localBlock [ 3 * $i + 0 ] || $globalBlock [ 3 * $i + 1 ] != $localBlock [ 3 * $i + 1 ] || $globalBlock [ 3 * $i + 2 ] != $localBlock [ 3 * $i + 2 ]) { ...
php
private function gifBlockCompare($globalBlock, $localBlock, $length) { for ($i = 0; $i < $length; $i++) { if ($globalBlock [ 3 * $i + 0 ] != $localBlock [ 3 * $i + 0 ] || $globalBlock [ 3 * $i + 1 ] != $localBlock [ 3 * $i + 1 ] || $globalBlock [ 3 * $i + 2 ] != $localBlock [ 3 * $i + 2 ]) { ...
[ "private", "function", "gifBlockCompare", "(", "$", "globalBlock", ",", "$", "localBlock", ",", "$", "length", ")", "{", "for", "(", "$", "i", "=", "0", ";", "$", "i", "<", "$", "length", ";", "$", "i", "++", ")", "{", "if", "(", "$", "globalBloc...
Compare two block and return the version @param string $globalBlock @param string $localBlock @param integer $length @return integer
[ "Compare", "two", "block", "and", "return", "the", "version" ]
84a840fb53285b8531d2d6e020434f6c501bf5bc
https://github.com/pomirleanu/gif-create/blob/84a840fb53285b8531d2d6e020434f6c501bf5bc/src/GifCreate.php#L381-L392
235,050
shopgate/cart-integration-sdk
src/redirect.php
ShopgateMobileRedirect.getMobileUrl
protected function getMobileUrl() { if (!empty($this->cname)) { return $this->cname; } elseif (!empty($this->alias)) { return 'http://' . $this->alias . $this->getShopgateUrl(); } }
php
protected function getMobileUrl() { if (!empty($this->cname)) { return $this->cname; } elseif (!empty($this->alias)) { return 'http://' . $this->alias . $this->getShopgateUrl(); } }
[ "protected", "function", "getMobileUrl", "(", ")", "{", "if", "(", "!", "empty", "(", "$", "this", "->", "cname", ")", ")", "{", "return", "$", "this", "->", "cname", ";", "}", "elseif", "(", "!", "empty", "(", "$", "this", "->", "alias", ")", ")...
Generates the root mobile Url for the redirect
[ "Generates", "the", "root", "mobile", "Url", "for", "the", "redirect" ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/redirect.php#L600-L607
235,051
shopgate/cart-integration-sdk
src/redirect.php
ShopgateMobileRedirect.loadKeywordsFromFile
protected function loadKeywordsFromFile($file) { $defaultReturn = array( 'timestamp' => 0, 'keywords' => array(), ); $cacheFile = @fopen($file, 'a+'); if (empty($cacheFile)) { // exception without logging throw new ShopgateLibraryExce...
php
protected function loadKeywordsFromFile($file) { $defaultReturn = array( 'timestamp' => 0, 'keywords' => array(), ); $cacheFile = @fopen($file, 'a+'); if (empty($cacheFile)) { // exception without logging throw new ShopgateLibraryExce...
[ "protected", "function", "loadKeywordsFromFile", "(", "$", "file", ")", "{", "$", "defaultReturn", "=", "array", "(", "'timestamp'", "=>", "0", ",", "'keywords'", "=>", "array", "(", ")", ",", ")", ";", "$", "cacheFile", "=", "@", "fopen", "(", "$", "f...
Reads redirect keywords from file. @param string $file The file to read the keywords from. @return array<'timestamp' => int, 'keywords' => string[]) An array with the 'timestamp' of the last update and the list of 'keywords'. @throws ShopgateLibraryException in case the file cannot be opened.
[ "Reads", "redirect", "keywords", "from", "file", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/redirect.php#L722-L747
235,052
shopgate/cart-integration-sdk
src/redirect.php
ShopgateMobileRedirect.processQueryString
protected function processQueryString($url) { $queryDataKeys = array_intersect($this->config->getRedirectableGetParams(), array_keys($_GET)); $queryData = array_intersect_key($_GET, array_flip($queryDataKeys)); $connector = preg_match('/\?/', $url) ? "&" : "?"; ...
php
protected function processQueryString($url) { $queryDataKeys = array_intersect($this->config->getRedirectableGetParams(), array_keys($_GET)); $queryData = array_intersect_key($_GET, array_flip($queryDataKeys)); $connector = preg_match('/\?/', $url) ? "&" : "?"; ...
[ "protected", "function", "processQueryString", "(", "$", "url", ")", "{", "$", "queryDataKeys", "=", "array_intersect", "(", "$", "this", "->", "config", "->", "getRedirectableGetParams", "(", ")", ",", "array_keys", "(", "$", "_GET", ")", ")", ";", "$", "...
Passes allowed get params to the url as querystring @param string $url @return string $url
[ "Passes", "allowed", "get", "params", "to", "the", "url", "as", "querystring" ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/redirect.php#L766-L778
235,053
NicolasMahe/Laravel-SlackOutput
src/Command/SlackPost.php
SlackPost.initClient
protected function initClient() { //get slack config $slack_config = config('slack-output'); if (empty( $slack_config["endpoint"] )) { throw new Exception("The endpoint url is not set in the config"); } //init client $this->client = new Client($slack_con...
php
protected function initClient() { //get slack config $slack_config = config('slack-output'); if (empty( $slack_config["endpoint"] )) { throw new Exception("The endpoint url is not set in the config"); } //init client $this->client = new Client($slack_con...
[ "protected", "function", "initClient", "(", ")", "{", "//get slack config", "$", "slack_config", "=", "config", "(", "'slack-output'", ")", ";", "if", "(", "empty", "(", "$", "slack_config", "[", "\"endpoint\"", "]", ")", ")", "{", "throw", "new", "Exception...
Init the slack client @return Client @throws Exception
[ "Init", "the", "slack", "client" ]
fc3722ba64a0ce4d833555bb1a27513e13959b34
https://github.com/NicolasMahe/Laravel-SlackOutput/blob/fc3722ba64a0ce4d833555bb1a27513e13959b34/src/Command/SlackPost.php#L74-L88
235,054
NicolasMahe/Laravel-SlackOutput
src/Command/SlackPost.php
SlackPost.addAttachment
protected function addAttachment($attach) { if (is_array($attach)) { if ($this->is_assoc($attach)) { $attach = [ $attach ]; } foreach ($attach as $attachElement) { $this->client = $this->client->attach($attachElement); } ...
php
protected function addAttachment($attach) { if (is_array($attach)) { if ($this->is_assoc($attach)) { $attach = [ $attach ]; } foreach ($attach as $attachElement) { $this->client = $this->client->attach($attachElement); } ...
[ "protected", "function", "addAttachment", "(", "$", "attach", ")", "{", "if", "(", "is_array", "(", "$", "attach", ")", ")", "{", "if", "(", "$", "this", "->", "is_assoc", "(", "$", "attach", ")", ")", "{", "$", "attach", "=", "[", "$", "attach", ...
Add the attachments @param $attach
[ "Add", "the", "attachments" ]
fc3722ba64a0ce4d833555bb1a27513e13959b34
https://github.com/NicolasMahe/Laravel-SlackOutput/blob/fc3722ba64a0ce4d833555bb1a27513e13959b34/src/Command/SlackPost.php#L96-L107
235,055
NicolasMahe/Laravel-SlackOutput
src/Command/SlackPost.php
SlackPost.addTo
protected function addTo($to) { if ( ! empty( $to )) { $this->client = $this->client->to($to); } }
php
protected function addTo($to) { if ( ! empty( $to )) { $this->client = $this->client->to($to); } }
[ "protected", "function", "addTo", "(", "$", "to", ")", "{", "if", "(", "!", "empty", "(", "$", "to", ")", ")", "{", "$", "this", "->", "client", "=", "$", "this", "->", "client", "->", "to", "(", "$", "to", ")", ";", "}", "}" ]
Add the receiver @param $to
[ "Add", "the", "receiver" ]
fc3722ba64a0ce4d833555bb1a27513e13959b34
https://github.com/NicolasMahe/Laravel-SlackOutput/blob/fc3722ba64a0ce4d833555bb1a27513e13959b34/src/Command/SlackPost.php#L115-L120
235,056
ondrs/upload-manager
src/ondrs/UploadManager/Storages/S3Storage.php
S3Storage.buildPattern
private static function buildPattern($masks) { $pattern = array(); $masks = is_array($masks) ? $masks : [$masks]; foreach ($masks as $mask) { $mask = rtrim(strtr($mask, '\\', '/'), '/'); $prefix = ''; if ($mask === '') { continue; ...
php
private static function buildPattern($masks) { $pattern = array(); $masks = is_array($masks) ? $masks : [$masks]; foreach ($masks as $mask) { $mask = rtrim(strtr($mask, '\\', '/'), '/'); $prefix = ''; if ($mask === '') { continue; ...
[ "private", "static", "function", "buildPattern", "(", "$", "masks", ")", "{", "$", "pattern", "=", "array", "(", ")", ";", "$", "masks", "=", "is_array", "(", "$", "masks", ")", "?", "$", "masks", ":", "[", "$", "masks", "]", ";", "foreach", "(", ...
Converts Finder pattern to regular expression. @param array @return string
[ "Converts", "Finder", "pattern", "to", "regular", "expression", "." ]
81538fe956b4f173fd9b1d0d371c2f1563b1ea99
https://github.com/ondrs/upload-manager/blob/81538fe956b4f173fd9b1d0d371c2f1563b1ea99/src/ondrs/UploadManager/Storages/S3Storage.php#L150-L172
235,057
makinacorpus/drupal-ucms
ucms_site/src/Twig/Extension/SiteExtension.php
SiteExtension.renderState
public function renderState($state) { $list = SiteState::getList(); if (isset($list[$state])) { return $this->t($list[$state]); } return $this->t("Unknown"); }
php
public function renderState($state) { $list = SiteState::getList(); if (isset($list[$state])) { return $this->t($list[$state]); } return $this->t("Unknown"); }
[ "public", "function", "renderState", "(", "$", "state", ")", "{", "$", "list", "=", "SiteState", "::", "getList", "(", ")", ";", "if", "(", "isset", "(", "$", "list", "[", "$", "state", "]", ")", ")", "{", "return", "$", "this", "->", "t", "(", ...
Render state human readable label @param int $state @return string
[ "Render", "state", "human", "readable", "label" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_site/src/Twig/Extension/SiteExtension.php#L58-L67
235,058
makinacorpus/drupal-ucms
ucms_site/src/Twig/Extension/SiteExtension.php
SiteExtension.renderSiteUrl
public function renderSiteUrl($site, $path = null, array $options = [], $ignoreSso = false, $dropDestination = true) { return $this->siteManager->getUrlGenerator()->generateUrl($site, $path, $options, $ignoreSso, $dropDestination); }
php
public function renderSiteUrl($site, $path = null, array $options = [], $ignoreSso = false, $dropDestination = true) { return $this->siteManager->getUrlGenerator()->generateUrl($site, $path, $options, $ignoreSso, $dropDestination); }
[ "public", "function", "renderSiteUrl", "(", "$", "site", ",", "$", "path", "=", "null", ",", "array", "$", "options", "=", "[", "]", ",", "$", "ignoreSso", "=", "false", ",", "$", "dropDestination", "=", "true", ")", "{", "return", "$", "this", "->",...
Render site link @param int|Site $site Site identifier, if site is null @param string $path Drupal path to hit in site @param mixed[] $options Link options, see url() @return string
[ "Render", "site", "link" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_site/src/Twig/Extension/SiteExtension.php#L105-L108
235,059
shopgate/cart-integration-sdk
src/models/catalog/Relation.php
Shopgate_Model_Catalog_Relation.addValue
public function addValue($value) { $values = $this->getValues(); array_push($values, $value); $this->setValues($values); }
php
public function addValue($value) { $values = $this->getValues(); array_push($values, $value); $this->setValues($values); }
[ "public", "function", "addValue", "(", "$", "value", ")", "{", "$", "values", "=", "$", "this", "->", "getValues", "(", ")", ";", "array_push", "(", "$", "values", ",", "$", "value", ")", ";", "$", "this", "->", "setValues", "(", "$", "values", ")"...
add new value @param int $value
[ "add", "new", "value" ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/models/catalog/Relation.php#L90-L95
235,060
aimeos/ai-admin-extadm
controller/extjs/src/Controller/ExtJS/Factory.php
Factory.clear
static public function clear( $id = null, $path = null ) { if( $id !== null ) { if( $path !== null ) { self::$controllers[$id][$path] = null; } else { self::$controllers[$id] = []; } return; } self::$controllers = []; }
php
static public function clear( $id = null, $path = null ) { if( $id !== null ) { if( $path !== null ) { self::$controllers[$id][$path] = null; } else { self::$controllers[$id] = []; } return; } self::$controllers = []; }
[ "static", "public", "function", "clear", "(", "$", "id", "=", "null", ",", "$", "path", "=", "null", ")", "{", "if", "(", "$", "id", "!==", "null", ")", "{", "if", "(", "$", "path", "!==", "null", ")", "{", "self", "::", "$", "controllers", "["...
Removes the controller objects from the cache. If neither a context ID nor a path is given, the complete cache will be pruned. @param integer $id Context ID the objects have been created with (string of \Aimeos\MShop\Context\Item\Iface) @param string $path Path describing the controller to clear, e.g. "product/lists/...
[ "Removes", "the", "controller", "objects", "from", "the", "cache", "." ]
594ee7cec90fd63a4773c05c93f353e66d9b3408
https://github.com/aimeos/ai-admin-extadm/blob/594ee7cec90fd63a4773c05c93f353e66d9b3408/controller/extjs/src/Controller/ExtJS/Factory.php#L35-L49
235,061
runcmf/runbb
src/RunBB/Core/Hooks.php
Hooks.fireDB
public function fireDB($name) { $args = func_get_args(); array_shift($args); if (!isset($this->hooks[$name])) { //$this->hooks[$name] = array(array()); return $args[0]; } if (!empty($this->hooks[$name])) { // Sort by priority, low to high,...
php
public function fireDB($name) { $args = func_get_args(); array_shift($args); if (!isset($this->hooks[$name])) { //$this->hooks[$name] = array(array()); return $args[0]; } if (!empty($this->hooks[$name])) { // Sort by priority, low to high,...
[ "public", "function", "fireDB", "(", "$", "name", ")", "{", "$", "args", "=", "func_get_args", "(", ")", ";", "array_shift", "(", "$", "args", ")", ";", "if", "(", "!", "isset", "(", "$", "this", "->", "hooks", "[", "$", "name", "]", ")", ")", ...
Invoke hook for DB @param string $name The hook name @param mixed ... Argument(s) for hooked functions, can specify multiple arguments @return mixed
[ "Invoke", "hook", "for", "DB" ]
d4f4098bcece48b78ea2d1ae5eeead7ac9a8b463
https://github.com/runcmf/runbb/blob/d4f4098bcece48b78ea2d1ae5eeead7ac9a8b463/src/RunBB/Core/Hooks.php#L110-L137
235,062
aimeos/ai-admin-extadm
controller/extjs/src/Controller/ExtJS/Locale/Site/Standard.php
Standard.saveItems
public function saveItems( \stdClass $params ) { $this->checkParams( $params, array( 'items' ) ); $ids = []; $manager = $this->getManager(); $items = ( !is_array( $params->items ) ? array( $params->items ) : $params->items ); foreach( $items as $entry ) { $item = $manager->createItem(); $item->from...
php
public function saveItems( \stdClass $params ) { $this->checkParams( $params, array( 'items' ) ); $ids = []; $manager = $this->getManager(); $items = ( !is_array( $params->items ) ? array( $params->items ) : $params->items ); foreach( $items as $entry ) { $item = $manager->createItem(); $item->from...
[ "public", "function", "saveItems", "(", "\\", "stdClass", "$", "params", ")", "{", "$", "this", "->", "checkParams", "(", "$", "params", ",", "array", "(", "'items'", ")", ")", ";", "$", "ids", "=", "[", "]", ";", "$", "manager", "=", "$", "this", ...
Creates a new site item or updates an existing one or a list thereof. @param \stdClass $params Associative array containing the product properties
[ "Creates", "a", "new", "site", "item", "or", "updates", "an", "existing", "one", "or", "a", "list", "thereof", "." ]
594ee7cec90fd63a4773c05c93f353e66d9b3408
https://github.com/aimeos/ai-admin-extadm/blob/594ee7cec90fd63a4773c05c93f353e66d9b3408/controller/extjs/src/Controller/ExtJS/Locale/Site/Standard.php#L63-L80
235,063
platformsh/console-form
src/Field/OptionsField.php
OptionsField.isNumeric
private function isNumeric() { foreach (array_keys($this->options) as $key) { if (!is_int($key)) { return false; } } return true; }
php
private function isNumeric() { foreach (array_keys($this->options) as $key) { if (!is_int($key)) { return false; } } return true; }
[ "private", "function", "isNumeric", "(", ")", "{", "foreach", "(", "array_keys", "(", "$", "this", "->", "options", ")", "as", "$", "key", ")", "{", "if", "(", "!", "is_int", "(", "$", "key", ")", ")", "{", "return", "false", ";", "}", "}", "retu...
Check if this is numeric, rather than associative. @return bool
[ "Check", "if", "this", "is", "numeric", "rather", "than", "associative", "." ]
5263fe8c6c976e10f4495c9e00c92cc2d410a673
https://github.com/platformsh/console-form/blob/5263fe8c6c976e10f4495c9e00c92cc2d410a673/src/Field/OptionsField.php#L145-L154
235,064
shopgate/cart-integration-sdk
src/helper/logging/strategy/DefaultLogging.php
Shopgate_Helper_Logging_Strategy_DefaultLogging.setLogFilePaths
public function setLogFilePaths($accessLogPath, $requestLogPath, $errorLogPath, $debugLogPath) { if (!empty($accessLogPath)) { $this->logFiles[self::LOGTYPE_ACCESS]['path'] = $accessLogPath; } if (!empty($requestLogPath)) { $this->logFiles[self::LOGTYPE_REQUEST]['pat...
php
public function setLogFilePaths($accessLogPath, $requestLogPath, $errorLogPath, $debugLogPath) { if (!empty($accessLogPath)) { $this->logFiles[self::LOGTYPE_ACCESS]['path'] = $accessLogPath; } if (!empty($requestLogPath)) { $this->logFiles[self::LOGTYPE_REQUEST]['pat...
[ "public", "function", "setLogFilePaths", "(", "$", "accessLogPath", ",", "$", "requestLogPath", ",", "$", "errorLogPath", ",", "$", "debugLogPath", ")", "{", "if", "(", "!", "empty", "(", "$", "accessLogPath", ")", ")", "{", "$", "this", "->", "logFiles", ...
Sets the paths to the log files. @param string $accessLogPath @param string $requestLogPath @param string $errorLogPath @param string $debugLogPath
[ "Sets", "the", "paths", "to", "the", "log", "files", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/helper/logging/strategy/DefaultLogging.php#L196-L213
235,065
shopgate/cart-integration-sdk
src/helper/logging/strategy/DefaultLogging.php
Shopgate_Helper_Logging_Strategy_DefaultLogging.openLogFileHandle
protected function openLogFileHandle($type) { // don't open file handle if already open if (!empty($this->logFiles[$type]['handle'])) { return true; } // set the file handle $this->logFiles[$type]['handle'] = @fopen($this->logFiles[$type]['path'], $this->logFiles...
php
protected function openLogFileHandle($type) { // don't open file handle if already open if (!empty($this->logFiles[$type]['handle'])) { return true; } // set the file handle $this->logFiles[$type]['handle'] = @fopen($this->logFiles[$type]['path'], $this->logFiles...
[ "protected", "function", "openLogFileHandle", "(", "$", "type", ")", "{", "// don't open file handle if already open", "if", "(", "!", "empty", "(", "$", "this", "->", "logFiles", "[", "$", "type", "]", "[", "'handle'", "]", ")", ")", "{", "return", "true", ...
Opens log file handles for the requested log type if necessary. Already opened file handles will not be opened again. @param string $type The log type, that would be one of the self::LOGTYPE_* constants. @return bool true if opening succeeds or the handle is already open; false on error.
[ "Opens", "log", "file", "handles", "for", "the", "requested", "log", "type", "if", "necessary", "." ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/helper/logging/strategy/DefaultLogging.php#L224-L241
235,066
runcmf/runbb
src/RunBB/Middleware/Csrf.php
Csrf.generateNewToken
public function generateNewToken(ServerRequestInterface $request) { $pair = $this->generateToken(); $request = $request->withAttribute($this->prefix . '_name', $pair[$this->prefix . '_name']) ->withAttribute($this->prefix . '_value', $pair[$this->prefix . '_value']); View::set...
php
public function generateNewToken(ServerRequestInterface $request) { $pair = $this->generateToken(); $request = $request->withAttribute($this->prefix . '_name', $pair[$this->prefix . '_name']) ->withAttribute($this->prefix . '_value', $pair[$this->prefix . '_value']); View::set...
[ "public", "function", "generateNewToken", "(", "ServerRequestInterface", "$", "request", ")", "{", "$", "pair", "=", "$", "this", "->", "generateToken", "(", ")", ";", "$", "request", "=", "$", "request", "->", "withAttribute", "(", "$", "this", "->", "pre...
Generates a new CSRF token and attaches it to the Request Object @param ServerRequestInterface $request PSR7 response object. @return ServerRequestInterface PSR7 response object.
[ "Generates", "a", "new", "CSRF", "token", "and", "attaches", "it", "to", "the", "Request", "Object" ]
d4f4098bcece48b78ea2d1ae5eeead7ac9a8b463
https://github.com/runcmf/runbb/blob/d4f4098bcece48b78ea2d1ae5eeead7ac9a8b463/src/RunBB/Middleware/Csrf.php#L191-L205
235,067
layerhq/layer-identity-token-php
src/Layer/LayerIdentityTokenProvider.php
LayerIdentityTokenProvider._checkLayerConfig
private function _checkLayerConfig() { $errorString = array(); if ($this->_providerID == '') { array_push($errorString, 'LAYER_PROVIDER_ID'); } if ($this->_keyID == '') { array_push($errorString, 'LAYER_PRIVATE_KEY_ID'); } if ($this->_private...
php
private function _checkLayerConfig() { $errorString = array(); if ($this->_providerID == '') { array_push($errorString, 'LAYER_PROVIDER_ID'); } if ($this->_keyID == '') { array_push($errorString, 'LAYER_PRIVATE_KEY_ID'); } if ($this->_private...
[ "private", "function", "_checkLayerConfig", "(", ")", "{", "$", "errorString", "=", "array", "(", ")", ";", "if", "(", "$", "this", "->", "_providerID", "==", "''", ")", "{", "array_push", "(", "$", "errorString", ",", "'LAYER_PROVIDER_ID'", ")", ";", "}...
Checks if all the proper config has been prvided.
[ "Checks", "if", "all", "the", "proper", "config", "has", "been", "prvided", "." ]
0bad3f751f1c9a7b6582f902fcd425281f5501ae
https://github.com/layerhq/layer-identity-token-php/blob/0bad3f751f1c9a7b6582f902fcd425281f5501ae/src/Layer/LayerIdentityTokenProvider.php#L78-L97
235,068
makinacorpus/drupal-ucms
ucms_contrib/src/NodeAccess/NodeAccessEventSubscriber.php
NodeAccessEventSubscriber.onNodeAccess
public function onNodeAccess(NodeAccessEvent $event) { $node = $event->getNode(); $account = $event->getAccount(); $op = $event->getOperation(); $access = $this->siteManager->getAccess(); if ('create' === $op) { // Drupal gave a wrong input, this ma...
php
public function onNodeAccess(NodeAccessEvent $event) { $node = $event->getNode(); $account = $event->getAccount(); $op = $event->getOperation(); $access = $this->siteManager->getAccess(); if ('create' === $op) { // Drupal gave a wrong input, this ma...
[ "public", "function", "onNodeAccess", "(", "NodeAccessEvent", "$", "event", ")", "{", "$", "node", "=", "$", "event", "->", "getNode", "(", ")", ";", "$", "account", "=", "$", "event", "->", "getAccount", "(", ")", ";", "$", "op", "=", "$", "event", ...
Checks node access for content creation
[ "Checks", "node", "access", "for", "content", "creation" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_contrib/src/NodeAccess/NodeAccessEventSubscriber.php#L54-L108
235,069
makinacorpus/drupal-ucms
ucms_search/src/Lucene/RangeQuery.php
RangeQuery.setRange
public function setRange($start, $stop) { $this->start = $start; $this->stop = $stop; return $this; }
php
public function setRange($start, $stop) { $this->start = $start; $this->stop = $stop; return $this; }
[ "public", "function", "setRange", "(", "$", "start", ",", "$", "stop", ")", "{", "$", "this", "->", "start", "=", "$", "start", ";", "$", "this", "->", "stop", "=", "$", "stop", ";", "return", "$", "this", ";", "}" ]
Construct a range statement If you build the object with both $start and $stop set to NULL, this statement won't been built at all in the final query. We can, but we won't send [* TO *] useless range. @param null|mixed $start @param null|mixed $stop @return RangeQuery
[ "Construct", "a", "range", "statement" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_search/src/Lucene/RangeQuery.php#L53-L59
235,070
makinacorpus/drupal-ucms
ucms_search/src/Lucene/RangeQuery.php
RangeQuery.escapeElement
protected function escapeElement($value) { if (empty($value)) { $element = '*'; } else { $element = $this->renderElement($value); } return self::escapeToken($element); }
php
protected function escapeElement($value) { if (empty($value)) { $element = '*'; } else { $element = $this->renderElement($value); } return self::escapeToken($element); }
[ "protected", "function", "escapeElement", "(", "$", "value", ")", "{", "if", "(", "empty", "(", "$", "value", ")", ")", "{", "$", "element", "=", "'*'", ";", "}", "else", "{", "$", "element", "=", "$", "this", "->", "renderElement", "(", "$", "valu...
Render range element Overriding classes must implement this function in order to escape values Replace the element by '*' wildcard if empty @param string $value @return string
[ "Render", "range", "element" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_search/src/Lucene/RangeQuery.php#L86-L95
235,071
h4cc/StackLogger
src/Logger/ContainerBuilder.php
ContainerBuilder.process
public function process(Pimple $container, array $options) { $container['logger'] = $container->share( function () { return new NullLogger(); } ); $container['log_level'] = LogLevel::INFO; $container['log_sub_request'] = false; foreach ($o...
php
public function process(Pimple $container, array $options) { $container['logger'] = $container->share( function () { return new NullLogger(); } ); $container['log_level'] = LogLevel::INFO; $container['log_sub_request'] = false; foreach ($o...
[ "public", "function", "process", "(", "Pimple", "$", "container", ",", "array", "$", "options", ")", "{", "$", "container", "[", "'logger'", "]", "=", "$", "container", "->", "share", "(", "function", "(", ")", "{", "return", "new", "NullLogger", "(", ...
Adds services and parameters to given container. ALso applies given options. @param Pimple $container @param array $options @return Pimple
[ "Adds", "services", "and", "parameters", "to", "given", "container", ".", "ALso", "applies", "given", "options", "." ]
1bdbb3e7d157aa9069ace90267c249f43dc02b77
https://github.com/h4cc/StackLogger/blob/1bdbb3e7d157aa9069ace90267c249f43dc02b77/src/Logger/ContainerBuilder.php#L30-L47
235,072
umpirsky/list-generator
src/Umpirsky/ListGenerator/Exporter/HtmlExporter.php
HtmlExporter.exportHtml
protected function exportHtml(\DOMElement $element) { $body = $this->getDocument()->createElement('body'); $body->appendChild($element); $html = $this->getDocument()->getElementsByTagName('html')->item(0); $html->appendChild($this->getHead()); $html->appendChild($body); ...
php
protected function exportHtml(\DOMElement $element) { $body = $this->getDocument()->createElement('body'); $body->appendChild($element); $html = $this->getDocument()->getElementsByTagName('html')->item(0); $html->appendChild($this->getHead()); $html->appendChild($body); ...
[ "protected", "function", "exportHtml", "(", "\\", "DOMElement", "$", "element", ")", "{", "$", "body", "=", "$", "this", "->", "getDocument", "(", ")", "->", "createElement", "(", "'body'", ")", ";", "$", "body", "->", "appendChild", "(", "$", "element",...
Wraps DOM element to document and exports it as HTML string. @param \DOMElement $element @return string
[ "Wraps", "DOM", "element", "to", "document", "and", "exports", "it", "as", "HTML", "string", "." ]
103182faf6e48611901263a49e7a9ba33e7515b8
https://github.com/umpirsky/list-generator/blob/103182faf6e48611901263a49e7a9ba33e7515b8/src/Umpirsky/ListGenerator/Exporter/HtmlExporter.php#L25-L37
235,073
umpirsky/list-generator
src/Umpirsky/ListGenerator/Exporter/HtmlExporter.php
HtmlExporter.getDocument
protected function getDocument() { if (null === $this->document) { $this->document = \DOMImplementation::createDocument( 'http://www.w3.org/1999/xhtml', 'html', \DOMImplementation::createDocumentType( 'html', ...
php
protected function getDocument() { if (null === $this->document) { $this->document = \DOMImplementation::createDocument( 'http://www.w3.org/1999/xhtml', 'html', \DOMImplementation::createDocumentType( 'html', ...
[ "protected", "function", "getDocument", "(", ")", "{", "if", "(", "null", "===", "$", "this", "->", "document", ")", "{", "$", "this", "->", "document", "=", "\\", "DOMImplementation", "::", "createDocument", "(", "'http://www.w3.org/1999/xhtml'", ",", "'html'...
Creates HTML document. @return \DOMDocument
[ "Creates", "HTML", "document", "." ]
103182faf6e48611901263a49e7a9ba33e7515b8
https://github.com/umpirsky/list-generator/blob/103182faf6e48611901263a49e7a9ba33e7515b8/src/Umpirsky/ListGenerator/Exporter/HtmlExporter.php#L44-L59
235,074
umpirsky/list-generator
src/Umpirsky/ListGenerator/Exporter/HtmlExporter.php
HtmlExporter.getHead
protected function getHead() { $head = $this->getDocument()->createElement('head'); $metahttp = $this->getDocument()->createElement('meta'); $metahttp->setAttribute('http-equiv', 'Content-Type'); $metahttp->setAttribute('content', 'text/html; charset=utf-8'); $head->appendChi...
php
protected function getHead() { $head = $this->getDocument()->createElement('head'); $metahttp = $this->getDocument()->createElement('meta'); $metahttp->setAttribute('http-equiv', 'Content-Type'); $metahttp->setAttribute('content', 'text/html; charset=utf-8'); $head->appendChi...
[ "protected", "function", "getHead", "(", ")", "{", "$", "head", "=", "$", "this", "->", "getDocument", "(", ")", "->", "createElement", "(", "'head'", ")", ";", "$", "metahttp", "=", "$", "this", "->", "getDocument", "(", ")", "->", "createElement", "(...
Creates HTML head. @return \DOMElement
[ "Creates", "HTML", "head", "." ]
103182faf6e48611901263a49e7a9ba33e7515b8
https://github.com/umpirsky/list-generator/blob/103182faf6e48611901263a49e7a9ba33e7515b8/src/Umpirsky/ListGenerator/Exporter/HtmlExporter.php#L95-L113
235,075
makinacorpus/drupal-ucms
ucms_tree/src/EventDispatcher/SiteEventSubscriber.php
SiteEventSubscriber.onSiteClone
public function onSiteClone(SiteCloneEvent $event) { $source = $event->getTemplateSite(); $target = $event->getSite(); $this->ensureSiteMenus($source); $this->ensureSiteMenus($target); if ($this->treeManager && $this->allowedMenus) { foreach (array_keys($this->a...
php
public function onSiteClone(SiteCloneEvent $event) { $source = $event->getTemplateSite(); $target = $event->getSite(); $this->ensureSiteMenus($source); $this->ensureSiteMenus($target); if ($this->treeManager && $this->allowedMenus) { foreach (array_keys($this->a...
[ "public", "function", "onSiteClone", "(", "SiteCloneEvent", "$", "event", ")", "{", "$", "source", "=", "$", "event", "->", "getTemplateSite", "(", ")", ";", "$", "target", "=", "$", "event", "->", "getSite", "(", ")", ";", "$", "this", "->", "ensureSi...
On site cloning. @param SiteCloneEvent $event
[ "On", "site", "cloning", "." ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_tree/src/EventDispatcher/SiteEventSubscriber.php#L115-L132
235,076
makinacorpus/drupal-ucms
ucms_tree/src/EventDispatcher/SiteEventSubscriber.php
SiteEventSubscriber.ensureSiteMenus
private function ensureSiteMenus(Site $site) { $ret = []; if ($this->treeManager && $this->allowedMenus) { $storage = $this->treeManager->getMenuStorage(); foreach ($this->allowedMenus as $prefix => $title) { $name = $prefix.'-'.$site->getId(); ...
php
private function ensureSiteMenus(Site $site) { $ret = []; if ($this->treeManager && $this->allowedMenus) { $storage = $this->treeManager->getMenuStorage(); foreach ($this->allowedMenus as $prefix => $title) { $name = $prefix.'-'.$site->getId(); ...
[ "private", "function", "ensureSiteMenus", "(", "Site", "$", "site", ")", "{", "$", "ret", "=", "[", "]", ";", "if", "(", "$", "this", "->", "treeManager", "&&", "$", "this", "->", "allowedMenus", ")", "{", "$", "storage", "=", "$", "this", "->", "t...
Create missing menus for site @param Site $site @return string[][] Newly created menus
[ "Create", "missing", "menus", "for", "site" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_tree/src/EventDispatcher/SiteEventSubscriber.php#L142-L160
235,077
accompli/accompli
src/Deployment/Connection/ConnectionManager.php
ConnectionManager.onCreateConnection
public function onCreateConnection(HostEvent $event) { $connectionAdapter = $this->getConnectionAdapter($event->getHost()); if ($connectionAdapter instanceof ConnectionAdapterInterface) { $event->getHost()->setConnection($connectionAdapter); } }
php
public function onCreateConnection(HostEvent $event) { $connectionAdapter = $this->getConnectionAdapter($event->getHost()); if ($connectionAdapter instanceof ConnectionAdapterInterface) { $event->getHost()->setConnection($connectionAdapter); } }
[ "public", "function", "onCreateConnection", "(", "HostEvent", "$", "event", ")", "{", "$", "connectionAdapter", "=", "$", "this", "->", "getConnectionAdapter", "(", "$", "event", "->", "getHost", "(", ")", ")", ";", "if", "(", "$", "connectionAdapter", "inst...
Sets a connection adapter on a Host when an 'accompli.create_connection' event is dispatched. @param HostEvent $event
[ "Sets", "a", "connection", "adapter", "on", "a", "Host", "when", "an", "accompli", ".", "create_connection", "event", "is", "dispatched", "." ]
618f28377448d8caa90d63bfa5865a3ee15e49e7
https://github.com/accompli/accompli/blob/618f28377448d8caa90d63bfa5865a3ee15e49e7/src/Deployment/Connection/ConnectionManager.php#L64-L70
235,078
accompli/accompli
src/EventDispatcher/Subscriber/GenerateReportSubscriber.php
GenerateReportSubscriber.onInstallCommandCompletedOutputReport
public function onInstallCommandCompletedOutputReport() { $report = new InstallReport($this->eventDataCollector, $this->dataCollectors); $report->generate($this->logger); }
php
public function onInstallCommandCompletedOutputReport() { $report = new InstallReport($this->eventDataCollector, $this->dataCollectors); $report->generate($this->logger); }
[ "public", "function", "onInstallCommandCompletedOutputReport", "(", ")", "{", "$", "report", "=", "new", "InstallReport", "(", "$", "this", "->", "eventDataCollector", ",", "$", "this", "->", "dataCollectors", ")", ";", "$", "report", "->", "generate", "(", "$...
Generates an installation report.
[ "Generates", "an", "installation", "report", "." ]
618f28377448d8caa90d63bfa5865a3ee15e49e7
https://github.com/accompli/accompli/blob/618f28377448d8caa90d63bfa5865a3ee15e49e7/src/EventDispatcher/Subscriber/GenerateReportSubscriber.php#L73-L77
235,079
accompli/accompli
src/EventDispatcher/Subscriber/GenerateReportSubscriber.php
GenerateReportSubscriber.onDeployCommandCompletedOutputReport
public function onDeployCommandCompletedOutputReport() { $report = new DeployReport($this->eventDataCollector, $this->dataCollectors); $report->generate($this->logger); }
php
public function onDeployCommandCompletedOutputReport() { $report = new DeployReport($this->eventDataCollector, $this->dataCollectors); $report->generate($this->logger); }
[ "public", "function", "onDeployCommandCompletedOutputReport", "(", ")", "{", "$", "report", "=", "new", "DeployReport", "(", "$", "this", "->", "eventDataCollector", ",", "$", "this", "->", "dataCollectors", ")", ";", "$", "report", "->", "generate", "(", "$",...
Generates a deployment report.
[ "Generates", "a", "deployment", "report", "." ]
618f28377448d8caa90d63bfa5865a3ee15e49e7
https://github.com/accompli/accompli/blob/618f28377448d8caa90d63bfa5865a3ee15e49e7/src/EventDispatcher/Subscriber/GenerateReportSubscriber.php#L82-L86
235,080
shopgate/cart-integration-sdk
src/models/catalog/Price.php
Shopgate_Model_Catalog_Price.addTierPriceGroup
public function addTierPriceGroup(Shopgate_Model_Catalog_TierPrice $tierPrice) { $tierPrices = $this->getTierPricesGroup(); array_push($tierPrices, $tierPrice); $this->setTierPricesGroup($tierPrices); }
php
public function addTierPriceGroup(Shopgate_Model_Catalog_TierPrice $tierPrice) { $tierPrices = $this->getTierPricesGroup(); array_push($tierPrices, $tierPrice); $this->setTierPricesGroup($tierPrices); }
[ "public", "function", "addTierPriceGroup", "(", "Shopgate_Model_Catalog_TierPrice", "$", "tierPrice", ")", "{", "$", "tierPrices", "=", "$", "this", "->", "getTierPricesGroup", "(", ")", ";", "array_push", "(", "$", "tierPrices", ",", "$", "tierPrice", ")", ";",...
add tier price @param Shopgate_Model_Catalog_TierPrice $tierPrice
[ "add", "tier", "price" ]
cf12ecf8bdb8f4c407209000002fd00261e53b06
https://github.com/shopgate/cart-integration-sdk/blob/cf12ecf8bdb8f4c407209000002fd00261e53b06/src/models/catalog/Price.php#L121-L126
235,081
makinacorpus/drupal-ucms
ucms_user/src/EventDispatcher/UserEventSubscriber.php
UserEventSubscriber.onSiteWebmasterCreate
public function onSiteWebmasterCreate(SiteEvent $event) { /* @var UserInterface $user */ $user = $this->entityManager->getStorage('user')->load($event->getArgument('webmaster_id')); if ($user->status == 0) { $this->tokenManager->sendTokenMail($user, 'ucms_user', 'new-account-dis...
php
public function onSiteWebmasterCreate(SiteEvent $event) { /* @var UserInterface $user */ $user = $this->entityManager->getStorage('user')->load($event->getArgument('webmaster_id')); if ($user->status == 0) { $this->tokenManager->sendTokenMail($user, 'ucms_user', 'new-account-dis...
[ "public", "function", "onSiteWebmasterCreate", "(", "SiteEvent", "$", "event", ")", "{", "/* @var UserInterface $user */", "$", "user", "=", "$", "this", "->", "entityManager", "->", "getStorage", "(", "'user'", ")", "->", "load", "(", "$", "event", "->", "get...
Act on webmaster or contributor creation. @param SiteEvent $event
[ "Act", "on", "webmaster", "or", "contributor", "creation", "." ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_user/src/EventDispatcher/UserEventSubscriber.php#L54-L64
235,082
makinacorpus/drupal-ucms
ucms_site/src/GroupManager.php
GroupManager.loadGroupsFrom
public function loadGroupsFrom(array $items = [], $withAccess = false) { $idList = []; foreach ($items as $item) { if (is_numeric($item)) { $groupId = (int)$item; } else if ($item instanceof GroupMember) { $groupId = $item->getGroupId(); ...
php
public function loadGroupsFrom(array $items = [], $withAccess = false) { $idList = []; foreach ($items as $item) { if (is_numeric($item)) { $groupId = (int)$item; } else if ($item instanceof GroupMember) { $groupId = $item->getGroupId(); ...
[ "public", "function", "loadGroupsFrom", "(", "array", "$", "items", "=", "[", "]", ",", "$", "withAccess", "=", "false", ")", "{", "$", "idList", "=", "[", "]", ";", "foreach", "(", "$", "items", "as", "$", "item", ")", "{", "if", "(", "is_numeric"...
Load groups from @param int[]|GroupSite|GroupMember[] $items @param bool $withAccess @return Group[]
[ "Load", "groups", "from" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_site/src/GroupManager.php#L50-L73
235,083
makinacorpus/drupal-ucms
ucms_site/src/GroupManager.php
GroupManager.findOne
public function findOne($id) { $group = $this ->database ->query( "SELECT * FROM {ucms_group} WHERE id = :id LIMIT 1 OFFSET 0", [':id' => $id] ) ->fetchObject(Group::class) ; if (!$group) { throw new...
php
public function findOne($id) { $group = $this ->database ->query( "SELECT * FROM {ucms_group} WHERE id = :id LIMIT 1 OFFSET 0", [':id' => $id] ) ->fetchObject(Group::class) ; if (!$group) { throw new...
[ "public", "function", "findOne", "(", "$", "id", ")", "{", "$", "group", "=", "$", "this", "->", "database", "->", "query", "(", "\"SELECT * FROM {ucms_group} WHERE id = :id LIMIT 1 OFFSET 0\"", ",", "[", "':id'", "=>", "$", "id", "]", ")", "->", "fetchObject"...
Load group by identifier @param int $id @return Group @throws \InvalidArgumentException
[ "Load", "group", "by", "identifier" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_site/src/GroupManager.php#L84-L100
235,084
makinacorpus/drupal-ucms
ucms_site/src/GroupManager.php
GroupManager.loadAll
public function loadAll($idList = [], $withAccess = true) { $ret = []; if (empty($idList)) { return $ret; } $q = $this ->database ->select('ucms_group', 'g') ; if ($withAccess) { $q->addTag('ucms_group_access'); ...
php
public function loadAll($idList = [], $withAccess = true) { $ret = []; if (empty($idList)) { return $ret; } $q = $this ->database ->select('ucms_group', 'g') ; if ($withAccess) { $q->addTag('ucms_group_access'); ...
[ "public", "function", "loadAll", "(", "$", "idList", "=", "[", "]", ",", "$", "withAccess", "=", "true", ")", "{", "$", "ret", "=", "[", "]", ";", "if", "(", "empty", "(", "$", "idList", ")", ")", "{", "return", "$", "ret", ";", "}", "$", "q"...
Load all groups from the given identifiers @param array $idList @param string $withAccess @return Group[]
[ "Load", "all", "groups", "from", "the", "given", "identifiers" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_site/src/GroupManager.php#L110-L147
235,085
makinacorpus/drupal-ucms
ucms_site/src/GroupManager.php
GroupManager.save
public function save(Group $group, array $fields = null, $userId = null) { $eligible = [ 'title', 'is_ghost', 'is_meta', 'ts_created', 'ts_changed', 'attributes', ]; if (null === $fields) { $fields = $eligib...
php
public function save(Group $group, array $fields = null, $userId = null) { $eligible = [ 'title', 'is_ghost', 'is_meta', 'ts_created', 'ts_changed', 'attributes', ]; if (null === $fields) { $fields = $eligib...
[ "public", "function", "save", "(", "Group", "$", "group", ",", "array", "$", "fields", "=", "null", ",", "$", "userId", "=", "null", ")", "{", "$", "eligible", "=", "[", "'title'", ",", "'is_ghost'", ",", "'is_meta'", ",", "'ts_created'", ",", "'ts_cha...
Save given group If the given group has no identifier, its identifier will be set @param Group $group @param array $fields If set, update only the given fields @param int $userId Who did this!
[ "Save", "given", "group" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_site/src/GroupManager.php#L160-L233
235,086
makinacorpus/drupal-ucms
ucms_site/src/GroupManager.php
GroupManager.delete
public function delete(Group $group, $userId = null) { $this->dispatch($group, 'preDelete', [], $userId); $this->database->delete('ucms_group')->condition('id', $group->getId())->execute(); $this->dispatch($group, 'delete', [], $userId); }
php
public function delete(Group $group, $userId = null) { $this->dispatch($group, 'preDelete', [], $userId); $this->database->delete('ucms_group')->condition('id', $group->getId())->execute(); $this->dispatch($group, 'delete', [], $userId); }
[ "public", "function", "delete", "(", "Group", "$", "group", ",", "$", "userId", "=", "null", ")", "{", "$", "this", "->", "dispatch", "(", "$", "group", ",", "'preDelete'", ",", "[", "]", ",", "$", "userId", ")", ";", "$", "this", "->", "database",...
Delete the given group @param Group $group @param int $userId Who did this!
[ "Delete", "the", "given", "group" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_site/src/GroupManager.php#L242-L249
235,087
makinacorpus/drupal-ucms
ucms_site/src/GroupManager.php
GroupManager.getSiteGroup
public function getSiteGroup(Site $site) { $groupId = $site->getGroupId(); if ($groupId) { return $this->findOne($groupId); } }
php
public function getSiteGroup(Site $site) { $groupId = $site->getGroupId(); if ($groupId) { return $this->findOne($groupId); } }
[ "public", "function", "getSiteGroup", "(", "Site", "$", "site", ")", "{", "$", "groupId", "=", "$", "site", "->", "getGroupId", "(", ")", ";", "if", "(", "$", "groupId", ")", "{", "return", "$", "this", "->", "findOne", "(", "$", "groupId", ")", ";...
Get site groups @param Site $site @return Group
[ "Get", "site", "groups" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_site/src/GroupManager.php#L284-L291
235,088
makinacorpus/drupal-ucms
ucms_site/src/GroupManager.php
GroupManager.addSite
public function addSite($groupId, $siteId, $allowChange = false) { $ret = false; $currentGroupId = (int)$this ->database ->query( "SELECT group_id FROM {ucms_site} WHERE id = :site", [':site' => $siteId] ) ->fetchField(...
php
public function addSite($groupId, $siteId, $allowChange = false) { $ret = false; $currentGroupId = (int)$this ->database ->query( "SELECT group_id FROM {ucms_site} WHERE id = :site", [':site' => $siteId] ) ->fetchField(...
[ "public", "function", "addSite", "(", "$", "groupId", ",", "$", "siteId", ",", "$", "allowChange", "=", "false", ")", "{", "$", "ret", "=", "false", ";", "$", "currentGroupId", "=", "(", "int", ")", "$", "this", "->", "database", "->", "query", "(", ...
Add site to group @param int $groupId @param int $siteId @param boolean $allowChange If set to false and site does already belong to a group, throw an exception @return bool True if user was really added, false if site is already in group
[ "Add", "site", "to", "group" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_site/src/GroupManager.php#L305-L339
235,089
makinacorpus/drupal-ucms
ucms_site/src/GroupManager.php
GroupManager.removeSite
public function removeSite($groupId, $siteId) { $currentGroupId = (int)$this ->database ->query( "SELECT group_id FROM {ucms_site} WHERE id = :site", [':site' => $siteId] ) ->fetchField() ; if ($currentGroupId !...
php
public function removeSite($groupId, $siteId) { $currentGroupId = (int)$this ->database ->query( "SELECT group_id FROM {ucms_site} WHERE id = :site", [':site' => $siteId] ) ->fetchField() ; if ($currentGroupId !...
[ "public", "function", "removeSite", "(", "$", "groupId", ",", "$", "siteId", ")", "{", "$", "currentGroupId", "=", "(", "int", ")", "$", "this", "->", "database", "->", "query", "(", "\"SELECT group_id FROM {ucms_site} WHERE id = :site\"", ",", "[", "':site'", ...
Remote site from group @param int $groupId @param int $siteId
[ "Remote", "site", "from", "group" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_site/src/GroupManager.php#L347-L373
235,090
makinacorpus/drupal-ucms
ucms_site/src/GroupManager.php
GroupManager.userIsMember
public function userIsMember(AccountInterface $account, Group $group) { // @todo fix this, cache that return (bool)$this ->database ->query( "SELECT 1 FROM {ucms_group_access} WHERE group_id = :group AND user_id = :user", [':group' => $group->g...
php
public function userIsMember(AccountInterface $account, Group $group) { // @todo fix this, cache that return (bool)$this ->database ->query( "SELECT 1 FROM {ucms_group_access} WHERE group_id = :group AND user_id = :user", [':group' => $group->g...
[ "public", "function", "userIsMember", "(", "AccountInterface", "$", "account", ",", "Group", "$", "group", ")", "{", "// @todo fix this, cache that", "return", "(", "bool", ")", "$", "this", "->", "database", "->", "query", "(", "\"SELECT 1 FROM {ucms_group_access} ...
Is user member of the given group @param AccountInterface $account @param Group $group @return bool
[ "Is", "user", "member", "of", "the", "given", "group" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_site/src/GroupManager.php#L383-L394
235,091
makinacorpus/drupal-ucms
ucms_site/src/GroupManager.php
GroupManager.addMember
public function addMember($groupId, $userId) { $exists = (bool)$this ->database ->query( "SELECT 1 FROM {ucms_group_access} WHERE group_id = :group AND user_id = :user", [':group' => $groupId, ':user' => $userId] ) ->fetchField(...
php
public function addMember($groupId, $userId) { $exists = (bool)$this ->database ->query( "SELECT 1 FROM {ucms_group_access} WHERE group_id = :group AND user_id = :user", [':group' => $groupId, ':user' => $userId] ) ->fetchField(...
[ "public", "function", "addMember", "(", "$", "groupId", ",", "$", "userId", ")", "{", "$", "exists", "=", "(", "bool", ")", "$", "this", "->", "database", "->", "query", "(", "\"SELECT 1 FROM {ucms_group_access} WHERE group_id = :group AND user_id = :user\"", ",", ...
Add member to group @param int $groupId @param int $userId @return bool True if user was really added, false if user is already a member
[ "Add", "member", "to", "group" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_site/src/GroupManager.php#L450-L482
235,092
makinacorpus/drupal-ucms
ucms_site/src/GroupManager.php
GroupManager.removeMember
public function removeMember($groupId, $userId) { $this ->database ->delete('ucms_group_access') ->condition('group_id', $groupId) ->condition('user_id', $userId) ->execute() ; // @todo dispatch event $this->touch($groupId...
php
public function removeMember($groupId, $userId) { $this ->database ->delete('ucms_group_access') ->condition('group_id', $groupId) ->condition('user_id', $userId) ->execute() ; // @todo dispatch event $this->touch($groupId...
[ "public", "function", "removeMember", "(", "$", "groupId", ",", "$", "userId", ")", "{", "$", "this", "->", "database", "->", "delete", "(", "'ucms_group_access'", ")", "->", "condition", "(", "'group_id'", ",", "$", "groupId", ")", "->", "condition", "(",...
Remove member from group If association does not exists, this will silently do nothing @param int $groupId @param int $userId
[ "Remove", "member", "from", "group" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_site/src/GroupManager.php#L492-L507
235,093
potsky/microsoft-translator-php-sdk
src/MicrosoftTranslator/Auth.php
Auth.getAccessToken
public function getAccessToken($force_new = false) { if ($this->guard->hasAccessToken()) { $access_token = $this->guard->getAccessToken(); return $access_token; } return $this->generateAndStoreNewAccessToken(); }
php
public function getAccessToken($force_new = false) { if ($this->guard->hasAccessToken()) { $access_token = $this->guard->getAccessToken(); return $access_token; } return $this->generateAndStoreNewAccessToken(); }
[ "public", "function", "getAccessToken", "(", "$", "force_new", "=", "false", ")", "{", "if", "(", "$", "this", "->", "guard", "->", "hasAccessToken", "(", ")", ")", "{", "$", "access_token", "=", "$", "this", "->", "guard", "->", "getAccessToken", "(", ...
Get an access token If available, the stored access token will be used If not available or if $force_new is true, a new one will be generated @param bool|false $force_new @return array|string @throws \MicrosoftTranslator\Exception
[ "Get", "an", "access", "token" ]
102f2411be5abb0e57a73c475f8e9e185a9f4859
https://github.com/potsky/microsoft-translator-php-sdk/blob/102f2411be5abb0e57a73c475f8e9e185a9f4859/src/MicrosoftTranslator/Auth.php#L107-L116
235,094
makinacorpus/drupal-ucms
ucms_site/src/EventDispatcher/AllowListEvent.php
AllowListEvent.remove
public function remove($item) { foreach ($this->currentList as $index => $candidate) { if ($candidate === $item) { unset($this->currentList[$index]); } } }
php
public function remove($item) { foreach ($this->currentList as $index => $candidate) { if ($candidate === $item) { unset($this->currentList[$index]); } } }
[ "public", "function", "remove", "(", "$", "item", ")", "{", "foreach", "(", "$", "this", "->", "currentList", "as", "$", "index", "=>", "$", "candidate", ")", "{", "if", "(", "$", "candidate", "===", "$", "item", ")", "{", "unset", "(", "$", "this"...
Remove item from list @param string $item
[ "Remove", "item", "from", "list" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_site/src/EventDispatcher/AllowListEvent.php#L56-L63
235,095
makinacorpus/drupal-ucms
ucms_site/src/EventDispatcher/AllowListEvent.php
AllowListEvent.add
public function add($item) { // Disallow items outside of original boundaries if (!in_array($item, $this->originalList)) { return; } if (!in_array($item, $this->currentList)) { $this->currentList[] = $item; } }
php
public function add($item) { // Disallow items outside of original boundaries if (!in_array($item, $this->originalList)) { return; } if (!in_array($item, $this->currentList)) { $this->currentList[] = $item; } }
[ "public", "function", "add", "(", "$", "item", ")", "{", "// Disallow items outside of original boundaries", "if", "(", "!", "in_array", "(", "$", "item", ",", "$", "this", "->", "originalList", ")", ")", "{", "return", ";", "}", "if", "(", "!", "in_array"...
Add item into list @param string $item
[ "Add", "item", "into", "list" ]
6b8a84305472d2cad816102672f10274b3bbb535
https://github.com/makinacorpus/drupal-ucms/blob/6b8a84305472d2cad816102672f10274b3bbb535/ucms_site/src/EventDispatcher/AllowListEvent.php#L70-L79
235,096
PHPixie/HTTP
src/PHPixie/HTTP/Output.php
Output.response
public function response($response, $context = null) { $responseMessage = $response->asResponseMessage($context); $this->responseMessage($responseMessage); }
php
public function response($response, $context = null) { $responseMessage = $response->asResponseMessage($context); $this->responseMessage($responseMessage); }
[ "public", "function", "response", "(", "$", "response", ",", "$", "context", "=", "null", ")", "{", "$", "responseMessage", "=", "$", "response", "->", "asResponseMessage", "(", "$", "context", ")", ";", "$", "this", "->", "responseMessage", "(", "$", "r...
Output a HTTP response with optional context @param Responses\Response $response @param Context $context @return void
[ "Output", "a", "HTTP", "response", "with", "optional", "context" ]
581c0df452fd07ca4ea0b3e24e8ddee8dddc2912
https://github.com/PHPixie/HTTP/blob/581c0df452fd07ca4ea0b3e24e8ddee8dddc2912/src/PHPixie/HTTP/Output.php#L17-L21
235,097
PHPixie/HTTP
src/PHPixie/HTTP/Output.php
Output.responseMessage
public function responseMessage($responseMessage) { $this->statusHeader( $responseMessage->getStatusCode(), $responseMessage->getReasonPhrase(), $responseMessage->getProtocolVersion() ); $this->headers($responseMessage->getHeaders()); $thi...
php
public function responseMessage($responseMessage) { $this->statusHeader( $responseMessage->getStatusCode(), $responseMessage->getReasonPhrase(), $responseMessage->getProtocolVersion() ); $this->headers($responseMessage->getHeaders()); $thi...
[ "public", "function", "responseMessage", "(", "$", "responseMessage", ")", "{", "$", "this", "->", "statusHeader", "(", "$", "responseMessage", "->", "getStatusCode", "(", ")", ",", "$", "responseMessage", "->", "getReasonPhrase", "(", ")", ",", "$", "response...
Output a PSR 7 response message @param Messages\Message\Response $responseMessage
[ "Output", "a", "PSR", "7", "response", "message" ]
581c0df452fd07ca4ea0b3e24e8ddee8dddc2912
https://github.com/PHPixie/HTTP/blob/581c0df452fd07ca4ea0b3e24e8ddee8dddc2912/src/PHPixie/HTTP/Output.php#L27-L37
235,098
potsky/microsoft-translator-php-sdk
src/MicrosoftTranslator/Client.php
Client.translate
public function translate($text, $to, $from = null, $contentType = 'text/plain', $category = 'general') { $query_parameters = [ 'text' => $text, 'to' => $to, 'contentType' => $contentType, 'category' => $category, ]; if (! i...
php
public function translate($text, $to, $from = null, $contentType = 'text/plain', $category = 'general') { $query_parameters = [ 'text' => $text, 'to' => $to, 'contentType' => $contentType, 'category' => $category, ]; if (! i...
[ "public", "function", "translate", "(", "$", "text", ",", "$", "to", ",", "$", "from", "=", "null", ",", "$", "contentType", "=", "'text/plain'", ",", "$", "category", "=", "'general'", ")", "{", "$", "query_parameters", "=", "[", "'text'", "=>", "$", ...
Translates a text string from one language to another. @param string $text Required. A string representing the text to translate. The size of the text must not exceed 10000 characters. @param string $to Required. A string representing the language code to translate the text into. @param strin...
[ "Translates", "a", "text", "string", "from", "one", "language", "to", "another", "." ]
102f2411be5abb0e57a73c475f8e9e185a9f4859
https://github.com/potsky/microsoft-translator-php-sdk/blob/102f2411be5abb0e57a73c475f8e9e185a9f4859/src/MicrosoftTranslator/Client.php#L162-L176
235,099
potsky/microsoft-translator-php-sdk
src/MicrosoftTranslator/Client.php
Client.TransformText
public function TransformText($text, $from, $category = 'general') { $query_parameters = [ 'sentence' => $text, 'language' => $from, 'category' => $category, ]; return $this->get('/TransformText', [], $query_parameters, true, 'http://api.microsofttranslat...
php
public function TransformText($text, $from, $category = 'general') { $query_parameters = [ 'sentence' => $text, 'language' => $from, 'category' => $category, ]; return $this->get('/TransformText', [], $query_parameters, true, 'http://api.microsofttranslat...
[ "public", "function", "TransformText", "(", "$", "text", ",", "$", "from", ",", "$", "category", "=", "'general'", ")", "{", "$", "query_parameters", "=", "[", "'sentence'", "=>", "$", "text", ",", "'language'", "=>", "$", "from", ",", "'category'", "=>"...
The TransformText method is a text normalization function for social media, which returns a normalized form of the input. The method can be used as a preprocessing step in Machine Translation or other applications, which expect clean input text than is typically found in social media or user-generated content. The func...
[ "The", "TransformText", "method", "is", "a", "text", "normalization", "function", "for", "social", "media", "which", "returns", "a", "normalized", "form", "of", "the", "input", ".", "The", "method", "can", "be", "used", "as", "a", "preprocessing", "step", "i...
102f2411be5abb0e57a73c475f8e9e185a9f4859
https://github.com/potsky/microsoft-translator-php-sdk/blob/102f2411be5abb0e57a73c475f8e9e185a9f4859/src/MicrosoftTranslator/Client.php#L222-L231