id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
201,300
fridge-project/dbal
src/Fridge/DBAL/Schema/ForeignKey.php
ForeignKey.addForeignColumnName
public function addForeignColumnName($foreignColumnName) { if (!is_string($foreignColumnName) || (strlen($foreignColumnName) <= 0)) { throw SchemaException::invalidForeignKeyForeignColumnName($this->getName()); } $this->foreignColumnNames[] = $foreignColumnName; }
php
public function addForeignColumnName($foreignColumnName) { if (!is_string($foreignColumnName) || (strlen($foreignColumnName) <= 0)) { throw SchemaException::invalidForeignKeyForeignColumnName($this->getName()); } $this->foreignColumnNames[] = $foreignColumnName; }
[ "public", "function", "addForeignColumnName", "(", "$", "foreignColumnName", ")", "{", "if", "(", "!", "is_string", "(", "$", "foreignColumnName", ")", "||", "(", "strlen", "(", "$", "foreignColumnName", ")", "<=", "0", ")", ")", "{", "throw", "SchemaExcepti...
Adds a foreign column name to the foreign key. @param string $foreignColumnName The foreign column name to add. @throws \Fridge\DBAL\Exception\SchemaException If the foreign column name is not a valid string.
[ "Adds", "a", "foreign", "column", "name", "to", "the", "foreign", "key", "." ]
d0b8c3551922d696836487aa0eb1bd74014edcd4
https://github.com/fridge-project/dbal/blob/d0b8c3551922d696836487aa0eb1bd74014edcd4/src/Fridge/DBAL/Schema/ForeignKey.php#L176-L183
201,301
JoeBengalen/Config
src/AbstractConfig.php
AbstractConfig.setDotNotationKey
protected function setDotNotationKey($key, $value) { $splitKey = explode('.', $key); $root = &$this->data; // Look for the key, creating nested keys if needed while ($part = array_shift($splitKey)) { if (!isset($root[$part]) && count($splitKey)) { $roo...
php
protected function setDotNotationKey($key, $value) { $splitKey = explode('.', $key); $root = &$this->data; // Look for the key, creating nested keys if needed while ($part = array_shift($splitKey)) { if (!isset($root[$part]) && count($splitKey)) { $roo...
[ "protected", "function", "setDotNotationKey", "(", "$", "key", ",", "$", "value", ")", "{", "$", "splitKey", "=", "explode", "(", "'.'", ",", "$", "key", ")", ";", "$", "root", "=", "&", "$", "this", "->", "data", ";", "// Look for the key, creating nest...
Handle setting a configuration value with a dot notation key. @param string $key Dot notation key. @param mixed $value Configuration value.
[ "Handle", "setting", "a", "configuration", "value", "with", "a", "dot", "notation", "key", "." ]
1a13f3153374224aad52da4669bd69655f037546
https://github.com/JoeBengalen/Config/blob/1a13f3153374224aad52da4669bd69655f037546/src/AbstractConfig.php#L141-L154
201,302
Hnto/nuki
src/Drivers/PDO.php
PDO.compileAndSetName
private function compileAndSetName() { $name = \Nuki\Handlers\Core\Assist::classNameShort($this); $this->name = strtolower($name); }
php
private function compileAndSetName() { $name = \Nuki\Handlers\Core\Assist::classNameShort($this); $this->name = strtolower($name); }
[ "private", "function", "compileAndSetName", "(", ")", "{", "$", "name", "=", "\\", "Nuki", "\\", "Handlers", "\\", "Core", "\\", "Assist", "::", "classNameShort", "(", "$", "this", ")", ";", "$", "this", "->", "name", "=", "strtolower", "(", "$", "name...
Private function to compile and set the driver name
[ "Private", "function", "to", "compile", "and", "set", "the", "driver", "name" ]
c3fb16244e8d611c335a88e3b9c9ee7d81fafc0c
https://github.com/Hnto/nuki/blob/c3fb16244e8d611c335a88e3b9c9ee7d81fafc0c/src/Drivers/PDO.php#L70-L74
201,303
theopera/framework
src/App/Command/InstallCommand.php
InstallCommand.isAlreadyInstalled
private function isAlreadyInstalled() : bool { $public = new SplFileInfo(self::PROJECT_ROOT . '/public'); $src = new SplFileInfo(self::PROJECT_ROOT . '/src'); return $public->isDir() && $src->isDir(); }
php
private function isAlreadyInstalled() : bool { $public = new SplFileInfo(self::PROJECT_ROOT . '/public'); $src = new SplFileInfo(self::PROJECT_ROOT . '/src'); return $public->isDir() && $src->isDir(); }
[ "private", "function", "isAlreadyInstalled", "(", ")", ":", "bool", "{", "$", "public", "=", "new", "SplFileInfo", "(", "self", "::", "PROJECT_ROOT", ".", "'/public'", ")", ";", "$", "src", "=", "new", "SplFileInfo", "(", "self", "::", "PROJECT_ROOT", ".",...
Finds out if the framework has already been installed @return bool
[ "Finds", "out", "if", "the", "framework", "has", "already", "been", "installed" ]
fa6165d3891a310faa580c81dee49a63c150c711
https://github.com/theopera/framework/blob/fa6165d3891a310faa580c81dee49a63c150c711/src/App/Command/InstallCommand.php#L102-L108
201,304
theopera/framework
src/App/Command/InstallCommand.php
InstallCommand.modifyComposerFile
private function modifyComposerFile() { if (!is_writeable('composer.json')) { throw new Exception('Make sure a composer.json file exists and is writable'); } $json = file_get_contents('composer.json'); $composer = json_decode($json); if (!isset($composer->autolo...
php
private function modifyComposerFile() { if (!is_writeable('composer.json')) { throw new Exception('Make sure a composer.json file exists and is writable'); } $json = file_get_contents('composer.json'); $composer = json_decode($json); if (!isset($composer->autolo...
[ "private", "function", "modifyComposerFile", "(", ")", "{", "if", "(", "!", "is_writeable", "(", "'composer.json'", ")", ")", "{", "throw", "new", "Exception", "(", "'Make sure a composer.json file exists and is writable'", ")", ";", "}", "$", "json", "=", "file_g...
Modifies the composer file - Add the new project namespace to the autoload list
[ "Modifies", "the", "composer", "file", "-", "Add", "the", "new", "project", "namespace", "to", "the", "autoload", "list" ]
fa6165d3891a310faa580c81dee49a63c150c711
https://github.com/theopera/framework/blob/fa6165d3891a310faa580c81dee49a63c150c711/src/App/Command/InstallCommand.php#L183-L202
201,305
RocketPropelledTortoise/Core
src/Utilities/Format.php
Format.getReadableSize
public static function getReadableSize($bytes) { $unit = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; $exp = floor(log($bytes, 1024)) | 0; return round($bytes / (pow(1024, $exp)), 2) . " $unit[$exp]"; }
php
public static function getReadableSize($bytes) { $unit = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; $exp = floor(log($bytes, 1024)) | 0; return round($bytes / (pow(1024, $exp)), 2) . " $unit[$exp]"; }
[ "public", "static", "function", "getReadableSize", "(", "$", "bytes", ")", "{", "$", "unit", "=", "[", "'B'", ",", "'KB'", ",", "'MB'", ",", "'GB'", ",", "'TB'", ",", "'PB'", ",", "'EB'", ",", "'ZB'", ",", "'YB'", "]", ";", "$", "exp", "=", "floo...
Get file size with correct extension @param int $bytes @return string
[ "Get", "file", "size", "with", "correct", "extension" ]
78b65663fc463e21e494257140ddbed0a9ccb3c3
https://github.com/RocketPropelledTortoise/Core/blob/78b65663fc463e21e494257140ddbed0a9ccb3c3/src/Utilities/Format.php#L19-L25
201,306
wb-crowdfusion/crowdfusion
system/core/classes/libraries/validation/AbstractValidator.php
AbstractValidator.validateFor
public function validateFor($context) { $this->errors = new Errors(); // create camelized method name $methodResolved = ActionUtils::parseMethod($context); // check method exists if(!method_exists($this, $methodResolved)) throw new Exception('Method ['.$methodR...
php
public function validateFor($context) { $this->errors = new Errors(); // create camelized method name $methodResolved = ActionUtils::parseMethod($context); // check method exists if(!method_exists($this, $methodResolved)) throw new Exception('Method ['.$methodR...
[ "public", "function", "validateFor", "(", "$", "context", ")", "{", "$", "this", "->", "errors", "=", "new", "Errors", "(", ")", ";", "// create camelized method name", "$", "methodResolved", "=", "ActionUtils", "::", "parseMethod", "(", "$", "context", ")", ...
This method is called to perform validation @param string $context A string representing the name of the context in which the validation occurs. For example: 'add', 'edit', 'delete', etc. @param mixed $arg, $arg, ... Using func_get_args() these arguments will be passed to the validator function invoked by this...
[ "This", "method", "is", "called", "to", "perform", "validation" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/libraries/validation/AbstractValidator.php#L77-L101
201,307
nemundo/core
src/Type/Geo/GeoCoordinateAltitude.php
GeoCoordinateAltitude.fromGeoCoordinate
public function fromGeoCoordinate(GeoCoordinate $geoCoordinate = null) { if ($geoCoordinate !== null) { $this->latitude = $geoCoordinate->latitude; $this->longitude = $geoCoordinate->longitude; } return $this; }
php
public function fromGeoCoordinate(GeoCoordinate $geoCoordinate = null) { if ($geoCoordinate !== null) { $this->latitude = $geoCoordinate->latitude; $this->longitude = $geoCoordinate->longitude; } return $this; }
[ "public", "function", "fromGeoCoordinate", "(", "GeoCoordinate", "$", "geoCoordinate", "=", "null", ")", "{", "if", "(", "$", "geoCoordinate", "!==", "null", ")", "{", "$", "this", "->", "latitude", "=", "$", "geoCoordinate", "->", "latitude", ";", "$", "t...
= 0;
[ "=", "0", ";" ]
5ca14889fdfb9155b52fedb364b34502d14e21ed
https://github.com/nemundo/core/blob/5ca14889fdfb9155b52fedb364b34502d14e21ed/src/Type/Geo/GeoCoordinateAltitude.php#L15-L22
201,308
hiqdev/minii-helpers
src/BaseFileHelper.php
BaseFileHelper.getExtensionsByMimeType
public static function getExtensionsByMimeType($mimeType, $magicFile = null) { $mimeTypes = static::loadMimeTypes($magicFile); return array_keys($mimeTypes, mb_strtolower($mimeType, 'utf-8'), true); }
php
public static function getExtensionsByMimeType($mimeType, $magicFile = null) { $mimeTypes = static::loadMimeTypes($magicFile); return array_keys($mimeTypes, mb_strtolower($mimeType, 'utf-8'), true); }
[ "public", "static", "function", "getExtensionsByMimeType", "(", "$", "mimeType", ",", "$", "magicFile", "=", "null", ")", "{", "$", "mimeTypes", "=", "static", "::", "loadMimeTypes", "(", "$", "magicFile", ")", ";", "return", "array_keys", "(", "$", "mimeTyp...
Determines the extensions by given MIME type. This method will use a local map between extension names and MIME types. @param string $mimeType file MIME type. @param string $magicFile the path (or alias) of the file that contains all available MIME type information. If this is not set, the file specified by [[mimeMagic...
[ "Determines", "the", "extensions", "by", "given", "MIME", "type", ".", "This", "method", "will", "use", "a", "local", "map", "between", "extension", "names", "and", "MIME", "types", "." ]
001b7a56a6ebdc432c4683fe47c00a913f8e57d7
https://github.com/hiqdev/minii-helpers/blob/001b7a56a6ebdc432c4683fe47c00a913f8e57d7/src/BaseFileHelper.php#L188-L192
201,309
hiqdev/minii-helpers
src/BaseFileHelper.php
BaseFileHelper.matchBasename
private static function matchBasename($baseName, $pattern, $firstWildcard, $flags) { if ($firstWildcard === false) { if ($pattern === $baseName) { return true; } } elseif ($flags & self::PATTERN_ENDSWITH) { /* "*literal" matching against "foolitera...
php
private static function matchBasename($baseName, $pattern, $firstWildcard, $flags) { if ($firstWildcard === false) { if ($pattern === $baseName) { return true; } } elseif ($flags & self::PATTERN_ENDSWITH) { /* "*literal" matching against "foolitera...
[ "private", "static", "function", "matchBasename", "(", "$", "baseName", ",", "$", "pattern", ",", "$", "firstWildcard", ",", "$", "flags", ")", "{", "if", "(", "$", "firstWildcard", "===", "false", ")", "{", "if", "(", "$", "pattern", "===", "$", "base...
Performs a simple comparison of file or directory names. Based on match_basename() from dir.c of git 1.8.5.3 sources. @param string $baseName file or directory name to compare with the pattern @param string $pattern the pattern that $baseName will be compared against @param integer|boolean $firstWildcard location of ...
[ "Performs", "a", "simple", "comparison", "of", "file", "or", "directory", "names", "." ]
001b7a56a6ebdc432c4683fe47c00a913f8e57d7
https://github.com/hiqdev/minii-helpers/blob/001b7a56a6ebdc432c4683fe47c00a913f8e57d7/src/BaseFileHelper.php#L482-L502
201,310
hiqdev/minii-helpers
src/BaseFileHelper.php
BaseFileHelper.matchPathname
private static function matchPathname($path, $basePath, $pattern, $firstWildcard, $flags) { // match with FNM_PATHNAME; the pattern has base implicitly in front of it. if (isset($pattern[0]) && $pattern[0] == '/') { $pattern = StringHelper::byteSubstr($pattern, 1, StringHelper::byteLengt...
php
private static function matchPathname($path, $basePath, $pattern, $firstWildcard, $flags) { // match with FNM_PATHNAME; the pattern has base implicitly in front of it. if (isset($pattern[0]) && $pattern[0] == '/') { $pattern = StringHelper::byteSubstr($pattern, 1, StringHelper::byteLengt...
[ "private", "static", "function", "matchPathname", "(", "$", "path", ",", "$", "basePath", ",", "$", "pattern", ",", "$", "firstWildcard", ",", "$", "flags", ")", "{", "// match with FNM_PATHNAME; the pattern has base implicitly in front of it.", "if", "(", "isset", ...
Compares a path part against a pattern with optional wildcards. Based on match_pathname() from dir.c of git 1.8.5.3 sources. @param string $path full path to compare @param string $basePath base of path that will not be compared @param string $pattern the pattern that path part will be compared against @param integer...
[ "Compares", "a", "path", "part", "against", "a", "pattern", "with", "optional", "wildcards", "." ]
001b7a56a6ebdc432c4683fe47c00a913f8e57d7
https://github.com/hiqdev/minii-helpers/blob/001b7a56a6ebdc432c4683fe47c00a913f8e57d7/src/BaseFileHelper.php#L516-L556
201,311
rollerworks/search-core
Value/ValuesGroup.php
ValuesGroup.countValues
public function countValues(): int { $count = 0; foreach ($this->fields as $field) { $count += $field->count(); } return $count; }
php
public function countValues(): int { $count = 0; foreach ($this->fields as $field) { $count += $field->count(); } return $count; }
[ "public", "function", "countValues", "(", ")", ":", "int", "{", "$", "count", "=", "0", ";", "foreach", "(", "$", "this", "->", "fields", "as", "$", "field", ")", "{", "$", "count", "+=", "$", "field", "->", "count", "(", ")", ";", "}", "return",...
Gets the total number of values in the fields list structure.
[ "Gets", "the", "total", "number", "of", "values", "in", "the", "fields", "list", "structure", "." ]
6b5671b8c4d6298906ded768261b0a59845140fb
https://github.com/rollerworks/search-core/blob/6b5671b8c4d6298906ded768261b0a59845140fb/Value/ValuesGroup.php#L152-L161
201,312
DoSomething/mb-toolbox
src/MB_Slack.php
MB_Slack.lookupChannelKey
private function lookupChannelKey($channelName) { if ($channelName == '#niche_monitoring') { $channelKey = $this->slackConfig['webhookURL_niche_monitoring']; } elseif ($channelName == '#after-school-internal') { $channelKey = $this->slackConfig['webhookURL_after-school-internal']; } else { ...
php
private function lookupChannelKey($channelName) { if ($channelName == '#niche_monitoring') { $channelKey = $this->slackConfig['webhookURL_niche_monitoring']; } elseif ($channelName == '#after-school-internal') { $channelKey = $this->slackConfig['webhookURL_after-school-internal']; } else { ...
[ "private", "function", "lookupChannelKey", "(", "$", "channelName", ")", "{", "if", "(", "$", "channelName", "==", "'#niche_monitoring'", ")", "{", "$", "channelKey", "=", "$", "this", "->", "slackConfig", "[", "'webhookURL_niche_monitoring'", "]", ";", "}", "...
Lookup channel key value based on channel name. @param string $channelName The name of the channel. @return string $channelKey A key value based on the channel name.
[ "Lookup", "channel", "key", "value", "based", "on", "channel", "name", "." ]
ceec5fc594bae137d1ab1f447344800343b62ac6
https://github.com/DoSomething/mb-toolbox/blob/ceec5fc594bae137d1ab1f447344800343b62ac6/src/MB_Slack.php#L59-L71
201,313
DoSomething/mb-toolbox
src/MB_Slack.php
MB_Slack.alert
public function alert($channelNames, $message, $tos = ['@dee']) { $to = implode(',', $tos); foreach ($channelNames as $channelName) { $channelKey = $this->lookupChannelKey($channelName); $slack = new Client($channelKey); $slack->to($to)->attach($message)->send(); $this->statHat->ezCou...
php
public function alert($channelNames, $message, $tos = ['@dee']) { $to = implode(',', $tos); foreach ($channelNames as $channelName) { $channelKey = $this->lookupChannelKey($channelName); $slack = new Client($channelKey); $slack->to($to)->attach($message)->send(); $this->statHat->ezCou...
[ "public", "function", "alert", "(", "$", "channelNames", ",", "$", "message", ",", "$", "tos", "=", "[", "'@dee'", "]", ")", "{", "$", "to", "=", "implode", "(", "','", ",", "$", "tos", ")", ";", "foreach", "(", "$", "channelNames", "as", "$", "c...
Send report to Slack. $param array $to Comma separated list of Slack channels ("#") and/or users ("@") to send message to. @param string $message List of message attachment options. https://github.com/maknz/slack#send-an-attachment-with-fields @param array $channelNames The name of the channel to send the message to.
[ "Send", "report", "to", "Slack", "." ]
ceec5fc594bae137d1ab1f447344800343b62ac6
https://github.com/DoSomething/mb-toolbox/blob/ceec5fc594bae137d1ab1f447344800343b62ac6/src/MB_Slack.php#L83-L93
201,314
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Bundle/FrameworkExtraBundle/Controller/RestApiControllerTrait.php
RestApiControllerTrait.createJsonResponse
protected function createJsonResponse($data = null, $scope = null, $status = 200) { if ($data !== null) { $data = is_string($data) ? $data : $this->container->get('serializer')->serialize( $data, 'json', empty($scope) ? array() : array('scope' ...
php
protected function createJsonResponse($data = null, $scope = null, $status = 200) { if ($data !== null) { $data = is_string($data) ? $data : $this->container->get('serializer')->serialize( $data, 'json', empty($scope) ? array() : array('scope' ...
[ "protected", "function", "createJsonResponse", "(", "$", "data", "=", "null", ",", "$", "scope", "=", "null", ",", "$", "status", "=", "200", ")", "{", "if", "(", "$", "data", "!==", "null", ")", "{", "$", "data", "=", "is_string", "(", "$", "data"...
Create a JsonResponse with given data, if object given, it will be serialize with registered serializer. @param mixed $data @param string $scope @param int $status @return Response
[ "Create", "a", "JsonResponse", "with", "given", "data", "if", "object", "given", "it", "will", "be", "serialize", "with", "registered", "serializer", "." ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Bundle/FrameworkExtraBundle/Controller/RestApiControllerTrait.php#L34-L49
201,315
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Bundle/FrameworkExtraBundle/Controller/RestApiControllerTrait.php
RestApiControllerTrait.createJsonBadRequestResponse
protected function createJsonBadRequestResponse(array $errors = array()) { // try to extract proper validation errors foreach ($errors as $key => $error) { if (!$error instanceof FormError) { continue; } $errors['errors'][$key] = array( ...
php
protected function createJsonBadRequestResponse(array $errors = array()) { // try to extract proper validation errors foreach ($errors as $key => $error) { if (!$error instanceof FormError) { continue; } $errors['errors'][$key] = array( ...
[ "protected", "function", "createJsonBadRequestResponse", "(", "array", "$", "errors", "=", "array", "(", ")", ")", "{", "// try to extract proper validation errors", "foreach", "(", "$", "errors", "as", "$", "key", "=>", "$", "error", ")", "{", "if", "(", "!",...
create and returns a 400 Bad Request response. @param array $errors @return JsonResponse
[ "create", "and", "returns", "a", "400", "Bad", "Request", "response", "." ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Bundle/FrameworkExtraBundle/Controller/RestApiControllerTrait.php#L71-L93
201,316
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Bundle/FrameworkExtraBundle/Controller/RestApiControllerTrait.php
RestApiControllerTrait.getRequestData
protected function getRequestData(Request $request, $inflection = 'camelize') { switch ($request->headers->get('content-type')) { case 'application/json': if (!($data = @json_decode($request->getContent(), true)) && ($error = json_last_error()) != JSON_ERROR_...
php
protected function getRequestData(Request $request, $inflection = 'camelize') { switch ($request->headers->get('content-type')) { case 'application/json': if (!($data = @json_decode($request->getContent(), true)) && ($error = json_last_error()) != JSON_ERROR_...
[ "protected", "function", "getRequestData", "(", "Request", "$", "request", ",", "$", "inflection", "=", "'camelize'", ")", "{", "switch", "(", "$", "request", "->", "headers", "->", "get", "(", "'content-type'", ")", ")", "{", "case", "'application/json'", "...
Retrieve given request data depending on its content type. @param Request $request @param string $inflection optional inflector to tuse on parameter keys @return array @throws HttpException if JSON content-type and invalid JSON data
[ "Retrieve", "given", "request", "data", "depending", "on", "its", "content", "type", "." ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Bundle/FrameworkExtraBundle/Controller/RestApiControllerTrait.php#L105-L134
201,317
Linkvalue-Interne/MajoraFrameworkExtraBundle
src/Majora/Bundle/FrameworkExtraBundle/Controller/RestApiControllerTrait.php
RestApiControllerTrait.assertSubmitedFormIsValid
protected function assertSubmitedFormIsValid(Request $request, FormInterface $form) { $form->submit( $this->getRequestData($request), $request->getMethod() !== 'PATCH' ); if (!$valid = $form->isValid()) { throw new ValidationException( $fo...
php
protected function assertSubmitedFormIsValid(Request $request, FormInterface $form) { $form->submit( $this->getRequestData($request), $request->getMethod() !== 'PATCH' ); if (!$valid = $form->isValid()) { throw new ValidationException( $fo...
[ "protected", "function", "assertSubmitedFormIsValid", "(", "Request", "$", "request", ",", "FormInterface", "$", "form", ")", "{", "$", "form", "->", "submit", "(", "$", "this", "->", "getRequestData", "(", "$", "request", ")", ",", "$", "request", "->", "...
Custom method for form submission to handle http method bugs, and extra fields error options. @param Request $request @param FormInterface $form @throws HttpException if invalid json data @throws ValidationException if invalid form
[ "Custom", "method", "for", "form", "submission", "to", "handle", "http", "method", "bugs", "and", "extra", "fields", "error", "options", "." ]
6f368380cfc39d27fafb0844e9a53b4d86d7c034
https://github.com/Linkvalue-Interne/MajoraFrameworkExtraBundle/blob/6f368380cfc39d27fafb0844e9a53b4d86d7c034/src/Majora/Bundle/FrameworkExtraBundle/Controller/RestApiControllerTrait.php#L146-L159
201,318
Becklyn/Gluggi
src/Application/LayoutApplication.php
LayoutApplication.bootstrap
public function bootstrap ($webDir, array $config = []) { $baseDir = dirname($webDir); $this["gluggi.config"] = $this->resolveConfig($config); $this["gluggi.baseDir"] = $baseDir; $this->registerProviders(); $this->registerCoreTwigNamespace(); $this->registerModelsAnd...
php
public function bootstrap ($webDir, array $config = []) { $baseDir = dirname($webDir); $this["gluggi.config"] = $this->resolveConfig($config); $this["gluggi.baseDir"] = $baseDir; $this->registerProviders(); $this->registerCoreTwigNamespace(); $this->registerModelsAnd...
[ "public", "function", "bootstrap", "(", "$", "webDir", ",", "array", "$", "config", "=", "[", "]", ")", "{", "$", "baseDir", "=", "dirname", "(", "$", "webDir", ")", ";", "$", "this", "[", "\"gluggi.config\"", "]", "=", "$", "this", "->", "resolveCon...
Bootstraps the complete application @param string $webDir the path to the web dir @param array $config the config
[ "Bootstraps", "the", "complete", "application" ]
837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786
https://github.com/Becklyn/Gluggi/blob/837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786/src/Application/LayoutApplication.php#L31-L43
201,319
Becklyn/Gluggi
src/Application/LayoutApplication.php
LayoutApplication.registerProviders
private function registerProviders () { $this->register(new TwigServiceProvider()); $this->register(new UrlGeneratorServiceProvider()); $this->register(new ServiceControllerServiceProvider()); }
php
private function registerProviders () { $this->register(new TwigServiceProvider()); $this->register(new UrlGeneratorServiceProvider()); $this->register(new ServiceControllerServiceProvider()); }
[ "private", "function", "registerProviders", "(", ")", "{", "$", "this", "->", "register", "(", "new", "TwigServiceProvider", "(", ")", ")", ";", "$", "this", "->", "register", "(", "new", "UrlGeneratorServiceProvider", "(", ")", ")", ";", "$", "this", "->"...
Registers all used service providers
[ "Registers", "all", "used", "service", "providers" ]
837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786
https://github.com/Becklyn/Gluggi/blob/837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786/src/Application/LayoutApplication.php#L49-L54
201,320
Becklyn/Gluggi
src/Application/LayoutApplication.php
LayoutApplication.registerModelsAndTwigLayoutNamespaces
private function registerModelsAndTwigLayoutNamespaces ($baseDir) { $elementTypesModel = new ElementTypesModel($baseDir); // model $this["model.element_types"] = $elementTypesModel; $this["model.download"] = new DownloadModel($baseDir); // twig template namespaces ...
php
private function registerModelsAndTwigLayoutNamespaces ($baseDir) { $elementTypesModel = new ElementTypesModel($baseDir); // model $this["model.element_types"] = $elementTypesModel; $this["model.download"] = new DownloadModel($baseDir); // twig template namespaces ...
[ "private", "function", "registerModelsAndTwigLayoutNamespaces", "(", "$", "baseDir", ")", "{", "$", "elementTypesModel", "=", "new", "ElementTypesModel", "(", "$", "baseDir", ")", ";", "// model", "$", "this", "[", "\"model.element_types\"", "]", "=", "$", "elemen...
Registers all models and all twig layout namespaces @param string $baseDir
[ "Registers", "all", "models", "and", "all", "twig", "layout", "namespaces" ]
837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786
https://github.com/Becklyn/Gluggi/blob/837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786/src/Application/LayoutApplication.php#L71-L87
201,321
Becklyn/Gluggi
src/Application/LayoutApplication.php
LayoutApplication.registerTwigExtensions
private function registerTwigExtensions () { $this['twig'] = $this->share($this->extend('twig', function (Twig_Environment $twig, Application $app) { // add custom extension $twig->addExtension(new TwigExtension($app)); // add global g...
php
private function registerTwigExtensions () { $this['twig'] = $this->share($this->extend('twig', function (Twig_Environment $twig, Application $app) { // add custom extension $twig->addExtension(new TwigExtension($app)); // add global g...
[ "private", "function", "registerTwigExtensions", "(", ")", "{", "$", "this", "[", "'twig'", "]", "=", "$", "this", "->", "share", "(", "$", "this", "->", "extend", "(", "'twig'", ",", "function", "(", "Twig_Environment", "$", "twig", ",", "Application", ...
Registers all used twig extensions
[ "Registers", "all", "used", "twig", "extensions" ]
837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786
https://github.com/Becklyn/Gluggi/blob/837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786/src/Application/LayoutApplication.php#L106-L122
201,322
Becklyn/Gluggi
src/Application/LayoutApplication.php
LayoutApplication.defineCoreRouting
private function defineCoreRouting () { $this->get("/", "controller.core:indexAction")->bind("index"); $this->get("/all/{elementType}", "controller.core:elementsOverviewAction")->bind("elements_overview"); $this->get("/{elementType}/{key}", "controller.core:showElementAc...
php
private function defineCoreRouting () { $this->get("/", "controller.core:indexAction")->bind("index"); $this->get("/all/{elementType}", "controller.core:elementsOverviewAction")->bind("elements_overview"); $this->get("/{elementType}/{key}", "controller.core:showElementAc...
[ "private", "function", "defineCoreRouting", "(", ")", "{", "$", "this", "->", "get", "(", "\"/\"", ",", "\"controller.core:indexAction\"", ")", "->", "bind", "(", "\"index\"", ")", ";", "$", "this", "->", "get", "(", "\"/all/{elementType}\"", ",", "\"controlle...
Defines the routes of the core app
[ "Defines", "the", "routes", "of", "the", "core", "app" ]
837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786
https://github.com/Becklyn/Gluggi/blob/837e7ee8d34f5b16a7f1ef53ca64b1ea8722b786/src/Application/LayoutApplication.php#L128-L133
201,323
sil-project/VarietyBundle
src/Entity/Species.php
Species.setGenus
public function setGenus(\Librinfo\VarietiesBundle\Entity\Genus $genus = null) { $this->genus = $genus; return $this; }
php
public function setGenus(\Librinfo\VarietiesBundle\Entity\Genus $genus = null) { $this->genus = $genus; return $this; }
[ "public", "function", "setGenus", "(", "\\", "Librinfo", "\\", "VarietiesBundle", "\\", "Entity", "\\", "Genus", "$", "genus", "=", "null", ")", "{", "$", "this", "->", "genus", "=", "$", "genus", ";", "return", "$", "this", ";", "}" ]
Set genus. @param \Librinfo\VarietiesBundle\Entity\Genus $genus @return Species
[ "Set", "genus", "." ]
e9508ce13a4bb277d10bdcd925fdb84bc01f453f
https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Species.php#L373-L378
201,324
sil-project/VarietyBundle
src/Entity/Species.php
Species.addSubspecies
public function addSubspecies(\Librinfo\VarietiesBundle\Entity\Species $subspecies) { $subspecies->setParentSpecies($this); $this->subspecieses[] = $subspecies; return $this; }
php
public function addSubspecies(\Librinfo\VarietiesBundle\Entity\Species $subspecies) { $subspecies->setParentSpecies($this); $this->subspecieses[] = $subspecies; return $this; }
[ "public", "function", "addSubspecies", "(", "\\", "Librinfo", "\\", "VarietiesBundle", "\\", "Entity", "\\", "Species", "$", "subspecies", ")", "{", "$", "subspecies", "->", "setParentSpecies", "(", "$", "this", ")", ";", "$", "this", "->", "subspecieses", "...
Add subspecies. @param \Librinfo\VarietiesBundle\Entity\Species $subspecies @return Species
[ "Add", "subspecies", "." ]
e9508ce13a4bb277d10bdcd925fdb84bc01f453f
https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Species.php#L434-L440
201,325
sil-project/VarietyBundle
src/Entity/Species.php
Species.removeSubspeciese
public function removeSubspeciese(\Librinfo\VarietiesBundle\Entity\Species $subspecies) { return $this->subspecieses->removeElement($subspecies); }
php
public function removeSubspeciese(\Librinfo\VarietiesBundle\Entity\Species $subspecies) { return $this->subspecieses->removeElement($subspecies); }
[ "public", "function", "removeSubspeciese", "(", "\\", "Librinfo", "\\", "VarietiesBundle", "\\", "Entity", "\\", "Species", "$", "subspecies", ")", "{", "return", "$", "this", "->", "subspecieses", "->", "removeElement", "(", "$", "subspecies", ")", ";", "}" ]
Remove subspecies. @param \Librinfo\VarietiesBundle\Entity\Species $subspecies @return bool tRUE if this collection contained the specified element, FALSE otherwise
[ "Remove", "subspecies", "." ]
e9508ce13a4bb277d10bdcd925fdb84bc01f453f
https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Species.php#L449-L452
201,326
sil-project/VarietyBundle
src/Entity/Species.php
Species.setParentSpecies
public function setParentSpecies(\Librinfo\VarietiesBundle\Entity\Species $parentSpecies = null) { $this->parent_species = $parentSpecies; return $this; }
php
public function setParentSpecies(\Librinfo\VarietiesBundle\Entity\Species $parentSpecies = null) { $this->parent_species = $parentSpecies; return $this; }
[ "public", "function", "setParentSpecies", "(", "\\", "Librinfo", "\\", "VarietiesBundle", "\\", "Entity", "\\", "Species", "$", "parentSpecies", "=", "null", ")", "{", "$", "this", "->", "parent_species", "=", "$", "parentSpecies", ";", "return", "$", "this", ...
Set parentSpecies. @param \Librinfo\VarietiesBundle\Entity\Species $parentSpecies @return Species
[ "Set", "parentSpecies", "." ]
e9508ce13a4bb277d10bdcd925fdb84bc01f453f
https://github.com/sil-project/VarietyBundle/blob/e9508ce13a4bb277d10bdcd925fdb84bc01f453f/src/Entity/Species.php#L481-L486
201,327
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.setOffset
public function setOffset($offset) { $this->checkStreamAvailable(); fseek($this->fileDescriptor, $offset < 0 ? $this->getSize() + $offset : $offset); }
php
public function setOffset($offset) { $this->checkStreamAvailable(); fseek($this->fileDescriptor, $offset < 0 ? $this->getSize() + $offset : $offset); }
[ "public", "function", "setOffset", "(", "$", "offset", ")", "{", "$", "this", "->", "checkStreamAvailable", "(", ")", ";", "fseek", "(", "$", "this", "->", "fileDescriptor", ",", "$", "offset", "<", "0", "?", "$", "this", "->", "getSize", "(", ")", "...
Sets the point of operation, ie the cursor offset value. The offset may also be set to a negative value when it is interpreted as an offset from the end of the stream instead of the beginning. @param integer $offset The new point of operation. @return void @throws InvalidStreamException if an I/O error occurs
[ "Sets", "the", "point", "of", "operation", "ie", "the", "cursor", "offset", "value", ".", "The", "offset", "may", "also", "be", "set", "to", "a", "negative", "value", "when", "it", "is", "interpreted", "as", "an", "offset", "from", "the", "end", "of", ...
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L111-L115
201,328
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.readInt16LE
final public function readInt16LE() { if ($this->isBigEndian()) { return $this->fromInt16(strrev($this->read(2))); } else { return $this->fromInt16($this->read(2)); } }
php
final public function readInt16LE() { if ($this->isBigEndian()) { return $this->fromInt16(strrev($this->read(2))); } else { return $this->fromInt16($this->read(2)); } }
[ "final", "public", "function", "readInt16LE", "(", ")", "{", "if", "(", "$", "this", "->", "isBigEndian", "(", ")", ")", "{", "return", "$", "this", "->", "fromInt16", "(", "strrev", "(", "$", "this", "->", "read", "(", "2", ")", ")", ")", ";", "...
Reads 2 bytes from the stream and returns little-endian ordered binary data as signed 16-bit integer. @return integer @throws InvalidStreamException if an I/O error occurs
[ "Reads", "2", "bytes", "from", "the", "stream", "and", "returns", "little", "-", "endian", "ordered", "binary", "data", "as", "signed", "16", "-", "bit", "integer", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L224-L231
201,329
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.readInt16BE
final public function readInt16BE() { if ($this->isLittleEndian()) { return $this->fromInt16(strrev($this->read(2))); } else { return $this->fromInt16($this->read(2)); } }
php
final public function readInt16BE() { if ($this->isLittleEndian()) { return $this->fromInt16(strrev($this->read(2))); } else { return $this->fromInt16($this->read(2)); } }
[ "final", "public", "function", "readInt16BE", "(", ")", "{", "if", "(", "$", "this", "->", "isLittleEndian", "(", ")", ")", "{", "return", "$", "this", "->", "fromInt16", "(", "strrev", "(", "$", "this", "->", "read", "(", "2", ")", ")", ")", ";", ...
Reads 2 bytes from the stream and returns big-endian ordered binary data as signed 16-bit integer. @return integer @throws InvalidStreamException if an I/O error occurs
[ "Reads", "2", "bytes", "from", "the", "stream", "and", "returns", "big", "-", "endian", "ordered", "binary", "data", "as", "signed", "16", "-", "bit", "integer", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L240-L247
201,330
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.fromUInt16
private function fromUInt16($value, $order = 0) { list(, $int) = unpack( ($order == self::BIG_ENDIAN_ORDER ? 'n' : ($order == self::LITTLE_ENDIAN_ORDER ? 'v' : 'S')) . '*', $value ); return $int; }
php
private function fromUInt16($value, $order = 0) { list(, $int) = unpack( ($order == self::BIG_ENDIAN_ORDER ? 'n' : ($order == self::LITTLE_ENDIAN_ORDER ? 'v' : 'S')) . '*', $value ); return $int; }
[ "private", "function", "fromUInt16", "(", "$", "value", ",", "$", "order", "=", "0", ")", "{", "list", "(", ",", "$", "int", ")", "=", "unpack", "(", "(", "$", "order", "==", "self", "::", "BIG_ENDIAN_ORDER", "?", "'n'", ":", "(", "$", "order", "...
Returns machine endian ordered binary data as unsigned 16-bit integer. @param string $value The binary data string. @param integer $order The byte order of the binary data string. @return integer
[ "Returns", "machine", "endian", "ordered", "binary", "data", "as", "unsigned", "16", "-", "bit", "integer", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L268-L275
201,331
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.fromInt24
private function fromInt24($value) { list(, $int) = unpack('l*', $this->isLittleEndian() ? ("\x00" . $value) : ($value . "\x00")); return $int; }
php
private function fromInt24($value) { list(, $int) = unpack('l*', $this->isLittleEndian() ? ("\x00" . $value) : ($value . "\x00")); return $int; }
[ "private", "function", "fromInt24", "(", "$", "value", ")", "{", "list", "(", ",", "$", "int", ")", "=", "unpack", "(", "'l*'", ",", "$", "this", "->", "isLittleEndian", "(", ")", "?", "(", "\"\\x00\"", ".", "$", "value", ")", ":", "(", "$", "val...
Returns machine endian ordered binary data as signed 24-bit integer. @param string $value The binary data string. @return integer
[ "Returns", "machine", "endian", "ordered", "binary", "data", "as", "signed", "24", "-", "bit", "integer", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L319-L323
201,332
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.readInt24LE
final public function readInt24LE() { if ($this->isBigEndian()) { return $this->fromInt24(strrev($this->read(3))); } else { return $this->fromInt24($this->read(3)); } }
php
final public function readInt24LE() { if ($this->isBigEndian()) { return $this->fromInt24(strrev($this->read(3))); } else { return $this->fromInt24($this->read(3)); } }
[ "final", "public", "function", "readInt24LE", "(", ")", "{", "if", "(", "$", "this", "->", "isBigEndian", "(", ")", ")", "{", "return", "$", "this", "->", "fromInt24", "(", "strrev", "(", "$", "this", "->", "read", "(", "3", ")", ")", ")", ";", "...
Reads 3 bytes from the stream and returns little-endian ordered binary data as signed 24-bit integer. @return integer @throws InvalidStreamException if an I/O error occurs
[ "Reads", "3", "bytes", "from", "the", "stream", "and", "returns", "little", "-", "endian", "ordered", "binary", "data", "as", "signed", "24", "-", "bit", "integer", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L332-L339
201,333
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.readInt24BE
final public function readInt24BE() { if ($this->isLittleEndian()) { return $this->fromInt24(strrev($this->read(3))); } else { return $this->fromInt24($this->read(3)); } }
php
final public function readInt24BE() { if ($this->isLittleEndian()) { return $this->fromInt24(strrev($this->read(3))); } else { return $this->fromInt24($this->read(3)); } }
[ "final", "public", "function", "readInt24BE", "(", ")", "{", "if", "(", "$", "this", "->", "isLittleEndian", "(", ")", ")", "{", "return", "$", "this", "->", "fromInt24", "(", "strrev", "(", "$", "this", "->", "read", "(", "3", ")", ")", ")", ";", ...
Reads 3 bytes from the stream and returns big-endian ordered binary data as signed 24-bit integer. @return integer @throws InvalidStreamException if an I/O error occurs
[ "Reads", "3", "bytes", "from", "the", "stream", "and", "returns", "big", "-", "endian", "ordered", "binary", "data", "as", "signed", "24", "-", "bit", "integer", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L348-L355
201,334
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.fromUInt24
private function fromUInt24($value, $order = 0) { list(, $int) = unpack( ($order == self::BIG_ENDIAN_ORDER ? 'N' : ($order == self::LITTLE_ENDIAN_ORDER ? 'V' : 'L')) . '*', $this->isLittleEndian() ? ("\x00" . $value) : ($value . "\x00") ); return $int; }
php
private function fromUInt24($value, $order = 0) { list(, $int) = unpack( ($order == self::BIG_ENDIAN_ORDER ? 'N' : ($order == self::LITTLE_ENDIAN_ORDER ? 'V' : 'L')) . '*', $this->isLittleEndian() ? ("\x00" . $value) : ($value . "\x00") ); return $int; }
[ "private", "function", "fromUInt24", "(", "$", "value", ",", "$", "order", "=", "0", ")", "{", "list", "(", ",", "$", "int", ")", "=", "unpack", "(", "(", "$", "order", "==", "self", "::", "BIG_ENDIAN_ORDER", "?", "'N'", ":", "(", "$", "order", "...
Returns machine endian ordered binary data as unsigned 24-bit integer. @param string $value The binary data string. @param integer $order The byte order of the binary data string. @return integer
[ "Returns", "machine", "endian", "ordered", "binary", "data", "as", "unsigned", "24", "-", "bit", "integer", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L376-L383
201,335
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.readInt32LE
final public function readInt32LE() { if ($this->isBigEndian()) { return $this->fromInt32(strrev($this->read(4))); } else { return $this->fromInt32($this->read(4)); } }
php
final public function readInt32LE() { if ($this->isBigEndian()) { return $this->fromInt32(strrev($this->read(4))); } else { return $this->fromInt32($this->read(4)); } }
[ "final", "public", "function", "readInt32LE", "(", ")", "{", "if", "(", "$", "this", "->", "isBigEndian", "(", ")", ")", "{", "return", "$", "this", "->", "fromInt32", "(", "strrev", "(", "$", "this", "->", "read", "(", "4", ")", ")", ")", ";", "...
Reads 4 bytes from the stream and returns little-endian ordered binary data as signed 32-bit integer. @return integer @throws InvalidStreamException if an I/O error occurs
[ "Reads", "4", "bytes", "from", "the", "stream", "and", "returns", "little", "-", "endian", "ordered", "binary", "data", "as", "signed", "32", "-", "bit", "integer", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L440-L447
201,336
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.readInt32BE
final public function readInt32BE() { if ($this->isLittleEndian()) { return $this->fromInt32(strrev($this->read(4))); } else { return $this->fromInt32($this->read(4)); } }
php
final public function readInt32BE() { if ($this->isLittleEndian()) { return $this->fromInt32(strrev($this->read(4))); } else { return $this->fromInt32($this->read(4)); } }
[ "final", "public", "function", "readInt32BE", "(", ")", "{", "if", "(", "$", "this", "->", "isLittleEndian", "(", ")", ")", "{", "return", "$", "this", "->", "fromInt32", "(", "strrev", "(", "$", "this", "->", "read", "(", "4", ")", ")", ")", ";", ...
Reads 4 bytes from the stream and returns big-endian ordered binary data as signed 32-bit integer. @return integer @throws InvalidStreamException if an I/O error occurs
[ "Reads", "4", "bytes", "from", "the", "stream", "and", "returns", "big", "-", "endian", "ordered", "binary", "data", "as", "signed", "32", "-", "bit", "integer", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L456-L463
201,337
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.readUInt32LE
final public function readUInt32LE() { if (PHP_INT_SIZE < 8) { // @codeCoverageIgnoreStart list(, $lo, $hi) = unpack('v*', $this->read(4)); return $hi * (0xffff+1) + $lo; // eq $hi << 16 | $lo // @codeCoverageIgnoreEnd } else { list(, $int)...
php
final public function readUInt32LE() { if (PHP_INT_SIZE < 8) { // @codeCoverageIgnoreStart list(, $lo, $hi) = unpack('v*', $this->read(4)); return $hi * (0xffff+1) + $lo; // eq $hi << 16 | $lo // @codeCoverageIgnoreEnd } else { list(, $int)...
[ "final", "public", "function", "readUInt32LE", "(", ")", "{", "if", "(", "PHP_INT_SIZE", "<", "8", ")", "{", "// @codeCoverageIgnoreStart", "list", "(", ",", "$", "lo", ",", "$", "hi", ")", "=", "unpack", "(", "'v*'", ",", "$", "this", "->", "read", ...
Reads 4 bytes from the stream and returns little-endian ordered binary data as unsigned 32-bit integer. @return integer @throws InvalidStreamException if an I/O error occurs
[ "Reads", "4", "bytes", "from", "the", "stream", "and", "returns", "little", "-", "endian", "ordered", "binary", "data", "as", "unsigned", "32", "-", "bit", "integer", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L484-L495
201,338
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.readUInt32
final public function readUInt32() { if (PHP_INT_SIZE < 8) { // @codeCoverageIgnoreStart if ($this->isLittleEndian()) { list(, $lo, $hi) = unpack('S*', $this->read(4)); } else { list(, $hi, $lo) = unpack('S*', $this->read(4)); }...
php
final public function readUInt32() { if (PHP_INT_SIZE < 8) { // @codeCoverageIgnoreStart if ($this->isLittleEndian()) { list(, $lo, $hi) = unpack('S*', $this->read(4)); } else { list(, $hi, $lo) = unpack('S*', $this->read(4)); }...
[ "final", "public", "function", "readUInt32", "(", ")", "{", "if", "(", "PHP_INT_SIZE", "<", "8", ")", "{", "// @codeCoverageIgnoreStart", "if", "(", "$", "this", "->", "isLittleEndian", "(", ")", ")", "{", "list", "(", ",", "$", "lo", ",", "$", "hi", ...
Reads 4 bytes from the stream and returns machine ordered binary data as unsigned 32-bit integer. @return integer @throws InvalidStreamException if an I/O error occurs
[ "Reads", "4", "bytes", "from", "the", "stream", "and", "returns", "machine", "ordered", "binary", "data", "as", "unsigned", "32", "-", "bit", "integer", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L524-L539
201,339
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.readInt64LE
final public function readInt64LE() { list(, $lolo, $lohi, $hilo, $hihi) = unpack('v*', $this->read(8)); return ($hihi * (0xffff+1) + $hilo) * (0xffffffff+1) + ($lohi * (0xffff+1) + $lolo); }
php
final public function readInt64LE() { list(, $lolo, $lohi, $hilo, $hihi) = unpack('v*', $this->read(8)); return ($hihi * (0xffff+1) + $hilo) * (0xffffffff+1) + ($lohi * (0xffff+1) + $lolo); }
[ "final", "public", "function", "readInt64LE", "(", ")", "{", "list", "(", ",", "$", "lolo", ",", "$", "lohi", ",", "$", "hilo", ",", "$", "hihi", ")", "=", "unpack", "(", "'v*'", ",", "$", "this", "->", "read", "(", "8", ")", ")", ";", "return"...
Reads 8 bytes from the stream and returns little-endian ordered binary data as 64-bit float. {@internal PHP does not support 64-bit integers as the long integer is of 32-bits but using aritmetic operations it is implicitly converted into floating point which is of 64-bits long.}} @return integer @throws InvalidStream...
[ "Reads", "8", "bytes", "from", "the", "stream", "and", "returns", "little", "-", "endian", "ordered", "binary", "data", "as", "64", "-", "bit", "float", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L552-L556
201,340
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.readFloatLE
final public function readFloatLE() { if ($this->isBigEndian()) { return $this->fromFloat(strrev($this->read(4))); } else { return $this->fromFloat($this->read(4)); } }
php
final public function readFloatLE() { if ($this->isBigEndian()) { return $this->fromFloat(strrev($this->read(4))); } else { return $this->fromFloat($this->read(4)); } }
[ "final", "public", "function", "readFloatLE", "(", ")", "{", "if", "(", "$", "this", "->", "isBigEndian", "(", ")", ")", "{", "return", "$", "this", "->", "fromFloat", "(", "strrev", "(", "$", "this", "->", "read", "(", "4", ")", ")", ")", ";", "...
Reads 4 bytes from the stream and returns little-endian ordered binary data as a 32-bit float point number as defined by IEEE 754. @return float @throws InvalidStreamException if an I/O error occurs
[ "Reads", "4", "bytes", "from", "the", "stream", "and", "returns", "little", "-", "endian", "ordered", "binary", "data", "as", "a", "32", "-", "bit", "float", "point", "number", "as", "defined", "by", "IEEE", "754", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L595-L602
201,341
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.readFloatBE
final public function readFloatBE() { if ($this->isLittleEndian()) { return $this->fromFloat(strrev($this->read(4))); } else { return $this->fromFloat($this->read(4)); } }
php
final public function readFloatBE() { if ($this->isLittleEndian()) { return $this->fromFloat(strrev($this->read(4))); } else { return $this->fromFloat($this->read(4)); } }
[ "final", "public", "function", "readFloatBE", "(", ")", "{", "if", "(", "$", "this", "->", "isLittleEndian", "(", ")", ")", "{", "return", "$", "this", "->", "fromFloat", "(", "strrev", "(", "$", "this", "->", "read", "(", "4", ")", ")", ")", ";", ...
Reads 4 bytes from the stream and returns big-endian ordered binary data as a 32-bit float point number as defined by IEEE 754. @return float @throws InvalidStreamException if an I/O error occurs
[ "Reads", "4", "bytes", "from", "the", "stream", "and", "returns", "big", "-", "endian", "ordered", "binary", "data", "as", "a", "32", "-", "bit", "float", "point", "number", "as", "defined", "by", "IEEE", "754", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L611-L618
201,342
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.readDoubleLE
final public function readDoubleLE() { if ($this->isBigEndian()) { return $this->fromDouble(strrev($this->read(8))); } else { return $this->fromDouble($this->read(8)); } }
php
final public function readDoubleLE() { if ($this->isBigEndian()) { return $this->fromDouble(strrev($this->read(8))); } else { return $this->fromDouble($this->read(8)); } }
[ "final", "public", "function", "readDoubleLE", "(", ")", "{", "if", "(", "$", "this", "->", "isBigEndian", "(", ")", ")", "{", "return", "$", "this", "->", "fromDouble", "(", "strrev", "(", "$", "this", "->", "read", "(", "8", ")", ")", ")", ";", ...
Reads 8 bytes from the stream and returns little-endian ordered binary data as a 64-bit floating point number as defined by IEEE 754. @return float @throws InvalidStreamException if an I/O error occurs
[ "Reads", "8", "bytes", "from", "the", "stream", "and", "returns", "little", "-", "endian", "ordered", "binary", "data", "as", "a", "64", "-", "bit", "floating", "point", "number", "as", "defined", "by", "IEEE", "754", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L640-L647
201,343
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.readDoubleBE
final public function readDoubleBE() { if ($this->isLittleEndian()) { return $this->fromDouble(strrev($this->read(8))); } else { return $this->fromDouble($this->read(8)); } }
php
final public function readDoubleBE() { if ($this->isLittleEndian()) { return $this->fromDouble(strrev($this->read(8))); } else { return $this->fromDouble($this->read(8)); } }
[ "final", "public", "function", "readDoubleBE", "(", ")", "{", "if", "(", "$", "this", "->", "isLittleEndian", "(", ")", ")", "{", "return", "$", "this", "->", "fromDouble", "(", "strrev", "(", "$", "this", "->", "read", "(", "8", ")", ")", ")", ";"...
Reads 8 bytes from the stream and returns big-endian ordered binary data as a 64-bit float point number as defined by IEEE 754. @return float @throws InvalidStreamException if an I/O error occurs
[ "Reads", "8", "bytes", "from", "the", "stream", "and", "returns", "big", "-", "endian", "ordered", "binary", "data", "as", "a", "64", "-", "bit", "float", "point", "number", "as", "defined", "by", "IEEE", "754", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L656-L663
201,344
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.readGuid
final public function readGuid() { $C = @unpack('V1V/v2v/N2N', $this->read(16)); list($hex) = @unpack('H*0', pack('NnnNN', $C['V'], $C['v1'], $C['v2'], $C['N1'], $C['N2'])); /* Fixes a bug in PHP versions earlier than Jan 25 2006 */ if (implode('', unpack('H*', pack('H*', 'a'))) == ...
php
final public function readGuid() { $C = @unpack('V1V/v2v/N2N', $this->read(16)); list($hex) = @unpack('H*0', pack('NnnNN', $C['V'], $C['v1'], $C['v2'], $C['N1'], $C['N2'])); /* Fixes a bug in PHP versions earlier than Jan 25 2006 */ if (implode('', unpack('H*', pack('H*', 'a'))) == ...
[ "final", "public", "function", "readGuid", "(", ")", "{", "$", "C", "=", "@", "unpack", "(", "'V1V/v2v/N2N'", ",", "$", "this", "->", "read", "(", "16", ")", ")", ";", "list", "(", "$", "hex", ")", "=", "@", "unpack", "(", "'H*0'", ",", "pack", ...
Reads 16 bytes from the stream and returns the little-endian ordered binary data as mixed-ordered hexadecimal GUID string. @return string @throws InvalidStreamException if an I/O error occurs
[ "Reads", "16", "bytes", "from", "the", "stream", "and", "returns", "the", "little", "-", "endian", "ordered", "binary", "data", "as", "mixed", "-", "ordered", "hexadecimal", "GUID", "string", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L758-L771
201,345
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.close
public function close() { if ($this->fileDescriptor !== null) { @fclose($this->fileDescriptor); $this->fileDescriptor = null; } }
php
public function close() { if ($this->fileDescriptor !== null) { @fclose($this->fileDescriptor); $this->fileDescriptor = null; } }
[ "public", "function", "close", "(", ")", "{", "if", "(", "$", "this", "->", "fileDescriptor", "!==", "null", ")", "{", "@", "fclose", "(", "$", "this", "->", "fileDescriptor", ")", ";", "$", "this", "->", "fileDescriptor", "=", "null", ";", "}", "}" ...
Closes the stream. Once a stream has been closed, further calls to read methods will throw an exception. Closing a previously-closed stream, however, has no effect. @return void
[ "Closes", "the", "stream", ".", "Once", "a", "stream", "has", "been", "closed", "further", "calls", "to", "read", "methods", "will", "throw", "an", "exception", ".", "Closing", "a", "previously", "-", "closed", "stream", "however", "has", "no", "effect", "...
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L793-L799
201,346
MetaSyntactical/Io
src/MetaSyntactical/Io/Reader.php
Reader.getEndianess
private function getEndianess() { if (0 === self::$endianess) { self::$endianess = $this->fromInt32("\x01\x00\x00\x00") == 1 ? self::LITTLE_ENDIAN_ORDER : self::BIG_ENDIAN_ORDER; } return self::$endianess; }
php
private function getEndianess() { if (0 === self::$endianess) { self::$endianess = $this->fromInt32("\x01\x00\x00\x00") == 1 ? self::LITTLE_ENDIAN_ORDER : self::BIG_ENDIAN_ORDER; } return self::$endianess; }
[ "private", "function", "getEndianess", "(", ")", "{", "if", "(", "0", "===", "self", "::", "$", "endianess", ")", "{", "self", "::", "$", "endianess", "=", "$", "this", "->", "fromInt32", "(", "\"\\x01\\x00\\x00\\x00\"", ")", "==", "1", "?", "self", ":...
Returns the current machine endian order. @return integer
[ "Returns", "the", "current", "machine", "endian", "order", "." ]
d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c
https://github.com/MetaSyntactical/Io/blob/d9272c6cf7f3cf24cbd5e4069a6695b26ef0b50c/src/MetaSyntactical/Io/Reader.php#L806-L814
201,347
bkstg/schedule-bundle
Repository/InvitationRepository.php
InvitationRepository.findPendingInvitationsQuery
public function findPendingInvitationsQuery(UserInterface $user) { $qb = $this->createQueryBuilder('i'); return $qb ->join('i.event', 'e') // Add conditions. ->andWhere($qb->expr()->eq('e.active', ':active')) ->andWhere($qb->expr()->gt('e.end', ':now...
php
public function findPendingInvitationsQuery(UserInterface $user) { $qb = $this->createQueryBuilder('i'); return $qb ->join('i.event', 'e') // Add conditions. ->andWhere($qb->expr()->eq('e.active', ':active')) ->andWhere($qb->expr()->gt('e.end', ':now...
[ "public", "function", "findPendingInvitationsQuery", "(", "UserInterface", "$", "user", ")", "{", "$", "qb", "=", "$", "this", "->", "createQueryBuilder", "(", "'i'", ")", ";", "return", "$", "qb", "->", "join", "(", "'i.event'", ",", "'e'", ")", "// Add c...
Build query to find pending invitations for a user. @param UserInterface $user The user to find invitations for. @return Invitation[]
[ "Build", "query", "to", "find", "pending", "invitations", "for", "a", "user", "." ]
e64ac897aa7b28bc48319470d65de13cd4788afe
https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/Repository/InvitationRepository.php#L26-L46
201,348
bkstg/schedule-bundle
Repository/InvitationRepository.php
InvitationRepository.findOtherInvitationsQuery
public function findOtherInvitationsQuery(UserInterface $user) { $qb = $this->createQueryBuilder('i'); return $qb ->join('i.event', 'e') // Add conditions. ->andWhere($qb->expr()->eq('e.active', ':active')) ->andWhere($qb->expr()->orX( ...
php
public function findOtherInvitationsQuery(UserInterface $user) { $qb = $this->createQueryBuilder('i'); return $qb ->join('i.event', 'e') // Add conditions. ->andWhere($qb->expr()->eq('e.active', ':active')) ->andWhere($qb->expr()->orX( ...
[ "public", "function", "findOtherInvitationsQuery", "(", "UserInterface", "$", "user", ")", "{", "$", "qb", "=", "$", "this", "->", "createQueryBuilder", "(", "'i'", ")", ";", "return", "$", "qb", "->", "join", "(", "'i.event'", ",", "'e'", ")", "// Add con...
Build query to find other invitations for a user. @param UserInterface $user The user to find invitations for. @return Invitation[]
[ "Build", "query", "to", "find", "other", "invitations", "for", "a", "user", "." ]
e64ac897aa7b28bc48319470d65de13cd4788afe
https://github.com/bkstg/schedule-bundle/blob/e64ac897aa7b28bc48319470d65de13cd4788afe/Repository/InvitationRepository.php#L67-L92
201,349
SagittariusX/Beluga.IO
src/Beluga/IO/File.php
File.hasReadAccess
public function hasReadAccess() : bool { return $this->isOpen() && ( $this->access == static::ACCESS_READ || $this->access == static::ACCESS_READWRITE ); }
php
public function hasReadAccess() : bool { return $this->isOpen() && ( $this->access == static::ACCESS_READ || $this->access == static::ACCESS_READWRITE ); }
[ "public", "function", "hasReadAccess", "(", ")", ":", "bool", "{", "return", "$", "this", "->", "isOpen", "(", ")", "&&", "(", "$", "this", "->", "access", "==", "static", "::", "ACCESS_READ", "||", "$", "this", "->", "access", "==", "static", "::", ...
Returns if reading is enabled. @return boolean
[ "Returns", "if", "reading", "is", "enabled", "." ]
c8af09a1b3cc8a955e43c89b70779d11b30ae29e
https://github.com/SagittariusX/Beluga.IO/blob/c8af09a1b3cc8a955e43c89b70779d11b30ae29e/src/Beluga/IO/File.php#L152-L161
201,350
SagittariusX/Beluga.IO
src/Beluga/IO/File.php
File.hasWriteAccess
public function hasWriteAccess() : bool { return $this->isOpen() && ( $this->access == static::ACCESS_WRITE || $this->access == static::ACCESS_READWRITE ); }
php
public function hasWriteAccess() : bool { return $this->isOpen() && ( $this->access == static::ACCESS_WRITE || $this->access == static::ACCESS_READWRITE ); }
[ "public", "function", "hasWriteAccess", "(", ")", ":", "bool", "{", "return", "$", "this", "->", "isOpen", "(", ")", "&&", "(", "$", "this", "->", "access", "==", "static", "::", "ACCESS_WRITE", "||", "$", "this", "->", "access", "==", "static", "::", ...
Returns if writing is enabled. @return boolean
[ "Returns", "if", "writing", "is", "enabled", "." ]
c8af09a1b3cc8a955e43c89b70779d11b30ae29e
https://github.com/SagittariusX/Beluga.IO/blob/c8af09a1b3cc8a955e43c89b70779d11b30ae29e/src/Beluga/IO/File.php#L168-L177
201,351
SagittariusX/Beluga.IO
src/Beluga/IO/File.php
File.writeCsv
public function writeCsv( array $dataRow, string $delimiter = ',', bool $fast = false ) : bool { if ( ! $fast ) { // No fast (insecure) access = do the required checks if ( ! $this->isOpen() ) { return false; } if ( ! $this->hasWriteAccess() ) ...
php
public function writeCsv( array $dataRow, string $delimiter = ',', bool $fast = false ) : bool { if ( ! $fast ) { // No fast (insecure) access = do the required checks if ( ! $this->isOpen() ) { return false; } if ( ! $this->hasWriteAccess() ) ...
[ "public", "function", "writeCsv", "(", "array", "$", "dataRow", ",", "string", "$", "delimiter", "=", "','", ",", "bool", "$", "fast", "=", "false", ")", ":", "bool", "{", "if", "(", "!", "$", "fast", ")", "{", "// No fast (insecure) access = do the requir...
Write a csv format data row, defined as array. @param array $dataRow The data row to write (numeric indicated array) @param string $delimiter The CSV column delimiter char. (default=',') @param boolean $fast Write fast without some checks? (Defaults to FALSE) @return boolean @throw...
[ "Write", "a", "csv", "format", "data", "row", "defined", "as", "array", "." ]
c8af09a1b3cc8a955e43c89b70779d11b30ae29e
https://github.com/SagittariusX/Beluga.IO/blob/c8af09a1b3cc8a955e43c89b70779d11b30ae29e/src/Beluga/IO/File.php#L578-L613
201,352
SagittariusX/Beluga.IO
src/Beluga/IO/File.php
File.setPointerPosition
public function setPointerPosition( int $offset = 0 ) : bool { if ( ! \is_resource( $this->fp ) ) { return false; } return (bool) \fseek( $this->fp, $offset ); }
php
public function setPointerPosition( int $offset = 0 ) : bool { if ( ! \is_resource( $this->fp ) ) { return false; } return (bool) \fseek( $this->fp, $offset ); }
[ "public", "function", "setPointerPosition", "(", "int", "$", "offset", "=", "0", ")", ":", "bool", "{", "if", "(", "!", "\\", "is_resource", "(", "$", "this", "->", "fp", ")", ")", "{", "return", "false", ";", "}", "return", "(", "bool", ")", "\\",...
Sets a new file pointer position. @param integer $offset @return boolean
[ "Sets", "a", "new", "file", "pointer", "position", "." ]
c8af09a1b3cc8a955e43c89b70779d11b30ae29e
https://github.com/SagittariusX/Beluga.IO/blob/c8af09a1b3cc8a955e43c89b70779d11b30ae29e/src/Beluga/IO/File.php#L642-L652
201,353
SagittariusX/Beluga.IO
src/Beluga/IO/File.php
File.setPointerPositionToEndOfFile
public function setPointerPositionToEndOfFile() : bool { if ( ! \is_resource( $this->fp ) ) { return false; } return (bool) \fseek( $this->fp, 0, \SEEK_END ); }
php
public function setPointerPositionToEndOfFile() : bool { if ( ! \is_resource( $this->fp ) ) { return false; } return (bool) \fseek( $this->fp, 0, \SEEK_END ); }
[ "public", "function", "setPointerPositionToEndOfFile", "(", ")", ":", "bool", "{", "if", "(", "!", "\\", "is_resource", "(", "$", "this", "->", "fp", ")", ")", "{", "return", "false", ";", "}", "return", "(", "bool", ")", "\\", "fseek", "(", "$", "th...
Sets the file pointer position to the end of the file. @return boolean
[ "Sets", "the", "file", "pointer", "position", "to", "the", "end", "of", "the", "file", "." ]
c8af09a1b3cc8a955e43c89b70779d11b30ae29e
https://github.com/SagittariusX/Beluga.IO/blob/c8af09a1b3cc8a955e43c89b70779d11b30ae29e/src/Beluga/IO/File.php#L659-L669
201,354
SagittariusX/Beluga.IO
src/Beluga/IO/File.php
File.Create
public static function Create( string $file, $mode = 0750, bool $overwrite = true, $contents = '' ) { $f = File::CreateNew( $file, $overwrite, true, true, $mode ); $f->write( $contents ); $f->close(); }
php
public static function Create( string $file, $mode = 0750, bool $overwrite = true, $contents = '' ) { $f = File::CreateNew( $file, $overwrite, true, true, $mode ); $f->write( $contents ); $f->close(); }
[ "public", "static", "function", "Create", "(", "string", "$", "file", ",", "$", "mode", "=", "0750", ",", "bool", "$", "overwrite", "=", "true", ",", "$", "contents", "=", "''", ")", "{", "$", "f", "=", "File", "::", "CreateNew", "(", "$", "file", ...
Creates a new file with the defined content. If $overwrite is FALSE and the file already exists, a {@see \Beluga\IO\FileAlreadyExistsException} is thrown. @param string $file The path of the file to create. @param integer $mode The file access mode (only used by unixoids) (d...
[ "Creates", "a", "new", "file", "with", "the", "defined", "content", "." ]
c8af09a1b3cc8a955e43c89b70779d11b30ae29e
https://github.com/SagittariusX/Beluga.IO/blob/c8af09a1b3cc8a955e43c89b70779d11b30ae29e/src/Beluga/IO/File.php#L885-L892
201,355
SagittariusX/Beluga.IO
src/Beluga/IO/File.php
File.Zip
public static function Zip( string $sourceFile, string $zipFile, string $workingDir = null ) { if ( ! \class_exists( '\\ZipArchive' ) ) { throw new MissingExtensionError( 'ZIP', 'IO', 'Can not ZIP the file "' . $sourceFile . '"!' ); } // Remember the original used working directory...
php
public static function Zip( string $sourceFile, string $zipFile, string $workingDir = null ) { if ( ! \class_exists( '\\ZipArchive' ) ) { throw new MissingExtensionError( 'ZIP', 'IO', 'Can not ZIP the file "' . $sourceFile . '"!' ); } // Remember the original used working directory...
[ "public", "static", "function", "Zip", "(", "string", "$", "sourceFile", ",", "string", "$", "zipFile", ",", "string", "$", "workingDir", "=", "null", ")", "{", "if", "(", "!", "\\", "class_exists", "(", "'\\\\ZipArchive'", ")", ")", "{", "throw", "new",...
Compresses the defined source file to defined ZIP archive file. @param string $sourceFile This file will be compressed by the zip archive @param string $zipFile The target/destination ZIP file. (will be created or overwrite a existing) @param string $workingDir A optional working folder. (Usual its the folder, c...
[ "Compresses", "the", "defined", "source", "file", "to", "defined", "ZIP", "archive", "file", "." ]
c8af09a1b3cc8a955e43c89b70779d11b30ae29e
https://github.com/SagittariusX/Beluga.IO/blob/c8af09a1b3cc8a955e43c89b70779d11b30ae29e/src/Beluga/IO/File.php#L1097-L1227
201,356
SagittariusX/Beluga.IO
src/Beluga/IO/File.php
File.GetNameWithoutExtension
public static function GetNameWithoutExtension( string $file, bool $doubleExtension = false ) { if ( \FALSE === ( $ext = static::GetExtension( $file, $doubleExtension ) ) ) { return \basename( $file ); } return \substr( \basename( $file ), 0, -\strlen( $ext ) ); }
php
public static function GetNameWithoutExtension( string $file, bool $doubleExtension = false ) { if ( \FALSE === ( $ext = static::GetExtension( $file, $doubleExtension ) ) ) { return \basename( $file ); } return \substr( \basename( $file ), 0, -\strlen( $ext ) ); }
[ "public", "static", "function", "GetNameWithoutExtension", "(", "string", "$", "file", ",", "bool", "$", "doubleExtension", "=", "false", ")", "{", "if", "(", "\\", "FALSE", "===", "(", "$", "ext", "=", "static", "::", "GetExtension", "(", "$", "file", "...
Returns the file name without the file name extension. @param string $file The file name/path. @param boolean $doubleExtension If you require extensions, including also a single dot like '.abc.def' you have to set this parameter to TRUE. @return string|bool Name or bool FALSE.
[ "Returns", "the", "file", "name", "without", "the", "file", "name", "extension", "." ]
c8af09a1b3cc8a955e43c89b70779d11b30ae29e
https://github.com/SagittariusX/Beluga.IO/blob/c8af09a1b3cc8a955e43c89b70779d11b30ae29e/src/Beluga/IO/File.php#L1526-L1533
201,357
Stinger-Soft/PhpCommons
src/StingerSoft/PhpCommons/Integer/Utils.php
Utils.intcmp
public static function intcmp($a, $b) { return ($a - $b) ? ($a - $b) / abs($a - $b) : 0; }
php
public static function intcmp($a, $b) { return ($a - $b) ? ($a - $b) / abs($a - $b) : 0; }
[ "public", "static", "function", "intcmp", "(", "$", "a", ",", "$", "b", ")", "{", "return", "(", "$", "a", "-", "$", "b", ")", "?", "(", "$", "a", "-", "$", "b", ")", "/", "abs", "(", "$", "a", "-", "$", "b", ")", ":", "0", ";", "}" ]
Returns an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. @param int $a @param int $b @return int
[ "Returns", "an", "integer", "less", "than", "equal", "to", "or", "greater", "than", "zero", "if", "the", "first", "argument", "is", "considered", "to", "be", "respectively", "less", "than", "equal", "to", "or", "greater", "than", "the", "second", "." ]
e1d7e2bb7b384fb9182903d3b6138aa3bbd05d9b
https://github.com/Stinger-Soft/PhpCommons/blob/e1d7e2bb7b384fb9182903d3b6138aa3bbd05d9b/src/StingerSoft/PhpCommons/Integer/Utils.php#L27-L29
201,358
Vectrex/vxPHP
src/File/FilesystemFolder.php
FilesystemFolder.getFolders
public function getFolders() { $result = []; $files = glob($this->path . '*', GLOB_ONLYDIR); if($files) { foreach($files as $f) { $result[] = self::getInstance($f); } } return $result; }
php
public function getFolders() { $result = []; $files = glob($this->path . '*', GLOB_ONLYDIR); if($files) { foreach($files as $f) { $result[] = self::getInstance($f); } } return $result; }
[ "public", "function", "getFolders", "(", ")", "{", "$", "result", "=", "[", "]", ";", "$", "files", "=", "glob", "(", "$", "this", "->", "path", ".", "'*'", ",", "GLOB_ONLYDIR", ")", ";", "if", "(", "$", "files", ")", "{", "foreach", "(", "$", ...
returns all FilesystemFolder instances in folder @return Array
[ "returns", "all", "FilesystemFolder", "instances", "in", "folder" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/File/FilesystemFolder.php#L146-L159
201,359
Vectrex/vxPHP
src/File/FilesystemFolder.php
FilesystemFolder.getParentFolder
public function getParentFolder($force = FALSE) { if(!isset($this->parentFolder) || $force) { $parentPath = realpath($this->path . '..'); // flag parentFolder property, when $this is already the root folder if($parentPath === $this->path) { $this->parentFolder = FALSE; } else { ...
php
public function getParentFolder($force = FALSE) { if(!isset($this->parentFolder) || $force) { $parentPath = realpath($this->path . '..'); // flag parentFolder property, when $this is already the root folder if($parentPath === $this->path) { $this->parentFolder = FALSE; } else { ...
[ "public", "function", "getParentFolder", "(", "$", "force", "=", "FALSE", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "parentFolder", ")", "||", "$", "force", ")", "{", "$", "parentPath", "=", "realpath", "(", "$", "this", "->", "path"...
return parent FilesystemFolder of current folder returns NULL, when current folder is already the root folder @param boolean $force @return FilesystemFolder
[ "return", "parent", "FilesystemFolder", "of", "current", "folder", "returns", "NULL", "when", "current", "folder", "is", "already", "the", "root", "folder" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/File/FilesystemFolder.php#L168-L190
201,360
Vectrex/vxPHP
src/File/FilesystemFolder.php
FilesystemFolder.createFolder
public function createFolder($folderName) { // prefix folder path, when realpath fails (e.g. does not exist) if(!($path = realpath($folderName))) { $path = $this->path . $folderName; } // throw exception when $folderName cannot be established as subdirectory of current folder else if (strpos($p...
php
public function createFolder($folderName) { // prefix folder path, when realpath fails (e.g. does not exist) if(!($path = realpath($folderName))) { $path = $this->path . $folderName; } // throw exception when $folderName cannot be established as subdirectory of current folder else if (strpos($p...
[ "public", "function", "createFolder", "(", "$", "folderName", ")", "{", "// prefix folder path, when realpath fails (e.g. does not exist)", "if", "(", "!", "(", "$", "path", "=", "realpath", "(", "$", "folderName", ")", ")", ")", "{", "$", "path", "=", "$", "t...
create a new subdirectory returns newly created FilesystemFolder object @param string $folderName @return FilesystemFolder @throws FilesystemFolderException
[ "create", "a", "new", "subdirectory", "returns", "newly", "created", "FilesystemFolder", "object" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/File/FilesystemFolder.php#L231-L265
201,361
Vectrex/vxPHP
src/File/FilesystemFolder.php
FilesystemFolder.purgeCache
public function purgeCache($force = FALSE) { if(($path = $this->getCachePath($force))) { foreach(glob($path. '*') as $f) { if(!unlink($f)) { throw new FilesystemFolderException(sprintf('Cache folder %s could not be purged!', $this->path . self::CACHE_PATH)); } } } }
php
public function purgeCache($force = FALSE) { if(($path = $this->getCachePath($force))) { foreach(glob($path. '*') as $f) { if(!unlink($f)) { throw new FilesystemFolderException(sprintf('Cache folder %s could not be purged!', $this->path . self::CACHE_PATH)); } } } }
[ "public", "function", "purgeCache", "(", "$", "force", "=", "FALSE", ")", "{", "if", "(", "(", "$", "path", "=", "$", "this", "->", "getCachePath", "(", "$", "force", ")", ")", ")", "{", "foreach", "(", "glob", "(", "$", "path", ".", "'*'", ")", ...
empties the cache when found @param boolean $force @throws FilesystemFolderException
[ "empties", "the", "cache", "when", "found" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/File/FilesystemFolder.php#L295-L305
201,362
hschletz/NADA
src/Table/Mysql.php
Mysql.setCharset
public function setCharset($charset) { $this->_database->exec( 'ALTER TABLE ' . $this->_database->prepareIdentifier($this->_name) . ' CONVERT TO CHARACTER SET ' . $this->_database->prepareValue($charset, Column::TYPE_VARCHAR) ); }
php
public function setCharset($charset) { $this->_database->exec( 'ALTER TABLE ' . $this->_database->prepareIdentifier($this->_name) . ' CONVERT TO CHARACTER SET ' . $this->_database->prepareValue($charset, Column::TYPE_VARCHAR) ); }
[ "public", "function", "setCharset", "(", "$", "charset", ")", "{", "$", "this", "->", "_database", "->", "exec", "(", "'ALTER TABLE '", ".", "$", "this", "->", "_database", "->", "prepareIdentifier", "(", "$", "this", "->", "_name", ")", ".", "' CONVERT TO...
Set character set and convert data to new character set @param string $charset Character set known to MySQL server @return void
[ "Set", "character", "set", "and", "convert", "data", "to", "new", "character", "set" ]
4ead798354089fd360f917ce64dd1432d5650df0
https://github.com/hschletz/NADA/blob/4ead798354089fd360f917ce64dd1432d5650df0/src/Table/Mysql.php#L142-L150
201,363
hschletz/NADA
src/Table/Mysql.php
Mysql.getEngine
public function getEngine() { if (!$this->_engine) { $table = $this->_database->query('SHOW TABLE STATUS LIKE ?', $this->_name); $this->_engine = $table[0]['engine']; } return $this->_engine; }
php
public function getEngine() { if (!$this->_engine) { $table = $this->_database->query('SHOW TABLE STATUS LIKE ?', $this->_name); $this->_engine = $table[0]['engine']; } return $this->_engine; }
[ "public", "function", "getEngine", "(", ")", "{", "if", "(", "!", "$", "this", "->", "_engine", ")", "{", "$", "table", "=", "$", "this", "->", "_database", "->", "query", "(", "'SHOW TABLE STATUS LIKE ?'", ",", "$", "this", "->", "_name", ")", ";", ...
Retrieve table engine @return string
[ "Retrieve", "table", "engine" ]
4ead798354089fd360f917ce64dd1432d5650df0
https://github.com/hschletz/NADA/blob/4ead798354089fd360f917ce64dd1432d5650df0/src/Table/Mysql.php#L157-L164
201,364
hschletz/NADA
src/Table/Mysql.php
Mysql.setEngine
public function setEngine($engine) { $this->_database->exec( 'ALTER TABLE ' . $this->_database->prepareIdentifier($this->_name) . ' ENGINE = ' . $this->_database->prepareValue($engine, Column::TYPE_VARCHAR) ); // MySQL ignores invalid engine na...
php
public function setEngine($engine) { $this->_database->exec( 'ALTER TABLE ' . $this->_database->prepareIdentifier($this->_name) . ' ENGINE = ' . $this->_database->prepareValue($engine, Column::TYPE_VARCHAR) ); // MySQL ignores invalid engine na...
[ "public", "function", "setEngine", "(", "$", "engine", ")", "{", "$", "this", "->", "_database", "->", "exec", "(", "'ALTER TABLE '", ".", "$", "this", "->", "_database", "->", "prepareIdentifier", "(", "$", "this", "->", "_name", ")", ".", "' ENGINE = '",...
Set table engine @param string $engine New table engine (MyISAM, InnoDB etc.) @throws \RuntimeException if $engine is not recognized by the server
[ "Set", "table", "engine" ]
4ead798354089fd360f917ce64dd1432d5650df0
https://github.com/hschletz/NADA/blob/4ead798354089fd360f917ce64dd1432d5650df0/src/Table/Mysql.php#L171-L184
201,365
Erebot/Module_IrcTracker
src/IrcTracker.php
IrcTracker.unload
protected function unload() { foreach ($this->ial as $entry) { if (isset($entry['TIMER'])) { $this->removeTimer($entry['TIMER']); } } }
php
protected function unload() { foreach ($this->ial as $entry) { if (isset($entry['TIMER'])) { $this->removeTimer($entry['TIMER']); } } }
[ "protected", "function", "unload", "(", ")", "{", "foreach", "(", "$", "this", "->", "ial", "as", "$", "entry", ")", "{", "if", "(", "isset", "(", "$", "entry", "[", "'TIMER'", "]", ")", ")", "{", "$", "this", "->", "removeTimer", "(", "$", "entr...
Frees the resources associated with this module.
[ "Frees", "the", "resources", "associated", "with", "this", "module", "." ]
50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d
https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker.php#L173-L180
201,366
Erebot/Module_IrcTracker
src/IrcTracker.php
IrcTracker.updateUser
protected function updateUser($nick, $ident, $host) { $collator = $this->connection->getCollator(); $normNick = $collator->normalizeNick($nick); $key = array_search($normNick, $this->nicks); if ($key === false) { $key = $this->sequence++; $this->nic...
php
protected function updateUser($nick, $ident, $host) { $collator = $this->connection->getCollator(); $normNick = $collator->normalizeNick($nick); $key = array_search($normNick, $this->nicks); if ($key === false) { $key = $this->sequence++; $this->nic...
[ "protected", "function", "updateUser", "(", "$", "nick", ",", "$", "ident", ",", "$", "host", ")", "{", "$", "collator", "=", "$", "this", "->", "connection", "->", "getCollator", "(", ")", ";", "$", "normNick", "=", "$", "collator", "->", "normalizeNi...
Updates the IAL with new information on some user. \param string $nick Some user's nickname whose IAL entry will be updated. \param string $ident Some user's identity, in the IRC sense of the term. \param string $host Some user's hostname.
[ "Updates", "the", "IAL", "with", "new", "information", "on", "some", "user", "." ]
50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d
https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker.php#L250-L292
201,367
Erebot/Module_IrcTracker
src/IrcTracker.php
IrcTracker.realRemoveUser
protected function realRemoveUser($nick) { $collator = $this->connection->getCollator(); $nick = $collator->normalizeNick($nick); $key = array_search($nick, $this->nicks); if ($key === false) { return; } $this->ial[$key]['TIMER'] = null; ...
php
protected function realRemoveUser($nick) { $collator = $this->connection->getCollator(); $nick = $collator->normalizeNick($nick); $key = array_search($nick, $this->nicks); if ($key === false) { return; } $this->ial[$key]['TIMER'] = null; ...
[ "protected", "function", "realRemoveUser", "(", "$", "nick", ")", "{", "$", "collator", "=", "$", "this", "->", "connection", "->", "getCollator", "(", ")", ";", "$", "nick", "=", "$", "collator", "->", "normalizeNick", "(", "$", "nick", ")", ";", "$",...
Removes some user from the IAL. \param string $nick Nickname of the user that is to be removed from the IAL.
[ "Removes", "some", "user", "from", "the", "IAL", "." ]
50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d
https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker.php#L301-L318
201,368
Erebot/Module_IrcTracker
src/IrcTracker.php
IrcTracker.handleNick
public function handleNick( \Erebot\Interfaces\EventHandler $handler, \Erebot\Interfaces\Event\Nick $event ) { $oldNick = (string) $event->getSource(); $newNick = (string) $event->getTarget(); $collator = $this->connection->getCollator(); $normOldNick ...
php
public function handleNick( \Erebot\Interfaces\EventHandler $handler, \Erebot\Interfaces\Event\Nick $event ) { $oldNick = (string) $event->getSource(); $newNick = (string) $event->getTarget(); $collator = $this->connection->getCollator(); $normOldNick ...
[ "public", "function", "handleNick", "(", "\\", "Erebot", "\\", "Interfaces", "\\", "EventHandler", "$", "handler", ",", "\\", "Erebot", "\\", "Interfaces", "\\", "Event", "\\", "Nick", "$", "event", ")", "{", "$", "oldNick", "=", "(", "string", ")", "$",...
Handles a nick change. \param Erebot::Interfaces::EventHandler $handler Handler that triggered this event. \param Erebot::Interfaces::Event::Nick $event Nick change event. @SuppressWarnings(PHPMD.UnusedFormalParameter)
[ "Handles", "a", "nick", "change", "." ]
50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d
https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker.php#L378-L396
201,369
Erebot/Module_IrcTracker
src/IrcTracker.php
IrcTracker.handleLeaving
public function handleLeaving( \Erebot\Interfaces\EventHandler $handler, \Erebot\Interfaces\Event\Base\Generic $event ) { if ($event instanceof \Erebot\Interfaces\Event\Kick) { $nick = (string) $event->getTarget(); } else { $nick = (string) $event->g...
php
public function handleLeaving( \Erebot\Interfaces\EventHandler $handler, \Erebot\Interfaces\Event\Base\Generic $event ) { if ($event instanceof \Erebot\Interfaces\Event\Kick) { $nick = (string) $event->getTarget(); } else { $nick = (string) $event->g...
[ "public", "function", "handleLeaving", "(", "\\", "Erebot", "\\", "Interfaces", "\\", "EventHandler", "$", "handler", ",", "\\", "Erebot", "\\", "Interfaces", "\\", "Event", "\\", "Base", "\\", "Generic", "$", "event", ")", "{", "if", "(", "$", "event", ...
Handles some user leaving an IRC channel. This may result from either a QUIT or KICK command. \param Erebot::Interfaces::EventHandler $handler Handler that triggered this event. \param Erebot::Interfaces::Event::Base::Generic $event An event indicating that some user is leaving an IRC channel the bot is on. @Suppres...
[ "Handles", "some", "user", "leaving", "an", "IRC", "channel", ".", "This", "may", "result", "from", "either", "a", "QUIT", "or", "KICK", "command", "." ]
50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d
https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker.php#L411-L455
201,370
Erebot/Module_IrcTracker
src/IrcTracker.php
IrcTracker.handleCapabilities
public function handleCapabilities( \Erebot\Interfaces\EventHandler $handler, \Erebot\Event\ServerCapabilities $event ) { $module = $event->getModule(); if ($module->hasExtendedNames()) { $this->sendCommand('PROTOCTL NAMESX'); } if ($module->hasUser...
php
public function handleCapabilities( \Erebot\Interfaces\EventHandler $handler, \Erebot\Event\ServerCapabilities $event ) { $module = $event->getModule(); if ($module->hasExtendedNames()) { $this->sendCommand('PROTOCTL NAMESX'); } if ($module->hasUser...
[ "public", "function", "handleCapabilities", "(", "\\", "Erebot", "\\", "Interfaces", "\\", "EventHandler", "$", "handler", ",", "\\", "Erebot", "\\", "Event", "\\", "ServerCapabilities", "$", "event", ")", "{", "$", "module", "=", "$", "event", "->", "getMod...
Handles server capabilities. \param Erebot::Interfaces::EventHandler $handler Handler that triggered this event. \param Erebot::Event::ServerCapabilities $event An event referencing a module that can determine the IRC server's capabilities, such as Erebot::Module::ServerCapabilities. @SuppressWarnings(PHPMD.UnusedFo...
[ "Handles", "server", "capabilities", "." ]
50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d
https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker.php#L470-L482
201,371
Erebot/Module_IrcTracker
src/IrcTracker.php
IrcTracker.handleNames
public function handleNames( \Erebot\Interfaces\NumericHandler $handler, \Erebot\Interfaces\Event\Numeric $numeric ) { $text = $numeric->getText(); $chan = $text[1]; $users = new \Erebot\TextWrapper( ltrim($numeric->getText()->getTokens(2), ':') ...
php
public function handleNames( \Erebot\Interfaces\NumericHandler $handler, \Erebot\Interfaces\Event\Numeric $numeric ) { $text = $numeric->getText(); $chan = $text[1]; $users = new \Erebot\TextWrapper( ltrim($numeric->getText()->getTokens(2), ':') ...
[ "public", "function", "handleNames", "(", "\\", "Erebot", "\\", "Interfaces", "\\", "NumericHandler", "$", "handler", ",", "\\", "Erebot", "\\", "Interfaces", "\\", "Event", "\\", "Numeric", "$", "numeric", ")", "{", "$", "text", "=", "$", "numeric", "->",...
Handles a list with the nicknames of all users in a given IRC channel. \param Erebot::Interfaces::NumericHandler $handler Handler that triggered this event. \param Erebot::Interfaces::Event::Numeric $numeric A numeric event with the nicknames of users in an IRC channel the bot just joined. This is the same type of nu...
[ "Handles", "a", "list", "with", "the", "nicknames", "of", "all", "users", "in", "a", "given", "IRC", "channel", "." ]
50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d
https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker.php#L499-L550
201,372
Erebot/Module_IrcTracker
src/IrcTracker.php
IrcTracker.handleWho
public function handleWho( \Erebot\Interfaces\NumericHandler $handler, \Erebot\Interfaces\Event\Numeric $numeric ) { $text = $numeric->getText(); $this->updateUser($text[4], $text[1], $text[2]); }
php
public function handleWho( \Erebot\Interfaces\NumericHandler $handler, \Erebot\Interfaces\Event\Numeric $numeric ) { $text = $numeric->getText(); $this->updateUser($text[4], $text[1], $text[2]); }
[ "public", "function", "handleWho", "(", "\\", "Erebot", "\\", "Interfaces", "\\", "NumericHandler", "$", "handler", ",", "\\", "Erebot", "\\", "Interfaces", "\\", "Event", "\\", "Numeric", "$", "numeric", ")", "{", "$", "text", "=", "$", "numeric", "->", ...
Handles information about some user. \param Erebot::Interfaces::NumericHandler $handler Handler that triggered this event. \param Erebot::Interfaces::Event::Numeric $numeric Numeric event containing some user's nickname, IRC identity and hostname. @SuppressWarnings(PHPMD.UnusedFormalParameter)
[ "Handles", "information", "about", "some", "user", "." ]
50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d
https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker.php#L564-L570
201,373
Erebot/Module_IrcTracker
src/IrcTracker.php
IrcTracker.handleJoin
public function handleJoin( \Erebot\Interfaces\EventHandler $handler, \Erebot\Interfaces\Event\Join $event ) { $user = $event->getSource(); $nick = $user->getNick(); $collator = $this->connection->getCollator(); $normNick = $collator->normalizeNick($...
php
public function handleJoin( \Erebot\Interfaces\EventHandler $handler, \Erebot\Interfaces\Event\Join $event ) { $user = $event->getSource(); $nick = $user->getNick(); $collator = $this->connection->getCollator(); $normNick = $collator->normalizeNick($...
[ "public", "function", "handleJoin", "(", "\\", "Erebot", "\\", "Interfaces", "\\", "EventHandler", "$", "handler", ",", "\\", "Erebot", "\\", "Interfaces", "\\", "Event", "\\", "Join", "$", "event", ")", "{", "$", "user", "=", "$", "event", "->", "getSou...
Handles some user joining an IRC channel the bot is currently on. \param Erebot::Interfaces::EventHandler $handler Handler that triggered this event. \param Erebot::Interfaces::Event::Join $event Event indicating that some user joined a channel the bot is on. @SuppressWarnings(PHPMD.UnusedFormalParameter)
[ "Handles", "some", "user", "joining", "an", "IRC", "channel", "the", "bot", "is", "currently", "on", "." ]
50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d
https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker.php#L585-L601
201,374
Erebot/Module_IrcTracker
src/IrcTracker.php
IrcTracker.handleChanModeAddition
public function handleChanModeAddition( \Erebot\Interfaces\EventHandler $handler, \Erebot\Interfaces\Event\Base\ChanModeGiven $event ) { $user = $event->getTarget(); $nick = self::extractNick($user); $collator = $this->connection->getCollator(); ...
php
public function handleChanModeAddition( \Erebot\Interfaces\EventHandler $handler, \Erebot\Interfaces\Event\Base\ChanModeGiven $event ) { $user = $event->getTarget(); $nick = self::extractNick($user); $collator = $this->connection->getCollator(); ...
[ "public", "function", "handleChanModeAddition", "(", "\\", "Erebot", "\\", "Interfaces", "\\", "EventHandler", "$", "handler", ",", "\\", "Erebot", "\\", "Interfaces", "\\", "Event", "\\", "Base", "\\", "ChanModeGiven", "$", "event", ")", "{", "$", "user", "...
Handles someone receiving a new status on an IRC channel, for example, when someone is OPped. \param Erebot::Interfaces::EventHandler $handler Handler that triggered this event. \param Erebot::Interfaces::Event::Base::ChanModeGiven $event Event indicating someone's status changed on an IRC channel the bot is currentl...
[ "Handles", "someone", "receiving", "a", "new", "status", "on", "an", "IRC", "channel", "for", "example", "when", "someone", "is", "OPped", "." ]
50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d
https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker.php#L617-L632
201,375
Erebot/Module_IrcTracker
src/IrcTracker.php
IrcTracker.startTracking
public function startTracking($nick, $cls = '\\Erebot\\Module\\IrcTracker\\Token') { $identityCls = $this->getFactory('!Identity'); $fmt = $this->getFormatter(null); if ($nick instanceof \Erebot\Interfaces\Identity) { $identity = $nick; } else { if (!is_string...
php
public function startTracking($nick, $cls = '\\Erebot\\Module\\IrcTracker\\Token') { $identityCls = $this->getFactory('!Identity'); $fmt = $this->getFormatter(null); if ($nick instanceof \Erebot\Interfaces\Identity) { $identity = $nick; } else { if (!is_string...
[ "public", "function", "startTracking", "(", "$", "nick", ",", "$", "cls", "=", "'\\\\Erebot\\\\Module\\\\IrcTracker\\\\Token'", ")", "{", "$", "identityCls", "=", "$", "this", "->", "getFactory", "(", "'!Identity'", ")", ";", "$", "fmt", "=", "$", "this", "-...
Returns a tracking token for some user. \param string $nick The nickname of some user we want to start tracking. \param string $cls (optional) Class to use to create the token. Defaults to Erebot::Module::IrcTracker::Token. \retval mixed A token that can later be used to return information on that user (such as his/...
[ "Returns", "a", "tracking", "token", "for", "some", "user", "." ]
50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d
https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker.php#L695-L718
201,376
Erebot/Module_IrcTracker
src/IrcTracker.php
IrcTracker.getInfo
public function getInfo($token, $info, $args = array()) { if ($token instanceof \Erebot\Module\IrcTracker\Token) { $methods = array( self::INFO_ISON => 'isOn', self::INFO_MASK => 'getMask', self::INFO_NICK => 'getNick', ...
php
public function getInfo($token, $info, $args = array()) { if ($token instanceof \Erebot\Module\IrcTracker\Token) { $methods = array( self::INFO_ISON => 'isOn', self::INFO_MASK => 'getMask', self::INFO_NICK => 'getNick', ...
[ "public", "function", "getInfo", "(", "$", "token", ",", "$", "info", ",", "$", "args", "=", "array", "(", ")", ")", "{", "if", "(", "$", "token", "instanceof", "\\", "Erebot", "\\", "Module", "\\", "IrcTracker", "\\", "Token", ")", "{", "$", "meth...
Returns information about some user given a token associated with that user. \param opaque $token Token associated with the user. \param opaque $info The type of information we're interested in. This is one of the INFO_* constants provided by this class. \param array $args (optional) Additional arguments for the que...
[ "Returns", "information", "about", "some", "user", "given", "a", "token", "associated", "with", "that", "user", "." ]
50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d
https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker.php#L761-L812
201,377
Erebot/Module_IrcTracker
src/IrcTracker.php
IrcTracker.isOn
public function isOn($chan, $nick = null) { if ($nick === null) { return isset($this->chans[$chan]); } $nick = self::extractNick($nick); $collator = $this->connection->getCollator(); $nick = $collator->normalizeNick($nick); $key = arr...
php
public function isOn($chan, $nick = null) { if ($nick === null) { return isset($this->chans[$chan]); } $nick = self::extractNick($nick); $collator = $this->connection->getCollator(); $nick = $collator->normalizeNick($nick); $key = arr...
[ "public", "function", "isOn", "(", "$", "chan", ",", "$", "nick", "=", "null", ")", "{", "if", "(", "$", "nick", "===", "null", ")", "{", "return", "isset", "(", "$", "this", "->", "chans", "[", "$", "chan", "]", ")", ";", "}", "$", "nick", "...
Indicates whether some user is present on a given IRC channel. \param string $chan IRC channel that user must be on. \param mixed $nick (optional) Either some user's nickname (a string) or \b null. Defaults to \b null. When this parameter is \b null, this method tests whether the bot is on the given IRC channel or no...
[ "Indicates", "whether", "some", "user", "is", "present", "on", "a", "given", "IRC", "channel", "." ]
50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d
https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker.php#L832-L846
201,378
Erebot/Module_IrcTracker
src/IrcTracker.php
IrcTracker.getCommonChans
public function getCommonChans($nick) { $nick = self::extractNick($nick); $collator = $this->connection->getCollator(); $nick = $collator->normalizeNick($nick); $key = array_search($nick, $this->nicks); if ($key === false) { throw new \Erebot\...
php
public function getCommonChans($nick) { $nick = self::extractNick($nick); $collator = $this->connection->getCollator(); $nick = $collator->normalizeNick($nick); $key = array_search($nick, $this->nicks); if ($key === false) { throw new \Erebot\...
[ "public", "function", "getCommonChans", "(", "$", "nick", ")", "{", "$", "nick", "=", "self", "::", "extractNick", "(", "$", "nick", ")", ";", "$", "collator", "=", "$", "this", "->", "connection", "->", "getCollator", "(", ")", ";", "$", "nick", "="...
Returns a list of IRC channels the bot and some other user have in common. \param string $nick Nickname of the user for which we want to know what channels (s)he shares with the bot. \retval list A list with the names of all IRC channels that user and the bot have in common. \throw Erebot::NotFoundException The give...
[ "Returns", "a", "list", "of", "IRC", "channels", "the", "bot", "and", "some", "other", "user", "have", "in", "common", "." ]
50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d
https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker.php#L863-L880
201,379
Erebot/Module_IrcTracker
src/IrcTracker.php
IrcTracker.userPrivileges
public function userPrivileges($chan, $nick) { if (!isset($this->chans[$chan][$nick])) { throw new \Erebot\NotFoundException('No such channel or user'); } return $this->chans[$chan][$nick]; }
php
public function userPrivileges($chan, $nick) { if (!isset($this->chans[$chan][$nick])) { throw new \Erebot\NotFoundException('No such channel or user'); } return $this->chans[$chan][$nick]; }
[ "public", "function", "userPrivileges", "(", "$", "chan", ",", "$", "nick", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "chans", "[", "$", "chan", "]", "[", "$", "nick", "]", ")", ")", "{", "throw", "new", "\\", "Erebot", "\\", "...
Returns channel status associated with the given user. \param string $chan The IRC channel we're interested in. \param string $nick Nickname of the user whose status on the given channel we're interested in. \retval list A list with the status/privileges for that user on the given channel. Each status is given by th...
[ "Returns", "channel", "status", "associated", "with", "the", "given", "user", "." ]
50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d
https://github.com/Erebot/Module_IrcTracker/blob/50eaf5d3e35cf4bb31259819cd3d4fba3279bc5d/src/IrcTracker.php#L974-L980
201,380
andres-montanez/FragmentCacheBundle
EventListener/FragmentCacheListener.php
FragmentCacheListener.onKernelController
public function onKernelController(FilterControllerEvent $event) { if (!is_array($controller = $event->getController())) { return; } // Only for SubRequests $subRequest = $event->getRequest(); if ($event->getRequestType() == HttpKernelInterface::MASTER_REQUEST) {...
php
public function onKernelController(FilterControllerEvent $event) { if (!is_array($controller = $event->getController())) { return; } // Only for SubRequests $subRequest = $event->getRequest(); if ($event->getRequestType() == HttpKernelInterface::MASTER_REQUEST) {...
[ "public", "function", "onKernelController", "(", "FilterControllerEvent", "$", "event", ")", "{", "if", "(", "!", "is_array", "(", "$", "controller", "=", "$", "event", "->", "getController", "(", ")", ")", ")", "{", "return", ";", "}", "// Only for SubReque...
Listener for the Controller call @param \Symfony\Component\HttpKernel\Event\FilterControllerEvent $event @return void
[ "Listener", "for", "the", "Controller", "call" ]
90f9511e275fd78990f6b90cd52052078c53253a
https://github.com/andres-montanez/FragmentCacheBundle/blob/90f9511e275fd78990f6b90cd52052078c53253a/EventListener/FragmentCacheListener.php#L99-L147
201,381
andres-montanez/FragmentCacheBundle
EventListener/FragmentCacheListener.php
FragmentCacheListener.onKernelResponse
public function onKernelResponse(FilterResponseEvent $event) { // Only for Sub Requests $subRequest = $event->getRequest(); if ($event->getRequestType() == HttpKernelInterface::MASTER_REQUEST) { return; } // Check if Annotation is present if (!$configurat...
php
public function onKernelResponse(FilterResponseEvent $event) { // Only for Sub Requests $subRequest = $event->getRequest(); if ($event->getRequestType() == HttpKernelInterface::MASTER_REQUEST) { return; } // Check if Annotation is present if (!$configurat...
[ "public", "function", "onKernelResponse", "(", "FilterResponseEvent", "$", "event", ")", "{", "// Only for Sub Requests", "$", "subRequest", "=", "$", "event", "->", "getRequest", "(", ")", ";", "if", "(", "$", "event", "->", "getRequestType", "(", ")", "==", ...
Listener for the Response call @param \Symfony\Component\HttpKernel\Event\FilterResponseEvent $event @return void
[ "Listener", "for", "the", "Response", "call" ]
90f9511e275fd78990f6b90cd52052078c53253a
https://github.com/andres-montanez/FragmentCacheBundle/blob/90f9511e275fd78990f6b90cd52052078c53253a/EventListener/FragmentCacheListener.php#L155-L207
201,382
andres-montanez/FragmentCacheBundle
EventListener/FragmentCacheListener.php
FragmentCacheListener.getKey
protected function getKey(FragmentCache $configuration, Request $subRequest, Request $masterRequest) { $event = new KeyGenerationEvent($configuration, $subRequest, $masterRequest); $keyRequest = sha1($subRequest->getRequestUri()) . ':' . sha1($masterRequest->getRequestUri())...
php
protected function getKey(FragmentCache $configuration, Request $subRequest, Request $masterRequest) { $event = new KeyGenerationEvent($configuration, $subRequest, $masterRequest); $keyRequest = sha1($subRequest->getRequestUri()) . ':' . sha1($masterRequest->getRequestUri())...
[ "protected", "function", "getKey", "(", "FragmentCache", "$", "configuration", ",", "Request", "$", "subRequest", ",", "Request", "$", "masterRequest", ")", "{", "$", "event", "=", "new", "KeyGenerationEvent", "(", "$", "configuration", ",", "$", "subRequest", ...
Calculates the cache Key of the Fragment @param \AndresMontanez\FragmentCacheBundle\Library\Configuration\FragmentCache $configuration @param \Symfony\Component\HttpFoundation\Request $subRequest @param \Symfony\Component\HttpFoundation\Request $masterRequest @return string
[ "Calculates", "the", "cache", "Key", "of", "the", "Fragment" ]
90f9511e275fd78990f6b90cd52052078c53253a
https://github.com/andres-montanez/FragmentCacheBundle/blob/90f9511e275fd78990f6b90cd52052078c53253a/EventListener/FragmentCacheListener.php#L217-L239
201,383
realboard/DBInstance
src/Realboard/Component/Database/DBInstance/Authentication.php
Authentication.setAuthMode
public function setAuthMode($mode) { if (!class_exists($mode)) { throw new \Exception(sprintf( "Class %s doesn't exists", $mode )); } $this->authMode = $mode; $authClass = is_string($mode) ? new $mode() : $mode; if (!$...
php
public function setAuthMode($mode) { if (!class_exists($mode)) { throw new \Exception(sprintf( "Class %s doesn't exists", $mode )); } $this->authMode = $mode; $authClass = is_string($mode) ? new $mode() : $mode; if (!$...
[ "public", "function", "setAuthMode", "(", "$", "mode", ")", "{", "if", "(", "!", "class_exists", "(", "$", "mode", ")", ")", "{", "throw", "new", "\\", "Exception", "(", "sprintf", "(", "\"Class %s doesn't exists\"", ",", "$", "mode", ")", ")", ";", "}...
Set Authentication Mode. @param string $mode
[ "Set", "Authentication", "Mode", "." ]
f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35
https://github.com/realboard/DBInstance/blob/f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35/src/Realboard/Component/Database/DBInstance/Authentication.php#L45-L71
201,384
realboard/DBInstance
src/Realboard/Component/Database/DBInstance/Authentication.php
Authentication.setAuthDir
public function setAuthDir($dir) { if (!file_exists($dir)) { throw new \Exception('Auth directory is not exists!'); } if (!is_dir($dir)) { throw new \Exception('Auth directory is not exists!'); } if ($this->security && $this->security->getKey()) { ...
php
public function setAuthDir($dir) { if (!file_exists($dir)) { throw new \Exception('Auth directory is not exists!'); } if (!is_dir($dir)) { throw new \Exception('Auth directory is not exists!'); } if ($this->security && $this->security->getKey()) { ...
[ "public", "function", "setAuthDir", "(", "$", "dir", ")", "{", "if", "(", "!", "file_exists", "(", "$", "dir", ")", ")", "{", "throw", "new", "\\", "Exception", "(", "'Auth directory is not exists!'", ")", ";", "}", "if", "(", "!", "is_dir", "(", "$", ...
Set Authencation Directory. @param string $dir Directory
[ "Set", "Authencation", "Directory", "." ]
f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35
https://github.com/realboard/DBInstance/blob/f2cde7fdf480d5eb5a491a5cf81ff7f4b3be0a35/src/Realboard/Component/Database/DBInstance/Authentication.php#L88-L104
201,385
kaiohken1982/Neobazaar
src/Neobazaar/Controller/IndexController.php
IndexController.breadcrumbsAction
public function breadcrumbsAction() { $default = 'dashboard'; $id = $this->getRequest()->getQuery('id', $default); $pos = strpos($id, '/'); $id = false !== $pos ? substr($id, 0, $pos) : $id; $view = $this->getServiceLocator()->get('Zend\View\Renderer\PhpRenderer'); $navigation = $v...
php
public function breadcrumbsAction() { $default = 'dashboard'; $id = $this->getRequest()->getQuery('id', $default); $pos = strpos($id, '/'); $id = false !== $pos ? substr($id, 0, $pos) : $id; $view = $this->getServiceLocator()->get('Zend\View\Renderer\PhpRenderer'); $navigation = $v...
[ "public", "function", "breadcrumbsAction", "(", ")", "{", "$", "default", "=", "'dashboard'", ";", "$", "id", "=", "$", "this", "->", "getRequest", "(", ")", "->", "getQuery", "(", "'id'", ",", "$", "default", ")", ";", "$", "pos", "=", "strpos", "("...
Web service per la restituzione di un breadcrumbs in base ad un id @return ViewModel
[ "Web", "service", "per", "la", "restituzione", "di", "un", "breadcrumbs", "in", "base", "ad", "un", "id" ]
288c972dea981d715c4e136edb5dba0318c9e6cb
https://github.com/kaiohken1982/Neobazaar/blob/288c972dea981d715c4e136edb5dba0318c9e6cb/src/Neobazaar/Controller/IndexController.php#L36-L56
201,386
kaiohken1982/Neobazaar
src/Neobazaar/Controller/IndexController.php
IndexController.categoriesAction
public function categoriesAction() { $main = $this->getServiceLocator()->get('neobazaar.service.main'); $categories = $main->getDocumentEntityRepository() ->getCategoryMultioptionsNoSlug($this->getServiceLocator()); return new JsonModel(array('data' => $categories)); }
php
public function categoriesAction() { $main = $this->getServiceLocator()->get('neobazaar.service.main'); $categories = $main->getDocumentEntityRepository() ->getCategoryMultioptionsNoSlug($this->getServiceLocator()); return new JsonModel(array('data' => $categories)); }
[ "public", "function", "categoriesAction", "(", ")", "{", "$", "main", "=", "$", "this", "->", "getServiceLocator", "(", ")", "->", "get", "(", "'neobazaar.service.main'", ")", ";", "$", "categories", "=", "$", "main", "->", "getDocumentEntityRepository", "(", ...
Web service per la restituzione delle categorie @return JsonModel
[ "Web", "service", "per", "la", "restituzione", "delle", "categorie" ]
288c972dea981d715c4e136edb5dba0318c9e6cb
https://github.com/kaiohken1982/Neobazaar/blob/288c972dea981d715c4e136edb5dba0318c9e6cb/src/Neobazaar/Controller/IndexController.php#L63-L70
201,387
kaiohken1982/Neobazaar
src/Neobazaar/Controller/IndexController.php
IndexController.locationsAction
public function locationsAction() { $main = $this->getServiceLocator()->get('neobazaar.service.main'); $locations = $main->getGeonamesEntityRepository() ->getLocationMultioptions($this->getServiceLocator()); return new JsonModel(array('data' => $locations)); }
php
public function locationsAction() { $main = $this->getServiceLocator()->get('neobazaar.service.main'); $locations = $main->getGeonamesEntityRepository() ->getLocationMultioptions($this->getServiceLocator()); return new JsonModel(array('data' => $locations)); }
[ "public", "function", "locationsAction", "(", ")", "{", "$", "main", "=", "$", "this", "->", "getServiceLocator", "(", ")", "->", "get", "(", "'neobazaar.service.main'", ")", ";", "$", "locations", "=", "$", "main", "->", "getGeonamesEntityRepository", "(", ...
Web service per la restituzione delle locations @return JsonModel
[ "Web", "service", "per", "la", "restituzione", "delle", "locations" ]
288c972dea981d715c4e136edb5dba0318c9e6cb
https://github.com/kaiohken1982/Neobazaar/blob/288c972dea981d715c4e136edb5dba0318c9e6cb/src/Neobazaar/Controller/IndexController.php#L77-L84
201,388
kaiohken1982/Neobazaar
src/Neobazaar/Controller/IndexController.php
IndexController.activationEmailResendAction
public function activationEmailResendAction() { $classifiedService = $this->getServiceLocator()->get('document.service.classified'); try { $ids = $classifiedService->activationEmailResend(1); $data = array( 'status' => 'success', 'message' => implode(", ", $ids) ); } catch(\Exception $e) ...
php
public function activationEmailResendAction() { $classifiedService = $this->getServiceLocator()->get('document.service.classified'); try { $ids = $classifiedService->activationEmailResend(1); $data = array( 'status' => 'success', 'message' => implode(", ", $ids) ); } catch(\Exception $e) ...
[ "public", "function", "activationEmailResendAction", "(", ")", "{", "$", "classifiedService", "=", "$", "this", "->", "getServiceLocator", "(", ")", "->", "get", "(", "'document.service.classified'", ")", ";", "try", "{", "$", "ids", "=", "$", "classifiedService...
This is needed because of mailserver goes down. Will resend activation email to those classifieds where date_insert = date_edit and state = 2. Dispatch a classified created event with data
[ "This", "is", "needed", "because", "of", "mailserver", "goes", "down", ".", "Will", "resend", "activation", "email", "to", "those", "classifieds", "where", "date_insert", "=", "date_edit", "and", "state", "=", "2", ".", "Dispatch", "a", "classified", "created"...
288c972dea981d715c4e136edb5dba0318c9e6cb
https://github.com/kaiohken1982/Neobazaar/blob/288c972dea981d715c4e136edb5dba0318c9e6cb/src/Neobazaar/Controller/IndexController.php#L124-L144
201,389
cubicmushroom/valueobjects
src/Number/Real.php
Real.sameValueAs
public function sameValueAs(ValueObjectInterface $real) { if (false === Util::classEquals($this, $real)) { return false; } return $this->toNative() === $real->toNative(); }
php
public function sameValueAs(ValueObjectInterface $real) { if (false === Util::classEquals($this, $real)) { return false; } return $this->toNative() === $real->toNative(); }
[ "public", "function", "sameValueAs", "(", "ValueObjectInterface", "$", "real", ")", "{", "if", "(", "false", "===", "Util", "::", "classEquals", "(", "$", "this", ",", "$", "real", ")", ")", "{", "return", "false", ";", "}", "return", "$", "this", "->"...
Tells whether two Real are equal by comparing their values @param ValueObjectInterface $real @return bool
[ "Tells", "whether", "two", "Real", "are", "equal", "by", "comparing", "their", "values" ]
4554239ab75d65eeb9773219aa5b07e9fbfabb92
https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/Number/Real.php#L58-L65
201,390
cubicmushroom/valueobjects
src/Number/Real.php
Real.toInteger
public function toInteger(RoundingMode $rounding_mode = null) { if (null === $rounding_mode) { $rounding_mode = RoundingMode::HALF_UP(); } $value = $this->toNative(); $integerValue = \round($value, 0, $rounding_mode->toNative()); $integer = new Intege...
php
public function toInteger(RoundingMode $rounding_mode = null) { if (null === $rounding_mode) { $rounding_mode = RoundingMode::HALF_UP(); } $value = $this->toNative(); $integerValue = \round($value, 0, $rounding_mode->toNative()); $integer = new Intege...
[ "public", "function", "toInteger", "(", "RoundingMode", "$", "rounding_mode", "=", "null", ")", "{", "if", "(", "null", "===", "$", "rounding_mode", ")", "{", "$", "rounding_mode", "=", "RoundingMode", "::", "HALF_UP", "(", ")", ";", "}", "$", "value", "...
Returns the integer part of the Real number as a Integer @param RoundingMode $rounding_mode Rounding mode of the conversion. Defaults to RoundingMode::HALF_UP. @return Integer
[ "Returns", "the", "integer", "part", "of", "the", "Real", "number", "as", "a", "Integer" ]
4554239ab75d65eeb9773219aa5b07e9fbfabb92
https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/Number/Real.php#L73-L84
201,391
cubicmushroom/valueobjects
src/Number/Real.php
Real.toNatural
public function toNatural(RoundingMode $rounding_mode = null) { $integerValue = $this->toInteger($rounding_mode)->toNative(); $naturalValue = \abs($integerValue); $natural = new Natural($naturalValue); return $natural; }
php
public function toNatural(RoundingMode $rounding_mode = null) { $integerValue = $this->toInteger($rounding_mode)->toNative(); $naturalValue = \abs($integerValue); $natural = new Natural($naturalValue); return $natural; }
[ "public", "function", "toNatural", "(", "RoundingMode", "$", "rounding_mode", "=", "null", ")", "{", "$", "integerValue", "=", "$", "this", "->", "toInteger", "(", "$", "rounding_mode", ")", "->", "toNative", "(", ")", ";", "$", "naturalValue", "=", "\\", ...
Returns the absolute integer part of the Real number as a Natural @param RoundingMode $rounding_mode Rounding mode of the conversion. Defaults to RoundingMode::HALF_UP. @return Natural
[ "Returns", "the", "absolute", "integer", "part", "of", "the", "Real", "number", "as", "a", "Natural" ]
4554239ab75d65eeb9773219aa5b07e9fbfabb92
https://github.com/cubicmushroom/valueobjects/blob/4554239ab75d65eeb9773219aa5b07e9fbfabb92/src/Number/Real.php#L92-L99
201,392
NukaCode/core
src/NukaCode/Core/View/ViewBuilder.php
ViewBuilder.missingMethod
public function missingMethod($parameters) { if (! app()->runningInConsole()) { $this->viewPath->missingMethod($this->layout->layout, $parameters); } return $this; }
php
public function missingMethod($parameters) { if (! app()->runningInConsole()) { $this->viewPath->missingMethod($this->layout->layout, $parameters); } return $this; }
[ "public", "function", "missingMethod", "(", "$", "parameters", ")", "{", "if", "(", "!", "app", "(", ")", "->", "runningInConsole", "(", ")", ")", "{", "$", "this", "->", "viewPath", "->", "missingMethod", "(", "$", "this", "->", "layout", "->", "layou...
If a method is not defined, try to find it's view. @param array $parameters @return $this
[ "If", "a", "method", "is", "not", "defined", "try", "to", "find", "it", "s", "view", "." ]
75b20903fb068a7df22cdec34ae729279fbaab3c
https://github.com/NukaCode/core/blob/75b20903fb068a7df22cdec34ae729279fbaab3c/src/NukaCode/Core/View/ViewBuilder.php#L74-L81
201,393
NukaCode/core
src/NukaCode/Core/View/ViewBuilder.php
ViewBuilder.setViewLayout
public function setViewLayout($view) { $this->layout = $this->viewLayout->change($view); $this->layout->layout = $this->viewPath->setUp($this->layout->layout, null); }
php
public function setViewLayout($view) { $this->layout = $this->viewLayout->change($view); $this->layout->layout = $this->viewPath->setUp($this->layout->layout, null); }
[ "public", "function", "setViewLayout", "(", "$", "view", ")", "{", "$", "this", "->", "layout", "=", "$", "this", "->", "viewLayout", "->", "change", "(", "$", "view", ")", ";", "$", "this", "->", "layout", "->", "layout", "=", "$", "this", "->", "...
Set a custom layout for a page. @param string $view
[ "Set", "a", "custom", "layout", "for", "a", "page", "." ]
75b20903fb068a7df22cdec34ae729279fbaab3c
https://github.com/NukaCode/core/blob/75b20903fb068a7df22cdec34ae729279fbaab3c/src/NukaCode/Core/View/ViewBuilder.php#L88-L92
201,394
NukaCode/core
src/NukaCode/Core/View/ViewBuilder.php
ViewBuilder.setViewPath
public function setViewPath($view) { $this->layout->layout = $this->viewPath->setUp($this->layout->layout, $view); return $this; }
php
public function setViewPath($view) { $this->layout->layout = $this->viewPath->setUp($this->layout->layout, $view); return $this; }
[ "public", "function", "setViewPath", "(", "$", "view", ")", "{", "$", "this", "->", "layout", "->", "layout", "=", "$", "this", "->", "viewPath", "->", "setUp", "(", "$", "this", "->", "layout", "->", "layout", ",", "$", "view", ")", ";", "return", ...
Override the automatically resolved view. @param string $view @return $this
[ "Override", "the", "automatically", "resolved", "view", "." ]
75b20903fb068a7df22cdec34ae729279fbaab3c
https://github.com/NukaCode/core/blob/75b20903fb068a7df22cdec34ae729279fbaab3c/src/NukaCode/Core/View/ViewBuilder.php#L101-L106
201,395
Dhii/factory-base
src/FactoryAwareTrait.php
FactoryAwareTrait._setFactory
protected function _setFactory($factory) { if ($factory !== null && !($factory instanceof FactoryInterface)) { throw $this->_createInvalidArgumentException( $this->__('Argument is not a valid factory instance'), null, null, $factory...
php
protected function _setFactory($factory) { if ($factory !== null && !($factory instanceof FactoryInterface)) { throw $this->_createInvalidArgumentException( $this->__('Argument is not a valid factory instance'), null, null, $factory...
[ "protected", "function", "_setFactory", "(", "$", "factory", ")", "{", "if", "(", "$", "factory", "!==", "null", "&&", "!", "(", "$", "factory", "instanceof", "FactoryInterface", ")", ")", "{", "throw", "$", "this", "->", "_createInvalidArgumentException", "...
Sets the factory for this instance. @since [*next-version*] @param FactoryInterface|null $factory The factory instance to set, if any.
[ "Sets", "the", "factory", "for", "this", "instance", "." ]
eb6694178068ec58e0f2de9243f0eb98844511de
https://github.com/Dhii/factory-base/blob/eb6694178068ec58e0f2de9243f0eb98844511de/src/FactoryAwareTrait.php#L44-L55
201,396
railken/lem
src/Repository.php
Repository.findWhereIn
public function findWhereIn(array $parameters) { $q = $this->getQuery(); foreach ($parameters as $name => $value) { $q->whereIn($name, $value); } return $q->get(); }
php
public function findWhereIn(array $parameters) { $q = $this->getQuery(); foreach ($parameters as $name => $value) { $q->whereIn($name, $value); } return $q->get(); }
[ "public", "function", "findWhereIn", "(", "array", "$", "parameters", ")", "{", "$", "q", "=", "$", "this", "->", "getQuery", "(", ")", ";", "foreach", "(", "$", "parameters", "as", "$", "name", "=>", "$", "value", ")", "{", "$", "q", "->", "whereI...
Find where in. @param array $parameters @return \Illuminate\Support\Collection
[ "Find", "where", "in", "." ]
cff1efcd090a9504b2faf5594121885786dea67a
https://github.com/railken/lem/blob/cff1efcd090a9504b2faf5594121885786dea67a/src/Repository.php#L109-L118
201,397
squareproton/Bond
src/Bond/RecordManager/Task/NormalityCollection.php
NormalityCollection.getClassFromCollection
protected static function getClassFromCollection( array $collection ) { // Make sure everything in this container is of __exactly__ the same type. // This is a stronger check than the entity container performs (child entities are ok in the container) $classes = array_unique( array_map( 'get_...
php
protected static function getClassFromCollection( array $collection ) { // Make sure everything in this container is of __exactly__ the same type. // This is a stronger check than the entity container performs (child entities are ok in the container) $classes = array_unique( array_map( 'get_...
[ "protected", "static", "function", "getClassFromCollection", "(", "array", "$", "collection", ")", "{", "// Make sure everything in this container is of __exactly__ the same type.", "// This is a stronger check than the entity container performs (child entities are ok in the container)", "$"...
Check a collection only has one class. Determine this and return it. @param array $collection @return string
[ "Check", "a", "collection", "only", "has", "one", "class", ".", "Determine", "this", "and", "return", "it", "." ]
a04ad9dd1a35adeaec98237716c2a41ce02b4f1a
https://github.com/squareproton/Bond/blob/a04ad9dd1a35adeaec98237716c2a41ce02b4f1a/src/Bond/RecordManager/Task/NormalityCollection.php#L25-L42
201,398
EdwinDayot/shorty-framework
src/Framework/Application.php
Application.addRouteMiddleware
public function addRouteMiddleware(string $name): void { if (!array_key_exists($name, $this->getConfigRouteMiddlewares())) { throw new InvalidArgumentException('The middleware [' . $name . '] does not exists.'); } $this->routeMiddlewares[] = $this->getConfigRouteMiddlewares()[$n...
php
public function addRouteMiddleware(string $name): void { if (!array_key_exists($name, $this->getConfigRouteMiddlewares())) { throw new InvalidArgumentException('The middleware [' . $name . '] does not exists.'); } $this->routeMiddlewares[] = $this->getConfigRouteMiddlewares()[$n...
[ "public", "function", "addRouteMiddleware", "(", "string", "$", "name", ")", ":", "void", "{", "if", "(", "!", "array_key_exists", "(", "$", "name", ",", "$", "this", "->", "getConfigRouteMiddlewares", "(", ")", ")", ")", "{", "throw", "new", "InvalidArgum...
Add a route middleware to the list of executed middlewares. @param string $name
[ "Add", "a", "route", "middleware", "to", "the", "list", "of", "executed", "middlewares", "." ]
e03c991ea86aedbd87674d1ee2f9041b55b5e578
https://github.com/EdwinDayot/shorty-framework/blob/e03c991ea86aedbd87674d1ee2f9041b55b5e578/src/Framework/Application.php#L172-L179
201,399
EdwinDayot/shorty-framework
src/Framework/Application.php
Application.createEnv
private function createEnv(): void { if (file_exists(base_dir('.env'))) { $dotEnv = new Dotenv(); $dotEnv->load(base_dir('.env')); $this->env = $dotEnv; } }
php
private function createEnv(): void { if (file_exists(base_dir('.env'))) { $dotEnv = new Dotenv(); $dotEnv->load(base_dir('.env')); $this->env = $dotEnv; } }
[ "private", "function", "createEnv", "(", ")", ":", "void", "{", "if", "(", "file_exists", "(", "base_dir", "(", "'.env'", ")", ")", ")", "{", "$", "dotEnv", "=", "new", "Dotenv", "(", ")", ";", "$", "dotEnv", "->", "load", "(", "base_dir", "(", "'....
Create environment.
[ "Create", "environment", "." ]
e03c991ea86aedbd87674d1ee2f9041b55b5e578
https://github.com/EdwinDayot/shorty-framework/blob/e03c991ea86aedbd87674d1ee2f9041b55b5e578/src/Framework/Application.php#L184-L191