idx int64 0 60.3k | question stringlengths 92 4.62k | target stringlengths 7 635 |
|---|---|---|
58,400 | protected function buildView ( \ Throwable $ exception , array $ renderingOptions ) : ViewInterface { $ statusCode = ( $ exception instanceof WithHttpStatusInterface ) ? $ exception -> getStatusCode ( ) : 500 ; $ referenceCode = ( $ exception instanceof WithReferenceCodeInterface ) ? $ exception -> getReferenceCode ( )... | Prepares a Fluid view for rendering the custom error page . |
58,401 | protected function applyLegacyViewOptions ( ViewInterface $ view , array $ renderingOptions ) : ViewInterface { if ( isset ( $ renderingOptions [ 'templatePathAndFilename' ] ) ) { ObjectAccess :: setProperty ( $ view , 'templatePathAndFilename' , $ renderingOptions [ 'templatePathAndFilename' ] ) ; } if ( isset ( $ ren... | Sets legacy option properties to the view for backwards compatibility . |
58,402 | protected function renderSingleExceptionCli ( \ Throwable $ exception ) : string { $ exceptionMessageParts = $ this -> splitExceptionMessage ( $ exception -> getMessage ( ) ) ; $ exceptionMessage = '<error><b>' . $ exceptionMessageParts [ 'subject' ] . '</b></error>' . PHP_EOL ; if ( $ exceptionMessageParts [ 'body' ] ... | Renders a single exception including message code and affected file |
58,403 | public function getStatusCode ( ) { $ nestedException = $ this -> getPrevious ( ) ; if ( $ nestedException !== null && $ nestedException instanceof \ Neos \ Flow \ Exception ) { return $ nestedException -> getStatusCode ( ) ; } return parent :: getStatusCode ( ) ; } | Return the status code of the nested exception if any . |
58,404 | public function setDefaultPackageKey ( $ defaultPackageKey ) { if ( ! preg_match ( Package :: PATTERN_MATCH_PACKAGEKEY , $ defaultPackageKey ) ) { throw new \ InvalidArgumentException ( 'The given argument was not a valid package key.' , 1277287099 ) ; } $ this -> defaultPackageKey = $ defaultPackageKey ; } | Set the default package key to use for resource URIs . |
58,405 | protected function addArgumentsToTemplateVariableContainer ( array $ arguments ) { $ templateVariableContainer = $ this -> getWidgetRenderingContext ( ) -> getVariableProvider ( ) ; foreach ( $ arguments as $ identifier => $ value ) { $ templateVariableContainer -> add ( $ identifier , $ value ) ; } } | Add the given arguments to the TemplateVariableContainer of the widget . |
58,406 | public function resolveProviderClass ( $ providerName ) { $ className = $ this -> objectManager -> getClassNameByObjectName ( $ providerName ) ; if ( $ className !== false ) { return $ className ; } $ className = $ this -> objectManager -> getClassNameByObjectName ( 'Neos\Flow\Security\Authentication\Provider\\' . $ pr... | Resolves the class name of an authentication provider . If a valid provider class name is given it is just returned . |
58,407 | public function compileCommand ( bool $ force = false ) { $ objectConfigurationCache = $ this -> cacheManager -> getCache ( 'Flow_Object_Configuration' ) ; if ( $ force === false ) { if ( $ objectConfigurationCache -> has ( 'allCompiledCodeUpToDate' ) ) { return ; } } $ classesCache = $ this -> cacheManager -> getCache... | Explicitly compile proxy classes |
58,408 | public function migrateCommand ( string $ package , bool $ status = false , string $ packagesPath = null , string $ version = null , bool $ verbose = false , bool $ force = false ) { } | Migrate source files as needed |
58,409 | public function shellCommand ( ) { if ( ! function_exists ( 'readline_read_history' ) ) { $ this -> outputLine ( 'Interactive Shell is not available on this system!' ) ; $ this -> quit ( 1 ) ; } $ subProcess = false ; $ pipes = [ ] ; $ historyPathAndFilename = getenv ( 'HOME' ) . '/.flow_' . md5 ( FLOW_PATH_ROOT ) ; re... | Run the interactive Shell |
58,410 | protected function launchSubProcess ( ) : array { $ systemCommand = 'FLOW_ROOTPATH=' . FLOW_PATH_ROOT . ' FLOW_PATH_TEMPORARY_BASE=' . FLOW_PATH_TEMPORARY_BASE . ' ' . 'FLOW_CONTEXT=' . $ this -> bootstrap -> getContext ( ) . ' ' . PHP_BINARY . ' -c ' . php_ini_loaded_file ( ) . ' ' . FLOW_PATH_FLOW . 'Scripts/flow.php... | Launch sub process |
58,411 | protected function echoSubProcessResponse ( array $ pipes ) { while ( feof ( $ pipes [ 1 ] ) === false ) { $ responseLine = fgets ( $ pipes [ 1 ] ) ; if ( trim ( $ responseLine ) === 'READY' || $ responseLine === false ) { break ; } echo ( $ responseLine ) ; } } | Echoes the currently pending response from the sub process |
58,412 | protected function quitSubProcess ( $ subProcess , array $ pipes ) { fwrite ( $ pipes [ 0 ] , "QUIT\n" ) ; fclose ( $ pipes [ 0 ] ) ; fclose ( $ pipes [ 1 ] ) ; fclose ( $ pipes [ 2 ] ) ; proc_close ( $ subProcess ) ; } | Cleanly terminates the given sub process |
58,413 | protected function autocomplete ( string $ partialCommand , int $ index ) : array { $ suggestions = [ ] ; $ availableCommands = $ this -> bootstrap -> getObjectManager ( ) -> get ( CommandManager :: class ) -> getAvailableCommands ( ) ; foreach ( $ availableCommands as $ command ) { if ( $ command -> isInternal ( ) ===... | Returns autocomplete suggestions on hitting the TAB key . |
58,414 | public function call ( $ method , array $ arguments = [ ] ) { if ( $ this -> value === null || isset ( $ this -> whitelist [ $ method ] ) || isset ( $ this -> whitelist [ '*' ] ) || ( $ this -> value instanceof ProtectedContextAwareInterface && $ this -> value -> allowsCallOfMethod ( $ method ) ) ) { return parent :: c... | Call a method if in whitelist |
58,415 | public function getAndWrap ( $ path = null ) { if ( $ path instanceof ProtectedContext ) { $ path = $ path -> unwrap ( ) ; } $ context = parent :: getAndWrap ( $ path ) ; if ( $ context instanceof ProtectedContext && isset ( $ this -> whitelist [ $ path ] ) && is_array ( $ this -> whitelist [ $ path ] ) ) { $ context -... | Get a value by path and wrap it into another context |
58,416 | protected function findValueToResolve ( array $ routeValues ) { if ( $ this -> name === null || $ this -> name === '' ) { return null ; } return ObjectAccess :: getPropertyPath ( $ routeValues , $ this -> name ) ; } | Returns the route value of the current route part . This method can be overridden by custom RoutePartHandlers to implement custom resolving mechanisms . |
58,417 | public function render ( ) { $ value = $ this -> arguments [ 'value' ] ; if ( $ value === null ) { $ value = $ this -> renderChildren ( ) ; } if ( $ value === null ) { return null ; } if ( ! is_object ( $ value ) ) { throw new ViewHelper \ Exception ( 'f:format.identifier expects an object, ' . gettype ( $ value ) . ' ... | Outputs the identifier of the specified object |
58,418 | public function compile ( $ argumentsName , $ closureName , & $ initializationPhpCode , ViewHelperNode $ node , TemplateCompiler $ compiler ) { $ valueVariableName = $ compiler -> variableName ( 'value' ) ; $ initializationPhpCode .= sprintf ( '%1$s = (%2$s[\'value\'] !== null ? %2$s[\'value\'] : %3$s());' , $ valueVar... | Directly compile to code for the template cache . |
58,419 | public function setNow ( \ DateTime $ now ) { $ this -> now = clone $ now ; $ this -> now -> setTimezone ( new \ DateTimeZone ( 'UTC' ) ) ; $ this -> headers -> set ( 'Date' , $ this -> now ) ; } | Sets the current point in time . |
58,420 | public function getAge ( ) { if ( $ this -> headers -> has ( 'Age' ) ) { return $ this -> headers -> get ( 'Age' ) ; } else { $ dateTimestamp = $ this -> headers -> get ( 'Date' ) -> getTimestamp ( ) ; $ nowTimestamp = $ this -> now -> getTimestamp ( ) ; return ( $ nowTimestamp > $ dateTimestamp ) ? ( $ nowTimestamp - ... | Returns the age of this responds in seconds . |
58,421 | public function sendHeaders ( ) { if ( headers_sent ( ) === true ) { return ; } foreach ( $ this -> renderHeaders ( ) as $ header ) { header ( $ header , false ) ; } foreach ( $ this -> headers -> getCookies ( ) as $ cookie ) { header ( 'Set-Cookie: ' . $ cookie , false ) ; } } | Sends the HTTP headers . |
58,422 | public function removeStep ( string $ stepIdentifier ) { $ removedOccurrences = 0 ; foreach ( $ this -> steps as $ previousStepIdentifier => $ steps ) { foreach ( $ steps as $ step ) { if ( $ step -> getIdentifier ( ) === $ stepIdentifier ) { unset ( $ this -> steps [ $ previousStepIdentifier ] [ $ stepIdentifier ] ) ;... | Removes all occurrences of the specified step from this sequence |
58,423 | protected function invokeStep ( Step $ step , Bootstrap $ bootstrap ) { $ bootstrap -> getSignalSlotDispatcher ( ) -> dispatch ( __CLASS__ , 'beforeInvokeStep' , [ $ step , $ this -> identifier ] ) ; $ identifier = $ step -> getIdentifier ( ) ; $ step ( $ bootstrap ) ; $ bootstrap -> getSignalSlotDispatcher ( ) -> disp... | Invokes a single step of this sequence and also invokes all steps registered to be executed after the given step . |
58,424 | protected function resolveDependencies ( ) { $ objectManager = $ this -> bootstrap -> getObjectManager ( ) ; $ this -> baseComponentChain = $ objectManager -> get ( ComponentChain :: class ) ; } | Resolves a few dependencies of this request handler which can t be resolved automatically due to the early stage of the boot process this request handler is invoked at . |
58,425 | protected function addPoweredByHeader ( ResponseInterface $ response ) : ResponseInterface { $ token = static :: prepareApplicationToken ( $ this -> bootstrap -> getObjectManager ( ) ) ; if ( $ token === '' ) { return $ response ; } return $ response -> withAddedHeader ( 'X-Flow-Powered' , $ token ) ; } | Adds an HTTP header to the Response which indicates that the application is powered by Flow . |
58,426 | public static function prepareApplicationToken ( ObjectManagerInterface $ objectManager ) : string { $ configurationManager = $ objectManager -> get ( ConfigurationManager :: class ) ; $ tokenSetting = $ configurationManager -> getConfiguration ( ConfigurationManager :: CONFIGURATION_TYPE_SETTINGS , 'Neos.Flow.http.app... | Generate an application information header for the response based on settings and package versions . Will statically compile in production for performance benefits . |
58,427 | public function canConvertFrom ( $ source , $ targetType ) { return ( preg_match ( self :: PATTERN_MATCH_SESSIONIDENTIFIER , $ source ) === 1 ) && ( $ targetType === $ this -> targetType ) ; } | This implementation always returns true for this method . |
58,428 | public function setObjects ( array $ objects ) { $ this -> objects = $ objects ; $ this -> objects [ ObjectManagerInterface :: class ] [ 'i' ] = $ this ; $ this -> objects [ get_class ( $ this ) ] [ 'i' ] = $ this ; } | Sets the objects array |
58,429 | public function isRegistered ( $ objectName ) { if ( isset ( $ this -> objects [ $ objectName ] ) ) { return true ; } if ( $ objectName [ 0 ] === '\\' ) { throw new \ InvalidArgumentException ( 'Object names must not start with a backslash ("' . $ objectName . '")' , 1270827335 ) ; } return false ; } | Returns true if an object with the given name is registered |
58,430 | public function registerShutdownObject ( $ object , $ shutdownLifecycleMethodName ) { if ( strpos ( get_class ( $ object ) , 'Neos\Flow\\' ) === 0 ) { $ this -> internalShutdownObjects [ $ object ] = $ shutdownLifecycleMethodName ; } else { $ this -> shutdownObjects [ $ object ] = $ shutdownLifecycleMethodName ; } } | Registers the passed shutdown lifecycle method for the given object |
58,431 | public function getScope ( $ objectName ) { if ( ! isset ( $ this -> objects [ $ objectName ] ) ) { $ hint = ( $ objectName [ 0 ] === '\\' ) ? ' Hint: You specified an object name with a leading backslash!' : '' ; throw new Exception \ UnknownObjectException ( 'Object "' . $ objectName . '" is not registered.' . $ hint... | Returns the scope of the specified object . |
58,432 | public function getCaseSensitiveObjectName ( $ caseInsensitiveObjectName ) { $ lowerCasedObjectName = ltrim ( strtolower ( $ caseInsensitiveObjectName ) , '\\' ) ; if ( isset ( $ this -> cachedLowerCasedObjectNames [ $ lowerCasedObjectName ] ) ) { return $ this -> cachedLowerCasedObjectNames [ $ lowerCasedObjectName ] ... | Returns the case sensitive object name of an object specified by a case insensitive object name . If no object of that name exists false is returned . |
58,433 | public function getObjectNameByClassName ( $ className ) { if ( isset ( $ this -> objects [ $ className ] ) && ( ! isset ( $ this -> objects [ $ className ] [ 'c' ] ) || $ this -> objects [ $ className ] [ 'c' ] === $ className ) ) { return $ className ; } foreach ( $ this -> objects as $ objectName => $ information ) ... | Returns the object name corresponding to a given class name . |
58,434 | public function getClassNameByObjectName ( $ objectName ) { if ( ! isset ( $ this -> objects [ $ objectName ] ) ) { return ( class_exists ( $ objectName ) ) ? $ objectName : false ; } return ( isset ( $ this -> objects [ $ objectName ] [ 'c' ] ) ? $ this -> objects [ $ objectName ] [ 'c' ] : $ objectName ) ; } | Returns the implementation class name for the specified object |
58,435 | public function getPackageKeyByObjectName ( $ objectName ) { return ( isset ( $ this -> objects [ $ objectName ] ) ? $ this -> objects [ $ objectName ] [ 'p' ] : false ) ; } | Returns the key of the package the specified object is contained in . |
58,436 | public function getInstance ( $ objectName ) { return isset ( $ this -> objects [ $ objectName ] [ 'i' ] ) ? $ this -> objects [ $ objectName ] [ 'i' ] : null ; } | Returns the instance of the specified object or NULL if no instance has been registered yet . |
58,437 | public function getSessionInstances ( ) { $ sessionObjects = [ ] ; foreach ( $ this -> objects as $ information ) { if ( isset ( $ information [ 'i' ] ) && $ information [ 's' ] === ObjectConfiguration :: SCOPE_SESSION ) { $ sessionObjects [ ] = $ information [ 'i' ] ; } } return $ sessionObjects ; } | Returns all instances of objects with scope session |
58,438 | public function shutdown ( ) { $ this -> callShutdownMethods ( $ this -> shutdownObjects ) ; $ securityContext = $ this -> get ( Context :: class ) ; if ( $ securityContext -> isInitialized ( ) ) { $ this -> get ( Context :: class ) -> withoutAuthorizationChecks ( function ( ) { $ this -> callShutdownMethods ( $ this -... | Shuts down this Object Container by calling the shutdown methods of all object instances which were configured to be shut down . |
58,439 | protected function buildObjectByFactory ( $ objectName ) { $ configurationManager = $ this -> get ( ConfigurationManager :: class ) ; $ factory = $ this -> get ( $ this -> objects [ $ objectName ] [ 'f' ] [ 0 ] ) ; $ factoryMethodName = $ this -> objects [ $ objectName ] [ 'f' ] [ 1 ] ; $ factoryMethodArguments = [ ] ;... | Invokes the Factory defined in the object configuration of the specified object in order to build an instance . Arguments which were defined in the object configuration are passed to the factory method . |
58,440 | protected function callShutdownMethods ( \ SplObjectStorage $ shutdownObjects ) { foreach ( $ shutdownObjects as $ object ) { $ methodName = $ shutdownObjects [ $ object ] ; $ object -> $ methodName ( ) ; } } | Executes the methods of the provided objects . |
58,441 | public function remove ( $ object ) { if ( ! is_object ( $ object ) || ! ( $ object instanceof $ this -> objectType ) ) { $ type = ( is_object ( $ object ) ? get_class ( $ object ) : gettype ( $ object ) ) ; throw new IllegalObjectTypeException ( 'The value given to remove() was ' . $ type . ' , however the ' . get_cla... | Removes an object from this repository . |
58,442 | public function update ( $ object ) { if ( ! ( $ object instanceof $ this -> objectType ) ) { throw new IllegalObjectTypeException ( 'The modified object given to update() was not of the type (' . $ this -> objectType . ') this repository manages.' , 1249479625 ) ; } $ this -> persistenceManager -> update ( $ object ) ... | Schedules a modified object for persistence . |
58,443 | public function initialize ( array $ packages ) { $ this -> registeredClassNames = $ this -> registerClassFiles ( $ packages ) ; $ this -> reflectionService -> buildReflectionData ( $ this -> registeredClassNames ) ; $ rawCustomObjectConfigurations = $ this -> configurationManager -> getConfiguration ( ConfigurationMan... | Initializes the the object configurations and some other parts of this Object Manager . |
58,444 | public function getClassNamesByScope ( $ scope ) { if ( ! isset ( $ this -> cachedClassNamesByScope [ $ scope ] ) ) { foreach ( $ this -> objects as $ objectName => $ information ) { if ( $ information [ 's' ] === $ scope ) { if ( isset ( $ information [ 'c' ] ) ) { $ this -> cachedClassNamesByScope [ $ scope ] [ ] = $... | Returns a list of class names which are configured with the given scope |
58,445 | protected function registerClassFiles ( array $ packages ) { $ includeClassesConfiguration = [ ] ; if ( isset ( $ this -> allSettings [ 'Neos' ] [ 'Flow' ] [ 'object' ] [ 'includeClasses' ] ) ) { if ( ! is_array ( $ this -> allSettings [ 'Neos' ] [ 'Flow' ] [ 'object' ] [ 'includeClasses' ] ) ) { throw new InvalidConfi... | Traverses through all class files of the active packages and registers collects the class names as all available class names . If the respective Flow settings say so also function test classes are registered . |
58,446 | protected function applyClassFilterConfiguration ( $ classNames , $ filterConfiguration ) { foreach ( $ filterConfiguration as $ packageKey => $ filterExpressions ) { if ( ! array_key_exists ( $ packageKey , $ classNames ) ) { $ this -> logger -> debug ( 'The package "' . $ packageKey . '" specified in the setting "Neo... | Filters the classnames available for object management by filter expressions that includes classes . |
58,447 | protected function buildObjectsArray ( ) { $ objects = [ ] ; foreach ( $ this -> objectConfigurations as $ objectConfiguration ) { $ objectName = $ objectConfiguration -> getObjectName ( ) ; $ objects [ $ objectName ] = [ 'l' => strtolower ( $ objectName ) , 's' => $ objectConfiguration -> getScope ( ) , 'p' => $ objec... | Builds the objects array which contains information about the registered objects their scope class built method etc . |
58,448 | public function getCurrentLocale ( ) { if ( ! $ this -> currentLocale instanceof Locale || $ this -> currentLocale -> getLanguage ( ) === 'mul' ) { return $ this -> defaultLocale ; } return $ this -> currentLocale ; } | Returns the current locale . This is the default locale if no current locale has been set or the set current locale has a language code of mul . |
58,449 | public function setFallbackRule ( array $ fallbackRule ) { if ( ! array_key_exists ( 'order' , $ fallbackRule ) ) { throw new \ InvalidArgumentException ( 'The given fallback rule did not contain an order element.' , 1406710671 ) ; } if ( ! array_key_exists ( 'strict' , $ fallbackRule ) ) { $ fallbackRule [ 'strict' ] ... | Allows to set a fallback order for locale resolving . If not set the implicit inheritance of locales will be used . That is if a locale of en_UK is requested matches will be searched for in en_UK and en before trying the default locale configured in Flow . |
58,450 | public function isNewObject ( $ object ) { return ( $ this -> entityManager -> getUnitOfWork ( ) -> getEntityState ( $ object , \ Doctrine \ ORM \ UnitOfWork :: STATE_NEW ) === \ Doctrine \ ORM \ UnitOfWork :: STATE_NEW ) ; } | Checks if the given object has ever been persisted . |
58,451 | public function tearDown ( ) { if ( $ this -> settings [ 'backendOptions' ] [ 'driver' ] !== null && $ this -> settings [ 'backendOptions' ] [ 'path' ] !== null ) { $ this -> entityManager -> clear ( ) ; $ schemaTool = new SchemaTool ( $ this -> entityManager ) ; $ schemaTool -> dropDatabase ( ) ; $ this -> logger -> n... | Called after a functional test in Flow dumps everything in the database . |
58,452 | public function hasUnpersistedChanges ( ) { $ unitOfWork = $ this -> entityManager -> getUnitOfWork ( ) ; $ unitOfWork -> computeChangeSets ( ) ; if ( $ unitOfWork -> getScheduledEntityInsertions ( ) !== [ ] || $ unitOfWork -> getScheduledEntityUpdates ( ) !== [ ] || $ unitOfWork -> getScheduledEntityDeletions ( ) !== ... | Gives feedback if the persistence Manager has unpersisted changes . |
58,453 | public function has ( string $ pathAndFilename , bool $ allowSplitSource = false ) : bool { if ( $ allowSplitSource === true ) { $ pathsAndFileNames = glob ( $ pathAndFilename . '.*.yaml' ) ; if ( $ pathsAndFileNames !== false ) { foreach ( $ pathsAndFileNames as $ pathAndFilename ) { if ( is_file ( $ pathAndFilename )... | Checks for the specified configuration file and returns true if it exists . |
58,454 | public function load ( string $ pathAndFilename , bool $ allowSplitSource = false ) : array { $ this -> detectFilesWithWrongExtension ( $ pathAndFilename , $ allowSplitSource ) ; $ pathsAndFileNames = [ $ pathAndFilename . '.yaml' ] ; if ( $ allowSplitSource === true ) { $ splitSourcePathsAndFileNames = glob ( $ pathAn... | Loads the specified configuration file and returns its content as an array . If the file does not exist or could not be loaded an empty array is returned |
58,455 | protected function mergeFileContent ( string $ pathAndFilename , array $ configuration ) : array { if ( ! is_file ( $ pathAndFilename ) ) { return $ configuration ; } try { $ yaml = file_get_contents ( $ pathAndFilename ) ; if ( $ this -> usePhpYamlExtension ) { $ loadedConfiguration = @ yaml_parse ( $ yaml ) ; if ( $ ... | Loads the file with the given path and merge it s contents into the configuration array . |
58,456 | public function save ( string $ pathAndFilename , array $ configuration ) { $ header = '' ; if ( file_exists ( $ pathAndFilename . '.yaml' ) ) { $ header = $ this -> getHeaderFromFile ( $ pathAndFilename . '.yaml' ) ; } $ yaml = Yaml :: dump ( $ configuration , 99 , 2 ) ; file_put_contents ( $ pathAndFilename . '.yaml'... | Save the specified configuration array to the given file in YAML format . |
58,457 | protected function getHeaderFromFile ( string $ pathAndFilename ) : string { $ header = '' ; $ fileHandle = fopen ( $ pathAndFilename , 'r' ) ; while ( $ line = fgets ( $ fileHandle ) ) { if ( preg_match ( '/^#/' , $ line ) ) { $ header .= $ line ; } else { break ; } } fclose ( $ fileHandle ) ; return $ header ; } | Read the header part from the given file . That means every line until the first non comment line is found . |
58,458 | public function addValidator ( ValidatorInterface $ validator ) { if ( $ validator instanceof ObjectValidatorInterface ) { $ validator -> setValidatedInstancesContainer = $ this -> validatedInstancesContainer ; } $ this -> validators -> attach ( $ validator ) ; } | Adds a new validator to the conjunction . |
58,459 | public function removeValidator ( ValidatorInterface $ validator ) { if ( ! $ this -> validators -> contains ( $ validator ) ) { throw new NoSuchValidatorException ( 'Cannot remove validator because its not in the conjunction.' , 1207020177 ) ; } $ this -> validators -> detach ( $ validator ) ; } | Removes the specified validator . |
58,460 | protected function migrateAccountRolesUp ( ) { if ( ! $ this -> sm -> tablesExist ( [ 'typo3_flow_security_account_roles_join' , 'typo3_flow_security_policy_role' ] ) ) { return ; } $ accountsWithRoles = array ( ) ; $ accountRolesResult = $ this -> connection -> executeQuery ( 'SELECT j.flow_security_account, r.identif... | Generate SQL statements to migrate accounts up to embedded roles . |
58,461 | public function parseFormatFromCldr ( Locale $ locale , $ formatType , $ formatLength = self :: FORMAT_LENGTH_DEFAULT ) { self :: validateFormatType ( $ formatType ) ; self :: validateFormatLength ( $ formatLength ) ; if ( isset ( $ this -> parsedFormatsIndices [ ( string ) $ locale ] [ $ formatType ] [ $ formatLength ... | Returns parsed number format basing on locale and desired format length if provided . |
58,462 | public function parseCustomFormat ( $ format ) { if ( isset ( $ this -> parsedFormats [ $ format ] ) ) { return $ this -> parsedFormats [ $ format ] ; } return $ this -> parsedFormats [ $ format ] = $ this -> parseFormat ( $ format ) ; } | Returns parsed date or time format string provided as parameter . |
58,463 | public function getLocalizedSymbolsForLocale ( Locale $ locale ) { if ( isset ( $ this -> localizedSymbols [ ( string ) $ locale ] ) ) { return $ this -> localizedSymbols [ ( string ) $ locale ] ; } $ model = $ this -> cldrRepository -> getModelForLocale ( $ locale ) ; return $ this -> localizedSymbols [ ( string ) $ l... | Returns symbols array for provided locale . |
58,464 | protected function resolveActionMethodName ( ) { $ actionMethodName = $ this -> request -> getControllerActionName ( ) . 'Action' ; if ( ! is_callable ( [ $ this , $ actionMethodName ] ) ) { throw new NoSuchActionException ( sprintf ( 'An action "%s" does not exist in controller "%s".' , $ actionMethodName , get_class ... | Resolves and checks the current action method name |
58,465 | public static function getActionMethodParameters ( $ objectManager ) { $ reflectionService = $ objectManager -> get ( ReflectionService :: class ) ; $ result = [ ] ; $ className = get_called_class ( ) ; $ methodNames = get_class_methods ( $ className ) ; foreach ( $ methodNames as $ methodName ) { if ( strlen ( $ metho... | Returns a map of action method names and their parameters . |
58,466 | public static function getActionValidationGroups ( $ objectManager ) { $ reflectionService = $ objectManager -> get ( ReflectionService :: class ) ; $ result = [ ] ; $ className = get_called_class ( ) ; $ methodNames = get_class_methods ( $ className ) ; foreach ( $ methodNames as $ methodName ) { if ( strlen ( $ metho... | Returns a map of action method names and their validation groups . |
58,467 | public static function getActionValidateAnnotationData ( $ objectManager ) { $ reflectionService = $ objectManager -> get ( ReflectionService :: class ) ; $ result = [ ] ; $ className = get_called_class ( ) ; $ methodNames = get_class_methods ( $ className ) ; foreach ( $ methodNames as $ methodName ) { if ( strlen ( $... | Returns a map of action method names and their validation parameters . |
58,468 | protected function callActionMethod ( ) { $ preparedArguments = [ ] ; foreach ( $ this -> arguments as $ argument ) { $ preparedArguments [ ] = $ argument -> getValue ( ) ; } $ validationResult = $ this -> arguments -> getValidationResults ( ) ; if ( ! $ validationResult -> hasErrors ( ) ) { $ actionResult = call_user_... | Calls the specified action method and passes the arguments . |
58,469 | protected function resolveViewObjectName ( ) { $ possibleViewObjectName = $ this -> viewObjectNamePattern ; $ packageKey = $ this -> request -> getControllerPackageKey ( ) ; $ subpackageKey = $ this -> request -> getControllerSubpackageKey ( ) ; $ format = $ this -> request -> getFormat ( ) ; if ( $ subpackageKey !== n... | Determines the fully qualified view object name . |
58,470 | protected function addErrorFlashMessage ( ) { $ errorFlashMessage = $ this -> getErrorFlashMessage ( ) ; if ( $ errorFlashMessage !== false ) { $ this -> flashMessageContainer -> addMessage ( $ errorFlashMessage ) ; } } | If an error occurred during this request this adds a flash message describing the error to the flash message container . |
58,471 | protected function forwardToReferringRequest ( ) { $ referringRequest = $ this -> request -> getReferringRequest ( ) ; if ( $ referringRequest === null ) { return ; } $ packageKey = $ referringRequest -> getControllerPackageKey ( ) ; $ subpackageKey = $ referringRequest -> getControllerSubpackageKey ( ) ; if ( $ subpac... | If information on the request before the current request was sent this method forwards back to the originating request . This effectively ends processing of the current request so do not call this method before you have finished the necessary business logic! |
58,472 | protected function getFlattenedValidationErrorMessage ( ) { $ outputMessage = 'Validation failed while trying to call ' . get_class ( $ this ) . '->' . $ this -> actionMethodName . '().' . PHP_EOL ; $ logMessage = $ outputMessage ; foreach ( $ this -> arguments -> getValidationResults ( ) -> getFlattenedErrors ( ) as $... | Returns a string containing all validation errors separated by PHP_EOL . |
58,473 | public function matchRequest ( RequestInterface $ request ) { if ( ! isset ( $ this -> options [ 'hostPattern' ] ) ) { throw new InvalidRequestPatternException ( 'Missing option "hostPattern" in the Host request pattern configuration' , 1446224510 ) ; } if ( ! $ request instanceof ActionRequest ) { return false ; } $ h... | Matches a \ Neos \ Flow \ Mvc \ RequestInterface against its set host pattern rules |
58,474 | public function setBackend ( Backend \ BackendInterface $ backend ) { if ( $ this -> psrCompatibleLoggerWasInjected ) { throw new Exception ( 'A PSR-3 logger was injected so setting backends is not possible. Create a new instance.' , 1515342951935 ) ; } foreach ( $ this -> backends as $ backend ) { $ backend -> close (... | Sets the given backend as the only backend for this Logger . |
58,475 | public function addBackend ( Backend \ BackendInterface $ backend ) { if ( $ this -> psrCompatibleLoggerWasInjected ) { throw new Exception ( 'A PSR-3 logger was injected so adding backends is not possible. Create a new instance.' , 1515343013004 ) ; } $ this -> backends -> attach ( $ backend ) ; } | Adds the backend to which the logger sends the logging data |
58,476 | public function shutdownObject ( ) { $ this -> internalPsrCompatibleLogger = null ; foreach ( $ this -> backends as $ backend ) { $ backend -> close ( ) ; } } | Cleanly closes all registered backends before destructing this Logger |
58,477 | protected function validateType ( $ value , array $ schema , array $ types = [ ] ) : ErrorResult { $ result = new ErrorResult ( ) ; if ( isset ( $ schema [ 'type' ] ) ) { if ( is_array ( $ schema [ 'type' ] ) ) { $ type = $ schema [ 'type' ] [ 0 ] ; if ( in_array ( gettype ( $ value ) , $ schema [ 'type' ] ) ) { $ type... | Validate a value for a given type |
58,478 | protected function validateTypeArray ( $ value , array $ schema , array $ types = [ ] ) : ErrorResult { $ result = new ErrorResult ( ) ; $ isValid = false ; foreach ( $ schema [ 'type' ] as $ type ) { $ partResult = $ this -> validate ( $ value , $ type , $ types ) ; if ( $ partResult -> hasErrors ( ) === false ) { $ i... | Validate a value with a given list of allowed types |
58,479 | protected function validateNumberType ( $ value , array $ schema ) : ErrorResult { $ result = new ErrorResult ( ) ; if ( is_numeric ( $ value ) === false ) { $ result -> addError ( $ this -> createError ( 'type=number' , 'type=' . gettype ( $ value ) ) ) ; return $ result ; } if ( isset ( $ schema [ 'maximum' ] ) ) { i... | Validate an integer value with the given schema |
58,480 | protected function validateBooleanType ( $ value , array $ schema ) : ErrorResult { $ result = new ErrorResult ( ) ; if ( is_bool ( $ value ) === false ) { $ result -> addError ( $ this -> createError ( 'type=boolean' , 'type=' . gettype ( $ value ) ) ) ; return $ result ; } return $ result ; } | Validate a boolean value with the given schema |
58,481 | protected function validateArrayType ( $ value , array $ schema , array $ types = [ ] ) : ErrorResult { $ result = new ErrorResult ( ) ; if ( is_array ( $ value ) === false || $ this -> isNumericallyIndexedArray ( $ value ) === false ) { $ result -> addError ( $ this -> createError ( 'type=array' , 'type=' . gettype ( ... | Validate an array value with the given schema |
58,482 | protected function validateNullType ( $ value , array $ schema ) : ErrorResult { $ result = new ErrorResult ( ) ; if ( $ value !== null ) { $ result -> addError ( $ this -> createError ( 'type=NULL' , 'type=' . gettype ( $ value ) ) ) ; } return $ result ; } | Validate a null value with the given schema |
58,483 | protected function createError ( string $ expectation , $ value = null ) : Error { if ( $ value !== null ) { $ error = new Error ( 'expected: %s found: %s' , 1328557141 , [ $ expectation , $ this -> renderValue ( $ value ) ] , 'Validation Error' ) ; } else { $ error = new Error ( $ expectation , 1328557141 , [ ] , 'Val... | Create Error Object |
58,484 | protected function isNumericallyIndexedArray ( array $ phpArray ) : bool { foreach ( array_keys ( $ phpArray ) as $ key ) { if ( is_numeric ( $ key ) === false ) { return false ; } } return true ; } | Determine whether the given php array is a plain numerically indexed array |
58,485 | public function merge ( RouteTags $ tags ) : self { $ mergedTags = array_unique ( array_merge ( $ this -> tags , $ tags -> tags ) ) ; return new static ( $ mergedTags ) ; } | Merges two instances of this class combining and unifying all tags |
58,486 | protected function createCacheTables ( ) { $ this -> connect ( ) ; try { PdoHelper :: importSql ( $ this -> databaseHandle , $ this -> pdoDriver , __DIR__ . '/../../Resources/Private/DDL.sql' ) ; } catch ( \ PDOException $ exception ) { throw new Exception ( 'Could not create cache tables with DSN "' . $ this -> dataSo... | Creates the tables needed for the cache backend . |
58,487 | public function valid ( ) : bool { if ( $ this -> cacheEntriesIterator === null ) { $ this -> rewind ( ) ; } return $ this -> cacheEntriesIterator -> valid ( ) ; } | Checks if the current position of the cache entry iterator is valid . |
58,488 | public function rewind ( ) { if ( $ this -> cacheEntriesIterator !== null ) { $ this -> cacheEntriesIterator -> rewind ( ) ; return ; } $ cacheEntries = [ ] ; $ statementHandle = $ this -> databaseHandle -> prepare ( 'SELECT "identifier", "content" FROM "' . $ this -> cacheTableName . '" WHERE "context"=? AND "cache"=?... | Rewinds the cache entry iterator to the first element and fetches cacheEntries . |
58,489 | public function getStatus ( ) : Result { $ result = new Result ( ) ; try { $ this -> connect ( ) ; $ connection = DriverManager :: getConnection ( [ 'pdo' => $ this -> databaseHandle ] ) ; } catch ( \ Exception $ exception ) { $ result -> addError ( new Error ( $ exception -> getMessage ( ) , $ exception -> getCode ( )... | Validates that configured database is accessible and schema up to date |
58,490 | private function getCacheTablesSchema ( ) : Schema { $ schema = new Schema ( ) ; $ cacheTable = $ schema -> createTable ( $ this -> cacheTableName ) ; $ cacheTable -> addColumn ( 'identifier' , Type :: STRING , [ 'length' => 250 ] ) ; $ cacheTable -> addColumn ( 'cache' , Type :: STRING , [ 'length' => 250 ] ) ; $ cach... | Returns the Doctrine DBAL schema of the configured cache and tag tables |
58,491 | public static function getTypeForValue ( $ value ) : string { if ( is_object ( $ value ) ) { if ( $ value instanceof Proxy ) { $ type = get_parent_class ( $ value ) ; } else { $ type = get_class ( $ value ) ; } } else { $ type = gettype ( $ value ) ; } return $ type ; } | Return simple type or class for object |
58,492 | public function createValidator ( $ validatorType , array $ validatorOptions = [ ] ) { $ validatorObjectName = $ this -> resolveValidatorObjectName ( $ validatorType ) ; if ( $ validatorObjectName === false ) { return null ; } switch ( $ this -> objectManager -> getScope ( $ validatorObjectName ) ) { case Configuration... | Get a validator for a given data type . Returns a validator implementing the ValidatorInterface or NULL if no validator could be resolved . |
58,493 | public static function getPolyTypeObjectValidatorImplementationClassNames ( $ objectManager ) { $ reflectionService = $ objectManager -> get ( ReflectionService :: class ) ; $ result = $ reflectionService -> getAllImplementationClassNamesForInterface ( Validator \ PolyTypeObjectValidatorInterface :: class ) ; return $ ... | Returns a map of object validator class names . |
58,494 | protected function resolveValidatorObjectName ( $ validatorType ) { $ validatorType = ltrim ( $ validatorType , '\\' ) ; $ validatorClassNames = static :: getValidatorImplementationClassNames ( $ this -> objectManager ) ; if ( $ this -> objectManager -> isRegistered ( $ validatorType ) && isset ( $ validatorClassNames ... | Returns the class name of an appropriate validator for the given type . If no validator is available false is returned |
58,495 | public static function getValidatorImplementationClassNames ( $ objectManager ) { $ reflectionService = $ objectManager -> get ( ReflectionService :: class ) ; $ classNames = $ reflectionService -> getAllImplementationClassNamesForInterface ( ValidatorInterface :: class ) ; return array_flip ( $ classNames ) ; } | Returns all class names implementing the ValidatorInterface . |
58,496 | protected function getValidatorType ( $ type ) { switch ( $ type ) { case 'int' : $ type = 'Integer' ; break ; case 'bool' : $ type = 'Boolean' ; break ; case 'double' : $ type = 'Float' ; break ; case 'numeric' : $ type = 'Number' ; break ; case 'mixed' : $ type = 'Raw' ; break ; default : $ type = ucfirst ( $ type ) ... | Used to map PHP types to validator types . |
58,497 | public function isValid ( $ value ) { if ( $ value instanceof \ Doctrine \ ORM \ Proxy \ Proxy && ! $ value -> __isInitialized ( ) ) { return ; } parent :: isValid ( $ value ) ; } | Checks if the given value is valid according to the validator and returns the Error Messages object which occurred . Will skip validation if value is an uninitialized lazy loading proxy . |
58,498 | protected function mergeRoutesWithSubRoutes ( array $ routesConfiguration ) { $ mergedRoutesConfiguration = [ ] ; foreach ( $ routesConfiguration as $ routeConfiguration ) { if ( ! isset ( $ routeConfiguration [ 'subRoutes' ] ) ) { $ mergedRoutesConfiguration [ ] = $ routeConfiguration ; continue ; } $ mergedSubRoutesC... | Loads specified sub routes and builds composite routes . |
58,499 | private function Flow_Aop_Proxy_getAdviceChains ( string $ methodName ) : array { if ( isset ( $ this -> Flow_Aop_Proxy_groupedAdviceChains [ $ methodName ] ) ) { return $ this -> Flow_Aop_Proxy_groupedAdviceChains [ $ methodName ] ; } $ adviceChains = [ ] ; if ( isset ( $ this -> Flow_Aop_Proxy_targetMethodsAndGrouped... | Used in AOP proxies to get the advice chain for a given method . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.