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
29,300
locomotivemtl/charcoal-core
src/Charcoal/Source/Order.php
Order.setDirection
public function setDirection($direction) { if ($direction === null) { $this->direction = $direction; return $this; } if (!is_string($direction)) { throw new InvalidArgumentException( 'Direction must be a string.' ); } ...
php
public function setDirection($direction) { if ($direction === null) { $this->direction = $direction; return $this; } if (!is_string($direction)) { throw new InvalidArgumentException( 'Direction must be a string.' ); } ...
[ "public", "function", "setDirection", "(", "$", "direction", ")", "{", "if", "(", "$", "direction", "===", "null", ")", "{", "$", "this", "->", "direction", "=", "$", "direction", ";", "return", "$", "this", ";", "}", "if", "(", "!", "is_string", "("...
Set the sorting direction. @param string|null $direction The direction to sort on. @throws InvalidArgumentException If the direction is not a string. @return self
[ "Set", "the", "sorting", "direction", "." ]
db3a7af547ccf96efe2d9be028b252bc8646f5d5
https://github.com/locomotivemtl/charcoal-core/blob/db3a7af547ccf96efe2d9be028b252bc8646f5d5/src/Charcoal/Source/Order.php#L219-L234
29,301
locomotivemtl/charcoal-core
src/Charcoal/Source/Order.php
Order.setValues
public function setValues($values) { if ($values === null) { $this->values = $values; return $this; } if (is_string($values)) { if ($values === '') { throw new InvalidArgumentException( 'String values can not be empty.'...
php
public function setValues($values) { if ($values === null) { $this->values = $values; return $this; } if (is_string($values)) { if ($values === '') { throw new InvalidArgumentException( 'String values can not be empty.'...
[ "public", "function", "setValues", "(", "$", "values", ")", "{", "if", "(", "$", "values", "===", "null", ")", "{", "$", "this", "->", "values", "=", "$", "values", ";", "return", "$", "this", ";", "}", "if", "(", "is_string", "(", "$", "values", ...
Set the values to sort against. Note: Values are ignored if the mode is not {@see self::MODE_VALUES}. @throws InvalidArgumentException If the parameter is not an array or a string. @param string|array|null $values A list of field values. If the $values parameter: - is a string, the string will be split by ",". - is ...
[ "Set", "the", "values", "to", "sort", "against", "." ]
db3a7af547ccf96efe2d9be028b252bc8646f5d5
https://github.com/locomotivemtl/charcoal-core/blob/db3a7af547ccf96efe2d9be028b252bc8646f5d5/src/Charcoal/Source/Order.php#L259-L291
29,302
locomotivemtl/charcoal-core
src/Charcoal/Source/Order.php
Order.validModes
protected function validModes() { return [ self::MODE_DESC, self::MODE_ASC, self::MODE_RANDOM, self::MODE_VALUES, self::MODE_CUSTOM ]; }
php
protected function validModes() { return [ self::MODE_DESC, self::MODE_ASC, self::MODE_RANDOM, self::MODE_VALUES, self::MODE_CUSTOM ]; }
[ "protected", "function", "validModes", "(", ")", "{", "return", "[", "self", "::", "MODE_DESC", ",", "self", "::", "MODE_ASC", ",", "self", "::", "MODE_RANDOM", ",", "self", "::", "MODE_VALUES", ",", "self", "::", "MODE_CUSTOM", "]", ";", "}" ]
Retrieve the supported sorting modes. @return array
[ "Retrieve", "the", "supported", "sorting", "modes", "." ]
db3a7af547ccf96efe2d9be028b252bc8646f5d5
https://github.com/locomotivemtl/charcoal-core/blob/db3a7af547ccf96efe2d9be028b252bc8646f5d5/src/Charcoal/Source/Order.php#L318-L327
29,303
rosasurfer/ministruts
src/net/mail/SMTPMailer.php
SMTPMailer.connect
private function connect() { $connection = fsockopen('tcp://'.$this->options['host'], $this->options['port'], $errorCode, $errorMsg, $this->options[...
php
private function connect() { $connection = fsockopen('tcp://'.$this->options['host'], $this->options['port'], $errorCode, $errorMsg, $this->options[...
[ "private", "function", "connect", "(", ")", "{", "$", "connection", "=", "fsockopen", "(", "'tcp://'", ".", "$", "this", "->", "options", "[", "'host'", "]", ",", "$", "this", "->", "options", "[", "'port'", "]", ",", "$", "errorCode", ",", "$", "err...
Connect to the SMTP server.
[ "Connect", "to", "the", "SMTP", "server", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/mail/SMTPMailer.php#L98-L127
29,304
rosasurfer/ministruts
src/net/mail/SMTPMailer.php
SMTPMailer.authenticate
private function authenticate() { if (!is_resource($this->connection)) throw new RuntimeException('Cannot authenticate: Not connected'); // init authentication $this->writeData('AUTH LOGIN'); $response = $this->readResponse(); $this->parseResponse($response); ...
php
private function authenticate() { if (!is_resource($this->connection)) throw new RuntimeException('Cannot authenticate: Not connected'); // init authentication $this->writeData('AUTH LOGIN'); $response = $this->readResponse(); $this->parseResponse($response); ...
[ "private", "function", "authenticate", "(", ")", "{", "if", "(", "!", "is_resource", "(", "$", "this", "->", "connection", ")", ")", "throw", "new", "RuntimeException", "(", "'Cannot authenticate: Not connected'", ")", ";", "// init authentication", "$", "this", ...
Authentificate the connection.
[ "Authentificate", "the", "connection", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/mail/SMTPMailer.php#L133-L163
29,305
rosasurfer/ministruts
src/net/mail/SMTPMailer.php
SMTPMailer.reset
public function reset() { if (!is_resource($this->connection)) throw new RuntimeException('Cannot reset connection: Not connected'); $this->writeData('RSET'); $response = $this->readResponse(); $this->parseResponse($response); if ($this->responseStatus != 250) ...
php
public function reset() { if (!is_resource($this->connection)) throw new RuntimeException('Cannot reset connection: Not connected'); $this->writeData('RSET'); $response = $this->readResponse(); $this->parseResponse($response); if ($this->responseStatus != 250) ...
[ "public", "function", "reset", "(", ")", "{", "if", "(", "!", "is_resource", "(", "$", "this", "->", "connection", ")", ")", "throw", "new", "RuntimeException", "(", "'Cannot reset connection: Not connected'", ")", ";", "$", "this", "->", "writeData", "(", "...
Reset the connection.
[ "Reset", "the", "connection", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/mail/SMTPMailer.php#L349-L359
29,306
rosasurfer/ministruts
src/net/mail/SMTPMailer.php
SMTPMailer.readResponse
private function readResponse() { $lines = null; while (trim($line = fgets($this->connection)) != '') { $lines .= $line; if (substr($line, 3, 1) == ' ') break; } $data = stream_get_meta_data($this->connection); if ($data['timed_out']) ...
php
private function readResponse() { $lines = null; while (trim($line = fgets($this->connection)) != '') { $lines .= $line; if (substr($line, 3, 1) == ' ') break; } $data = stream_get_meta_data($this->connection); if ($data['timed_out']) ...
[ "private", "function", "readResponse", "(", ")", "{", "$", "lines", "=", "null", ";", "while", "(", "trim", "(", "$", "line", "=", "fgets", "(", "$", "this", "->", "connection", ")", ")", "!=", "''", ")", "{", "$", "lines", ".=", "$", "line", ";"...
Read the MTA's response.
[ "Read", "the", "MTA", "s", "response", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/mail/SMTPMailer.php#L388-L401
29,307
rosasurfer/ministruts
src/net/mail/SMTPMailer.php
SMTPMailer.writeData
private function writeData($data) { $count = fwrite($this->connection, $data.EOL_WINDOWS, strlen($data)+2); if ($count != strlen($data)+2) throw new RuntimeException('Error writing to socket, length of data: '.(strlen($data)+2).', bytes written: '.$count.NL.'data: '.$data.NL.NL.'SMTP transf...
php
private function writeData($data) { $count = fwrite($this->connection, $data.EOL_WINDOWS, strlen($data)+2); if ($count != strlen($data)+2) throw new RuntimeException('Error writing to socket, length of data: '.(strlen($data)+2).', bytes written: '.$count.NL.'data: '.$data.NL.NL.'SMTP transf...
[ "private", "function", "writeData", "(", "$", "data", ")", "{", "$", "count", "=", "fwrite", "(", "$", "this", "->", "connection", ",", "$", "data", ".", "EOL_WINDOWS", ",", "strlen", "(", "$", "data", ")", "+", "2", ")", ";", "if", "(", "$", "co...
Write data into the open socket. @param string $data
[ "Write", "data", "into", "the", "open", "socket", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/mail/SMTPMailer.php#L409-L416
29,308
rosasurfer/ministruts
src/net/mail/SMTPMailer.php
SMTPMailer.parseResponse
private function parseResponse($response) { $response = trim($response); $this->responseStatus = (int) substr($response, 0, 3); $this->response = substr($response, 4); }
php
private function parseResponse($response) { $response = trim($response); $this->responseStatus = (int) substr($response, 0, 3); $this->response = substr($response, 4); }
[ "private", "function", "parseResponse", "(", "$", "response", ")", "{", "$", "response", "=", "trim", "(", "$", "response", ")", ";", "$", "this", "->", "responseStatus", "=", "(", "int", ")", "substr", "(", "$", "response", ",", "0", ",", "3", ")", ...
Parse the MTA's response. @param string $response
[ "Parse", "the", "MTA", "s", "response", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/mail/SMTPMailer.php#L424-L428
29,309
timble/kodekit
code/dispatcher/response/transport/stream.php
DispatcherResponseTransportStream.getRange
public function getRange(DispatcherResponseInterface $response) { if(!isset($this->_range)) { $length = $this->getFileSize($response); $range = $length - 1; if($response->getRequest()->isStreaming()) { $ranges = $response->getRequest(...
php
public function getRange(DispatcherResponseInterface $response) { if(!isset($this->_range)) { $length = $this->getFileSize($response); $range = $length - 1; if($response->getRequest()->isStreaming()) { $ranges = $response->getRequest(...
[ "public", "function", "getRange", "(", "DispatcherResponseInterface", "$", "response", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "_range", ")", ")", "{", "$", "length", "=", "$", "this", "->", "getFileSize", "(", "$", "response", ")", ...
Get the byte range @param DispatcherResponseInterface $response @return int The last byte offset
[ "Get", "the", "byte", "range" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/dispatcher/response/transport/stream.php#L114-L138
29,310
locomotivemtl/charcoal-core
src/Charcoal/Source/Database/DatabaseFilter.php
DatabaseFilter.sql
public function sql() { if ($this->active()) { if ($this->hasFilters()) { $sql = $this->byFilters(); if ($this->isNegating()) { return $this->operator().' '.$sql; } return $sql; } if ($th...
php
public function sql() { if ($this->active()) { if ($this->hasFilters()) { $sql = $this->byFilters(); if ($this->isNegating()) { return $this->operator().' '.$sql; } return $sql; } if ($th...
[ "public", "function", "sql", "(", ")", "{", "if", "(", "$", "this", "->", "active", "(", ")", ")", "{", "if", "(", "$", "this", "->", "hasFilters", "(", ")", ")", "{", "$", "sql", "=", "$", "this", "->", "byFilters", "(", ")", ";", "if", "(",...
Converts the filter into a SQL expression for the WHERE clause. @return string A SQL string fragment.
[ "Converts", "the", "filter", "into", "a", "SQL", "expression", "for", "the", "WHERE", "clause", "." ]
db3a7af547ccf96efe2d9be028b252bc8646f5d5
https://github.com/locomotivemtl/charcoal-core/blob/db3a7af547ccf96efe2d9be028b252bc8646f5d5/src/Charcoal/Source/Database/DatabaseFilter.php#L50-L75
29,311
locomotivemtl/charcoal-core
src/Charcoal/Source/Database/DatabaseFilter.php
DatabaseFilter.compileConditions
protected function compileConditions(array $conditions, $conjunction = null) { if (count($conditions) === 1) { return $conditions[0]; } if ($conjunction === null) { $conjunction = $this->conjunction(); } return '('.implode(' '.$conjunction.' ', $cond...
php
protected function compileConditions(array $conditions, $conjunction = null) { if (count($conditions) === 1) { return $conditions[0]; } if ($conjunction === null) { $conjunction = $this->conjunction(); } return '('.implode(' '.$conjunction.' ', $cond...
[ "protected", "function", "compileConditions", "(", "array", "$", "conditions", ",", "$", "conjunction", "=", "null", ")", "{", "if", "(", "count", "(", "$", "conditions", ")", "===", "1", ")", "{", "return", "$", "conditions", "[", "0", "]", ";", "}", ...
Compile the list of conditions. @param string[] $conditions The list of conditions to compile. @param string|null $conjunction The condition separator. @return string
[ "Compile", "the", "list", "of", "conditions", "." ]
db3a7af547ccf96efe2d9be028b252bc8646f5d5
https://github.com/locomotivemtl/charcoal-core/blob/db3a7af547ccf96efe2d9be028b252bc8646f5d5/src/Charcoal/Source/Database/DatabaseFilter.php#L94-L105
29,312
locomotivemtl/charcoal-core
src/Charcoal/Source/Database/DatabaseFilter.php
DatabaseFilter.byFilters
protected function byFilters() { if (!$this->hasFilters()) { throw new UnexpectedValueException( 'Filters can not be empty.' ); } $conditions = []; foreach ($this->filters() as $filter) { if ($filter instanceof DatabaseExpressionIn...
php
protected function byFilters() { if (!$this->hasFilters()) { throw new UnexpectedValueException( 'Filters can not be empty.' ); } $conditions = []; foreach ($this->filters() as $filter) { if ($filter instanceof DatabaseExpressionIn...
[ "protected", "function", "byFilters", "(", ")", "{", "if", "(", "!", "$", "this", "->", "hasFilters", "(", ")", ")", "{", "throw", "new", "UnexpectedValueException", "(", "'Filters can not be empty.'", ")", ";", "}", "$", "conditions", "=", "[", "]", ";", ...
Retrieve the correctly parenthesized and nested WHERE conditions. @throws UnexpectedValueException If the custom condition is empty. @return string
[ "Retrieve", "the", "correctly", "parenthesized", "and", "nested", "WHERE", "conditions", "." ]
db3a7af547ccf96efe2d9be028b252bc8646f5d5
https://github.com/locomotivemtl/charcoal-core/blob/db3a7af547ccf96efe2d9be028b252bc8646f5d5/src/Charcoal/Source/Database/DatabaseFilter.php#L130-L150
29,313
locomotivemtl/charcoal-core
src/Charcoal/Source/Database/DatabaseFilter.php
DatabaseFilter.byPredicate
protected function byPredicate() { $fields = $this->fieldIdentifiers(); if (empty($fields)) { throw new UnexpectedValueException( 'Property is required.' ); } $conditions = []; $value = $this->value(); $operator = $this-...
php
protected function byPredicate() { $fields = $this->fieldIdentifiers(); if (empty($fields)) { throw new UnexpectedValueException( 'Property is required.' ); } $conditions = []; $value = $this->value(); $operator = $this-...
[ "protected", "function", "byPredicate", "(", ")", "{", "$", "fields", "=", "$", "this", "->", "fieldIdentifiers", "(", ")", ";", "if", "(", "empty", "(", "$", "fields", ")", ")", "{", "throw", "new", "UnexpectedValueException", "(", "'Property is required.'"...
Retrieve the WHERE condition. @todo Values are often not quoted. @throws UnexpectedValueException If any required property, function, operator, or value is empty. @return string
[ "Retrieve", "the", "WHERE", "condition", "." ]
db3a7af547ccf96efe2d9be028b252bc8646f5d5
https://github.com/locomotivemtl/charcoal-core/blob/db3a7af547ccf96efe2d9be028b252bc8646f5d5/src/Charcoal/Source/Database/DatabaseFilter.php#L159-L244
29,314
rosasurfer/ministruts
src/ministruts/RequestProcessor.php
RequestProcessor.process
public function process(Request $request, Response $response) { // ggf. Session starten oder fortsetzen $this->processSession($request); // move ActionMessages stored in the session back to the Request $this->restoreCachedActionMessages($request); // Mapping fuer den Request ...
php
public function process(Request $request, Response $response) { // ggf. Session starten oder fortsetzen $this->processSession($request); // move ActionMessages stored in the session back to the Request $this->restoreCachedActionMessages($request); // Mapping fuer den Request ...
[ "public", "function", "process", "(", "Request", "$", "request", ",", "Response", "$", "response", ")", "{", "// ggf. Session starten oder fortsetzen", "$", "this", "->", "processSession", "(", "$", "request", ")", ";", "// move ActionMessages stored in the session back...
Verarbeitet den uebergebenen Request und gibt entweder den entsprechenden Content aus oder leitet auf eine andere Resource um. @param Request $request @param Response $response
[ "Verarbeitet", "den", "uebergebenen", "Request", "und", "gibt", "entweder", "den", "entsprechenden", "Content", "aus", "oder", "leitet", "auf", "eine", "andere", "Resource", "um", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/RequestProcessor.php#L41-L90
29,315
rosasurfer/ministruts
src/ministruts/RequestProcessor.php
RequestProcessor.processMapping
protected function processMapping(Request $request, Response $response) { // Pfad fuer die Mappingauswahl ermitteln ... $requestPath = '/'.trim(preg_replace('|/{2,}|', '/', $request->getPath()), '/').'/'; // normalize request path if ($requestPath=='//') $requestPath = '/'; // / ...
php
protected function processMapping(Request $request, Response $response) { // Pfad fuer die Mappingauswahl ermitteln ... $requestPath = '/'.trim(preg_replace('|/{2,}|', '/', $request->getPath()), '/').'/'; // normalize request path if ($requestPath=='//') $requestPath = '/'; // / ...
[ "protected", "function", "processMapping", "(", "Request", "$", "request", ",", "Response", "$", "response", ")", "{", "// Pfad fuer die Mappingauswahl ermitteln ...", "$", "requestPath", "=", "'/'", ".", "trim", "(", "preg_replace", "(", "'|/{2,}|'", ",", "'/'", ...
Waehlt das zu benutzende ActionMapping. Kann kein Mapping gefunden werden, wird eine Fehlermeldung erzeugt und NULL zurueckgegeben. @param Request $request @param Response $response @return ActionMapping|null - ActionMapping oder NULL
[ "Waehlt", "das", "zu", "benutzende", "ActionMapping", ".", "Kann", "kein", "Mapping", "gefunden", "werden", "wird", "eine", "Fehlermeldung", "erzeugt", "und", "NULL", "zurueckgegeben", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/RequestProcessor.php#L163-L216
29,316
rosasurfer/ministruts
src/ministruts/RequestProcessor.php
RequestProcessor.processMethod
protected function processMethod(Request $request, Response $response, ActionMapping $mapping) { if ($mapping->isSupportedMethod($request->getMethod())) return true; // Beschraenkung nicht erfuellt $response->setStatus(HttpResponse::SC_METHOD_NOT_ALLOWED); if (isset($this->...
php
protected function processMethod(Request $request, Response $response, ActionMapping $mapping) { if ($mapping->isSupportedMethod($request->getMethod())) return true; // Beschraenkung nicht erfuellt $response->setStatus(HttpResponse::SC_METHOD_NOT_ALLOWED); if (isset($this->...
[ "protected", "function", "processMethod", "(", "Request", "$", "request", ",", "Response", "$", "response", ",", "ActionMapping", "$", "mapping", ")", "{", "if", "(", "$", "mapping", "->", "isSupportedMethod", "(", "$", "request", "->", "getMethod", "(", ")"...
Wenn fuer das ActionMapping Methodenbeschraenkungen definiert sind, sicherstellen, dass der Request diese Beschraenkungen erfuellt. Gibt TRUE zurueck, wenn die Verarbeitung fortgesetzt und der Zugriff gewaehrt werden soll werden soll, oder FALSE, wenn der Zugriff nicht gewaehrt wird und der Request beendet wurde. @par...
[ "Wenn", "fuer", "das", "ActionMapping", "Methodenbeschraenkungen", "definiert", "sind", "sicherstellen", "dass", "der", "Request", "diese", "Beschraenkungen", "erfuellt", ".", "Gibt", "TRUE", "zurueck", "wenn", "die", "Verarbeitung", "fortgesetzt", "und", "der", "Zugr...
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/RequestProcessor.php#L231-L263
29,317
rosasurfer/ministruts
src/ministruts/RequestProcessor.php
RequestProcessor.processRoles
protected function processRoles(Request $request, Response $response, ActionMapping $mapping) { if ($mapping->getRoles() === null) return true; $forward = $this->module->getRoleProcessor()->processRoles($request, $mapping); if (!$forward) return true; $this->pro...
php
protected function processRoles(Request $request, Response $response, ActionMapping $mapping) { if ($mapping->getRoles() === null) return true; $forward = $this->module->getRoleProcessor()->processRoles($request, $mapping); if (!$forward) return true; $this->pro...
[ "protected", "function", "processRoles", "(", "Request", "$", "request", ",", "Response", "$", "response", ",", "ActionMapping", "$", "mapping", ")", "{", "if", "(", "$", "mapping", "->", "getRoles", "(", ")", "===", "null", ")", "return", "true", ";", "...
Wenn die Action Zugriffsbeschraenkungen hat, sicherstellen, dass der User Inhaber der angegebenen Rollen ist. Gibt TRUE zurueck, wenn die Verarbeitung fortgesetzt und der Zugriff gewaehrt werden soll, oder FALSE, wenn der Zugriff nicht gewaehrt wird und der Request beendet wurde. @param Request $request @param...
[ "Wenn", "die", "Action", "Zugriffsbeschraenkungen", "hat", "sicherstellen", "dass", "der", "User", "Inhaber", "der", "angegebenen", "Rollen", "ist", ".", "Gibt", "TRUE", "zurueck", "wenn", "die", "Verarbeitung", "fortgesetzt", "und", "der", "Zugriff", "gewaehrt", ...
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/RequestProcessor.php#L277-L287
29,318
rosasurfer/ministruts
src/ministruts/RequestProcessor.php
RequestProcessor.processActionFormCreate
protected function processActionFormCreate(Request $request, ActionMapping $mapping) { $formClass = $mapping->getFormClassName(); if (!$formClass) return null; /** @var ActionForm $form */ $form = null; // if the form has "session" scope try to find an existing form...
php
protected function processActionFormCreate(Request $request, ActionMapping $mapping) { $formClass = $mapping->getFormClassName(); if (!$formClass) return null; /** @var ActionForm $form */ $form = null; // if the form has "session" scope try to find an existing form...
[ "protected", "function", "processActionFormCreate", "(", "Request", "$", "request", ",", "ActionMapping", "$", "mapping", ")", "{", "$", "formClass", "=", "$", "mapping", "->", "getFormClassName", "(", ")", ";", "if", "(", "!", "$", "formClass", ")", "return...
Erzeugt die ActionForm des angegebenen Mappings bzw. gibt sie zurueck. Ist keine ActionForm konfiguriert, wird NULL zurueckgegeben. @param Request $request @param ActionMapping $mapping @return ActionForm|null
[ "Erzeugt", "die", "ActionForm", "des", "angegebenen", "Mappings", "bzw", ".", "gibt", "sie", "zurueck", ".", "Ist", "keine", "ActionForm", "konfiguriert", "wird", "NULL", "zurueckgegeben", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/RequestProcessor.php#L299-L331
29,319
rosasurfer/ministruts
src/ministruts/RequestProcessor.php
RequestProcessor.processActionFormValidate
protected function processActionFormValidate(Request $request, Response $response, ActionMapping $mapping, ActionForm $form) { if (!$mapping->isFormValidateFirst()) return true; $success = $form->validate(); if ($mapping->getActionClassName()) return true; $for...
php
protected function processActionFormValidate(Request $request, Response $response, ActionMapping $mapping, ActionForm $form) { if (!$mapping->isFormValidateFirst()) return true; $success = $form->validate(); if ($mapping->getActionClassName()) return true; $for...
[ "protected", "function", "processActionFormValidate", "(", "Request", "$", "request", ",", "Response", "$", "response", ",", "ActionMapping", "$", "mapping", ",", "ActionForm", "$", "form", ")", "{", "if", "(", "!", "$", "mapping", "->", "isFormValidateFirst", ...
Validiert die ActionForm, wenn entprechend konfiguriert. Ist fuer das ActionMapping ein expliziter Forward konfiguriert, wird nach der Validierung auf diesen Forward weitergeleitet. Ist kein expliziter Forward definiert, wird auf die konfigurierte "success" oder "error"-Resource weitergeleitet. Gibt TRUE zurueck, wen...
[ "Validiert", "die", "ActionForm", "wenn", "entprechend", "konfiguriert", ".", "Ist", "fuer", "das", "ActionMapping", "ein", "expliziter", "Forward", "konfiguriert", "wird", "nach", "der", "Validierung", "auf", "diesen", "Forward", "weitergeleitet", ".", "Ist", "kein...
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/RequestProcessor.php#L348-L366
29,320
rosasurfer/ministruts
src/ministruts/RequestProcessor.php
RequestProcessor.processActionCreate
protected function processActionCreate(ActionMapping $mapping, ActionForm $form = null) { $className = $mapping->getActionClassName(); return new $className($mapping, $form); }
php
protected function processActionCreate(ActionMapping $mapping, ActionForm $form = null) { $className = $mapping->getActionClassName(); return new $className($mapping, $form); }
[ "protected", "function", "processActionCreate", "(", "ActionMapping", "$", "mapping", ",", "ActionForm", "$", "form", "=", "null", ")", "{", "$", "className", "=", "$", "mapping", "->", "getActionClassName", "(", ")", ";", "return", "new", "$", "className", ...
Erzeugt und gibt die Action zurueck, die fuer das angegebene Mapping konfiguriert wurde. @param ActionMapping $mapping @param ActionForm $form [optional] - ActionForm, die konfiguriert wurde oder NULL @return Action
[ "Erzeugt", "und", "gibt", "die", "Action", "zurueck", "die", "fuer", "das", "angegebene", "Mapping", "konfiguriert", "wurde", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/RequestProcessor.php#L398-L402
29,321
rosasurfer/ministruts
src/ministruts/RequestProcessor.php
RequestProcessor.processActionExecute
protected function processActionExecute(Request $request, Response $response, Action $action) { $forward = $throwable = null; // Alles kapseln, damit Postprocessing-Hook auch nach Auftreten einer Exception aufgerufen // werden kann (z.B. Transaction-Rollback o.ae.) try { // ...
php
protected function processActionExecute(Request $request, Response $response, Action $action) { $forward = $throwable = null; // Alles kapseln, damit Postprocessing-Hook auch nach Auftreten einer Exception aufgerufen // werden kann (z.B. Transaction-Rollback o.ae.) try { // ...
[ "protected", "function", "processActionExecute", "(", "Request", "$", "request", ",", "Response", "$", "response", ",", "Action", "$", "action", ")", "{", "$", "forward", "=", "$", "throwable", "=", "null", ";", "// Alles kapseln, damit Postprocessing-Hook auch nach...
Uebergibt den Request zur Bearbeitung an die konfigurierte Action und gibt den von ihr zurueckgegebenen ActionForward zurueck. @param Request $request @param Response $response @param Action $action @return ActionForward|null
[ "Uebergibt", "den", "Request", "zur", "Bearbeitung", "an", "die", "konfigurierte", "Action", "und", "gibt", "den", "von", "ihr", "zurueckgegebenen", "ActionForward", "zurueck", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/RequestProcessor.php#L415-L453
29,322
rosasurfer/ministruts
src/ministruts/RequestProcessor.php
RequestProcessor.processActionForward
protected function processActionForward(Request $request, Response $response, ActionForward $forward) { $module = $this->module; if ($forward->isRedirect()) { $this->cacheActionMessages($request); $path = $forward->getPath(); if (isset(parse_url($path)['host'])) { ...
php
protected function processActionForward(Request $request, Response $response, ActionForward $forward) { $module = $this->module; if ($forward->isRedirect()) { $this->cacheActionMessages($request); $path = $forward->getPath(); if (isset(parse_url($path)['host'])) { ...
[ "protected", "function", "processActionForward", "(", "Request", "$", "request", ",", "Response", "$", "response", ",", "ActionForward", "$", "forward", ")", "{", "$", "module", "=", "$", "this", "->", "module", ";", "if", "(", "$", "forward", "->", "isRed...
Verarbeitet den von der Action zurueckgegebenen ActionForward. Leitet auf die Resource weiter, die der ActionForward bezeichnet. @param Request $request @param Response $response @param ActionForward $forward
[ "Verarbeitet", "den", "von", "der", "Action", "zurueckgegebenen", "ActionForward", ".", "Leitet", "auf", "die", "Resource", "weiter", "die", "der", "ActionForward", "bezeichnet", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/RequestProcessor.php#L464-L495
29,323
deArcane/framework
src/View/Block/Row.php
Row.initScope
private function initScope(array $columns, array $fetch){ $scope = []; foreach( $columns as $name=>$value ){ $scope[$name] = ( isset($fetch[$name]) ) ? new Attribute($fetch[$name], false) : new Attribute($value, true); // Allow set null to field. if( $value === null ) $scope[$name]->allowNull(); } retu...
php
private function initScope(array $columns, array $fetch){ $scope = []; foreach( $columns as $name=>$value ){ $scope[$name] = ( isset($fetch[$name]) ) ? new Attribute($fetch[$name], false) : new Attribute($value, true); // Allow set null to field. if( $value === null ) $scope[$name]->allowNull(); } retu...
[ "private", "function", "initScope", "(", "array", "$", "columns", ",", "array", "$", "fetch", ")", "{", "$", "scope", "=", "[", "]", ";", "foreach", "(", "$", "columns", "as", "$", "name", "=>", "$", "value", ")", "{", "$", "scope", "[", "$", "na...
Create outher scope for block, this occur only in row block.
[ "Create", "outher", "scope", "for", "block", "this", "occur", "only", "in", "row", "block", "." ]
468da43678119f8c9e3f67183b5bec727c436404
https://github.com/deArcane/framework/blob/468da43678119f8c9e3f67183b5bec727c436404/src/View/Block/Row.php#L122-L130
29,324
rosasurfer/ministruts
src/ministruts/Module.php
Module.loadConfiguration
protected function loadConfiguration($fileName) { if (!is_file($fileName)) throw new StrutsConfigException('Configuration file not found: "'.$fileName.'"'); // TODO: what about checking the search result? $content = file_get_contents($fileName); $search = '<!DOCTYPE struts-config SYSTE...
php
protected function loadConfiguration($fileName) { if (!is_file($fileName)) throw new StrutsConfigException('Configuration file not found: "'.$fileName.'"'); // TODO: what about checking the search result? $content = file_get_contents($fileName); $search = '<!DOCTYPE struts-config SYSTE...
[ "protected", "function", "loadConfiguration", "(", "$", "fileName", ")", "{", "if", "(", "!", "is_file", "(", "$", "fileName", ")", ")", "throw", "new", "StrutsConfigException", "(", "'Configuration file not found: \"'", ".", "$", "fileName", ".", "'\"'", ")", ...
Validiert die angegebene Konfigurationsdatei und wandelt sie in ein XML-Objekt um. @param string $fileName - Pfad zur Konfigurationsdatei @return \SimpleXMLElement @throws StrutsConfigException on configuration errors
[ "Validiert", "die", "angegebene", "Konfigurationsdatei", "und", "wandelt", "sie", "in", "ein", "XML", "-", "Objekt", "um", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L127-L140
29,325
rosasurfer/ministruts
src/ministruts/Module.php
Module.setPrefix
protected function setPrefix($prefix) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); if ($len=strlen($prefix)) { if ($prefix[ 0] == '/') throw new StrutsConfigException('Non-root module prefixes must not start with a slash "/" character, found: "'.$p...
php
protected function setPrefix($prefix) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); if ($len=strlen($prefix)) { if ($prefix[ 0] == '/') throw new StrutsConfigException('Non-root module prefixes must not start with a slash "/" character, found: "'.$p...
[ "protected", "function", "setPrefix", "(", "$", "prefix", ")", "{", "if", "(", "$", "this", "->", "configured", ")", "throw", "new", "IllegalStateException", "(", "'Configuration is frozen'", ")", ";", "if", "(", "$", "len", "=", "strlen", "(", "$", "prefi...
Setzt den Prefix des Modules. @param string $prefix - the prefix of the root module is an empty string; the prefix of non-root modules must not start but must end with a slash "/" @throws StrutsConfigException on configuration errors
[ "Setzt", "den", "Prefix", "des", "Modules", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L163-L170
29,326
rosasurfer/ministruts
src/ministruts/Module.php
Module.setNamespace
protected function setNamespace($xml) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); $namespace = ''; // default is the global namespace if (isset($xml['namespace'])) { $namespace = trim((string) $xml['namespace']); ...
php
protected function setNamespace($xml) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); $namespace = ''; // default is the global namespace if (isset($xml['namespace'])) { $namespace = trim((string) $xml['namespace']); ...
[ "protected", "function", "setNamespace", "(", "$", "xml", ")", "{", "if", "(", "$", "this", "->", "configured", ")", "throw", "new", "IllegalStateException", "(", "'Configuration is frozen'", ")", ";", "$", "namespace", "=", "''", ";", "// default is the global ...
Set the Module's default namespace. @param \SimpleXMLElement $xml - configuration instance @throws StrutsConfigException on configuration errors
[ "Set", "the", "Module", "s", "default", "namespace", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L180-L199
29,327
rosasurfer/ministruts
src/ministruts/Module.php
Module.setResourceBase
protected function setResourceBase(\SimpleXMLElement $xml) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); /** @var ConfigInterface $config */ $config = $this->di('config'); $rootDirectory = $config['app.dir.root']; if (!isset($xml['file-bas...
php
protected function setResourceBase(\SimpleXMLElement $xml) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); /** @var ConfigInterface $config */ $config = $this->di('config'); $rootDirectory = $config['app.dir.root']; if (!isset($xml['file-bas...
[ "protected", "function", "setResourceBase", "(", "\\", "SimpleXMLElement", "$", "xml", ")", "{", "if", "(", "$", "this", "->", "configured", ")", "throw", "new", "IllegalStateException", "(", "'Configuration is frozen'", ")", ";", "/** @var ConfigInterface $config */"...
Setzt das Basisverzeichnis fuer lokale Resourcen. @param \SimpleXMLElement $xml - XML-Objekt mit der Konfiguration @throws StrutsConfigException on configuration errors
[ "Setzt", "das", "Basisverzeichnis", "fuer", "lokale", "Resourcen", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L209-L240
29,328
rosasurfer/ministruts
src/ministruts/Module.php
Module.processTiles
protected function processTiles(\SimpleXMLElement $xml) { $namespace = ''; // default is the global namespace if ($tiles = $xml->xpath('/struts-config/tiles') ?: []) { $tiles = $tiles[0]; // attribute class="%ClassName" #IMPLIED ...
php
protected function processTiles(\SimpleXMLElement $xml) { $namespace = ''; // default is the global namespace if ($tiles = $xml->xpath('/struts-config/tiles') ?: []) { $tiles = $tiles[0]; // attribute class="%ClassName" #IMPLIED ...
[ "protected", "function", "processTiles", "(", "\\", "SimpleXMLElement", "$", "xml", ")", "{", "$", "namespace", "=", "''", ";", "// default is the global namespace", "if", "(", "$", "tiles", "=", "$", "xml", "->", "xpath", "(", "'/struts-config/tiles'", ")", "...
Durchlaeuft alle konfigurierten Tiles. @param \SimpleXMLElement $xml - XML-Objekt mit der Konfiguration @throws StrutsConfigException on configuration errors
[ "Durchlaeuft", "alle", "konfigurierten", "Tiles", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L537-L576
29,329
rosasurfer/ministruts
src/ministruts/Module.php
Module.addGlobalForward
protected function addGlobalForward(ActionForward $forward, $alias = null) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); $name = is_null($alias) ? $forward->getName() : $alias; if (isset($this->globalForwards[$name])) throw new StrutsConfigException('Non-...
php
protected function addGlobalForward(ActionForward $forward, $alias = null) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); $name = is_null($alias) ? $forward->getName() : $alias; if (isset($this->globalForwards[$name])) throw new StrutsConfigException('Non-...
[ "protected", "function", "addGlobalForward", "(", "ActionForward", "$", "forward", ",", "$", "alias", "=", "null", ")", "{", "if", "(", "$", "this", "->", "configured", ")", "throw", "new", "IllegalStateException", "(", "'Configuration is frozen'", ")", ";", "...
Fuegt diesem Module einen globalen ActionForward. Ist ein Alias angegeben, wird er unter dem Alias-Namen registriert. @param ActionForward $forward @param string $alias [optional] - alias name of the forward @throws StrutsConfigException on configuration errors
[ "Fuegt", "diesem", "Module", "einen", "globalen", "ActionForward", ".", "Ist", "ein", "Alias", "angegeben", "wird", "er", "unter", "dem", "Alias", "-", "Namen", "registriert", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L734-L741
29,330
rosasurfer/ministruts
src/ministruts/Module.php
Module.addMapping
protected function addMapping(ActionMapping $mapping) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); if ($mapping->isDefault()) { if ($this->defaultMapping) throw new StrutsConfigException('Only one action mapping can be marked as "default" within a mod...
php
protected function addMapping(ActionMapping $mapping) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); if ($mapping->isDefault()) { if ($this->defaultMapping) throw new StrutsConfigException('Only one action mapping can be marked as "default" within a mod...
[ "protected", "function", "addMapping", "(", "ActionMapping", "$", "mapping", ")", "{", "if", "(", "$", "this", "->", "configured", ")", "throw", "new", "IllegalStateException", "(", "'Configuration is frozen'", ")", ";", "if", "(", "$", "mapping", "->", "isDef...
Fuegt diesem Module ein ActionMapping hinzu. @param ActionMapping $mapping @throws StrutsConfigException on configuration errors
[ "Fuegt", "diesem", "Module", "ein", "ActionMapping", "hinzu", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L751-L770
29,331
rosasurfer/ministruts
src/ministruts/Module.php
Module.addTile
protected function addTile(Tile $tile, $alias = null) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); $name = $tile->getName(); $this->tiles[$name] = $tile; if (isset($alias)) $this->tiles[$alias] = $tile; }
php
protected function addTile(Tile $tile, $alias = null) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); $name = $tile->getName(); $this->tiles[$name] = $tile; if (isset($alias)) $this->tiles[$alias] = $tile; }
[ "protected", "function", "addTile", "(", "Tile", "$", "tile", ",", "$", "alias", "=", "null", ")", "{", "if", "(", "$", "this", "->", "configured", ")", "throw", "new", "IllegalStateException", "(", "'Configuration is frozen'", ")", ";", "$", "name", "=", ...
Fuegt diesem Module eine Tile hinzu. @param Tile $tile @param string $alias [optional] - alias name of the tile
[ "Fuegt", "diesem", "Module", "eine", "Tile", "hinzu", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L779-L787
29,332
rosasurfer/ministruts
src/ministruts/Module.php
Module.processImports
protected function processImports(\SimpleXMLElement $xml) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); $imports = $xml->xpath('/struts-config/imports/import') ?: []; foreach ($imports as $import) { $value = trim((string)$import['value']); ...
php
protected function processImports(\SimpleXMLElement $xml) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); $imports = $xml->xpath('/struts-config/imports/import') ?: []; foreach ($imports as $import) { $value = trim((string)$import['value']); ...
[ "protected", "function", "processImports", "(", "\\", "SimpleXMLElement", "$", "xml", ")", "{", "if", "(", "$", "this", "->", "configured", ")", "throw", "new", "IllegalStateException", "(", "'Configuration is frozen'", ")", ";", "$", "imports", "=", "$", "xml...
Process the configured import settings. @param \SimpleXMLElement $xml - configuration instance @throws StrutsConfigException on configuration errors
[ "Process", "the", "configured", "import", "settings", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L848-L874
29,333
rosasurfer/ministruts
src/ministruts/Module.php
Module.processController
protected function processController(\SimpleXMLElement $xml) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); $elements = $xml->xpath('/struts-config/controller') ?: []; foreach ($elements as $tag) { if (isset($tag['request-processor'])) { ...
php
protected function processController(\SimpleXMLElement $xml) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); $elements = $xml->xpath('/struts-config/controller') ?: []; foreach ($elements as $tag) { if (isset($tag['request-processor'])) { ...
[ "protected", "function", "processController", "(", "\\", "SimpleXMLElement", "$", "xml", ")", "{", "if", "(", "$", "this", "->", "configured", ")", "throw", "new", "IllegalStateException", "(", "'Configuration is frozen'", ")", ";", "$", "elements", "=", "$", ...
Verarbeitet Controller-Einstellungen. @param \SimpleXMLElement $xml - XML-Objekt mit der Konfiguration @throws StrutsConfigException on configuration errors
[ "Verarbeitet", "Controller", "-", "Einstellungen", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L884-L905
29,334
rosasurfer/ministruts
src/ministruts/Module.php
Module.setRequestProcessorClass
protected function setRequestProcessorClass($className) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); if (!is_subclass_of($className, DEFAULT_REQUEST_PROCESSOR_CLASS)) throw new StrutsConfigException('Not a subclass of '.D...
php
protected function setRequestProcessorClass($className) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); if (!is_subclass_of($className, DEFAULT_REQUEST_PROCESSOR_CLASS)) throw new StrutsConfigException('Not a subclass of '.D...
[ "protected", "function", "setRequestProcessorClass", "(", "$", "className", ")", "{", "if", "(", "$", "this", "->", "configured", ")", "throw", "new", "IllegalStateException", "(", "'Configuration is frozen'", ")", ";", "if", "(", "!", "is_subclass_of", "(", "$"...
Setzt den Klassennamen der RequestProcessor-Implementierung, die fuer dieses Module benutzt wird. Diese Klasse muss eine Subklasse von RequestProcessor sein. @param string $className @throws StrutsConfigException on configuration errors
[ "Setzt", "den", "Klassennamen", "der", "RequestProcessor", "-", "Implementierung", "die", "fuer", "dieses", "Module", "benutzt", "wird", ".", "Diese", "Klasse", "muss", "eine", "Subklasse", "von", "RequestProcessor", "sein", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L916-L920
29,335
rosasurfer/ministruts
src/ministruts/Module.php
Module.setRoleProcessorClass
protected function setRoleProcessorClass($className) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); if (!is_subclass_of($className, ROLE_PROCESSOR_BASE_CLASS)) throw new StrutsConfigException('Not a subclass of '.ROLE_PROCESSOR_B...
php
protected function setRoleProcessorClass($className) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); if (!is_subclass_of($className, ROLE_PROCESSOR_BASE_CLASS)) throw new StrutsConfigException('Not a subclass of '.ROLE_PROCESSOR_B...
[ "protected", "function", "setRoleProcessorClass", "(", "$", "className", ")", "{", "if", "(", "$", "this", "->", "configured", ")", "throw", "new", "IllegalStateException", "(", "'Configuration is frozen'", ")", ";", "if", "(", "!", "is_subclass_of", "(", "$", ...
Setzt den Klassennamen der RoleProcessor-Implementierung, die fuer dieses Module benutzt wird. Diese Klasse muss eine Subklasse von RoleProcessor sein. @param string $className @throws StrutsConfigException on configuration errors
[ "Setzt", "den", "Klassennamen", "der", "RoleProcessor", "-", "Implementierung", "die", "fuer", "dieses", "Module", "benutzt", "wird", ".", "Diese", "Klasse", "muss", "eine", "Subklasse", "von", "RoleProcessor", "sein", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L941-L945
29,336
rosasurfer/ministruts
src/ministruts/Module.php
Module.setTilesClass
protected function setTilesClass($className) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); if (!is_class($className)) throw new StrutsConfigException('Class '.$className.' not found'); if (!is_subclass_of($className...
php
protected function setTilesClass($className) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); if (!is_class($className)) throw new StrutsConfigException('Class '.$className.' not found'); if (!is_subclass_of($className...
[ "protected", "function", "setTilesClass", "(", "$", "className", ")", "{", "if", "(", "$", "this", "->", "configured", ")", "throw", "new", "IllegalStateException", "(", "'Configuration is frozen'", ")", ";", "if", "(", "!", "is_class", "(", "$", "className", ...
Setzt den Klassennamen der Tiles-Implementierung, die fuer dieses Modul benutzt wird. Diese Klasse muss eine Subklasse von Tile sein. @param string $className @throws StrutsConfigException on configuration errors
[ "Setzt", "den", "Klassennamen", "der", "Tiles", "-", "Implementierung", "die", "fuer", "dieses", "Modul", "benutzt", "wird", ".", "Diese", "Klasse", "muss", "eine", "Subklasse", "von", "Tile", "sein", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L970-L976
29,337
rosasurfer/ministruts
src/ministruts/Module.php
Module.setMappingClass
protected function setMappingClass($className) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); if (!is_class($className)) throw new StrutsConfigException('Class '.$className.' not found'); ...
php
protected function setMappingClass($className) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); if (!is_class($className)) throw new StrutsConfigException('Class '.$className.' not found'); ...
[ "protected", "function", "setMappingClass", "(", "$", "className", ")", "{", "if", "(", "$", "this", "->", "configured", ")", "throw", "new", "IllegalStateException", "(", "'Configuration is frozen'", ")", ";", "if", "(", "!", "is_class", "(", "$", "className"...
Setzt den Klassennamen der ActionMapping-Implementierung, die fuer dieses Modul benutzt wird. Diese Klasse muss eine Subklasse von ActionMapping sein. @param string $className @throws StrutsConfigException on configuration errors
[ "Setzt", "den", "Klassennamen", "der", "ActionMapping", "-", "Implementierung", "die", "fuer", "dieses", "Modul", "benutzt", "wird", ".", "Diese", "Klasse", "muss", "eine", "Subklasse", "von", "ActionMapping", "sein", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L997-L1003
29,338
rosasurfer/ministruts
src/ministruts/Module.php
Module.setForwardClass
protected function setForwardClass($className) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); if (!is_class($className)) throw new StrutsConfigException('Class '.$className.' not found'); ...
php
protected function setForwardClass($className) { if ($this->configured) throw new IllegalStateException('Configuration is frozen'); if (!is_class($className)) throw new StrutsConfigException('Class '.$className.' not found'); ...
[ "protected", "function", "setForwardClass", "(", "$", "className", ")", "{", "if", "(", "$", "this", "->", "configured", ")", "throw", "new", "IllegalStateException", "(", "'Configuration is frozen'", ")", ";", "if", "(", "!", "is_class", "(", "$", "className"...
Setzt den Klassennamen der ActionForward-Implementierung, die fuer dieses Modul benutzt wird. Diese Klasse muss eine Subklasse von ActionForward sein. @param string $className @throws StrutsConfigException on configuration errors
[ "Setzt", "den", "Klassennamen", "der", "ActionForward", "-", "Implementierung", "die", "fuer", "dieses", "Modul", "benutzt", "wird", ".", "Diese", "Klasse", "muss", "eine", "Subklasse", "von", "ActionForward", "sein", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L1024-L1030
29,339
rosasurfer/ministruts
src/ministruts/Module.php
Module.freeze
public function freeze() { if (!$this->configured) { foreach ($this->mappings['paths'] as $mapping) { $mapping->freeze(); // no need to freeze named mappings as all have a path property } foreach ($this->tiles as $i => $tile) { if (...
php
public function freeze() { if (!$this->configured) { foreach ($this->mappings['paths'] as $mapping) { $mapping->freeze(); // no need to freeze named mappings as all have a path property } foreach ($this->tiles as $i => $tile) { if (...
[ "public", "function", "freeze", "(", ")", "{", "if", "(", "!", "$", "this", "->", "configured", ")", "{", "foreach", "(", "$", "this", "->", "mappings", "[", "'paths'", "]", "as", "$", "mapping", ")", "{", "$", "mapping", "->", "freeze", "(", ")", ...
Friert die Konfiguration ein, sodass sie nicht mehr geaendert werden kann. @return $this
[ "Friert", "die", "Konfiguration", "ein", "sodass", "sie", "nicht", "mehr", "geaendert", "werden", "kann", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L1058-L1070
29,340
rosasurfer/ministruts
src/ministruts/Module.php
Module.findForward
public function findForward($name) { if (isset($this->globalForwards[$name])) return $this->globalForwards[$name]; return null; }
php
public function findForward($name) { if (isset($this->globalForwards[$name])) return $this->globalForwards[$name]; return null; }
[ "public", "function", "findForward", "(", "$", "name", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "globalForwards", "[", "$", "name", "]", ")", ")", "return", "$", "this", "->", "globalForwards", "[", "$", "name", "]", ";", "return", "null...
Sucht und gibt den globalen ActionForward mit dem angegebenen Namen zurueck. Wird kein Forward gefunden, wird NULL zurueckgegeben. @param string $name - logischer Name des ActionForwards @return ActionForward|null
[ "Sucht", "und", "gibt", "den", "globalen", "ActionForward", "mit", "dem", "angegebenen", "Namen", "zurueck", ".", "Wird", "kein", "Forward", "gefunden", "wird", "NULL", "zurueckgegeben", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L1081-L1085
29,341
rosasurfer/ministruts
src/ministruts/Module.php
Module.findTile
public function findTile($name) { if (isset($this->tiles[$name])) return $this->tiles[$name]; return null; }
php
public function findTile($name) { if (isset($this->tiles[$name])) return $this->tiles[$name]; return null; }
[ "public", "function", "findTile", "(", "$", "name", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "tiles", "[", "$", "name", "]", ")", ")", "return", "$", "this", "->", "tiles", "[", "$", "name", "]", ";", "return", "null", ";", "}" ]
Gibt die Tile mit dem angegebenen Namen zurueck oder NULL, wenn keine Tile mit diesem Namen gefunden wurde. @param string $name - logischer Name der Tile @return Tile|null
[ "Gibt", "die", "Tile", "mit", "dem", "angegebenen", "Namen", "zurueck", "oder", "NULL", "wenn", "keine", "Tile", "mit", "diesem", "Namen", "gefunden", "wurde", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L1096-L1100
29,342
rosasurfer/ministruts
src/ministruts/Module.php
Module.isIncludable
private function isIncludable($name, \SimpleXMLElement $xml) { return $this->isTileDefinition($name, $xml) || $this->isFile($name); }
php
private function isIncludable($name, \SimpleXMLElement $xml) { return $this->isTileDefinition($name, $xml) || $this->isFile($name); }
[ "private", "function", "isIncludable", "(", "$", "name", ",", "\\", "SimpleXMLElement", "$", "xml", ")", "{", "return", "$", "this", "->", "isTileDefinition", "(", "$", "name", ",", "$", "xml", ")", "||", "$", "this", "->", "isFile", "(", "$", "name", ...
Ob unter dem angegebenen Namen eine inkludierbare Resource existiert. Dies kann entweder eine Tiles-Definition oder eine Datei sein. @param string $name - Name der Resource @param \SimpleXMLElement $xml - XML-Objekt mit der Konfiguration @return bool
[ "Ob", "unter", "dem", "angegebenen", "Namen", "eine", "inkludierbare", "Resource", "existiert", ".", "Dies", "kann", "entweder", "eine", "Tiles", "-", "Definition", "oder", "eine", "Datei", "sein", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L1112-L1114
29,343
rosasurfer/ministruts
src/ministruts/Module.php
Module.isTileDefinition
private function isTileDefinition($name, \SimpleXMLElement $xml) { $nodes = $xml->xpath("/struts-config/tiles/tile[@name='".$name."']") ?: []; return (bool) sizeof($nodes); }
php
private function isTileDefinition($name, \SimpleXMLElement $xml) { $nodes = $xml->xpath("/struts-config/tiles/tile[@name='".$name."']") ?: []; return (bool) sizeof($nodes); }
[ "private", "function", "isTileDefinition", "(", "$", "name", ",", "\\", "SimpleXMLElement", "$", "xml", ")", "{", "$", "nodes", "=", "$", "xml", "->", "xpath", "(", "\"/struts-config/tiles/tile[@name='\"", ".", "$", "name", ".", "\"']\"", ")", "?", ":", "[...
Ob unter dem angegebenen Namen eine Tile definiert ist. @param string $name - Name der Tile @param \SimpleXMLElement $xml - XML-Objekt mit der Konfiguration @return bool @throws StrutsConfigException on configuration errors
[ "Ob", "unter", "dem", "angegebenen", "Namen", "eine", "Tile", "definiert", "ist", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L1127-L1130
29,344
rosasurfer/ministruts
src/ministruts/Module.php
Module.findFile
private function findFile($name) { // strip query string $parts = explode('?', $name, 2); foreach ($this->resourceLocations as $location) { if (is_file($location.DIRECTORY_SEPARATOR.$parts[0])) { $name = realpath($location.DIRECTORY_SEPARATOR.\array_shift($parts)); ...
php
private function findFile($name) { // strip query string $parts = explode('?', $name, 2); foreach ($this->resourceLocations as $location) { if (is_file($location.DIRECTORY_SEPARATOR.$parts[0])) { $name = realpath($location.DIRECTORY_SEPARATOR.\array_shift($parts)); ...
[ "private", "function", "findFile", "(", "$", "name", ")", "{", "// strip query string", "$", "parts", "=", "explode", "(", "'?'", ",", "$", "name", ",", "2", ")", ";", "foreach", "(", "$", "this", "->", "resourceLocations", "as", "$", "location", ")", ...
Sucht in den Resource-Verzeichnissen dieses Modules nach einer Datei mit dem angegebenen Namen und gibt den vollstaendigen Dateinamen zurueck, oder NULL, wenn keine Datei mit diesem Namen gefunden wurde. @param string $name - relativer Dateiname @return string|null - Dateiname
[ "Sucht", "in", "den", "Resource", "-", "Verzeichnissen", "dieses", "Modules", "nach", "einer", "Datei", "mit", "dem", "angegebenen", "Namen", "und", "gibt", "den", "vollstaendigen", "Dateinamen", "zurueck", "oder", "NULL", "wenn", "keine", "Datei", "mit", "diese...
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L1155-L1168
29,345
rosasurfer/ministruts
src/ministruts/Module.php
Module.resolveClassName
private function resolveClassName($name) { $name = str_replace('/', '\\', trim($name)); // no need to resolve a qualified name if (strContains($name, '\\')) return is_class($name) ? [$name] : []; // unqualified name, check "use" declarations $lowerName = strtolower(...
php
private function resolveClassName($name) { $name = str_replace('/', '\\', trim($name)); // no need to resolve a qualified name if (strContains($name, '\\')) return is_class($name) ? [$name] : []; // unqualified name, check "use" declarations $lowerName = strtolower(...
[ "private", "function", "resolveClassName", "(", "$", "name", ")", "{", "$", "name", "=", "str_replace", "(", "'/'", ",", "'\\\\'", ",", "trim", "(", "$", "name", ")", ")", ";", "// no need to resolve a qualified name", "if", "(", "strContains", "(", "$", "...
Resolves a simple class name and returns all found fully qualified class names. @param string $name @return string[] - found class names or an empty array if the class name cannot be resolved
[ "Resolves", "a", "simple", "class", "name", "and", "returns", "all", "found", "fully", "qualified", "class", "names", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/ministruts/Module.php#L1191-L1211
29,346
rosasurfer/ministruts
src/db/pgsql/PostgresResult.php
PostgresResult.statusToStr
public static function statusToStr($status) { if (!is_int($status)) throw new IllegalTypeException('Illegal type of parameter $status: '.gettype($status)); switch ($status) { case PGSQL_EMPTY_QUERY : return 'PGSQL_EMPTY_QUERY'; case PGSQL_COMMAND_OK : return 'PGSQL_COMMAND_...
php
public static function statusToStr($status) { if (!is_int($status)) throw new IllegalTypeException('Illegal type of parameter $status: '.gettype($status)); switch ($status) { case PGSQL_EMPTY_QUERY : return 'PGSQL_EMPTY_QUERY'; case PGSQL_COMMAND_OK : return 'PGSQL_COMMAND_...
[ "public", "static", "function", "statusToStr", "(", "$", "status", ")", "{", "if", "(", "!", "is_int", "(", "$", "status", ")", ")", "throw", "new", "IllegalTypeException", "(", "'Illegal type of parameter $status: '", ".", "gettype", "(", "$", "status", ")", ...
Return a readable version of a result status code. @param int $status - status code as returned by pg_result_status(PGSQL_STATUS_LONG) @return string
[ "Return", "a", "readable", "version", "of", "a", "result", "status", "code", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/db/pgsql/PostgresResult.php#L187-L201
29,347
timble/kodekit
code/template/filter/asset.php
TemplateFilterAsset.addScheme
public function addScheme($alias, $path, $prepend = false) { if($prepend) { $this->_schemes = array($alias => $path) + $this->_schemes; } else { $this->_schemes = $this->_schemes + array($alias => $path); } return $this; }
php
public function addScheme($alias, $path, $prepend = false) { if($prepend) { $this->_schemes = array($alias => $path) + $this->_schemes; } else { $this->_schemes = $this->_schemes + array($alias => $path); } return $this; }
[ "public", "function", "addScheme", "(", "$", "alias", ",", "$", "path", ",", "$", "prepend", "=", "false", ")", "{", "if", "(", "$", "prepend", ")", "{", "$", "this", "->", "_schemes", "=", "array", "(", "$", "alias", "=>", "$", "path", ")", "+",...
Add a url scheme @param string $alias Scheme to be appended @param mixed $path The path to replace the scheme @param boolean $prepend Whether to prepend the autoloader or not @return TemplateFilterAsset
[ "Add", "a", "url", "scheme" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/template/filter/asset.php#L72-L81
29,348
rosasurfer/ministruts
src/db/orm/meta/PropertyMapping.php
PropertyMapping.convertToDBValue
public function convertToDBValue($value, IConnector $connector) { if ($value === null) { $value = 'null'; } else { $type = $this->mapping['type']; switch ($type) { case 'bool' : case 'boolean': $value = $connector->escapeLiter...
php
public function convertToDBValue($value, IConnector $connector) { if ($value === null) { $value = 'null'; } else { $type = $this->mapping['type']; switch ($type) { case 'bool' : case 'boolean': $value = $connector->escapeLiter...
[ "public", "function", "convertToDBValue", "(", "$", "value", ",", "IConnector", "$", "connector", ")", "{", "if", "(", "$", "value", "===", "null", ")", "{", "$", "value", "=", "'null'", ";", "}", "else", "{", "$", "type", "=", "$", "this", "->", "...
Convert a PHP value to its SQL representation. @param mixed $value - PHP representation of a property value @param IConnector $connector - the used database connector @return string - database representation
[ "Convert", "a", "PHP", "value", "to", "its", "SQL", "representation", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/db/orm/meta/PropertyMapping.php#L82-L110
29,349
timble/kodekit
code/dispatcher/request/abstract.php
DispatcherRequestAbstract.receive
public function receive() { foreach($this->_queue as $transport) { if($transport instanceof DispatcherRequestTransportInterface) { $transport->receive($this); } } return $this; }
php
public function receive() { foreach($this->_queue as $transport) { if($transport instanceof DispatcherRequestTransportInterface) { $transport->receive($this); } } return $this; }
[ "public", "function", "receive", "(", ")", "{", "foreach", "(", "$", "this", "->", "_queue", "as", "$", "transport", ")", "{", "if", "(", "$", "transport", "instanceof", "DispatcherRequestTransportInterface", ")", "{", "$", "transport", "->", "receive", "(",...
Receive the request by passing it through transports @return DispatcherRequestTransportInterface
[ "Receive", "the", "request", "by", "passing", "it", "through", "transports" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/dispatcher/request/abstract.php#L211-L221
29,350
timble/kodekit
code/dispatcher/request/abstract.php
DispatcherRequestAbstract.getOrigin
public function getOrigin($isInternal = true) { $origin = null; if ($this->_headers->has('Origin')) { try { $origin = $this->getObject('lib:http.url', [ 'url' => $this->getObject('lib:filter.url')->sanitize($this->_headers->get('Origin')) ...
php
public function getOrigin($isInternal = true) { $origin = null; if ($this->_headers->has('Origin')) { try { $origin = $this->getObject('lib:http.url', [ 'url' => $this->getObject('lib:filter.url')->sanitize($this->_headers->get('Origin')) ...
[ "public", "function", "getOrigin", "(", "$", "isInternal", "=", "true", ")", "{", "$", "origin", "=", "null", ";", "if", "(", "$", "this", "->", "_headers", "->", "has", "(", "'Origin'", ")", ")", "{", "try", "{", "$", "origin", "=", "$", "this", ...
Returns the HTTP origin header. @param boolean $isInternal Only allow internal URLs @return HttpUrl|null A HttpUrl object or NULL if no origin header could be found
[ "Returns", "the", "HTTP", "origin", "header", "." ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/dispatcher/request/abstract.php#L653-L683
29,351
timble/kodekit
code/dispatcher/request/abstract.php
DispatcherRequestAbstract.getFormat
public function getFormat($mediatype = false) { if (!isset($this->_format)) { if(!$this->query->has('format')) { $format = pathinfo($this->getUrl()->getPath(), PATHINFO_EXTENSION); if(empty($format) || !isset(static::$_formats[$format])) ...
php
public function getFormat($mediatype = false) { if (!isset($this->_format)) { if(!$this->query->has('format')) { $format = pathinfo($this->getUrl()->getPath(), PATHINFO_EXTENSION); if(empty($format) || !isset(static::$_formats[$format])) ...
[ "public", "function", "getFormat", "(", "$", "mediatype", "=", "false", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "_format", ")", ")", "{", "if", "(", "!", "$", "this", "->", "query", "->", "has", "(", "'format'", ")", ")", "{", ...
Return the request format or mediatype Find the format by using following sequence : 1. Use the the 'format' request parameter 2. Use the URL path extension 3. Use the accept header with the highest quality apply the reverse format map to find the format. @param bool $mediatype Get the media type @return strin...
[ "Return", "the", "request", "format", "or", "mediatype" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/dispatcher/request/abstract.php#L816-L860
29,352
timble/kodekit
code/dispatcher/request/abstract.php
DispatcherRequestAbstract.getTimezones
public function getTimezones() { $country = locale_get_region($this->getLanguage()); $timezones = timezone_identifiers_list(\DateTimeZone::PER_COUNTRY, $country); return $timezones; }
php
public function getTimezones() { $country = locale_get_region($this->getLanguage()); $timezones = timezone_identifiers_list(\DateTimeZone::PER_COUNTRY, $country); return $timezones; }
[ "public", "function", "getTimezones", "(", ")", "{", "$", "country", "=", "locale_get_region", "(", "$", "this", "->", "getLanguage", "(", ")", ")", ";", "$", "timezones", "=", "timezone_identifiers_list", "(", "\\", "DateTimeZone", "::", "PER_COUNTRY", ",", ...
Get a list of timezones acceptable by the client @return array|false
[ "Get", "a", "list", "of", "timezones", "acceptable", "by", "the", "client" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/dispatcher/request/abstract.php#L976-L982
29,353
timble/kodekit
code/dispatcher/request/abstract.php
DispatcherRequestAbstract.isDownload
public function isDownload() { $result = $this->query->has('force-download'); if($this->headers->has('Accept')) { $accept = $this->headers->get('Accept'); $types = $this->__parseAccept($accept); //Get the highest quality format $type = key($...
php
public function isDownload() { $result = $this->query->has('force-download'); if($this->headers->has('Accept')) { $accept = $this->headers->get('Accept'); $types = $this->__parseAccept($accept); //Get the highest quality format $type = key($...
[ "public", "function", "isDownload", "(", ")", "{", "$", "result", "=", "$", "this", "->", "query", "->", "has", "(", "'force-download'", ")", ";", "if", "(", "$", "this", "->", "headers", "->", "has", "(", "'Accept'", ")", ")", "{", "$", "accept", ...
Check if the request is downloadable or not. A request is downloading if one of the following conditions are met : 1. The request query contains a 'force-download' parameter 2. The request accepts specifies either the application/force-download or application/octet-stream mime types @return bool Returns TRUE If the ...
[ "Check", "if", "the", "request", "is", "downloadable", "or", "not", "." ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/dispatcher/request/abstract.php#L1168-L1186
29,354
rosasurfer/ministruts
src/cache/ApcCache.php
ApcCache.isCached
public function isCached($key) { // The actual working horse. The method does not only check existence of the key. It retrieves the value and stores // it in the local reference pool, so following cache queries can use the local reference. // check local reference pool if ($this->getRef...
php
public function isCached($key) { // The actual working horse. The method does not only check existence of the key. It retrieves the value and stores // it in the local reference pool, so following cache queries can use the local reference. // check local reference pool if ($this->getRef...
[ "public", "function", "isCached", "(", "$", "key", ")", "{", "// The actual working horse. The method does not only check existence of the key. It retrieves the value and stores", "// it in the local reference pool, so following cache queries can use the local reference.", "// check local refere...
Whether a value with the specified key exists in the cache. @param string $key @return bool
[ "Whether", "a", "value", "with", "the", "specified", "key", "exists", "in", "the", "cache", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/cache/ApcCache.php#L36-L87
29,355
rosasurfer/ministruts
src/cache/ApcCache.php
ApcCache.set
public function set($key, &$value, $expires=Cache::EXPIRES_NEVER, Dependency $dependency=null) { if (!is_string($key)) throw new IllegalTypeException('Illegal type of parameter $key: '.gettype($key)); if (!is_int($expires)) throw new IllegalTypeException('Illegal type of parameter $expires: '.gettype($...
php
public function set($key, &$value, $expires=Cache::EXPIRES_NEVER, Dependency $dependency=null) { if (!is_string($key)) throw new IllegalTypeException('Illegal type of parameter $key: '.gettype($key)); if (!is_int($expires)) throw new IllegalTypeException('Illegal type of parameter $expires: '.gettype($...
[ "public", "function", "set", "(", "$", "key", ",", "&", "$", "value", ",", "$", "expires", "=", "Cache", "::", "EXPIRES_NEVER", ",", "Dependency", "$", "dependency", "=", "null", ")", "{", "if", "(", "!", "is_string", "(", "$", "key", ")", ")", "th...
Store a value under the specified key in the cache. An existing value already stored under the key is overwritten. If expiration time or dependency are provided and those conditions are met the value is automatically invalidated but not automatically removed from the cache. @param string $key - ...
[ "Store", "a", "value", "under", "the", "specified", "key", "in", "the", "cache", ".", "An", "existing", "value", "already", "stored", "under", "the", "key", "is", "overwritten", ".", "If", "expiration", "time", "or", "dependency", "are", "provided", "and", ...
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/cache/ApcCache.php#L132-L180
29,356
timble/kodekit
code/model/entity/composite.php
ModelEntityComposite.insert
public function insert($entity, $status = null) { if(!$entity instanceof ModelEntityInterface) { if (!is_array($entity) && !$entity instanceof \Traversable) { throw new \InvalidArgumentException(sprintf( 'Entity must be an array or an objec...
php
public function insert($entity, $status = null) { if(!$entity instanceof ModelEntityInterface) { if (!is_array($entity) && !$entity instanceof \Traversable) { throw new \InvalidArgumentException(sprintf( 'Entity must be an array or an objec...
[ "public", "function", "insert", "(", "$", "entity", ",", "$", "status", "=", "null", ")", "{", "if", "(", "!", "$", "entity", "instanceof", "ModelEntityInterface", ")", "{", "if", "(", "!", "is_array", "(", "$", "entity", ")", "&&", "!", "$", "entity...
Insert a new entity This function will either clone a entity prototype or create a new instance of the entity object for each entity being inserted. By default the entity will be cloned. The entity will be stored by it's identity_key if set or otherwise by it's object handle. @param ModelEntityInterface|array $enti...
[ "Insert", "a", "new", "entity" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/model/entity/composite.php#L103-L157
29,357
timble/kodekit
code/user/provider/model.php
UserProviderModel.setUser
public function setUser(UserInterface $user) { parent::setUser($user); //Store the user by email if($email = $user->getEmail()) { $this->_emails[$email] = $user; } return $this; }
php
public function setUser(UserInterface $user) { parent::setUser($user); //Store the user by email if($email = $user->getEmail()) { $this->_emails[$email] = $user; } return $this; }
[ "public", "function", "setUser", "(", "UserInterface", "$", "user", ")", "{", "parent", "::", "setUser", "(", "$", "user", ")", ";", "//Store the user by email", "if", "(", "$", "email", "=", "$", "user", "->", "getEmail", "(", ")", ")", "{", "$", "thi...
Set a user in the provider @param UserInterface $user @return boolean
[ "Set", "a", "user", "in", "the", "provider" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/user/provider/model.php#L112-L122
29,358
timble/kodekit
code/user/provider/model.php
UserProviderModel.findUser
public function findUser($identifier) { $user = null; if($this->isLoaded($identifier)) { if (!is_numeric($identifier)) { $user = $this->_emails[$identifier]; } else { $user = parent::findUser($identifier); } } ...
php
public function findUser($identifier) { $user = null; if($this->isLoaded($identifier)) { if (!is_numeric($identifier)) { $user = $this->_emails[$identifier]; } else { $user = parent::findUser($identifier); } } ...
[ "public", "function", "findUser", "(", "$", "identifier", ")", "{", "$", "user", "=", "null", ";", "if", "(", "$", "this", "->", "isLoaded", "(", "$", "identifier", ")", ")", "{", "if", "(", "!", "is_numeric", "(", "$", "identifier", ")", ")", "{",...
Find a user for the given identifier @param string $identifier A unique user identifier, (i.e a username or email address) @return UserInterface|null Returns a UserInterface object or NULL if the user hasn't been loaded yet
[ "Find", "a", "user", "for", "the", "given", "identifier" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/user/provider/model.php#L130-L143
29,359
timble/kodekit
code/object/config/factory.php
ObjectConfigFactory.createFormat
public function createFormat($format, $options = array()) { $name = strtolower($format); if (!isset($this->_formats[$name])) { throw new \RuntimeException(sprintf('Unsupported config format: %s ', $name)); } if(!isset($this->__prototypes[$name])) { $...
php
public function createFormat($format, $options = array()) { $name = strtolower($format); if (!isset($this->_formats[$name])) { throw new \RuntimeException(sprintf('Unsupported config format: %s ', $name)); } if(!isset($this->__prototypes[$name])) { $...
[ "public", "function", "createFormat", "(", "$", "format", ",", "$", "options", "=", "array", "(", ")", ")", "{", "$", "name", "=", "strtolower", "(", "$", "format", ")", ";", "if", "(", "!", "isset", "(", "$", "this", "->", "_formats", "[", "$", ...
Get a registered config object. @param string $format The format name @param array|ObjectConfig $options An associative array of configuration options or a ObjectConfig instance. @throws \InvalidArgumentException If the format isn't registered @throws \UnexpectedValueException If the format object doesn't imple...
[ "Get", "a", "registered", "config", "object", "." ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/object/config/factory.php#L79-L107
29,360
timble/kodekit
code/object/config/factory.php
ObjectConfigFactory.registerFormat
public function registerFormat($format, $class) { if(!class_exists($class, true)) { throw new \InvalidArgumentException('Class : '.$class.' cannot does not exist.'); } $this->_formats[$format] = $class; //In case the format is being re-registered clear the prototype ...
php
public function registerFormat($format, $class) { if(!class_exists($class, true)) { throw new \InvalidArgumentException('Class : '.$class.' cannot does not exist.'); } $this->_formats[$format] = $class; //In case the format is being re-registered clear the prototype ...
[ "public", "function", "registerFormat", "(", "$", "format", ",", "$", "class", ")", "{", "if", "(", "!", "class_exists", "(", "$", "class", ",", "true", ")", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'Class : '", ".", "$", "class"...
Register config format @param string $format The name of the format @param mixed $class Class name @throws \InvalidArgumentException If the class does not exist @return ObjectConfigFactory
[ "Register", "config", "format" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/object/config/factory.php#L117-L131
29,361
timble/kodekit
code/object/config/factory.php
ObjectConfigFactory.fromFile
public function fromFile($filename, $object = true) { $pathinfo = pathinfo($filename); if (!isset($pathinfo['extension'])) { throw new \RuntimeException(sprintf( 'Filename "%s" is missing an extension and cannot be auto-detected', $filename )); ...
php
public function fromFile($filename, $object = true) { $pathinfo = pathinfo($filename); if (!isset($pathinfo['extension'])) { throw new \RuntimeException(sprintf( 'Filename "%s" is missing an extension and cannot be auto-detected', $filename )); ...
[ "public", "function", "fromFile", "(", "$", "filename", ",", "$", "object", "=", "true", ")", "{", "$", "pathinfo", "=", "pathinfo", "(", "$", "filename", ")", ";", "if", "(", "!", "isset", "(", "$", "pathinfo", "[", "'extension'", "]", ")", ")", "...
Read a config from a file. @param string $filename @param bool $object If TRUE return a ConfigObject, if FALSE return an array. Default TRUE. @throws \InvalidArgumentException @throws \RuntimeException @return ObjectConfigInterface|array
[ "Read", "a", "config", "from", "a", "file", "." ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/object/config/factory.php#L158-L171
29,362
timble/kodekit
code/object/config/factory.php
ObjectConfigFactory.toFile
public function toFile($filename, ObjectConfigInterface $config) { $pathinfo = pathinfo($filename); if (!isset($pathinfo['extension'])) { throw new \RuntimeException(sprintf( 'Filename "%s" is missing an extension and cannot be auto-detected', $filename ...
php
public function toFile($filename, ObjectConfigInterface $config) { $pathinfo = pathinfo($filename); if (!isset($pathinfo['extension'])) { throw new \RuntimeException(sprintf( 'Filename "%s" is missing an extension and cannot be auto-detected', $filename ...
[ "public", "function", "toFile", "(", "$", "filename", ",", "ObjectConfigInterface", "$", "config", ")", "{", "$", "pathinfo", "=", "pathinfo", "(", "$", "filename", ")", ";", "if", "(", "!", "isset", "(", "$", "pathinfo", "[", "'extension'", "]", ")", ...
Writes a config to a file @param string $filename @param ObjectConfigInterface $config @throws \RuntimeException @return ObjectConfigFactory
[ "Writes", "a", "config", "to", "a", "file" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/object/config/factory.php#L181-L194
29,363
rosasurfer/ministruts
src/util/PHP.php
PHP.ini_set
public static function ini_set($option, $value, $throwException = true) { if (is_bool($value)) $value = (int) $value; $oldValue = ini_set($option, $value); if ($oldValue !== false) return true; $oldValue = ini_get($option); // ini_set() caused an error ...
php
public static function ini_set($option, $value, $throwException = true) { if (is_bool($value)) $value = (int) $value; $oldValue = ini_set($option, $value); if ($oldValue !== false) return true; $oldValue = ini_get($option); // ini_set() caused an error ...
[ "public", "static", "function", "ini_set", "(", "$", "option", ",", "$", "value", ",", "$", "throwException", "=", "true", ")", "{", "if", "(", "is_bool", "(", "$", "value", ")", ")", "$", "value", "=", "(", "int", ")", "$", "value", ";", "$", "o...
Set the specified php.ini setting. Opposite to the built-in PHP function this method does not return the old value but a boolean success status. Used to detect assignment errors if the access level of the specified option doesn't allow a modification. @param string $option @param bool|int|string $value @par...
[ "Set", "the", "specified", "php", ".", "ini", "setting", ".", "Opposite", "to", "the", "built", "-", "in", "PHP", "function", "this", "method", "does", "not", "return", "the", "old", "value", "but", "a", "boolean", "success", "status", ".", "Used", "to",...
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/util/PHP.php#L444-L460
29,364
rosasurfer/ministruts
src/net/http/HttpRequest.php
HttpRequest.setMethod
public function setMethod($method) { if (!is_string($method)) throw new IllegalTypeException('Illegal type of parameter $method: '.gettype($method)); if ($method!=='GET' && $method!=='POST') throw new InvalidArgumentException('Invalid argument $method: '.$method); $this->method ...
php
public function setMethod($method) { if (!is_string($method)) throw new IllegalTypeException('Illegal type of parameter $method: '.gettype($method)); if ($method!=='GET' && $method!=='POST') throw new InvalidArgumentException('Invalid argument $method: '.$method); $this->method ...
[ "public", "function", "setMethod", "(", "$", "method", ")", "{", "if", "(", "!", "is_string", "(", "$", "method", ")", ")", "throw", "new", "IllegalTypeException", "(", "'Illegal type of parameter $method: '", ".", "gettype", "(", "$", "method", ")", ")", ";...
Set the request's HTTP method. Currently only GET and POST are implemented. @param string $method @return $this
[ "Set", "the", "request", "s", "HTTP", "method", ".", "Currently", "only", "GET", "and", "POST", "are", "implemented", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/http/HttpRequest.php#L68-L74
29,365
rosasurfer/ministruts
src/net/http/HttpRequest.php
HttpRequest.setUrl
public function setUrl($url) { if (!is_string($url)) throw new IllegalTypeException('Illegal type of parameter $url: '.gettype($url)); // TODO: validate URL if (strpos($url, ' ') !== false) throw new InvalidArgumentException('Invalid argument $url: '.$url); $this->url = $u...
php
public function setUrl($url) { if (!is_string($url)) throw new IllegalTypeException('Illegal type of parameter $url: '.gettype($url)); // TODO: validate URL if (strpos($url, ' ') !== false) throw new InvalidArgumentException('Invalid argument $url: '.$url); $this->url = $u...
[ "public", "function", "setUrl", "(", "$", "url", ")", "{", "if", "(", "!", "is_string", "(", "$", "url", ")", ")", "throw", "new", "IllegalTypeException", "(", "'Illegal type of parameter $url: '", ".", "gettype", "(", "$", "url", ")", ")", ";", "// TODO: ...
Set the request's URL. @param string $url @return $this
[ "Set", "the", "request", "s", "URL", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/http/HttpRequest.php#L94-L104
29,366
rosasurfer/ministruts
src/net/http/HttpRequest.php
HttpRequest.setHeader
public function setHeader($name, $value) { if (!is_string($name)) throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name)); if (!strlen($name)) throw new InvalidArgumentException('Invalid argument $name: '.$name); if (isset($value)...
php
public function setHeader($name, $value) { if (!is_string($name)) throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name)); if (!strlen($name)) throw new InvalidArgumentException('Invalid argument $name: '.$name); if (isset($value)...
[ "public", "function", "setHeader", "(", "$", "name", ",", "$", "value", ")", "{", "if", "(", "!", "is_string", "(", "$", "name", ")", ")", "throw", "new", "IllegalTypeException", "(", "'Illegal type of parameter $name: '", ".", "gettype", "(", "$", "name", ...
Set an HTTP header. This method overwrites an existing header of the same name. @param string $name - header name @param string|null $value - header value (an empty value removes an existing header) @return $this
[ "Set", "an", "HTTP", "header", ".", "This", "method", "overwrites", "an", "existing", "header", "of", "the", "same", "name", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/http/HttpRequest.php#L115-L134
29,367
rosasurfer/ministruts
src/net/http/HttpRequest.php
HttpRequest.addHeader
public function addHeader($name, $value) { if (!is_string($name)) throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name)); if (!strlen($name)) throw new InvalidArgumentException('Invalid argument $name: '.$name); if (!is_string($value)) throw new IllegalTypeExcep...
php
public function addHeader($name, $value) { if (!is_string($name)) throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name)); if (!strlen($name)) throw new InvalidArgumentException('Invalid argument $name: '.$name); if (!is_string($value)) throw new IllegalTypeExcep...
[ "public", "function", "addHeader", "(", "$", "name", ",", "$", "value", ")", "{", "if", "(", "!", "is_string", "(", "$", "name", ")", ")", "throw", "new", "IllegalTypeException", "(", "'Illegal type of parameter $name: '", ".", "gettype", "(", "$", "name", ...
Add an HTTP header to the existing ones. Existing headers of the same name are not overwritten. @param string $name - header name @param string $value - header value @return $this @see http://stackoverflow.com/questions/3241326/set-more-than-one-http-header-with-the-same-name
[ "Add", "an", "HTTP", "header", "to", "the", "existing", "ones", ".", "Existing", "headers", "of", "the", "same", "name", "are", "not", "overwritten", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/http/HttpRequest.php#L147-L168
29,368
rosasurfer/ministruts
src/net/http/HttpRequest.php
HttpRequest.getHeader
public function getHeader($name) { if (!is_string($name)) throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name)); if (!strlen($name)) throw new InvalidArgumentException('Invalid argument $name: '.$name); $headers = $this->getHeaders($name); if ($headers) ...
php
public function getHeader($name) { if (!is_string($name)) throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name)); if (!strlen($name)) throw new InvalidArgumentException('Invalid argument $name: '.$name); $headers = $this->getHeaders($name); if ($headers) ...
[ "public", "function", "getHeader", "(", "$", "name", ")", "{", "if", "(", "!", "is_string", "(", "$", "name", ")", ")", "throw", "new", "IllegalTypeException", "(", "'Illegal type of parameter $name: '", ".", "gettype", "(", "$", "name", ")", ")", ";", "if...
Return the request header with the specified name. This method returns the value of a single header. @param string $name - header name (case is ignored) @return string|null - header value or NULL if no such header was found
[ "Return", "the", "request", "header", "with", "the", "specified", "name", ".", "This", "method", "returns", "the", "value", "of", "a", "single", "header", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/http/HttpRequest.php#L178-L186
29,369
rosasurfer/ministruts
src/net/http/HttpRequest.php
HttpRequest.getHeaders
public function getHeaders($names = null) { if (!isset($names)) $names = []; elseif (is_string($names)) $names = [$names]; elseif (is_array($names)) { foreach ($names as $i => $name) { if (!is_string($name)) throw new IllegalTypeException('Illegal type of param...
php
public function getHeaders($names = null) { if (!isset($names)) $names = []; elseif (is_string($names)) $names = [$names]; elseif (is_array($names)) { foreach ($names as $i => $name) { if (!is_string($name)) throw new IllegalTypeException('Illegal type of param...
[ "public", "function", "getHeaders", "(", "$", "names", "=", "null", ")", "{", "if", "(", "!", "isset", "(", "$", "names", ")", ")", "$", "names", "=", "[", "]", ";", "elseif", "(", "is_string", "(", "$", "names", ")", ")", "$", "names", "=", "[...
Return the request headers with the specified names. This method returns a key-value pair for each found header. @param string|string[] $names [optional] - one or more header names (case is ignored) (default: without a name all headers are returned) @return string[] - array of name-value pairs or an empty array if n...
[ "Return", "the", "request", "headers", "with", "the", "specified", "names", ".", "This", "method", "returns", "a", "key", "-", "value", "pair", "for", "each", "found", "header", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/http/HttpRequest.php#L197-L212
29,370
timble/kodekit
code/database/behavior/identifiable.php
DatabaseBehaviorIdentifiable._afterSelect
protected function _afterSelect(DatabaseContext $context) { if($this->getMixer() instanceof DatabaseRowInterface && $this->_auto_generate && !$this->isNew()) { if($this->hasProperty('uuid') && empty($this->uuid)) { $hex = $this->getTable()->getColumn('uuid')->...
php
protected function _afterSelect(DatabaseContext $context) { if($this->getMixer() instanceof DatabaseRowInterface && $this->_auto_generate && !$this->isNew()) { if($this->hasProperty('uuid') && empty($this->uuid)) { $hex = $this->getTable()->getColumn('uuid')->...
[ "protected", "function", "_afterSelect", "(", "DatabaseContext", "$", "context", ")", "{", "if", "(", "$", "this", "->", "getMixer", "(", ")", "instanceof", "DatabaseRowInterface", "&&", "$", "this", "->", "_auto_generate", "&&", "!", "$", "this", "->", "isN...
Auto generated the uuid If the row exists and does not have a valid 'uuid' value auto generate it. Requires an 'uuid' column, if the column type is char the uuid will be a string, if the column type is binary a hex value will be returned. @param DatabaseContext $context A database context object @return void
[ "Auto", "generated", "the", "uuid" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/database/behavior/identifiable.php#L89-L101
29,371
rosasurfer/ministruts
src/cache/CachePeer.php
CachePeer.getReferencePool
protected function getReferencePool() { if (!$this->referencePool) $this->referencePool = new ReferencePool($this->label); return $this->referencePool; }
php
protected function getReferencePool() { if (!$this->referencePool) $this->referencePool = new ReferencePool($this->label); return $this->referencePool; }
[ "protected", "function", "getReferencePool", "(", ")", "{", "if", "(", "!", "$", "this", "->", "referencePool", ")", "$", "this", "->", "referencePool", "=", "new", "ReferencePool", "(", "$", "this", "->", "label", ")", ";", "return", "$", "this", "->", ...
Gibt den lokalen ReferencePool zurueck. @return ReferencePool
[ "Gibt", "den", "lokalen", "ReferencePool", "zurueck", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/cache/CachePeer.php#L65-L69
29,372
rosasurfer/ministruts
src/cache/CachePeer.php
CachePeer.add
final public function add($key, &$value, $expires = Cache::EXPIRES_NEVER, Dependency $dependency = null) { if ($this->isCached($key)) return false; return $this->set($key, $value, $expires, $dependency); }
php
final public function add($key, &$value, $expires = Cache::EXPIRES_NEVER, Dependency $dependency = null) { if ($this->isCached($key)) return false; return $this->set($key, $value, $expires, $dependency); }
[ "final", "public", "function", "add", "(", "$", "key", ",", "&", "$", "value", ",", "$", "expires", "=", "Cache", "::", "EXPIRES_NEVER", ",", "Dependency", "$", "dependency", "=", "null", ")", "{", "if", "(", "$", "this", "->", "isCached", "(", "$", ...
Speichert einen Wert im Cache nur dann, wenn noch kein Wert unter dem angegebenen Schluessel existiert. Laeuft die angegebene Zeitspanne ab oder aendert sich der Status der angegebenen Abhaengigkeit, wird der Wert automatisch ungueltig. @param string $key - Schluessel, unter dem der Wert gespei...
[ "Speichert", "einen", "Wert", "im", "Cache", "nur", "dann", "wenn", "noch", "kein", "Wert", "unter", "dem", "angegebenen", "Schluessel", "existiert", ".", "Laeuft", "die", "angegebene", "Zeitspanne", "ab", "oder", "aendert", "sich", "der", "Status", "der", "an...
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/cache/CachePeer.php#L132-L137
29,373
dereuromark/cakephp-feedback
src/Controller/FeedbackController.php
FeedbackController.save
public function save() { $this->request->allowMethod(['post', 'ajax']); $data = $this->request->getData(); //Is ajax action $this->viewBuilder()->setLayout('ajax'); //Save screenshot: $data['screenshot'] = str_replace('data:image/png;base64,', '', $this->request->getData('screenshot')); //Add curre...
php
public function save() { $this->request->allowMethod(['post', 'ajax']); $data = $this->request->getData(); //Is ajax action $this->viewBuilder()->setLayout('ajax'); //Save screenshot: $data['screenshot'] = str_replace('data:image/png;base64,', '', $this->request->getData('screenshot')); //Add curre...
[ "public", "function", "save", "(", ")", "{", "$", "this", "->", "request", "->", "allowMethod", "(", "[", "'post'", ",", "'ajax'", "]", ")", ";", "$", "data", "=", "$", "this", "->", "request", "->", "getData", "(", ")", ";", "//Is ajax action", "$",...
Ajax function to save the feedback form. @return \Cake\Http\Response|null
[ "Ajax", "function", "to", "save", "the", "feedback", "form", "." ]
0bd774fda38b3cdd05db8c07a06a526d3ba81879
https://github.com/dereuromark/cakephp-feedback/blob/0bd774fda38b3cdd05db8c07a06a526d3ba81879/src/Controller/FeedbackController.php#L61-L116
29,374
dereuromark/cakephp-feedback
src/Controller/FeedbackController.php
FeedbackController.index
public function index() { $savepath = Configure::read('Feedback.configuration.Filesystem.location'); //Check dir if (!is_dir($savepath)) { throw new NotFoundException('savepath not exists'); } //Creat feedback array in a cake-like way $feedbacks = []; //Loop through files if (!$this->request->getS...
php
public function index() { $savepath = Configure::read('Feedback.configuration.Filesystem.location'); //Check dir if (!is_dir($savepath)) { throw new NotFoundException('savepath not exists'); } //Creat feedback array in a cake-like way $feedbacks = []; //Loop through files if (!$this->request->getS...
[ "public", "function", "index", "(", ")", "{", "$", "savepath", "=", "Configure", "::", "read", "(", "'Feedback.configuration.Filesystem.location'", ")", ";", "//Check dir", "if", "(", "!", "is_dir", "(", "$", "savepath", ")", ")", "{", "throw", "new", "NotFo...
Example index function for current save in tmp dir solution. Must only display images of own session @return \Cake\Http\Response|null
[ "Example", "index", "function", "for", "current", "save", "in", "tmp", "dir", "solution", ".", "Must", "only", "display", "images", "of", "own", "session" ]
0bd774fda38b3cdd05db8c07a06a526d3ba81879
https://github.com/dereuromark/cakephp-feedback/blob/0bd774fda38b3cdd05db8c07a06a526d3ba81879/src/Controller/FeedbackController.php#L124-L148
29,375
dereuromark/cakephp-feedback
src/Controller/FeedbackController.php
FeedbackController.viewimage
public function viewimage($file) { $savepath = Configure::read('Feedback.configuration.Filesystem.location'); if (!file_exists($savepath . $file)) { throw new NotFoundException('Could not find that file'); } $feedbackobject = unserialize(file_get_contents($savepath . $file)); if (!isset($feedbackobject...
php
public function viewimage($file) { $savepath = Configure::read('Feedback.configuration.Filesystem.location'); if (!file_exists($savepath . $file)) { throw new NotFoundException('Could not find that file'); } $feedbackobject = unserialize(file_get_contents($savepath . $file)); if (!isset($feedbackobject...
[ "public", "function", "viewimage", "(", "$", "file", ")", "{", "$", "savepath", "=", "Configure", "::", "read", "(", "'Feedback.configuration.Filesystem.location'", ")", ";", "if", "(", "!", "file_exists", "(", "$", "savepath", ".", "$", "file", ")", ")", ...
Temp function to view captured image from index page @param string $file @return \Cake\Http\Response|null
[ "Temp", "function", "to", "view", "captured", "image", "from", "index", "page" ]
0bd774fda38b3cdd05db8c07a06a526d3ba81879
https://github.com/dereuromark/cakephp-feedback/blob/0bd774fda38b3cdd05db8c07a06a526d3ba81879/src/Controller/FeedbackController.php#L156-L172
29,376
rosasurfer/ministruts
src/net/mail/Mailer.php
Mailer.sendLater
protected function sendLater($sender, $receiver, $subject, $message, array $headers = []) { if (!empty($this->options['send-later'])) { $callable = [$this, 'sendMail']; register_shutdown_function($callable, $sender, $receiver, $subject, $message, $headers); $this->options['s...
php
protected function sendLater($sender, $receiver, $subject, $message, array $headers = []) { if (!empty($this->options['send-later'])) { $callable = [$this, 'sendMail']; register_shutdown_function($callable, $sender, $receiver, $subject, $message, $headers); $this->options['s...
[ "protected", "function", "sendLater", "(", "$", "sender", ",", "$", "receiver", ",", "$", "subject", ",", "$", "message", ",", "array", "$", "headers", "=", "[", "]", ")", "{", "if", "(", "!", "empty", "(", "$", "this", "->", "options", "[", "'send...
Delay sending of the mail to the script shutdown phase. Can be used to not to block other more important tasks. NOTE: Usage of this method is a poor man's approach and a last resort. A more professional way to decouple sending of mail is using a regular message queue. @param string $sender - mail sende...
[ "Delay", "sending", "of", "the", "mail", "to", "the", "script", "shutdown", "phase", ".", "Can", "be", "used", "to", "not", "to", "block", "other", "more", "important", "tasks", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/mail/Mailer.php#L79-L93
29,377
rosasurfer/ministruts
src/net/mail/Mailer.php
Mailer.getHeader
protected function getHeader(array $headers, $name) { if (!is_string($name)) throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name)); if (!preg_match('/^[a-z]+(-[a-z]+)*$/i', $name)) throw new InvalidArgumentException('Invalid parameter $name: "'.$nam...
php
protected function getHeader(array $headers, $name) { if (!is_string($name)) throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name)); if (!preg_match('/^[a-z]+(-[a-z]+)*$/i', $name)) throw new InvalidArgumentException('Invalid parameter $name: "'.$nam...
[ "protected", "function", "getHeader", "(", "array", "$", "headers", ",", "$", "name", ")", "{", "if", "(", "!", "is_string", "(", "$", "name", ")", ")", "throw", "new", "IllegalTypeException", "(", "'Illegal type of parameter $name: '", ".", "gettype", "(", ...
Search for a given header and return its value. If the array contains multiple headers of that the last such header is returned. @param string[] $headers - array of headers @param string $name - header to search for @return string|null - value of the last found header or NULL if the header was not found
[ "Search", "for", "a", "given", "header", "and", "return", "its", "value", ".", "If", "the", "array", "contains", "multiple", "headers", "of", "that", "the", "last", "such", "header", "is", "returned", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/mail/Mailer.php#L139-L150
29,378
rosasurfer/ministruts
src/net/mail/Mailer.php
Mailer.removeHeader
protected function removeHeader(array &$headers, $name) { if (!is_string($name)) throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name)); if (!preg_match('/^[a-z]+(-[a-z]+)*$/i', $name)) throw new InvalidArgumentException('Invalid parameter $name: "'....
php
protected function removeHeader(array &$headers, $name) { if (!is_string($name)) throw new IllegalTypeException('Illegal type of parameter $name: '.gettype($name)); if (!preg_match('/^[a-z]+(-[a-z]+)*$/i', $name)) throw new InvalidArgumentException('Invalid parameter $name: "'....
[ "protected", "function", "removeHeader", "(", "array", "&", "$", "headers", ",", "$", "name", ")", "{", "if", "(", "!", "is_string", "(", "$", "name", ")", ")", "throw", "new", "IllegalTypeException", "(", "'Illegal type of parameter $name: '", ".", "gettype",...
Remove a given header from the array and return its value. If the array contains multiple headers of that name all such headers are removed and the last removed one is returned. @param string[] $headers - reference to an array of headers @param string $name - header to remove @return string|null - value of the...
[ "Remove", "a", "given", "header", "from", "the", "array", "and", "return", "its", "value", ".", "If", "the", "array", "contains", "multiple", "headers", "of", "that", "name", "all", "such", "headers", "are", "removed", "and", "the", "last", "removed", "one...
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/mail/Mailer.php#L162-L175
29,379
rosasurfer/ministruts
src/net/mail/Mailer.php
Mailer.encodeNonAsciiChars
protected function encodeNonAsciiChars($value) { if (is_array($value)) { /** @var string[] */ $result = []; foreach ($value as $k => $v) { $result[$k] = $this->{__FUNCTION__}($v); } return $result; } if (preg_match('/[\...
php
protected function encodeNonAsciiChars($value) { if (is_array($value)) { /** @var string[] */ $result = []; foreach ($value as $k => $v) { $result[$k] = $this->{__FUNCTION__}($v); } return $result; } if (preg_match('/[\...
[ "protected", "function", "encodeNonAsciiChars", "(", "$", "value", ")", "{", "if", "(", "is_array", "(", "$", "value", ")", ")", "{", "/** @var string[] */", "$", "result", "=", "[", "]", ";", "foreach", "(", "$", "value", "as", "$", "k", "=>", "$", ...
Encode non-ASCII characters with UTF-8. If a string doesn't contain non-ASCII characters it is not modified. @param string|string[] $value - a single or a list of values @return string|string[] - a single or a list of encoded values
[ "Encode", "non", "-", "ASCII", "characters", "with", "UTF", "-", "8", ".", "If", "a", "string", "doesn", "t", "contain", "non", "-", "ASCII", "characters", "it", "is", "not", "modified", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/net/mail/Mailer.php#L185-L212
29,380
timble/kodekit
code/command/mixin/mixin.php
CommandMixin.invokeCommand
public function invokeCommand($command, $attributes = null, $subject = null) { //Default the subject to the mixer $subject = $subject ?: $this->getMixer(); return $this->getCommandChain()->execute($command, $attributes, $subject); }
php
public function invokeCommand($command, $attributes = null, $subject = null) { //Default the subject to the mixer $subject = $subject ?: $this->getMixer(); return $this->getCommandChain()->execute($command, $attributes, $subject); }
[ "public", "function", "invokeCommand", "(", "$", "command", ",", "$", "attributes", "=", "null", ",", "$", "subject", "=", "null", ")", "{", "//Default the subject to the mixer", "$", "subject", "=", "$", "subject", "?", ":", "$", "this", "->", "getMixer", ...
Invoke a command by calling all registered handlers If a command handler returns the 'break condition' the executing is halted. If no break condition is specified the the command chain will execute all command handlers, regardless of the handler result returned. @param string|CommandInterface $command The comman...
[ "Invoke", "a", "command", "by", "calling", "all", "registered", "handlers" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/command/mixin/mixin.php#L136-L142
29,381
timble/kodekit
code/command/mixin/mixin.php
CommandMixin.hasCommandHandler
public function hasCommandHandler($handler) { if($handler instanceof CommandHandlerInterface) { $identifier = $handler->getIdentifier(); } else { $identifier = $this->getIdentifier($handler); } return $this->getCommandChain()->getHandlers()->hasIdentifier($id...
php
public function hasCommandHandler($handler) { if($handler instanceof CommandHandlerInterface) { $identifier = $handler->getIdentifier(); } else { $identifier = $this->getIdentifier($handler); } return $this->getCommandChain()->getHandlers()->hasIdentifier($id...
[ "public", "function", "hasCommandHandler", "(", "$", "handler", ")", "{", "if", "(", "$", "handler", "instanceof", "CommandHandlerInterface", ")", "{", "$", "identifier", "=", "$", "handler", "->", "getIdentifier", "(", ")", ";", "}", "else", "{", "$", "id...
Check if a command handler exists @param mixed $handler An object that implements CommandHandlerInterface, an ObjectIdentifier or valid identifier string @return boolean TRUE if the behavior exists, FALSE otherwise
[ "Check", "if", "a", "command", "handler", "exists" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/command/mixin/mixin.php#L292-L301
29,382
rosasurfer/ministruts
src/console/io/Input.php
Input.getOption
public function getOption($name) { if (!$this->docoptResult) return false; if ($this->isOption($name)) { $value = $this->docoptResult[$name]; if (is_array($value)) // repetitive option with arguments return $value ? $...
php
public function getOption($name) { if (!$this->docoptResult) return false; if ($this->isOption($name)) { $value = $this->docoptResult[$name]; if (is_array($value)) // repetitive option with arguments return $value ? $...
[ "public", "function", "getOption", "(", "$", "name", ")", "{", "if", "(", "!", "$", "this", "->", "docoptResult", ")", "return", "false", ";", "if", "(", "$", "this", "->", "isOption", "(", "$", "name", ")", ")", "{", "$", "value", "=", "$", "thi...
Return the value of the option with the given name. If the option is not repetitive and has no arguments a boolean value is returned. If the option is repetitive and has no arguments an integer is returned indicating the number of times the option was specified. If the option has arguments the first argument is return...
[ "Return", "the", "value", "of", "the", "option", "with", "the", "given", "name", "." ]
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/console/io/Input.php#L178-L194
29,383
timble/kodekit
code/class/registry/cache.php
ClassRegistryCache.offsetUnset
public function offsetUnset($offset) { apc_delete($this->getNamespace().'-class_'.$offset); if(parent::offsetExists($offset)){ parent::offsetUnset($offset); } }
php
public function offsetUnset($offset) { apc_delete($this->getNamespace().'-class_'.$offset); if(parent::offsetExists($offset)){ parent::offsetUnset($offset); } }
[ "public", "function", "offsetUnset", "(", "$", "offset", ")", "{", "apc_delete", "(", "$", "this", "->", "getNamespace", "(", ")", ".", "'-class_'", ".", "$", "offset", ")", ";", "if", "(", "parent", "::", "offsetExists", "(", "$", "offset", ")", ")", ...
Unset an item from the array @param int $offset @return void
[ "Unset", "an", "item", "from", "the", "array" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/class/registry/cache.php#L124-L131
29,384
rosasurfer/ministruts
src/cache/Cache.php
Cache.me
public static function me($label = null) { // TODO: zufaellige Verwendung der Application-ID als Label abfangen // Default-Cache if ($label === null) { if (!self::$default) { // neuen Cache instantiieren if (extension_loaded('apc') && ini_get_bool(CLI...
php
public static function me($label = null) { // TODO: zufaellige Verwendung der Application-ID als Label abfangen // Default-Cache if ($label === null) { if (!self::$default) { // neuen Cache instantiieren if (extension_loaded('apc') && ini_get_bool(CLI...
[ "public", "static", "function", "me", "(", "$", "label", "=", "null", ")", "{", "// TODO: zufaellige Verwendung der Application-ID als Label abfangen", "// Default-Cache", "if", "(", "$", "label", "===", "null", ")", "{", "if", "(", "!", "self", "::", "$", "defa...
Gibt die Cache-Implementierung fuer den angegebenen Bezeichner zurueck. Verschiedene Bezeichner stehen fuer verschiedene Cache-Implementierungen, z.B. APC-Cache, Dateisystem-Cache, MemCache. @param string $label [optional] - Bezeichner @return CachePeer
[ "Gibt", "die", "Cache", "-", "Implementierung", "fuer", "den", "angegebenen", "Bezeichner", "zurueck", ".", "Verschiedene", "Bezeichner", "stehen", "fuer", "verschiedene", "Cache", "-", "Implementierungen", "z", ".", "B", ".", "APC", "-", "Cache", "Dateisystem", ...
9d27f93dd53d2d626c75c92cfde9d004bab34d30
https://github.com/rosasurfer/ministruts/blob/9d27f93dd53d2d626c75c92cfde9d004bab34d30/src/cache/Cache.php#L44-L76
29,385
locomotivemtl/charcoal-core
src/Charcoal/Source/Database/DatabasePagination.php
DatabasePagination.sql
public function sql() { if ($this->active() && $this->hasLimit()) { $limit = $this->limit(); $offset = $this->offset(); return 'LIMIT '.$offset.', '.$limit; } return ''; }
php
public function sql() { if ($this->active() && $this->hasLimit()) { $limit = $this->limit(); $offset = $this->offset(); return 'LIMIT '.$offset.', '.$limit; } return ''; }
[ "public", "function", "sql", "(", ")", "{", "if", "(", "$", "this", "->", "active", "(", ")", "&&", "$", "this", "->", "hasLimit", "(", ")", ")", "{", "$", "limit", "=", "$", "this", "->", "limit", "(", ")", ";", "$", "offset", "=", "$", "thi...
Converts the pagination into a SQL expression for the LIMIT clause. @return string A SQL string fragment.
[ "Converts", "the", "pagination", "into", "a", "SQL", "expression", "for", "the", "LIMIT", "clause", "." ]
db3a7af547ccf96efe2d9be028b252bc8646f5d5
https://github.com/locomotivemtl/charcoal-core/blob/db3a7af547ccf96efe2d9be028b252bc8646f5d5/src/Charcoal/Source/Database/DatabasePagination.php#L22-L31
29,386
locomotivemtl/charcoal-core
src/Charcoal/Source/Database/DatabasePagination.php
DatabasePagination.offset
public function offset() { $page = $this->page(); $limit = $this->numPerPage(); $offset = (($page - 1) * $limit); if (PHP_INT_MAX <= $offset) { $offset = PHP_INT_MAX; } return max(0, $offset); }
php
public function offset() { $page = $this->page(); $limit = $this->numPerPage(); $offset = (($page - 1) * $limit); if (PHP_INT_MAX <= $offset) { $offset = PHP_INT_MAX; } return max(0, $offset); }
[ "public", "function", "offset", "(", ")", "{", "$", "page", "=", "$", "this", "->", "page", "(", ")", ";", "$", "limit", "=", "$", "this", "->", "numPerPage", "(", ")", ";", "$", "offset", "=", "(", "(", "$", "page", "-", "1", ")", "*", "$", ...
Retrieve the offset from the page number and count. @return integer
[ "Retrieve", "the", "offset", "from", "the", "page", "number", "and", "count", "." ]
db3a7af547ccf96efe2d9be028b252bc8646f5d5
https://github.com/locomotivemtl/charcoal-core/blob/db3a7af547ccf96efe2d9be028b252bc8646f5d5/src/Charcoal/Source/Database/DatabasePagination.php#L58-L68
29,387
timble/kodekit
code/object/locator/component.php
ObjectLocatorComponent.getClassTemplates
public function getClassTemplates(ObjectIdentifier $identifier) { $templates = array(); //Identifier $component = $this->getObject('object.bootstrapper') ->getComponentIdentifier($identifier->package, $identifier->domain); //Fallback if($namespaces = $this->getI...
php
public function getClassTemplates(ObjectIdentifier $identifier) { $templates = array(); //Identifier $component = $this->getObject('object.bootstrapper') ->getComponentIdentifier($identifier->package, $identifier->domain); //Fallback if($namespaces = $this->getI...
[ "public", "function", "getClassTemplates", "(", "ObjectIdentifier", "$", "identifier", ")", "{", "$", "templates", "=", "array", "(", ")", ";", "//Identifier", "$", "component", "=", "$", "this", "->", "getObject", "(", "'object.bootstrapper'", ")", "->", "get...
Get the list of class templates for an identifier @param ObjectIdentifier $identifier The object identifier @return array The class templates for the identifier
[ "Get", "the", "list", "of", "class", "templates", "for", "an", "identifier" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/object/locator/component.php#L68-L94
29,388
symbiote/silverstripe-seed
code/extensions/SeedTaxonomyTermExtension.php
SeedTaxonomyTermExtension.createReverseTagField
public function createReverseTagField($name) { $belongs_many_many = $this->owner->config()->belongs_many_many; if (!isset($belongs_many_many[$name])) { return null; } $className = $belongs_many_many[$name]; $s = singleton(($className === 'SiteTree') ? 'Page' :...
php
public function createReverseTagField($name) { $belongs_many_many = $this->owner->config()->belongs_many_many; if (!isset($belongs_many_many[$name])) { return null; } $className = $belongs_many_many[$name]; $s = singleton(($className === 'SiteTree') ? 'Page' :...
[ "public", "function", "createReverseTagField", "(", "$", "name", ")", "{", "$", "belongs_many_many", "=", "$", "this", "->", "owner", "->", "config", "(", ")", "->", "belongs_many_many", ";", "if", "(", "!", "isset", "(", "$", "belongs_many_many", "[", "$"...
Setup the appropriate field to manage tagging for a belongs_many_many relationship.
[ "Setup", "the", "appropriate", "field", "to", "manage", "tagging", "for", "a", "belongs_many_many", "relationship", "." ]
bda0c1dab0d4cd7d8ca9a94b1a804562ecfc831d
https://github.com/symbiote/silverstripe-seed/blob/bda0c1dab0d4cd7d8ca9a94b1a804562ecfc831d/code/extensions/SeedTaxonomyTermExtension.php#L32-L63
29,389
timble/kodekit
code/template/template.php
Template.getContext
public function getContext(TemplateContextInterface $context = null) { $context = new TemplateContext($context); $context->setData($this->getData()); $context->setParameters($this->getParameters()); return $context; }
php
public function getContext(TemplateContextInterface $context = null) { $context = new TemplateContext($context); $context->setData($this->getData()); $context->setParameters($this->getParameters()); return $context; }
[ "public", "function", "getContext", "(", "TemplateContextInterface", "$", "context", "=", "null", ")", "{", "$", "context", "=", "new", "TemplateContext", "(", "$", "context", ")", ";", "$", "context", "->", "setData", "(", "$", "this", "->", "getData", "(...
Get the template context @param TemplateContextInterface $context Context to cast to a local context @return TemplateContext
[ "Get", "the", "template", "context" ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/template/template.php#L177-L184
29,390
timble/kodekit
code/filesystem/stream/abstract.php
FilesystemStreamAbstract.getTime
public function getTime($time = self::TIME_MODIFIED) { $result = false; $info = $this->getInfo(); if(isset($info[$time])) { $result = new \DateTime('@'.$info[$time]); } return $result; }
php
public function getTime($time = self::TIME_MODIFIED) { $result = false; $info = $this->getInfo(); if(isset($info[$time])) { $result = new \DateTime('@'.$info[$time]); } return $result; }
[ "public", "function", "getTime", "(", "$", "time", "=", "self", "::", "TIME_MODIFIED", ")", "{", "$", "result", "=", "false", ";", "$", "info", "=", "$", "this", "->", "getInfo", "(", ")", ";", "if", "(", "isset", "(", "$", "info", "[", "$", "tim...
Get the streams last modified, last accessed or created time. @param string $time One of the TIME_* constants @return \DateTime|false A DateTime object or FALSE if the time could not be found
[ "Get", "the", "streams", "last", "modified", "last", "accessed", "or", "created", "time", "." ]
4c376f8873f8d10c55e3d290616ff622605cd246
https://github.com/timble/kodekit/blob/4c376f8873f8d10c55e3d290616ff622605cd246/code/filesystem/stream/abstract.php#L680-L690
29,391
sroze/ChainOfResponsibility
ProcessCollection.php
ProcessCollection.add
public function add($process) { if (is_array($process)) { foreach ($process as $p) { $this->add($p); } } elseif (!$process instanceof ChainProcessInterface) { throw new \RuntimeException(sprintf( 'Expect to be instance of ChainProce...
php
public function add($process) { if (is_array($process)) { foreach ($process as $p) { $this->add($p); } } elseif (!$process instanceof ChainProcessInterface) { throw new \RuntimeException(sprintf( 'Expect to be instance of ChainProce...
[ "public", "function", "add", "(", "$", "process", ")", "{", "if", "(", "is_array", "(", "$", "process", ")", ")", "{", "foreach", "(", "$", "process", "as", "$", "p", ")", "{", "$", "this", "->", "add", "(", "$", "p", ")", ";", "}", "}", "els...
Add a process to the collection. @param array|ChainProcessInterface $process
[ "Add", "a", "process", "to", "the", "collection", "." ]
d1c9743a4a7e5e63004be41d89175a05b3ea81b0
https://github.com/sroze/ChainOfResponsibility/blob/d1c9743a4a7e5e63004be41d89175a05b3ea81b0/ProcessCollection.php#L17-L31
29,392
locomotivemtl/charcoal-core
src/Charcoal/Source/ExpressionFieldTrait.php
ExpressionFieldTrait.setProperty
public function setProperty($property) { if ($property === null) { $this->property = $property; return $this; } if ($property instanceof PropertyInterface) { if (empty($property->ident())) { throw new InvalidArgumentException( ...
php
public function setProperty($property) { if ($property === null) { $this->property = $property; return $this; } if ($property instanceof PropertyInterface) { if (empty($property->ident())) { throw new InvalidArgumentException( ...
[ "public", "function", "setProperty", "(", "$", "property", ")", "{", "if", "(", "$", "property", "===", "null", ")", "{", "$", "this", "->", "property", "=", "$", "property", ";", "return", "$", "this", ";", "}", "if", "(", "$", "property", "instance...
Set model property key or source field key. @param string|PropertyInterface $property The related property. @throws InvalidArgumentException If the parameter is invalid. @return self
[ "Set", "model", "property", "key", "or", "source", "field", "key", "." ]
db3a7af547ccf96efe2d9be028b252bc8646f5d5
https://github.com/locomotivemtl/charcoal-core/blob/db3a7af547ccf96efe2d9be028b252bc8646f5d5/src/Charcoal/Source/ExpressionFieldTrait.php#L42-L74
29,393
locomotivemtl/charcoal-core
src/Charcoal/Source/ExpressionFieldTrait.php
ExpressionFieldTrait.setTable
public function setTable($table) { if ($table === null) { $this->table = $table; return $this; } if (!is_string($table)) { throw new InvalidArgumentException( 'Table reference must be a string.' ); } if ($table...
php
public function setTable($table) { if ($table === null) { $this->table = $table; return $this; } if (!is_string($table)) { throw new InvalidArgumentException( 'Table reference must be a string.' ); } if ($table...
[ "public", "function", "setTable", "(", "$", "table", ")", "{", "if", "(", "$", "table", "===", "null", ")", "{", "$", "this", "->", "table", "=", "$", "table", ";", "return", "$", "this", ";", "}", "if", "(", "!", "is_string", "(", "$", "table", ...
Set the reference to the table related to the field. @param string $table The table name or alias. @throws InvalidArgumentException If the parameter is not a string. @return self
[ "Set", "the", "reference", "to", "the", "table", "related", "to", "the", "field", "." ]
db3a7af547ccf96efe2d9be028b252bc8646f5d5
https://github.com/locomotivemtl/charcoal-core/blob/db3a7af547ccf96efe2d9be028b252bc8646f5d5/src/Charcoal/Source/ExpressionFieldTrait.php#L103-L124
29,394
locomotivemtl/charcoal-core
src/Charcoal/Source/ExpressionFieldTrait.php
ExpressionFieldTrait.hasFields
public function hasFields() { if ($this->hasProperty()) { $property = $this->property(); if ($property instanceof StorablePropertyInterface) { return (count($property->fieldNames()) > 0); } else { return true; } } ...
php
public function hasFields() { if ($this->hasProperty()) { $property = $this->property(); if ($property instanceof StorablePropertyInterface) { return (count($property->fieldNames()) > 0); } else { return true; } } ...
[ "public", "function", "hasFields", "(", ")", "{", "if", "(", "$", "this", "->", "hasProperty", "(", ")", ")", "{", "$", "property", "=", "$", "this", "->", "property", "(", ")", ";", "if", "(", "$", "property", "instanceof", "StorablePropertyInterface", ...
Determine if the model property has any fields. @return boolean
[ "Determine", "if", "the", "model", "property", "has", "any", "fields", "." ]
db3a7af547ccf96efe2d9be028b252bc8646f5d5
https://github.com/locomotivemtl/charcoal-core/blob/db3a7af547ccf96efe2d9be028b252bc8646f5d5/src/Charcoal/Source/ExpressionFieldTrait.php#L151-L163
29,395
locomotivemtl/charcoal-core
src/Charcoal/Source/ExpressionFieldTrait.php
ExpressionFieldTrait.fieldNames
public function fieldNames() { if ($this->hasProperty()) { $property = $this->property(); if ($property instanceof StorablePropertyInterface) { return $property->fieldNames(); } else { return [ $property ]; } } ...
php
public function fieldNames() { if ($this->hasProperty()) { $property = $this->property(); if ($property instanceof StorablePropertyInterface) { return $property->fieldNames(); } else { return [ $property ]; } } ...
[ "public", "function", "fieldNames", "(", ")", "{", "if", "(", "$", "this", "->", "hasProperty", "(", ")", ")", "{", "$", "property", "=", "$", "this", "->", "property", "(", ")", ";", "if", "(", "$", "property", "instanceof", "StorablePropertyInterface",...
Retrieve the model property's field names. @todo Load Property from associated model metadata. @return array
[ "Retrieve", "the", "model", "property", "s", "field", "names", "." ]
db3a7af547ccf96efe2d9be028b252bc8646f5d5
https://github.com/locomotivemtl/charcoal-core/blob/db3a7af547ccf96efe2d9be028b252bc8646f5d5/src/Charcoal/Source/ExpressionFieldTrait.php#L171-L183
29,396
locomotivemtl/charcoal-core
src/Charcoal/Source/ExpressionFieldTrait.php
ExpressionFieldTrait.fieldIdentifiers
public function fieldIdentifiers() { $identifiers = []; $tableName = $this->table(); $fieldNames = $this->fieldNames(); foreach ($fieldNames as $fieldName) { $identifiers[] = Expression::quoteIdentifier($fieldName, $tableName); } return $identifiers; ...
php
public function fieldIdentifiers() { $identifiers = []; $tableName = $this->table(); $fieldNames = $this->fieldNames(); foreach ($fieldNames as $fieldName) { $identifiers[] = Expression::quoteIdentifier($fieldName, $tableName); } return $identifiers; ...
[ "public", "function", "fieldIdentifiers", "(", ")", "{", "$", "identifiers", "=", "[", "]", ";", "$", "tableName", "=", "$", "this", "->", "table", "(", ")", ";", "$", "fieldNames", "=", "$", "this", "->", "fieldNames", "(", ")", ";", "foreach", "(",...
Retrieve the property's fully-qualified field names. @return string[]
[ "Retrieve", "the", "property", "s", "fully", "-", "qualified", "field", "names", "." ]
db3a7af547ccf96efe2d9be028b252bc8646f5d5
https://github.com/locomotivemtl/charcoal-core/blob/db3a7af547ccf96efe2d9be028b252bc8646f5d5/src/Charcoal/Source/ExpressionFieldTrait.php#L205-L215
29,397
locomotivemtl/charcoal-core
src/Charcoal/Source/ExpressionFieldTrait.php
ExpressionFieldTrait.fieldIdentifier
public function fieldIdentifier() { $tableName = $this->table(); $fieldName = $this->fieldName(); return Expression::quoteIdentifier($fieldName, $tableName); }
php
public function fieldIdentifier() { $tableName = $this->table(); $fieldName = $this->fieldName(); return Expression::quoteIdentifier($fieldName, $tableName); }
[ "public", "function", "fieldIdentifier", "(", ")", "{", "$", "tableName", "=", "$", "this", "->", "table", "(", ")", ";", "$", "fieldName", "=", "$", "this", "->", "fieldName", "(", ")", ";", "return", "Expression", "::", "quoteIdentifier", "(", "$", "...
Retrieve the fully-qualified field name. @return string
[ "Retrieve", "the", "fully", "-", "qualified", "field", "name", "." ]
db3a7af547ccf96efe2d9be028b252bc8646f5d5
https://github.com/locomotivemtl/charcoal-core/blob/db3a7af547ccf96efe2d9be028b252bc8646f5d5/src/Charcoal/Source/ExpressionFieldTrait.php#L222-L228
29,398
rinvex/cortex-tenants
src/Http/Controllers/Adminarea/TenantsMediaController.php
TenantsMediaController.index
public function index(Tenant $tenant, MediaDataTable $mediaDataTable) { return $mediaDataTable->with([ 'resource' => $tenant, 'tabs' => 'adminarea.tenants.tabs', 'id' => "adminarea-tenants-{$tenant->getRouteKey()}-media-table", 'url' => route('adminarea.tenant...
php
public function index(Tenant $tenant, MediaDataTable $mediaDataTable) { return $mediaDataTable->with([ 'resource' => $tenant, 'tabs' => 'adminarea.tenants.tabs', 'id' => "adminarea-tenants-{$tenant->getRouteKey()}-media-table", 'url' => route('adminarea.tenant...
[ "public", "function", "index", "(", "Tenant", "$", "tenant", ",", "MediaDataTable", "$", "mediaDataTable", ")", "{", "return", "$", "mediaDataTable", "->", "with", "(", "[", "'resource'", "=>", "$", "tenant", ",", "'tabs'", "=>", "'adminarea.tenants.tabs'", ",...
List tenant media. @param \Cortex\Tenants\Models\Tenant $tenant @param \Cortex\Foundation\DataTables\MediaDataTable $mediaDataTable @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
[ "List", "tenant", "media", "." ]
b837a3d14fd4cf6bfb35f41c61ef41ee9a05a34a
https://github.com/rinvex/cortex-tenants/blob/b837a3d14fd4cf6bfb35f41c61ef41ee9a05a34a/src/Http/Controllers/Adminarea/TenantsMediaController.php#L48-L56
29,399
rinvex/cortex-tenants
src/Http/Controllers/Adminarea/TenantsMediaController.php
TenantsMediaController.store
public function store(ImageFormRequest $request, Tenant $tenant): void { $tenant->addMediaFromRequest('file') ->sanitizingFileName(function ($fileName) { return md5($fileName).'.'.pathinfo($fileName, PATHINFO_EXTENSION); }) ->toMediaCollection(...
php
public function store(ImageFormRequest $request, Tenant $tenant): void { $tenant->addMediaFromRequest('file') ->sanitizingFileName(function ($fileName) { return md5($fileName).'.'.pathinfo($fileName, PATHINFO_EXTENSION); }) ->toMediaCollection(...
[ "public", "function", "store", "(", "ImageFormRequest", "$", "request", ",", "Tenant", "$", "tenant", ")", ":", "void", "{", "$", "tenant", "->", "addMediaFromRequest", "(", "'file'", ")", "->", "sanitizingFileName", "(", "function", "(", "$", "fileName", ")...
Store new tenant media. @param \Cortex\Foundation\Http\Requests\ImageFormRequest $request @param \Cortex\Tenants\Models\Tenant $tenant @return void
[ "Store", "new", "tenant", "media", "." ]
b837a3d14fd4cf6bfb35f41c61ef41ee9a05a34a
https://github.com/rinvex/cortex-tenants/blob/b837a3d14fd4cf6bfb35f41c61ef41ee9a05a34a/src/Http/Controllers/Adminarea/TenantsMediaController.php#L66-L73