idx int64 0 60.3k | question stringlengths 92 4.62k | target stringlengths 7 635 |
|---|---|---|
58,500 | public function Flow_Aop_Proxy_invokeJoinPoint ( \ Neos \ Flow \ Aop \ JoinPointInterface $ joinPoint ) { if ( __CLASS__ !== $ joinPoint -> getClassName ( ) ) { return parent :: Flow_Aop_Proxy_invokeJoinPoint ( $ joinPoint ) ; } if ( isset ( $ this -> Flow_Aop_Proxy_methodIsInAdviceMode [ $ joinPoint -> getMethodName (... | Invokes a given join point |
58,501 | public function listCommand ( string $ source = null , string $ target = null ) { $ this -> outputLine ( ) ; if ( $ source !== null ) { $ this -> outputLine ( sprintf ( '<info>!!</info> Filter by source : <comment>%s</comment>' , $ source ) ) ; } if ( $ target !== null ) { $ this -> outputLine ( sprintf ( '<info>!... | Lists all currently active and registered type converters |
58,502 | protected function initializeRoles ( ) { if ( $ this -> roles !== null ) { return ; } $ this -> roles = [ ] ; foreach ( $ this -> roleIdentifiers as $ key => $ roleIdentifier ) { if ( $ this -> policyService -> hasRole ( $ roleIdentifier ) ) { $ this -> roles [ $ roleIdentifier ] = $ this -> policyService -> getRole ( ... | Initializes the roles field by fetching the role objects referenced by the roleIdentifiers |
58,503 | public function setRoles ( array $ roles ) { $ this -> roleIdentifiers = [ ] ; $ this -> roles = [ ] ; foreach ( $ roles as $ role ) { if ( ! $ role instanceof Role ) { throw new \ InvalidArgumentException ( sprintf ( 'setRoles() only accepts an array of %s instances, given: "%s"' , Role :: class , gettype ( $ role ) )... | Sets the roles for this account |
58,504 | public function hasRole ( Role $ role ) { $ this -> initializeRoles ( ) ; return array_key_exists ( $ role -> getIdentifier ( ) , $ this -> roles ) ; } | Return if the account has a certain role |
58,505 | public function addRole ( Role $ role ) { if ( $ role -> isAbstract ( ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Abstract roles can\'t be assigned to accounts directly, but the role "%s" is marked abstract' , $ role -> getIdentifier ( ) ) , 1399900657 ) ; } $ this -> initializeRoles ( ) ; if ( ! $ this -> ... | Adds a role to this account |
58,506 | public function removeRole ( Role $ role ) { $ this -> initializeRoles ( ) ; if ( $ this -> hasRole ( $ role ) ) { $ roleIdentifier = $ role -> getIdentifier ( ) ; unset ( $ this -> roles [ $ roleIdentifier ] ) ; $ identifierIndex = array_search ( $ roleIdentifier , $ this -> roleIdentifiers ) ; unset ( $ this -> roleI... | Removes a role from this account |
58,507 | protected function createStorageObject ( $ resourcePathAndFilename , FlowPackageInterface $ resourcePackage ) { $ pathInfo = UnicodeFunctions :: pathinfo ( $ resourcePathAndFilename ) ; $ object = new StorageObject ( ) ; $ object -> setFilename ( $ pathInfo [ 'basename' ] ) ; $ object -> setSha1 ( sha1_file ( $ resourc... | Create a storage object for the given static resource path . |
58,508 | protected function prepareRelativePublicationPath ( $ objectPath , $ packageKey , $ packageResourcePath ) { $ relativePathParts = explode ( '/' , str_replace ( $ packageResourcePath , '' , $ objectPath ) , 2 ) ; $ relativePath = '' ; if ( isset ( $ relativePathParts [ 1 ] ) ) { $ relativePath = $ relativePathParts [ 1 ... | Prepares a relative publication path for a package resource . |
58,509 | public function getPublicResourcePaths ( ) { $ paths = [ ] ; foreach ( $ this -> packageManager -> getFlowPackages ( ) as $ packageKey => $ package ) { $ publicResourcesPath = Files :: concatenatePaths ( [ $ package -> getResourcesPath ( ) , 'Public' ] ) ; if ( is_dir ( $ publicResourcesPath ) ) { $ paths [ $ packageKe... | Returns the absolute paths of public resources directories of all active packages . This method is used directly by the FileSystemSymlinkTarget . |
58,510 | public function toArray ( ) : array { $ sortedArrayKeys = $ this -> getSortedKeys ( ) ; $ sortedArray = [ ] ; foreach ( $ sortedArrayKeys as $ key ) { $ sortedArray [ $ key ] = $ this -> subject [ $ key ] ; } return $ sortedArray ; } | Returns a sorted copy of the subject array |
58,511 | protected function generateSortedKeysMap ( ) : array { $ sortedKeysMap = [ ] ; $ startKeys = $ this -> startKeys ; $ middleKeys = $ this -> middleKeys ; $ endKeys = $ this -> endKeys ; $ beforeKeys = $ this -> beforeKeys ; $ afterKeys = $ this -> afterKeys ; $ flattenFunction = function ( $ value , $ key , $ step ) use... | Flattens start - middle - end - before - and afterKeys to a single dimension and merges them together to a single array |
58,512 | public function remove ( string $ entryIdentifier ) : bool { if ( ! $ this -> isValidEntryIdentifier ( $ entryIdentifier ) ) { throw new \ InvalidArgumentException ( '"' . $ entryIdentifier . '" is not a valid cache entry identifier.' , 1233058495 ) ; } return $ this -> backend -> remove ( $ entryIdentifier ) ; } | Removes the given cache entry from the cache . |
58,513 | public function render ( ) { $ value = $ this -> arguments [ 'value' ] ; if ( $ value === null ) { $ value = $ this -> renderChildren ( ) ; } $ options = JSON_HEX_TAG ; if ( $ this -> arguments [ 'forceObject' ] !== false ) { $ options = $ options | JSON_FORCE_OBJECT ; } return json_encode ( $ value , $ options ) ; } | Outputs content with its JSON representation . To prevent issues in HTML context occurrences of greater - than or less - than characters are converted to their hexadecimal representations . |
58,514 | public function append ( $ message , $ severity = 1 , $ additionalData = null , $ packageKey = null , $ className = null , $ methodName = null ) { } | Ignores the call |
58,515 | protected function renderErrorInfo ( \ Throwable $ error , array $ additionalData = [ ] ) { $ maximumDepth = 100 ; $ backTrace = $ error -> getTrace ( ) ; $ message = $ this -> getErrorLogMessage ( $ error ) ; $ postMortemInfo = $ message . PHP_EOL . PHP_EOL . $ this -> renderBacktrace ( $ backTrace ) ; $ depth = 0 ; w... | Get current error post mortem informations with support for error chaining |
58,516 | protected function renderBacktrace ( $ backtrace ) { $ output = '' ; if ( $ this -> backtraceRenderer !== null ) { $ output = $ this -> backtraceRenderer -> __invoke ( $ backtrace ) ; } return $ output ; } | Renders background information about the circumstances of the exception . |
58,517 | protected function renderRequestInfo ( ) { $ output = '' ; if ( $ this -> requestInformationRenderer !== null ) { $ output = $ this -> requestInformationRenderer -> __invoke ( ) ; } return $ output ; } | Render information about the current request if possible |
58,518 | public function createCommand ( string $ packageKey , string $ packageType = PackageInterface :: DEFAULT_COMPOSER_TYPE ) { if ( ! $ this -> packageManager -> isPackageKeyValid ( $ packageKey ) ) { $ this -> outputLine ( 'The package key "%s" is not valid.' , [ $ packageKey ] ) ; $ this -> quit ( 1 ) ; } if ( $ this -> ... | Create a new package |
58,519 | public function listCommand ( bool $ loadingOrder = false ) { $ availablePackages = [ ] ; $ frozenPackages = [ ] ; $ longestPackageKey = 0 ; $ freezeSupported = $ this -> bootstrap -> getContext ( ) -> isDevelopment ( ) ; foreach ( $ this -> packageManager -> getAvailablePackages ( ) as $ packageKey => $ package ) { if... | List available packages |
58,520 | public function freezeCommand ( string $ packageKey = 'all' ) { if ( ! $ this -> bootstrap -> getContext ( ) -> isDevelopment ( ) ) { $ this -> outputLine ( 'Package freezing is only supported in Development context.' ) ; $ this -> quit ( 3 ) ; } $ packagesToFreeze = [ ] ; if ( $ packageKey === 'all' ) { foreach ( arra... | Freeze a package |
58,521 | public function unfreezeCommand ( string $ packageKey = 'all' ) { if ( ! $ this -> bootstrap -> getContext ( ) -> isDevelopment ( ) ) { $ this -> outputLine ( 'Package freezing is only supported in Development context.' ) ; $ this -> quit ( 3 ) ; } $ packagesToUnfreeze = [ ] ; if ( $ packageKey === 'all' ) { foreach ( ... | Unfreeze a package |
58,522 | public function refreezeCommand ( string $ packageKey = 'all' ) { if ( ! $ this -> bootstrap -> getContext ( ) -> isDevelopment ( ) ) { $ this -> outputLine ( 'Package freezing is only supported in Development context.' ) ; $ this -> quit ( 3 ) ; } $ packagesToRefreeze = [ ] ; if ( $ packageKey === 'all' ) { foreach ( ... | Refreeze a package |
58,523 | public function rescanCommand ( ) { $ packageStates = $ this -> packageManager -> rescanPackages ( ) ; $ this -> outputLine ( 'The following packages are registered and will be loaded in this order:' ) ; $ this -> outputLine ( '' ) ; foreach ( $ packageStates [ 'packages' ] as $ composerName => $ packageState ) { $ thi... | Rescan package availability and recreates the PackageStates configuration . |
58,524 | public function count ( ) { try { $ originalQuery = $ this -> queryBuilder -> getQuery ( ) ; $ dqlQuery = clone $ originalQuery ; $ dqlQuery -> setParameters ( $ originalQuery -> getParameters ( ) ) ; $ dqlQuery -> setHint ( \ Doctrine \ ORM \ Query :: HINT_CUSTOM_TREE_WALKERS , [ CountWalker :: class ] ) ; $ offset = ... | Returns the query result count |
58,525 | public function setDistinct ( $ distinct = true ) { $ this -> distinct = $ distinct ; $ this -> queryBuilder -> distinct ( $ distinct ) ; return $ this ; } | Sets the DISTINCT flag for this query . |
58,526 | public function addParameters ( $ parameters ) { foreach ( $ parameters as $ parameter ) { $ index = $ this -> parameterIndex ++ ; $ this -> queryBuilder -> setParameter ( $ index , $ parameter ) ; } } | Add parameters to the query |
58,527 | protected function getParamNeedle ( $ operand ) { $ index = $ this -> parameterIndex ++ ; $ this -> queryBuilder -> setParameter ( $ index , $ operand ) ; return '?' . $ index ; } | Get a needle for parameter binding . |
58,528 | protected function getPropertyNameWithAlias ( $ propertyPath ) { $ aliases = $ this -> queryBuilder -> getRootAliases ( ) ; $ previousJoinAlias = $ aliases [ 0 ] ; if ( strpos ( $ propertyPath , '.' ) === false ) { return $ previousJoinAlias . '.' . $ propertyPath ; } $ propertyPathParts = explode ( '.' , $ propertyPat... | Adds left join clauses along the given property path to the query if needed . This enables us to set conditions on related objects . |
58,529 | public function stringify ( $ value , array $ options = [ ] ) : string { $ optionSum = array_sum ( array_map ( 'constant' , $ options ) ) ; return json_encode ( $ value , $ optionSum ) ; } | JSON encode the given value |
58,530 | public function sendRequest ( Request $ request ) { foreach ( $ this -> automaticRequestHeaders -> getAll ( ) as $ name => $ values ) { $ request -> setHeader ( $ name , $ values ) ; } $ this -> lastRequest = $ request ; $ this -> lastResponse = $ this -> requestEngine -> sendRequest ( $ request ) ; return $ this -> la... | Sends a prepared request and returns the respective response . |
58,531 | public function getCrawler ( ) { $ crawler = new Crawler ( null , $ this -> lastRequest -> getBaseUri ( ) ) ; $ crawler -> addContent ( $ this -> lastResponse -> getContent ( ) , $ this -> lastResponse -> getHeader ( 'Content-Type' ) ) ; return $ crawler ; } | Returns the DOM crawler which can be used to interact with the web page structure submit forms click links or fetch specific parts of the website s contents . |
58,532 | public function submit ( Form $ form ) { return $ this -> request ( $ form -> getUri ( ) , $ form -> getMethod ( ) , $ form -> getPhpValues ( ) , $ form -> getPhpFiles ( ) ) ; } | Submit a form |
58,533 | public function resolveConfigurationProcessingType ( string $ configurationType ) : string { if ( ! isset ( $ this -> configurationTypes [ $ configurationType ] ) ) { throw new Exception \ InvalidConfigurationTypeException ( 'Configuration type "' . $ configurationType . '" is not registered. You can Register it by cal... | Resolve the processing type for the configuration type . |
58,534 | public function isSplitSourceAllowedForConfigurationType ( string $ configurationType ) : bool { if ( ! isset ( $ this -> configurationTypes [ $ configurationType ] ) ) { throw new Exception \ InvalidConfigurationTypeException ( 'Configuration type "' . $ configurationType . '" is not registered. You can Register it by... | Check the allowSplitSource setting for the configuration type . |
58,535 | public function registerConfigurationType ( string $ configurationType , string $ configurationProcessingType = self :: CONFIGURATION_PROCESSING_TYPE_DEFAULT , bool $ allowSplitSource = false ) { $ configurationProcessingTypes = [ self :: CONFIGURATION_PROCESSING_TYPE_DEFAULT , self :: CONFIGURATION_PROCESSING_TYPE_OBJ... | Registers a new configuration type with the given configuration processing type . |
58,536 | public function getConfiguration ( string $ configurationType , string $ configurationPath = null ) { if ( empty ( $ this -> configurations [ $ configurationType ] ) ) { $ this -> loadConfiguration ( $ configurationType , $ this -> packages ) ; } $ configuration = $ this -> configurations [ $ configurationType ] ?? [ ]... | Returns the specified raw configuration . The actual configuration will be merged from different sources in a defined order . |
58,537 | public function loadConfigurationCache ( ) : bool { $ cachePathAndFilename = $ this -> constructConfigurationCachePath ( ) ; $ configurations = @ include $ cachePathAndFilename ; if ( $ configurations !== false ) { $ this -> configurations = $ configurations ; return true ; } return false ; } | If a cache file with previously saved configuration exists it is loaded . |
58,538 | protected function saveConfigurationCache ( ) { foreach ( array_keys ( $ this -> configurationTypes ) as $ configurationType ) { if ( ! isset ( $ this -> unprocessedConfiguration [ $ configurationType ] ) || ! is_array ( $ this -> unprocessedConfiguration [ $ configurationType ] ) ) { $ this -> loadConfiguration ( $ co... | Saves the current configuration into a cache file and creates a cache inclusion script in the context s Configuration directory . |
58,539 | protected function mergePolicyConfiguration ( array $ firstConfigurationArray , array $ secondConfigurationArray ) : array { $ result = Arrays :: arrayMergeRecursiveOverrule ( $ firstConfigurationArray , $ secondConfigurationArray ) ; if ( ! isset ( $ result [ 'roles' ] ) ) { return $ result ; } foreach ( $ result [ 'r... | Merges two policy configuration arrays . |
58,540 | protected function constructConfigurationCachePath ( ) : string { $ configurationCachePath = $ this -> temporaryDirectoryPath . 'Configuration/' ; return $ configurationCachePath . str_replace ( '/' , '_' , ( string ) $ this -> context ) . 'Configurations.php' ; } | Constructs a path to the configuration cache PHP file . Derived from the temporary path and application context . |
58,541 | public function newInstanceWithoutConstructor ( ) { $ instance = parent :: newInstanceWithoutConstructor ( ) ; if ( method_exists ( $ instance , '__wakeup' ) && is_callable ( [ $ instance , '__wakeup' ] ) ) { $ instance -> __wakeup ( ) ; } return $ instance ; } | Creates a new class instance without invoking the constructor . |
58,542 | public function callMethodOnOriginalSessionObject ( JoinPointInterface $ joinPoint ) { $ objectName = $ this -> objectManager -> getObjectNameByClassName ( get_class ( $ joinPoint -> getProxy ( ) ) ) ; $ methodName = $ joinPoint -> getMethodName ( ) ; $ proxy = $ joinPoint -> getProxy ( ) ; if ( ! isset ( $ this -> ses... | Around advice wrapping every method of a scope session object . It redirects all method calls to the session object once there is one . |
58,543 | public function getTemplateRootPaths ( ) { if ( $ this -> templateRootPaths !== [ ] ) { return $ this -> templateRootPaths ; } if ( $ this -> templateRootPathPattern === null ) { return [ ] ; } $ templateRootPath = $ this -> templateRootPathPattern ; if ( isset ( $ this -> patternReplacementVariables [ 'packageKey' ] )... | Resolves the template root to be used inside other paths . |
58,544 | public function resolveTemplateFileForControllerAndActionAndFormat ( $ controller , $ action , $ format = null ) { if ( $ this -> templatePathAndFilename ) { return $ this -> templatePathAndFilename ; } $ action = ucfirst ( $ action ) ; $ paths = $ this -> getTemplateRootPaths ( ) ; if ( isset ( $ this -> options [ 'te... | Resolves a template file based on the given controller and action together with eventually defined patternReplacementVariables . |
58,545 | protected function sanitizePath ( $ path ) { if ( empty ( $ path ) ) { return '' ; } $ path = Files :: getUnixStylePath ( $ path ) ; if ( is_dir ( $ path ) ) { $ path = Files :: getNormalizedPath ( $ path ) ; } return $ path ; } | Sanitize a path ensuring it is absolute and if a directory suffixed by a trailing slash . |
58,546 | public function setOption ( $ optionName , $ value ) { $ this -> options [ $ optionName ] = $ value ; if ( ObjectAccess :: isPropertySettable ( $ this , $ optionName ) ) { ObjectAccess :: setProperty ( $ this , $ optionName , $ value ) ; } } | Set a specific option of this object |
58,547 | public function remove ( $ object ) { if ( ! $ this -> removedResources -> contains ( $ object ) ) { $ this -> removedResources -> attach ( $ object ) ; parent :: remove ( $ object ) ; } } | Removes a PersistentResource object from this repository |
58,548 | public function findByIdentifier ( $ identifier ) { $ object = $ this -> persistenceManager -> getObjectByIdentifier ( $ identifier , $ this -> entityClassName ) ; if ( $ object === null ) { foreach ( $ this -> addedResources as $ addedResource ) { if ( $ this -> persistenceManager -> getIdentifierByObject ( $ addedRes... | Finds an object matching the given identifier . |
58,549 | public function findByCollectionNameIterator ( $ collectionName ) { $ queryBuilder = $ this -> entityManager -> createQueryBuilder ( ) ; return $ queryBuilder -> select ( 'PersistentResource' ) -> from ( $ this -> getEntityClassName ( ) , 'PersistentResource' ) -> where ( 'PersistentResource.collectionName = :collectio... | Finds all objects by collection name and return an IterableResult |
58,550 | public function findSimilarResources ( PersistentResource $ resource ) { $ query = $ this -> createQuery ( ) ; $ query -> matching ( $ query -> logicalAnd ( $ query -> equals ( 'sha1' , $ resource -> getSha1 ( ) ) , $ query -> equals ( 'filename' , $ resource -> getFilename ( ) ) , $ query -> equals ( 'collectionName' ... | Finds other resources which are referring to the same resource data filename and collection |
58,551 | public function findBySha1 ( $ sha1Hash ) { $ query = $ this -> createQuery ( ) ; $ query -> matching ( $ query -> equals ( 'sha1' , $ sha1Hash ) ) ; $ resources = $ query -> execute ( ) -> toArray ( ) ; foreach ( $ this -> addedResources as $ importedResource ) { if ( $ importedResource -> getSha1 ( ) === $ sha1Hash )... | Find all resources with the same SHA1 hash |
58,552 | public function findBySha1AndCollectionName ( $ sha1Hash , $ collectionName ) { $ query = $ this -> createQuery ( ) ; $ query -> matching ( $ query -> logicalAnd ( $ query -> equals ( 'sha1' , $ sha1Hash ) , $ query -> equals ( 'collectionName' , $ collectionName ) ) ) ; $ resources = $ query -> execute ( ) -> toArray ... | Find all resources with the same SHA1 hash and collection |
58,553 | public function findOneBySha1 ( $ sha1Hash ) { $ query = $ this -> createQuery ( ) ; $ query -> matching ( $ query -> equals ( 'sha1' , $ sha1Hash ) ) -> setLimit ( 1 ) ; $ resource = $ query -> execute ( ) -> getFirst ( ) ; if ( $ resource === null ) { foreach ( $ this -> addedResources as $ importedResource ) { if ( ... | Find one resource by SHA1 |
58,554 | public function withScheme ( string $ scheme ) : self { $ newConstraints = $ this -> constraints ; $ newConstraints [ self :: CONSTRAINT_SCHEME ] = $ scheme ; return new static ( $ newConstraints ) ; } | Create a new instance with the scheme constraint added |
58,555 | public function withHost ( string $ host ) : self { $ newConstraints = $ this -> constraints ; $ newConstraints [ self :: CONSTRAINT_HOST ] = $ host ; return new static ( $ newConstraints ) ; } | Create a new instance with the host constraint added |
58,556 | public function withHostPrefix ( string $ prefix , array $ replacePrefixes = [ ] ) : self { $ newConstraints = $ this -> constraints ; $ newConstraints [ self :: CONSTRAINT_HOST_PREFIX ] = [ 'prefix' => $ prefix , 'replacePrefixes' => $ replacePrefixes , ] ; return new static ( $ newConstraints ) ; } | Create a new instance with the host prefix constraint added |
58,557 | public function withHostSuffix ( string $ suffix , array $ replaceSuffixes = [ ] ) : self { $ newConstraints = $ this -> constraints ; $ newConstraints [ self :: CONSTRAINT_HOST_SUFFIX ] = [ 'suffix' => $ suffix , 'replaceSuffixes' => $ replaceSuffixes , ] ; return new static ( $ newConstraints ) ; } | Create a new instance with the host suffix constraint added |
58,558 | public function withPort ( int $ port ) : self { $ newConstraints = $ this -> constraints ; $ newConstraints [ self :: CONSTRAINT_PORT ] = $ port ; return new static ( $ newConstraints ) ; } | Create a new instance with the port constraint added |
58,559 | public function withPath ( string $ path ) : self { $ newConstraints = $ this -> constraints ; $ newConstraints [ self :: CONSTRAINT_PATH ] = $ path ; return new static ( $ newConstraints ) ; } | Create a new instance with the path constraint added |
58,560 | public function withPathPrefix ( string $ pathPrefix , bool $ append = false ) : self { if ( $ pathPrefix === '' ) { return $ this ; } $ newConstraints = $ this -> constraints ; if ( isset ( $ newConstraints [ self :: CONSTRAINT_PATH_PREFIX ] ) ) { $ pathPrefix = $ append ? $ newConstraints [ self :: CONSTRAINT_PATH_PR... | Create a new instance with the path prefix constraint added This can be applied multiple times later prefixes will be prepended to the start |
58,561 | public function withPathSuffix ( string $ pathSuffix , bool $ prepend = false ) : self { $ newConstraints = $ this -> constraints ; if ( isset ( $ newConstraints [ self :: CONSTRAINT_PATH_SUFFIX ] ) ) { $ pathSuffix = $ prepend ? $ pathSuffix . $ newConstraints [ self :: CONSTRAINT_PATH_SUFFIX ] : $ newConstraints [ se... | Create a new instance with the path suffix constraint added This can be applied multiple times later suffixes will be appended to the end |
58,562 | public function create ( ) { $ config = new Configuration ( ) ; $ config -> setClassMetadataFactoryName ( Mapping \ ClassMetadataFactory :: class ) ; $ eventManager = new EventManager ( ) ; $ flowAnnotationDriver = $ this -> objectManager -> get ( FlowAnnotationDriver :: class ) ; $ config -> setMetadataDriverImpl ( $ ... | Factory method which creates an EntityManager . |
58,563 | protected function moveTemporaryFileToFinalDestination ( $ temporaryFile , $ finalTargetPathAndFilename ) { if ( ! file_exists ( dirname ( $ finalTargetPathAndFilename ) ) ) { Files :: createDirectoryRecursively ( dirname ( $ finalTargetPathAndFilename ) ) ; } if ( copy ( $ temporaryFile , $ finalTargetPathAndFilename ... | Move a temporary file to the final destination creating missing path segments on the way . |
58,564 | public function matches ( $ className , $ methodName , $ methodDeclaringClassName , $ pointcutQueryIdentifier ) : bool { $ designatedAnnotations = $ this -> reflectionService -> getClassAnnotations ( $ className , $ this -> annotation ) ; if ( $ designatedAnnotations !== [ ] || $ this -> annotationValueConstraints === ... | Checks if the specified class matches with the class tag filter pattern |
58,565 | public function render ( ) { $ name = $ this -> getName ( ) ; $ this -> registerFieldNameForFormTokenGeneration ( $ name ) ; $ this -> tag -> forceClosingTag ( true ) ; $ this -> tag -> addAttribute ( 'name' , $ name ) ; $ this -> tag -> setContent ( htmlspecialchars ( $ this -> getValueAttribute ( ) ) ) ; $ this -> ad... | Renders the textarea . |
58,566 | public function createCommand ( string $ output = null ) { if ( ! $ this -> isDatabaseConfigured ( ) ) { $ this -> outputLine ( 'Database schema creation has been SKIPPED, the driver and host backend options are not set in /Configuration/Settings.yaml.' ) ; $ this -> quit ( 1 ) ; } $ this -> doctrineService -> createSc... | Create the database schema |
58,567 | public function updateCommand ( bool $ unsafeMode = false , string $ output = null ) { if ( ! $ this -> isDatabaseConfigured ( ) ) { $ this -> outputLine ( 'Database schema update has been SKIPPED, the driver and host backend options are not set in /Configuration/Settings.yaml.' ) ; $ this -> quit ( 1 ) ; } $ this -> d... | Update the database schema |
58,568 | public function entityStatusCommand ( bool $ dumpMappingData = false , string $ entityClassName = null ) { $ info = $ this -> doctrineService -> getEntityStatus ( ) ; if ( $ info === [ ] ) { $ this -> output ( 'You do not have any mapped Doctrine ORM entities according to the current configuration. ' ) ; $ this -> outp... | Show the current status of entities and mappings |
58,569 | public function dqlCommand ( int $ depth = 3 , string $ hydrationMode = 'array' , int $ offset = null , int $ limit = null ) { if ( ! $ this -> isDatabaseConfigured ( ) ) { $ this -> outputLine ( 'DQL query is not possible, the driver and host backend options are not set in /Configuration/Settings.yaml.' ) ; $ this -> ... | Run arbitrary DQL and display results |
58,570 | public function migrationStatusCommand ( bool $ showMigrations = false , bool $ showDescriptions = false ) { if ( ! $ this -> isDatabaseConfigured ( ) ) { $ this -> outputLine ( 'Doctrine migration status not available, the driver and host backend options are not set in /Configuration/Settings.yaml.' ) ; $ this -> quit... | Show the current migration status |
58,571 | public function migrateCommand ( string $ version = null , string $ output = null , bool $ dryRun = false , bool $ quiet = false ) { if ( ! $ this -> isDatabaseConfigured ( ) ) { $ this -> outputLine ( 'Doctrine migration not possible, the driver and host backend options are not set in /Configuration/Settings.yaml.' ) ... | Migrate the database schema |
58,572 | protected function handleException ( \ Exception $ exception ) { $ this -> outputLine ( '<error>%s</error>' , [ $ exception -> getMessage ( ) ] ) ; $ this -> outputLine ( ) ; $ this -> outputLine ( 'The exception details have been logged to the Flow system log.' ) ; $ message = $ this -> throwableStorage -> logThrowabl... | Output an error message and log the exception . |
58,573 | protected function isValid ( $ value ) { if ( ! is_numeric ( $ value ) ) { $ this -> addError ( 'A valid number is expected.' , 1221563685 ) ; return ; } $ minimum = $ this -> options [ 'minimum' ] ; $ maximum = $ this -> options [ 'maximum' ] ; if ( $ minimum > $ maximum ) { $ x = $ minimum ; $ minimum = $ maximum ; $... | The given value is valid if it is a number in the specified range . |
58,574 | public function getValueForOperand ( $ expression ) { if ( is_array ( $ expression ) ) { $ result = [ ] ; foreach ( $ expression as $ expressionEntry ) { $ result [ ] = $ this -> getValueForOperand ( $ expressionEntry ) ; } return $ result ; } elseif ( is_numeric ( $ expression ) ) { return $ expression ; } elseif ( $ ... | Returns the static value of the given operand this might be also a global object |
58,575 | public function matches ( $ className , $ methodName , $ methodDeclaringClassName , $ pointcutQueryIdentifier ) : bool { $ this -> runtimeEvaluationsDefinition = [ ] ; $ matches = true ; foreach ( $ this -> filters as & $ operatorAndFilter ) { list ( $ operator , $ filter ) = $ operatorAndFilter ; $ currentFilterMatche... | Checks if the specified class and method match the registered class - and method filter patterns . |
58,576 | public function addFilter ( $ operator , PointcutFilterInterface $ filter ) : void { $ this -> filters [ ] = [ $ operator , $ filter ] ; if ( $ operator !== '&&' && $ operator !== '&&!' ) { $ this -> earlyReturn = false ; } } | Adds a class filter to the composite |
58,577 | protected function buildRuntimeEvaluationsConditionCode ( $ operator , array $ conditions , & $ useGlobalObjects = false ) { $ conditionsCode = [ ] ; if ( count ( $ conditions ) === 0 ) { return '' ; } if ( isset ( $ conditions [ 'evaluateConditions' ] ) && is_array ( $ conditions [ 'evaluateConditions' ] ) ) { $ condi... | Returns the PHP code of the conditions used for runtime evaluations |
58,578 | protected function buildMethodArgumentsEvaluationConditionCode ( array $ conditions , & $ useGlobalObjects = false ) { $ argumentConstraintsConditionsCode = '' ; $ isFirst = true ; foreach ( $ conditions as $ argumentName => $ argumentConstraint ) { $ objectAccess = explode ( '.' , $ argumentName , 2 ) ; if ( count ( $... | Returns the PHP code of the conditions used argument runtime evaluations |
58,579 | protected function buildGlobalRuntimeEvaluationsConditionCode ( array $ conditions , & $ useGlobalObjects = false ) { $ evaluateConditionsCode = '' ; $ isFirst = true ; foreach ( $ conditions as $ constraint ) { $ leftValue = $ this -> buildArgumentEvaluationAccessCode ( $ constraint [ 'leftValue' ] , $ useGlobalObject... | Returns the PHP code of the conditions used for global runtime evaluations |
58,580 | protected function buildArgumentEvaluationAccessCode ( $ argumentAccess , & $ useGlobalObjects = false ) { if ( is_array ( $ argumentAccess ) ) { $ valuesAccessCodes = [ ] ; foreach ( $ argumentAccess as $ singleValue ) { $ valuesAccessCodes [ ] = $ this -> buildArgumentEvaluationAccessCode ( $ singleValue ) ; } $ argu... | Returns the PHP code used to access one argument of a runtime evaluation |
58,581 | public function setStream ( $ stream ) { if ( ! is_resource ( $ stream ) && ! $ stream instanceof \ Closure ) { throw new \ InvalidArgumentException ( sprintf ( 'setStream() expects a stream or Closure, %s given.' , gettype ( $ stream ) ) , 1416311979 ) ; } $ this -> stream = $ stream ; } | Sets the data stream which can deliver the content of this storage object |
58,582 | public function getStream ( ) { if ( $ this -> stream instanceof \ Closure ) { $ this -> stream = $ this -> stream -> __invoke ( ) ; } if ( is_resource ( $ this -> stream ) ) { $ meta = stream_get_meta_data ( $ this -> stream ) ; if ( $ meta [ 'seekable' ] ) { rewind ( $ this -> stream ) ; } } return $ this -> stream ;... | Returns the data stream which can deliver the content of this storage object |
58,583 | public function create ( $ packagesBasePath , $ packagePath , $ packageKey , $ composerName , array $ autoloadConfiguration = [ ] , array $ packageClassInformation = null ) { $ absolutePackagePath = Files :: concatenatePaths ( [ $ packagesBasePath , $ packagePath ] ) . '/' ; if ( $ packageClassInformation === null ) { ... | Returns a package instance . |
58,584 | public function detectFlowPackageFilePath ( $ packageKey , $ absolutePackagePath ) { if ( ! is_dir ( $ absolutePackagePath ) ) { throw new Exception \ InvalidPackagePathException ( sprintf ( 'The given package path "%s" is not a readable directory.' , $ absolutePackagePath ) , 1445904440 ) ; } $ composerManifest = Comp... | Detects if the package contains a package file and returns the path and classname . |
58,585 | public function build ( string $ methodName , array $ interceptedMethods , string $ targetClassName ) : void { if ( $ methodName === '__construct' ) { throw new Exception ( 'The ' . __CLASS__ . ' cannot build constructor interceptor code.' , 1173107446 ) ; } $ declaringClassName = $ interceptedMethods [ $ methodName ] ... | Builds interception PHP code for an adviced method |
58,586 | public function helpStubCommand ( ) { $ context = $ this -> bootstrap -> getContext ( ) ; $ applicationPackage = $ this -> packageManager -> getPackage ( $ this -> applicationPackageKey ) ; $ this -> outputLine ( '<b>%s %s ("%s" context)</b>' , [ $ this -> applicationName , $ applicationPackage -> getInstalledVersion (... | Displays a short general help message |
58,587 | public function helpCommand ( string $ commandIdentifier = null ) { $ exceedingArguments = $ this -> request -> getExceedingArguments ( ) ; if ( count ( $ exceedingArguments ) > 0 && $ commandIdentifier === null ) { $ commandIdentifier = $ exceedingArguments [ 0 ] ; } if ( $ commandIdentifier === null ) { $ this -> dis... | Display help for a command |
58,588 | public function errorCommand ( CommandException $ exception ) { $ this -> outputLine ( '<error>%s</error>' , [ $ exception -> getMessage ( ) ] ) ; if ( $ exception instanceof AmbiguousCommandIdentifierException ) { $ this -> outputLine ( 'Please specify the complete command identifier. Matched commands:' ) ; $ this -> ... | Displays an error message |
58,589 | protected function buildCommandsIndex ( array $ commands ) { $ commandsByPackagesAndControllers = [ ] ; foreach ( $ commands as $ command ) { if ( $ command -> isInternal ( ) ) { continue ; } $ commandIdentifier = $ command -> getCommandIdentifier ( ) ; $ packageKey = strstr ( $ commandIdentifier , ':' , true ) ; $ com... | Builds an index of available commands . For each of them a Command object is added to the commands array of this class . |
58,590 | protected function generateEvaluatorCode ( $ expression ) { $ parser = new EntityPrivilegeExpressionParser ( $ expression ) ; $ result = $ parser -> match_Expression ( ) ; if ( $ result === false ) { throw new ParserException ( sprintf ( 'Expression "%s" could not be parsed.' , $ expression ) , 1416933186 ) ; } elseif ... | Internal generator method |
58,591 | protected function getDateFormat ( PropertyMappingConfigurationInterface $ configuration = null ) { if ( $ configuration === null ) { return self :: DEFAULT_DATE_FORMAT ; } $ dateFormat = $ configuration -> getConfigurationValue ( StringConverter :: class , self :: CONFIGURATION_DATE_FORMAT ) ; if ( $ dateFormat === nu... | Determines the date format to use for the conversion . |
58,592 | protected function getCsvDelimiter ( PropertyMappingConfigurationInterface $ configuration = null ) { if ( $ configuration === null ) { return self :: DEFAULT_CSV_DELIMITER ; } $ csvDelimiter = $ configuration -> getConfigurationValue ( StringConverter :: class , self :: CONFIGURATION_CSV_DELIMITER ) ; if ( $ csvDelimi... | Determines the delimiter to use for the conversion from array to CSV format . |
58,593 | protected function getArrayFormat ( PropertyMappingConfigurationInterface $ configuration = null ) { if ( $ configuration === null ) { return self :: DEFAULT_ARRAY_FORMAT ; } $ arrayFormat = $ configuration -> getConfigurationValue ( StringConverter :: class , self :: CONFIGURATION_ARRAY_FORMAT ) ; if ( $ arrayFormat =... | Determines the format to use for the conversion from array to string . |
58,594 | public function getIterator ( ) : CacheEntryIterator { if ( ! $ this -> backend instanceof IterableBackendInterface ) { throw new NotSupportedByBackendException ( 'The cache backend (%s) configured for cache "%s" cannot be used as an iterator. Please choose a different cache backend or adjust the code using this cache.... | Returns an iterator over the entries of this cache |
58,595 | protected function getConstructorArgumentsForClass ( $ className ) { if ( ! isset ( $ this -> constructorReflectionFirstLevelCache [ $ className ] ) ) { $ constructorSignature = [ ] ; if ( $ this -> reflectionService -> hasMethod ( $ className , '__construct' ) ) { $ constructorSignature = $ this -> reflectionService -... | Get the constructor argument reflection for the given object type . |
58,596 | public function setUsername ( $ username ) { if ( preg_match ( self :: PATTERN_MATCH_USERNAME , $ username ) !== 1 ) { throw new \ InvalidArgumentException ( '"' . $ username . '" is not a valid username.' , 1184071238 ) ; } $ this -> username = $ username ; } | Sets the URI s username |
58,597 | public function setPassword ( $ password ) { if ( preg_match ( self :: PATTERN_MATCH_PASSWORD , $ password ) !== 1 ) { throw new \ InvalidArgumentException ( 'The specified password is not valid as part of a URI.' , 1184071239 ) ; } $ this -> password = $ password ; } | Sets the URI s password |
58,598 | public function setPort ( $ port ) { if ( preg_match ( self :: PATTERN_MATCH_PORT , $ port ) !== 1 ) { throw new \ InvalidArgumentException ( '"' . $ port . '" is not valid port number as part of a URI.' , 1184071241 ) ; } $ this -> port = ( integer ) $ port ; } | Sets the port in the URI |
58,599 | public function setPath ( $ path ) { if ( preg_match ( self :: PATTERN_MATCH_PATH , $ path ) !== 1 ) { throw new \ InvalidArgumentException ( '"' . $ path . '" is not valid path as part of a URI.' , 1184071242 ) ; } $ this -> path = $ path ; } | Sets the path of the URI |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.