repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php
AbstractFormFieldViewHelper.getLastSubmittedFormData
protected function getLastSubmittedFormData() { $submittedArguments = $this->getRequest()->getInternalArgument('__submittedArguments'); if ($submittedArguments === null) { return; } return ObjectAccess::getPropertyPath($submittedArguments, $this->getPropertyPath()); }
php
protected function getLastSubmittedFormData() { $submittedArguments = $this->getRequest()->getInternalArgument('__submittedArguments'); if ($submittedArguments === null) { return; } return ObjectAccess::getPropertyPath($submittedArguments, $this->getPropertyPath()); }
[ "protected", "function", "getLastSubmittedFormData", "(", ")", "{", "$", "submittedArguments", "=", "$", "this", "->", "getRequest", "(", ")", "->", "getInternalArgument", "(", "'__submittedArguments'", ")", ";", "if", "(", "$", "submittedArguments", "===", "null"...
Get the form data which has last been submitted; only returns valid data in case a property mapping error has occurred. Check with hasMappingErrorOccurred() before! @return mixed
[ "Get", "the", "form", "data", "which", "has", "last", "been", "submitted", ";", "only", "returns", "valid", "data", "in", "case", "a", "property", "mapping", "error", "has", "occurred", ".", "Check", "with", "hasMappingErrorOccurred", "()", "before!" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php#L150-L157
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php
AbstractFormFieldViewHelper.getPropertyValue
protected function getPropertyValue() { if (!$this->viewHelperVariableContainer->exists(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formObject')) { return null; } $formObject = $this->viewHelperVariableContainer->get(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class...
php
protected function getPropertyValue() { if (!$this->viewHelperVariableContainer->exists(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formObject')) { return null; } $formObject = $this->viewHelperVariableContainer->get(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class...
[ "protected", "function", "getPropertyValue", "(", ")", "{", "if", "(", "!", "$", "this", "->", "viewHelperVariableContainer", "->", "exists", "(", "\\", "Neos", "\\", "FluidAdaptor", "\\", "ViewHelpers", "\\", "FormViewHelper", "::", "class", ",", "'formObject'"...
Get the current property of the object bound to this form. @return mixed Value
[ "Get", "the", "current", "property", "of", "the", "object", "bound", "to", "this", "form", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php#L199-L207
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php
AbstractFormFieldViewHelper.getPropertyPath
protected function getPropertyPath() { if ($this->isObjectAccessorMode()) { $formObjectName = $this->viewHelperVariableContainer->get(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formObjectName'); if (strlen($formObjectName) === 0) { return $this->arguments[...
php
protected function getPropertyPath() { if ($this->isObjectAccessorMode()) { $formObjectName = $this->viewHelperVariableContainer->get(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formObjectName'); if (strlen($formObjectName) === 0) { return $this->arguments[...
[ "protected", "function", "getPropertyPath", "(", ")", "{", "if", "(", "$", "this", "->", "isObjectAccessorMode", "(", ")", ")", "{", "$", "formObjectName", "=", "$", "this", "->", "viewHelperVariableContainer", "->", "get", "(", "\\", "Neos", "\\", "FluidAda...
Returns the "absolute" property path of the property bound to this ViewHelper. For <f:form... property="foo.bar" /> this will be "<formObjectName>.foo.bar" For <f:form... name="foo[bar][baz]" /> this will be "foo.bar.baz" @return string
[ "Returns", "the", "absolute", "property", "path", "of", "the", "property", "bound", "to", "this", "ViewHelper", ".", "For", "<f", ":", "form", "...", "property", "=", "foo", ".", "bar", "/", ">", "this", "will", "be", "<formObjectName", ">", ".", "foo", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php#L216-L227
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php
AbstractFormFieldViewHelper.isObjectAccessorMode
protected function isObjectAccessorMode() { return $this->hasArgument('property') && $this->viewHelperVariableContainer->exists(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formObjectName'); }
php
protected function isObjectAccessorMode() { return $this->hasArgument('property') && $this->viewHelperVariableContainer->exists(\Neos\FluidAdaptor\ViewHelpers\FormViewHelper::class, 'formObjectName'); }
[ "protected", "function", "isObjectAccessorMode", "(", ")", "{", "return", "$", "this", "->", "hasArgument", "(", "'property'", ")", "&&", "$", "this", "->", "viewHelperVariableContainer", "->", "exists", "(", "\\", "Neos", "\\", "FluidAdaptor", "\\", "ViewHelper...
Internal method which checks if we should evaluate a domain object or just output arguments['name'] and arguments['value'] @return boolean true if we should evaluate the domain object, false otherwise.
[ "Internal", "method", "which", "checks", "if", "we", "should", "evaluate", "a", "domain", "object", "or", "just", "output", "arguments", "[", "name", "]", "and", "arguments", "[", "value", "]" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php#L234-L238
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php
AbstractFormFieldViewHelper.setErrorClassAttribute
protected function setErrorClassAttribute() { if ($this->hasArgument('class')) { $cssClass = $this->arguments['class'] . ' '; } else { $cssClass = ''; } $mappingResultsForProperty = $this->getMappingResultsForProperty(); if ($mappingResultsForProperty-...
php
protected function setErrorClassAttribute() { if ($this->hasArgument('class')) { $cssClass = $this->arguments['class'] . ' '; } else { $cssClass = ''; } $mappingResultsForProperty = $this->getMappingResultsForProperty(); if ($mappingResultsForProperty-...
[ "protected", "function", "setErrorClassAttribute", "(", ")", "{", "if", "(", "$", "this", "->", "hasArgument", "(", "'class'", ")", ")", "{", "$", "cssClass", "=", "$", "this", "->", "arguments", "[", "'class'", "]", ".", "' '", ";", "}", "else", "{", ...
Add an CSS class if this view helper has errors @return void
[ "Add", "an", "CSS", "class", "if", "this", "view", "helper", "has", "errors" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php#L245-L261
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php
AbstractFormFieldViewHelper.getMappingResultsForProperty
protected function getMappingResultsForProperty() { /** @var $validationResults Result */ $validationResults = $this->getRequest()->getInternalArgument('__submittedArgumentValidationResults'); if ($validationResults === null) { return new Result(); } return $valid...
php
protected function getMappingResultsForProperty() { /** @var $validationResults Result */ $validationResults = $this->getRequest()->getInternalArgument('__submittedArgumentValidationResults'); if ($validationResults === null) { return new Result(); } return $valid...
[ "protected", "function", "getMappingResultsForProperty", "(", ")", "{", "/** @var $validationResults Result */", "$", "validationResults", "=", "$", "this", "->", "getRequest", "(", ")", "->", "getInternalArgument", "(", "'__submittedArgumentValidationResults'", ")", ";", ...
Get errors for the property and form name of this view helper @return Result
[ "Get", "errors", "for", "the", "property", "and", "form", "name", "of", "this", "view", "helper" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php#L268-L276
neos/flow-development-collection
Neos.Flow/Classes/Validation/Validator/NotEmptyValidator.php
NotEmptyValidator.isValid
protected function isValid($value) { if ($value === null) { $this->addError('This property is required.', 1221560910); } if ($value === '') { $this->addError('This property is required.', 1221560718); } if (is_array($value) && empty($value)) { ...
php
protected function isValid($value) { if ($value === null) { $this->addError('This property is required.', 1221560910); } if ($value === '') { $this->addError('This property is required.', 1221560718); } if (is_array($value) && empty($value)) { ...
[ "protected", "function", "isValid", "(", "$", "value", ")", "{", "if", "(", "$", "value", "===", "null", ")", "{", "$", "this", "->", "addError", "(", "'This property is required.'", ",", "1221560910", ")", ";", "}", "if", "(", "$", "value", "===", "''...
Checks if the given value is not empty (NULL, empty string, empty array or empty object that implements the Countable interface). @param mixed $value The value that should be validated @return void @api
[ "Checks", "if", "the", "given", "value", "is", "not", "empty", "(", "NULL", "empty", "string", "empty", "array", "or", "empty", "object", "that", "implements", "the", "Countable", "interface", ")", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Validation/Validator/NotEmptyValidator.php#L40-L54
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php
DatesReader.initializeObject
public function initializeObject() { if ($this->cache->has('parsedFormats') && $this->cache->has('parsedFormatsIndices') && $this->cache->has('localizedLiterals')) { $this->parsedFormats = $this->cache->get('parsedFormats'); $this->parsedFormatsIndices = $this->cache->get('parsedForm...
php
public function initializeObject() { if ($this->cache->has('parsedFormats') && $this->cache->has('parsedFormatsIndices') && $this->cache->has('localizedLiterals')) { $this->parsedFormats = $this->cache->get('parsedFormats'); $this->parsedFormatsIndices = $this->cache->get('parsedForm...
[ "public", "function", "initializeObject", "(", ")", "{", "if", "(", "$", "this", "->", "cache", "->", "has", "(", "'parsedFormats'", ")", "&&", "$", "this", "->", "cache", "->", "has", "(", "'parsedFormatsIndices'", ")", "&&", "$", "this", "->", "cache",...
Constructs the reader, loading parsed data from cache if available. @return void
[ "Constructs", "the", "reader", "loading", "parsed", "data", "from", "cache", "if", "available", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php#L224-L231
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php
DatesReader.shutdownObject
public function shutdownObject() { $this->cache->set('parsedFormats', $this->parsedFormats); $this->cache->set('parsedFormatsIndices', $this->parsedFormatsIndices); $this->cache->set('localizedLiterals', $this->localizedLiterals); }
php
public function shutdownObject() { $this->cache->set('parsedFormats', $this->parsedFormats); $this->cache->set('parsedFormatsIndices', $this->parsedFormatsIndices); $this->cache->set('localizedLiterals', $this->localizedLiterals); }
[ "public", "function", "shutdownObject", "(", ")", "{", "$", "this", "->", "cache", "->", "set", "(", "'parsedFormats'", ",", "$", "this", "->", "parsedFormats", ")", ";", "$", "this", "->", "cache", "->", "set", "(", "'parsedFormatsIndices'", ",", "$", "...
Shutdowns the object, saving parsed format strings to the cache. @return void
[ "Shutdowns", "the", "object", "saving", "parsed", "format", "strings", "to", "the", "cache", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php#L238-L243
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php
DatesReader.parseFormatFromCldr
public function parseFormatFromCldr(Locale $locale, $formatType, $formatLength) { self::validateFormatType($formatType); self::validateFormatLength($formatLength); if (isset($this->parsedFormatsIndices[(string)$locale][$formatType][$formatLength])) { return $this->parsedFormats[...
php
public function parseFormatFromCldr(Locale $locale, $formatType, $formatLength) { self::validateFormatType($formatType); self::validateFormatLength($formatLength); if (isset($this->parsedFormatsIndices[(string)$locale][$formatType][$formatLength])) { return $this->parsedFormats[...
[ "public", "function", "parseFormatFromCldr", "(", "Locale", "$", "locale", ",", "$", "formatType", ",", "$", "formatLength", ")", "{", "self", "::", "validateFormatType", "(", "$", "formatType", ")", ";", "self", "::", "validateFormatLength", "(", "$", "format...
Returns parsed date or time format basing on locale and desired format length. When third parameter ($formatLength) equals 'default', default format for a locale will be used. @param Locale $locale @param string $formatType A type of format (one of constant values) @param string $formatLength A length of format (one ...
[ "Returns", "parsed", "date", "or", "time", "format", "basing", "on", "locale", "and", "desired", "format", "length", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php#L259-L298
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php
DatesReader.getLocalizedLiteralsForLocale
public function getLocalizedLiteralsForLocale(Locale $locale) { if (isset($this->localizedLiterals[(string)$locale])) { return $this->localizedLiterals[(string)$locale]; } $model = $this->cldrRepository->getModelForLocale($locale); $localizedLiterals['months'] = $this->...
php
public function getLocalizedLiteralsForLocale(Locale $locale) { if (isset($this->localizedLiterals[(string)$locale])) { return $this->localizedLiterals[(string)$locale]; } $model = $this->cldrRepository->getModelForLocale($locale); $localizedLiterals['months'] = $this->...
[ "public", "function", "getLocalizedLiteralsForLocale", "(", "Locale", "$", "locale", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "localizedLiterals", "[", "(", "string", ")", "$", "locale", "]", ")", ")", "{", "return", "$", "this", "->", "loca...
Returns literals array for locale provided. If array was not generated earlier, it will be generated and cached. @param Locale $locale @return array An array with localized literals
[ "Returns", "literals", "array", "for", "locale", "provided", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php#L323-L338
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php
DatesReader.validateFormatType
public static function validateFormatType($formatType) { if (!in_array($formatType, [self::FORMAT_TYPE_DATE, self::FORMAT_TYPE_TIME, self::FORMAT_TYPE_DATETIME])) { throw new Exception\InvalidFormatTypeException('Provided formatType, "' . $formatType . '", is not one of allowed values.', 1281442...
php
public static function validateFormatType($formatType) { if (!in_array($formatType, [self::FORMAT_TYPE_DATE, self::FORMAT_TYPE_TIME, self::FORMAT_TYPE_DATETIME])) { throw new Exception\InvalidFormatTypeException('Provided formatType, "' . $formatType . '", is not one of allowed values.', 1281442...
[ "public", "static", "function", "validateFormatType", "(", "$", "formatType", ")", "{", "if", "(", "!", "in_array", "(", "$", "formatType", ",", "[", "self", "::", "FORMAT_TYPE_DATE", ",", "self", "::", "FORMAT_TYPE_TIME", ",", "self", "::", "FORMAT_TYPE_DATET...
Validates provided format type and throws exception if value is not allowed. @param string $formatType @return void @throws Exception\InvalidFormatTypeException When value is unallowed
[ "Validates", "provided", "format", "type", "and", "throws", "exception", "if", "value", "is", "not", "allowed", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php#L348-L353
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php
DatesReader.validateFormatLength
public static function validateFormatLength($formatLength) { if (!in_array($formatLength, [self::FORMAT_LENGTH_DEFAULT, self::FORMAT_LENGTH_FULL, self::FORMAT_LENGTH_LONG, self::FORMAT_LENGTH_MEDIUM, self::FORMAT_LENGTH_SHORT])) { throw new Exception\InvalidFormatLengthException('Provided format...
php
public static function validateFormatLength($formatLength) { if (!in_array($formatLength, [self::FORMAT_LENGTH_DEFAULT, self::FORMAT_LENGTH_FULL, self::FORMAT_LENGTH_LONG, self::FORMAT_LENGTH_MEDIUM, self::FORMAT_LENGTH_SHORT])) { throw new Exception\InvalidFormatLengthException('Provided format...
[ "public", "static", "function", "validateFormatLength", "(", "$", "formatLength", ")", "{", "if", "(", "!", "in_array", "(", "$", "formatLength", ",", "[", "self", "::", "FORMAT_LENGTH_DEFAULT", ",", "self", "::", "FORMAT_LENGTH_FULL", ",", "self", "::", "FORM...
Validates provided format length and throws exception if value is not allowed. @param string $formatLength @return void @throws Exception\InvalidFormatLengthException When value is not allowed
[ "Validates", "provided", "format", "length", "and", "throws", "exception", "if", "value", "is", "not", "allowed", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php#L363-L368
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php
DatesReader.parseFormat
protected function parseFormat($format) { $parsedFormat = []; $formatLengthOfFormat = strlen($format); $duringCompletionOfLiteral = false; $literal = ''; for ($i = 0; $i < $formatLengthOfFormat; ++$i) { $subformatSymbol = $format[$i]; if ($subformatS...
php
protected function parseFormat($format) { $parsedFormat = []; $formatLengthOfFormat = strlen($format); $duringCompletionOfLiteral = false; $literal = ''; for ($i = 0; $i < $formatLengthOfFormat; ++$i) { $subformatSymbol = $format[$i]; if ($subformatS...
[ "protected", "function", "parseFormat", "(", "$", "format", ")", "{", "$", "parsedFormat", "=", "[", "]", ";", "$", "formatLengthOfFormat", "=", "strlen", "(", "$", "format", ")", ";", "$", "duringCompletionOfLiteral", "=", "false", ";", "$", "literal", "=...
Parses a date / time format (with syntax defined in CLDR). Not all features from CLDR specification are implemented. Please see the documentation for this class for details what is missing. @param string $format @return array Parsed format @throws Exception\InvalidDateTimeFormatException When subformat is longer than...
[ "Parses", "a", "date", "/", "time", "format", "(", "with", "syntax", "defined", "in", "CLDR", ")", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php#L381-L440
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php
DatesReader.parseLocalizedLiterals
protected function parseLocalizedLiterals(CldrModel $model, $literalType) { $data = []; $context = $model->getRawArray('dates/calendars/calendar[@type="gregorian"]/' . $literalType . 's'); foreach ($context as $contextNodeString => $literalsWidths) { $contextType = $model->getAt...
php
protected function parseLocalizedLiterals(CldrModel $model, $literalType) { $data = []; $context = $model->getRawArray('dates/calendars/calendar[@type="gregorian"]/' . $literalType . 's'); foreach ($context as $contextNodeString => $literalsWidths) { $contextType = $model->getAt...
[ "protected", "function", "parseLocalizedLiterals", "(", "CldrModel", "$", "model", ",", "$", "literalType", ")", "{", "$", "data", "=", "[", "]", ";", "$", "context", "=", "$", "model", "->", "getRawArray", "(", "'dates/calendars/calendar[@type=\"gregorian\"]/'", ...
Parses one CLDR child of "dates" node and returns it's array representation. Many children of "dates" node have common structure, so one method can be used to parse them all. @param CldrModel $model CldrModel to read data from @param string $literalType One of: month, day, quarter, dayPeriod @return array An array wi...
[ "Parses", "one", "CLDR", "child", "of", "dates", "node", "and", "returns", "it", "s", "array", "representation", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php#L453-L477
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php
DatesReader.parseLocalizedEras
protected function parseLocalizedEras(CldrModel $model) { $data = []; foreach ($model->getRawArray('dates/calendars/calendar[@type="gregorian"]/eras') as $widthType => $eras) { foreach ($eras as $eraNodeString => $eraValue) { $eraName = $model->getAttributeValue($eraNodeS...
php
protected function parseLocalizedEras(CldrModel $model) { $data = []; foreach ($model->getRawArray('dates/calendars/calendar[@type="gregorian"]/eras') as $widthType => $eras) { foreach ($eras as $eraNodeString => $eraValue) { $eraName = $model->getAttributeValue($eraNodeS...
[ "protected", "function", "parseLocalizedEras", "(", "CldrModel", "$", "model", ")", "{", "$", "data", "=", "[", "]", ";", "foreach", "(", "$", "model", "->", "getRawArray", "(", "'dates/calendars/calendar[@type=\"gregorian\"]/eras'", ")", "as", "$", "widthType", ...
Parses "eras" child of "dates" node and returns it's array representation. @param CldrModel $model CldrModel to read data from @return array An array with localized literals for "eras" node
[ "Parses", "eras", "child", "of", "dates", "node", "and", "returns", "it", "s", "array", "representation", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php#L485-L497
neos/flow-development-collection
Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php
DatesReader.prepareDateAndTimeFormat
protected function prepareDateAndTimeFormat($format, Locale $locale, $formatLength) { $parsedFormatForDate = $this->parseFormatFromCldr($locale, 'date', $formatLength); $parsedFormatForTime = $this->parseFormatFromCldr($locale, 'time', $formatLength); $positionOfTimePlaceholder = strpos($fo...
php
protected function prepareDateAndTimeFormat($format, Locale $locale, $formatLength) { $parsedFormatForDate = $this->parseFormatFromCldr($locale, 'date', $formatLength); $parsedFormatForTime = $this->parseFormatFromCldr($locale, 'time', $formatLength); $positionOfTimePlaceholder = strpos($fo...
[ "protected", "function", "prepareDateAndTimeFormat", "(", "$", "format", ",", "Locale", "$", "locale", ",", "$", "formatLength", ")", "{", "$", "parsedFormatForDate", "=", "$", "this", "->", "parseFormatFromCldr", "(", "$", "locale", ",", "'date'", ",", "$", ...
Creates one parsed datetime format from date and time formats merged together. The dateTime format from CLDR looks like "{0} {1}" and denotes where to place time and date, and what literals should be placed before, between and / or after them. @param string $format DateTime format @param Locale $locale Locale to use ...
[ "Creates", "one", "parsed", "datetime", "format", "from", "date", "and", "time", "formats", "merged", "together", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Cldr/Reader/DatesReader.php#L512-L554
neos/flow-development-collection
Neos.Flow/Classes/I18n/EelHelper/TranslationParameterToken.php
TranslationParameterToken.locale
public function locale($locale) { try { $this->parameters['locale'] = new Locale($locale); } catch (InvalidLocaleIdentifierException $e) { throw new FlowException(sprintf('"%s" is not a valid locale identifier.', $locale), 1436784806); } return $this; }
php
public function locale($locale) { try { $this->parameters['locale'] = new Locale($locale); } catch (InvalidLocaleIdentifierException $e) { throw new FlowException(sprintf('"%s" is not a valid locale identifier.', $locale), 1436784806); } return $this; }
[ "public", "function", "locale", "(", "$", "locale", ")", "{", "try", "{", "$", "this", "->", "parameters", "[", "'locale'", "]", "=", "new", "Locale", "(", "$", "locale", ")", ";", "}", "catch", "(", "InvalidLocaleIdentifierException", "$", "e", ")", "...
Set the locale. The locale Identifier will be converted into a Locale @param string $locale An identifier of locale to use (NULL for use the default locale) @return TranslationParameterToken @throws FlowException
[ "Set", "the", "locale", ".", "The", "locale", "Identifier", "will", "be", "converted", "into", "a", "Locale" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/EelHelper/TranslationParameterToken.php#L147-L156
neos/flow-development-collection
Neos.Flow/Classes/I18n/EelHelper/TranslationParameterToken.php
TranslationParameterToken.translate
public function translate(array $overrides = []) { array_replace_recursive($this->parameters, $overrides); $id = isset($this->parameters['id']) ? $this->parameters['id'] : null; $value = isset($this->parameters['value']) ? $this->parameters['value'] : null; $arguments = isset($this-...
php
public function translate(array $overrides = []) { array_replace_recursive($this->parameters, $overrides); $id = isset($this->parameters['id']) ? $this->parameters['id'] : null; $value = isset($this->parameters['value']) ? $this->parameters['value'] : null; $arguments = isset($this-...
[ "public", "function", "translate", "(", "array", "$", "overrides", "=", "[", "]", ")", "{", "array_replace_recursive", "(", "$", "this", "->", "parameters", ",", "$", "overrides", ")", ";", "$", "id", "=", "isset", "(", "$", "this", "->", "parameters", ...
Translate according to currently collected parameters @param array $overrides An associative array to override the collected parameters @return string
[ "Translate", "according", "to", "currently", "collected", "parameters" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/EelHelper/TranslationParameterToken.php#L164-L186
neos/flow-development-collection
Neos.Flow/Classes/Mvc/View/AbstractView.php
AbstractView.getOption
public function getOption($optionName) { if (!array_key_exists($optionName, $this->supportedOptions)) { throw new Exception(sprintf('The view option "%s" you\'re trying to get doesn\'t exist in class "%s".', $optionName, get_class($this)), 1359625876); } return $this->options[$o...
php
public function getOption($optionName) { if (!array_key_exists($optionName, $this->supportedOptions)) { throw new Exception(sprintf('The view option "%s" you\'re trying to get doesn\'t exist in class "%s".', $optionName, get_class($this)), 1359625876); } return $this->options[$o...
[ "public", "function", "getOption", "(", "$", "optionName", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "optionName", ",", "$", "this", "->", "supportedOptions", ")", ")", "{", "throw", "new", "Exception", "(", "sprintf", "(", "'The view option \"...
Get a specific option of this View @param string $optionName @return mixed @throws Exception
[ "Get", "a", "specific", "option", "of", "this", "View" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/View/AbstractView.php#L111-L118
neos/flow-development-collection
Neos.Flow/Classes/Mvc/View/AbstractView.php
AbstractView.setOption
public function setOption($optionName, $value) { if (!array_key_exists($optionName, $this->supportedOptions)) { throw new Exception(sprintf('The view option "%s" you\'re trying to set doesn\'t exist in class "%s".', $optionName, get_class($this)), 1359625876); } $this->options[$...
php
public function setOption($optionName, $value) { if (!array_key_exists($optionName, $this->supportedOptions)) { throw new Exception(sprintf('The view option "%s" you\'re trying to set doesn\'t exist in class "%s".', $optionName, get_class($this)), 1359625876); } $this->options[$...
[ "public", "function", "setOption", "(", "$", "optionName", ",", "$", "value", ")", "{", "if", "(", "!", "array_key_exists", "(", "$", "optionName", ",", "$", "this", "->", "supportedOptions", ")", ")", "{", "throw", "new", "Exception", "(", "sprintf", "(...
Set a specific option of this View @param string $optionName @param mixed $value @return void @throws Exception
[ "Set", "a", "specific", "option", "of", "this", "View" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/View/AbstractView.php#L128-L135
neos/flow-development-collection
Neos.Flow/Classes/Mvc/View/AbstractView.php
AbstractView.assignMultiple
public function assignMultiple(array $values) { foreach ($values as $key => $value) { $this->assign($key, $value); } return $this; }
php
public function assignMultiple(array $values) { foreach ($values as $key => $value) { $this->assign($key, $value); } return $this; }
[ "public", "function", "assignMultiple", "(", "array", "$", "values", ")", "{", "foreach", "(", "$", "values", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "this", "->", "assign", "(", "$", "key", ",", "$", "value", ")", ";", "}", "return", ...
Add multiple variables to $this->variables. @param array $values array in the format array(key1 => value1, key2 => value2) @return AbstractView an instance of $this, to enable chaining @api
[ "Add", "multiple", "variables", "to", "$this", "-", ">", "variables", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Mvc/View/AbstractView.php#L159-L165
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.initialize
protected function initialize() { if ($this->initialized === true) { return; } $this->initializeStorages(); $this->initializeTargets(); $this->initializeCollections(); $this->initialized = true; }
php
protected function initialize() { if ($this->initialized === true) { return; } $this->initializeStorages(); $this->initializeTargets(); $this->initializeCollections(); $this->initialized = true; }
[ "protected", "function", "initialize", "(", ")", "{", "if", "(", "$", "this", "->", "initialized", "===", "true", ")", "{", "return", ";", "}", "$", "this", "->", "initializeStorages", "(", ")", ";", "$", "this", "->", "initializeTargets", "(", ")", ";...
Initializes the ResourceManager by parsing the related configuration and registering the resource stream wrapper. @return void
[ "Initializes", "the", "ResourceManager", "by", "parsing", "the", "related", "configuration", "and", "registering", "the", "resource", "stream", "wrapper", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L125-L135
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.importResource
public function importResource($source, $collectionName = ResourceManager::DEFAULT_PERSISTENT_COLLECTION_NAME, $forcedPersistenceObjectIdentifier = null) { $this->initialize(); if (!isset($this->collections[$collectionName])) { throw new Exception(sprintf('Tried to import a file into the...
php
public function importResource($source, $collectionName = ResourceManager::DEFAULT_PERSISTENT_COLLECTION_NAME, $forcedPersistenceObjectIdentifier = null) { $this->initialize(); if (!isset($this->collections[$collectionName])) { throw new Exception(sprintf('Tried to import a file into the...
[ "public", "function", "importResource", "(", "$", "source", ",", "$", "collectionName", "=", "ResourceManager", "::", "DEFAULT_PERSISTENT_COLLECTION_NAME", ",", "$", "forcedPersistenceObjectIdentifier", "=", "null", ")", "{", "$", "this", "->", "initialize", "(", ")...
Imports a resource (file) from the given location as a persistent resource. On a successful import this method returns a PersistentResource object representing the newly imported persistent resource and automatically publishes it to the configured publication target. @param string|resource $source A URI (can therefor...
[ "Imports", "a", "resource", "(", "file", ")", "from", "the", "given", "location", "as", "a", "persistent", "resource", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L151-L177
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.importResourceFromContent
public function importResourceFromContent($content, $filename, $collectionName = ResourceManager::DEFAULT_PERSISTENT_COLLECTION_NAME, $forcedPersistenceObjectIdentifier = null) { if (!is_string($content)) { throw new Exception(sprintf('Tried to import content into the resource collection "%s" bu...
php
public function importResourceFromContent($content, $filename, $collectionName = ResourceManager::DEFAULT_PERSISTENT_COLLECTION_NAME, $forcedPersistenceObjectIdentifier = null) { if (!is_string($content)) { throw new Exception(sprintf('Tried to import content into the resource collection "%s" bu...
[ "public", "function", "importResourceFromContent", "(", "$", "content", ",", "$", "filename", ",", "$", "collectionName", "=", "ResourceManager", "::", "DEFAULT_PERSISTENT_COLLECTION_NAME", ",", "$", "forcedPersistenceObjectIdentifier", "=", "null", ")", "{", "if", "(...
Imports the given content passed as a string as a new persistent resource. The given content typically is binary data or a text format. On a successful import this method returns a PersistentResource object representing the imported content and automatically publishes it to the configured publication target. The spec...
[ "Imports", "the", "given", "content", "passed", "as", "a", "string", "as", "a", "new", "persistent", "resource", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L197-L225
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.importUploadedResource
public function importUploadedResource(array $uploadInfo, $collectionName = self::DEFAULT_PERSISTENT_COLLECTION_NAME) { $this->initialize(); if (!isset($this->collections[$collectionName])) { throw new Exception(sprintf('Tried to import an uploaded file into the resource collection "%s" ...
php
public function importUploadedResource(array $uploadInfo, $collectionName = self::DEFAULT_PERSISTENT_COLLECTION_NAME) { $this->initialize(); if (!isset($this->collections[$collectionName])) { throw new Exception(sprintf('Tried to import an uploaded file into the resource collection "%s" ...
[ "public", "function", "importUploadedResource", "(", "array", "$", "uploadInfo", ",", "$", "collectionName", "=", "self", "::", "DEFAULT_PERSISTENT_COLLECTION_NAME", ")", "{", "$", "this", "->", "initialize", "(", ")", ";", "if", "(", "!", "isset", "(", "$", ...
Imports a resource (file) from the given upload info array as a persistent resource. On a successful import this method returns a PersistentResource object representing the newly imported persistent resource. @param array $uploadInfo An array detailing the resource to import (expected keys: name, tmp_name) @param str...
[ "Imports", "a", "resource", "(", "file", ")", "from", "the", "given", "upload", "info", "array", "as", "a", "persistent", "resource", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L239-L261
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.getStreamByResource
public function getStreamByResource(PersistentResource $resource) { $this->initialize(); $collectionName = $resource->getCollectionName(); if (!isset($this->collections[$collectionName])) { return false; } return $this->collections[$collectionName]->getStreamByRes...
php
public function getStreamByResource(PersistentResource $resource) { $this->initialize(); $collectionName = $resource->getCollectionName(); if (!isset($this->collections[$collectionName])) { return false; } return $this->collections[$collectionName]->getStreamByRes...
[ "public", "function", "getStreamByResource", "(", "PersistentResource", "$", "resource", ")", "{", "$", "this", "->", "initialize", "(", ")", ";", "$", "collectionName", "=", "$", "resource", "->", "getCollectionName", "(", ")", ";", "if", "(", "!", "isset",...
Returns a stream handle of the given persistent resource which allows for opening / copying the resource's data. Note that this stream handle may only be used read-only. @param PersistentResource $resource The resource to retrieve the stream for @return resource|boolean The resource stream or false if the stream could...
[ "Returns", "a", "stream", "handle", "of", "the", "given", "persistent", "resource", "which", "allows", "for", "opening", "/", "copying", "the", "resource", "s", "data", ".", "Note", "that", "this", "stream", "handle", "may", "only", "be", "used", "read", "...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L284-L292
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.deleteResource
public function deleteResource(PersistentResource $resource, $unpublishResource = true) { $this->initialize(); $collectionName = $resource->getCollectionName(); $result = $this->resourceRepository->findBySha1AndCollectionName($resource->getSha1(), $collectionName); if (count($resul...
php
public function deleteResource(PersistentResource $resource, $unpublishResource = true) { $this->initialize(); $collectionName = $resource->getCollectionName(); $result = $this->resourceRepository->findBySha1AndCollectionName($resource->getSha1(), $collectionName); if (count($resul...
[ "public", "function", "deleteResource", "(", "PersistentResource", "$", "resource", ",", "$", "unpublishResource", "=", "true", ")", "{", "$", "this", "->", "initialize", "(", ")", ";", "$", "collectionName", "=", "$", "resource", "->", "getCollectionName", "(...
Deletes the given PersistentResource from the ResourceRepository and, if the storage data is no longer used in another PersistentResource object, also deletes the data from the storage. This method will also remove the PersistentResource object from the (internal) ResourceRepository. @param PersistentResource $resour...
[ "Deletes", "the", "given", "PersistentResource", "from", "the", "ResourceRepository", "and", "if", "the", "storage", "data", "is", "no", "longer", "used", "in", "another", "PersistentResource", "object", "also", "deletes", "the", "data", "from", "the", "storage", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L324-L366
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.getPublicPersistentResourceUri
public function getPublicPersistentResourceUri(PersistentResource $resource) { $this->initialize(); if (!isset($this->collections[$resource->getCollectionName()])) { return false; } /** @var TargetInterface $target */ $target = $this->collections[$resource->getCo...
php
public function getPublicPersistentResourceUri(PersistentResource $resource) { $this->initialize(); if (!isset($this->collections[$resource->getCollectionName()])) { return false; } /** @var TargetInterface $target */ $target = $this->collections[$resource->getCo...
[ "public", "function", "getPublicPersistentResourceUri", "(", "PersistentResource", "$", "resource", ")", "{", "$", "this", "->", "initialize", "(", ")", ";", "if", "(", "!", "isset", "(", "$", "this", "->", "collections", "[", "$", "resource", "->", "getColl...
Returns the web accessible URI for the given resource object @param PersistentResource $resource The resource object @return string|boolean A URI as a string or false if the collection of the resource is not found @api
[ "Returns", "the", "web", "accessible", "URI", "for", "the", "given", "resource", "object" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L375-L386
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.getPublicPersistentResourceUriByHash
public function getPublicPersistentResourceUriByHash($resourceHash, $collectionName = self::DEFAULT_PERSISTENT_COLLECTION_NAME) { $this->initialize(); if (!isset($this->collections[$collectionName])) { throw new Exception(sprintf('Could not determine persistent resource URI for "%s" bec...
php
public function getPublicPersistentResourceUriByHash($resourceHash, $collectionName = self::DEFAULT_PERSISTENT_COLLECTION_NAME) { $this->initialize(); if (!isset($this->collections[$collectionName])) { throw new Exception(sprintf('Could not determine persistent resource URI for "%s" bec...
[ "public", "function", "getPublicPersistentResourceUriByHash", "(", "$", "resourceHash", ",", "$", "collectionName", "=", "self", "::", "DEFAULT_PERSISTENT_COLLECTION_NAME", ")", "{", "$", "this", "->", "initialize", "(", ")", ";", "if", "(", "!", "isset", "(", "...
Returns the web accessible URI for the resource object specified by the given SHA1 hash. @param string $resourceHash The SHA1 hash identifying the resource content @param string $collectionName Name of the collection the resource is part of @return string A URI as a string @throws Exception @api
[ "Returns", "the", "web", "accessible", "URI", "for", "the", "resource", "object", "specified", "by", "the", "given", "SHA1", "hash", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L398-L413
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.getPublicPackageResourceUri
public function getPublicPackageResourceUri($packageKey, $relativePathAndFilename) { $this->initialize(); /** @var TargetInterface $target */ $target = $this->collections[self::DEFAULT_STATIC_COLLECTION_NAME]->getTarget(); return $target->getPublicStaticResourceUri($packageKey . '/'...
php
public function getPublicPackageResourceUri($packageKey, $relativePathAndFilename) { $this->initialize(); /** @var TargetInterface $target */ $target = $this->collections[self::DEFAULT_STATIC_COLLECTION_NAME]->getTarget(); return $target->getPublicStaticResourceUri($packageKey . '/'...
[ "public", "function", "getPublicPackageResourceUri", "(", "$", "packageKey", ",", "$", "relativePathAndFilename", ")", "{", "$", "this", "->", "initialize", "(", ")", ";", "/** @var TargetInterface $target */", "$", "target", "=", "$", "this", "->", "collections", ...
Returns the public URI for a static resource provided by the specified package and in the given path below the package's resources directory. @param string $packageKey Package key @param string $relativePathAndFilename A relative path below the "Resources" directory of the package @return string @api
[ "Returns", "the", "public", "URI", "for", "a", "static", "resource", "provided", "by", "the", "specified", "package", "and", "in", "the", "given", "path", "below", "the", "package", "s", "resources", "directory", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L424-L431
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.getPublicPackageResourceUriByPath
public function getPublicPackageResourceUriByPath($path) { $this->initialize(); list($packageKey, $relativePathAndFilename) = $this->getPackageAndPathByPublicPath($path); return $this->getPublicPackageResourceUri($packageKey, $relativePathAndFilename); }
php
public function getPublicPackageResourceUriByPath($path) { $this->initialize(); list($packageKey, $relativePathAndFilename) = $this->getPackageAndPathByPublicPath($path); return $this->getPublicPackageResourceUri($packageKey, $relativePathAndFilename); }
[ "public", "function", "getPublicPackageResourceUriByPath", "(", "$", "path", ")", "{", "$", "this", "->", "initialize", "(", ")", ";", "list", "(", "$", "packageKey", ",", "$", "relativePathAndFilename", ")", "=", "$", "this", "->", "getPackageAndPathByPublicPat...
Returns the public URI for a static resource provided by the public package @param string $path The ressource path, like resource://Your.Package/Public/Image/Dummy.png @return string @api
[ "Returns", "the", "public", "URI", "for", "a", "static", "resource", "provided", "by", "the", "public", "package" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L440-L445
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.getPackageAndPathByPublicPath
public function getPackageAndPathByPublicPath($path) { if (preg_match(self::PUBLIC_RESSOURCE_REGEXP, $path, $matches) !== 1) { throw new Exception(sprintf('The path "%s" which was given must point to a public resource.', $path), 1450358448); } return [ 0 => $matches['...
php
public function getPackageAndPathByPublicPath($path) { if (preg_match(self::PUBLIC_RESSOURCE_REGEXP, $path, $matches) !== 1) { throw new Exception(sprintf('The path "%s" which was given must point to a public resource.', $path), 1450358448); } return [ 0 => $matches['...
[ "public", "function", "getPackageAndPathByPublicPath", "(", "$", "path", ")", "{", "if", "(", "preg_match", "(", "self", "::", "PUBLIC_RESSOURCE_REGEXP", ",", "$", "path", ",", "$", "matches", ")", "!==", "1", ")", "{", "throw", "new", "Exception", "(", "s...
Return the package key and the relative path and filename from the given resource path @param string $path The ressource path, like resource://Your.Package/Public/Image/Dummy.png @return array The array contains two value, first the packageKey followed by the relativePathAndFilename @throws Exception @api
[ "Return", "the", "package", "key", "and", "the", "relative", "path", "and", "filename", "from", "the", "given", "resource", "path" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L455-L464
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.getStorage
public function getStorage($storageName) { $this->initialize(); return isset($this->storages[$storageName]) ? $this->storages[$storageName] : null; }
php
public function getStorage($storageName) { $this->initialize(); return isset($this->storages[$storageName]) ? $this->storages[$storageName] : null; }
[ "public", "function", "getStorage", "(", "$", "storageName", ")", "{", "$", "this", "->", "initialize", "(", ")", ";", "return", "isset", "(", "$", "this", "->", "storages", "[", "$", "storageName", "]", ")", "?", "$", "this", "->", "storages", "[", ...
Returns a Storage instance by the given name @param string $storageName Name of the storage as defined in the settings @return StorageInterface or NULL
[ "Returns", "a", "Storage", "instance", "by", "the", "given", "name" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L472-L477
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.getCollection
public function getCollection($collectionName) { $this->initialize(); return isset($this->collections[$collectionName]) ? $this->collections[$collectionName] : null; }
php
public function getCollection($collectionName) { $this->initialize(); return isset($this->collections[$collectionName]) ? $this->collections[$collectionName] : null; }
[ "public", "function", "getCollection", "(", "$", "collectionName", ")", "{", "$", "this", "->", "initialize", "(", ")", ";", "return", "isset", "(", "$", "this", "->", "collections", "[", "$", "collectionName", "]", ")", "?", "$", "this", "->", "collecti...
Returns a Collection instance by the given name @param string $collectionName Name of the collection as defined in the settings @return CollectionInterface or NULL @api
[ "Returns", "a", "Collection", "instance", "by", "the", "given", "name" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L486-L491
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.getCollectionsByStorage
public function getCollectionsByStorage(StorageInterface $storage) { $this->initialize(); $collections = []; foreach ($this->collections as $collectionName => $collection) { /** @var CollectionInterface $collection */ if ($collection->getStorage() === $storage) { ...
php
public function getCollectionsByStorage(StorageInterface $storage) { $this->initialize(); $collections = []; foreach ($this->collections as $collectionName => $collection) { /** @var CollectionInterface $collection */ if ($collection->getStorage() === $storage) { ...
[ "public", "function", "getCollectionsByStorage", "(", "StorageInterface", "$", "storage", ")", "{", "$", "this", "->", "initialize", "(", ")", ";", "$", "collections", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "collections", "as", "$", "collec...
Returns an array of Collection instances which use the given storage @param StorageInterface $storage @return array<CollectionInterface>
[ "Returns", "an", "array", "of", "Collection", "instances", "which", "use", "the", "given", "storage" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L511-L523
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.shutdownObject
public function shutdownObject() { /** @var PersistentResource $resource */ foreach ($this->resourceRepository->getAddedResources() as $resource) { if ($this->persistenceManager->isNewObject($resource)) { $this->deleteResource($resource, false); } } ...
php
public function shutdownObject() { /** @var PersistentResource $resource */ foreach ($this->resourceRepository->getAddedResources() as $resource) { if ($this->persistenceManager->isNewObject($resource)) { $this->deleteResource($resource, false); } } ...
[ "public", "function", "shutdownObject", "(", ")", "{", "/** @var PersistentResource $resource */", "foreach", "(", "$", "this", "->", "resourceRepository", "->", "getAddedResources", "(", ")", "as", "$", "resource", ")", "{", "if", "(", "$", "this", "->", "persi...
Checks if recently imported resources really have been persisted - and if not, removes its data from the respective storage. @return void
[ "Checks", "if", "recently", "imported", "resources", "really", "have", "been", "persisted", "-", "and", "if", "not", "removes", "its", "data", "from", "the", "respective", "storage", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L531-L539
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.initializeStorages
protected function initializeStorages() { foreach ($this->settings['storages'] as $storageName => $storageDefinition) { if (!isset($storageDefinition['storage'])) { throw new Exception(sprintf('The configuration for the resource storage "%s" defined in your settings has no valid ...
php
protected function initializeStorages() { foreach ($this->settings['storages'] as $storageName => $storageDefinition) { if (!isset($storageDefinition['storage'])) { throw new Exception(sprintf('The configuration for the resource storage "%s" defined in your settings has no valid ...
[ "protected", "function", "initializeStorages", "(", ")", "{", "foreach", "(", "$", "this", "->", "settings", "[", "'storages'", "]", "as", "$", "storageName", "=>", "$", "storageDefinition", ")", "{", "if", "(", "!", "isset", "(", "$", "storageDefinition", ...
Initializes the Storage objects according to the current settings @return void @throws Exception if the storage configuration is invalid
[ "Initializes", "the", "Storage", "objects", "according", "to", "the", "current", "settings" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L547-L559
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.initializeTargets
protected function initializeTargets() { foreach ($this->settings['targets'] as $targetName => $targetDefinition) { if (!isset($targetDefinition['target'])) { throw new Exception(sprintf('The configuration for the resource target "%s" defined in your settings has no valid "target...
php
protected function initializeTargets() { foreach ($this->settings['targets'] as $targetName => $targetDefinition) { if (!isset($targetDefinition['target'])) { throw new Exception(sprintf('The configuration for the resource target "%s" defined in your settings has no valid "target...
[ "protected", "function", "initializeTargets", "(", ")", "{", "foreach", "(", "$", "this", "->", "settings", "[", "'targets'", "]", "as", "$", "targetName", "=>", "$", "targetDefinition", ")", "{", "if", "(", "!", "isset", "(", "$", "targetDefinition", "[",...
Initializes the Target objects according to the current settings @return void @throws Exception if the target configuration is invalid
[ "Initializes", "the", "Target", "objects", "according", "to", "the", "current", "settings" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L567-L579
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.initializeCollections
protected function initializeCollections() { foreach ($this->settings['collections'] as $collectionName => $collectionDefinition) { if (!isset($collectionDefinition['storage'])) { throw new Exception(sprintf('The configuration for the resource collection "%s" defined in your sett...
php
protected function initializeCollections() { foreach ($this->settings['collections'] as $collectionName => $collectionDefinition) { if (!isset($collectionDefinition['storage'])) { throw new Exception(sprintf('The configuration for the resource collection "%s" defined in your sett...
[ "protected", "function", "initializeCollections", "(", ")", "{", "foreach", "(", "$", "this", "->", "settings", "[", "'collections'", "]", "as", "$", "collectionName", "=>", "$", "collectionDefinition", ")", "{", "if", "(", "!", "isset", "(", "$", "collectio...
Initializes the Collection objects according to the current settings @return void @throws Exception if the collection configuration is invalid
[ "Initializes", "the", "Collection", "objects", "according", "to", "the", "current", "settings" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L587-L608
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/ResourceManager.php
ResourceManager.prepareUploadedFileForImport
protected function prepareUploadedFileForImport(array $uploadInfo) { $openBasedirEnabled = (boolean)ini_get('open_basedir'); $temporaryTargetPathAndFilename = $uploadInfo['tmp_name']; $pathInfo = UnicodeFunctions::pathinfo($uploadInfo['name']); if (!is_uploaded_file($temporaryTarget...
php
protected function prepareUploadedFileForImport(array $uploadInfo) { $openBasedirEnabled = (boolean)ini_get('open_basedir'); $temporaryTargetPathAndFilename = $uploadInfo['tmp_name']; $pathInfo = UnicodeFunctions::pathinfo($uploadInfo['name']); if (!is_uploaded_file($temporaryTarget...
[ "protected", "function", "prepareUploadedFileForImport", "(", "array", "$", "uploadInfo", ")", "{", "$", "openBasedirEnabled", "=", "(", "boolean", ")", "ini_get", "(", "'open_basedir'", ")", ";", "$", "temporaryTargetPathAndFilename", "=", "$", "uploadInfo", "[", ...
Prepare an uploaded file to be imported as resource object. Will check the validity of the file, move it outside of upload folder if open_basedir is enabled and check the filename. @param array $uploadInfo @return array Array of string with the two keys "filepath" (the path to get the filecontent from) and "filename" ...
[ "Prepare", "an", "uploaded", "file", "to", "be", "imported", "as", "resource", "object", ".", "Will", "check", "the", "validity", "of", "the", "file", "move", "it", "outside", "of", "upload", "folder", "if", "open_basedir", "is", "enabled", "and", "check", ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/ResourceManager.php#L618-L649
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/DataTypes/JsonArrayType.php
JsonArrayType.convertToDatabaseValue
public function convertToDatabaseValue($array, AbstractPlatform $platform) { if ($array === null) { return null; } $this->initializeDependencies(); $this->encodeObjectReferences($array); return json_encode($array, JSON_PRETTY_PRINT | JSON_FORCE_OBJECT | JSON_UNE...
php
public function convertToDatabaseValue($array, AbstractPlatform $platform) { if ($array === null) { return null; } $this->initializeDependencies(); $this->encodeObjectReferences($array); return json_encode($array, JSON_PRETTY_PRINT | JSON_FORCE_OBJECT | JSON_UNE...
[ "public", "function", "convertToDatabaseValue", "(", "$", "array", ",", "AbstractPlatform", "$", "platform", ")", "{", "if", "(", "$", "array", "===", "null", ")", "{", "return", "null", ";", "}", "$", "this", "->", "initializeDependencies", "(", ")", ";",...
Converts a value from its PHP representation to its database representation of this type. @param array $array The value to convert. @param AbstractPlatform $platform The currently used database platform. @return mixed The database representation of the value.
[ "Converts", "a", "value", "from", "its", "PHP", "representation", "to", "its", "database", "representation", "of", "this", "type", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/DataTypes/JsonArrayType.php#L121-L131
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/DataTypes/JsonArrayType.php
JsonArrayType.initializeDependencies
protected function initializeDependencies() { if ($this->persistenceManager === null) { $this->persistenceManager = Bootstrap::$staticObjectManager->get(PersistenceManagerInterface::class); $this->reflectionService = Bootstrap::$staticObjectManager->get(ReflectionService::class); ...
php
protected function initializeDependencies() { if ($this->persistenceManager === null) { $this->persistenceManager = Bootstrap::$staticObjectManager->get(PersistenceManagerInterface::class); $this->reflectionService = Bootstrap::$staticObjectManager->get(ReflectionService::class); ...
[ "protected", "function", "initializeDependencies", "(", ")", "{", "if", "(", "$", "this", "->", "persistenceManager", "===", "null", ")", "{", "$", "this", "->", "persistenceManager", "=", "Bootstrap", "::", "$", "staticObjectManager", "->", "get", "(", "Persi...
Fetches dependencies from the static object manager. Injection cannot be used, since __construct on Types\Type is final. @return void
[ "Fetches", "dependencies", "from", "the", "static", "object", "manager", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/DataTypes/JsonArrayType.php#L140-L146
neos/flow-development-collection
Neos.Flow/Classes/Persistence/Doctrine/DataTypes/JsonArrayType.php
JsonArrayType.decodeObjectReferences
protected function decodeObjectReferences(array &$array) { foreach ($array as &$value) { if (!is_array($value)) { continue; } if (isset($value['__flow_object_type'])) { $value = $this->persistenceManager->getObjectByIdentifier($value['__id...
php
protected function decodeObjectReferences(array &$array) { foreach ($array as &$value) { if (!is_array($value)) { continue; } if (isset($value['__flow_object_type'])) { $value = $this->persistenceManager->getObjectByIdentifier($value['__id...
[ "protected", "function", "decodeObjectReferences", "(", "array", "&", "$", "array", ")", "{", "foreach", "(", "$", "array", "as", "&", "$", "value", ")", "{", "if", "(", "!", "is_array", "(", "$", "value", ")", ")", "{", "continue", ";", "}", "if", ...
Traverses the $array and replaces known persisted objects (tuples of type and identifier) with actual instances. @param array $array @return void
[ "Traverses", "the", "$array", "and", "replaces", "known", "persisted", "objects", "(", "tuples", "of", "type", "and", "identifier", ")", "with", "actual", "instances", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Persistence/Doctrine/DataTypes/JsonArrayType.php#L155-L168
neos/flow-development-collection
Neos.Flow/Classes/I18n/Utility.php
Utility.parseAcceptLanguageHeader
public static function parseAcceptLanguageHeader($acceptLanguageHeader) { $acceptLanguageHeader = str_replace(' ', '', $acceptLanguageHeader); $matchingLanguages = []; if (preg_match_all(self::PATTERN_MATCH_ACCEPTLANGUAGE, $acceptLanguageHeader, $matches, \PREG_PATTERN_ORDER) !== false) { ...
php
public static function parseAcceptLanguageHeader($acceptLanguageHeader) { $acceptLanguageHeader = str_replace(' ', '', $acceptLanguageHeader); $matchingLanguages = []; if (preg_match_all(self::PATTERN_MATCH_ACCEPTLANGUAGE, $acceptLanguageHeader, $matches, \PREG_PATTERN_ORDER) !== false) { ...
[ "public", "static", "function", "parseAcceptLanguageHeader", "(", "$", "acceptLanguageHeader", ")", "{", "$", "acceptLanguageHeader", "=", "str_replace", "(", "' '", ",", "''", ",", "$", "acceptLanguageHeader", ")", ";", "$", "matchingLanguages", "=", "[", "]", ...
Parses Accept-Language header and returns array of locale tags (like: en-GB, en), or false if no tags were found. This method only returns tags that conforms ISO 639 for language codes and ISO 3166 for region codes. HTTP spec (RFC 2616) defines both of these parts as 1*8ALPHA, but this method ignores tags with longer ...
[ "Parses", "Accept", "-", "Language", "header", "and", "returns", "array", "of", "locale", "tags", "(", "like", ":", "en", "-", "GB", "en", ")", "or", "false", "if", "no", "tags", "were", "found", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Utility.php#L47-L80
neos/flow-development-collection
Neos.Flow/Classes/I18n/Utility.php
Utility.extractLocaleTagFromFilename
public static function extractLocaleTagFromFilename($filename) { if (strpos($filename, '.') === false) { return false; } $filenameParts = explode('.', $filename); if (in_array($filenameParts[count($filenameParts) - 2], ['php', 'rss', 'xml'])) { return false;...
php
public static function extractLocaleTagFromFilename($filename) { if (strpos($filename, '.') === false) { return false; } $filenameParts = explode('.', $filename); if (in_array($filenameParts[count($filenameParts) - 2], ['php', 'rss', 'xml'])) { return false;...
[ "public", "static", "function", "extractLocaleTagFromFilename", "(", "$", "filename", ")", "{", "if", "(", "strpos", "(", "$", "filename", ",", "'.'", ")", "===", "false", ")", "{", "return", "false", ";", "}", "$", "filenameParts", "=", "explode", "(", ...
Extracts a locale tag (identifier) from the filename given. Locale tag should be placed just before the extension of the file. For example, filename bar.png can be localized as bar.en_GB.png, and this method extracts en_GB from the name. Note: this ignores matches on rss, xml and php and validates the identifier. @p...
[ "Extracts", "a", "locale", "tag", "(", "identifier", ")", "from", "the", "filename", "given", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Utility.php#L94-L111
neos/flow-development-collection
Neos.Flow/Classes/I18n/Utility.php
Utility.extractLocaleTagFromDirectory
public static function extractLocaleTagFromDirectory($directory) { $directoryParts = explode('/', rtrim($directory, '/')); $lastDirectoryPart = array_pop($directoryParts); if ($lastDirectoryPart !== null && preg_match(Locale::PATTERN_MATCH_LOCALEIDENTIFIER, $lastDirectoryPart) === 1) { ...
php
public static function extractLocaleTagFromDirectory($directory) { $directoryParts = explode('/', rtrim($directory, '/')); $lastDirectoryPart = array_pop($directoryParts); if ($lastDirectoryPart !== null && preg_match(Locale::PATTERN_MATCH_LOCALEIDENTIFIER, $lastDirectoryPart) === 1) { ...
[ "public", "static", "function", "extractLocaleTagFromDirectory", "(", "$", "directory", ")", "{", "$", "directoryParts", "=", "explode", "(", "'/'", ",", "rtrim", "(", "$", "directory", ",", "'/'", ")", ")", ";", "$", "lastDirectoryPart", "=", "array_pop", "...
Extracts a locale tag (identifier) from the directory name given. Note: Locale tag will be extracted from the last directory path segment only. @param string $directory Directory path to extract locale identifier from @return mixed The string with extracted locale identifier of false on failure
[ "Extracts", "a", "locale", "tag", "(", "identifier", ")", "from", "the", "directory", "name", "given", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Utility.php#L121-L131
neos/flow-development-collection
Neos.Flow/Classes/I18n/Utility.php
Utility.stringBeginsWith
public static function stringBeginsWith($haystack, $needle) { if (!empty($needle) && strncmp($haystack, $needle, strlen($needle)) === 0) { return true; } return false; }
php
public static function stringBeginsWith($haystack, $needle) { if (!empty($needle) && strncmp($haystack, $needle, strlen($needle)) === 0) { return true; } return false; }
[ "public", "static", "function", "stringBeginsWith", "(", "$", "haystack", ",", "$", "needle", ")", "{", "if", "(", "!", "empty", "(", "$", "needle", ")", "&&", "strncmp", "(", "$", "haystack", ",", "$", "needle", ",", "strlen", "(", "$", "needle", ")...
Checks if $haystack string begins with $needle string. @param string $haystack @param string $needle @return boolean true if $haystack begins with $needle
[ "Checks", "if", "$haystack", "string", "begins", "with", "$needle", "string", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Utility.php#L140-L147
neos/flow-development-collection
Neos.Flow/Classes/I18n/Utility.php
Utility.stringEndsWith
public static function stringEndsWith($haystack, $needle) { if (substr($haystack, - strlen($needle)) === $needle) { return true; } return false; }
php
public static function stringEndsWith($haystack, $needle) { if (substr($haystack, - strlen($needle)) === $needle) { return true; } return false; }
[ "public", "static", "function", "stringEndsWith", "(", "$", "haystack", ",", "$", "needle", ")", "{", "if", "(", "substr", "(", "$", "haystack", ",", "-", "strlen", "(", "$", "needle", ")", ")", "===", "$", "needle", ")", "{", "return", "true", ";", ...
Checks if $haystack string ends with $needle string. @param string $haystack @param string $needle @return boolean true if $haystack ends with $needle
[ "Checks", "if", "$haystack", "string", "ends", "with", "$needle", "string", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/I18n/Utility.php#L156-L163
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Format/BytesViewHelper.php
BytesViewHelper.renderStatic
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) { $value = $arguments['value']; if ($value === null) { $value = $renderChildrenClosure(); } if (!is_integer($value) && !is_float($value)) { ...
php
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) { $value = $arguments['value']; if ($value === null) { $value = $renderChildrenClosure(); } if (!is_integer($value) && !is_float($value)) { ...
[ "public", "static", "function", "renderStatic", "(", "array", "$", "arguments", ",", "\\", "Closure", "$", "renderChildrenClosure", ",", "RenderingContextInterface", "$", "renderingContext", ")", "{", "$", "value", "=", "$", "arguments", "[", "'value'", "]", ";"...
Applies htmlspecialchars() on the specified value. @param array $arguments @param \Closure $renderChildrenClosure @param \TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $renderingContext @return string
[ "Applies", "htmlspecialchars", "()", "on", "the", "specified", "value", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Format/BytesViewHelper.php#L77-L91
neos/flow-development-collection
Neos.Flow/Classes/Package/GenericPackage.php
GenericPackage.getClassFiles
public function getClassFiles() { foreach ($this->getFlattenedAutoloadConfiguration() as $configuration) { $normalizedAutoloadPath = $this->normalizeAutoloadPath($configuration['mappingType'], $configuration['namespace'], $configuration['classPath']); if (!is_dir($normalizedAutoloadP...
php
public function getClassFiles() { foreach ($this->getFlattenedAutoloadConfiguration() as $configuration) { $normalizedAutoloadPath = $this->normalizeAutoloadPath($configuration['mappingType'], $configuration['namespace'], $configuration['classPath']); if (!is_dir($normalizedAutoloadP...
[ "public", "function", "getClassFiles", "(", ")", "{", "foreach", "(", "$", "this", "->", "getFlattenedAutoloadConfiguration", "(", ")", "as", "$", "configuration", ")", "{", "$", "normalizedAutoloadPath", "=", "$", "this", "->", "normalizeAutoloadPath", "(", "$"...
Returns the array of filenames of the class files @return \Generator A Generator for class names (key) and their filename, including the absolute path.
[ "Returns", "the", "array", "of", "filenames", "of", "the", "class", "files" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/GenericPackage.php#L87-L98
neos/flow-development-collection
Neos.Flow/Classes/Package/GenericPackage.php
GenericPackage.explodeAutoloadConfiguration
protected function explodeAutoloadConfiguration() { $this->namespaces = []; $this->autoloadTypes = []; $this->flattenedAutoloadConfiguration = []; $allAutoloadConfiguration = $this->autoloadConfiguration; foreach ($allAutoloadConfiguration as $autoloadType => $autoloadConfigu...
php
protected function explodeAutoloadConfiguration() { $this->namespaces = []; $this->autoloadTypes = []; $this->flattenedAutoloadConfiguration = []; $allAutoloadConfiguration = $this->autoloadConfiguration; foreach ($allAutoloadConfiguration as $autoloadType => $autoloadConfigu...
[ "protected", "function", "explodeAutoloadConfiguration", "(", ")", "{", "$", "this", "->", "namespaces", "=", "[", "]", ";", "$", "this", "->", "autoloadTypes", "=", "[", "]", ";", "$", "this", "->", "flattenedAutoloadConfiguration", "=", "[", "]", ";", "$...
Brings the composer autoload configuration into an easy to use format for various parts of Flow. @return void
[ "Brings", "the", "composer", "autoload", "configuration", "into", "an", "easy", "to", "use", "format", "for", "various", "parts", "of", "Flow", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Package/GenericPackage.php#L298-L320
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemSymlinkTarget.php
FileSystemSymlinkTarget.publishCollection
public function publishCollection(CollectionInterface $collection, callable $callback = null) { $storage = $collection->getStorage(); if ($storage instanceof PackageStorage) { foreach ($storage->getPublicResourcePaths() as $packageKey => $path) { $this->publishDirectory($...
php
public function publishCollection(CollectionInterface $collection, callable $callback = null) { $storage = $collection->getStorage(); if ($storage instanceof PackageStorage) { foreach ($storage->getPublicResourcePaths() as $packageKey => $path) { $this->publishDirectory($...
[ "public", "function", "publishCollection", "(", "CollectionInterface", "$", "collection", ",", "callable", "$", "callback", "=", "null", ")", "{", "$", "storage", "=", "$", "collection", "->", "getStorage", "(", ")", ";", "if", "(", "$", "storage", "instance...
Publishes the whole collection to this target @param CollectionInterface $collection The collection to publish @param callable $callback Function called after each resource publishing @return void
[ "Publishes", "the", "whole", "collection", "to", "this", "target" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemSymlinkTarget.php#L39-L49
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemSymlinkTarget.php
FileSystemSymlinkTarget.publishFile
protected function publishFile($sourceStream, $relativeTargetPathAndFilename) { $pathInfo = UnicodeFunctions::pathinfo($relativeTargetPathAndFilename); if (isset($pathInfo['extension']) && array_key_exists(strtolower($pathInfo['extension']), $this->extensionBlacklist) && $this->extensionBlacklist[st...
php
protected function publishFile($sourceStream, $relativeTargetPathAndFilename) { $pathInfo = UnicodeFunctions::pathinfo($relativeTargetPathAndFilename); if (isset($pathInfo['extension']) && array_key_exists(strtolower($pathInfo['extension']), $this->extensionBlacklist) && $this->extensionBlacklist[st...
[ "protected", "function", "publishFile", "(", "$", "sourceStream", ",", "$", "relativeTargetPathAndFilename", ")", "{", "$", "pathInfo", "=", "UnicodeFunctions", "::", "pathinfo", "(", "$", "relativeTargetPathAndFilename", ")", ";", "if", "(", "isset", "(", "$", ...
Publishes the given source stream to this target, with the given relative path. @param resource $sourceStream Stream of the source to publish @param string $relativeTargetPathAndFilename relative path and filename in the target directory @throws TargetException @throws \Exception
[ "Publishes", "the", "given", "source", "stream", "to", "this", "target", "with", "the", "given", "relative", "path", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemSymlinkTarget.php#L59-L103
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemSymlinkTarget.php
FileSystemSymlinkTarget.unpublishFile
protected function unpublishFile($relativeTargetPathAndFilename) { $targetPathAndFilename = $this->path . $relativeTargetPathAndFilename; if (!is_link($targetPathAndFilename) && !file_exists($targetPathAndFilename)) { $message = sprintf('Did not remove file %s because it did not exist.',...
php
protected function unpublishFile($relativeTargetPathAndFilename) { $targetPathAndFilename = $this->path . $relativeTargetPathAndFilename; if (!is_link($targetPathAndFilename) && !file_exists($targetPathAndFilename)) { $message = sprintf('Did not remove file %s because it did not exist.',...
[ "protected", "function", "unpublishFile", "(", "$", "relativeTargetPathAndFilename", ")", "{", "$", "targetPathAndFilename", "=", "$", "this", "->", "path", ".", "$", "relativeTargetPathAndFilename", ";", "if", "(", "!", "is_link", "(", "$", "targetPathAndFilename",...
Removes the specified target file from the public directory This method fails silently if the given file could not be unpublished or already didn't exist anymore. @param string $relativeTargetPathAndFilename relative path and filename in the target directory @return void
[ "Removes", "the", "specified", "target", "file", "from", "the", "public", "directory" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemSymlinkTarget.php#L113-L127
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemSymlinkTarget.php
FileSystemSymlinkTarget.publishDirectory
protected function publishDirectory($sourcePath, $relativeTargetPathAndFilename) { $targetPathAndFilename = $this->path . $relativeTargetPathAndFilename; if (@stat($sourcePath) === false) { throw new TargetException(sprintf('Could not publish directory "%s" into resource publishing targ...
php
protected function publishDirectory($sourcePath, $relativeTargetPathAndFilename) { $targetPathAndFilename = $this->path . $relativeTargetPathAndFilename; if (@stat($sourcePath) === false) { throw new TargetException(sprintf('Could not publish directory "%s" into resource publishing targ...
[ "protected", "function", "publishDirectory", "(", "$", "sourcePath", ",", "$", "relativeTargetPathAndFilename", ")", "{", "$", "targetPathAndFilename", "=", "$", "this", "->", "path", ".", "$", "relativeTargetPathAndFilename", ";", "if", "(", "@", "stat", "(", "...
Publishes the specified directory to this target, with the given relative path. @param string $sourcePath Absolute path to the source directory @param string $relativeTargetPathAndFilename relative path and filename in the target directory @throws TargetException @return void
[ "Publishes", "the", "specified", "directory", "to", "this", "target", "with", "the", "given", "relative", "path", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemSymlinkTarget.php#L137-L168
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Target/FileSystemSymlinkTarget.php
FileSystemSymlinkTarget.setOption
protected function setOption($key, $value) { if ($key === 'relativeSymlinks') { $this->relativeSymlinks = (boolean)$value; return true; } return parent::setOption($key, $value); }
php
protected function setOption($key, $value) { if ($key === 'relativeSymlinks') { $this->relativeSymlinks = (boolean)$value; return true; } return parent::setOption($key, $value); }
[ "protected", "function", "setOption", "(", "$", "key", ",", "$", "value", ")", "{", "if", "(", "$", "key", "===", "'relativeSymlinks'", ")", "{", "$", "this", "->", "relativeSymlinks", "=", "(", "boolean", ")", "$", "value", ";", "return", "true", ";",...
Set an option value and return if it was set. @param string $key @param mixed $value @return boolean
[ "Set", "an", "option", "value", "and", "return", "if", "it", "was", "set", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Target/FileSystemSymlinkTarget.php#L177-L185
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Streams/ResourceStreamWrapper.php
ResourceStreamWrapper.openDirectory
public function openDirectory($path, $options) { $resourceUriOrStream = $this->evaluateResourcePath($path); if (!is_string($resourceUriOrStream)) { return false; } $handle = ($resourceUriOrStream !== false) ? opendir($resourceUriOrStream) : false; if ($handle !== ...
php
public function openDirectory($path, $options) { $resourceUriOrStream = $this->evaluateResourcePath($path); if (!is_string($resourceUriOrStream)) { return false; } $handle = ($resourceUriOrStream !== false) ? opendir($resourceUriOrStream) : false; if ($handle !== ...
[ "public", "function", "openDirectory", "(", "$", "path", ",", "$", "options", ")", "{", "$", "resourceUriOrStream", "=", "$", "this", "->", "evaluateResourcePath", "(", "$", "path", ")", ";", "if", "(", "!", "is_string", "(", "$", "resourceUriOrStream", ")...
Open directory handle. This method is called in response to opendir(). @param string $path Specifies the URL that was passed to opendir(). @param int $options Whether or not to enforce safe_mode (0x04). @return boolean true on success or false on failure.
[ "Open", "directory", "handle", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Streams/ResourceStreamWrapper.php#L95-L107
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Streams/ResourceStreamWrapper.php
ResourceStreamWrapper.makeDirectory
public function makeDirectory($path, $mode, $options) { $resourceUriOrStream = $this->evaluateResourcePath($path, false); if (is_string($resourceUriOrStream)) { mkdir($resourceUriOrStream, $mode, $options&STREAM_MKDIR_RECURSIVE); } }
php
public function makeDirectory($path, $mode, $options) { $resourceUriOrStream = $this->evaluateResourcePath($path, false); if (is_string($resourceUriOrStream)) { mkdir($resourceUriOrStream, $mode, $options&STREAM_MKDIR_RECURSIVE); } }
[ "public", "function", "makeDirectory", "(", "$", "path", ",", "$", "mode", ",", "$", "options", ")", "{", "$", "resourceUriOrStream", "=", "$", "this", "->", "evaluateResourcePath", "(", "$", "path", ",", "false", ")", ";", "if", "(", "is_string", "(", ...
Create a directory. This method is called in response to mkdir(). @param string $path Directory which should be created. @param integer $mode The value passed to mkdir(). @param integer $options A bitwise mask of values, such as STREAM_MKDIR_RECURSIVE. @return void
[ "Create", "a", "directory", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Streams/ResourceStreamWrapper.php#L148-L154
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Streams/ResourceStreamWrapper.php
ResourceStreamWrapper.open
public function open($path, $mode, $options, &$openedPathAndFilename) { // w, a or x should try to create the file // x should fail if file exists - fopen handles that below! if (strpos($mode, 'w') !== false || strpos($mode, 'a') !== false || strpos($mode, 'x') !== false) { $reso...
php
public function open($path, $mode, $options, &$openedPathAndFilename) { // w, a or x should try to create the file // x should fail if file exists - fopen handles that below! if (strpos($mode, 'w') !== false || strpos($mode, 'a') !== false || strpos($mode, 'x') !== false) { $reso...
[ "public", "function", "open", "(", "$", "path", ",", "$", "mode", ",", "$", "options", ",", "&", "$", "openedPathAndFilename", ")", "{", "// w, a or x should try to create the file", "// x should fail if file exists - fopen handles that below!", "if", "(", "strpos", "("...
Opens file or URL. This method is called immediately after the wrapper is initialized (f.e. by fopen() and file_get_contents()). $options can hold one of the following values OR'd together: STREAM_USE_PATH If path is relative, search for the resource using the include_path. STREAM_REPORT_ERRORS If this flag is set, y...
[ "Opens", "file", "or", "URL", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Streams/ResourceStreamWrapper.php#L298-L320
neos/flow-development-collection
Neos.Flow/Classes/ResourceManagement/Streams/ResourceStreamWrapper.php
ResourceStreamWrapper.evaluateResourcePath
protected function evaluateResourcePath($requestedPath, $checkForExistence = true) { $requestPathParts = explode('://', $requestedPath, 2); if ($requestPathParts[0] !== self::SCHEME) { throw new \InvalidArgumentException('The ' . __CLASS__ . ' only supports the \'' . self::SCHEME . '\' s...
php
protected function evaluateResourcePath($requestedPath, $checkForExistence = true) { $requestPathParts = explode('://', $requestedPath, 2); if ($requestPathParts[0] !== self::SCHEME) { throw new \InvalidArgumentException('The ' . __CLASS__ . ' only supports the \'' . self::SCHEME . '\' s...
[ "protected", "function", "evaluateResourcePath", "(", "$", "requestedPath", ",", "$", "checkForExistence", "=", "true", ")", "{", "$", "requestPathParts", "=", "explode", "(", "'://'", ",", "$", "requestedPath", ",", "2", ")", ";", "if", "(", "$", "requestPa...
Evaluates the absolute path and filename of the resource file specified by the given path. @param string $requestedPath @param boolean $checkForExistence Whether a (non-hash) path should be checked for existence before being returned @return mixed The full path and filename or false if the file doesn't exist @throws \...
[ "Evaluates", "the", "absolute", "path", "and", "filename", "of", "the", "resource", "file", "specified", "by", "the", "given", "path", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ResourceManagement/Streams/ResourceStreamWrapper.php#L491-L528
neos/flow-development-collection
Neos.Flow/Classes/Monitor/ChangeDetectionStrategy/ModificationTimeStrategy.php
ModificationTimeStrategy.setFileMonitor
public function setFileMonitor(FileMonitor $fileMonitor) { $this->fileMonitor = $fileMonitor; $this->filesAndModificationTimes = json_decode($this->cache->get($this->fileMonitor->getIdentifier() . '_filesAndModificationTimes'), true); }
php
public function setFileMonitor(FileMonitor $fileMonitor) { $this->fileMonitor = $fileMonitor; $this->filesAndModificationTimes = json_decode($this->cache->get($this->fileMonitor->getIdentifier() . '_filesAndModificationTimes'), true); }
[ "public", "function", "setFileMonitor", "(", "FileMonitor", "$", "fileMonitor", ")", "{", "$", "this", "->", "fileMonitor", "=", "$", "fileMonitor", ";", "$", "this", "->", "filesAndModificationTimes", "=", "json_decode", "(", "$", "this", "->", "cache", "->",...
Initializes this strategy @param FileMonitor $fileMonitor @return void
[ "Initializes", "this", "strategy" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Monitor/ChangeDetectionStrategy/ModificationTimeStrategy.php#L61-L65
neos/flow-development-collection
Neos.Flow/Classes/Monitor/ChangeDetectionStrategy/ModificationTimeStrategy.php
ModificationTimeStrategy.getFileStatus
public function getFileStatus($pathAndFilename) { $actualModificationTime = @filemtime($pathAndFilename); if (isset($this->filesAndModificationTimes[$pathAndFilename])) { if ($actualModificationTime !== false) { if ($this->filesAndModificationTimes[$pathAndFilename] === $...
php
public function getFileStatus($pathAndFilename) { $actualModificationTime = @filemtime($pathAndFilename); if (isset($this->filesAndModificationTimes[$pathAndFilename])) { if ($actualModificationTime !== false) { if ($this->filesAndModificationTimes[$pathAndFilename] === $...
[ "public", "function", "getFileStatus", "(", "$", "pathAndFilename", ")", "{", "$", "actualModificationTime", "=", "@", "filemtime", "(", "$", "pathAndFilename", ")", ";", "if", "(", "isset", "(", "$", "this", "->", "filesAndModificationTimes", "[", "$", "pathA...
Checks if the specified file has changed @param string $pathAndFilename @return integer One of the STATUS_* constants
[ "Checks", "if", "the", "specified", "file", "has", "changed" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Monitor/ChangeDetectionStrategy/ModificationTimeStrategy.php#L73-L99
neos/flow-development-collection
Neos.Flow/Classes/Monitor/ChangeDetectionStrategy/ModificationTimeStrategy.php
ModificationTimeStrategy.setFileDeleted
public function setFileDeleted($pathAndFilename) { if (isset($this->filesAndModificationTimes[$pathAndFilename])) { unset($this->filesAndModificationTimes[$pathAndFilename]); $this->modificationTimesChanged = true; } }
php
public function setFileDeleted($pathAndFilename) { if (isset($this->filesAndModificationTimes[$pathAndFilename])) { unset($this->filesAndModificationTimes[$pathAndFilename]); $this->modificationTimesChanged = true; } }
[ "public", "function", "setFileDeleted", "(", "$", "pathAndFilename", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "filesAndModificationTimes", "[", "$", "pathAndFilename", "]", ")", ")", "{", "unset", "(", "$", "this", "->", "filesAndModificationTimes...
Notify the change strategy that this file was deleted and does not need to be tracked anymore. @param string $pathAndFilename @return void
[ "Notify", "the", "change", "strategy", "that", "this", "file", "was", "deleted", "and", "does", "not", "need", "to", "be", "tracked", "anymore", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Monitor/ChangeDetectionStrategy/ModificationTimeStrategy.php#L107-L113
neos/flow-development-collection
Neos.Flow/Classes/Monitor/ChangeDetectionStrategy/ModificationTimeStrategy.php
ModificationTimeStrategy.shutdownObject
public function shutdownObject() { if ($this->modificationTimesChanged === true) { $this->cache->set($this->fileMonitor->getIdentifier() . '_filesAndModificationTimes', json_encode($this->filesAndModificationTimes)); } }
php
public function shutdownObject() { if ($this->modificationTimesChanged === true) { $this->cache->set($this->fileMonitor->getIdentifier() . '_filesAndModificationTimes', json_encode($this->filesAndModificationTimes)); } }
[ "public", "function", "shutdownObject", "(", ")", "{", "if", "(", "$", "this", "->", "modificationTimesChanged", "===", "true", ")", "{", "$", "this", "->", "cache", "->", "set", "(", "$", "this", "->", "fileMonitor", "->", "getIdentifier", "(", ")", "."...
Caches the file modification times @return void
[ "Caches", "the", "file", "modification", "times" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Monitor/ChangeDetectionStrategy/ModificationTimeStrategy.php#L120-L125
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/TextfieldViewHelper.php
TextfieldViewHelper.render
public function render() { $name = $this->getName(); $this->registerFieldNameForFormTokenGeneration($name); $this->tag->addAttribute('name', $name); $value = $this->getValueAttribute(); if ($value !== null) { $this->tag->addAttribute('value', $value); }...
php
public function render() { $name = $this->getName(); $this->registerFieldNameForFormTokenGeneration($name); $this->tag->addAttribute('name', $name); $value = $this->getValueAttribute(); if ($value !== null) { $this->tag->addAttribute('value', $value); }...
[ "public", "function", "render", "(", ")", "{", "$", "name", "=", "$", "this", "->", "getName", "(", ")", ";", "$", "this", "->", "registerFieldNameForFormTokenGeneration", "(", "$", "name", ")", ";", "$", "this", "->", "tag", "->", "addAttribute", "(", ...
Renders the textfield. @return string @api
[ "Renders", "the", "textfield", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/TextfieldViewHelper.php#L62-L79
neos/flow-development-collection
Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractLocaleAwareViewHelper.php
AbstractLocaleAwareViewHelper.getLocale
protected function getLocale() { if (!$this->hasArgument('forceLocale')) { return null; } $forceLocale = $this->arguments['forceLocale']; $useLocale = null; if ($forceLocale instanceof I18n\Locale) { $useLocale = $forceLocale; } elseif (is_stri...
php
protected function getLocale() { if (!$this->hasArgument('forceLocale')) { return null; } $forceLocale = $this->arguments['forceLocale']; $useLocale = null; if ($forceLocale instanceof I18n\Locale) { $useLocale = $forceLocale; } elseif (is_stri...
[ "protected", "function", "getLocale", "(", ")", "{", "if", "(", "!", "$", "this", "->", "hasArgument", "(", "'forceLocale'", ")", ")", "{", "return", "null", ";", "}", "$", "forceLocale", "=", "$", "this", "->", "arguments", "[", "'forceLocale'", "]", ...
Get the locale to use for all locale specific functionality. @throws InvalidVariableException @return I18n\Locale The locale to use or NULL if locale should not be used
[ "Get", "the", "locale", "to", "use", "for", "all", "locale", "specific", "functionality", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/Core/ViewHelper/AbstractLocaleAwareViewHelper.php#L53-L73
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutClassTypeFilter.php
PointcutClassTypeFilter.matches
public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier): bool { if ($this->isInterface === true) { return (array_search($this->interfaceOrClassName, class_implements($className)) !== false); } else { return ($className === $this->...
php
public function matches($className, $methodName, $methodDeclaringClassName, $pointcutQueryIdentifier): bool { if ($this->isInterface === true) { return (array_search($this->interfaceOrClassName, class_implements($className)) !== false); } else { return ($className === $this->...
[ "public", "function", "matches", "(", "$", "className", ",", "$", "methodName", ",", "$", "methodDeclaringClassName", ",", "$", "pointcutQueryIdentifier", ")", ":", "bool", "{", "if", "(", "$", "this", "->", "isInterface", "===", "true", ")", "{", "return", ...
Checks if the specified class matches with the class type filter @param string $className Name of the class to check against @param string $methodName Name of the method - not used here @param string $methodDeclaringClassName Name of the class the method was originally declared in - not used here @param mixed $pointcu...
[ "Checks", "if", "the", "specified", "class", "matches", "with", "the", "class", "type", "filter" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutClassTypeFilter.php#L80-L87
neos/flow-development-collection
Neos.Flow/Classes/Aop/Pointcut/PointcutClassTypeFilter.php
PointcutClassTypeFilter.reduceTargetClassNames
public function reduceTargetClassNames(ClassNameIndex $classNameIndex): ClassNameIndex { if (interface_exists($this->interfaceOrClassName)) { $classNames = $this->reflectionService->getAllImplementationClassNamesForInterface($this->interfaceOrClassName); } elseif (class_exists($this->int...
php
public function reduceTargetClassNames(ClassNameIndex $classNameIndex): ClassNameIndex { if (interface_exists($this->interfaceOrClassName)) { $classNames = $this->reflectionService->getAllImplementationClassNamesForInterface($this->interfaceOrClassName); } elseif (class_exists($this->int...
[ "public", "function", "reduceTargetClassNames", "(", "ClassNameIndex", "$", "classNameIndex", ")", ":", "ClassNameIndex", "{", "if", "(", "interface_exists", "(", "$", "this", "->", "interfaceOrClassName", ")", ")", "{", "$", "classNames", "=", "$", "this", "->"...
This method is used to optimize the matching process. @param ClassNameIndex $classNameIndex @return ClassNameIndex
[ "This", "method", "is", "used", "to", "optimize", "the", "matching", "process", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Aop/Pointcut/PointcutClassTypeFilter.php#L115-L129
neos/flow-development-collection
Neos.Flow/Classes/Command/RoutingCommandController.php
RoutingCommandController.listCommand
public function listCommand() { $this->outputLine('Currently registered routes:'); /** @var Route $route */ foreach ($this->router->getRoutes() as $index => $route) { $uriPattern = $route->getUriPattern(); $this->outputLine(str_pad(($index + 1) . '. ' . $uriPattern, 8...
php
public function listCommand() { $this->outputLine('Currently registered routes:'); /** @var Route $route */ foreach ($this->router->getRoutes() as $index => $route) { $uriPattern = $route->getUriPattern(); $this->outputLine(str_pad(($index + 1) . '. ' . $uriPattern, 8...
[ "public", "function", "listCommand", "(", ")", "{", "$", "this", "->", "outputLine", "(", "'Currently registered routes:'", ")", ";", "/** @var Route $route */", "foreach", "(", "$", "this", "->", "router", "->", "getRoutes", "(", ")", "as", "$", "index", "=>"...
List the known routes This command displays a list of all currently registered routes. @return void
[ "List", "the", "known", "routes" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/RoutingCommandController.php#L59-L67
neos/flow-development-collection
Neos.Flow/Classes/Command/RoutingCommandController.php
RoutingCommandController.showCommand
public function showCommand(int $index) { $routes = $this->router->getRoutes(); if (isset($routes[$index - 1])) { /** @var Route $route */ $route = $routes[$index - 1]; $this->outputLine('<b>Information for route ' . $index . ':</b>'); $this->outputLi...
php
public function showCommand(int $index) { $routes = $this->router->getRoutes(); if (isset($routes[$index - 1])) { /** @var Route $route */ $route = $routes[$index - 1]; $this->outputLine('<b>Information for route ' . $index . ':</b>'); $this->outputLi...
[ "public", "function", "showCommand", "(", "int", "$", "index", ")", "{", "$", "routes", "=", "$", "this", "->", "router", "->", "getRoutes", "(", ")", ";", "if", "(", "isset", "(", "$", "routes", "[", "$", "index", "-", "1", "]", ")", ")", "{", ...
Show information for a route This command displays the configuration of a route specified by index number. @param integer $index The index of the route as given by routing:list @return void
[ "Show", "information", "for", "a", "route" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/RoutingCommandController.php#L77-L95
neos/flow-development-collection
Neos.Flow/Classes/Command/RoutingCommandController.php
RoutingCommandController.getPathCommand
public function getPathCommand(string $package, string $controller = 'Standard', string $action = 'index', string $format = 'html') { $packageParts = explode('\\', $package, 2); $package = $packageParts[0]; $subpackage = isset($packageParts[1]) ? $packageParts[1] : null; $routeValue...
php
public function getPathCommand(string $package, string $controller = 'Standard', string $action = 'index', string $format = 'html') { $packageParts = explode('\\', $package, 2); $package = $packageParts[0]; $subpackage = isset($packageParts[1]) ? $packageParts[1] : null; $routeValue...
[ "public", "function", "getPathCommand", "(", "string", "$", "package", ",", "string", "$", "controller", "=", "'Standard'", ",", "string", "$", "action", "=", "'index'", ",", "string", "$", "format", "=", "'html'", ")", "{", "$", "packageParts", "=", "expl...
Generate a route path This command takes package, controller and action and displays the generated route path and the selected route: ./flow routing:getPath --format json Acme.Demo\\Sub\\Package @param string $package Package key and subpackage, subpackage parts are separated with backslashes @param string $controll...
[ "Generate", "a", "route", "path" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/RoutingCommandController.php#L112-L162
neos/flow-development-collection
Neos.Flow/Classes/Command/RoutingCommandController.php
RoutingCommandController.routePathCommand
public function routePathCommand(string $path, string $method = 'GET') { $server = [ 'REQUEST_URI' => $path, 'REQUEST_METHOD' => $method ]; $httpRequest = new Request([], [], [], $server); $routeContext = new RouteContext($httpRequest, RouteParameters::createE...
php
public function routePathCommand(string $path, string $method = 'GET') { $server = [ 'REQUEST_URI' => $path, 'REQUEST_METHOD' => $method ]; $httpRequest = new Request([], [], [], $server); $routeContext = new RouteContext($httpRequest, RouteParameters::createE...
[ "public", "function", "routePathCommand", "(", "string", "$", "path", ",", "string", "$", "method", "=", "'GET'", ")", "{", "$", "server", "=", "[", "'REQUEST_URI'", "=>", "$", "path", ",", "'REQUEST_METHOD'", "=>", "$", "method", "]", ";", "$", "httpReq...
Route the given route path This command takes a given path and displays the detected route and the selected package, controller and action. @param string $path The route path to resolve @param string $method The request method (GET, POST, PUT, DELETE, ...) to simulate @return void @throws InvalidRoutePartValueExcepti...
[ "Route", "the", "given", "route", "path" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/RoutingCommandController.php#L176-L217
neos/flow-development-collection
Neos.Flow/Classes/Command/RoutingCommandController.php
RoutingCommandController.getControllerObjectName
protected function getControllerObjectName(string $packageKey, string $subPackageKey, string $controllerName): string { $possibleObjectName = '@package\@subpackage\Controller\@controllerController'; $possibleObjectName = str_replace('@package', str_replace('.', '\\', $packageKey), $possibleObjectNam...
php
protected function getControllerObjectName(string $packageKey, string $subPackageKey, string $controllerName): string { $possibleObjectName = '@package\@subpackage\Controller\@controllerController'; $possibleObjectName = str_replace('@package', str_replace('.', '\\', $packageKey), $possibleObjectNam...
[ "protected", "function", "getControllerObjectName", "(", "string", "$", "packageKey", ",", "string", "$", "subPackageKey", ",", "string", "$", "controllerName", ")", ":", "string", "{", "$", "possibleObjectName", "=", "'@package\\@subpackage\\Controller\\@controllerContro...
Returns the object name of the controller defined by the package, subpackage key and controller name @param string $packageKey the package key of the controller @param string $subPackageKey the subpackage key of the controller @param string $controllerName the controller name excluding the "Controller" suffix @return ...
[ "Returns", "the", "object", "name", "of", "the", "controller", "defined", "by", "the", "package", "subpackage", "key", "and", "controller", "name" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Command/RoutingCommandController.php#L228-L238
neos/flow-development-collection
Neos.Flow/Classes/Utility/Ip.php
Ip.cidrMatch
public static function cidrMatch($ip, $range) { if (strpos($range, '/') === false) { $bits = null; $subnet = $range; } else { list($subnet, $bits) = explode('/', $range); } $ip = inet_pton($ip); $subnet = inet_pton($subnet); if ($i...
php
public static function cidrMatch($ip, $range) { if (strpos($range, '/') === false) { $bits = null; $subnet = $range; } else { list($subnet, $bits) = explode('/', $range); } $ip = inet_pton($ip); $subnet = inet_pton($subnet); if ($i...
[ "public", "static", "function", "cidrMatch", "(", "$", "ip", ",", "$", "range", ")", "{", "if", "(", "strpos", "(", "$", "range", ",", "'/'", ")", "===", "false", ")", "{", "$", "bits", "=", "null", ";", "$", "subnet", "=", "$", "range", ";", "...
Matches a CIDR range pattern against an IP The range can contain IPv4 and IPv6 addresses (including IPv6 wrapped IPv4 addresses). @see http://tools.ietf.org/html/rfc4632 @see http://tools.ietf.org/html/rfc4291#section-2.3 Example: 127.0.0.0/24 will match all IP addresses from 127.0.0.0 to 127.0.0.255 127.0.0.0/31 and...
[ "Matches", "a", "CIDR", "range", "pattern", "against", "an", "IP" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Utility/Ip.php#L41-L77
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/FileBasedSimpleKeyService.php
FileBasedSimpleKeyService.generateKey
public function generateKey($name) { if (strlen($name) === 0) { throw new SecurityException('Required name argument was empty', 1334215474); } $password = UtilityAlgorithms::generateRandomString($this->passwordGenerationLength); $this->persistKey($name, $password); ...
php
public function generateKey($name) { if (strlen($name) === 0) { throw new SecurityException('Required name argument was empty', 1334215474); } $password = UtilityAlgorithms::generateRandomString($this->passwordGenerationLength); $this->persistKey($name, $password); ...
[ "public", "function", "generateKey", "(", "$", "name", ")", "{", "if", "(", "strlen", "(", "$", "name", ")", "===", "0", ")", "{", "throw", "new", "SecurityException", "(", "'Required name argument was empty'", ",", "1334215474", ")", ";", "}", "$", "passw...
Generates a new key & saves it encrypted with a hashing strategy @param string $name @return string @throws SecurityException
[ "Generates", "a", "new", "key", "&", "saves", "it", "encrypted", "with", "a", "hashing", "strategy" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/FileBasedSimpleKeyService.php#L68-L76
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/FileBasedSimpleKeyService.php
FileBasedSimpleKeyService.storeKey
public function storeKey($name, $password) { if (strlen($name) === 0) { throw new SecurityException('Required name argument was empty', 1334215443); } if (strlen($password) === 0) { throw new SecurityException('Required password argument was empty', 1334215349); ...
php
public function storeKey($name, $password) { if (strlen($name) === 0) { throw new SecurityException('Required name argument was empty', 1334215443); } if (strlen($password) === 0) { throw new SecurityException('Required password argument was empty', 1334215349); ...
[ "public", "function", "storeKey", "(", "$", "name", ",", "$", "password", ")", "{", "if", "(", "strlen", "(", "$", "name", ")", "===", "0", ")", "{", "throw", "new", "SecurityException", "(", "'Required name argument was empty'", ",", "1334215443", ")", ";...
Saves a key encrypted with a hashing strategy @param string $name @param string $password @return void @throws SecurityException
[ "Saves", "a", "key", "encrypted", "with", "a", "hashing", "strategy" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/FileBasedSimpleKeyService.php#L86-L95
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/FileBasedSimpleKeyService.php
FileBasedSimpleKeyService.keyExists
public function keyExists($name) { if (strlen($name) === 0) { throw new SecurityException('Required name argument was empty', 1334215344); } if (!file_exists($this->getKeyPathAndFilename($name))) { return false; } return true; }
php
public function keyExists($name) { if (strlen($name) === 0) { throw new SecurityException('Required name argument was empty', 1334215344); } if (!file_exists($this->getKeyPathAndFilename($name))) { return false; } return true; }
[ "public", "function", "keyExists", "(", "$", "name", ")", "{", "if", "(", "strlen", "(", "$", "name", ")", "===", "0", ")", "{", "throw", "new", "SecurityException", "(", "'Required name argument was empty'", ",", "1334215344", ")", ";", "}", "if", "(", ...
Checks if a key exists @param string $name @return boolean @throws SecurityException
[ "Checks", "if", "a", "key", "exists" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/FileBasedSimpleKeyService.php#L104-L113
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/FileBasedSimpleKeyService.php
FileBasedSimpleKeyService.getKey
public function getKey($name) { if (strlen($name) === 0) { throw new SecurityException('Required name argument was empty', 1334215378); } $keyPathAndFilename = $this->getKeyPathAndFilename($name); if (!file_exists($keyPathAndFilename)) { throw new SecurityExce...
php
public function getKey($name) { if (strlen($name) === 0) { throw new SecurityException('Required name argument was empty', 1334215378); } $keyPathAndFilename = $this->getKeyPathAndFilename($name); if (!file_exists($keyPathAndFilename)) { throw new SecurityExce...
[ "public", "function", "getKey", "(", "$", "name", ")", "{", "if", "(", "strlen", "(", "$", "name", ")", "===", "0", ")", "{", "throw", "new", "SecurityException", "(", "'Required name argument was empty'", ",", "1334215378", ")", ";", "}", "$", "keyPathAnd...
Returns a key by its name @param string $name @return boolean @throws SecurityException
[ "Returns", "a", "key", "by", "its", "name" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/FileBasedSimpleKeyService.php#L122-L139
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/FileBasedSimpleKeyService.php
FileBasedSimpleKeyService.persistKey
protected function persistKey($name, $password) { $hashedPassword = $this->hashService->hashPassword($password, $this->passwordHashingStrategy); $keyPathAndFilename = $this->getKeyPathAndFilename($name); if (!is_dir($this->getPath())) { Utility\Files::createDirectoryRecursively($...
php
protected function persistKey($name, $password) { $hashedPassword = $this->hashService->hashPassword($password, $this->passwordHashingStrategy); $keyPathAndFilename = $this->getKeyPathAndFilename($name); if (!is_dir($this->getPath())) { Utility\Files::createDirectoryRecursively($...
[ "protected", "function", "persistKey", "(", "$", "name", ",", "$", "password", ")", "{", "$", "hashedPassword", "=", "$", "this", "->", "hashService", "->", "hashPassword", "(", "$", "password", ",", "$", "this", "->", "passwordHashingStrategy", ")", ";", ...
Persists a key to the file system @param string $name @param string $password @return void @throws SecurityException
[ "Persists", "a", "key", "to", "the", "file", "system" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/FileBasedSimpleKeyService.php#L149-L160
neos/flow-development-collection
Neos.Flow/Classes/Security/Cryptography/FileBasedSimpleKeyService.php
FileBasedSimpleKeyService.getKeyPathAndFilename
protected function getKeyPathAndFilename($name) { return Utility\Files::concatenatePaths([$this->getPath(), $this->checkKeyName($name)]); }
php
protected function getKeyPathAndFilename($name) { return Utility\Files::concatenatePaths([$this->getPath(), $this->checkKeyName($name)]); }
[ "protected", "function", "getKeyPathAndFilename", "(", "$", "name", ")", "{", "return", "Utility", "\\", "Files", "::", "concatenatePaths", "(", "[", "$", "this", "->", "getPath", "(", ")", ",", "$", "this", "->", "checkKeyName", "(", "$", "name", ")", "...
Returns the path and filename for the key with the given name. @param string $name @return string
[ "Returns", "the", "path", "and", "filename", "for", "the", "key", "with", "the", "given", "name", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/Security/Cryptography/FileBasedSimpleKeyService.php#L168-L171
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php
ProxyClassBuilder.build
public function build() { $this->objectConfigurations = $this->objectManager->getObjectConfigurations(); foreach ($this->objectConfigurations as $objectName => $objectConfiguration) { $className = $objectConfiguration->getClassName(); if ($className === '' || $this->compiler...
php
public function build() { $this->objectConfigurations = $this->objectManager->getObjectConfigurations(); foreach ($this->objectConfigurations as $objectName => $objectConfiguration) { $className = $objectConfiguration->getClassName(); if ($className === '' || $this->compiler...
[ "public", "function", "build", "(", ")", "{", "$", "this", "->", "objectConfigurations", "=", "$", "this", "->", "objectManager", "->", "getObjectConfigurations", "(", ")", ";", "foreach", "(", "$", "this", "->", "objectConfigurations", "as", "$", "objectName"...
Analyzes the Object Configuration provided by the compiler and builds the necessary PHP code for the proxy classes to realize dependency injection. @return void
[ "Analyzes", "the", "Object", "Configuration", "provided", "by", "the", "compiler", "and", "builds", "the", "necessary", "PHP", "code", "for", "the", "proxy", "classes", "to", "realize", "dependency", "injection", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php#L122-L185
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php
ProxyClassBuilder.buildSetInstanceCode
protected function buildSetInstanceCode(Configuration $objectConfiguration) { if ($objectConfiguration->getScope() === Configuration::SCOPE_PROTOTYPE) { return ''; } $code = ' if (get_class($this) === \'' . $objectConfiguration->getClassName() . '\') \Neos\Flow\Core\Boots...
php
protected function buildSetInstanceCode(Configuration $objectConfiguration) { if ($objectConfiguration->getScope() === Configuration::SCOPE_PROTOTYPE) { return ''; } $code = ' if (get_class($this) === \'' . $objectConfiguration->getClassName() . '\') \Neos\Flow\Core\Boots...
[ "protected", "function", "buildSetInstanceCode", "(", "Configuration", "$", "objectConfiguration", ")", "{", "if", "(", "$", "objectConfiguration", "->", "getScope", "(", ")", "===", "Configuration", "::", "SCOPE_PROTOTYPE", ")", "{", "return", "''", ";", "}", "...
Renders additional code which registers the instance of the proxy class at the Object Manager before constructor injection is executed. Used in constructors and wakeup methods. This also makes sure that object creation does not end in an endless loop due to bi-directional dependencies. @param Configuration $objectCon...
[ "Renders", "additional", "code", "which", "registers", "the", "instance", "of", "the", "proxy", "class", "at", "the", "Object", "Manager", "before", "constructor", "injection", "is", "executed", ".", "Used", "in", "constructors", "and", "wakeup", "methods", "." ...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php#L196-L212
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php
ProxyClassBuilder.buildSerializeRelatedEntitiesCode
protected function buildSerializeRelatedEntitiesCode(Configuration $objectConfiguration) { $className = $objectConfiguration->getClassName(); $code = ''; if ($this->reflectionService->hasMethod($className, '__sleep') === false) { $transientProperties = $this->reflectionService->g...
php
protected function buildSerializeRelatedEntitiesCode(Configuration $objectConfiguration) { $className = $objectConfiguration->getClassName(); $code = ''; if ($this->reflectionService->hasMethod($className, '__sleep') === false) { $transientProperties = $this->reflectionService->g...
[ "protected", "function", "buildSerializeRelatedEntitiesCode", "(", "Configuration", "$", "objectConfiguration", ")", "{", "$", "className", "=", "$", "objectConfiguration", "->", "getClassName", "(", ")", ";", "$", "code", "=", "''", ";", "if", "(", "$", "this",...
Renders code to create identifier/type information from related entities in an object. Used in sleep methods. @param Configuration $objectConfiguration @return string
[ "Renders", "code", "to", "create", "identifier", "/", "type", "information", "from", "related", "entities", "in", "an", "object", ".", "Used", "in", "sleep", "methods", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php#L221-L239
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php
ProxyClassBuilder.buildConstructorInjectionCode
protected function buildConstructorInjectionCode(Configuration $objectConfiguration) { $assignments = []; $argumentConfigurations = $objectConfiguration->getArguments(); $constructorParameterInfo = $this->reflectionService->getMethodParameters($objectConfiguration->getClassName(), '__constr...
php
protected function buildConstructorInjectionCode(Configuration $objectConfiguration) { $assignments = []; $argumentConfigurations = $objectConfiguration->getArguments(); $constructorParameterInfo = $this->reflectionService->getMethodParameters($objectConfiguration->getClassName(), '__constr...
[ "protected", "function", "buildConstructorInjectionCode", "(", "Configuration", "$", "objectConfiguration", ")", "{", "$", "assignments", "=", "[", "]", ";", "$", "argumentConfigurations", "=", "$", "objectConfiguration", "->", "getArguments", "(", ")", ";", "$", ...
Renders additional code for the __construct() method of the Proxy Class which realizes constructor injection. @param Configuration $objectConfiguration @return string The built code @throws ObjectException\UnknownObjectException
[ "Renders", "additional", "code", "for", "the", "__construct", "()", "method", "of", "the", "Proxy", "Class", "which", "realizes", "constructor", "injection", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php#L248-L334
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php
ProxyClassBuilder.buildPropertyInjectionCode
protected function buildPropertyInjectionCode(Configuration $objectConfiguration) { $commands = []; $injectedProperties = []; foreach ($objectConfiguration->getProperties() as $propertyName => $propertyConfiguration) { /* @var $propertyConfiguration ConfigurationProperty */ ...
php
protected function buildPropertyInjectionCode(Configuration $objectConfiguration) { $commands = []; $injectedProperties = []; foreach ($objectConfiguration->getProperties() as $propertyName => $propertyConfiguration) { /* @var $propertyConfiguration ConfigurationProperty */ ...
[ "protected", "function", "buildPropertyInjectionCode", "(", "Configuration", "$", "objectConfiguration", ")", "{", "$", "commands", "=", "[", "]", ";", "$", "injectedProperties", "=", "[", "]", ";", "foreach", "(", "$", "objectConfiguration", "->", "getProperties"...
Builds the code necessary to inject setter based dependencies. @param Configuration $objectConfiguration (needed to produce helpful exception message) @return string The built code @throws ObjectException\UnknownObjectException
[ "Builds", "the", "code", "necessary", "to", "inject", "setter", "based", "dependencies", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php#L343-L394
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php
ProxyClassBuilder.buildPropertyInjectionCodeByConfiguration
protected function buildPropertyInjectionCodeByConfiguration(Configuration $objectConfiguration, $propertyName, Configuration $propertyConfiguration) { $className = $objectConfiguration->getClassName(); $propertyObjectName = $propertyConfiguration->getObjectName(); $propertyClassName = $prop...
php
protected function buildPropertyInjectionCodeByConfiguration(Configuration $objectConfiguration, $propertyName, Configuration $propertyConfiguration) { $className = $objectConfiguration->getClassName(); $propertyObjectName = $propertyConfiguration->getObjectName(); $propertyClassName = $prop...
[ "protected", "function", "buildPropertyInjectionCodeByConfiguration", "(", "Configuration", "$", "objectConfiguration", ",", "$", "propertyName", ",", "Configuration", "$", "propertyConfiguration", ")", "{", "$", "className", "=", "$", "objectConfiguration", "->", "getCla...
Builds code which injects an object which was specified by its object configuration @param Configuration $objectConfiguration Configuration of the object to inject into @param string $propertyName Name of the property to inject @param Configuration $propertyConfiguration Configuration of the object to inject @return a...
[ "Builds", "code", "which", "injects", "an", "object", "which", "was", "specified", "by", "its", "object", "configuration" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php#L405-L430
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php
ProxyClassBuilder.buildPropertyInjectionCodeByString
public function buildPropertyInjectionCodeByString(Configuration $objectConfiguration, ConfigurationProperty $propertyConfiguration, $propertyName, $propertyObjectName) { $className = $objectConfiguration->getClassName(); if (strpos($propertyObjectName, '.') !== false) { $settingPath = ...
php
public function buildPropertyInjectionCodeByString(Configuration $objectConfiguration, ConfigurationProperty $propertyConfiguration, $propertyName, $propertyObjectName) { $className = $objectConfiguration->getClassName(); if (strpos($propertyObjectName, '.') !== false) { $settingPath = ...
[ "public", "function", "buildPropertyInjectionCodeByString", "(", "Configuration", "$", "objectConfiguration", ",", "ConfigurationProperty", "$", "propertyConfiguration", ",", "$", "propertyName", ",", "$", "propertyObjectName", ")", "{", "$", "className", "=", "$", "obj...
Builds code which injects an object which was specified by its object name @param Configuration $objectConfiguration Configuration of the object to inject into @param ConfigurationProperty $propertyConfiguration @param string $propertyName Name of the property to inject @param string $propertyObjectName Object name of...
[ "Builds", "code", "which", "injects", "an", "object", "which", "was", "specified", "by", "its", "object", "name" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php#L442-L480
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php
ProxyClassBuilder.buildPropertyInjectionCodeByConfigurationTypeAndPath
public function buildPropertyInjectionCodeByConfigurationTypeAndPath(Configuration $objectConfiguration, $propertyName, $configurationType, $configurationPath = null) { $className = $objectConfiguration->getClassName(); if ($configurationPath !== null) { $preparedSetterArgument = '\Neos\...
php
public function buildPropertyInjectionCodeByConfigurationTypeAndPath(Configuration $objectConfiguration, $propertyName, $configurationType, $configurationPath = null) { $className = $objectConfiguration->getClassName(); if ($configurationPath !== null) { $preparedSetterArgument = '\Neos\...
[ "public", "function", "buildPropertyInjectionCodeByConfigurationTypeAndPath", "(", "Configuration", "$", "objectConfiguration", ",", "$", "propertyName", ",", "$", "configurationType", ",", "$", "configurationPath", "=", "null", ")", "{", "$", "className", "=", "$", "...
Builds code which assigns the value stored in the specified configuration into the given class property. @param Configuration $objectConfiguration Configuration of the object to inject into @param string $propertyName Name of the property to inject @param string $configurationType the configuration type of the injecte...
[ "Builds", "code", "which", "assigns", "the", "value", "stored", "in", "the", "specified", "configuration", "into", "the", "given", "class", "property", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php#L491-L505
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php
ProxyClassBuilder.buildLazyPropertyInjectionCode
protected function buildLazyPropertyInjectionCode($propertyObjectName, $propertyClassName, $propertyName, $preparedSetterArgument) { $setterArgumentHash = "'" . md5($preparedSetterArgument) . "'"; $commands[] = ' $this->Flow_Proxy_LazyPropertyInjection(\'' . $propertyObjectName . '\', \'' . $prop...
php
protected function buildLazyPropertyInjectionCode($propertyObjectName, $propertyClassName, $propertyName, $preparedSetterArgument) { $setterArgumentHash = "'" . md5($preparedSetterArgument) . "'"; $commands[] = ' $this->Flow_Proxy_LazyPropertyInjection(\'' . $propertyObjectName . '\', \'' . $prop...
[ "protected", "function", "buildLazyPropertyInjectionCode", "(", "$", "propertyObjectName", ",", "$", "propertyClassName", ",", "$", "propertyName", ",", "$", "preparedSetterArgument", ")", "{", "$", "setterArgumentHash", "=", "\"'\"", ".", "md5", "(", "$", "prepared...
Builds code which injects a DependencyProxy instead of the actual dependency @param string $propertyObjectName Object name of the dependency to inject @param string $propertyClassName Class name of the dependency to inject @param string $propertyName Name of the property in the class to inject into @param string $prep...
[ "Builds", "code", "which", "injects", "a", "DependencyProxy", "instead", "of", "the", "actual", "dependency" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php#L516-L522
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php
ProxyClassBuilder.buildSetterInjectionCode
protected function buildSetterInjectionCode($className, $propertyName, $preparedSetterArgument) { $setterMethodName = 'inject' . ucfirst($propertyName); if ($this->reflectionService->hasMethod($className, $setterMethodName)) { return [' $this->' . $setterMethodName . '(' . $preparedSe...
php
protected function buildSetterInjectionCode($className, $propertyName, $preparedSetterArgument) { $setterMethodName = 'inject' . ucfirst($propertyName); if ($this->reflectionService->hasMethod($className, $setterMethodName)) { return [' $this->' . $setterMethodName . '(' . $preparedSe...
[ "protected", "function", "buildSetterInjectionCode", "(", "$", "className", ",", "$", "propertyName", ",", "$", "preparedSetterArgument", ")", "{", "$", "setterMethodName", "=", "'inject'", ".", "ucfirst", "(", "$", "propertyName", ")", ";", "if", "(", "$", "t...
Builds a code snippet which tries to inject the specified property first through calling the related inject*() method and then the set*() method. If neither exists and the property doesn't exist either, an empty array is returned. If neither inject*() nor set*() exists, but the property does exist, NULL is returned @...
[ "Builds", "a", "code", "snippet", "which", "tries", "to", "inject", "the", "specified", "property", "first", "through", "calling", "the", "related", "inject", "*", "()", "method", "and", "then", "the", "set", "*", "()", "method", ".", "If", "neither", "exi...
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php#L536-L550
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php
ProxyClassBuilder.buildLifecycleInitializationCode
protected function buildLifecycleInitializationCode(Configuration $objectConfiguration, $cause) { $lifecycleInitializationMethodName = $objectConfiguration->getLifecycleInitializationMethodName(); if (!$this->reflectionService->hasMethod($objectConfiguration->getClassName(), $lifecycleInitialization...
php
protected function buildLifecycleInitializationCode(Configuration $objectConfiguration, $cause) { $lifecycleInitializationMethodName = $objectConfiguration->getLifecycleInitializationMethodName(); if (!$this->reflectionService->hasMethod($objectConfiguration->getClassName(), $lifecycleInitialization...
[ "protected", "function", "buildLifecycleInitializationCode", "(", "Configuration", "$", "objectConfiguration", ",", "$", "cause", ")", "{", "$", "lifecycleInitializationMethodName", "=", "$", "objectConfiguration", "->", "getLifecycleInitializationMethodName", "(", ")", ";"...
Builds code which calls the lifecycle initialization method, if any. @param Configuration $objectConfiguration @param int $cause a ObjectManagerInterface::INITIALIZATIONCAUSE_* constant which is the cause of the initialization command being called. @return string
[ "Builds", "code", "which", "calls", "the", "lifecycle", "initialization", "method", "if", "any", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php#L559-L578
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php
ProxyClassBuilder.buildLifecycleShutdownCode
protected function buildLifecycleShutdownCode(Configuration $objectConfiguration, $cause) { $lifecycleShutdownMethodName = $objectConfiguration->getLifecycleShutdownMethodName(); if (!$this->reflectionService->hasMethod($objectConfiguration->getClassName(), $lifecycleShutdownMethodName)) { ...
php
protected function buildLifecycleShutdownCode(Configuration $objectConfiguration, $cause) { $lifecycleShutdownMethodName = $objectConfiguration->getLifecycleShutdownMethodName(); if (!$this->reflectionService->hasMethod($objectConfiguration->getClassName(), $lifecycleShutdownMethodName)) { ...
[ "protected", "function", "buildLifecycleShutdownCode", "(", "Configuration", "$", "objectConfiguration", ",", "$", "cause", ")", "{", "$", "lifecycleShutdownMethodName", "=", "$", "objectConfiguration", "->", "getLifecycleShutdownMethodName", "(", ")", ";", "if", "(", ...
Builds code which registers the lifecycle shutdown method, if any. @param Configuration $objectConfiguration @param int $cause a ObjectManagerInterface::INITIALIZATIONCAUSE_* constant which is the cause of the initialization command being called. @return string
[ "Builds", "code", "which", "registers", "the", "lifecycle", "shutdown", "method", "if", "any", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php#L587-L607
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php
ProxyClassBuilder.buildMethodParametersCode
protected function buildMethodParametersCode(array $argumentConfigurations) { $preparedArguments = []; foreach ($argumentConfigurations as $argument) { if ($argument === null) { $preparedArguments[] = 'NULL'; } else { $argumentValue = $argumen...
php
protected function buildMethodParametersCode(array $argumentConfigurations) { $preparedArguments = []; foreach ($argumentConfigurations as $argument) { if ($argument === null) { $preparedArguments[] = 'NULL'; } else { $argumentValue = $argumen...
[ "protected", "function", "buildMethodParametersCode", "(", "array", "$", "argumentConfigurations", ")", "{", "$", "preparedArguments", "=", "[", "]", ";", "foreach", "(", "$", "argumentConfigurations", "as", "$", "argument", ")", "{", "if", "(", "$", "argument",...
FIXME: Not yet completely refactored to new proxy mechanism @param array $argumentConfigurations @return string
[ "FIXME", ":", "Not", "yet", "completely", "refactored", "to", "new", "proxy", "mechanism" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php#L615-L655
neos/flow-development-collection
Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php
ProxyClassBuilder.compileStaticMethods
protected function compileStaticMethods($className, ProxyClass $proxyClass) { $methodNames = $this->reflectionService->getMethodsAnnotatedWith($className, Flow\CompileStatic::class); foreach ($methodNames as $methodName) { if (!$this->reflectionService->isMethodStatic($className, $method...
php
protected function compileStaticMethods($className, ProxyClass $proxyClass) { $methodNames = $this->reflectionService->getMethodsAnnotatedWith($className, Flow\CompileStatic::class); foreach ($methodNames as $methodName) { if (!$this->reflectionService->isMethodStatic($className, $method...
[ "protected", "function", "compileStaticMethods", "(", "$", "className", ",", "ProxyClass", "$", "proxyClass", ")", "{", "$", "methodNames", "=", "$", "this", "->", "reflectionService", "->", "getMethodsAnnotatedWith", "(", "$", "className", ",", "Flow", "\\", "C...
Compile the result of methods marked with CompileStatic into the proxy class @param string $className @param ProxyClass $proxyClass @return void @throws ObjectException
[ "Compile", "the", "result", "of", "methods", "marked", "with", "CompileStatic", "into", "the", "proxy", "class" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.Flow/Classes/ObjectManagement/DependencyInjection/ProxyClassBuilder.php#L677-L695
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php
SelectViewHelper.initializeArguments
public function initializeArguments() { parent::initializeArguments(); $this->registerUniversalTagAttributes(); $this->registerTagAttribute('multiple', 'string', 'if set, multiple select field'); $this->registerTagAttribute('size', 'string', 'Size of input field'); $this->reg...
php
public function initializeArguments() { parent::initializeArguments(); $this->registerUniversalTagAttributes(); $this->registerTagAttribute('multiple', 'string', 'if set, multiple select field'); $this->registerTagAttribute('size', 'string', 'Size of input field'); $this->reg...
[ "public", "function", "initializeArguments", "(", ")", "{", "parent", "::", "initializeArguments", "(", ")", ";", "$", "this", "->", "registerUniversalTagAttributes", "(", ")", ";", "$", "this", "->", "registerTagAttribute", "(", "'multiple'", ",", "'string'", "...
Initialize arguments. @return void @api
[ "Initialize", "arguments", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php#L143-L160
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php
SelectViewHelper.render
public function render() { $name = $this->getName(); if ($this->hasArgument('multiple')) { $name .= '[]'; } $this->tag->addAttribute('name', $name); $options = $this->getOptions(); $this->tag->setContent($this->renderOptionTags($options)); $this...
php
public function render() { $name = $this->getName(); if ($this->hasArgument('multiple')) { $name .= '[]'; } $this->tag->addAttribute('name', $name); $options = $this->getOptions(); $this->tag->setContent($this->renderOptionTags($options)); $this...
[ "public", "function", "render", "(", ")", "{", "$", "name", "=", "$", "this", "->", "getName", "(", ")", ";", "if", "(", "$", "this", "->", "hasArgument", "(", "'multiple'", ")", ")", "{", "$", "name", ".=", "'[]'", ";", "}", "$", "this", "->", ...
Render the tag. @return string rendered tag. @api
[ "Render", "the", "tag", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php#L168-L196
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php
SelectViewHelper.getOptions
protected function getOptions() { if (!is_array($this->arguments['options']) && !($this->arguments['options'] instanceof \Traversable)) { return []; } $options = []; foreach ($this->arguments['options'] as $key => $value) { if (is_object($value)) { ...
php
protected function getOptions() { if (!is_array($this->arguments['options']) && !($this->arguments['options'] instanceof \Traversable)) { return []; } $options = []; foreach ($this->arguments['options'] as $key => $value) { if (is_object($value)) { ...
[ "protected", "function", "getOptions", "(", ")", "{", "if", "(", "!", "is_array", "(", "$", "this", "->", "arguments", "[", "'options'", "]", ")", "&&", "!", "(", "$", "this", "->", "arguments", "[", "'options'", "]", "instanceof", "\\", "Traversable", ...
Render the option tags. @return array an associative array of options, key will be the value of the option tag @throws ViewHelper\Exception
[ "Render", "the", "option", "tags", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php#L231-L282
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php
SelectViewHelper.isSelected
protected function isSelected($value) { $selectedValue = $this->getSelectedValue(); if ($value === $selectedValue || (string)$value === $selectedValue) { return true; } if ($this->hasArgument('multiple')) { if ($selectedValue === null && $this->arguments['sele...
php
protected function isSelected($value) { $selectedValue = $this->getSelectedValue(); if ($value === $selectedValue || (string)$value === $selectedValue) { return true; } if ($this->hasArgument('multiple')) { if ($selectedValue === null && $this->arguments['sele...
[ "protected", "function", "isSelected", "(", "$", "value", ")", "{", "$", "selectedValue", "=", "$", "this", "->", "getSelectedValue", "(", ")", ";", "if", "(", "$", "value", "===", "$", "selectedValue", "||", "(", "string", ")", "$", "value", "===", "$...
Render the option tags. @param mixed $value Value to check for @return boolean true if the value should be marked a s selected; false otherwise
[ "Render", "the", "option", "tags", "." ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php#L290-L304
neos/flow-development-collection
Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php
SelectViewHelper.getSelectedValue
protected function getSelectedValue() { $value = $this->getValueAttribute(); if (!is_array($value) && !($value instanceof \Traversable)) { return $this->getOptionValueScalar($value); } $selectedValues = []; foreach ($value as $selectedValueElement) { $...
php
protected function getSelectedValue() { $value = $this->getValueAttribute(); if (!is_array($value) && !($value instanceof \Traversable)) { return $this->getOptionValueScalar($value); } $selectedValues = []; foreach ($value as $selectedValueElement) { $...
[ "protected", "function", "getSelectedValue", "(", ")", "{", "$", "value", "=", "$", "this", "->", "getValueAttribute", "(", ")", ";", "if", "(", "!", "is_array", "(", "$", "value", ")", "&&", "!", "(", "$", "value", "instanceof", "\\", "Traversable", "...
Retrieves the selected value(s) @return mixed value string or an array of strings
[ "Retrieves", "the", "selected", "value", "(", "s", ")" ]
train
https://github.com/neos/flow-development-collection/blob/a4484ef2a57e050dc9bd87c8481eeb250c7a36fa/Neos.FluidAdaptor/Classes/ViewHelpers/Form/SelectViewHelper.php#L311-L322