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
227,900
antaresproject/core
src/foundation/src/Processor/Extension/ModuleConfigure.php
ModuleConfigure.configure
public function configure(Listener $listener, Fluent $extension) { if (!Extension::started($extension->get('name'))) { return $listener->abortWhenRequirementMismatched(); } $this->presenter->setCategory($this->category); $memory = Foundation::memory(); $activeCo...
php
public function configure(Listener $listener, Fluent $extension) { if (!Extension::started($extension->get('name'))) { return $listener->abortWhenRequirementMismatched(); } $this->presenter->setCategory($this->category); $memory = Foundation::memory(); $activeCo...
[ "public", "function", "configure", "(", "Listener", "$", "listener", ",", "Fluent", "$", "extension", ")", "{", "if", "(", "!", "Extension", "::", "started", "(", "$", "extension", "->", "get", "(", "'name'", ")", ")", ")", "{", "return", "$", "listene...
View edit extension configuration page. @param \Antares\Contracts\Extension\Listener\Configure $listener @param \Illuminate\Support\Fluent $extension @return mixed
[ "View", "edit", "extension", "configuration", "page", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Processor/Extension/ModuleConfigure.php#L86-L106
227,901
antaresproject/core
src/foundation/src/Processor/Extension/ModuleConfigure.php
ModuleConfigure.create
public function create(Listener $listener, $category = null) { $eloquent = Foundation::make('antares.component'); $form = $this->presenter->create($eloquent, $category, $this->validator); Event::fire("antares.form: extension.create", [$eloquent, $form]); Event::fire(new FormRende...
php
public function create(Listener $listener, $category = null) { $eloquent = Foundation::make('antares.component'); $form = $this->presenter->create($eloquent, $category, $this->validator); Event::fire("antares.form: extension.create", [$eloquent, $form]); Event::fire(new FormRende...
[ "public", "function", "create", "(", "Listener", "$", "listener", ",", "$", "category", "=", "null", ")", "{", "$", "eloquent", "=", "Foundation", "::", "make", "(", "'antares.component'", ")", ";", "$", "form", "=", "$", "this", "->", "presenter", "->",...
create module form @param String $category @return type
[ "create", "module", "form" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Processor/Extension/ModuleConfigure.php#L166-L174
227,902
antaresproject/core
src/foundation/src/Processor/Extension/ModuleConfigure.php
ModuleConfigure.upload
public function upload(array $input) { $file = $this->resolveTempFileName($input['file']); $input['file']->directory = $file['directory']; $input['file']->filename = $file['filename']; Validator::resolver(function($translator, $data, $rules, $messages) { ...
php
public function upload(array $input) { $file = $this->resolveTempFileName($input['file']); $input['file']->directory = $file['directory']; $input['file']->filename = $file['filename']; Validator::resolver(function($translator, $data, $rules, $messages) { ...
[ "public", "function", "upload", "(", "array", "$", "input", ")", "{", "$", "file", "=", "$", "this", "->", "resolveTempFileName", "(", "$", "input", "[", "'file'", "]", ")", ";", "$", "input", "[", "'file'", "]", "->", "directory", "=", "$", "file", ...
upload and validate module compressed file @param array $input @return \Illuminate\Support\Facades\Response
[ "upload", "and", "validate", "module", "compressed", "file" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Processor/Extension/ModuleConfigure.php#L198-L216
227,903
antaresproject/core
src/foundation/src/Processor/Extension/ModuleConfigure.php
ModuleConfigure.extract
public function extract(Listener $listener, $category = null, array $input) { try { $subdir = !is_null($category) ? $category : 'addons'; $target = realpath(app_path() . "/../src/modules/{$subdir}"); if (!is_dir($target)) { throw new \Exception('Invalid p...
php
public function extract(Listener $listener, $category = null, array $input) { try { $subdir = !is_null($category) ? $category : 'addons'; $target = realpath(app_path() . "/../src/modules/{$subdir}"); if (!is_dir($target)) { throw new \Exception('Invalid p...
[ "public", "function", "extract", "(", "Listener", "$", "listener", ",", "$", "category", "=", "null", ",", "array", "$", "input", ")", "{", "try", "{", "$", "subdir", "=", "!", "is_null", "(", "$", "category", ")", "?", "$", "category", ":", "'addons...
extraction of module package @param Listener $listener @param String $category @param array $input
[ "extraction", "of", "module", "package" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Processor/Extension/ModuleConfigure.php#L257-L281
227,904
antaresproject/core
src/foundation/src/Notification.php
Notification.push
public function push($params) { foreach ($params as $key => $value) { array_set($this->params, $key, $value); } return $this; }
php
public function push($params) { foreach ($params as $key => $value) { array_set($this->params, $key, $value); } return $this; }
[ "public", "function", "push", "(", "$", "params", ")", "{", "foreach", "(", "$", "params", "as", "$", "key", "=>", "$", "value", ")", "{", "array_set", "(", "$", "this", "->", "params", ",", "$", "key", ",", "$", "value", ")", ";", "}", "return",...
adds element into params container @param mixed $params @return \Antares\Foundation\Notification
[ "adds", "element", "into", "params", "container" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Notification.php#L71-L77
227,905
coincheckjp/coincheck-php
lib/Coincheck/Transfer.php
Transfer.to_leverage
public function to_leverage($params = array()) { $arr = array( "amount" => $params["amount"], "currency" => $params["currency"] ); $rawResponse = $this->client->request('post', 'api/exchange/transfers/to_leverage', $arr); return $rawResponse; }
php
public function to_leverage($params = array()) { $arr = array( "amount" => $params["amount"], "currency" => $params["currency"] ); $rawResponse = $this->client->request('post', 'api/exchange/transfers/to_leverage', $arr); return $rawResponse; }
[ "public", "function", "to_leverage", "(", "$", "params", "=", "array", "(", ")", ")", "{", "$", "arr", "=", "array", "(", "\"amount\"", "=>", "$", "params", "[", "\"amount\"", "]", ",", "\"currency\"", "=>", "$", "params", "[", "\"currency\"", "]", ")"...
Transfer Balance to Leverage. @param mixed @return Json Array
[ "Transfer", "Balance", "to", "Leverage", "." ]
5991003cb0ae827697888aeebd0aea0267fad7fa
https://github.com/coincheckjp/coincheck-php/blob/5991003cb0ae827697888aeebd0aea0267fad7fa/lib/Coincheck/Transfer.php#L20-L28
227,906
coincheckjp/coincheck-php
lib/Coincheck/Transfer.php
Transfer.from_leverage
public function from_leverage($params = array()) { $arr = array( "amount" => $params["amount"], "currency" => $params["currency"] ); $rawResponse = $this->client->request('post', 'api/exchange/transfers/from_leverage', $arr); return $rawResponse; }
php
public function from_leverage($params = array()) { $arr = array( "amount" => $params["amount"], "currency" => $params["currency"] ); $rawResponse = $this->client->request('post', 'api/exchange/transfers/from_leverage', $arr); return $rawResponse; }
[ "public", "function", "from_leverage", "(", "$", "params", "=", "array", "(", ")", ")", "{", "$", "arr", "=", "array", "(", "\"amount\"", "=>", "$", "params", "[", "\"amount\"", "]", ",", "\"currency\"", "=>", "$", "params", "[", "\"currency\"", "]", "...
Transfer Balance from Leverage. @param mixed @return Json Array
[ "Transfer", "Balance", "from", "Leverage", "." ]
5991003cb0ae827697888aeebd0aea0267fad7fa
https://github.com/coincheckjp/coincheck-php/blob/5991003cb0ae827697888aeebd0aea0267fad7fa/lib/Coincheck/Transfer.php#L36-L44
227,907
joomla-framework/google-api
src/Auth/OAuth2.php
OAuth2.googlize
protected function googlize() { if (!$this->client->getOption('authurl')) { $this->client->setOption('authurl', 'https://accounts.google.com/o/oauth2/auth'); } if (!$this->client->getOption('tokenurl')) { $this->client->setOption('tokenurl', 'https://accounts.google.com/o/oauth2/token'); } if (!$...
php
protected function googlize() { if (!$this->client->getOption('authurl')) { $this->client->setOption('authurl', 'https://accounts.google.com/o/oauth2/auth'); } if (!$this->client->getOption('tokenurl')) { $this->client->setOption('tokenurl', 'https://accounts.google.com/o/oauth2/token'); } if (!$...
[ "protected", "function", "googlize", "(", ")", "{", "if", "(", "!", "$", "this", "->", "client", "->", "getOption", "(", "'authurl'", ")", ")", "{", "$", "this", "->", "client", "->", "setOption", "(", "'authurl'", ",", "'https://accounts.google.com/o/oauth2...
Method to fill in Google-specific OAuth settings @return Client Google-configured OAuth2 client. @since 1.0
[ "Method", "to", "fill", "in", "Google", "-", "specific", "OAuth", "settings" ]
c78f06cfaba3f0dfc3ce411a335b417a5f0ee904
https://github.com/joomla-framework/google-api/blob/c78f06cfaba3f0dfc3ce411a335b417a5f0ee904/src/Auth/OAuth2.php#L94-L131
227,908
joomla-framework/google-api
src/Data/Calendar.php
Calendar.removeCalendar
public function removeCalendar($calendarID) { if ($this->isAuthenticated()) { $jdata = $this->query('https://www.googleapis.com/calendar/v3/users/me/calendarList/' . urlencode($calendarID), null, null, 'delete'); if ($jdata->body != '') { throw new UnexpectedValueException("Unexpected data received f...
php
public function removeCalendar($calendarID) { if ($this->isAuthenticated()) { $jdata = $this->query('https://www.googleapis.com/calendar/v3/users/me/calendarList/' . urlencode($calendarID), null, null, 'delete'); if ($jdata->body != '') { throw new UnexpectedValueException("Unexpected data received f...
[ "public", "function", "removeCalendar", "(", "$", "calendarID", ")", "{", "if", "(", "$", "this", "->", "isAuthenticated", "(", ")", ")", "{", "$", "jdata", "=", "$", "this", "->", "query", "(", "'https://www.googleapis.com/calendar/v3/users/me/calendarList/'", ...
Method to remove a calendar from a user's calendar list @param string $calendarID ID of calendar to delete @return boolean Success or failure @since 1.0 @throws UnexpectedValueException
[ "Method", "to", "remove", "a", "calendar", "from", "a", "user", "s", "calendar", "list" ]
c78f06cfaba3f0dfc3ce411a335b417a5f0ee904
https://github.com/joomla-framework/google-api/blob/c78f06cfaba3f0dfc3ce411a335b417a5f0ee904/src/Data/Calendar.php#L54-L69
227,909
joomla-framework/google-api
src/Data/Calendar.php
Calendar.createCalendar
public function createCalendar($title, $options = array()) { if ($this->isAuthenticated()) { $options['summary'] = $title; $url = 'https://www.googleapis.com/calendar/v3/calendars'; $jdata = $this->query($url, json_encode($options), array('Content-type' => 'application/json'), ...
php
public function createCalendar($title, $options = array()) { if ($this->isAuthenticated()) { $options['summary'] = $title; $url = 'https://www.googleapis.com/calendar/v3/calendars'; $jdata = $this->query($url, json_encode($options), array('Content-type' => 'application/json'), ...
[ "public", "function", "createCalendar", "(", "$", "title", ",", "$", "options", "=", "array", "(", ")", ")", "{", "if", "(", "$", "this", "->", "isAuthenticated", "(", ")", ")", "{", "$", "options", "[", "'summary'", "]", "=", "$", "title", ";", "$...
Method to create a Google Calendar @param string $title New calendar title @param array $options New calendar settings @return mixed Data from Google. @since 1.0 @throws UnexpectedValueException
[ "Method", "to", "create", "a", "Google", "Calendar" ]
c78f06cfaba3f0dfc3ce411a335b417a5f0ee904
https://github.com/joomla-framework/google-api/blob/c78f06cfaba3f0dfc3ce411a335b417a5f0ee904/src/Data/Calendar.php#L252-L269
227,910
joomla-framework/google-api
src/Data/Calendar.php
Calendar.editEvent
public function editEvent($calendarID, $eventID, $options, $notify = false) { if ($this->isAuthenticated()) { $url = 'https://www.googleapis.com/calendar/v3/calendars/'; $url .= urlencode($calendarID) . '/events/' . urlencode($eventID) . ($notify ? '?sendNotifications=true' : ''); $jdata = $this->query($u...
php
public function editEvent($calendarID, $eventID, $options, $notify = false) { if ($this->isAuthenticated()) { $url = 'https://www.googleapis.com/calendar/v3/calendars/'; $url .= urlencode($calendarID) . '/events/' . urlencode($eventID) . ($notify ? '?sendNotifications=true' : ''); $jdata = $this->query($u...
[ "public", "function", "editEvent", "(", "$", "calendarID", ",", "$", "eventID", ",", "$", "options", ",", "$", "notify", "=", "false", ")", "{", "if", "(", "$", "this", "->", "isAuthenticated", "(", ")", ")", "{", "$", "url", "=", "'https://www.googlea...
Method to edit a Google Calendar event @param string $calendarID Calendar ID @param string $eventID ID of the event to change @param array $options Event settings @param boolean $notify Notify participants of changes @return mixed Data from Google. @since 1.0 @throws UnexpectedValu...
[ "Method", "to", "edit", "a", "Google", "Calendar", "event" ]
c78f06cfaba3f0dfc3ce411a335b417a5f0ee904
https://github.com/joomla-framework/google-api/blob/c78f06cfaba3f0dfc3ce411a335b417a5f0ee904/src/Data/Calendar.php#L570-L587
227,911
antaresproject/core
src/components/extension/src/Processors/Composer.php
Composer.run
public function run(OperationHandlerContract $handler, array $extensionsNames) { if (count($extensionsNames) === 0) { return $handler->operationInfo(new Operation('No extensions to install. Skipping composer.')); } $required = (array) config('components.required', []); $...
php
public function run(OperationHandlerContract $handler, array $extensionsNames) { if (count($extensionsNames) === 0) { return $handler->operationInfo(new Operation('No extensions to install. Skipping composer.')); } $required = (array) config('components.required', []); $...
[ "public", "function", "run", "(", "OperationHandlerContract", "$", "handler", ",", "array", "$", "extensionsNames", ")", "{", "if", "(", "count", "(", "$", "extensionsNames", ")", "===", "0", ")", "{", "return", "$", "handler", "->", "operationInfo", "(", ...
Run the operation for composer. @param OperationHandlerContract $handler @param array $extensionsNames @return mixed @throws \Exception
[ "Run", "the", "operation", "for", "composer", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/extension/src/Processors/Composer.php#L52-L95
227,912
antaresproject/core
src/foundation/src/Processor/AssetPublisher.php
AssetPublisher.publish
public function publish(Listener $listener, array $input) { $queues = $this->publisher->queued(); try { $this->publisher->connect($input); } catch (ServerException $e) { Log::emergency($e); $this->session->forget('antares.ftp'); return $liste...
php
public function publish(Listener $listener, array $input) { $queues = $this->publisher->queued(); try { $this->publisher->connect($input); } catch (ServerException $e) { Log::emergency($e); $this->session->forget('antares.ftp'); return $liste...
[ "public", "function", "publish", "(", "Listener", "$", "listener", ",", "array", "$", "input", ")", "{", "$", "queues", "=", "$", "this", "->", "publisher", "->", "queued", "(", ")", ";", "try", "{", "$", "this", "->", "publisher", "->", "connect", "...
Publish process. @param \Antares\Contracts\Foundation\Listener\AssetPublishing $listener @param array $input @return mixed
[ "Publish", "process", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Processor/AssetPublisher.php#L83-L103
227,913
antaresproject/core
src/components/support/src/Support/Fluent.php
Fluent.getActiveMenuRoute
protected function getActiveMenuRoute() { if (is_null($this->activeMenuRoute)) { $this->activeMenuRoute = Registry::get('active_menu_route'); } return $this->activeMenuRoute; }
php
protected function getActiveMenuRoute() { if (is_null($this->activeMenuRoute)) { $this->activeMenuRoute = Registry::get('active_menu_route'); } return $this->activeMenuRoute; }
[ "protected", "function", "getActiveMenuRoute", "(", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "activeMenuRoute", ")", ")", "{", "$", "this", "->", "activeMenuRoute", "=", "Registry", "::", "get", "(", "'active_menu_route'", ")", ";", "}", "re...
Active menu getter @return String
[ "Active", "menu", "getter" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/support/src/Support/Fluent.php#L80-L86
227,914
antaresproject/core
src/components/support/src/Support/Fluent.php
Fluent.isActive
public function isActive() { if (!isset($this->attributes['link'])) { return false; } $childs = isset($this->attributes['childs']) ? $this->attributes['childs'] : []; if (empty($childs)) { return $this->compare($this->attributes['link']); } fo...
php
public function isActive() { if (!isset($this->attributes['link'])) { return false; } $childs = isset($this->attributes['childs']) ? $this->attributes['childs'] : []; if (empty($childs)) { return $this->compare($this->attributes['link']); } fo...
[ "public", "function", "isActive", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "attributes", "[", "'link'", "]", ")", ")", "{", "return", "false", ";", "}", "$", "childs", "=", "isset", "(", "$", "this", "->", "attributes", "[", ...
check whether element has same request url and link attribute @return boolean
[ "check", "whether", "element", "has", "same", "request", "url", "and", "link", "attribute" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/support/src/Support/Fluent.php#L93-L112
227,915
antaresproject/core
src/components/support/src/Support/Fluent.php
Fluent.compare
protected function compare($url) { $activeMenuRouteUrl = $this->getActiveMenuRoute(); if ($this->url == $url or $url == $activeMenuRouteUrl) { return true; } $segments = $this->segments; $count = count($segments); if ($count !== count(array_filter(explo...
php
protected function compare($url) { $activeMenuRouteUrl = $this->getActiveMenuRoute(); if ($this->url == $url or $url == $activeMenuRouteUrl) { return true; } $segments = $this->segments; $count = count($segments); if ($count !== count(array_filter(explo...
[ "protected", "function", "compare", "(", "$", "url", ")", "{", "$", "activeMenuRouteUrl", "=", "$", "this", "->", "getActiveMenuRoute", "(", ")", ";", "if", "(", "$", "this", "->", "url", "==", "$", "url", "or", "$", "url", "==", "$", "activeMenuRouteU...
Whether menu item is active @param String $url @return boolean
[ "Whether", "menu", "item", "is", "active" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/support/src/Support/Fluent.php#L120-L141
227,916
antaresproject/core
src/components/support/src/Support/Fluent.php
Fluent.isFirstChildActive
public function isFirstChildActive() { $url = array_get($this->attributes, 'link', ''); if ($this->getActiveMenuRoute() == $url) { return true; } @list($domain, $area, $module, $action) = explode('/', str_replace('http://', '', $url)); if ($this->url == $url) { ...
php
public function isFirstChildActive() { $url = array_get($this->attributes, 'link', ''); if ($this->getActiveMenuRoute() == $url) { return true; } @list($domain, $area, $module, $action) = explode('/', str_replace('http://', '', $url)); if ($this->url == $url) { ...
[ "public", "function", "isFirstChildActive", "(", ")", "{", "$", "url", "=", "array_get", "(", "$", "this", "->", "attributes", ",", "'link'", ",", "''", ")", ";", "if", "(", "$", "this", "->", "getActiveMenuRoute", "(", ")", "==", "$", "url", ")", "{...
Whether first child is active @return boolean
[ "Whether", "first", "child", "is", "active" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/support/src/Support/Fluent.php#L159-L174
227,917
antaresproject/core
src/components/extension/src/Processors/Installer.php
Installer.importSettings
private function importSettings(OperationHandlerContract $handler, ExtensionContract $extension) { $settingsPath = $extension->getPath() . '/resources/config/settings.php'; if (File::exists($settingsPath)) { $settings = $this->settingsFactory->createFromConfig($extension->getPath() . '/r...
php
private function importSettings(OperationHandlerContract $handler, ExtensionContract $extension) { $settingsPath = $extension->getPath() . '/resources/config/settings.php'; if (File::exists($settingsPath)) { $settings = $this->settingsFactory->createFromConfig($extension->getPath() . '/r...
[ "private", "function", "importSettings", "(", "OperationHandlerContract", "$", "handler", ",", "ExtensionContract", "$", "extension", ")", "{", "$", "settingsPath", "=", "$", "extension", "->", "getPath", "(", ")", ".", "'/resources/config/settings.php'", ";", "if",...
Imports the default settings to the @param OperationHandlerContract $handler @param ExtensionContract $extension
[ "Imports", "the", "default", "settings", "to", "the" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/extension/src/Processors/Installer.php#L154-L162
227,918
tomwalder/php-appengine-search
src/Search/Tokenizer.php
Tokenizer.edgeNGram
public function edgeNGram($str_phrase, $int_min_length = 1) { $arr_tokens = []; // Clean-up unwanted characters (assume english for now) $str_phrase = preg_replace('#[^a-z0-9 ]#i', '', $str_phrase); // @todo move this to non-edge ngram function when we have one. // Do we ne...
php
public function edgeNGram($str_phrase, $int_min_length = 1) { $arr_tokens = []; // Clean-up unwanted characters (assume english for now) $str_phrase = preg_replace('#[^a-z0-9 ]#i', '', $str_phrase); // @todo move this to non-edge ngram function when we have one. // Do we ne...
[ "public", "function", "edgeNGram", "(", "$", "str_phrase", ",", "$", "int_min_length", "=", "1", ")", "{", "$", "arr_tokens", "=", "[", "]", ";", "// Clean-up unwanted characters (assume english for now)", "$", "str_phrase", "=", "preg_replace", "(", "'#[^a-z0-9 ]#i...
Change an input string into a list of edge N-Gram tokens for autocomplete usage @param $str_phrase @param $int_min_length @return string
[ "Change", "an", "input", "string", "into", "a", "list", "of", "edge", "N", "-", "Gram", "tokens", "for", "autocomplete", "usage" ]
e34a7f6ddf2f5e8dc51487562d413ca4fd1331ba
https://github.com/tomwalder/php-appengine-search/blob/e34a7f6ddf2f5e8dc51487562d413ca4fd1331ba/src/Search/Tokenizer.php#L33-L63
227,919
antaresproject/core
src/components/view/src/Theme/Theme.php
Theme.setTheme
public function setTheme($theme) { if (!is_null($this->theme)) { $this->resolved && $this->resetViewPaths(); $this->dispatcher->fire("antares.theme.unset: {$this->theme}"); $this->dispatcher->fire(new ThemeUnset($this->theme)); } $this->theme = $theme; ...
php
public function setTheme($theme) { if (!is_null($this->theme)) { $this->resolved && $this->resetViewPaths(); $this->dispatcher->fire("antares.theme.unset: {$this->theme}"); $this->dispatcher->fire(new ThemeUnset($this->theme)); } $this->theme = $theme; ...
[ "public", "function", "setTheme", "(", "$", "theme", ")", "{", "if", "(", "!", "is_null", "(", "$", "this", "->", "theme", ")", ")", "{", "$", "this", "->", "resolved", "&&", "$", "this", "->", "resetViewPaths", "(", ")", ";", "$", "this", "->", ...
Set the theme, this would also load the theme manifest. @param string $theme @return void
[ "Set", "the", "theme", "this", "would", "also", "load", "the", "theme", "manifest", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/view/src/Theme/Theme.php#L143-L161
227,920
antaresproject/core
src/components/view/src/Theme/Theme.php
Theme.boot
public function boot() { if ($this->booted) { return false; } $this->booted = true; $themePath = $this->getThemePath(); $autoload = $this->getThemeAutoloadFiles($themePath); foreach ($autoload as $file) { $file = ltrim($file, '/'); ...
php
public function boot() { if ($this->booted) { return false; } $this->booted = true; $themePath = $this->getThemePath(); $autoload = $this->getThemeAutoloadFiles($themePath); foreach ($autoload as $file) { $file = ltrim($file, '/'); ...
[ "public", "function", "boot", "(", ")", "{", "if", "(", "$", "this", "->", "booted", ")", "{", "return", "false", ";", "}", "$", "this", "->", "booted", "=", "true", ";", "$", "themePath", "=", "$", "this", "->", "getThemePath", "(", ")", ";", "$...
Boot and Load theme starter files. @return bool
[ "Boot", "and", "Load", "theme", "starter", "files", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/view/src/Theme/Theme.php#L178-L197
227,921
antaresproject/core
src/components/view/src/Theme/Theme.php
Theme.resolving
public function resolving() { if ($this->resolved) { return false; } $this->resolved = true; $this->dispatcher->fire('antares.theme.resolving', [$this, $this->app]); $this->dispatcher->fire(new ThemeResolving($this, $this->app)); $this->setViewPaths(); ...
php
public function resolving() { if ($this->resolved) { return false; } $this->resolved = true; $this->dispatcher->fire('antares.theme.resolving', [$this, $this->app]); $this->dispatcher->fire(new ThemeResolving($this, $this->app)); $this->setViewPaths(); ...
[ "public", "function", "resolving", "(", ")", "{", "if", "(", "$", "this", "->", "resolved", ")", "{", "return", "false", ";", "}", "$", "this", "->", "resolved", "=", "true", ";", "$", "this", "->", "dispatcher", "->", "fire", "(", "'antares.theme.reso...
Resolving the theme. @return bool
[ "Resolving", "the", "theme", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/view/src/Theme/Theme.php#L204-L218
227,922
antaresproject/core
src/components/view/src/Theme/Theme.php
Theme.getAvailableThemePaths
public function getAvailableThemePaths() { $paths = []; $themePaths = $this->getThemePaths(); foreach ($themePaths as $path) { $this->files->isDirectory(base_path($path)) && $paths[] = base_path($path); } return $paths; }
php
public function getAvailableThemePaths() { $paths = []; $themePaths = $this->getThemePaths(); foreach ($themePaths as $path) { $this->files->isDirectory(base_path($path)) && $paths[] = base_path($path); } return $paths; }
[ "public", "function", "getAvailableThemePaths", "(", ")", "{", "$", "paths", "=", "[", "]", ";", "$", "themePaths", "=", "$", "this", "->", "getThemePaths", "(", ")", ";", "foreach", "(", "$", "themePaths", "as", "$", "path", ")", "{", "$", "this", "...
Get available theme paths. @return array
[ "Get", "available", "theme", "paths", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/view/src/Theme/Theme.php#L258-L268
227,923
antaresproject/core
src/components/view/src/Theme/Theme.php
Theme.setViewPaths
protected function setViewPaths() { $viewFinder = $this->app->make('view.finder'); $themePaths = $this->getAvailableThemePaths(); if (!empty($themePaths)) { $viewFinder->setPaths(array_merge($themePaths, $viewFinder->getPaths())); } }
php
protected function setViewPaths() { $viewFinder = $this->app->make('view.finder'); $themePaths = $this->getAvailableThemePaths(); if (!empty($themePaths)) { $viewFinder->setPaths(array_merge($themePaths, $viewFinder->getPaths())); } }
[ "protected", "function", "setViewPaths", "(", ")", "{", "$", "viewFinder", "=", "$", "this", "->", "app", "->", "make", "(", "'view.finder'", ")", ";", "$", "themePaths", "=", "$", "this", "->", "getAvailableThemePaths", "(", ")", ";", "if", "(", "!", ...
Set theme paths to view file finder paths. @return void
[ "Set", "theme", "paths", "to", "view", "file", "finder", "paths", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/view/src/Theme/Theme.php#L313-L322
227,924
antaresproject/core
src/components/view/src/Theme/Theme.php
Theme.resetViewPaths
protected function resetViewPaths() { $viewFinder = $this->app->make('view.finder'); $paths = $viewFinder->getPaths(); foreach ($this->getThemePaths() as $themePath) { ($paths[0] === $themePath) && array_shift($paths); } $viewFinder->setPaths($paths); }
php
protected function resetViewPaths() { $viewFinder = $this->app->make('view.finder'); $paths = $viewFinder->getPaths(); foreach ($this->getThemePaths() as $themePath) { ($paths[0] === $themePath) && array_shift($paths); } $viewFinder->setPaths($paths); }
[ "protected", "function", "resetViewPaths", "(", ")", "{", "$", "viewFinder", "=", "$", "this", "->", "app", "->", "make", "(", "'view.finder'", ")", ";", "$", "paths", "=", "$", "viewFinder", "->", "getPaths", "(", ")", ";", "foreach", "(", "$", "this"...
Reset theme paths to view file finder paths. @return void
[ "Reset", "theme", "paths", "to", "view", "file", "finder", "paths", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/view/src/Theme/Theme.php#L329-L340
227,925
antaresproject/core
src/components/notifier/src/NotifierServiceProvider.php
NotifierServiceProvider.registerSupportedMailer
protected function registerSupportedMailer() { $this->app->singleton('antares.support.mail', function ($app) { $this->registerSwiftMailer(); $mailer = new Mailer( $app->make('view'), $app->make('antares.swift.mailer'), $app->make('events') ); ...
php
protected function registerSupportedMailer() { $this->app->singleton('antares.support.mail', function ($app) { $this->registerSwiftMailer(); $mailer = new Mailer( $app->make('view'), $app->make('antares.swift.mailer'), $app->make('events') ); ...
[ "protected", "function", "registerSupportedMailer", "(", ")", "{", "$", "this", "->", "app", "->", "singleton", "(", "'antares.support.mail'", ",", "function", "(", "$", "app", ")", "{", "$", "this", "->", "registerSwiftMailer", "(", ")", ";", "$", "mailer",...
Register the support mailer @return void
[ "Register", "the", "support", "mailer" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/notifier/src/NotifierServiceProvider.php#L56-L81
227,926
antaresproject/core
src/ui/components/templates/src/Http/Middleware/Middleware.php
Middleware.validateRequest
protected function validateRequest(Request $request) { if (php_sapi_name() === 'cli') { return false; } $route = call_user_func($request->getRouteResolver()); $ignored = $this->container->make('config')->get('antares/ui-components::ignore'); $action = $route->g...
php
protected function validateRequest(Request $request) { if (php_sapi_name() === 'cli') { return false; } $route = call_user_func($request->getRouteResolver()); $ignored = $this->container->make('config')->get('antares/ui-components::ignore'); $action = $route->g...
[ "protected", "function", "validateRequest", "(", "Request", "$", "request", ")", "{", "if", "(", "php_sapi_name", "(", ")", "===", "'cli'", ")", "{", "return", "false", ";", "}", "$", "route", "=", "call_user_func", "(", "$", "request", "->", "getRouteReso...
Validates ajax request @param Request $request @return boolean
[ "Validates", "ajax", "request" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/components/templates/src/Http/Middleware/Middleware.php#L70-L95
227,927
tomwalder/php-appengine-search
src/Search/Schema.php
Schema.createDocument
public function createDocument(array $arr_data = null) { $obj_doc = new Document($this); if(null !== $arr_data) { foreach ($arr_data as $str_field => $mix_value) { $obj_doc->__set($str_field, $mix_value); } } return $obj_doc; }
php
public function createDocument(array $arr_data = null) { $obj_doc = new Document($this); if(null !== $arr_data) { foreach ($arr_data as $str_field => $mix_value) { $obj_doc->__set($str_field, $mix_value); } } return $obj_doc; }
[ "public", "function", "createDocument", "(", "array", "$", "arr_data", "=", "null", ")", "{", "$", "obj_doc", "=", "new", "Document", "(", "$", "this", ")", ";", "if", "(", "null", "!==", "$", "arr_data", ")", "{", "foreach", "(", "$", "arr_data", "a...
Create and return a Document with this Schema Optionally populate with the supplied data @param array|null $arr_data @return Document
[ "Create", "and", "return", "a", "Document", "with", "this", "Schema" ]
e34a7f6ddf2f5e8dc51487562d413ca4fd1331ba
https://github.com/tomwalder/php-appengine-search/blob/e34a7f6ddf2f5e8dc51487562d413ca4fd1331ba/src/Search/Schema.php#L161-L170
227,928
tomwalder/php-appengine-search
src/Search/Schema.php
Schema.addAutoField
public function addAutoField($str_name, $mix_value) { switch(gettype($mix_value)) { case 'integer': case 'double': $this->addNumber($str_name); break; case 'object': if($mix_value instanceof \DateTime) { ...
php
public function addAutoField($str_name, $mix_value) { switch(gettype($mix_value)) { case 'integer': case 'double': $this->addNumber($str_name); break; case 'object': if($mix_value instanceof \DateTime) { ...
[ "public", "function", "addAutoField", "(", "$", "str_name", ",", "$", "mix_value", ")", "{", "switch", "(", "gettype", "(", "$", "mix_value", ")", ")", "{", "case", "'integer'", ":", "case", "'double'", ":", "$", "this", "->", "addNumber", "(", "$", "s...
Determine field type automatically @param $str_name @param $mix_value @return $this
[ "Determine", "field", "type", "automatically" ]
e34a7f6ddf2f5e8dc51487562d413ca4fd1331ba
https://github.com/tomwalder/php-appengine-search/blob/e34a7f6ddf2f5e8dc51487562d413ca4fd1331ba/src/Search/Schema.php#L190-L218
227,929
arnaud-lb/alb-oembed
lib/Alb/OEmbed/Discovery.php
Discovery.discoverFromHtml
public function discoverFromHtml($html) { $links = $this->findLinks($html); if ( ! $link = reset($links)) { return; } $type = null; switch($link['type']) { case 'application/json+oembed': $type = Provider::TYPE_JSON; break; ...
php
public function discoverFromHtml($html) { $links = $this->findLinks($html); if ( ! $link = reset($links)) { return; } $type = null; switch($link['type']) { case 'application/json+oembed': $type = Provider::TYPE_JSON; break; ...
[ "public", "function", "discoverFromHtml", "(", "$", "html", ")", "{", "$", "links", "=", "$", "this", "->", "findLinks", "(", "$", "html", ")", ";", "if", "(", "!", "$", "link", "=", "reset", "(", "$", "links", ")", ")", "{", "return", ";", "}", ...
Discovers and API endpoint from an HTML document @param string $html HTML document @return Provider A Provider instance or NULL
[ "Discovers", "and", "API", "endpoint", "from", "an", "HTML", "document" ]
a14da0282daf88fe290cd507935ece01e7ec8277
https://github.com/arnaud-lb/alb-oembed/blob/a14da0282daf88fe290cd507935ece01e7ec8277/lib/Alb/OEmbed/Discovery.php#L29-L52
227,930
arnaud-lb/alb-oembed
lib/Alb/OEmbed/Discovery.php
Discovery.getEndpointUrl
public function getEndpointUrl($url) { $components = parse_url($url); if (isset($components['query'])) { parse_str($components['query'], $query); unset($query['url']); $components['query'] = http_build_query($query); } return $this->assembleUrl($...
php
public function getEndpointUrl($url) { $components = parse_url($url); if (isset($components['query'])) { parse_str($components['query'], $query); unset($query['url']); $components['query'] = http_build_query($query); } return $this->assembleUrl($...
[ "public", "function", "getEndpointUrl", "(", "$", "url", ")", "{", "$", "components", "=", "parse_url", "(", "$", "url", ")", ";", "if", "(", "isset", "(", "$", "components", "[", "'query'", "]", ")", ")", "{", "parse_str", "(", "$", "components", "[...
Returns an endpoint URL from an URL with the 'url' param pre-filled @param string $url URL @return string URL
[ "Returns", "an", "endpoint", "URL", "from", "an", "URL", "with", "the", "url", "param", "pre", "-", "filled" ]
a14da0282daf88fe290cd507935ece01e7ec8277
https://github.com/arnaud-lb/alb-oembed/blob/a14da0282daf88fe290cd507935ece01e7ec8277/lib/Alb/OEmbed/Discovery.php#L92-L103
227,931
lawoole/framework
src/Support/DispatchEvents.php
DispatchEvents.getEventCallbacks
public function getEventCallbacks($event = null) { if ($event === null) { return $this->eventCallbacks; } return $this->eventCallbacks[strtolower($event)] ?? []; }
php
public function getEventCallbacks($event = null) { if ($event === null) { return $this->eventCallbacks; } return $this->eventCallbacks[strtolower($event)] ?? []; }
[ "public", "function", "getEventCallbacks", "(", "$", "event", "=", "null", ")", "{", "if", "(", "$", "event", "===", "null", ")", "{", "return", "$", "this", "->", "eventCallbacks", ";", "}", "return", "$", "this", "->", "eventCallbacks", "[", "strtolowe...
Get all callbacks for the given event. @param string $event @return array
[ "Get", "all", "callbacks", "for", "the", "given", "event", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Support/DispatchEvents.php#L60-L67
227,932
lawoole/framework
src/Support/DispatchEvents.php
DispatchEvents.dispatchEventToEventCallbacks
protected function dispatchEventToEventCallbacks($event, $arguments) { foreach ($this->getEventCallbacks($event) as $callback) { try { call_user_func_array($callback, $arguments); } catch (Exception $e) { $this->handleException($e); } catch...
php
protected function dispatchEventToEventCallbacks($event, $arguments) { foreach ($this->getEventCallbacks($event) as $callback) { try { call_user_func_array($callback, $arguments); } catch (Exception $e) { $this->handleException($e); } catch...
[ "protected", "function", "dispatchEventToEventCallbacks", "(", "$", "event", ",", "$", "arguments", ")", "{", "foreach", "(", "$", "this", "->", "getEventCallbacks", "(", "$", "event", ")", "as", "$", "callback", ")", "{", "try", "{", "call_user_func_array", ...
Dispatch the event to the event callbacks. @param string $event @param array $arguments
[ "Dispatch", "the", "event", "to", "the", "event", "callbacks", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Support/DispatchEvents.php#L99-L110
227,933
lawoole/framework
src/Support/DispatchEvents.php
DispatchEvents.dispatchEventToEventHandler
protected function dispatchEventToEventHandler($event, $arguments) { if ($this->eventHandler == null || ! method_exists($this->eventHandler, $method = "on{$event}")) { return; } try { $this->eventHandler->$method(...$arguments); } catch (Exception $e) { ...
php
protected function dispatchEventToEventHandler($event, $arguments) { if ($this->eventHandler == null || ! method_exists($this->eventHandler, $method = "on{$event}")) { return; } try { $this->eventHandler->$method(...$arguments); } catch (Exception $e) { ...
[ "protected", "function", "dispatchEventToEventHandler", "(", "$", "event", ",", "$", "arguments", ")", "{", "if", "(", "$", "this", "->", "eventHandler", "==", "null", "||", "!", "method_exists", "(", "$", "this", "->", "eventHandler", ",", "$", "method", ...
Dispatch the event to the event handler. @param string $event @param array $arguments
[ "Dispatch", "the", "event", "to", "the", "event", "handler", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Support/DispatchEvents.php#L118-L131
227,934
lawoole/framework
src/Support/DispatchEvents.php
DispatchEvents.handleException
protected function handleException(Exception $e) { $handler = $this->app->make(ExceptionHandler::class); $handler->report($e); try { $handler->renderForConsole( $this->app->make(OutputInterface::class), $e ); } catch (Throwable $e) { ...
php
protected function handleException(Exception $e) { $handler = $this->app->make(ExceptionHandler::class); $handler->report($e); try { $handler->renderForConsole( $this->app->make(OutputInterface::class), $e ); } catch (Throwable $e) { ...
[ "protected", "function", "handleException", "(", "Exception", "$", "e", ")", "{", "$", "handler", "=", "$", "this", "->", "app", "->", "make", "(", "ExceptionHandler", "::", "class", ")", ";", "$", "handler", "->", "report", "(", "$", "e", ")", ";", ...
Handle the exception with the exception handler. @param \Exception $e
[ "Handle", "the", "exception", "with", "the", "exception", "handler", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Support/DispatchEvents.php#L138-L151
227,935
antaresproject/core
src/components/messages/src/MessageBag.php
MessageBag.extend
public function extend(Closure $callback) { $instance = $this->retrieve(); call_user_func($callback, $instance); return $instance; }
php
public function extend(Closure $callback) { $instance = $this->retrieve(); call_user_func($callback, $instance); return $instance; }
[ "public", "function", "extend", "(", "Closure", "$", "callback", ")", "{", "$", "instance", "=", "$", "this", "->", "retrieve", "(", ")", ";", "call_user_func", "(", "$", "callback", ",", "$", "instance", ")", ";", "return", "$", "instance", ";", "}" ]
Extend Messages instance from session. @param \Closure $callback @return static
[ "Extend", "Messages", "instance", "from", "session", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/messages/src/MessageBag.php#L78-L84
227,936
antaresproject/core
src/foundation/src/Processor/Setting.php
Setting.migrate
public function migrate(SystemUpdateListener $listener) { Foundation::make('antares.publisher.asset')->foundation(); Foundation::make('antares.publisher.migrate')->foundation(); return $listener->systemHasUpdated(); }
php
public function migrate(SystemUpdateListener $listener) { Foundation::make('antares.publisher.asset')->foundation(); Foundation::make('antares.publisher.migrate')->foundation(); return $listener->systemHasUpdated(); }
[ "public", "function", "migrate", "(", "SystemUpdateListener", "$", "listener", ")", "{", "Foundation", "::", "make", "(", "'antares.publisher.asset'", ")", "->", "foundation", "(", ")", ";", "Foundation", "::", "make", "(", "'antares.publisher.migrate'", ")", "->"...
Migrate Antares components. @param \Antares\Contracts\Foundation\Listener\SystemUpdater $listener @return mixed
[ "Migrate", "Antares", "components", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Processor/Setting.php#L105-L111
227,937
lawoole/framework
src/Homer/Serialize/Serializations/ThrowableSerialization.php
ThrowableSerialization.serializeThrowable
public function serializeThrowable(Throwable $e) { $this->class = get_class($e); $this->message = $e->getMessage(); $this->properties = []; try { $reflection = new ReflectionClass($this->class); foreach ($reflection->getProperties() as $property) { ...
php
public function serializeThrowable(Throwable $e) { $this->class = get_class($e); $this->message = $e->getMessage(); $this->properties = []; try { $reflection = new ReflectionClass($this->class); foreach ($reflection->getProperties() as $property) { ...
[ "public", "function", "serializeThrowable", "(", "Throwable", "$", "e", ")", "{", "$", "this", "->", "class", "=", "get_class", "(", "$", "e", ")", ";", "$", "this", "->", "message", "=", "$", "e", "->", "getMessage", "(", ")", ";", "$", "this", "-...
Serialize the throwable. @param \Throwable $e
[ "Serialize", "the", "throwable", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Homer/Serialize/Serializations/ThrowableSerialization.php#L47-L77
227,938
lawoole/framework
src/Homer/Serialize/Serializations/ThrowableSerialization.php
ThrowableSerialization.recover
public function recover() { if (! class_exists($this->class)) { return new RuntimeException($this->message); } try { $reflection = new ReflectionClass($this->class); $e = $reflection->newInstanceWithoutConstructor(); if (! $e instanceof Thro...
php
public function recover() { if (! class_exists($this->class)) { return new RuntimeException($this->message); } try { $reflection = new ReflectionClass($this->class); $e = $reflection->newInstanceWithoutConstructor(); if (! $e instanceof Thro...
[ "public", "function", "recover", "(", ")", "{", "if", "(", "!", "class_exists", "(", "$", "this", "->", "class", ")", ")", "{", "return", "new", "RuntimeException", "(", "$", "this", "->", "message", ")", ";", "}", "try", "{", "$", "reflection", "=",...
Recover the exception from the serialization. @return mixed
[ "Recover", "the", "exception", "from", "the", "serialization", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Homer/Serialize/Serializations/ThrowableSerialization.php#L84-L115
227,939
brick/http
src/Cookie.php
Cookie.parse
public static function parse(string $string) : Cookie { $parts = preg_split('/;\s*/', $string); $nameValue = explode('=', array_shift($parts), 2); if (count($nameValue) !== 2) { throw new \InvalidArgumentException('The cookie string is not valid.'); } [$name, $v...
php
public static function parse(string $string) : Cookie { $parts = preg_split('/;\s*/', $string); $nameValue = explode('=', array_shift($parts), 2); if (count($nameValue) !== 2) { throw new \InvalidArgumentException('The cookie string is not valid.'); } [$name, $v...
[ "public", "static", "function", "parse", "(", "string", "$", "string", ")", ":", "Cookie", "{", "$", "parts", "=", "preg_split", "(", "'/;\\s*/'", ",", "$", "string", ")", ";", "$", "nameValue", "=", "explode", "(", "'='", ",", "array_shift", "(", "$",...
Creates a cookie from the contents of a Set-Cookie header. @param string $string @return Cookie The cookie. @throws \InvalidArgumentException If the cookie string is not valid.
[ "Creates", "a", "cookie", "from", "the", "contents", "of", "a", "Set", "-", "Cookie", "header", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Cookie.php#L86-L150
227,940
lawoole/framework
src/Server/Process/Process.php
Process.createSwooleProcess
protected function createSwooleProcess() { $process = new SwooleProcess(function ($process) { $this->running = true; $process->name(sprintf('%s : Process %s', $this->app->name(), $this->getName() ?: $process->pid)); $this->dispatchEvent('Start', $this->server, $this); ...
php
protected function createSwooleProcess() { $process = new SwooleProcess(function ($process) { $this->running = true; $process->name(sprintf('%s : Process %s', $this->app->name(), $this->getName() ?: $process->pid)); $this->dispatchEvent('Start', $this->server, $this); ...
[ "protected", "function", "createSwooleProcess", "(", ")", "{", "$", "process", "=", "new", "SwooleProcess", "(", "function", "(", "$", "process", ")", "{", "$", "this", "->", "running", "=", "true", ";", "$", "process", "->", "name", "(", "sprintf", "(",...
Create the Swoole process instance. @return \Swoole\Process
[ "Create", "the", "Swoole", "process", "instance", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Server/Process/Process.php#L69-L90
227,941
lawoole/framework
src/Server/Process/Process.php
Process.runnableRetriever
protected function runnableRetriever() { $runnable = $this->getRunnable(); if ($runnable && is_callable($runnable)) { return $runnable; } return function ($server, $process) { $this->dispatchEvent('Run', $server, $process); }; }
php
protected function runnableRetriever() { $runnable = $this->getRunnable(); if ($runnable && is_callable($runnable)) { return $runnable; } return function ($server, $process) { $this->dispatchEvent('Run', $server, $process); }; }
[ "protected", "function", "runnableRetriever", "(", ")", "{", "$", "runnable", "=", "$", "this", "->", "getRunnable", "(", ")", ";", "if", "(", "$", "runnable", "&&", "is_callable", "(", "$", "runnable", ")", ")", "{", "return", "$", "runnable", ";", "}...
Get the runnable for the process. @return callable
[ "Get", "the", "runnable", "for", "the", "process", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Server/Process/Process.php#L167-L178
227,942
lawoole/framework
src/Server/Process/Process.php
Process.bind
public function bind(Server $server) { if ($this->isBound()) { throw new LogicException('Process can be bound to server only once.'); } $this->server = $server; $this->dispatchEvent('Bind', $server, $this); }
php
public function bind(Server $server) { if ($this->isBound()) { throw new LogicException('Process can be bound to server only once.'); } $this->server = $server; $this->dispatchEvent('Bind', $server, $this); }
[ "public", "function", "bind", "(", "Server", "$", "server", ")", "{", "if", "(", "$", "this", "->", "isBound", "(", ")", ")", "{", "throw", "new", "LogicException", "(", "'Process can be bound to server only once.'", ")", ";", "}", "$", "this", "->", "serv...
Bind the process to the server. @param \Lawoole\Server\Server $server
[ "Bind", "the", "process", "to", "the", "server", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Server/Process/Process.php#L185-L194
227,943
antaresproject/core
src/ui/components/datatables/src/DatatablesServiceProvider.php
DatatablesServiceProvider.boot
public function boot() { $path = realpath(__DIR__ . '/../'); $this->loadViewsFrom("{$path}/resources/views", 'datatables-helpers'); $this->mergeConfigFrom("{$path}/resources/config/config.php", 'datatables-config'); $this->app->make('antares.app')->namespaced(null, function (Router...
php
public function boot() { $path = realpath(__DIR__ . '/../'); $this->loadViewsFrom("{$path}/resources/views", 'datatables-helpers'); $this->mergeConfigFrom("{$path}/resources/config/config.php", 'datatables-config'); $this->app->make('antares.app')->namespaced(null, function (Router...
[ "public", "function", "boot", "(", ")", "{", "$", "path", "=", "realpath", "(", "__DIR__", ".", "'/../'", ")", ";", "$", "this", "->", "loadViewsFrom", "(", "\"{$path}/resources/views\"", ",", "'datatables-helpers'", ")", ";", "$", "this", "->", "mergeConfig...
Booting service provider
[ "Booting", "service", "provider" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/components/datatables/src/DatatablesServiceProvider.php#L45-L55
227,944
gggeek/ggwebservices
classes/ggwebservicesserver.php
ggWebservicesServer.showResponse
function showResponse( $functionName, $namespaceURI, &$value ) { $ResponseClass = $this->ResponseClass; $response = new $ResponseClass( $functionName ); $response->setValue( $value ); // allow subclasses to inject in response more info that they have from request $this->prep...
php
function showResponse( $functionName, $namespaceURI, &$value ) { $ResponseClass = $this->ResponseClass; $response = new $ResponseClass( $functionName ); $response->setValue( $value ); // allow subclasses to inject in response more info that they have from request $this->prep...
[ "function", "showResponse", "(", "$", "functionName", ",", "$", "namespaceURI", ",", "&", "$", "value", ")", "{", "$", "ResponseClass", "=", "$", "this", "->", "ResponseClass", ";", "$", "response", "=", "new", "$", "ResponseClass", "(", "$", "functionName...
Echoes the response, setting http headers and such @todo it would be easier if the request object was passed to this method. Right now we are forced to duplicate extra info coming from the request into the server itself, to reinject it into the response using the prepareResponse() method. Examples: request ID for jsonr...
[ "Echoes", "the", "response", "setting", "http", "headers", "and", "such" ]
4f6e1ada1aa94301acd2ef3cd0966c7be06313ec
https://github.com/gggeek/ggwebservices/blob/4f6e1ada1aa94301acd2ef3cd0966c7be06313ec/classes/ggwebservicesserver.php#L68-L98
227,945
gggeek/ggwebservices
classes/ggwebservicesserver.php
ggWebservicesServer.processRequest
function processRequest() { /* tis' the job of the index page, not of the class! global $HTTP_SERVER_VARS; if ( $HTTP_SERVER_VARS["REQUEST_METHOD"] != "POST" ) { print( "Error: this web page does only understand POST methods" ); exit(); } */ ...
php
function processRequest() { /* tis' the job of the index page, not of the class! global $HTTP_SERVER_VARS; if ( $HTTP_SERVER_VARS["REQUEST_METHOD"] != "POST" ) { print( "Error: this web page does only understand POST methods" ); exit(); } */ ...
[ "function", "processRequest", "(", ")", "{", "/* tis' the job of the index page, not of the class!\n global $HTTP_SERVER_VARS;\n if ( $HTTP_SERVER_VARS[\"REQUEST_METHOD\"] != \"POST\" )\n {\n print( \"Error: this web page does only understand POST methods\" );\n ...
Processes the request and prints out the proper response. @todo if function gzinflate does not exist, we should return a more appropriate http-level error
[ "Processes", "the", "request", "and", "prints", "out", "the", "proper", "response", "." ]
4f6e1ada1aa94301acd2ef3cd0966c7be06313ec
https://github.com/gggeek/ggwebservices/blob/4f6e1ada1aa94301acd2ef3cd0966c7be06313ec/classes/ggwebservicesserver.php#L118-L167
227,946
gggeek/ggwebservices
classes/ggwebservicesserver.php
ggWebservicesServer.handleRequest
function handleRequest( $functionName, $params ) { if ( array_key_exists( $functionName, $this->FunctionList ) ) { $paramsOk = false; foreach( $this->FunctionList[$functionName] as $paramDesc ) { $paramsOk = ( ( $paramDesc === null ) || $this->vali...
php
function handleRequest( $functionName, $params ) { if ( array_key_exists( $functionName, $this->FunctionList ) ) { $paramsOk = false; foreach( $this->FunctionList[$functionName] as $paramDesc ) { $paramsOk = ( ( $paramDesc === null ) || $this->vali...
[ "function", "handleRequest", "(", "$", "functionName", ",", "$", "params", ")", "{", "if", "(", "array_key_exists", "(", "$", "functionName", ",", "$", "this", "->", "FunctionList", ")", ")", "{", "$", "paramsOk", "=", "false", ";", "foreach", "(", "$", ...
Verifies if the given request has been registered as an exposed webservice and executes it. Called by processRequest.
[ "Verifies", "if", "the", "given", "request", "has", "been", "registered", "as", "an", "exposed", "webservice", "and", "executes", "it", ".", "Called", "by", "processRequest", "." ]
4f6e1ada1aa94301acd2ef3cd0966c7be06313ec
https://github.com/gggeek/ggwebservices/blob/4f6e1ada1aa94301acd2ef3cd0966c7be06313ec/classes/ggwebservicesserver.php#L221-L273
227,947
gggeek/ggwebservices
classes/ggwebservicesserver.php
ggWebservicesServer.registerObject
function registerObject( $objectName, $includeFile = null ) { // file_exists check is useless, since it does not scan include path. Let coder eat his own dog food... if ( $includeFile !== null ) //&& file_exists( $includeFile ) ) include_once( $includeFile ); if ( class_exists( ...
php
function registerObject( $objectName, $includeFile = null ) { // file_exists check is useless, since it does not scan include path. Let coder eat his own dog food... if ( $includeFile !== null ) //&& file_exists( $includeFile ) ) include_once( $includeFile ); if ( class_exists( ...
[ "function", "registerObject", "(", "$", "objectName", ",", "$", "includeFile", "=", "null", ")", "{", "// file_exists check is useless, since it does not scan include path. Let coder eat his own dog food...", "if", "(", "$", "includeFile", "!==", "null", ")", "//&& file_exist...
Registers all functions of an object on the server. @return bool Returns false if the object could not be registered. @todo add optional introspection-based param registering @todo add single method registration @todo add registration of per-method descriptions
[ "Registers", "all", "functions", "of", "an", "object", "on", "the", "server", "." ]
4f6e1ada1aa94301acd2ef3cd0966c7be06313ec
https://github.com/gggeek/ggwebservices/blob/4f6e1ada1aa94301acd2ef3cd0966c7be06313ec/classes/ggwebservicesserver.php#L307-L328
227,948
antaresproject/core
src/components/messages/src/Extension/FlashMessenger.php
FlashMessenger.checkout
protected function checkout(MessageBag $messages) { $html = ''; $hasError = false; $hasSuccess = false; foreach (['error', 'info', 'success', 'warning'] as $key) { if ($messages->has($key)) { $hasError = (!$hasError && $key == 'error'); ...
php
protected function checkout(MessageBag $messages) { $html = ''; $hasError = false; $hasSuccess = false; foreach (['error', 'info', 'success', 'warning'] as $key) { if ($messages->has($key)) { $hasError = (!$hasError && $key == 'error'); ...
[ "protected", "function", "checkout", "(", "MessageBag", "$", "messages", ")", "{", "$", "html", "=", "''", ";", "$", "hasError", "=", "false", ";", "$", "hasSuccess", "=", "false", ";", "foreach", "(", "[", "'error'", ",", "'info'", ",", "'success'", "...
checkout messages from session container @param MessageBag $messages @return string
[ "checkout", "messages", "from", "session", "container" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/messages/src/Extension/FlashMessenger.php#L108-L128
227,949
antaresproject/core
src/components/html/src/Adapter/FieldPermissionAdapter.php
FieldPermissionAdapter.getFormConfigKey
private function getFormConfigKey($name, array $control) { if ($this->isFrontend($control['component'])) { $control['component'] = 'content'; $control['method'] = 'index'; } return implode(self::separator, [$control['component'], $control['action'], $control['metho...
php
private function getFormConfigKey($name, array $control) { if ($this->isFrontend($control['component'])) { $control['component'] = 'content'; $control['method'] = 'index'; } return implode(self::separator, [$control['component'], $control['action'], $control['metho...
[ "private", "function", "getFormConfigKey", "(", "$", "name", ",", "array", "$", "control", ")", "{", "if", "(", "$", "this", "->", "isFrontend", "(", "$", "control", "[", "'component'", "]", ")", ")", "{", "$", "control", "[", "'component'", "]", "=", ...
form config keyname getter @param String $name @param array $control @return String
[ "form", "config", "keyname", "getter" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Adapter/FieldPermissionAdapter.php#L71-L78
227,950
antaresproject/core
src/components/html/src/Adapter/FieldPermissionAdapter.php
FieldPermissionAdapter.display
protected function display(FieldContract $control, array $displayable = array()) { $name = $control->get('name'); $shouldBeDisplayed = false; if ($control->force_displayable) { return true; } foreach ($displayable as $field) { if ($name =...
php
protected function display(FieldContract $control, array $displayable = array()) { $name = $control->get('name'); $shouldBeDisplayed = false; if ($control->force_displayable) { return true; } foreach ($displayable as $field) { if ($name =...
[ "protected", "function", "display", "(", "FieldContract", "$", "control", ",", "array", "$", "displayable", "=", "array", "(", ")", ")", "{", "$", "name", "=", "$", "control", "->", "get", "(", "'name'", ")", ";", "$", "shouldBeDisplayed", "=", "false", ...
resolve field display depends on form configuration @param FieldContract $control @param array $displayable
[ "resolve", "field", "display", "depends", "on", "form", "configuration" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Adapter/FieldPermissionAdapter.php#L128-L143
227,951
antaresproject/core
src/components/html/src/Adapter/FieldPermissionAdapter.php
FieldPermissionAdapter.resolveEditableField
protected function resolveEditableField(FieldContract $control, array $editable = array()) { $name = $control->get('name'); if ($control->force_editable) { return $control; } $shouldBeEdited = false; foreach ($editable as $editableField) { if ($name ==...
php
protected function resolveEditableField(FieldContract $control, array $editable = array()) { $name = $control->get('name'); if ($control->force_editable) { return $control; } $shouldBeEdited = false; foreach ($editable as $editableField) { if ($name ==...
[ "protected", "function", "resolveEditableField", "(", "FieldContract", "$", "control", ",", "array", "$", "editable", "=", "array", "(", ")", ")", "{", "$", "name", "=", "$", "control", "->", "get", "(", "'name'", ")", ";", "if", "(", "$", "control", "...
resolve field edition depends on form configuration @param FieldContract $control @param array $editable @param array $disabled
[ "resolve", "field", "edition", "depends", "on", "form", "configuration" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Adapter/FieldPermissionAdapter.php#L152-L169
227,952
antaresproject/core
src/components/html/src/Adapter/FieldPermissionAdapter.php
FieldPermissionAdapter.validate
protected function validate($name, $key = null) { if (!is_null($key)) { return Memory::make('forms-config')->get($key); } $control = $this->runtime->get('control', []); /** before middleware gives information about current middleware action and controller * */ if...
php
protected function validate($name, $key = null) { if (!is_null($key)) { return Memory::make('forms-config')->get($key); } $control = $this->runtime->get('control', []); /** before middleware gives information about current middleware action and controller * */ if...
[ "protected", "function", "validate", "(", "$", "name", ",", "$", "key", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "key", ")", ")", "{", "return", "Memory", "::", "make", "(", "'forms-config'", ")", "->", "get", "(", "$", "key", ...
validate current form configuration and matching with route middleware settings @param String $name @param String $key @return boolean|array
[ "validate", "current", "form", "configuration", "and", "matching", "with", "route", "middleware", "settings" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Adapter/FieldPermissionAdapter.php#L178-L201
227,953
antaresproject/core
src/components/support/src/Providers/Traits/MiddlewareProviderTrait.php
MiddlewareProviderTrait.resolveModuleName
protected function resolveModuleName() { if (!isset($this->routeGroup)) { return ''; } return join('.', [str_replace('/', '.', $this->routeGroup), self::$withSuffix]); }
php
protected function resolveModuleName() { if (!isset($this->routeGroup)) { return ''; } return join('.', [str_replace('/', '.', $this->routeGroup), self::$withSuffix]); }
[ "protected", "function", "resolveModuleName", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "routeGroup", ")", ")", "{", "return", "''", ";", "}", "return", "join", "(", "'.'", ",", "[", "str_replace", "(", "'/'", ",", "'.'", ",", ...
middleware route keyname creator @return String
[ "middleware", "route", "keyname", "creator" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/support/src/Providers/Traits/MiddlewareProviderTrait.php#L74-L80
227,954
gggeek/ggwebservices
lib/xmlrpc/xmlrpcs.inc.php
xmlrpc_server.serializeDebug
function serializeDebug($charset_encoding='') { // Tough encoding problem: which internal charset should we assume for debug info? // It might contain a copy of raw data received from client, ie with unknown encoding, // intermixed with php generated data and user generated data... // so we split it: syst...
php
function serializeDebug($charset_encoding='') { // Tough encoding problem: which internal charset should we assume for debug info? // It might contain a copy of raw data received from client, ie with unknown encoding, // intermixed with php generated data and user generated data... // so we split it: syst...
[ "function", "serializeDebug", "(", "$", "charset_encoding", "=", "''", ")", "{", "// Tough encoding problem: which internal charset should we assume for debug info?", "// It might contain a copy of raw data received from client, ie with unknown encoding,", "// intermixed with php generated dat...
Return a string with the serialized representation of all debug info @param string $charset_encoding the target charset encoding for the serialization @return string an XML comment (or two)
[ "Return", "a", "string", "with", "the", "serialized", "representation", "of", "all", "debug", "info" ]
4f6e1ada1aa94301acd2ef3cd0966c7be06313ec
https://github.com/gggeek/ggwebservices/blob/4f6e1ada1aa94301acd2ef3cd0966c7be06313ec/lib/xmlrpc/xmlrpcs.inc.php#L556-L577
227,955
gggeek/ggwebservices
lib/xmlrpc/xmlrpcs.inc.php
xmlrpc_server.service
function service($data=null, $return_payload=false) { if ($data === null) { // workaround for a known bug in php ver. 5.2.2 that broke $HTTP_RAW_POST_DATA $data = file_get_contents('php://input'); } $raw_data = $data; // reset internal debug info $this->debug_info = ''; // E...
php
function service($data=null, $return_payload=false) { if ($data === null) { // workaround for a known bug in php ver. 5.2.2 that broke $HTTP_RAW_POST_DATA $data = file_get_contents('php://input'); } $raw_data = $data; // reset internal debug info $this->debug_info = ''; // E...
[ "function", "service", "(", "$", "data", "=", "null", ",", "$", "return_payload", "=", "false", ")", "{", "if", "(", "$", "data", "===", "null", ")", "{", "// workaround for a known bug in php ver. 5.2.2 that broke $HTTP_RAW_POST_DATA", "$", "data", "=", "file_get...
Execute the xmlrpc request, printing the response @param string $data the request body. If null, the http POST request will be examined @return xmlrpcresp the response object (usually not used by caller...) @access public
[ "Execute", "the", "xmlrpc", "request", "printing", "the", "response" ]
4f6e1ada1aa94301acd2ef3cd0966c7be06313ec
https://github.com/gggeek/ggwebservices/blob/4f6e1ada1aa94301acd2ef3cd0966c7be06313ec/lib/xmlrpc/xmlrpcs.inc.php#L585-L683
227,956
gggeek/ggwebservices
lib/xmlrpc/xmlrpcs.inc.php
xmlrpc_server.add_to_map
function add_to_map($methodname,$function,$sig=null,$doc=false,$sigdoc=false) { $this->dmap[$methodname] = array( 'function' => $function, 'docstring' => $doc ); if ($sig) { $this->dmap[$methodname]['signature'] = $sig; } if ($sigdoc) { $this->dmap[$methodname]['signature_docs'] =...
php
function add_to_map($methodname,$function,$sig=null,$doc=false,$sigdoc=false) { $this->dmap[$methodname] = array( 'function' => $function, 'docstring' => $doc ); if ($sig) { $this->dmap[$methodname]['signature'] = $sig; } if ($sigdoc) { $this->dmap[$methodname]['signature_docs'] =...
[ "function", "add_to_map", "(", "$", "methodname", ",", "$", "function", ",", "$", "sig", "=", "null", ",", "$", "doc", "=", "false", ",", "$", "sigdoc", "=", "false", ")", "{", "$", "this", "->", "dmap", "[", "$", "methodname", "]", "=", "array", ...
Add a method to the dispatch map @param string $methodname the name with which the method will be made available @param string $function the php function that will get invoked @param array $sig the array of valid method signatures @param string $doc method documentation @param array $sigdoc the array of valid method si...
[ "Add", "a", "method", "to", "the", "dispatch", "map" ]
4f6e1ada1aa94301acd2ef3cd0966c7be06313ec
https://github.com/gggeek/ggwebservices/blob/4f6e1ada1aa94301acd2ef3cd0966c7be06313ec/lib/xmlrpc/xmlrpcs.inc.php#L694-L708
227,957
gggeek/ggwebservices
lib/xmlrpc/xmlrpcs.inc.php
xmlrpc_server.verifySignature
function verifySignature($in, $sig) { // check each possible signature in turn if (is_object($in)) { $numParams = $in->getNumParams(); } else { $numParams = count($in); } foreach($sig as $cursig) { if(count($cursig)==$numParams+1) { $itsOK=1; for($n=0; $n<$numParam...
php
function verifySignature($in, $sig) { // check each possible signature in turn if (is_object($in)) { $numParams = $in->getNumParams(); } else { $numParams = count($in); } foreach($sig as $cursig) { if(count($cursig)==$numParams+1) { $itsOK=1; for($n=0; $n<$numParam...
[ "function", "verifySignature", "(", "$", "in", ",", "$", "sig", ")", "{", "// check each possible signature in turn", "if", "(", "is_object", "(", "$", "in", ")", ")", "{", "$", "numParams", "=", "$", "in", "->", "getNumParams", "(", ")", ";", "}", "else...
Verify type and number of parameters received against a list of known signatures @param array $in array of either xmlrpcval objects or xmlrpc type definitions @param array $sig array of known signatures to match against @return array @access private
[ "Verify", "type", "and", "number", "of", "parameters", "received", "against", "a", "list", "of", "known", "signatures" ]
4f6e1ada1aa94301acd2ef3cd0966c7be06313ec
https://github.com/gggeek/ggwebservices/blob/4f6e1ada1aa94301acd2ef3cd0966c7be06313ec/lib/xmlrpc/xmlrpcs.inc.php#L717-L776
227,958
lawoole/framework
src/Homer/Serialize/Serializations/ArraySerialization.php
ArraySerialization.recover
public function recover() { return array_map(function ($value) { return $value instanceof Serialization ? $value->recover() : $value; }, $this->values); }
php
public function recover() { return array_map(function ($value) { return $value instanceof Serialization ? $value->recover() : $value; }, $this->values); }
[ "public", "function", "recover", "(", ")", "{", "return", "array_map", "(", "function", "(", "$", "value", ")", "{", "return", "$", "value", "instanceof", "Serialization", "?", "$", "value", "->", "recover", "(", ")", ":", "$", "value", ";", "}", ",", ...
Recover the array from the serialization. @return array|\ArrayAccess
[ "Recover", "the", "array", "from", "the", "serialization", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Homer/Serialize/Serializations/ArraySerialization.php#L32-L37
227,959
antaresproject/core
src/ui/components/datatables/src/Services/DataTable.php
DataTable.getQuery
protected function getQuery($applyGlobalGroupScope = true) { $query = $this->query(); $this->addFilters(); $finalQuery = $this->applyScopes($query); if ($applyGlobalGroupScope) { $this->applyGlobalGroupScope($finalQuery); } $request = app('request'); ...
php
protected function getQuery($applyGlobalGroupScope = true) { $query = $this->query(); $this->addFilters(); $finalQuery = $this->applyScopes($query); if ($applyGlobalGroupScope) { $this->applyGlobalGroupScope($finalQuery); } $request = app('request'); ...
[ "protected", "function", "getQuery", "(", "$", "applyGlobalGroupScope", "=", "true", ")", "{", "$", "query", "=", "$", "this", "->", "query", "(", ")", ";", "$", "this", "->", "addFilters", "(", ")", ";", "$", "finalQuery", "=", "$", "this", "->", "a...
Query getter for defer initialization @param boolean $applyGlobalGroupScope
[ "Query", "getter", "for", "defer", "initialization" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/components/datatables/src/Services/DataTable.php#L152-L170
227,960
antaresproject/core
src/ui/components/datatables/src/Services/DataTable.php
DataTable.addFilters
private function addFilters() { if (empty($this->filters)) { return; } foreach ($this->filters as $filter) { if (!class_exists($filter)) { continue; } $scope = app($filter); $this->addScope($scope); } ...
php
private function addFilters() { if (empty($this->filters)) { return; } foreach ($this->filters as $filter) { if (!class_exists($filter)) { continue; } $scope = app($filter); $this->addScope($scope); } ...
[ "private", "function", "addFilters", "(", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "filters", ")", ")", "{", "return", ";", "}", "foreach", "(", "$", "this", "->", "filters", "as", "$", "filter", ")", "{", "if", "(", "!", "class_exists...
add filters to datatable instance @return void
[ "add", "filters", "to", "datatable", "instance" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/components/datatables/src/Services/DataTable.php#L202-L216
227,961
antaresproject/core
src/ui/components/datatables/src/Services/DataTable.php
DataTable.prepare
public function prepare($query = null) { $of = is_null($query) ? $this->getQuery() : $query; $datatables = $this->datatables->of($of, get_class($this)); $path = str_replace(url('/'), '', url()->current()); Event::fire("datatables.value.{$path}", [$datatables]); ...
php
public function prepare($query = null) { $of = is_null($query) ? $this->getQuery() : $query; $datatables = $this->datatables->of($of, get_class($this)); $path = str_replace(url('/'), '', url()->current()); Event::fire("datatables.value.{$path}", [$datatables]); ...
[ "public", "function", "prepare", "(", "$", "query", "=", "null", ")", "{", "$", "of", "=", "is_null", "(", "$", "query", ")", "?", "$", "this", "->", "getQuery", "(", ")", ":", "$", "query", ";", "$", "datatables", "=", "$", "this", "->", "datata...
prepare datatable instance before @param EloquentBuilder|Collection $query @return \Antares\Datatables\Engines\BaseEngine
[ "prepare", "datatable", "instance", "before" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/components/datatables/src/Services/DataTable.php#L234-L243
227,962
antaresproject/core
src/ui/components/datatables/src/Services/DataTable.php
DataTable.decorateActions
public function decorateActions($row = null) { if (empty($this->tableActions)) { return ''; } $html = app('html'); $section = $html->create('div', $html->raw(implode('', $this->tableActions->toArray())), ['class' => 'mass-actions-menu', 'data-id' => $row->id ? $row->id...
php
public function decorateActions($row = null) { if (empty($this->tableActions)) { return ''; } $html = app('html'); $section = $html->create('div', $html->raw(implode('', $this->tableActions->toArray())), ['class' => 'mass-actions-menu', 'data-id' => $row->id ? $row->id...
[ "public", "function", "decorateActions", "(", "$", "row", "=", "null", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "tableActions", ")", ")", "{", "return", "''", ";", "}", "$", "html", "=", "app", "(", "'html'", ")", ";", "$", "section", ...
row actions decorator @return String
[ "row", "actions", "decorator" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/components/datatables/src/Services/DataTable.php#L261-L270
227,963
antaresproject/core
src/ui/components/datatables/src/Services/DataTable.php
DataTable.getQuickSearchRow
public function getQuickSearchRow(array $data = []) { $pattern = ''; try { $pattern = $this->getPatternUrl(); } catch (Exception $ex) { } $view = array_get($this->search, 'view'); if (!view()->exists($view)) { return false; ...
php
public function getQuickSearchRow(array $data = []) { $pattern = ''; try { $pattern = $this->getPatternUrl(); } catch (Exception $ex) { } $view = array_get($this->search, 'view'); if (!view()->exists($view)) { return false; ...
[ "public", "function", "getQuickSearchRow", "(", "array", "$", "data", "=", "[", "]", ")", "{", "$", "pattern", "=", "''", ";", "try", "{", "$", "pattern", "=", "$", "this", "->", "getPatternUrl", "(", ")", ";", "}", "catch", "(", "Exception", "$", ...
Gets quick search params @return String
[ "Gets", "quick", "search", "params" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/components/datatables/src/Services/DataTable.php#L314-L334
227,964
crossjoin/PreMailer
src/Crossjoin/PreMailer/HtmlString.php
HtmlString.setHtmlContent
protected function setHtmlContent($htmlContent) { if (is_string($htmlContent)) { $this->content = $htmlContent; } else { throw new \InvalidArgumentException( "Invalid type '" . gettype($htmlContent). "' for argument 'htmlContent' given." ); ...
php
protected function setHtmlContent($htmlContent) { if (is_string($htmlContent)) { $this->content = $htmlContent; } else { throw new \InvalidArgumentException( "Invalid type '" . gettype($htmlContent). "' for argument 'htmlContent' given." ); ...
[ "protected", "function", "setHtmlContent", "(", "$", "htmlContent", ")", "{", "if", "(", "is_string", "(", "$", "htmlContent", ")", ")", "{", "$", "this", "->", "content", "=", "$", "htmlContent", ";", "}", "else", "{", "throw", "new", "\\", "InvalidArgu...
Sets the HTML content @param string $htmlContent @return $this
[ "Sets", "the", "HTML", "content" ]
e1fbd426a9f3ba2d5d00f6641b2509c72bf4f561
https://github.com/crossjoin/PreMailer/blob/e1fbd426a9f3ba2d5d00f6641b2509c72bf4f561/src/Crossjoin/PreMailer/HtmlString.php#L26-L37
227,965
antaresproject/core
src/foundation/src/Support/Providers/ModuleServiceProvider.php
ModuleServiceProvider.bootApiRouting
public function bootApiRouting(Router $router) { if (!$this->app->make('antares.request')->shouldMakeApiResponse()) { return; } $routerAdapter = $this->app->make(Adapter::class); $routes = []; /* @var $route \Illuminate\Routing\Route */ foreach (...
php
public function bootApiRouting(Router $router) { if (!$this->app->make('antares.request')->shouldMakeApiResponse()) { return; } $routerAdapter = $this->app->make(Adapter::class); $routes = []; /* @var $route \Illuminate\Routing\Route */ foreach (...
[ "public", "function", "bootApiRouting", "(", "Router", "$", "router", ")", "{", "if", "(", "!", "$", "this", "->", "app", "->", "make", "(", "'antares.request'", ")", "->", "shouldMakeApiResponse", "(", ")", ")", "{", "return", ";", "}", "$", "routerAdap...
Register router for API requests. @param Router $router
[ "Register", "router", "for", "API", "requests", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Support/Providers/ModuleServiceProvider.php#L161-L182
227,966
antaresproject/core
src/foundation/src/Support/Providers/ModuleServiceProvider.php
ModuleServiceProvider.setExtensionPath
protected function setExtensionPath() { $filename = (new ReflectionClass($this))->getFileName(); return $this->extensionPath = (new SplFileInfo($filename))->getPath(); }
php
protected function setExtensionPath() { $filename = (new ReflectionClass($this))->getFileName(); return $this->extensionPath = (new SplFileInfo($filename))->getPath(); }
[ "protected", "function", "setExtensionPath", "(", ")", "{", "$", "filename", "=", "(", "new", "ReflectionClass", "(", "$", "this", ")", ")", "->", "getFileName", "(", ")", ";", "return", "$", "this", "->", "extensionPath", "=", "(", "new", "SplFileInfo", ...
extension path resolver @return String
[ "extension", "path", "resolver" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Support/Providers/ModuleServiceProvider.php#L189-L194
227,967
antaresproject/core
src/foundation/src/Support/Providers/ModuleServiceProvider.php
ModuleServiceProvider.loadRoutes
protected function loadRoutes() { $path = $this->extensionPath; $routes = [ 'backend' => [ $path . DIRECTORY_SEPARATOR . 'Http' . DIRECTORY_SEPARATOR . 'backend.php', $path . DIRECTORY_SEPARATOR . 'backend.php', $path . DIRECTORY_SEPARATO...
php
protected function loadRoutes() { $path = $this->extensionPath; $routes = [ 'backend' => [ $path . DIRECTORY_SEPARATOR . 'Http' . DIRECTORY_SEPARATOR . 'backend.php', $path . DIRECTORY_SEPARATOR . 'backend.php', $path . DIRECTORY_SEPARATO...
[ "protected", "function", "loadRoutes", "(", ")", "{", "$", "path", "=", "$", "this", "->", "extensionPath", ";", "$", "routes", "=", "[", "'backend'", "=>", "[", "$", "path", ".", "DIRECTORY_SEPARATOR", ".", "'Http'", ".", "DIRECTORY_SEPARATOR", ".", "'bac...
Boot extension routing. @return void
[ "Boot", "extension", "routing", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Support/Providers/ModuleServiceProvider.php#L201-L231
227,968
antaresproject/core
src/foundation/src/Support/Providers/ModuleServiceProvider.php
ModuleServiceProvider.bootMemory
protected function bootMemory() { if (!isset($this->routeGroup) or strlen($this->routeGroup) <= 0) { throw new RuntimeException('Invalid extension route group.'); } $this->app->make('antares.acl')->make($this->routeGroup)->attach( $this->app->make('antares.platfo...
php
protected function bootMemory() { if (!isset($this->routeGroup) or strlen($this->routeGroup) <= 0) { throw new RuntimeException('Invalid extension route group.'); } $this->app->make('antares.acl')->make($this->routeGroup)->attach( $this->app->make('antares.platfo...
[ "protected", "function", "bootMemory", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "routeGroup", ")", "or", "strlen", "(", "$", "this", "->", "routeGroup", ")", "<=", "0", ")", "{", "throw", "new", "RuntimeException", "(", "'Invalid...
boots extension memory @throws RuntimeException
[ "boots", "extension", "memory" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Support/Providers/ModuleServiceProvider.php#L238-L247
227,969
antaresproject/core
src/foundation/src/Support/Providers/ModuleServiceProvider.php
ModuleServiceProvider.bootConfiguration
protected function bootConfiguration() { $path = $this->extensionPath . '/../'; $this->addConfigComponent($this->routeGroup, $this->routeGroup, "{$path}/resources/config"); $this->addLanguageComponent($this->routeGroup, $this->routeGroup, "{$path}/resources/lang"); $this->addViewComp...
php
protected function bootConfiguration() { $path = $this->extensionPath . '/../'; $this->addConfigComponent($this->routeGroup, $this->routeGroup, "{$path}/resources/config"); $this->addLanguageComponent($this->routeGroup, $this->routeGroup, "{$path}/resources/lang"); $this->addViewComp...
[ "protected", "function", "bootConfiguration", "(", ")", "{", "$", "path", "=", "$", "this", "->", "extensionPath", ".", "'/../'", ";", "$", "this", "->", "addConfigComponent", "(", "$", "this", "->", "routeGroup", ",", "$", "this", "->", "routeGroup", ",",...
boot extension configuration
[ "boot", "extension", "configuration" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Support/Providers/ModuleServiceProvider.php#L252-L258
227,970
antaresproject/core
src/foundation/src/Support/Providers/ModuleServiceProvider.php
ModuleServiceProvider.bind
protected function bind() { if (!isset($this->di)) { return false; } foreach ($this->di as $contract => $object) { $this->app->bind($contract, $object); } }
php
protected function bind() { if (!isset($this->di)) { return false; } foreach ($this->di as $contract => $object) { $this->app->bind($contract, $object); } }
[ "protected", "function", "bind", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "di", ")", ")", "{", "return", "false", ";", "}", "foreach", "(", "$", "this", "->", "di", "as", "$", "contract", "=>", "$", "object", ")", "{", "$...
binds contracts to objects @return boolean
[ "binds", "contracts", "to", "objects" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Support/Providers/ModuleServiceProvider.php#L308-L316
227,971
antaresproject/core
src/foundation/src/Support/Providers/ModuleServiceProvider.php
ModuleServiceProvider.attachMenu
protected function attachMenu($classnames) { $menuComposer = MenuComposer::getInstance(); if (is_array($classnames)) { foreach ($classnames as $classname) { $menuComposer->compose($classname); } return; } return $menuComposer->compo...
php
protected function attachMenu($classnames) { $menuComposer = MenuComposer::getInstance(); if (is_array($classnames)) { foreach ($classnames as $classname) { $menuComposer->compose($classname); } return; } return $menuComposer->compo...
[ "protected", "function", "attachMenu", "(", "$", "classnames", ")", "{", "$", "menuComposer", "=", "MenuComposer", "::", "getInstance", "(", ")", ";", "if", "(", "is_array", "(", "$", "classnames", ")", ")", "{", "foreach", "(", "$", "classnames", "as", ...
attaches menu to application container @param mixed $classnames @return mixed
[ "attaches", "menu", "to", "application", "container" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Support/Providers/ModuleServiceProvider.php#L324-L334
227,972
antaresproject/core
src/foundation/src/Support/Providers/ModuleServiceProvider.php
ModuleServiceProvider.bindContracts
protected function bindContracts() { $dir = dirname((new ReflectionClass(get_called_class()))->getFileName()); $configPath = $dir . '/../resources/config/config.php'; if (!file_exists($configPath)) { return false; } if (empty($di = require $configPath)) { ...
php
protected function bindContracts() { $dir = dirname((new ReflectionClass(get_called_class()))->getFileName()); $configPath = $dir . '/../resources/config/config.php'; if (!file_exists($configPath)) { return false; } if (empty($di = require $configPath)) { ...
[ "protected", "function", "bindContracts", "(", ")", "{", "$", "dir", "=", "dirname", "(", "(", "new", "ReflectionClass", "(", "get_called_class", "(", ")", ")", ")", "->", "getFileName", "(", ")", ")", ";", "$", "configPath", "=", "$", "dir", ".", "'/....
bind contracts to its classes @return boolean
[ "bind", "contracts", "to", "its", "classes" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Support/Providers/ModuleServiceProvider.php#L341-L355
227,973
antaresproject/core
src/foundation/src/Support/Providers/ModuleServiceProvider.php
ModuleServiceProvider.loadBreadcrumbsFile
private function loadBreadcrumbsFile() { $path = $this->extensionPath . DIRECTORY_SEPARATOR . 'Http' . DIRECTORY_SEPARATOR . 'breadcrumbs.php'; if (file_exists($path)) { $manager = $this->app->instance(Manager::class, $this->app->make(Manager::class)); require_once $path; ...
php
private function loadBreadcrumbsFile() { $path = $this->extensionPath . DIRECTORY_SEPARATOR . 'Http' . DIRECTORY_SEPARATOR . 'breadcrumbs.php'; if (file_exists($path)) { $manager = $this->app->instance(Manager::class, $this->app->make(Manager::class)); require_once $path; ...
[ "private", "function", "loadBreadcrumbsFile", "(", ")", "{", "$", "path", "=", "$", "this", "->", "extensionPath", ".", "DIRECTORY_SEPARATOR", ".", "'Http'", ".", "DIRECTORY_SEPARATOR", ".", "'breadcrumbs.php'", ";", "if", "(", "file_exists", "(", "$", "path", ...
Loads breaedcrumbs file.
[ "Loads", "breaedcrumbs", "file", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Support/Providers/ModuleServiceProvider.php#L360-L369
227,974
antaresproject/core
src/foundation/src/Support/Providers/ModuleServiceProvider.php
ModuleServiceProvider.loadMenuFile
private function loadMenuFile() { $path = $this->extensionPath . DIRECTORY_SEPARATOR . 'Http' . DIRECTORY_SEPARATOR . 'menu.php'; if (file_exists($path)) { $menu = $this->app->make(MenuAssigner::class); require_once $path; } }
php
private function loadMenuFile() { $path = $this->extensionPath . DIRECTORY_SEPARATOR . 'Http' . DIRECTORY_SEPARATOR . 'menu.php'; if (file_exists($path)) { $menu = $this->app->make(MenuAssigner::class); require_once $path; } }
[ "private", "function", "loadMenuFile", "(", ")", "{", "$", "path", "=", "$", "this", "->", "extensionPath", ".", "DIRECTORY_SEPARATOR", ".", "'Http'", ".", "DIRECTORY_SEPARATOR", ".", "'menu.php'", ";", "if", "(", "file_exists", "(", "$", "path", ")", ")", ...
Loads menu file.
[ "Loads", "menu", "file", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Support/Providers/ModuleServiceProvider.php#L374-L382
227,975
antaresproject/core
src/foundation/src/Support/Providers/ModuleServiceProvider.php
ModuleServiceProvider.importNotifications
protected function importNotifications(string $extension) { $this->afterActivated($extension, function() use($extension) { \Artisan::call('notifications:import', compact('extension')); }); }
php
protected function importNotifications(string $extension) { $this->afterActivated($extension, function() use($extension) { \Artisan::call('notifications:import', compact('extension')); }); }
[ "protected", "function", "importNotifications", "(", "string", "$", "extension", ")", "{", "$", "this", "->", "afterActivated", "(", "$", "extension", ",", "function", "(", ")", "use", "(", "$", "extension", ")", "{", "\\", "Artisan", "::", "call", "(", ...
Imports notifications after activation of the given extension. @param string $extension Ex. antaresproject/module-sample_module
[ "Imports", "notifications", "after", "activation", "of", "the", "given", "extension", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Support/Providers/ModuleServiceProvider.php#L412-L417
227,976
antaresproject/core
src/components/extension/src/Dispatcher.php
Dispatcher.registerCollection
public function registerCollection(Extensions $extensions) { foreach ($extensions as $extension) { $this->register($extension); } $this->eventDispatcher->dispatch('antares.after.load-service-providers'); }
php
public function registerCollection(Extensions $extensions) { foreach ($extensions as $extension) { $this->register($extension); } $this->eventDispatcher->dispatch('antares.after.load-service-providers'); }
[ "public", "function", "registerCollection", "(", "Extensions", "$", "extensions", ")", "{", "foreach", "(", "$", "extensions", "as", "$", "extension", ")", "{", "$", "this", "->", "register", "(", "$", "extension", ")", ";", "}", "$", "this", "->", "even...
Register the collection of extensions. @param Extensions $extensions @throws Exception
[ "Register", "the", "collection", "of", "extensions", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/extension/src/Dispatcher.php#L86-L92
227,977
antaresproject/core
src/components/extension/src/Dispatcher.php
Dispatcher.register
public function register(ExtensionContract $extension) { $this->extensions[] = $extension; $this->loader->registerExtensionProviders($extension); }
php
public function register(ExtensionContract $extension) { $this->extensions[] = $extension; $this->loader->registerExtensionProviders($extension); }
[ "public", "function", "register", "(", "ExtensionContract", "$", "extension", ")", "{", "$", "this", "->", "extensions", "[", "]", "=", "$", "extension", ";", "$", "this", "->", "loader", "->", "registerExtensionProviders", "(", "$", "extension", ")", ";", ...
Register the extension. @param ExtensionContract $extension @throws Exception
[ "Register", "the", "extension", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/extension/src/Dispatcher.php#L100-L105
227,978
antaresproject/core
src/components/extension/src/Dispatcher.php
Dispatcher.boot
public function boot() { $this->loader->loadManifest(); foreach ($this->extensions as $extension) { try { $this->eventDispatcher->dispatch(new Booted($extension)); $name = $extension->getPackage()->getName(); $this->eventDispatcher->disp...
php
public function boot() { $this->loader->loadManifest(); foreach ($this->extensions as $extension) { try { $this->eventDispatcher->dispatch(new Booted($extension)); $name = $extension->getPackage()->getName(); $this->eventDispatcher->disp...
[ "public", "function", "boot", "(", ")", "{", "$", "this", "->", "loader", "->", "loadManifest", "(", ")", ";", "foreach", "(", "$", "this", "->", "extensions", "as", "$", "extension", ")", "{", "try", "{", "$", "this", "->", "eventDispatcher", "->", ...
Boot all extensions. @throws Exception
[ "Boot", "all", "extensions", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/extension/src/Dispatcher.php#L112-L140
227,979
antaresproject/core
src/components/extension/src/Dispatcher.php
Dispatcher.after
public function after(Closure $callback = null) { if ($callback && $this->booted()) { $this->container->call($callback); } $this->eventDispatcher->listen(BootedAll::class, $callback); $this->eventDispatcher->listen('antares.extension: booted', $callback); $this->...
php
public function after(Closure $callback = null) { if ($callback && $this->booted()) { $this->container->call($callback); } $this->eventDispatcher->listen(BootedAll::class, $callback); $this->eventDispatcher->listen('antares.extension: booted', $callback); $this->...
[ "public", "function", "after", "(", "Closure", "$", "callback", "=", "null", ")", "{", "if", "(", "$", "callback", "&&", "$", "this", "->", "booted", "(", ")", ")", "{", "$", "this", "->", "container", "->", "call", "(", "$", "callback", ")", ";", ...
Create an event listener or execute it directly. @param Closure|null $callback
[ "Create", "an", "event", "listener", "or", "execute", "it", "directly", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/extension/src/Dispatcher.php#L147-L156
227,980
antaresproject/core
src/ui/components/templates/src/Traits/ComponentTrait.php
ComponentTrait.getDefaults
public function getDefaults($args = null) { if (!is_null($args)) { if (is_array($args)) { return array_only($this->defaults, $args); } if (array_key_exists($args, $this->defaults)) { return $this->defaults[$args]; } } ...
php
public function getDefaults($args = null) { if (!is_null($args)) { if (is_array($args)) { return array_only($this->defaults, $args); } if (array_key_exists($args, $this->defaults)) { return $this->defaults[$args]; } } ...
[ "public", "function", "getDefaults", "(", "$", "args", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "args", ")", ")", "{", "if", "(", "is_array", "(", "$", "args", ")", ")", "{", "return", "array_only", "(", "$", "this", "->", "def...
Gets defaults attributes @param array | mixed $args @return array
[ "Gets", "defaults", "attributes" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/components/templates/src/Traits/ComponentTrait.php#L133-L144
227,981
antaresproject/core
src/ui/components/templates/src/Traits/ComponentTrait.php
ComponentTrait.editable
protected function editable() { if (array_key_exists('editable', $this->attributes) && $this->attributes['editable'] == false) { return false; } return in_array('form', get_class_methods($this)); }
php
protected function editable() { if (array_key_exists('editable', $this->attributes) && $this->attributes['editable'] == false) { return false; } return in_array('form', get_class_methods($this)); }
[ "protected", "function", "editable", "(", ")", "{", "if", "(", "array_key_exists", "(", "'editable'", ",", "$", "this", "->", "attributes", ")", "&&", "$", "this", "->", "attributes", "[", "'editable'", "]", "==", "false", ")", "{", "return", "false", ";...
Does the ui component has editable attributes @return boolean
[ "Does", "the", "ui", "component", "has", "editable", "attributes" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/components/templates/src/Traits/ComponentTrait.php#L163-L169
227,982
lawoole/framework
src/Server/ServerSockets/ServerSocket.php
ServerSocket.setOptions
public function setOptions(array $options) { if ($this->server && $this->server->isRunning()) { throw new LogicException('Options cannot be set while the server is running.'); } $this->options = array_diff_key($this->options, $options) + $options; if ($this->swoolePort ...
php
public function setOptions(array $options) { if ($this->server && $this->server->isRunning()) { throw new LogicException('Options cannot be set while the server is running.'); } $this->options = array_diff_key($this->options, $options) + $options; if ($this->swoolePort ...
[ "public", "function", "setOptions", "(", "array", "$", "options", ")", "{", "if", "(", "$", "this", "->", "server", "&&", "$", "this", "->", "server", "->", "isRunning", "(", ")", ")", "{", "throw", "new", "LogicException", "(", "'Options cannot be set whi...
Set the server socket options. @param array $options
[ "Set", "the", "server", "socket", "options", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Server/ServerSockets/ServerSocket.php#L180-L191
227,983
lawoole/framework
src/Server/ServerSockets/ServerSocket.php
ServerSocket.listen
public function listen(Server $server, SwoolePort $swoolePort = null) { if ($this->isBound()) { throw new LogicException('The server socket can be bound to server only once.'); } if ($swoolePort == null) { // If the passed Swoole port is null, that means we are calli...
php
public function listen(Server $server, SwoolePort $swoolePort = null) { if ($this->isBound()) { throw new LogicException('The server socket can be bound to server only once.'); } if ($swoolePort == null) { // If the passed Swoole port is null, that means we are calli...
[ "public", "function", "listen", "(", "Server", "$", "server", ",", "SwoolePort", "$", "swoolePort", "=", "null", ")", "{", "if", "(", "$", "this", "->", "isBound", "(", ")", ")", "{", "throw", "new", "LogicException", "(", "'The server socket can be bound to...
Bind the server socket to a server instance. @param \Lawoole\Server\Server $server @param \Swoole\Server\Port $swoolePort
[ "Bind", "the", "server", "socket", "to", "a", "server", "instance", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Server/ServerSockets/ServerSocket.php#L209-L230
227,984
lawoole/framework
src/Server/ServerSockets/ServerSocket.php
ServerSocket.getIterator
public function getIterator() { if ($this->isBound() && $this->server->isRunning()) { return $this->swoolePort->connections; } return new EmptyIterator; }
php
public function getIterator() { if ($this->isBound() && $this->server->isRunning()) { return $this->swoolePort->connections; } return new EmptyIterator; }
[ "public", "function", "getIterator", "(", ")", "{", "if", "(", "$", "this", "->", "isBound", "(", ")", "&&", "$", "this", "->", "server", "->", "isRunning", "(", ")", ")", "{", "return", "$", "this", "->", "swoolePort", "->", "connections", ";", "}",...
Retrieve an iterator for all connections in this port. @return \Iterator
[ "Retrieve", "an", "iterator", "for", "all", "connections", "in", "this", "port", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Server/ServerSockets/ServerSocket.php#L255-L262
227,985
gggeek/ggwebservices
classes/ggrestresponse.php
ggRESTResponse.payload
function payload( ) { $contentType = $this->ContentType; // accommodate re-serializing content after we got a forced content-type if ( $pos = strpos( $contentType, ';' ) !== false ) { $contentType = substr( $contentType, 0, $pos ); } if ( $contentType == '...
php
function payload( ) { $contentType = $this->ContentType; // accommodate re-serializing content after we got a forced content-type if ( $pos = strpos( $contentType, ';' ) !== false ) { $contentType = substr( $contentType, 0, $pos ); } if ( $contentType == '...
[ "function", "payload", "(", ")", "{", "$", "contentType", "=", "$", "this", "->", "ContentType", ";", "// accommodate re-serializing content after we got a forced content-type", "if", "(", "$", "pos", "=", "strpos", "(", "$", "contentType", ",", "';'", ")", "!==",...
Returns the payload for the response. Encoding varies depending on what the request asked for @todo add jsonp support for php? note that the validation regexp (in req. class) might need to differ...
[ "Returns", "the", "payload", "for", "the", "response", ".", "Encoding", "varies", "depending", "on", "what", "the", "request", "asked", "for" ]
4f6e1ada1aa94301acd2ef3cd0966c7be06313ec
https://github.com/gggeek/ggwebservices/blob/4f6e1ada1aa94301acd2ef3cd0966c7be06313ec/classes/ggrestresponse.php#L21-L89
227,986
antaresproject/core
src/ui/components/datatables/src/Session/Session.php
Session.getFromSession
protected function getFromSession($key, $perPage) { $session = $this->request->session(); if (!$session->has($key) or $this->request->ajax()) { $session->put($key, $perPage); $session->save(); } return $session->get($key); }
php
protected function getFromSession($key, $perPage) { $session = $this->request->session(); if (!$session->has($key) or $this->request->ajax()) { $session->put($key, $perPage); $session->save(); } return $session->get($key); }
[ "protected", "function", "getFromSession", "(", "$", "key", ",", "$", "perPage", ")", "{", "$", "session", "=", "$", "this", "->", "request", "->", "session", "(", ")", ";", "if", "(", "!", "$", "session", "->", "has", "(", "$", "key", ")", "or", ...
Get key from session @param String $key @param mixed $perPage @return mixed
[ "Get", "key", "from", "session" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/components/datatables/src/Session/Session.php#L62-L70
227,987
antaresproject/core
src/ui/components/templates/src/Adapter/AttributesAdapter.php
AttributesAdapter.defaults
public function defaults() { $defaults = $this->config; if (!isset($defaults['width'])) { $defaults['width'] = $defaults['default_width']; } if (!isset($defaults['height'])) { $defaults['height'] = $defaults['default_height']; } return $default...
php
public function defaults() { $defaults = $this->config; if (!isset($defaults['width'])) { $defaults['width'] = $defaults['default_width']; } if (!isset($defaults['height'])) { $defaults['height'] = $defaults['default_height']; } return $default...
[ "public", "function", "defaults", "(", ")", "{", "$", "defaults", "=", "$", "this", "->", "config", ";", "if", "(", "!", "isset", "(", "$", "defaults", "[", "'width'", "]", ")", ")", "{", "$", "defaults", "[", "'width'", "]", "=", "$", "defaults", ...
created defaults dimenstion settings @return array
[ "created", "defaults", "dimenstion", "settings" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/components/templates/src/Adapter/AttributesAdapter.php#L71-L81
227,988
antaresproject/core
src/ui/components/templates/src/Adapter/AttributesAdapter.php
AttributesAdapter.attributes
public function attributes(array $current = array()) { $attributes = isset($this->params['attributes']) ? $this->params['attributes'] : []; $this->attributes = array_merge($this->config, $attributes, $current); $this->attributes['name'] = $this->name; $this->att...
php
public function attributes(array $current = array()) { $attributes = isset($this->params['attributes']) ? $this->params['attributes'] : []; $this->attributes = array_merge($this->config, $attributes, $current); $this->attributes['name'] = $this->name; $this->att...
[ "public", "function", "attributes", "(", "array", "$", "current", "=", "array", "(", ")", ")", "{", "$", "attributes", "=", "isset", "(", "$", "this", "->", "params", "[", "'attributes'", "]", ")", "?", "$", "this", "->", "params", "[", "'attributes'",...
widget attributes manager @param array $current @return array
[ "widget", "attributes", "manager" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/components/templates/src/Adapter/AttributesAdapter.php#L104-L118
227,989
antaresproject/core
src/components/html/src/Grid.php
Grid.attributes
public function attributes($key = null, $value = null) { if (is_null($key)) { return $this->attributes; } if (is_array($key)) { $this->attributes = array_merge($this->attributes, $key); } else { $this->attributes[$key] = $value; } ...
php
public function attributes($key = null, $value = null) { if (is_null($key)) { return $this->attributes; } if (is_array($key)) { $this->attributes = array_merge($this->attributes, $key); } else { $this->attributes[$key] = $value; } ...
[ "public", "function", "attributes", "(", "$", "key", "=", "null", ",", "$", "value", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "key", ")", ")", "{", "return", "$", "this", "->", "attributes", ";", "}", "if", "(", "is_array", "(", "$"...
Add or append Grid attributes. @param mixed $key @param mixed $value @return array|null
[ "Add", "or", "append", "Grid", "attributes", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Grid.php#L104-L117
227,990
antaresproject/core
src/components/html/src/Grid.php
Grid.of
public function of($name, $callback = null) { $type = $this->definition['name']; if (is_null($type) || !property_exists($this, $type)) { throw new RuntimeException('Not supported.'); } elseif (!isset($this->keyMap[$name])) { throw new InvalidArgumentException("Name ...
php
public function of($name, $callback = null) { $type = $this->definition['name']; if (is_null($type) || !property_exists($this, $type)) { throw new RuntimeException('Not supported.'); } elseif (!isset($this->keyMap[$name])) { throw new InvalidArgumentException("Name ...
[ "public", "function", "of", "(", "$", "name", ",", "$", "callback", "=", "null", ")", "{", "$", "type", "=", "$", "this", "->", "definition", "[", "'name'", "]", ";", "if", "(", "is_null", "(", "$", "type", ")", "||", "!", "property_exists", "(", ...
Allow column overwriting. @param string $name @param mixed|null $callback @return \Illuminate\Support\Fluent @throws \InvalidArgumentException @throws \RuntimeException
[ "Allow", "column", "overwriting", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Grid.php#L130-L149
227,991
antaresproject/core
src/components/messages/src/SwalMessanger.php
SwalMessanger.message
public function message($title, $text = null) { if (!in_array($this->type, ['success', 'error', 'info', 'warning'])) { return ''; } $container = $this->assetFactory->container(self::position); $type = $this->resolveType(); return $container->inlineScript('swa...
php
public function message($title, $text = null) { if (!in_array($this->type, ['success', 'error', 'info', 'warning'])) { return ''; } $container = $this->assetFactory->container(self::position); $type = $this->resolveType(); return $container->inlineScript('swa...
[ "public", "function", "message", "(", "$", "title", ",", "$", "text", "=", "null", ")", "{", "if", "(", "!", "in_array", "(", "$", "this", "->", "type", ",", "[", "'success'", ",", "'error'", ",", "'info'", ",", "'warning'", "]", ")", ")", "{", "...
Appends inline script to scripts container @param String $title @param String $text @return String
[ "Appends", "inline", "script", "to", "scripts", "container" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/messages/src/SwalMessanger.php#L78-L86
227,992
antaresproject/core
src/components/messages/src/SwalMessanger.php
SwalMessanger.inline
protected function inline($type, $title, $text = null) { $html = (string) $text; $inline = <<<EOD $(document).ready(function(){ swal($.extend({}, APP.swal.$type(), { title: '$title', text: '$html', ...
php
protected function inline($type, $title, $text = null) { $html = (string) $text; $inline = <<<EOD $(document).ready(function(){ swal($.extend({}, APP.swal.$type(), { title: '$title', text: '$html', ...
[ "protected", "function", "inline", "(", "$", "type", ",", "$", "title", ",", "$", "text", "=", "null", ")", "{", "$", "html", "=", "(", "string", ")", "$", "text", ";", "$", "inline", "=", " <<<EOD\n $(document).ready(function(){ \n ...
generate flash messanger inline scripts @return String
[ "generate", "flash", "messanger", "inline", "scripts" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/messages/src/SwalMessanger.php#L103-L120
227,993
antaresproject/core
src/components/view/src/Console/Command.php
Command.form
public function form(array $configuration = array()) { Event::fire('antares.forms', 'commands.' . $this->name); Event::fire(new Form('commands.' . $this->name)); return app('antares.form')->of("antares.command: " . $this->name, function (FormGrid $form) use ($configuration) { ...
php
public function form(array $configuration = array()) { Event::fire('antares.forms', 'commands.' . $this->name); Event::fire(new Form('commands.' . $this->name)); return app('antares.form')->of("antares.command: " . $this->name, function (FormGrid $form) use ($configuration) { ...
[ "public", "function", "form", "(", "array", "$", "configuration", "=", "array", "(", ")", ")", "{", "Event", "::", "fire", "(", "'antares.forms'", ",", "'commands.'", ".", "$", "this", "->", "name", ")", ";", "Event", "::", "fire", "(", "new", "Form", ...
default command form @param array $configuration @return FormBuilder
[ "default", "command", "form" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/view/src/Console/Command.php#L201-L258
227,994
antaresproject/core
src/components/view/src/Console/Command.php
Command.getConfiguration
protected function getConfiguration() { $model = Jobs::where('name', $this->name)->first(); return unserialize($model->value); }
php
protected function getConfiguration() { $model = Jobs::where('name', $this->name)->first(); return unserialize($model->value); }
[ "protected", "function", "getConfiguration", "(", ")", "{", "$", "model", "=", "Jobs", "::", "where", "(", "'name'", ",", "$", "this", "->", "name", ")", "->", "first", "(", ")", ";", "return", "unserialize", "(", "$", "model", "->", "value", ")", ";...
command configuration getter @return array
[ "command", "configuration", "getter" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/view/src/Console/Command.php#L265-L269
227,995
antaresproject/core
src/components/extension/src/Validators/ExtensionValidator.php
ExtensionValidator.isValid
public function isValid(ExtensionContract $extension) : bool { return ! in_array($extension->getPackage()->getName(), $this->configRepository->getReservedNames(), true); }
php
public function isValid(ExtensionContract $extension) : bool { return ! in_array($extension->getPackage()->getName(), $this->configRepository->getReservedNames(), true); }
[ "public", "function", "isValid", "(", "ExtensionContract", "$", "extension", ")", ":", "bool", "{", "return", "!", "in_array", "(", "$", "extension", "->", "getPackage", "(", ")", "->", "getName", "(", ")", ",", "$", "this", "->", "configRepository", "->",...
Determines if the extension is set properly. @param ExtensionContract $extension @return bool
[ "Determines", "if", "the", "extension", "is", "set", "properly", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/extension/src/Validators/ExtensionValidator.php#L33-L35
227,996
antaresproject/core
src/components/extension/src/Validators/ExtensionValidator.php
ExtensionValidator.validateAssetsPath
public function validateAssetsPath(ExtensionContract $extension) { $targetPath = $this->configRepository->getPublicPath() . '/packages/antares'; if( ! File::isWritable($targetPath) ) { throw new ExtensionException('The package [' . $extension->getPackage()->getName() . '] cannot access to t...
php
public function validateAssetsPath(ExtensionContract $extension) { $targetPath = $this->configRepository->getPublicPath() . '/packages/antares'; if( ! File::isWritable($targetPath) ) { throw new ExtensionException('The package [' . $extension->getPackage()->getName() . '] cannot access to t...
[ "public", "function", "validateAssetsPath", "(", "ExtensionContract", "$", "extension", ")", "{", "$", "targetPath", "=", "$", "this", "->", "configRepository", "->", "getPublicPath", "(", ")", ".", "'/packages/antares'", ";", "if", "(", "!", "File", "::", "is...
Check whether the package has a writable public asset. @param ExtensionContract $extension @throws ExtensionException
[ "Check", "whether", "the", "package", "has", "a", "writable", "public", "asset", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/extension/src/Validators/ExtensionValidator.php#L43-L49
227,997
FlorianWolters/PHP-Component-Core-StringUtils
src/main/php/StringEscapeUtils.php
StringEscapeUtils.escapeRegEx
public static function escapeRegEx($str, $delimiter = '/') { return StringUtils::isEmpty($str) ? $str : \preg_quote($str, $delimiter); }
php
public static function escapeRegEx($str, $delimiter = '/') { return StringUtils::isEmpty($str) ? $str : \preg_quote($str, $delimiter); }
[ "public", "static", "function", "escapeRegEx", "(", "$", "str", ",", "$", "delimiter", "=", "'/'", ")", "{", "return", "StringUtils", "::", "isEmpty", "(", "$", "str", ")", "?", "$", "str", ":", "\\", "preg_quote", "(", "$", "str", ",", "$", "delimit...
Escapes the characters in a `string` to be suitable to pass to a regular expression. @param string $str The `string` to escape. @param string $delimiter The regular expression delimiter. @return string The escaped `string` or `null` if `null` `string` input.
[ "Escapes", "the", "characters", "in", "a", "string", "to", "be", "suitable", "to", "pass", "to", "a", "regular", "expression", "." ]
3b5e8762031cf66d6441ee98772fae4be0f5d0aa
https://github.com/FlorianWolters/PHP-Component-Core-StringUtils/blob/3b5e8762031cf66d6441ee98772fae4be0f5d0aa/src/main/php/StringEscapeUtils.php#L99-L104
227,998
crossjoin/PreMailer
src/Crossjoin/PreMailer/PreMailerAbstract.php
PreMailerAbstract.setOption
public function setOption($name, $value) { if (is_string($name)) { if (isset($this->options[$name])) { switch ($name) { case self::OPTION_STYLE_TAG: if (is_int($value)) { if (!in_array($value, [ ...
php
public function setOption($name, $value) { if (is_string($name)) { if (isset($this->options[$name])) { switch ($name) { case self::OPTION_STYLE_TAG: if (is_int($value)) { if (!in_array($value, [ ...
[ "public", "function", "setOption", "(", "$", "name", ",", "$", "value", ")", "{", "if", "(", "is_string", "(", "$", "name", ")", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "options", "[", "$", "name", "]", ")", ")", "{", "switch", "(...
Sets an option for the generation of the mail. @param string $name @param mixed $value
[ "Sets", "an", "option", "for", "the", "generation", "of", "the", "mail", "." ]
e1fbd426a9f3ba2d5d00f6641b2509c72bf4f561
https://github.com/crossjoin/PreMailer/blob/e1fbd426a9f3ba2d5d00f6641b2509c72bf4f561/src/Crossjoin/PreMailer/PreMailerAbstract.php#L90-L172
227,999
crossjoin/PreMailer
src/Crossjoin/PreMailer/PreMailerAbstract.php
PreMailerAbstract.getOption
public function getOption($name) { if (is_string($name)) { if (isset($this->options[$name])) { return $this->options[$name]; } else { throw new \InvalidArgumentException("An option with the name '$name' doesn't exist."); } } else { ...
php
public function getOption($name) { if (is_string($name)) { if (isset($this->options[$name])) { return $this->options[$name]; } else { throw new \InvalidArgumentException("An option with the name '$name' doesn't exist."); } } else { ...
[ "public", "function", "getOption", "(", "$", "name", ")", "{", "if", "(", "is_string", "(", "$", "name", ")", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "options", "[", "$", "name", "]", ")", ")", "{", "return", "$", "this", "->", "o...
Gets an option for the generation of the mail. @param string $name @return mixed
[ "Gets", "an", "option", "for", "the", "generation", "of", "the", "mail", "." ]
e1fbd426a9f3ba2d5d00f6641b2509c72bf4f561
https://github.com/crossjoin/PreMailer/blob/e1fbd426a9f3ba2d5d00f6641b2509c72bf4f561/src/Crossjoin/PreMailer/PreMailerAbstract.php#L180-L191