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
201,900
ekyna/Resource
Configuration/ConfigurationRegistry.php
ConfigurationRegistry.getEventPriorityMap
public function getEventPriorityMap() { if (null !== $this->eventPriorityMap) { return $this->eventPriorityMap; } return $this->eventPriorityMap = $this->buildEventPriorityMap(); }
php
public function getEventPriorityMap() { if (null !== $this->eventPriorityMap) { return $this->eventPriorityMap; } return $this->eventPriorityMap = $this->buildEventPriorityMap(); }
[ "public", "function", "getEventPriorityMap", "(", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "eventPriorityMap", ")", "{", "return", "$", "this", "->", "eventPriorityMap", ";", "}", "return", "$", "this", "->", "eventPriorityMap", "=", "$", "th...
Returns the event priority map. @return array
[ "Returns", "the", "event", "priority", "map", "." ]
96ee3d28e02bd9513705408e3bb7f88a76e52f56
https://github.com/ekyna/Resource/blob/96ee3d28e02bd9513705408e3bb7f88a76e52f56/Configuration/ConfigurationRegistry.php#L261-L268
201,901
ekyna/Resource
Configuration/ConfigurationRegistry.php
ConfigurationRegistry.buildParentMap
private function buildParentMap() { $map = []; foreach ($this->configurations as $configuration) { if (null !== $parentId = $configuration->getParentId()) { $map[$configuration->getResourceId()] = $parentId; } } ksort($map); return $...
php
private function buildParentMap() { $map = []; foreach ($this->configurations as $configuration) { if (null !== $parentId = $configuration->getParentId()) { $map[$configuration->getResourceId()] = $parentId; } } ksort($map); return $...
[ "private", "function", "buildParentMap", "(", ")", "{", "$", "map", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "configurations", "as", "$", "configuration", ")", "{", "if", "(", "null", "!==", "$", "parentId", "=", "$", "configuration", "->...
Builds the parent map. @return array
[ "Builds", "the", "parent", "map", "." ]
96ee3d28e02bd9513705408e3bb7f88a76e52f56
https://github.com/ekyna/Resource/blob/96ee3d28e02bd9513705408e3bb7f88a76e52f56/Configuration/ConfigurationRegistry.php#L275-L288
201,902
ekyna/Resource
Configuration/ConfigurationRegistry.php
ConfigurationRegistry.buildEventPriorityMap
private function buildEventPriorityMap() { $map = []; foreach ($this->configurations as $configuration) { if (0 != $priority = $configuration->getEventPriority()) { $map[$configuration->getResourceId()] = $priority; } } ksort($map); ...
php
private function buildEventPriorityMap() { $map = []; foreach ($this->configurations as $configuration) { if (0 != $priority = $configuration->getEventPriority()) { $map[$configuration->getResourceId()] = $priority; } } ksort($map); ...
[ "private", "function", "buildEventPriorityMap", "(", ")", "{", "$", "map", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "configurations", "as", "$", "configuration", ")", "{", "if", "(", "0", "!=", "$", "priority", "=", "$", "configuration", ...
Builds the event priority map. @return array
[ "Builds", "the", "event", "priority", "map", "." ]
96ee3d28e02bd9513705408e3bb7f88a76e52f56
https://github.com/ekyna/Resource/blob/96ee3d28e02bd9513705408e3bb7f88a76e52f56/Configuration/ConfigurationRegistry.php#L295-L308
201,903
ezra-obiwale/dSCore
src/Form/Element.php
Element.getValue
protected function getValue() { if (($this->data == '0' || !empty($this->data)) && !is_object($this->data)) { $value = ($this->parent && is_array($this->data)) ? $this->data[0] : $this->data; } else if ($this->options->default == '0' || !empty($this->options->default)) { $value =...
php
protected function getValue() { if (($this->data == '0' || !empty($this->data)) && !is_object($this->data)) { $value = ($this->parent && is_array($this->data)) ? $this->data[0] : $this->data; } else if ($this->options->default == '0' || !empty($this->options->default)) { $value =...
[ "protected", "function", "getValue", "(", ")", "{", "if", "(", "(", "$", "this", "->", "data", "==", "'0'", "||", "!", "empty", "(", "$", "this", "->", "data", ")", ")", "&&", "!", "is_object", "(", "$", "this", "->", "data", ")", ")", "{", "$"...
Fetches the current value of the element @return mixed
[ "Fetches", "the", "current", "value", "of", "the", "element" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Form/Element.php#L132-L145
201,904
ezra-obiwale/dSCore
src/Form/Element.php
Element.render
public function render() { if ($this->parent) { if (!static::$count[$this->parent]) static::$count[$this->parent] = 0; static::$count[$this->parent] ++; $this->attributes->id += static::$count[$this->parent]; } ob_start(); ?> <...
php
public function render() { if ($this->parent) { if (!static::$count[$this->parent]) static::$count[$this->parent] = 0; static::$count[$this->parent] ++; $this->attributes->id += static::$count[$this->parent]; } ob_start(); ?> <...
[ "public", "function", "render", "(", ")", "{", "if", "(", "$", "this", "->", "parent", ")", "{", "if", "(", "!", "static", "::", "$", "count", "[", "$", "this", "->", "parent", "]", ")", "static", "::", "$", "count", "[", "$", "this", "->", "pa...
Render the element for output @return string
[ "Render", "the", "element", "for", "output" ]
dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d
https://github.com/ezra-obiwale/dSCore/blob/dd51246e0dc2c64d4d44de7992d7ff1b5165ab2d/src/Form/Element.php#L177-L195
201,905
ekyna/PaymentBundle
Twig/PaymentExtension.php
PaymentExtension.getPaymentStateLabel
public function getPaymentStateLabel($stateOrPayment) { $state = $stateOrPayment instanceof PaymentInterface ? $stateOrPayment->getState() : $stateOrPayment; return $this->translator->trans(PaymentStates::getLabel($state)); }
php
public function getPaymentStateLabel($stateOrPayment) { $state = $stateOrPayment instanceof PaymentInterface ? $stateOrPayment->getState() : $stateOrPayment; return $this->translator->trans(PaymentStates::getLabel($state)); }
[ "public", "function", "getPaymentStateLabel", "(", "$", "stateOrPayment", ")", "{", "$", "state", "=", "$", "stateOrPayment", "instanceof", "PaymentInterface", "?", "$", "stateOrPayment", "->", "getState", "(", ")", ":", "$", "stateOrPayment", ";", "return", "$"...
Returns the payment state label. @param string|PaymentInterface $stateOrPayment @return string
[ "Returns", "the", "payment", "state", "label", "." ]
1b4f4103b28e3a4f8dbfac2cbd872d728238f4d1
https://github.com/ekyna/PaymentBundle/blob/1b4f4103b28e3a4f8dbfac2cbd872d728238f4d1/Twig/PaymentExtension.php#L82-L87
201,906
ekyna/PaymentBundle
Twig/PaymentExtension.php
PaymentExtension.getPaymentStateBadge
public function getPaymentStateBadge($stateOrPayment) { $state = $stateOrPayment instanceof PaymentInterface ? $stateOrPayment->getState() : $stateOrPayment; return sprintf( '<span class="label label-%s">%s</span>', PaymentStates::getTheme($state), $this->getPaym...
php
public function getPaymentStateBadge($stateOrPayment) { $state = $stateOrPayment instanceof PaymentInterface ? $stateOrPayment->getState() : $stateOrPayment; return sprintf( '<span class="label label-%s">%s</span>', PaymentStates::getTheme($state), $this->getPaym...
[ "public", "function", "getPaymentStateBadge", "(", "$", "stateOrPayment", ")", "{", "$", "state", "=", "$", "stateOrPayment", "instanceof", "PaymentInterface", "?", "$", "stateOrPayment", "->", "getState", "(", ")", ":", "$", "stateOrPayment", ";", "return", "sp...
Returns the payment state badge. @param string|PaymentInterface $stateOrPayment @return string
[ "Returns", "the", "payment", "state", "badge", "." ]
1b4f4103b28e3a4f8dbfac2cbd872d728238f4d1
https://github.com/ekyna/PaymentBundle/blob/1b4f4103b28e3a4f8dbfac2cbd872d728238f4d1/Twig/PaymentExtension.php#L95-L104
201,907
ekyna/PaymentBundle
Twig/PaymentExtension.php
PaymentExtension.renderMethodConfig
public function renderMethodConfig(MethodInterface $method) { $output = '<dl class="dl-horizontal">'; foreach ($method->getConfig() as $key => $value) { if (is_array($value)) { continue; } $output .= sprintf('<dt>%s</dt><dd>%s</dd>', $key, $value...
php
public function renderMethodConfig(MethodInterface $method) { $output = '<dl class="dl-horizontal">'; foreach ($method->getConfig() as $key => $value) { if (is_array($value)) { continue; } $output .= sprintf('<dt>%s</dt><dd>%s</dd>', $key, $value...
[ "public", "function", "renderMethodConfig", "(", "MethodInterface", "$", "method", ")", "{", "$", "output", "=", "'<dl class=\"dl-horizontal\">'", ";", "foreach", "(", "$", "method", "->", "getConfig", "(", ")", "as", "$", "key", "=>", "$", "value", ")", "{"...
Renders the method config. @param MethodInterface $method @return string
[ "Renders", "the", "method", "config", "." ]
1b4f4103b28e3a4f8dbfac2cbd872d728238f4d1
https://github.com/ekyna/PaymentBundle/blob/1b4f4103b28e3a4f8dbfac2cbd872d728238f4d1/Twig/PaymentExtension.php#L145-L160
201,908
jenskooij/cloudcontrol
src/storage/storage/DocumentStorage.php
DocumentStorage.addDocumentFolder
public function addDocumentFolder($postValues) { $documentFolderObject = DocumentFolderFactory::createDocumentFolderFromPostValues($postValues); if ($postValues['path'] === '/') { $documentFolderObject->path = $postValues['path'] . $documentFolderObject->slug; } else { ...
php
public function addDocumentFolder($postValues) { $documentFolderObject = DocumentFolderFactory::createDocumentFolderFromPostValues($postValues); if ($postValues['path'] === '/') { $documentFolderObject->path = $postValues['path'] . $documentFolderObject->slug; } else { ...
[ "public", "function", "addDocumentFolder", "(", "$", "postValues", ")", "{", "$", "documentFolderObject", "=", "DocumentFolderFactory", "::", "createDocumentFolderFromPostValues", "(", "$", "postValues", ")", ";", "if", "(", "$", "postValues", "[", "'path'", "]", ...
Add new document in given path @param array $postValues @throws \Exception
[ "Add", "new", "document", "in", "given", "path" ]
76e5d9ac8f9c50d06d39a995d13cc03742536548
https://github.com/jenskooij/cloudcontrol/blob/76e5d9ac8f9c50d06d39a995d13cc03742536548/src/storage/storage/DocumentStorage.php#L154-L164
201,909
jenskooij/cloudcontrol
src/storage/storage/DocumentStorage.php
DocumentStorage.deleteDocumentFolderBySlug
public function deleteDocumentFolderBySlug($slug) { $path = '/' . $slug; $this->repository->getContentRepository()->deleteDocumentByPath($this->repository, $path); $this->repository->getContentRepository()->cleanPublishedDeletedDocuments(); }
php
public function deleteDocumentFolderBySlug($slug) { $path = '/' . $slug; $this->repository->getContentRepository()->deleteDocumentByPath($this->repository, $path); $this->repository->getContentRepository()->cleanPublishedDeletedDocuments(); }
[ "public", "function", "deleteDocumentFolderBySlug", "(", "$", "slug", ")", "{", "$", "path", "=", "'/'", ".", "$", "slug", ";", "$", "this", "->", "repository", "->", "getContentRepository", "(", ")", "->", "deleteDocumentByPath", "(", "$", "this", "->", "...
Delete a folder by its compound slug @param $slug @throws \Exception
[ "Delete", "a", "folder", "by", "its", "compound", "slug" ]
76e5d9ac8f9c50d06d39a995d13cc03742536548
https://github.com/jenskooij/cloudcontrol/blob/76e5d9ac8f9c50d06d39a995d13cc03742536548/src/storage/storage/DocumentStorage.php#L173-L178
201,910
jenskooij/cloudcontrol
src/storage/storage/DocumentStorage.php
DocumentStorage.getDocumentFolderBySlug
public function getDocumentFolderBySlug($slug) { if ($slug === '/') { $path = $slug; } else { $path = '/' . $slug; } return $this->repository->getContentRepository()->getDocumentByPath($this->repository, $path, 'unpublished'); }
php
public function getDocumentFolderBySlug($slug) { if ($slug === '/') { $path = $slug; } else { $path = '/' . $slug; } return $this->repository->getContentRepository()->getDocumentByPath($this->repository, $path, 'unpublished'); }
[ "public", "function", "getDocumentFolderBySlug", "(", "$", "slug", ")", "{", "if", "(", "$", "slug", "===", "'/'", ")", "{", "$", "path", "=", "$", "slug", ";", "}", "else", "{", "$", "path", "=", "'/'", ".", "$", "slug", ";", "}", "return", "$",...
Retrieve a folder by its compound slug @param $slug @return mixed @throws \Exception
[ "Retrieve", "a", "folder", "by", "its", "compound", "slug" ]
76e5d9ac8f9c50d06d39a995d13cc03742536548
https://github.com/jenskooij/cloudcontrol/blob/76e5d9ac8f9c50d06d39a995d13cc03742536548/src/storage/storage/DocumentStorage.php#L208-L217
201,911
froq/froq-acl
src/User.php
User.canRead
public function canRead(string $uri): bool { // /book => all if (in_array(Acl::RULE_ALL, (array) $this->getPermissionsOf($this->getUriRoot($uri)))) { return true; } // /book/detail => all or read $permission = array_filter((array) $this->getPermissionsOf($uri), f...
php
public function canRead(string $uri): bool { // /book => all if (in_array(Acl::RULE_ALL, (array) $this->getPermissionsOf($this->getUriRoot($uri)))) { return true; } // /book/detail => all or read $permission = array_filter((array) $this->getPermissionsOf($uri), f...
[ "public", "function", "canRead", "(", "string", "$", "uri", ")", ":", "bool", "{", "// /book => all", "if", "(", "in_array", "(", "Acl", "::", "RULE_ALL", ",", "(", "array", ")", "$", "this", "->", "getPermissionsOf", "(", "$", "this", "->", "getUriRoot"...
Can read. @param string $uri @return bool
[ "Can", "read", "." ]
ab1897dea20b16dfd8f0a6349224e94d160a0540
https://github.com/froq/froq-acl/blob/ab1897dea20b16dfd8f0a6349224e94d160a0540/src/User.php#L222-L235
201,912
froq/froq-acl
src/User.php
User.canWrite
public function canWrite(string $uri): bool { // /book => all if (in_array(Acl::RULE_ALL, (array) $this->getPermissionsOf($this->getUriRoot($uri)))) { return true; } // /book/detail => all or write $permission = array_filter((array) $this->getPermissionsOf($uri),...
php
public function canWrite(string $uri): bool { // /book => all if (in_array(Acl::RULE_ALL, (array) $this->getPermissionsOf($this->getUriRoot($uri)))) { return true; } // /book/detail => all or write $permission = array_filter((array) $this->getPermissionsOf($uri),...
[ "public", "function", "canWrite", "(", "string", "$", "uri", ")", ":", "bool", "{", "// /book => all", "if", "(", "in_array", "(", "Acl", "::", "RULE_ALL", ",", "(", "array", ")", "$", "this", "->", "getPermissionsOf", "(", "$", "this", "->", "getUriRoot...
Can write. @param string $uri @return bool
[ "Can", "write", "." ]
ab1897dea20b16dfd8f0a6349224e94d160a0540
https://github.com/froq/froq-acl/blob/ab1897dea20b16dfd8f0a6349224e94d160a0540/src/User.php#L242-L255
201,913
froq/froq-acl
src/User.php
User.redirectIf
public function redirectIf(string $dir, string $to = '/', bool $exit = true): void { if ($this->acl != null) { $app = $this->acl->getService()->getApp(); if ($dir == 'in' && $this->isLoggedIn()) { $app->response()->redirect($to); } elseif ($dir == 'out' &&...
php
public function redirectIf(string $dir, string $to = '/', bool $exit = true): void { if ($this->acl != null) { $app = $this->acl->getService()->getApp(); if ($dir == 'in' && $this->isLoggedIn()) { $app->response()->redirect($to); } elseif ($dir == 'out' &&...
[ "public", "function", "redirectIf", "(", "string", "$", "dir", ",", "string", "$", "to", "=", "'/'", ",", "bool", "$", "exit", "=", "true", ")", ":", "void", "{", "if", "(", "$", "this", "->", "acl", "!=", "null", ")", "{", "$", "app", "=", "$"...
Redirect if. @param string $dir In/out direction. @param string $to @param bool $exit @return void
[ "Redirect", "if", "." ]
ab1897dea20b16dfd8f0a6349224e94d160a0540
https://github.com/froq/froq-acl/blob/ab1897dea20b16dfd8f0a6349224e94d160a0540/src/User.php#L264-L284
201,914
gilbertsoft/typo3-gscacheconfig
Classes/Service/InstallService.php
InstallService.getCleanAdditionalConfiguration
protected function getCleanAdditionalConfiguration($extensionKey) { $newLines = []; // Load content and search for the include if (($content = GeneralUtility::getUrl($this->getConfigurationManager()->getAdditionalConfigurationFileLocation())) !== false) { $currentLines =...
php
protected function getCleanAdditionalConfiguration($extensionKey) { $newLines = []; // Load content and search for the include if (($content = GeneralUtility::getUrl($this->getConfigurationManager()->getAdditionalConfigurationFileLocation())) !== false) { $currentLines =...
[ "protected", "function", "getCleanAdditionalConfiguration", "(", "$", "extensionKey", ")", "{", "$", "newLines", "=", "[", "]", ";", "// Load content and search for the include", "if", "(", "(", "$", "content", "=", "GeneralUtility", "::", "getUrl", "(", "$", "thi...
Returns the lines from AdditionalConfiguration.php file without own additions @param string $extensionKey Extension key
[ "Returns", "the", "lines", "from", "AdditionalConfiguration", ".", "php", "file", "without", "own", "additions" ]
dc6c3131b9e3d714b6c79c802c09ef1d165296d1
https://github.com/gilbertsoft/typo3-gscacheconfig/blob/dc6c3131b9e3d714b6c79c802c09ef1d165296d1/Classes/Service/InstallService.php#L63-L106
201,915
miknatr/grace-dbal
lib/Grace/SQLBuilder/InsertBuilder.php
InsertBuilder.values
public function values(array $values) { $this->fieldValues = array(); $this->fieldsSql = '?i'; $this->fieldValues[] = array_keys($values); $this->valuesSql = array(); foreach ($values as $v) { if (is_object($v) and $v instanceof SqlValueInterface) { ...
php
public function values(array $values) { $this->fieldValues = array(); $this->fieldsSql = '?i'; $this->fieldValues[] = array_keys($values); $this->valuesSql = array(); foreach ($values as $v) { if (is_object($v) and $v instanceof SqlValueInterface) { ...
[ "public", "function", "values", "(", "array", "$", "values", ")", "{", "$", "this", "->", "fieldValues", "=", "array", "(", ")", ";", "$", "this", "->", "fieldsSql", "=", "'?i'", ";", "$", "this", "->", "fieldValues", "[", "]", "=", "array_keys", "("...
Prepares values for inserting into db @param array $values @return $this
[ "Prepares", "values", "for", "inserting", "into", "db" ]
b05e03040568631dc6c77477c0eaed6e60db4ba2
https://github.com/miknatr/grace-dbal/blob/b05e03040568631dc6c77477c0eaed6e60db4ba2/lib/Grace/SQLBuilder/InsertBuilder.php#L29-L51
201,916
Subscribo/klarna-invoice-sdk-wrapped
src/pclasses/sqlstorage.class.php
SQLStorage.getConnection
protected function getConnection($uri) { if ($this->pdo) { return; //Already have a connection } $this->splitURI($uri); try { $this->pdo = new PDO($this->dsn, $this->user, $this->passwd); $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_E...
php
protected function getConnection($uri) { if ($this->pdo) { return; //Already have a connection } $this->splitURI($uri); try { $this->pdo = new PDO($this->dsn, $this->user, $this->passwd); $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_E...
[ "protected", "function", "getConnection", "(", "$", "uri", ")", "{", "if", "(", "$", "this", "->", "pdo", ")", "{", "return", ";", "//Already have a connection", "}", "$", "this", "->", "splitURI", "(", "$", "uri", ")", ";", "try", "{", "$", "this", ...
Connects to the DB. @param string|array $uri pclass uri @throws Klarna_DatabaseException If connection could not be established. @deprecated Use the connect method instead. @return void
[ "Connects", "to", "the", "DB", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/pclasses/sqlstorage.class.php#L240-L254
201,917
Subscribo/klarna-invoice-sdk-wrapped
src/pclasses/sqlstorage.class.php
SQLStorage.create
public function create() { try { $this->pdo->exec("CREATE DATABASE `{$this->dbName}`"); } catch (PDOException $e) { //SQLite does not support this... } $sql = <<<SQL CREATE TABLE IF NOT EXISTS `{$this->dbName}`.`{$this->dbTable}` ( ...
php
public function create() { try { $this->pdo->exec("CREATE DATABASE `{$this->dbName}`"); } catch (PDOException $e) { //SQLite does not support this... } $sql = <<<SQL CREATE TABLE IF NOT EXISTS `{$this->dbName}`.`{$this->dbTable}` ( ...
[ "public", "function", "create", "(", ")", "{", "try", "{", "$", "this", "->", "pdo", "->", "exec", "(", "\"CREATE DATABASE `{$this->dbName}`\"", ")", ";", "}", "catch", "(", "PDOException", "$", "e", ")", "{", "//SQLite does not support this...", "}", "$", "...
Attempt to create the database and tables needed to store pclasses. @throws Klarna_DatabaseException If the table could not be created. @return void
[ "Attempt", "to", "create", "the", "database", "and", "tables", "needed", "to", "store", "pclasses", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/pclasses/sqlstorage.class.php#L291-L321
201,918
Subscribo/klarna-invoice-sdk-wrapped
src/pclasses/sqlstorage.class.php
SQLStorage.loadPClasses
protected function loadPClasses() { try { $sth = $this->pdo->prepare( "SELECT * FROM `{$this->dbName}`.`{$this->dbTable}`", array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY) ); $sth->execute(); while ($row = $sth->fetch(PDO::FETCH...
php
protected function loadPClasses() { try { $sth = $this->pdo->prepare( "SELECT * FROM `{$this->dbName}`.`{$this->dbTable}`", array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY) ); $sth->execute(); while ($row = $sth->fetch(PDO::FETCH...
[ "protected", "function", "loadPClasses", "(", ")", "{", "try", "{", "$", "sth", "=", "$", "this", "->", "pdo", "->", "prepare", "(", "\"SELECT * FROM `{$this->dbName}`.`{$this->dbTable}`\"", ",", "array", "(", "PDO", "::", "ATTR_CURSOR", "=>", "PDO", "::", "CU...
Loads the PClasses. @return void @throws KlarnaException
[ "Loads", "the", "PClasses", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/pclasses/sqlstorage.class.php#L343-L363
201,919
Subscribo/klarna-invoice-sdk-wrapped
src/pclasses/sqlstorage.class.php
SQLStorage.clear
public function clear($uri) { try { $this->connect($uri); unset($this->pclasses); $this->clearTable(); } catch(Exception $e) { throw new Klarna_DatabaseException( $e->getMessage(), $e->getCode() ); } }
php
public function clear($uri) { try { $this->connect($uri); unset($this->pclasses); $this->clearTable(); } catch(Exception $e) { throw new Klarna_DatabaseException( $e->getMessage(), $e->getCode() ); } }
[ "public", "function", "clear", "(", "$", "uri", ")", "{", "try", "{", "$", "this", "->", "connect", "(", "$", "uri", ")", ";", "unset", "(", "$", "this", "->", "pclasses", ")", ";", "$", "this", "->", "clearTable", "(", ")", ";", "}", "catch", ...
Drops the database table, to clear the PClasses. @param string|array $uri pclass uri @return void @throws KlarnaException
[ "Drops", "the", "database", "table", "to", "clear", "the", "PClasses", "." ]
4a45ddd9ec444f5a6d02628ad65e635a3e12611c
https://github.com/Subscribo/klarna-invoice-sdk-wrapped/blob/4a45ddd9ec444f5a6d02628ad65e635a3e12611c/src/pclasses/sqlstorage.class.php#L461-L472
201,920
net-tools/core
src/Formatters/Formatter.php
Formatter.closeRow
public function closeRow($last = false) { $this->_strategy->output($this->endRow() . ($last ? '' : $this->rowSeparator())); }
php
public function closeRow($last = false) { $this->_strategy->output($this->endRow() . ($last ? '' : $this->rowSeparator())); }
[ "public", "function", "closeRow", "(", "$", "last", "=", "false", ")", "{", "$", "this", "->", "_strategy", "->", "output", "(", "$", "this", "->", "endRow", "(", ")", ".", "(", "$", "last", "?", "''", ":", "$", "this", "->", "rowSeparator", "(", ...
End the row @param bool $last Indicates whether this is the last row or not
[ "End", "the", "row" ]
51446641cee22c0cf53d2b409c76cc8bd1a187e7
https://github.com/net-tools/core/blob/51446641cee22c0cf53d2b409c76cc8bd1a187e7/src/Formatters/Formatter.php#L88-L91
201,921
net-tools/core
src/Formatters/Formatter.php
Formatter.column
public function column($v, $last = false) { $this->_strategy->output($this->beginColumn() . $v . $this->endColumn() . ($last ? '' : $this->columnSeparator())); }
php
public function column($v, $last = false) { $this->_strategy->output($this->beginColumn() . $v . $this->endColumn() . ($last ? '' : $this->columnSeparator())); }
[ "public", "function", "column", "(", "$", "v", ",", "$", "last", "=", "false", ")", "{", "$", "this", "->", "_strategy", "->", "output", "(", "$", "this", "->", "beginColumn", "(", ")", ".", "$", "v", ".", "$", "this", "->", "endColumn", "(", ")"...
Write a column value for the current row @param string $v Value to output @param bool $last Indicates whether this is the last column of the row or not
[ "Write", "a", "column", "value", "for", "the", "current", "row" ]
51446641cee22c0cf53d2b409c76cc8bd1a187e7
https://github.com/net-tools/core/blob/51446641cee22c0cf53d2b409c76cc8bd1a187e7/src/Formatters/Formatter.php#L100-L103
201,922
net-tools/core
src/Formatters/Formatter.php
Formatter.row
public function row($r, $last = false) { $this->_strategy->output($this->beginRow()); $values = array_values($r); $valuesl = count($values); for ( $i = 0 ; $i < $valuesl ; $i++ ) $this->column($values[$i], $i+1 == $valuesl); $this->_strategy->output($this->endRow() . ($last ? '' : $this->rowSepar...
php
public function row($r, $last = false) { $this->_strategy->output($this->beginRow()); $values = array_values($r); $valuesl = count($values); for ( $i = 0 ; $i < $valuesl ; $i++ ) $this->column($values[$i], $i+1 == $valuesl); $this->_strategy->output($this->endRow() . ($last ? '' : $this->rowSepar...
[ "public", "function", "row", "(", "$", "r", ",", "$", "last", "=", "false", ")", "{", "$", "this", "->", "_strategy", "->", "output", "(", "$", "this", "->", "beginRow", "(", ")", ")", ";", "$", "values", "=", "array_values", "(", "$", "r", ")", ...
Write a row @param string[] $r Array of columns values to output @param bool $last Indicates whether this is the last row or not
[ "Write", "a", "row" ]
51446641cee22c0cf53d2b409c76cc8bd1a187e7
https://github.com/net-tools/core/blob/51446641cee22c0cf53d2b409c76cc8bd1a187e7/src/Formatters/Formatter.php#L113-L124
201,923
OxfordInfoLabs/kinikit-core
src/Object/DynamicSerialisableObject.php
DynamicSerialisableObject.__getSerialisablePropertyValue
public function __getSerialisablePropertyValue($propertyName) { try { return parent::__getSerialisablePropertyValue($propertyName); } catch (PropertyNotReadableException $e) { if ($this->__strictMode) { throw $e; } else { return nul...
php
public function __getSerialisablePropertyValue($propertyName) { try { return parent::__getSerialisablePropertyValue($propertyName); } catch (PropertyNotReadableException $e) { if ($this->__strictMode) { throw $e; } else { return nul...
[ "public", "function", "__getSerialisablePropertyValue", "(", "$", "propertyName", ")", "{", "try", "{", "return", "parent", "::", "__getSerialisablePropertyValue", "(", "$", "propertyName", ")", ";", "}", "catch", "(", "PropertyNotReadableException", "$", "e", ")", ...
Override the parent get property value method to be a little more tolerant than the parent @param string $propertyName
[ "Override", "the", "parent", "get", "property", "value", "method", "to", "be", "a", "little", "more", "tolerant", "than", "the", "parent" ]
edc1b2e6ffabd595c4c7d322279b3dd1e59ef359
https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Object/DynamicSerialisableObject.php#L131-L142
201,924
OxfordInfoLabs/kinikit-core
src/Object/DynamicSerialisableObject.php
DynamicSerialisableObject.__getSerialisablePropertyMap
public function __getSerialisablePropertyMap() { $serialisableProperties = parent::__getSerialisablePropertyMap(); $dynamicProperties = $this->__dynamicPropertyMap; $map = array(); foreach ($dynamicProperties as $key => $value) { $map[$key] = $value; } f...
php
public function __getSerialisablePropertyMap() { $serialisableProperties = parent::__getSerialisablePropertyMap(); $dynamicProperties = $this->__dynamicPropertyMap; $map = array(); foreach ($dynamicProperties as $key => $value) { $map[$key] = $value; } f...
[ "public", "function", "__getSerialisablePropertyMap", "(", ")", "{", "$", "serialisableProperties", "=", "parent", "::", "__getSerialisablePropertyMap", "(", ")", ";", "$", "dynamicProperties", "=", "$", "this", "->", "__dynamicPropertyMap", ";", "$", "map", "=", ...
Get the array of serialisable properties @return array
[ "Get", "the", "array", "of", "serialisable", "properties" ]
edc1b2e6ffabd595c4c7d322279b3dd1e59ef359
https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Object/DynamicSerialisableObject.php#L149-L166
201,925
OxfordInfoLabs/kinikit-core
src/Object/DynamicSerialisableObject.php
DynamicSerialisableObject.__setSerialisablePropertyMap
public function __setSerialisablePropertyMap($propertyMap, $ignoreNoneWritableProperties = false) { // Always ignore any unknown properties in parent as we need to capture these for dynamic purposes $dynamicProperties = parent::__setSerialisablePropertyMap($propertyMap, true); // If none ...
php
public function __setSerialisablePropertyMap($propertyMap, $ignoreNoneWritableProperties = false) { // Always ignore any unknown properties in parent as we need to capture these for dynamic purposes $dynamicProperties = parent::__setSerialisablePropertyMap($propertyMap, true); // If none ...
[ "public", "function", "__setSerialisablePropertyMap", "(", "$", "propertyMap", ",", "$", "ignoreNoneWritableProperties", "=", "false", ")", "{", "// Always ignore any unknown properties in parent as we need to capture these for dynamic purposes", "$", "dynamicProperties", "=", "par...
Set an array of serialisable properties @param array $propertyMap @param boolean $ignoreNoneWritableProperties @return array
[ "Set", "an", "array", "of", "serialisable", "properties" ]
edc1b2e6ffabd595c4c7d322279b3dd1e59ef359
https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Object/DynamicSerialisableObject.php#L176-L199
201,926
beMang/phpgone
core/Middlewares/NotFoundMiddleware.php
NotFoundMiddleware.process
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $errorPageConfig = Config::getInstance()->get('errorPage'); $controllerClass = '\\app\\Controllers\\' . $errorPageConfig[0]; $route = new Route('404', $errorPageConfig[0], $errorPa...
php
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $errorPageConfig = Config::getInstance()->get('errorPage'); $controllerClass = '\\app\\Controllers\\' . $errorPageConfig[0]; $route = new Route('404', $errorPageConfig[0], $errorPa...
[ "public", "function", "process", "(", "ServerRequestInterface", "$", "request", ",", "RequestHandlerInterface", "$", "handler", ")", ":", "ResponseInterface", "{", "$", "errorPageConfig", "=", "Config", "::", "getInstance", "(", ")", "->", "get", "(", "'errorPage'...
Process method for NotFoundMiddleware @param ServerRequestInterface $request @param RequestHandlerInterface $handler @return ResponseInterface Réponse 404
[ "Process", "method", "for", "NotFoundMiddleware" ]
6da468283880b7f5b28dc3735f8f13c97382710b
https://github.com/beMang/phpgone/blob/6da468283880b7f5b28dc3735f8f13c97382710b/core/Middlewares/NotFoundMiddleware.php#L36-L51
201,927
Wedeto/IO
src/FileType.php
FileType.getFromFile
public static function getFromFile($path) { if (!($path instanceof File)) $path = new File($path); $ext = $path->getExtension(); $path = $path->getFullPath(); $type = new FileType($ext ?? "", ""); if (empty($type->getMimeType()) && file_exists($path)) ...
php
public static function getFromFile($path) { if (!($path instanceof File)) $path = new File($path); $ext = $path->getExtension(); $path = $path->getFullPath(); $type = new FileType($ext ?? "", ""); if (empty($type->getMimeType()) && file_exists($path)) ...
[ "public", "static", "function", "getFromFile", "(", "$", "path", ")", "{", "if", "(", "!", "(", "$", "path", "instanceof", "File", ")", ")", "$", "path", "=", "new", "File", "(", "$", "path", ")", ";", "$", "ext", "=", "$", "path", "->", "getExte...
Return the mime type based on a file name @param string $path The path to the file @return FileType The File Type for this file
[ "Return", "the", "mime", "type", "based", "on", "a", "file", "name" ]
4cfeaedd1bd9bda3097d18cb12233a4afecb2e85
https://github.com/Wedeto/IO/blob/4cfeaedd1bd9bda3097d18cb12233a4afecb2e85/src/FileType.php#L114-L127
201,928
Wedeto/IO
src/FileType.php
FileType.isPlainText
public function isPlainText() { $sc_pos = strpos($this->mime_type, ';'); if ($sc_pos !== false) $mime_type = substr($this->mime_type, 0, $sc_pos); else $mime_type = $this->mime_type; // Some application/* types are plain text switch ($mime_typ...
php
public function isPlainText() { $sc_pos = strpos($this->mime_type, ';'); if ($sc_pos !== false) $mime_type = substr($this->mime_type, 0, $sc_pos); else $mime_type = $this->mime_type; // Some application/* types are plain text switch ($mime_typ...
[ "public", "function", "isPlainText", "(", ")", "{", "$", "sc_pos", "=", "strpos", "(", "$", "this", "->", "mime_type", ",", "';'", ")", ";", "if", "(", "$", "sc_pos", "!==", "false", ")", "$", "mime_type", "=", "substr", "(", "$", "this", "->", "mi...
Check if a mime type is plain text @param string $mime The Mime type @return bool True if the mime type is plaintext, false if it isn't
[ "Check", "if", "a", "mime", "type", "is", "plain", "text" ]
4cfeaedd1bd9bda3097d18cb12233a4afecb2e85
https://github.com/Wedeto/IO/blob/4cfeaedd1bd9bda3097d18cb12233a4afecb2e85/src/FileType.php#L188-L207
201,929
Wedeto/Util
src/DocComment.php
DocComment.parse
protected function parse() { $lines = explode("\n", $this->comment); $current_annotation = null; $value = null; foreach ($lines as $line) { $line = trim(ltrim($line, "/* \t")); if (preg_match("/^@(\w+)( (.*))?$/", $line, $matches) === 1) ...
php
protected function parse() { $lines = explode("\n", $this->comment); $current_annotation = null; $value = null; foreach ($lines as $line) { $line = trim(ltrim($line, "/* \t")); if (preg_match("/^@(\w+)( (.*))?$/", $line, $matches) === 1) ...
[ "protected", "function", "parse", "(", ")", "{", "$", "lines", "=", "explode", "(", "\"\\n\"", ",", "$", "this", "->", "comment", ")", ";", "$", "current_annotation", "=", "null", ";", "$", "value", "=", "null", ";", "foreach", "(", "$", "lines", "as...
Helper method that parses the doc comment
[ "Helper", "method", "that", "parses", "the", "doc", "comment" ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/DocComment.php#L50-L80
201,930
Wedeto/Util
src/DocComment.php
DocComment.getAnnotation
public function getAnnotation(string $name, bool $single = true) { $val = $this->annotations[$name] ?? []; return $single ? (count($val) ? reset($val) : null) : $val; }
php
public function getAnnotation(string $name, bool $single = true) { $val = $this->annotations[$name] ?? []; return $single ? (count($val) ? reset($val) : null) : $val; }
[ "public", "function", "getAnnotation", "(", "string", "$", "name", ",", "bool", "$", "single", "=", "true", ")", "{", "$", "val", "=", "$", "this", "->", "annotations", "[", "$", "name", "]", "??", "[", "]", ";", "return", "$", "single", "?", "(", ...
Get an annotated value for the DocComment @param string $name The name of the annotation @param bool $single Return either the first or all values @return string|array The string when single = true, otherwise all annotations. When single is true, and no annotation was found, null is returned.
[ "Get", "an", "annotated", "value", "for", "the", "DocComment" ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/DocComment.php#L90-L94
201,931
Wedeto/Util
src/DocComment.php
DocComment.getAnnotationTokens
public function getAnnotationTokens(string $name) { $val = $this->getAnnotation($name, true); $val = trim(preg_replace("/\s{1,}/", " ", $val)); return !empty($val) ? explode(" ", $val) : []; }
php
public function getAnnotationTokens(string $name) { $val = $this->getAnnotation($name, true); $val = trim(preg_replace("/\s{1,}/", " ", $val)); return !empty($val) ? explode(" ", $val) : []; }
[ "public", "function", "getAnnotationTokens", "(", "string", "$", "name", ")", "{", "$", "val", "=", "$", "this", "->", "getAnnotation", "(", "$", "name", ",", "true", ")", ";", "$", "val", "=", "trim", "(", "preg_replace", "(", "\"/\\s{1,}/\"", ",", "\...
Get the tokenized annotation - split by whitespace @param string $name The annotation to get the first word from @return array The tokens in the annotation
[ "Get", "the", "tokenized", "annotation", "-", "split", "by", "whitespace" ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/DocComment.php#L112-L118
201,932
RocketPropelledTortoise/Core
src/Taxonomy/Repositories/TermRepository.php
TermRepository.cacheTerm
protected function cacheTerm($term_id) { $term = TermContainer::with('translations')->find($term_id); if (!$term || !count($term->translations)) { return false; } $translations = []; foreach ($term->translations as $t) { $translations[$t->language_id...
php
protected function cacheTerm($term_id) { $term = TermContainer::with('translations')->find($term_id); if (!$term || !count($term->translations)) { return false; } $translations = []; foreach ($term->translations as $t) { $translations[$t->language_id...
[ "protected", "function", "cacheTerm", "(", "$", "term_id", ")", "{", "$", "term", "=", "TermContainer", "::", "with", "(", "'translations'", ")", "->", "find", "(", "$", "term_id", ")", ";", "if", "(", "!", "$", "term", "||", "!", "count", "(", "$", ...
Puts the term in the cache and returns it for usage @param int $term_id @return array
[ "Puts", "the", "term", "in", "the", "cache", "and", "returns", "it", "for", "usage" ]
78b65663fc463e21e494257140ddbed0a9ccb3c3
https://github.com/RocketPropelledTortoise/Core/blob/78b65663fc463e21e494257140ddbed0a9ccb3c3/src/Taxonomy/Repositories/TermRepository.php#L76-L120
201,933
koolkode/view-express
src/Tree/TextNode.php
TextNode.compile
public function compile(ExpressCompiler $compiler, $flags = 0) { try { if($flags & self::FLAG_RAW) { $compiler->write(var_export($this->text, true)); } else { // Using ENT_COMPAT due to Knockout JS (and others) data binding, this is not risky // in Express-parsed attribute values due to ...
php
public function compile(ExpressCompiler $compiler, $flags = 0) { try { if($flags & self::FLAG_RAW) { $compiler->write(var_export($this->text, true)); } else { // Using ENT_COMPAT due to Knockout JS (and others) data binding, this is not risky // in Express-parsed attribute values due to ...
[ "public", "function", "compile", "(", "ExpressCompiler", "$", "compiler", ",", "$", "flags", "=", "0", ")", "{", "try", "{", "if", "(", "$", "flags", "&", "self", "::", "FLAG_RAW", ")", "{", "$", "compiler", "->", "write", "(", "var_export", "(", "$"...
Compiles the text node into it's PHP code. @param ExpressCompiler $compiler @param integer $flags Raw mode is used when an element is morphed using a tag builder.
[ "Compiles", "the", "text", "node", "into", "it", "s", "PHP", "code", "." ]
a8ebe6f373b6bfe8b8818d6264535e8fe063a596
https://github.com/koolkode/view-express/blob/a8ebe6f373b6bfe8b8818d6264535e8fe063a596/src/Tree/TextNode.php#L58-L82
201,934
JoeBengalen/Assert
src/Assert.php
Assert.isBoolean
public static function isBoolean($value, $message = null) { if (!is_bool($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected boolean, but got %s', Helper::typeToString($value) )); } }
php
public static function isBoolean($value, $message = null) { if (!is_bool($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected boolean, but got %s', Helper::typeToString($value) )); } }
[ "public", "static", "function", "isBoolean", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_bool", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", "(", "$", "message", "?...
Assert that the value is boolean. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "boolean", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L32-L40
201,935
JoeBengalen/Assert
src/Assert.php
Assert.isInteger
public static function isInteger($value, $message = null) { if (!is_int($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected integer, but got %s', Helper::typeToString($value) )); } }
php
public static function isInteger($value, $message = null) { if (!is_int($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected integer, but got %s', Helper::typeToString($value) )); } }
[ "public", "static", "function", "isInteger", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_int", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", "(", "$", "message", "?"...
Assert that the value is integer. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "integer", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L52-L60
201,936
JoeBengalen/Assert
src/Assert.php
Assert.isNumeric
public static function isNumeric($value, $message = null) { if (!is_numeric($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected numeric, but got %s', Helper::typeToString($value) )); } }
php
public static function isNumeric($value, $message = null) { if (!is_numeric($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected numeric, but got %s', Helper::typeToString($value) )); } }
[ "public", "static", "function", "isNumeric", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_numeric", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", "(", "$", "message", ...
Assert that the value is numeric. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "numeric", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L72-L80
201,937
JoeBengalen/Assert
src/Assert.php
Assert.isFloat
public static function isFloat($value, $message = null) { if (!is_float($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected float, but got %s', Helper::typeToString($value) )); } }
php
public static function isFloat($value, $message = null) { if (!is_float($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected float, but got %s', Helper::typeToString($value) )); } }
[ "public", "static", "function", "isFloat", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_float", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", "(", "$", "message", "?"...
Assert that the value is float. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "float", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L92-L100
201,938
JoeBengalen/Assert
src/Assert.php
Assert.isString
public static function isString($value, $message = null) { if (!is_string($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected string, but got %s', Helper::typeToString($value) )); } }
php
public static function isString($value, $message = null) { if (!is_string($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected string, but got %s', Helper::typeToString($value) )); } }
[ "public", "static", "function", "isString", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_string", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", "(", "$", "message", "...
Assert that the value is string. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "string", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L112-L120
201,939
JoeBengalen/Assert
src/Assert.php
Assert.isScalar
public static function isScalar($value, $message = null) { if (!is_scalar($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected scalar, but got %s', Helper::typeToString($value) )); } }
php
public static function isScalar($value, $message = null) { if (!is_scalar($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected scalar, but got %s', Helper::typeToString($value) )); } }
[ "public", "static", "function", "isScalar", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_scalar", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", "(", "$", "message", "...
Assert that the value is scalar. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "scalar", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L132-L140
201,940
JoeBengalen/Assert
src/Assert.php
Assert.isArray
public static function isArray($value, $message = null) { if (!is_array($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected array, but got %s', Helper::typeToString($value) )); } }
php
public static function isArray($value, $message = null) { if (!is_array($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected array, but got %s', Helper::typeToString($value) )); } }
[ "public", "static", "function", "isArray", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_array", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", "(", "$", "message", "?"...
Assert that the value is array. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "array", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L152-L160
201,941
JoeBengalen/Assert
src/Assert.php
Assert.isInstanceOf
public static function isInstanceOf($value, $class, $message = null) { if (!$value instanceof $class) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected instance of %2$s, but got %s', Helper::typeToString($value), $class ...
php
public static function isInstanceOf($value, $class, $message = null) { if (!$value instanceof $class) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected instance of %2$s, but got %s', Helper::typeToString($value), $class ...
[ "public", "static", "function", "isInstanceOf", "(", "$", "value", ",", "$", "class", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "$", "value", "instanceof", "$", "class", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprint...
Assert that the value is instance of class. @param mixed $value @param string $class @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "instance", "of", "class", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L193-L202
201,942
JoeBengalen/Assert
src/Assert.php
Assert.isResource
public static function isResource($value, $message = null) { if (!is_resource($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected resource, but got %s', Helper::typeToString($value) )); } }
php
public static function isResource($value, $message = null) { if (!is_resource($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected resource, but got %s', Helper::typeToString($value) )); } }
[ "public", "static", "function", "isResource", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_resource", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "sprintf", "(", "$", "message",...
Assert that the value is resource. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "resource", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L234-L242
201,943
JoeBengalen/Assert
src/Assert.php
Assert.isDirectory
public static function isDirectory($value, $message = null) { if (!is_string($value) || !is_dir($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected directory, but got %s', Helper::valueToString($value) )); } }
php
public static function isDirectory($value, $message = null) { if (!is_string($value) || !is_dir($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected directory, but got %s', Helper::valueToString($value) )); } }
[ "public", "static", "function", "isDirectory", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_string", "(", "$", "value", ")", "||", "!", "is_dir", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgument...
Assert that the value is directory. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "directory", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L254-L262
201,944
JoeBengalen/Assert
src/Assert.php
Assert.isFile
public static function isFile($value, $message = null) { if (!is_string($value) || !is_file($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected file, but got %s', Helper::valueToString($value) )); } }
php
public static function isFile($value, $message = null) { if (!is_string($value) || !is_file($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected file, but got %s', Helper::valueToString($value) )); } }
[ "public", "static", "function", "isFile", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_string", "(", "$", "value", ")", "||", "!", "is_file", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgumentExce...
Assert that the value is file. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "file", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L274-L282
201,945
JoeBengalen/Assert
src/Assert.php
Assert.isNullOrBoolean
public static function isNullOrBoolean($value, $message = null) { if (!is_null($value) && !is_bool($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or boolean, but got %s', Helper::typeToString($value) )); } ...
php
public static function isNullOrBoolean($value, $message = null) { if (!is_null($value) && !is_bool($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or boolean, but got %s', Helper::typeToString($value) )); } ...
[ "public", "static", "function", "isNullOrBoolean", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "value", ")", "&&", "!", "is_bool", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgum...
Assert that the value is null or boolean. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "null", "or", "boolean", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L294-L302
201,946
JoeBengalen/Assert
src/Assert.php
Assert.isNullOrInteger
public static function isNullOrInteger($value, $message = null) { if (!is_null($value) && !is_int($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or integer, but got %s', Helper::typeToString($value) )); } ...
php
public static function isNullOrInteger($value, $message = null) { if (!is_null($value) && !is_int($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or integer, but got %s', Helper::typeToString($value) )); } ...
[ "public", "static", "function", "isNullOrInteger", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "value", ")", "&&", "!", "is_int", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgume...
Assert that the value is null or integer. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "null", "or", "integer", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L314-L322
201,947
JoeBengalen/Assert
src/Assert.php
Assert.isNullOrNumeric
public static function isNullOrNumeric($value, $message = null) { if (!is_null($value) && !is_numeric($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or numeric, but got %s', Helper::typeToString($value) )); } ...
php
public static function isNullOrNumeric($value, $message = null) { if (!is_null($value) && !is_numeric($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or numeric, but got %s', Helper::typeToString($value) )); } ...
[ "public", "static", "function", "isNullOrNumeric", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "value", ")", "&&", "!", "is_numeric", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidAr...
Assert that the value is null or numeric. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "null", "or", "numeric", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L334-L342
201,948
JoeBengalen/Assert
src/Assert.php
Assert.isNullOrFloat
public static function isNullOrFloat($value, $message = null) { if (!is_null($value) && !is_float($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or float, but got %s', Helper::typeToString($value) )); } }
php
public static function isNullOrFloat($value, $message = null) { if (!is_null($value) && !is_float($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or float, but got %s', Helper::typeToString($value) )); } }
[ "public", "static", "function", "isNullOrFloat", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "value", ")", "&&", "!", "is_float", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgume...
Assert that the value is null or float. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "null", "or", "float", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L354-L362
201,949
JoeBengalen/Assert
src/Assert.php
Assert.isNullOrString
public static function isNullOrString($value, $message = null) { if (!is_null($value) && !is_string($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or string, but got %s', Helper::typeToString($value) )); } ...
php
public static function isNullOrString($value, $message = null) { if (!is_null($value) && !is_string($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or string, but got %s', Helper::typeToString($value) )); } ...
[ "public", "static", "function", "isNullOrString", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "value", ")", "&&", "!", "is_string", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgu...
Assert that the value is null or string. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "null", "or", "string", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L374-L382
201,950
JoeBengalen/Assert
src/Assert.php
Assert.isNullOrScalar
public static function isNullOrScalar($value, $message = null) { if (!is_null($value) && !is_scalar($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or scalar, but got %s', Helper::typeToString($value) )); } ...
php
public static function isNullOrScalar($value, $message = null) { if (!is_null($value) && !is_scalar($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or scalar, but got %s', Helper::typeToString($value) )); } ...
[ "public", "static", "function", "isNullOrScalar", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "value", ")", "&&", "!", "is_scalar", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgu...
Assert that the value is null or scalar. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "null", "or", "scalar", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L394-L402
201,951
JoeBengalen/Assert
src/Assert.php
Assert.isNullOrArray
public static function isNullOrArray($value, $message = null) { if (!is_null($value) && !is_array($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or array, but got %s', Helper::typeToString($value) )); } }
php
public static function isNullOrArray($value, $message = null) { if (!is_null($value) && !is_array($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or array, but got %s', Helper::typeToString($value) )); } }
[ "public", "static", "function", "isNullOrArray", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "value", ")", "&&", "!", "is_array", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgume...
Assert that the value is null or array. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "null", "or", "array", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L414-L422
201,952
JoeBengalen/Assert
src/Assert.php
Assert.isNullOrCallable
public static function isNullOrCallable($value, $message = null) { if (!is_null($value) && !is_callable($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or callable, but got %s', Helper::typeToString($value) )); ...
php
public static function isNullOrCallable($value, $message = null) { if (!is_null($value) && !is_callable($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or callable, but got %s', Helper::typeToString($value) )); ...
[ "public", "static", "function", "isNullOrCallable", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "value", ")", "&&", "!", "is_callable", "(", "$", "value", ")", ")", "{", "throw", "new", "Invalid...
Assert that the value is null or callable. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "null", "or", "callable", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L434-L442
201,953
JoeBengalen/Assert
src/Assert.php
Assert.isNullOrInstanceOf
public static function isNullOrInstanceOf($value, $class, $message = null) { if (!is_null($value) && !$value instanceof $class) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or instance of %2$s, but got %s', Helper::typeToString($value),...
php
public static function isNullOrInstanceOf($value, $class, $message = null) { if (!is_null($value) && !$value instanceof $class) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or instance of %2$s, but got %s', Helper::typeToString($value),...
[ "public", "static", "function", "isNullOrInstanceOf", "(", "$", "value", ",", "$", "class", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "value", ")", "&&", "!", "$", "value", "instanceof", "$", "class", ")", "{", ...
Assert that the value is null or instance of class. @param mixed $value @param string $class @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "null", "or", "instance", "of", "class", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L455-L464
201,954
JoeBengalen/Assert
src/Assert.php
Assert.isNullOrTraversable
public static function isNullOrTraversable($value, $message = null) { if (!is_null($value) && !is_array($value) && !$value instanceof Traversable) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or traversable, but got %s', Helper::typeToS...
php
public static function isNullOrTraversable($value, $message = null) { if (!is_null($value) && !is_array($value) && !$value instanceof Traversable) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or traversable, but got %s', Helper::typeToS...
[ "public", "static", "function", "isNullOrTraversable", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "value", ")", "&&", "!", "is_array", "(", "$", "value", ")", "&&", "!", "$", "value", "instance...
Assert that the value is null or traversable. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "null", "or", "traversable", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L476-L484
201,955
JoeBengalen/Assert
src/Assert.php
Assert.isNullOrResource
public static function isNullOrResource($value, $message = null) { if (!is_null($value) && !is_resource($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or resource, but got %s', Helper::typeToString($value) )); ...
php
public static function isNullOrResource($value, $message = null) { if (!is_null($value) && !is_resource($value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or resource, but got %s', Helper::typeToString($value) )); ...
[ "public", "static", "function", "isNullOrResource", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "value", ")", "&&", "!", "is_resource", "(", "$", "value", ")", ")", "{", "throw", "new", "Invalid...
Assert that the value is null or resource. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "null", "or", "resource", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L496-L504
201,956
JoeBengalen/Assert
src/Assert.php
Assert.isNullOrDirectory
public static function isNullOrDirectory($value, $message = null) { if (!is_null($value) && !(is_string($value) && is_dir($value))) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or directory, but got %s', Helper::valueToString($value) ...
php
public static function isNullOrDirectory($value, $message = null) { if (!is_null($value) && !(is_string($value) && is_dir($value))) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or directory, but got %s', Helper::valueToString($value) ...
[ "public", "static", "function", "isNullOrDirectory", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "value", ")", "&&", "!", "(", "is_string", "(", "$", "value", ")", "&&", "is_dir", "(", "$", "v...
Assert that the value is null or directory. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "null", "or", "directory", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L516-L524
201,957
JoeBengalen/Assert
src/Assert.php
Assert.isNullOrFile
public static function isNullOrFile($value, $message = null) { if (!is_null($value) && !(is_string($value) && is_file($value))) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or file, but got %s', Helper::valueToString($value) ...
php
public static function isNullOrFile($value, $message = null) { if (!is_null($value) && !(is_string($value) && is_file($value))) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected null or file, but got %s', Helper::valueToString($value) ...
[ "public", "static", "function", "isNullOrFile", "(", "$", "value", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "is_null", "(", "$", "value", ")", "&&", "!", "(", "is_string", "(", "$", "value", ")", "&&", "is_file", "(", "$", "value...
Assert that the value is null or file. @param mixed $value @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "the", "value", "is", "null", "or", "file", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L536-L544
201,958
JoeBengalen/Assert
src/Assert.php
Assert.keyExists
public static function keyExists($value, $key, $message = null) { if (!array_key_exists($key, $value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected array key %2$s to exist', Helper::typeToString($value), Helper::valueToString...
php
public static function keyExists($value, $key, $message = null) { if (!array_key_exists($key, $value)) { throw new InvalidArgumentException(sprintf( $message ?: 'Expected array key %2$s to exist', Helper::typeToString($value), Helper::valueToString...
[ "public", "static", "function", "keyExists", "(", "$", "value", ",", "$", "key", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "key", ",", "$", "value", ")", ")", "{", "throw", "new", "InvalidArgumentExceptio...
Assert that key exists in value. @param mixed $value @param string $key @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "key", "exists", "in", "value", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L557-L566
201,959
JoeBengalen/Assert
src/Assert.php
Assert.inArray
public static function inArray($value, array $array, $message = null) { if (!in_array($value, $array)) { throw new InvalidArgumentException(sprintf( $message ?: 'Value %s is not in array', Helper::valueToString($value) )); } }
php
public static function inArray($value, array $array, $message = null) { if (!in_array($value, $array)) { throw new InvalidArgumentException(sprintf( $message ?: 'Value %s is not in array', Helper::valueToString($value) )); } }
[ "public", "static", "function", "inArray", "(", "$", "value", ",", "array", "$", "array", ",", "$", "message", "=", "null", ")", "{", "if", "(", "!", "in_array", "(", "$", "value", ",", "$", "array", ")", ")", "{", "throw", "new", "InvalidArgumentExc...
Assert that value is in array. @param mixed $value @param array $array @param string $message @return void @throws InvalidArgumentException
[ "Assert", "that", "value", "is", "in", "array", "." ]
022b3f698d6bb94bda10a3e5f2f9f2219796c233
https://github.com/JoeBengalen/Assert/blob/022b3f698d6bb94bda10a3e5f2f9f2219796c233/src/Assert.php#L579-L587
201,960
vespolina/action
lib/Vespolina/Action/Manager/ActionManager.php
ActionManager.doExecute
protected function doExecute(ActionInterface $action, $reprocess = false) { // The first question is, are we even allowed to reprocess this action? $definition = $this->findActionDefinitionByName($action->getName()); if (null == $definition) { throw new \RuntimeException...
php
protected function doExecute(ActionInterface $action, $reprocess = false) { // The first question is, are we even allowed to reprocess this action? $definition = $this->findActionDefinitionByName($action->getName()); if (null == $definition) { throw new \RuntimeException...
[ "protected", "function", "doExecute", "(", "ActionInterface", "$", "action", ",", "$", "reprocess", "=", "false", ")", "{", "// The first question is, are we even allowed to reprocess this action?", "$", "definition", "=", "$", "this", "->", "findActionDefinitionByName", ...
Start the execution of an action or schedule the action for processing later on @param ActionInterface $action @param bool $reprocess
[ "Start", "the", "execution", "of", "an", "action", "or", "schedule", "the", "action", "for", "processing", "later", "on" ]
798baf0401c81cc507c51a54bf57fdd3505f5b92
https://github.com/vespolina/action/blob/798baf0401c81cc507c51a54bf57fdd3505f5b92/lib/Vespolina/Action/Manager/ActionManager.php#L138-L163
201,961
dubhunter/talon
src/Http.php
Http.getStatusMessage
public static function getStatusMessage($code) { if (!$code) { return ''; } return isset(self::$statusMessages[$code]) ? self::$statusMessages[$code] : ''; }
php
public static function getStatusMessage($code) { if (!$code) { return ''; } return isset(self::$statusMessages[$code]) ? self::$statusMessages[$code] : ''; }
[ "public", "static", "function", "getStatusMessage", "(", "$", "code", ")", "{", "if", "(", "!", "$", "code", ")", "{", "return", "''", ";", "}", "return", "isset", "(", "self", "::", "$", "statusMessages", "[", "$", "code", "]", ")", "?", "self", "...
Returns a messages for a given code @param $code @return string
[ "Returns", "a", "messages", "for", "a", "given", "code" ]
308b7284556dfaff0d9ac4c7739dc6a46930ef36
https://github.com/dubhunter/talon/blob/308b7284556dfaff0d9ac4c7739dc6a46930ef36/src/Http.php#L85-L91
201,962
Aprila/Quick
src/Quick/Presenter/ListPresenter.php
ListPresenter.addOrEditObject
protected function addOrEditObject($data = [], $redirect = TRUE) { try { if ($this->detailObject) { // Edit object $this->canUser('edit'); $this->mainManager->edit($this->detailObject->id, $data); $this->flashMessage('Object saved'); } else { // Add object $this->canUser('add'); $t...
php
protected function addOrEditObject($data = [], $redirect = TRUE) { try { if ($this->detailObject) { // Edit object $this->canUser('edit'); $this->mainManager->edit($this->detailObject->id, $data); $this->flashMessage('Object saved'); } else { // Add object $this->canUser('add'); $t...
[ "protected", "function", "addOrEditObject", "(", "$", "data", "=", "[", "]", ",", "$", "redirect", "=", "TRUE", ")", "{", "try", "{", "if", "(", "$", "this", "->", "detailObject", ")", "{", "// Edit object", "$", "this", "->", "canUser", "(", "'edit'",...
Simple implementation add or edit object @param array $data @param bool $redirect
[ "Simple", "implementation", "add", "or", "edit", "object" ]
53c3830c7256d6f46f6bc352d7e0b022f0c81277
https://github.com/Aprila/Quick/blob/53c3830c7256d6f46f6bc352d7e0b022f0c81277/src/Quick/Presenter/ListPresenter.php#L168-L192
201,963
gplcart/backup
controllers/Backup.php
Backup.listBackup
public function listBackup() { $this->downloadListBackup(); $this->actionListBackup(); $this->setTitleListBackup(); $this->setBreadcrumbListBackup(); $this->setFilterListBackup(); $this->setPagerListBackup(); $this->setData('backups', $this->getListBackup());...
php
public function listBackup() { $this->downloadListBackup(); $this->actionListBackup(); $this->setTitleListBackup(); $this->setBreadcrumbListBackup(); $this->setFilterListBackup(); $this->setPagerListBackup(); $this->setData('backups', $this->getListBackup());...
[ "public", "function", "listBackup", "(", ")", "{", "$", "this", "->", "downloadListBackup", "(", ")", ";", "$", "this", "->", "actionListBackup", "(", ")", ";", "$", "this", "->", "setTitleListBackup", "(", ")", ";", "$", "this", "->", "setBreadcrumbListBa...
Displays the backup overview page
[ "Displays", "the", "backup", "overview", "page" ]
5838e2f47f0bb8c2e18b6697e20bec5682b71393
https://github.com/gplcart/backup/blob/5838e2f47f0bb8c2e18b6697e20bec5682b71393/controllers/Backup.php#L46-L59
201,964
gplcart/backup
controllers/Backup.php
Backup.downloadListBackup
protected function downloadListBackup() { $backup_id = $this->getQuery('download'); if (empty($backup_id)) { return null; } $this->controlAccess('backup_download'); $backup = $this->backup->get($backup_id); if (!empty($backup['path'])) { $t...
php
protected function downloadListBackup() { $backup_id = $this->getQuery('download'); if (empty($backup_id)) { return null; } $this->controlAccess('backup_download'); $backup = $this->backup->get($backup_id); if (!empty($backup['path'])) { $t...
[ "protected", "function", "downloadListBackup", "(", ")", "{", "$", "backup_id", "=", "$", "this", "->", "getQuery", "(", "'download'", ")", ";", "if", "(", "empty", "(", "$", "backup_id", ")", ")", "{", "return", "null", ";", "}", "$", "this", "->", ...
Downloads a backup
[ "Downloads", "a", "backup" ]
5838e2f47f0bb8c2e18b6697e20bec5682b71393
https://github.com/gplcart/backup/blob/5838e2f47f0bb8c2e18b6697e20bec5682b71393/controllers/Backup.php#L73-L88
201,965
gplcart/backup
controllers/Backup.php
Backup.actionListBackup
protected function actionListBackup() { list($selected, $action) = $this->getPostedAction(); $deleted = 0; foreach ($selected as $id) { if ($action === 'delete' && $this->access('backup_delete')) { $deleted += (int) $this->backup->delete($id); } ...
php
protected function actionListBackup() { list($selected, $action) = $this->getPostedAction(); $deleted = 0; foreach ($selected as $id) { if ($action === 'delete' && $this->access('backup_delete')) { $deleted += (int) $this->backup->delete($id); } ...
[ "protected", "function", "actionListBackup", "(", ")", "{", "list", "(", "$", "selected", ",", "$", "action", ")", "=", "$", "this", "->", "getPostedAction", "(", ")", ";", "$", "deleted", "=", "0", ";", "foreach", "(", "$", "selected", "as", "$", "i...
Applies an action to the selected backups
[ "Applies", "an", "action", "to", "the", "selected", "backups" ]
5838e2f47f0bb8c2e18b6697e20bec5682b71393
https://github.com/gplcart/backup/blob/5838e2f47f0bb8c2e18b6697e20bec5682b71393/controllers/Backup.php#L93-L109
201,966
gplcart/backup
controllers/Backup.php
Backup.getListBackup
protected function getListBackup() { $options = $this->query_filter; $options['limit'] = $this->data_limit; return $this->backup->getList($options); }
php
protected function getListBackup() { $options = $this->query_filter; $options['limit'] = $this->data_limit; return $this->backup->getList($options); }
[ "protected", "function", "getListBackup", "(", ")", "{", "$", "options", "=", "$", "this", "->", "query_filter", ";", "$", "options", "[", "'limit'", "]", "=", "$", "this", "->", "data_limit", ";", "return", "$", "this", "->", "backup", "->", "getList", ...
Returns an array of backups @return array
[ "Returns", "an", "array", "of", "backups" ]
5838e2f47f0bb8c2e18b6697e20bec5682b71393
https://github.com/gplcart/backup/blob/5838e2f47f0bb8c2e18b6697e20bec5682b71393/controllers/Backup.php#L144-L149
201,967
Kris-Kuiper/sFire-Framework
src/System/Captcha.php
Captcha.setImage
public function setImage($image) { if(false === is_string($image)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($image)), E_USER_ERROR); } $file = new File($image); if(false === $file -> exists()) { return trigger_error(...
php
public function setImage($image) { if(false === is_string($image)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($image)), E_USER_ERROR); } $file = new File($image); if(false === $file -> exists()) { return trigger_error(...
[ "public", "function", "setImage", "(", "$", "image", ")", "{", "if", "(", "false", "===", "is_string", "(", "$", "image", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 passed to %s() must be of the type string, \"%s\" given'", ",", "_...
Set image by giving a file path as image @param string $image @return sFire\Captcha\Captcha
[ "Set", "image", "by", "giving", "a", "file", "path", "as", "image" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/System/Captcha.php#L72-L91
201,968
Kris-Kuiper/sFire-Framework
src/System/Captcha.php
Captcha.setFont
public function setFont($font) { if(false === is_string($font)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($font)), E_USER_ERROR); } $file = new File($font); if(false === $file -> exists()) { return trigger_error(sprin...
php
public function setFont($font) { if(false === is_string($font)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($font)), E_USER_ERROR); } $file = new File($font); if(false === $file -> exists()) { return trigger_error(sprin...
[ "public", "function", "setFont", "(", "$", "font", ")", "{", "if", "(", "false", "===", "is_string", "(", "$", "font", ")", ")", "{", "return", "trigger_error", "(", "sprintf", "(", "'Argument 1 passed to %s() must be of the type string, \"%s\" given'", ",", "__ME...
Set the font by giving a file path as font @param string $font @return sFire\Captcha\Captcha
[ "Set", "the", "font", "by", "giving", "a", "file", "path", "as", "font" ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/System/Captcha.php#L99-L114
201,969
Kris-Kuiper/sFire-Framework
src/System/Captcha.php
Captcha.setFontSize
public function setFontSize($min, $max = null) { if(false === ('-' . intval($min) == '-' . $min)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($min)), E_USER_ERROR); } if(null !== $max && false === ('-' . intval($max) == '-' . $...
php
public function setFontSize($min, $max = null) { if(false === ('-' . intval($min) == '-' . $min)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($min)), E_USER_ERROR); } if(null !== $max && false === ('-' . intval($max) == '-' . $...
[ "public", "function", "setFontSize", "(", "$", "min", ",", "$", "max", "=", "null", ")", "{", "if", "(", "false", "===", "(", "'-'", ".", "intval", "(", "$", "min", ")", "==", "'-'", ".", "$", "min", ")", ")", "{", "return", "trigger_error", "(",...
Set the fontsize min. and max. If no max. is set, max. will be the same as min. @param int $min @param int $max @return sFire\Captcha\Captcha
[ "Set", "the", "fontsize", "min", ".", "and", "max", ".", "If", "no", "max", ".", "is", "set", "max", ".", "will", "be", "the", "same", "as", "min", "." ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/System/Captcha.php#L152-L165
201,970
Kris-Kuiper/sFire-Framework
src/System/Captcha.php
Captcha.setAngle
public function setAngle($min, $max = null) { if(false === ('-' . intval($min) == '-' . $min)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($min)), E_USER_ERROR); } if(null !== $max && false === ('-' . intval($max) == '-' . $max...
php
public function setAngle($min, $max = null) { if(false === ('-' . intval($min) == '-' . $min)) { return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($min)), E_USER_ERROR); } if(null !== $max && false === ('-' . intval($max) == '-' . $max...
[ "public", "function", "setAngle", "(", "$", "min", ",", "$", "max", "=", "null", ")", "{", "if", "(", "false", "===", "(", "'-'", ".", "intval", "(", "$", "min", ")", "==", "'-'", ".", "$", "min", ")", ")", "{", "return", "trigger_error", "(", ...
Set the angle min. and max. If no max. is set, max. will be the same as min. @param int $min @param int $max @return sFire\Captcha\Captcha
[ "Set", "the", "angle", "min", ".", "and", "max", ".", "If", "no", "max", ".", "is", "set", "max", ".", "will", "be", "the", "same", "as", "min", "." ]
deefe1d9d2b40e7326381e8dcd4f01f9aa61885c
https://github.com/Kris-Kuiper/sFire-Framework/blob/deefe1d9d2b40e7326381e8dcd4f01f9aa61885c/src/System/Captcha.php#L174-L187
201,971
essence/dom
src/Tag.php
Tag.matches
public function matches($name, $pattern, &$matches = []) { return preg_match($pattern, $this->get($name), $matches); }
php
public function matches($name, $pattern, &$matches = []) { return preg_match($pattern, $this->get($name), $matches); }
[ "public", "function", "matches", "(", "$", "name", ",", "$", "pattern", ",", "&", "$", "matches", "=", "[", "]", ")", "{", "return", "preg_match", "(", "$", "pattern", ",", "$", "this", "->", "get", "(", "$", "name", ")", ",", "$", "matches", ")"...
Tests if the value of an attribute matches the given pattern. @param string $name Attribute name. @param string $pattern Pattern. @param array $matches Search results. @return boolean If the attribute value matches the pattern.
[ "Tests", "if", "the", "value", "of", "an", "attribute", "matches", "the", "given", "pattern", "." ]
e5776d2286f4ccbd048d160c28ac77ccc6d68f3a
https://github.com/essence/dom/blob/e5776d2286f4ccbd048d160c28ac77ccc6d68f3a/src/Tag.php#L36-L38
201,972
dms-org/common.structure
src/Colour/TransparentColour.php
TransparentColour.fromRgba
public static function fromRgba(int $red, int $green, int $blue, float $alpha) : TransparentColour { return new self(new Colour($red, $green, $blue), $alpha); }
php
public static function fromRgba(int $red, int $green, int $blue, float $alpha) : TransparentColour { return new self(new Colour($red, $green, $blue), $alpha); }
[ "public", "static", "function", "fromRgba", "(", "int", "$", "red", ",", "int", "$", "green", ",", "int", "$", "blue", ",", "float", "$", "alpha", ")", ":", "TransparentColour", "{", "return", "new", "self", "(", "new", "Colour", "(", "$", "red", ","...
Creates a new colour from the supplied rgba values @param int $red @param int $green @param int $blue @param float $alpha @return TransparentColour
[ "Creates", "a", "new", "colour", "from", "the", "supplied", "rgba", "values" ]
23f122182f60df5ec847047a81a39c8aab019ff1
https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/Colour/TransparentColour.php#L74-L77
201,973
dms-org/common.structure
src/Colour/TransparentColour.php
TransparentColour.fromRgbaString
public static function fromRgbaString(string $string) : TransparentColour { list($r, $g, $b, $a) = ColourStringParser::parseRgbaString($string); return new self(new Colour($r, $g, $b), $a); }
php
public static function fromRgbaString(string $string) : TransparentColour { list($r, $g, $b, $a) = ColourStringParser::parseRgbaString($string); return new self(new Colour($r, $g, $b), $a); }
[ "public", "static", "function", "fromRgbaString", "(", "string", "$", "string", ")", ":", "TransparentColour", "{", "list", "(", "$", "r", ",", "$", "g", ",", "$", "b", ",", "$", "a", ")", "=", "ColourStringParser", "::", "parseRgbaString", "(", "$", "...
Creates a new colour from the supplied rgba string value @param string $string eg: "rgba(100, 100, 100, 0.5)" @return TransparentColour @throws InvalidArgumentException
[ "Creates", "a", "new", "colour", "from", "the", "supplied", "rgba", "string", "value" ]
23f122182f60df5ec847047a81a39c8aab019ff1
https://github.com/dms-org/common.structure/blob/23f122182f60df5ec847047a81a39c8aab019ff1/src/Colour/TransparentColour.php#L87-L92
201,974
battis/configxml
src/ConfigXML.php
ConfigXML.toArray
public function toArray($query) { $nodes = $this->xpath->query((string) $query); if ($nodes->length) { $result = array(); foreach ($nodes as $node) { $result[] = json_decode( json_encode( simplexml_load_string( ...
php
public function toArray($query) { $nodes = $this->xpath->query((string) $query); if ($nodes->length) { $result = array(); foreach ($nodes as $node) { $result[] = json_decode( json_encode( simplexml_load_string( ...
[ "public", "function", "toArray", "(", "$", "query", ")", "{", "$", "nodes", "=", "$", "this", "->", "xpath", "->", "query", "(", "(", "string", ")", "$", "query", ")", ";", "if", "(", "$", "nodes", "->", "length", ")", "{", "$", "result", "=", ...
Extract an XPath query as an associative array @param string $query XPath query @return array An array of matches converted to associative arrays. `null` if no matches found.
[ "Extract", "an", "XPath", "query", "as", "an", "associative", "array" ]
7c6aeddce5c26bee553d7160bae47b30344ae122
https://github.com/battis/configxml/blob/7c6aeddce5c26bee553d7160bae47b30344ae122/src/ConfigXML.php#L74-L92
201,975
battis/configxml
src/ConfigXML.php
ConfigXML.recursiveImplode
private static function recursiveImplode($glue, $pieces) { if (is_array($pieces)) { $strings = array(); foreach ($pieces as $key => $piece) { if (is_int($key) || $key !== self::ATTRIBUTES) { if (is_array($piece)) { $strings[...
php
private static function recursiveImplode($glue, $pieces) { if (is_array($pieces)) { $strings = array(); foreach ($pieces as $key => $piece) { if (is_int($key) || $key !== self::ATTRIBUTES) { if (is_array($piece)) { $strings[...
[ "private", "static", "function", "recursiveImplode", "(", "$", "glue", ",", "$", "pieces", ")", "{", "if", "(", "is_array", "(", "$", "pieces", ")", ")", "{", "$", "strings", "=", "array", "(", ")", ";", "foreach", "(", "$", "pieces", "as", "$", "k...
Recursively implode nested ArrayAccess @param string $glue Glue to hold together imploded list of pieces @param array $pieces @return string
[ "Recursively", "implode", "nested", "ArrayAccess" ]
7c6aeddce5c26bee553d7160bae47b30344ae122
https://github.com/battis/configxml/blob/7c6aeddce5c26bee553d7160bae47b30344ae122/src/ConfigXML.php#L114-L131
201,976
battis/configxml
src/ConfigXML.php
ConfigXML.DOMtoArray
private static function DOMtoArray($node) { $occurence = array(); $result = null; if ($node->childNodes) { foreach ($node->childNodes as $child) { if (isset($occurence[$child->nodeName])) { $occurence[$child->nodeName]++; } els...
php
private static function DOMtoArray($node) { $occurence = array(); $result = null; if ($node->childNodes) { foreach ($node->childNodes as $child) { if (isset($occurence[$child->nodeName])) { $occurence[$child->nodeName]++; } els...
[ "private", "static", "function", "DOMtoArray", "(", "$", "node", ")", "{", "$", "occurence", "=", "array", "(", ")", ";", "$", "result", "=", "null", ";", "if", "(", "$", "node", "->", "childNodes", ")", "{", "foreach", "(", "$", "node", "->", "chi...
Convert the XML DOM into a nested associative array @param DOMNode $node Root node of the array @return array
[ "Convert", "the", "XML", "DOM", "into", "a", "nested", "associative", "array" ]
7c6aeddce5c26bee553d7160bae47b30344ae122
https://github.com/battis/configxml/blob/7c6aeddce5c26bee553d7160bae47b30344ae122/src/ConfigXML.php#L139-L203
201,977
vaniocz/stdlib
src/Enum.php
Enum.box
final public static function box($plainValue): self { foreach (static::valueNames() as $name) { if (self::constant($name) === $plainValue) { return self::__callStatic($name, []); } } $message = sprintf('Value %s is not within %s enumeration.', $plainV...
php
final public static function box($plainValue): self { foreach (static::valueNames() as $name) { if (self::constant($name) === $plainValue) { return self::__callStatic($name, []); } } $message = sprintf('Value %s is not within %s enumeration.', $plainV...
[ "final", "public", "static", "function", "box", "(", "$", "plainValue", ")", ":", "self", "{", "foreach", "(", "static", "::", "valueNames", "(", ")", "as", "$", "name", ")", "{", "if", "(", "self", "::", "constant", "(", "$", "name", ")", "===", "...
Box the given plain value. @param mixed $plainValue The plain value to be boxed. @return static The boxed value. @throws InvalidArgumentException If the given plain value is not within the enumeration.
[ "Box", "the", "given", "plain", "value", "." ]
06a8343c42829d8fdeecad2bb5c30946fbd73e74
https://github.com/vaniocz/stdlib/blob/06a8343c42829d8fdeecad2bb5c30946fbd73e74/src/Enum.php#L52-L62
201,978
vaniocz/stdlib
src/Enum.php
Enum.valueNames
public static function valueNames(): array { static $valueNames = []; if (!isset($valueNames[static::class])) { $valueNames[static::class] = []; foreach ((new ReflectionClass(static::class))->getReflectionConstants() as $reflectionConstant) { if ($reflection...
php
public static function valueNames(): array { static $valueNames = []; if (!isset($valueNames[static::class])) { $valueNames[static::class] = []; foreach ((new ReflectionClass(static::class))->getReflectionConstants() as $reflectionConstant) { if ($reflection...
[ "public", "static", "function", "valueNames", "(", ")", ":", "array", "{", "static", "$", "valueNames", "=", "[", "]", ";", "if", "(", "!", "isset", "(", "$", "valueNames", "[", "static", "::", "class", "]", ")", ")", "{", "$", "valueNames", "[", "...
Get names of all the values in this enumeration. @return string[] Names of all the values in this enumeration.
[ "Get", "names", "of", "all", "the", "values", "in", "this", "enumeration", "." ]
06a8343c42829d8fdeecad2bb5c30946fbd73e74
https://github.com/vaniocz/stdlib/blob/06a8343c42829d8fdeecad2bb5c30946fbd73e74/src/Enum.php#L121-L136
201,979
vaniocz/stdlib
src/Enum.php
Enum.instantiate
private static function instantiate(string $valueName): self { $value = new static(...(array) self::constant($valueName)); $value->name = $valueName; return $value; }
php
private static function instantiate(string $valueName): self { $value = new static(...(array) self::constant($valueName)); $value->name = $valueName; return $value; }
[ "private", "static", "function", "instantiate", "(", "string", "$", "valueName", ")", ":", "self", "{", "$", "value", "=", "new", "static", "(", "...", "(", "array", ")", "self", "::", "constant", "(", "$", "valueName", ")", ")", ";", "$", "value", "...
Instantiate value with the given name. @param string $valueName The name of the value. @return static The newly instantiated value.
[ "Instantiate", "value", "with", "the", "given", "name", "." ]
06a8343c42829d8fdeecad2bb5c30946fbd73e74
https://github.com/vaniocz/stdlib/blob/06a8343c42829d8fdeecad2bb5c30946fbd73e74/src/Enum.php#L145-L151
201,980
vaniocz/stdlib
src/Enum.php
Enum.constant
private static function constant(string $name) { $constant = static::class . '::' . $name; if (!defined($constant)) { $message = sprintf('Enum %s does not contain value named %s.', static::class, $name); throw new InvalidArgumentException($message); } return...
php
private static function constant(string $name) { $constant = static::class . '::' . $name; if (!defined($constant)) { $message = sprintf('Enum %s does not contain value named %s.', static::class, $name); throw new InvalidArgumentException($message); } return...
[ "private", "static", "function", "constant", "(", "string", "$", "name", ")", "{", "$", "constant", "=", "static", "::", "class", ".", "'::'", ".", "$", "name", ";", "if", "(", "!", "defined", "(", "$", "constant", ")", ")", "{", "$", "message", "=...
Get the value of the given constant. @param string $name The name of the constant. @return mixed The value of the given constant. @throws InvalidArgumentException If no such constant exists.
[ "Get", "the", "value", "of", "the", "given", "constant", "." ]
06a8343c42829d8fdeecad2bb5c30946fbd73e74
https://github.com/vaniocz/stdlib/blob/06a8343c42829d8fdeecad2bb5c30946fbd73e74/src/Enum.php#L162-L172
201,981
OxfordInfoLabs/kinikit-core
src/Validation/Validator.php
Validator.validateObject
public function validateObject($object) { if (!$object instanceof SerialisableObject) { throw new ClassNotSerialisableException(get_class($object)); } $classAnnotations = ClassAnnotationParser::instance()->parse($object); $validationFields = $classAnnotations->getFieldAnnot...
php
public function validateObject($object) { if (!$object instanceof SerialisableObject) { throw new ClassNotSerialisableException(get_class($object)); } $classAnnotations = ClassAnnotationParser::instance()->parse($object); $validationFields = $classAnnotations->getFieldAnnot...
[ "public", "function", "validateObject", "(", "$", "object", ")", "{", "if", "(", "!", "$", "object", "instanceof", "SerialisableObject", ")", "{", "throw", "new", "ClassNotSerialisableException", "(", "get_class", "(", "$", "object", ")", ")", ";", "}", "$",...
Validate a serialisable object @param SerialisableObject $object
[ "Validate", "a", "serialisable", "object" ]
edc1b2e6ffabd595c4c7d322279b3dd1e59ef359
https://github.com/OxfordInfoLabs/kinikit-core/blob/edc1b2e6ffabd595c4c7d322279b3dd1e59ef359/src/Validation/Validator.php#L60-L115
201,982
Wedeto/Util
src/Cache/Manager.php
Manager.setCachePath
public function setCachePath(string $path) { $rpath = substr($path, 0, 6) === "vfs://" ? $path : realpath($path); if (empty($rpath) || !file_exists($path)) throw new InvalidArgumentException("Path does not exist: " . $rpath); $this->cache_path = $rpath; }
php
public function setCachePath(string $path) { $rpath = substr($path, 0, 6) === "vfs://" ? $path : realpath($path); if (empty($rpath) || !file_exists($path)) throw new InvalidArgumentException("Path does not exist: " . $rpath); $this->cache_path = $rpath; }
[ "public", "function", "setCachePath", "(", "string", "$", "path", ")", "{", "$", "rpath", "=", "substr", "(", "$", "path", ",", "0", ",", "6", ")", "===", "\"vfs://\"", "?", "$", "path", ":", "realpath", "(", "$", "path", ")", ";", "if", "(", "em...
Set the base directory for the cache files @param string $path The cache directory
[ "Set", "the", "base", "directory", "for", "the", "cache", "files" ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Cache/Manager.php#L90-L96
201,983
Wedeto/Util
src/Cache/Manager.php
Manager.setHook
public function setHook() { Hook::subscribe(Hook::SHUTDOWN_HOOK, [$this, 'saveCacheHook'], 10); foreach ($this->repository as $name => $cache) $this->checkExpiry($name); }
php
public function setHook() { Hook::subscribe(Hook::SHUTDOWN_HOOK, [$this, 'saveCacheHook'], 10); foreach ($this->repository as $name => $cache) $this->checkExpiry($name); }
[ "public", "function", "setHook", "(", ")", "{", "Hook", "::", "subscribe", "(", "Hook", "::", "SHUTDOWN_HOOK", ",", "[", "$", "this", ",", "'saveCacheHook'", "]", ",", "10", ")", ";", "foreach", "(", "$", "this", "->", "repository", "as", "$", "name", ...
Add the hook after the configuration has been loaded, and apply invalidation to the cache once it times out.
[ "Add", "the", "hook", "after", "the", "configuration", "has", "been", "loaded", "and", "apply", "invalidation", "to", "the", "cache", "once", "it", "times", "out", "." ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Cache/Manager.php#L110-L116
201,984
Wedeto/Util
src/Cache/Manager.php
Manager.unsetHook
public function unsetHook() { if ($this->hook_reference !== null) { Hook::unsubscribe(Hook::SHUTDOWN_HOOK, $this->hook_reference); } }
php
public function unsetHook() { if ($this->hook_reference !== null) { Hook::unsubscribe(Hook::SHUTDOWN_HOOK, $this->hook_reference); } }
[ "public", "function", "unsetHook", "(", ")", "{", "if", "(", "$", "this", "->", "hook_reference", "!==", "null", ")", "{", "Hook", "::", "unsubscribe", "(", "Hook", "::", "SHUTDOWN_HOOK", ",", "$", "this", "->", "hook_reference", ")", ";", "}", "}" ]
Remove the hook - cancelling automatic save on termination
[ "Remove", "the", "hook", "-", "cancelling", "automatic", "save", "on", "termination" ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Cache/Manager.php#L121-L127
201,985
Wedeto/Util
src/Cache/Manager.php
Manager.loadCache
protected function loadCache(string $name) { $path = $this->cache_path; $cache_file = $path . '/' . $name . '.cache'; if (file_exists($cache_file)) { if (!is_readable($cache_file)) { self::getLogger()->error("Cannot read cache from {0}", [$ca...
php
protected function loadCache(string $name) { $path = $this->cache_path; $cache_file = $path . '/' . $name . '.cache'; if (file_exists($cache_file)) { if (!is_readable($cache_file)) { self::getLogger()->error("Cannot read cache from {0}", [$ca...
[ "protected", "function", "loadCache", "(", "string", "$", "name", ")", "{", "$", "path", "=", "$", "this", "->", "cache_path", ";", "$", "cache_file", "=", "$", "path", ".", "'/'", ".", "$", "name", ".", "'.cache'", ";", "if", "(", "file_exists", "("...
Load the cache from the cache files. The data will be stored in the class-internal cache storage @param $name string The name of the cache to load
[ "Load", "the", "cache", "from", "the", "cache", "files", ".", "The", "data", "will", "be", "stored", "in", "the", "class", "-", "internal", "cache", "storage" ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Cache/Manager.php#L158-L193
201,986
Wedeto/Util
src/Cache/Manager.php
Manager.getCache
public function getCache(string $name) { if (!isset($this->repository[$name])) $this->loadCache($name); return new Cache($name, $this->repository[$name]); }
php
public function getCache(string $name) { if (!isset($this->repository[$name])) $this->loadCache($name); return new Cache($name, $this->repository[$name]); }
[ "public", "function", "getCache", "(", "string", "$", "name", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "repository", "[", "$", "name", "]", ")", ")", "$", "this", "->", "loadCache", "(", "$", "name", ")", ";", "return", "new", "...
Return a cache
[ "Return", "a", "cache" ]
0e080251bbaa8e7d91ae8d02eb79c029c976744a
https://github.com/Wedeto/Util/blob/0e080251bbaa8e7d91ae8d02eb79c029c976744a/src/Cache/Manager.php#L246-L252
201,987
PenoaksDev/Milky-Framework
src/Milky/Database/Eloquent/Nested/Generators/Generator.php
Generator.getStub
protected function getStub( $name ) { if ( stripos( $name, '.php' ) === false ) $name = $name . '.php'; $this->files->get( $this->getStubPath() . '/' . $name ); }
php
protected function getStub( $name ) { if ( stripos( $name, '.php' ) === false ) $name = $name . '.php'; $this->files->get( $this->getStubPath() . '/' . $name ); }
[ "protected", "function", "getStub", "(", "$", "name", ")", "{", "if", "(", "stripos", "(", "$", "name", ",", "'.php'", ")", "===", "false", ")", "$", "name", "=", "$", "name", ".", "'.php'", ";", "$", "this", "->", "files", "->", "get", "(", "$",...
Get the given stub by name. @param string $table
[ "Get", "the", "given", "stub", "by", "name", "." ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Database/Eloquent/Nested/Generators/Generator.php#L40-L46
201,988
PenoaksDev/Milky-Framework
src/Milky/Database/Eloquent/Nested/Generators/Generator.php
Generator.parseStub
protected function parseStub( $stub, $replacements = [] ) { $output = $stub; foreach ( $replacements as $key => $replacement ) { $search = '{{' . $key . '}}'; $output = str_replace( $search, $replacement, $output ); } return $output; }
php
protected function parseStub( $stub, $replacements = [] ) { $output = $stub; foreach ( $replacements as $key => $replacement ) { $search = '{{' . $key . '}}'; $output = str_replace( $search, $replacement, $output ); } return $output; }
[ "protected", "function", "parseStub", "(", "$", "stub", ",", "$", "replacements", "=", "[", "]", ")", "{", "$", "output", "=", "$", "stub", ";", "foreach", "(", "$", "replacements", "as", "$", "key", "=>", "$", "replacement", ")", "{", "$", "search",...
Parse the provided stub and replace via the array given. @param string $stub @param string $replacements @return string
[ "Parse", "the", "provided", "stub", "and", "replace", "via", "the", "array", "given", "." ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Database/Eloquent/Nested/Generators/Generator.php#L65-L76
201,989
WellCommerce/DistributionBundle
Command/Package/AbstractPackageCommand.php
AbstractPackageCommand.getCommandArguments
protected function getCommandArguments(InputInterface $input) { $package = $this->getPackageInformation($input->getOption('package')); return [ $this->getComposer(), $this->composerOperation, $package, ]; }
php
protected function getCommandArguments(InputInterface $input) { $package = $this->getPackageInformation($input->getOption('package')); return [ $this->getComposer(), $this->composerOperation, $package, ]; }
[ "protected", "function", "getCommandArguments", "(", "InputInterface", "$", "input", ")", "{", "$", "package", "=", "$", "this", "->", "getPackageInformation", "(", "$", "input", "->", "getOption", "(", "'package'", ")", ")", ";", "return", "[", "$", "this",...
Returns command arguments used in ProcessBuilder @param InputInterface $input @return array
[ "Returns", "command", "arguments", "used", "in", "ProcessBuilder" ]
82b1b4c2c5a59536aaae22506b23ccd5d141cbb0
https://github.com/WellCommerce/DistributionBundle/blob/82b1b4c2c5a59536aaae22506b23ccd5d141cbb0/Command/Package/AbstractPackageCommand.php#L105-L114
201,990
WellCommerce/DistributionBundle
Command/Package/AbstractPackageCommand.php
AbstractPackageCommand.getPackageInformation
protected function getPackageInformation($id) { $package = $this->getContainer()->get('package.repository')->find($id); if (!$package instanceof PackageInterface) { throw new \InvalidArgumentException(sprintf('Package "%s" not found', $id)); } return $package->getFullNam...
php
protected function getPackageInformation($id) { $package = $this->getContainer()->get('package.repository')->find($id); if (!$package instanceof PackageInterface) { throw new \InvalidArgumentException(sprintf('Package "%s" not found', $id)); } return $package->getFullNam...
[ "protected", "function", "getPackageInformation", "(", "$", "id", ")", "{", "$", "package", "=", "$", "this", "->", "getContainer", "(", ")", "->", "get", "(", "'package.repository'", ")", "->", "find", "(", "$", "id", ")", ";", "if", "(", "!", "$", ...
Returns package information by identifier @param int $id Package identifier @return string
[ "Returns", "package", "information", "by", "identifier" ]
82b1b4c2c5a59536aaae22506b23ccd5d141cbb0
https://github.com/WellCommerce/DistributionBundle/blob/82b1b4c2c5a59536aaae22506b23ccd5d141cbb0/Command/Package/AbstractPackageCommand.php#L123-L131
201,991
WellCommerce/DistributionBundle
Command/Package/AbstractPackageCommand.php
AbstractPackageCommand.initializeServer
protected function initializeServer(LoopInterface $loop, $port) { $writer = new Stream("php://output"); $logger = new Logger(); $logger->addWriter($writer); return new WebSocketServer("tcp://0.0.0.0:{$port}", $loop, $logger); }
php
protected function initializeServer(LoopInterface $loop, $port) { $writer = new Stream("php://output"); $logger = new Logger(); $logger->addWriter($writer); return new WebSocketServer("tcp://0.0.0.0:{$port}", $loop, $logger); }
[ "protected", "function", "initializeServer", "(", "LoopInterface", "$", "loop", ",", "$", "port", ")", "{", "$", "writer", "=", "new", "Stream", "(", "\"php://output\"", ")", ";", "$", "logger", "=", "new", "Logger", "(", ")", ";", "$", "logger", "->", ...
Initializes web-socket server @param LoopInterface $loop @param int $port @return WebSocketServer
[ "Initializes", "web", "-", "socket", "server" ]
82b1b4c2c5a59536aaae22506b23ccd5d141cbb0
https://github.com/WellCommerce/DistributionBundle/blob/82b1b4c2c5a59536aaae22506b23ccd5d141cbb0/Command/Package/AbstractPackageCommand.php#L159-L166
201,992
WellCommerce/DistributionBundle
Command/Package/AbstractPackageCommand.php
AbstractPackageCommand.addEnvironmentInfo
protected function addEnvironmentInfo($port, $command) { $translator = $this->getContainer()->get('translator'); $info = [ $translator->trans('environment.server.port') => $port, $translator->trans('environment.console.command') => $command, $translator->tran...
php
protected function addEnvironmentInfo($port, $command) { $translator = $this->getContainer()->get('translator'); $info = [ $translator->trans('environment.server.port') => $port, $translator->trans('environment.console.command') => $command, $translator->tran...
[ "protected", "function", "addEnvironmentInfo", "(", "$", "port", ",", "$", "command", ")", "{", "$", "translator", "=", "$", "this", "->", "getContainer", "(", ")", "->", "get", "(", "'translator'", ")", ";", "$", "info", "=", "[", "$", "translator", "...
Adds additional environment information to buffer @param int $port @param string $command
[ "Adds", "additional", "environment", "information", "to", "buffer" ]
82b1b4c2c5a59536aaae22506b23ccd5d141cbb0
https://github.com/WellCommerce/DistributionBundle/blob/82b1b4c2c5a59536aaae22506b23ccd5d141cbb0/Command/Package/AbstractPackageCommand.php#L174-L188
201,993
WellCommerce/DistributionBundle
Command/Package/AbstractPackageCommand.php
AbstractPackageCommand.broadcastToClients
protected function broadcastToClients(\SplObjectStorage $clients) { foreach ($clients as $client) { $client->sendString($this->processOutput()); } }
php
protected function broadcastToClients(\SplObjectStorage $clients) { foreach ($clients as $client) { $client->sendString($this->processOutput()); } }
[ "protected", "function", "broadcastToClients", "(", "\\", "SplObjectStorage", "$", "clients", ")", "{", "foreach", "(", "$", "clients", "as", "$", "client", ")", "{", "$", "client", "->", "sendString", "(", "$", "this", "->", "processOutput", "(", ")", ")"...
Sends processed output to all connected clients
[ "Sends", "processed", "output", "to", "all", "connected", "clients" ]
82b1b4c2c5a59536aaae22506b23ccd5d141cbb0
https://github.com/WellCommerce/DistributionBundle/blob/82b1b4c2c5a59536aaae22506b23ccd5d141cbb0/Command/Package/AbstractPackageCommand.php#L193-L198
201,994
fridge-project/dbal
src/Fridge/DBAL/Schema/View.php
View.setSQL
public function setSQL($sql) { if ((is_string($sql) && (strlen($sql) <= 0)) || (!is_string($sql) && ($sql !== null))) { throw SchemaException::invalidViewSQL($this->getName()); } $this->sql = $sql; }
php
public function setSQL($sql) { if ((is_string($sql) && (strlen($sql) <= 0)) || (!is_string($sql) && ($sql !== null))) { throw SchemaException::invalidViewSQL($this->getName()); } $this->sql = $sql; }
[ "public", "function", "setSQL", "(", "$", "sql", ")", "{", "if", "(", "(", "is_string", "(", "$", "sql", ")", "&&", "(", "strlen", "(", "$", "sql", ")", "<=", "0", ")", ")", "||", "(", "!", "is_string", "(", "$", "sql", ")", "&&", "(", "$", ...
Sets the SQL query. @param string $sql The SQL query. @throws \Fridge\DBAL\Exception\SchemaException If the sql is not a valid string.
[ "Sets", "the", "SQL", "query", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/View.php#L56-L63
201,995
nicmart/DomainSpecificQuery
src/Lucene/Compiler/LuceneCompiler.php
LuceneCompiler.notFieldExpression
public function notFieldExpression(FieldExpression $expr, self $compiler) { $not = new TreeExpression('not'); $not->addChild(new FieldExpression($expr->getField(), $expr->getValue())); return $this->notExpression($not, $compiler); }
php
public function notFieldExpression(FieldExpression $expr, self $compiler) { $not = new TreeExpression('not'); $not->addChild(new FieldExpression($expr->getField(), $expr->getValue())); return $this->notExpression($not, $compiler); }
[ "public", "function", "notFieldExpression", "(", "FieldExpression", "$", "expr", ",", "self", "$", "compiler", ")", "{", "$", "not", "=", "new", "TreeExpression", "(", "'not'", ")", ";", "$", "not", "->", "addChild", "(", "new", "FieldExpression", "(", "$"...
Delegate a "not equal" field expression to the previous map @param FieldExpression $expr @param LuceneCompiler $compiler @return BooleanExpression
[ "Delegate", "a", "not", "equal", "field", "expression", "to", "the", "previous", "map" ]
7c01fe94337afdfae5884809e8b5487127a63ac3
https://github.com/nicmart/DomainSpecificQuery/blob/7c01fe94337afdfae5884809e8b5487127a63ac3/src/Lucene/Compiler/LuceneCompiler.php#L116-L122
201,996
nicmart/DomainSpecificQuery
src/Lucene/Compiler/LuceneCompiler.php
LuceneCompiler.phrasizeOrTermize
public function phrasizeOrTermize($value, $phrase = true, $escape = true) { if (!$phrase && !$escape) return $value; if (!is_array($value)) return $phrase ? new PhraseExpression($value) : new TermExpression($value) ; $ary ...
php
public function phrasizeOrTermize($value, $phrase = true, $escape = true) { if (!$phrase && !$escape) return $value; if (!is_array($value)) return $phrase ? new PhraseExpression($value) : new TermExpression($value) ; $ary ...
[ "public", "function", "phrasizeOrTermize", "(", "$", "value", ",", "$", "phrase", "=", "true", ",", "$", "escape", "=", "true", ")", "{", "if", "(", "!", "$", "phrase", "&&", "!", "$", "escape", ")", "return", "$", "value", ";", "if", "(", "!", "...
Helper function that wraps an expression value with a phrase expression or a term expression Phrasing wins on termizing @param mixed $value @param bool $phrase @param bool $escape @return PhraseExpression|TermExpression|string
[ "Helper", "function", "that", "wraps", "an", "expression", "value", "with", "a", "phrase", "expression", "or", "a", "term", "expression", "Phrasing", "wins", "on", "termizing" ]
7c01fe94337afdfae5884809e8b5487127a63ac3
https://github.com/nicmart/DomainSpecificQuery/blob/7c01fe94337afdfae5884809e8b5487127a63ac3/src/Lucene/Compiler/LuceneCompiler.php#L196-L213
201,997
ekyna/RequireJsBundle
Configuration/Provider.php
Provider.getMainConfig
public function getMainConfig() { $config = null; if ($this->cache) { $config = $this->cache->fetch(self::CONFIG_CACHE_KEY); } if (empty($config)) { $config = $this->generateMainConfig(); if ($this->cache) { $this->cache->save(self:...
php
public function getMainConfig() { $config = null; if ($this->cache) { $config = $this->cache->fetch(self::CONFIG_CACHE_KEY); } if (empty($config)) { $config = $this->generateMainConfig(); if ($this->cache) { $this->cache->save(self:...
[ "public", "function", "getMainConfig", "(", ")", "{", "$", "config", "=", "null", ";", "if", "(", "$", "this", "->", "cache", ")", "{", "$", "config", "=", "$", "this", "->", "cache", "->", "fetch", "(", "self", "::", "CONFIG_CACHE_KEY", ")", ";", ...
Fetches piece of JS-code with require.js main config from cache or if it was not there - generates and put into a cache @return string
[ "Fetches", "piece", "of", "JS", "-", "code", "with", "require", ".", "js", "main", "config", "from", "cache", "or", "if", "it", "was", "not", "there", "-", "generates", "and", "put", "into", "a", "cache" ]
2b746d25c17487838447d72a03d1050819bcf66a
https://github.com/ekyna/RequireJsBundle/blob/2b746d25c17487838447d72a03d1050819bcf66a/Configuration/Provider.php#L74-L87
201,998
ekyna/RequireJsBundle
Configuration/Provider.php
Provider.generateMainConfig
public function generateMainConfig() { $requirejs = $this->collectConfigs(); $config = $requirejs['config']; if (!empty($config['paths']) && is_array($config['paths'])) { foreach ($config['paths'] as &$path) { if (is_array($path)) { $path = $th...
php
public function generateMainConfig() { $requirejs = $this->collectConfigs(); $config = $requirejs['config']; if (!empty($config['paths']) && is_array($config['paths'])) { foreach ($config['paths'] as &$path) { if (is_array($path)) { $path = $th...
[ "public", "function", "generateMainConfig", "(", ")", "{", "$", "requirejs", "=", "$", "this", "->", "collectConfigs", "(", ")", ";", "$", "config", "=", "$", "requirejs", "[", "'config'", "]", ";", "if", "(", "!", "empty", "(", "$", "config", "[", "...
Generates main config for require.js @return array
[ "Generates", "main", "config", "for", "require", ".", "js" ]
2b746d25c17487838447d72a03d1050819bcf66a
https://github.com/ekyna/RequireJsBundle/blob/2b746d25c17487838447d72a03d1050819bcf66a/Configuration/Provider.php#L94-L114
201,999
ekyna/RequireJsBundle
Configuration/Provider.php
Provider.generateBuildConfig
public function generateBuildConfig($configPath) { $config = $this->collectConfigs(); $config['build']['baseUrl'] = './'; $config['build']['out'] = './' . $config['build_path']; $config['build']['mainConfigFile'] = './' . $configPath; $paths = [ // build-in config...
php
public function generateBuildConfig($configPath) { $config = $this->collectConfigs(); $config['build']['baseUrl'] = './'; $config['build']['out'] = './' . $config['build_path']; $config['build']['mainConfigFile'] = './' . $configPath; $paths = [ // build-in config...
[ "public", "function", "generateBuildConfig", "(", "$", "configPath", ")", "{", "$", "config", "=", "$", "this", "->", "collectConfigs", "(", ")", ";", "$", "config", "[", "'build'", "]", "[", "'baseUrl'", "]", "=", "'./'", ";", "$", "config", "[", "'bu...
Generates build config for require.js @param string $configPath path to require.js main config @return array
[ "Generates", "build", "config", "for", "require", ".", "js" ]
2b746d25c17487838447d72a03d1050819bcf66a
https://github.com/ekyna/RequireJsBundle/blob/2b746d25c17487838447d72a03d1050819bcf66a/Configuration/Provider.php#L122-L141