idx int64 0 60.3k | question stringlengths 101 6.21k | target stringlengths 7 803 |
|---|---|---|
24,900 | public static function getThrowableStack ( $ ex , & $ data = [ ] , $ offset = 0 ) { $ data = static :: getThrowableData ( $ ex , $ offset ) ; if ( ( $ current = $ ex -> getPrevious ( ) ) !== null ) { static :: getThrowableStack ( $ current , $ data [ 'prev' ] , count ( static :: getTraceElements ( $ ex ) ) ) ; } return $ data ; } | Return throwable stack in recursive array format . |
24,901 | public static function getThrowableData ( $ ex , $ offset = 0 ) { return [ 'message' => $ ex -> getMessage ( ) , 'class' => get_class ( $ ex ) , 'file' => $ ex -> getFile ( ) , 'line' => $ ex -> getLine ( ) , 'code' => $ ex -> getCode ( ) , 'trace' => static :: getTraceElements ( $ ex , $ offset ) , 'isError' => $ ex instanceof \ Error , 'prev' => null ] ; } | Return throwable data in array format . |
24,902 | public static function stripTags ( $ html , $ allowable = [ ] ) { if ( ! is_array ( $ allowable ) ) { $ allowable = preg_split ( "/, */" , $ allowable , - 1 , PREG_SPLIT_NO_EMPTY ) ; } if ( $ allowable ) { return strip_tags ( $ html , '<' . implode ( '><' , $ allowable ) . '>' ) ; } return strip_tags ( $ html ) ; } | Remove tags . |
24,903 | public function handle ( ) { $ path = $ this -> getFilePath ( ) ; if ( ! file_exists ( $ path ) ) { file_put_contents ( $ path , "" ) ; } $ content = file_get_contents ( $ path ) ; foreach ( $ this -> generateKeys ( ) as $ key ) { preg_match ( $ key [ 'regex' ] , $ content , $ matches ) ; if ( $ matches ) { $ content = preg_replace ( $ key [ 'regex' ] , $ key [ 'value' ] , $ content ) ; } else { $ content .= $ key [ 'value' ] . PHP_EOL ; } } file_put_contents ( $ path , $ content ) ; $ this -> info ( 'Wordpress keys regenerated' ) ; } | Handle generating the Wordpress auth keys |
24,904 | private function generateKeys ( ) { $ content = [ ] ; for ( $ i = 0 ; $ i < count ( $ this -> keys ) ; $ i ++ ) { $ holder = [ ] ; $ value = ! $ this -> option ( $ this -> keys [ $ i ] ) || $ this -> option ( $ this -> keys [ $ i ] ) === 'generate' ? str_random ( 64 ) : $ this -> option ( $ this -> keys [ $ i ] ) ; $ holder [ 'regex' ] = str_replace_first ( $ this -> findRegExPlaceholder , $ this -> keys [ $ i ] , $ this -> findRegEx ) ; $ holder [ 'value' ] = $ this -> keys [ $ i ] . '="' . $ value . '"' ; array_push ( $ content , $ holder ) ; } return $ content ; } | Generate regex used for replacing the key value in the env file and the value that should be used in place |
24,905 | public static function setSaveHandler ( \ SessionHandlerInterface $ handler ) { return session_set_save_handler ( array ( $ handler , 'open' ) , array ( $ handler , 'close' ) , array ( $ handler , 'read' ) , array ( $ handler , 'write' ) , array ( $ handler , 'destroy' ) , array ( $ handler , 'gc' ) ) ; } | Use a SessionHandlerInterface object as a native session handler |
24,906 | protected function parsePayload ( $ payload ) { $ database = 0 ; $ client = null ; $ pregCallback = function ( $ matches ) use ( & $ database , & $ client ) { if ( 2 === $ count = \ count ( $ matches ) ) { $ database = ( int ) $ matches [ 1 ] ; } if ( 4 === $ count ) { $ database = ( int ) $ matches [ 2 ] ; $ client = $ matches [ 3 ] ; } return ' ' ; } ; $ event = \ preg_replace_callback ( '/ \(db (\d+)\) | \[(\d+) (.*?)\] /' , $ pregCallback , $ payload , 1 ) ; @ list ( $ timestamp , $ command , $ arguments ) = \ explode ( ' ' , $ event , 3 ) ; return ( object ) [ 'timestamp' => ( float ) $ timestamp , 'database' => $ database , 'client' => $ client , 'command' => \ substr ( $ command , 1 , - 1 ) , 'arguments' => $ arguments , ] ; } | Parses the response string returned by the server into an object . |
24,907 | public function addRoute ( array $ methods , string $ path , string $ handler ) { $ this -> routeCollector -> addRoute ( $ methods , $ this -> getPrefix ( ) . $ path , $ handler ) ; return $ this ; } | Add a new route in the route collector |
24,908 | public function createContainer ( ) { $ container = new Container ; if ( ( $ this -> options [ 'autowire' ] ?? false ) ) { $ container -> delegate ( new ReflectionContainer ) ; } \ logger ( ) -> debug ( 'Created PSR-11 Container (The Leauge Container)' ) ; return $ container ; } | Create a new container |
24,909 | public function apply ( EntityInterface $ entity , SpecificationInterface $ specification ) { $ attribute_name = $ specification -> getOption ( 'attribute' , $ specification -> getName ( ) ) ; $ entity_value = $ entity -> getValue ( $ attribute_name ) ; return $ entity_value ; } | Transform the entity value which is described by the given attributespec to it s output representation . |
24,910 | public function getMapRecords ( $ mapUid , $ nbLaps , $ sort , $ nbRecords ) { $ query = new RecordQuery ( ) ; $ query -> filterByMapuid ( $ mapUid ) ; $ query -> filterByNblaps ( $ nbLaps ) ; $ query -> orderByScore ( $ sort ) ; $ query -> limit ( $ nbRecords ) ; $ result = $ query -> find ( ) ; $ result -> populateRelation ( 'Player' ) ; RecordTableMap :: clearInstancePool ( ) ; return $ result -> getData ( ) ; } | Get records on a certain map . |
24,911 | public function getPlayerMapRecords ( $ mapUid , $ nbLaps , $ logins ) { $ query = new RecordQuery ( ) ; $ query -> filterByMapuid ( $ mapUid ) ; $ query -> filterByNblaps ( $ nbLaps ) ; $ query -> filterByPlayerLogins ( $ logins ) ; $ result = $ query -> find ( ) ; $ result -> populateRelation ( 'Player' ) ; RecordTableMap :: clearInstancePool ( ) ; return $ result -> getData ( ) ; } | Get a players record on a certain map . |
24,912 | public function closeSocket ( ) { if ( is_resource ( $ this -> resource ) ) { fclose ( $ this -> resource ) ; $ this -> resource = null ; } } | Close socket if open |
24,913 | public function handleErrors ( $ msg_prefix = '' , $ msg_suffix = '' , $ user_error_handling = false ) { if ( libxml_get_last_error ( ) !== false ) { $ errors = libxml_get_errors ( ) ; libxml_clear_errors ( ) ; libxml_use_internal_errors ( $ user_error_handling ) ; throw new DOMException ( $ msg_prefix . $ this -> getErrorMessage ( $ errors ) . $ msg_suffix ) ; } libxml_use_internal_errors ( $ user_error_handling ) ; } | Checks for internal libxml errors and throws them in form of a single DOMException . If no errors occured then nothing happens . |
24,914 | protected function getErrorMessage ( array $ errors ) { $ error_message = '' ; foreach ( $ errors as $ error ) { $ error_message .= $ this -> parseError ( $ error ) . PHP_EOL . PHP_EOL ; } return $ error_message ; } | Converts a given list of libxml errors into an error report . |
24,915 | protected function parseError ( LibXMLError $ error ) { $ prefix_map = [ LIBXML_ERR_WARNING => '[warning]' , LIBXML_ERR_FATAL => '[fatal]' , LIBXML_ERR_ERROR => '[error]' ] ; $ prefix = isset ( $ prefix_map [ $ error -> level ] ) ? $ prefix_map [ $ error -> level ] : $ prefix_map [ LIBXML_ERR_ERROR ] ; $ msg_parts = [ ] ; $ msg_parts [ ] = sprintf ( '%s %s: %s' , $ prefix , $ error -> level , trim ( $ error -> message ) ) ; $ msg_parts [ ] = sprintf ( 'Line: %d' , $ error -> line ) ; $ msg_parts [ ] = sprintf ( 'Column: %d' , $ error -> column ) ; if ( $ error -> file ) { $ msg_parts [ ] = sprintf ( 'File: %s' , $ error -> file ) ; } return implode ( PHP_EOL , $ msg_parts ) ; } | Converts a given libxml error into an error message . |
24,916 | public static function positionForSequence ( array $ sequence , $ tokens , $ startFrom = null ) { $ seqIterator = ( new ArrayObject ( $ sequence ) ) -> getIterator ( ) ; $ tokenIterator = ( new ArrayObject ( $ tokens ) ) -> getIterator ( ) ; if ( $ startFrom != null ) { $ tokenIterator -> seek ( $ startFrom ) ; } while ( $ tokenIterator -> valid ( ) ) { $ seqIterator -> rewind ( ) ; $ keys = array ( ) ; list ( $ allowedTokens , $ timesAllowed ) = $ seqIterator -> current ( ) ; self :: seekToNextType ( $ tokenIterator , $ allowedTokens ) ; while ( $ tokenIterator -> valid ( ) ) { if ( ! $ seqIterator -> valid ( ) ) { $ first = array_shift ( $ keys ) ; $ last = array_pop ( $ keys ) ; return array ( $ first , $ last ) ; } list ( $ allowedTokens , $ timesAllowed ) = $ seqIterator -> current ( ) ; if ( $ timesAllowed == '*' ) { while ( $ tokenIterator -> valid ( ) && self :: isTokenType ( $ tokenIterator -> current ( ) , $ allowedTokens ) ) { $ keys [ ] = $ tokenIterator -> key ( ) ; $ tokenIterator -> next ( ) ; } } else { for ( $ i = 0 ; $ i < $ timesAllowed ; $ i ++ ) { if ( self :: isTokenType ( $ tokenIterator -> current ( ) , $ allowedTokens ) ) { $ keys [ ] = $ tokenIterator -> key ( ) ; $ tokenIterator -> next ( ) ; } else { continue 3 ; } } } $ seqIterator -> next ( ) ; } } } | Utility method to find a sequence of tokens matching the specified tokenisation pattern . |
24,917 | private static function seekToNextType ( ArrayIterator $ tokenIterator , $ type ) { while ( $ tokenIterator -> valid ( ) ) { if ( self :: isTokenType ( $ tokenIterator -> current ( ) , $ type ) ) { return ; } $ tokenIterator -> next ( ) ; } } | Seeks ahead using the iterator until the next token matching the type |
24,918 | public static function isTokenType ( $ token , $ types ) { if ( ! is_array ( $ types ) ) { $ types = array ( $ types ) ; } return is_array ( $ token ) ? in_array ( $ token [ 0 ] , $ types ) : in_array ( $ token , $ types ) ; } | Checks whether a given token is any one of the specified token types |
24,919 | public function addLocale ( $ locale ) { $ locale = Locale :: sanitizeLocale ( $ locale ) ; if ( ! isset ( $ this -> available [ $ locale ] ) ) { $ locale = new Locale ( $ locale ) ; $ this -> available [ $ locale -> getLocale ( ) ] = $ locale ; } return $ this ; } | Add locale to available locales . |
24,920 | public function findByCountry ( $ country ) { $ country = Text :: toUpper ( $ country ) ; foreach ( $ this -> getAvailable ( ) as $ locale ) { if ( $ country == $ locale -> getCountry ( Text :: UPPER ) ) { return $ locale ; } } return null ; } | Get locale with specified country . |
24,921 | public function findByLanguage ( $ language ) { $ language = Text :: toLower ( $ language ) ; foreach ( $ this -> getAvailable ( ) as $ locale ) { if ( $ language == $ locale -> getLanguage ( Text :: LOWER ) ) { return $ locale ; } } return null ; } | Get locale with specified language . |
24,922 | public function findByLocale ( $ locale ) { $ locale = Locale :: sanitizeLocale ( $ locale ) ; return isset ( $ this -> available [ $ locale ] ) ? $ this -> available [ $ locale ] : null ; } | Get locale with specified name . |
24,923 | public function setActive ( $ locale ) { $ active = $ this -> findByLocale ( $ locale ) ; if ( ! $ active ) { throw new Exception ( sprintf ( "Locale '%s' not in list." , $ locale ) ) ; } $ this -> active = $ active ; \ Locale :: setDefault ( $ active -> getLocale ( ) ) ; return $ this ; } | Set the current active locale incl . localization parameters . |
24,924 | protected function CreateNewUser ( ) { if ( ! $ this -> _login -> getCanRegister ( ) ) { $ this -> FormLogin ( ) ; return ; } $ myWords = $ this -> WordCollection ( ) ; $ this -> defaultXmlnukeDocument -> setPageTitle ( $ myWords -> Value ( "CREATEUSERTITLE" ) ) ; $ this -> _login -> setAction ( ModuleActionLogin :: NEWUSER ) ; $ this -> _login -> setNextAction ( ModuleActionLogin :: NEWUSERCONFIRM ) ; $ this -> _login -> setPassword ( "" ) ; $ this -> _login -> setCanRegister ( false ) ; $ this -> _login -> setCanRetrievePassword ( false ) ; return ; } | Create New User |
24,925 | protected function CreateNewUserConfirm ( ) { if ( ! $ this -> _login -> getCanRegister ( ) ) { $ this -> FormLogin ( ) ; return ; } $ myWords = $ this -> WordCollection ( ) ; $ container = new XmlnukeUIAlert ( $ this -> _context , UIAlert :: BoxAlert ) ; $ container -> setAutoHide ( 5000 ) ; $ this -> _blockCenter -> addXmlnukeObject ( $ container ) ; if ( ( $ this -> _login -> getName ( ) == "" ) || ( $ this -> _login -> getEmail ( ) == "" ) || ( $ this -> _login -> getUsername ( ) == "" ) || ! Util :: isValidEmail ( $ this -> _login -> getEmail ( ) ) ) { $ container -> addXmlnukeObject ( new XmlnukeText ( $ myWords -> Value ( "INCOMPLETEDATA" ) , true ) ) ; $ this -> CreateNewUser ( ) ; } elseif ( ! XmlInputImageValidate :: validateText ( $ this -> _context ) ) { $ container -> addXmlnukeObject ( new XmlnukeText ( $ myWords -> Value ( "OBJECTIMAGEINVALID" ) , true ) ) ; $ this -> CreateNewUser ( ) ; } else { $ newpassword = $ this -> getRandomPassword ( ) ; if ( ! $ this -> _users -> addUser ( $ this -> _login -> getName ( ) , $ this -> _login -> getUsername ( ) , $ this -> _login -> getEmail ( ) , $ newpassword ) ) { $ container -> addXmlnukeObject ( new XmlnukeText ( $ myWords -> Value ( "CREATEUSERFAIL" ) , true ) ) ; $ this -> CreateNewUser ( ) ; } else { $ this -> sendWelcomeMessage ( $ myWords , $ this -> _context -> get ( "name" ) , $ this -> _context -> get ( "newloguser" ) , $ this -> _context -> get ( "email" ) , $ newpassword ) ; $ this -> _users -> Save ( ) ; $ container -> addXmlnukeObject ( new XmlnukeText ( $ myWords -> Value ( "CREATEUSEROK" ) , true ) ) ; $ container -> setUIAlertType ( UIAlert :: BoxInfo ) ; $ this -> FormLogin ( $ block ) ; } } } | Confirm New user |
24,926 | public function getRandomPassword ( ) { $ password = "" ; for ( $ i = 0 ; $ i < 7 ; $ i ++ ) { $ type = rand ( 0 , 21 ) % 3 ; $ number = rand ( 0 , 25 ) ; if ( $ type == 1 ) { $ password = $ password . chr ( 48 + ( $ number % 10 ) ) ; } else { if ( $ type == 2 ) { $ password = $ password . chr ( 65 + $ number ) ; } else { $ password = $ password . chr ( 97 + $ number ) ; } } } return $ password ; } | Make a random password |
24,927 | public function input ( $ name , $ value = '' , $ id = '' , $ class = '' , array $ attrs = array ( ) ) { return '<input id="' . $ id . '" class="' . $ class . '" type="' . $ this -> _type . '" name="' . $ name . '" value="' . $ value . '" ' . $ this -> buildAttrs ( $ attrs ) . '/>' ; } | Create input . |
24,928 | public function label ( $ id , $ valAlias , $ content = '' ) { $ class = implode ( ' ' , array ( $ this -> _jbSrt ( $ this -> _type . '-lbl' ) , $ this -> _jbSrt ( 'label-' . $ valAlias ) , ) ) ; return '<label for="' . $ id . '" class="' . $ class . '">' . $ content . '</label>' ; } | Create label tag . |
24,929 | protected function _checkedOptions ( $ value , $ selected , array $ attrs ) { $ attrs [ 'checked' ] = false ; if ( is_array ( $ selected ) ) { foreach ( $ selected as $ val ) { if ( $ value == $ val ) { $ attrs [ 'checked' ] = 'checked' ; break ; } } } else { if ( $ value == $ selected ) { $ attrs [ 'checked' ] = 'checked' ; } } return $ attrs ; } | Checked options . |
24,930 | protected function _elementTpl ( $ name , $ value = '' , $ id = '' , $ text = '' , array $ attrs = array ( ) ) { $ alias = Str :: slug ( $ value , true ) ; $ inpClass = $ this -> _jbSrt ( 'val-' . $ alias ) ; $ input = $ this -> input ( $ name , $ value , $ id , $ inpClass , $ attrs ) ; if ( $ this -> _tpl === 'default' ) { return $ input . $ this -> label ( $ id , $ alias , $ text ) ; } elseif ( $ this -> _tpl === 'wrap' ) { return $ this -> label ( $ id , $ alias , $ input . ' ' . $ text ) ; } if ( is_callable ( $ this -> _tpl ) ) { return call_user_func ( $ this -> _tpl , $ this , $ name , $ value , $ id , $ text , $ attrs ) ; } return null ; } | Single element template output . |
24,931 | protected function _setTpl ( $ tpl ) { $ this -> _tpl = $ tpl ; if ( $ tpl === true ) { $ this -> _tpl = self :: TPL_WRAP ; } if ( $ tpl === false ) { $ this -> _tpl = self :: TPL_DEFAULT ; } } | Setup template . |
24,932 | public function verifyStackExists ( $ stackName , $ organization , OutputInterface $ output , Image $ client = null ) { if ( ! $ client ) { $ client = $ this -> clientProvider -> getImageClient ( $ organization ) ; } if ( ! $ stackName || ! $ this -> rokkaHelper -> stackExists ( $ client , $ stackName , $ organization ) ) { $ output -> writeln ( $ this -> formatterHelper -> formatBlock ( [ 'Error!' , 'Stack "' . $ stackName . '" does not exist on "' . $ organization . '" organization!' , ] , 'error' , true ) ) ; return false ; } return true ; } | Ensures that the given Stack exists for the input Organization . |
24,933 | public function resolveOrganizationName ( $ organizationName , OutputInterface $ output ) { if ( ! $ organizationName ) { $ organizationName = $ this -> rokkaHelper -> getDefaultOrganizationName ( ) ; } if ( ! $ this -> rokkaHelper -> validateOrganizationName ( $ organizationName ) ) { $ output -> writeln ( $ this -> formatterHelper -> formatBlock ( [ 'Error!' , 'The organization name "' . $ organizationName . '" is not valid!' , ] , 'error' , true ) ) ; return false ; } $ client = $ this -> clientProvider -> getUserClient ( ) ; if ( $ this -> rokkaHelper -> organizationExists ( $ client , $ organizationName ) ) { return $ organizationName ; } $ output -> writeln ( $ this -> formatterHelper -> formatBlock ( [ 'Error!' , 'The organization "' . $ organizationName . '" does not exists!' , ] , 'error' , true ) ) ; return false ; } | Get a valid organization name . |
24,934 | public function verifySourceImageExists ( $ hash , $ organizationName , OutputInterface $ output , Image $ client ) { if ( ! $ this -> rokkaHelper -> validateImageHash ( $ hash ) ) { $ output -> writeln ( $ this -> formatterHelper -> formatBlock ( [ 'Error!' , 'The Image HASH "' . $ hash . '" is not valid!' , ] , 'error' , true ) ) ; return false ; } if ( $ this -> rokkaHelper -> imageExists ( $ client , $ hash , $ organizationName ) ) { return true ; } $ output -> writeln ( $ this -> formatterHelper -> formatBlock ( [ 'Error!' , 'The SourceImage "' . $ hash . '" has not been found in Organization "' . $ organizationName . '"' , ] , 'error' , true ) ) ; return false ; } | Verify that the given Source image exists output the error message if needed . |
24,935 | public function build ( FormFactoryInterface $ form_factory , $ data = null ) { $ options = is_callable ( $ this -> options ) ? call_user_func ( $ this -> options , $ data ) : $ this -> options ; if ( null !== $ this -> name ) { $ form = $ form_factory -> createNamed ( $ this -> name , $ this -> type , $ data , $ options ) ; } else { $ form = $ form_factory -> create ( $ this -> type , $ data , $ options ) ; } return new FormSubmitProcessor ( $ form , $ this -> on_success , $ this -> on_failure , $ this -> form_submit_processor ) ; } | Create a handler which is able to process the request . |
24,936 | public function getFilterConditions ( $ plugin = null ) { $ filterData = null ; $ filterCond = null ; if ( $ this -> _controller -> request -> is ( 'get' ) ) { $ filterData = $ this -> _controller -> request -> query ( 'data.FilterData' ) ; $ filterCond = $ this -> _controller -> request -> query ( 'data.FilterCond' ) ; } elseif ( $ this -> _controller -> request -> is ( 'post' ) ) { $ filterData = $ this -> _controller -> request -> data ( 'FilterData' ) ; $ filterCond = $ this -> _controller -> request -> data ( 'FilterCond' ) ; } $ conditions = $ this -> _modelFilter -> buildConditions ( $ filterData , $ filterCond , $ plugin ) ; return $ conditions ; } | Return database query condition from filter data |
24,937 | public function getGroupAction ( $ groupActions = null ) { if ( ! $ this -> _controller -> request -> is ( 'post' ) ) { return false ; } $ action = $ this -> _controller -> request -> data ( 'FilterGroup.action' ) ; if ( empty ( $ action ) || ( ! empty ( $ groupActions ) && ! is_array ( $ groupActions ) ) ) { return false ; } if ( empty ( $ groupActions ) ) { return $ action ; } elseif ( in_array ( $ action , $ groupActions ) ) { return $ action ; } else { return false ; } } | Return group action from filter data |
24,938 | public function getExtendPaginationOptions ( $ options = null ) { if ( empty ( $ options ) || ! is_array ( $ options ) ) { $ options = [ ] ; } if ( ! property_exists ( $ this -> _controller , 'Paginator' ) ) { throw new InternalErrorException ( __d ( 'view_extension' , 'Paginator component is not loaded' ) ) ; } $ paginatorOptions = $ this -> _controller -> Paginator -> mergeOptions ( null ) ; $ page = ( int ) Hash :: get ( $ paginatorOptions , 'page' ) ; if ( ! $ this -> _controller -> RequestHandler -> prefers ( 'prt' ) || ( $ page > 1 ) ) { return $ options ; } $ options [ 'limit' ] = CAKE_THEME_PRINT_DATA_LIMIT ; $ options [ 'maxLimit' ] = CAKE_THEME_PRINT_DATA_LIMIT ; return $ options ; } | Return pagination options for print preview request If request is print preview and page number equal 1 - set new limits for pagination . |
24,939 | public function setBusy ( $ bool = true ) { $ this -> busyCounter = 0 ; $ this -> isBusy = ( bool ) $ bool ; if ( $ bool ) { $ text = "Please wait..." ; if ( is_string ( $ bool ) ) { $ text = ( string ) $ bool ; } $ lbl = Label :: create ( ) ; $ lbl -> setText ( $ text ) -> setTextColor ( "fff" ) -> setTextSize ( 6 ) -> setSize ( 90 , 12 ) -> setAlign ( "center" , "center" ) -> setPosition ( $ this -> busyFrame -> getWidth ( ) / 2 , - ( $ this -> busyFrame -> getHeight ( ) / 2 ) ) ; $ this -> busyFrame -> addChild ( $ lbl ) ; $ quad = Quad :: create ( ) ; $ quad -> setStyles ( "Bgs1" , "BgDialogBlur" ) ; $ quad -> setBackgroundColor ( "f00" ) -> setSize ( $ this -> busyFrame -> getWidth ( ) , $ this -> busyFrame -> getHeight ( ) ) ; $ this -> busyFrame -> addChild ( $ quad ) ; } else { $ this -> busyFrame -> removeAllChildren ( ) ; } } | Set the window to busy state the window will dim and status message is displayed |
24,940 | public function createScript ( $ params ) { $ className = $ this -> className ; $ filePath = $ this -> fileLocator -> locate ( '@' . $ this -> relativePath ) ; return new $ className ( $ filePath , $ params ) ; } | Create an instance of script |
24,941 | public function onProductIndex ( ResourceControllerEvent $ event ) : void { $ currentRequest = $ this -> requestStack -> getCurrentRequest ( ) ; if ( ! $ currentRequest instanceof Request ) { return ; } if ( ! $ currentRequest -> attributes -> has ( 'slug' ) ) { return ; } $ taxon = $ this -> taxonRepository -> findOneBySlug ( $ currentRequest -> attributes -> get ( 'slug' ) , $ this -> localeContext -> getLocaleCode ( ) ) ; if ( ! $ taxon instanceof TaxonInterface ) { return ; } $ currentRequest -> attributes -> set ( 'nglayouts_sylius_taxon' , $ taxon ) ; $ this -> context -> set ( 'sylius_taxon_id' , ( int ) $ taxon -> getId ( ) ) ; } | Sets the currently displayed taxon to the request to be able to match with layout resolver . |
24,942 | public function save ( Gamecurrency $ gamecurrency ) { $ gamecurrency -> clearAllReferences ( false ) ; $ gamecurrency -> save ( ) ; GamecurrencyTableMap :: clearInstancePool ( ) ; } | Save individual currency entry |
24,943 | public function onPlayerHit ( $ params ) { $ this -> dispatch ( __FUNCTION__ , [ $ params [ 'shooter' ] , $ params [ 'victim' ] , $ params [ 'weapon' ] , $ params [ 'damage' ] , $ params [ 'points' ] , $ params [ 'distance' ] , Position :: fromArray ( $ params [ 'shooterposition' ] ) , Position :: fromArray ( $ params [ 'victimposition' ] ) , ] ) ; } | Callback sent when a player is hit . |
24,944 | public function onArmorEmpty ( $ params ) { $ this -> dispatch ( __FUNCTION__ , [ $ params [ 'shooter' ] , $ params [ 'victim' ] , $ params [ 'weapon' ] , $ params [ 'distance' ] , Position :: fromArray ( $ params [ 'shooterposition' ] ) , Position :: fromArray ( $ params [ 'victimposition' ] ) , ] ) ; } | Callback sent when a player is eliminated . |
24,945 | public function onAuthorized ( ServiceResponse $ response ) { if ( $ response -> getPayment ( ) -> Gateway === 'Manual' ) { if ( ( $ reservation = Reservation :: get ( ) -> byID ( $ this -> owner -> ReservationID ) ) && $ reservation -> exists ( ) ) { $ reservation -> complete ( ) ; } } } | Fix issue manual gateway doesn t call onCaptured hook |
24,946 | public function onCaptured ( ServiceResponse $ response ) { if ( ( $ reservation = Reservation :: get ( ) -> byID ( $ this -> owner -> ReservationID ) ) && $ reservation -> exists ( ) ) { $ reservation -> complete ( ) ; } } | Complete the order on a successful transaction |
24,947 | public static function _ ( $ render , $ ns = __NAMESPACE__ ) { $ html = self :: getInstance ( ) ; $ render = Str :: low ( $ render ) ; $ alias = $ ns . '\\' . $ render ; if ( ! isset ( $ html [ $ alias ] ) ) { $ html [ $ alias ] = self :: _register ( $ render , $ ns ) ; } return $ html [ $ alias ] ; } | Get and register render . |
24,948 | private static function _register ( $ render , $ ns ) { return function ( ) use ( $ render , $ ns ) { $ render = Str :: clean ( $ render ) ; $ render = implode ( '\\' , array ( $ ns , Html :: RENDER_DIR , ucfirst ( $ render ) ) ) ; return new $ render ( ) ; } ; } | Pimple callback register render . |
24,949 | private function invitationHandlerArguments ( $ user ) { return [ $ this -> container -> getDefinition ( 'bengor.user.infrastructure.persistence.' . $ user . '_repository' ) , $ this -> container -> getDefinition ( 'bengor.user.infrastructure.security.symfony.' . $ user . '_password_encoder' ) , ] ; } | Gets the invitation type handlers arguments to inject in the constructor . |
24,950 | private function withConfirmationSpecification ( $ user ) { ( new EnableUserCommandBuilder ( $ this -> container , $ this -> persistence ) ) -> build ( $ user ) ; return [ 'command' => WithConfirmationSignUpUserCommand :: class , 'handler' => WithConfirmationSignUpUserHandler :: class , 'handlerArguments' => $ this -> handlerArguments ( $ user ) , ] ; } | Gets the with confirmation specification . |
24,951 | private function byInvitationSpecification ( $ user ) { ( new InviteUserCommandBuilder ( $ this -> container , $ this -> persistence ) ) -> build ( $ user ) ; ( new ResendInvitationUserCommandBuilder ( $ this -> container , $ this -> persistence ) ) -> build ( $ user ) ; return [ 'command' => ByInvitationSignUpUserCommand :: class , 'handler' => ByInvitationSignUpUserHandler :: class , 'handlerArguments' => $ this -> invitationHandlerArguments ( $ user ) , ] ; } | Gets the by invitation specification . |
24,952 | public function pushProcessor ( $ callback ) { if ( ! is_callable ( $ callback ) ) { throw new \ InvalidArgumentException ( 'Processors must be valid callables (callback or object with an __invoke method), ' . var_export ( $ callback , true ) . ' given' ) ; } array_unshift ( $ this -> processors , $ callback ) ; return $ this ; } | Adds a processor on to the stack . |
24,953 | protected function logError ( Throwable $ e ) { if ( $ this -> settings [ 'displayErrorDetails' ] ) { return ; } if ( ! $ this -> logger ) { return ; } static $ errorsLogged = [ ] ; $ errorObjectHash = spl_object_hash ( $ e ) ; if ( ! isset ( $ errorsLogged [ $ errorObjectHash ] ) ) { $ this -> logger -> error ( get_class ( $ e ) , [ 'exception' => $ e ] ) ; $ errorsLogged [ $ errorObjectHash ] = true ; } } | Write to the error log if displayErrorDetails is false . |
24,954 | public function setTitle ( $ title ) { $ this -> title = $ title ; $ this -> jsWriter -> setOption ( 'title' , $ title ) ; return $ this ; } | Sets a text title for the chart for rendering |
24,955 | public function setAxisOptions ( $ axis , $ name , $ value ) { $ this -> jsWriter -> setAxisOptions ( $ axis , $ name , $ value ) ; return $ this ; } | Generic interface to any kind of axis option |
24,956 | public function setAxisLabel ( $ axis , $ label ) { if ( in_array ( $ axis , array ( 'x' , 'y' , 'z' ) ) ) { $ originalAxisOptions = $ this -> jsWriter -> getOption ( 'axes' , array ( ) ) ; $ desiredAxisOptions = array ( "{$axis}axis" => array ( 'label' => $ label ) ) ; $ this -> jsWriter -> setOption ( 'axes' , array_merge_recursive ( $ originalAxisOptions , $ desiredAxisOptions ) ) ; } return $ this ; } | Sets the label on this chart for a given axis |
24,957 | public function setType ( $ type , $ seriesTitle = null ) { $ this -> jsWriter -> setType ( $ type , $ seriesTitle ) ; return $ this ; } | Sets chart s type in the JS writer for default or for a given series . |
24,958 | public function setTypeOption ( $ name , $ option , $ seriesTitle = null ) { $ this -> jsWriter -> setTypeOption ( $ name , $ option , $ seriesTitle ) ; return $ this ; } | Sets an option for type - based rendering within this chart by default or for a series |
24,959 | public function createSeries ( $ data , $ title = null , $ type = null ) { return new Series ( $ data , $ title , $ this -> jsWriter ) ; } | Instantiates a series based on the data provided |
24,960 | public function addSeries ( $ seriesOrArray ) { if ( ! is_array ( $ seriesOrArray ) ) { $ seriesOrArray = array ( $ seriesOrArray ) ; } if ( is_array ( $ seriesOrArray ) ) { foreach ( $ seriesOrArray as $ series ) { if ( ! $ series instanceof Series ) { throw new \ UnexpectedValueException ( '\Altamira\Chart::addSeries expects a single series or an array of series instances' ) ; } $ this -> addSingleSeries ( $ series ) ; } } return $ this ; } | Lets you add one or more series using the same method call |
24,961 | public function getDiv ( $ width = 500 , $ height = 400 ) { $ styleOptions = array ( 'width' => $ width . 'px' , 'height' => $ height . 'px' ) ; return ChartRenderer :: render ( $ this , $ styleOptions ) ; } | Wrapper responsible for rendering the div for a given chart . |
24,962 | public function isDir ( string $ name ) { $ current = $ this -> pwd ( ) ; try { $ this -> chDir ( $ name ) ; $ this -> chDir ( $ current ) ; return true ; } catch ( \ Exception $ e ) { } return false ; } | Determine if file is a directory . |
24,963 | public function ls ( string $ path = '' ) : array { return version_compare ( PHP_VERSION , '7.2.0' , '>=' ) ? $ this -> ls72 ( $ path ) : $ this -> lsLegacy ( $ path ) ; } | Return list of all files in directory . |
24,964 | private function ls72 ( string $ path ) : array { $ list = [ ] ; foreach ( $ this -> mlsd ( $ path ) as $ fileInfo ) { $ list [ ] = new File ( $ fileInfo ) ; } return $ list ; } | Return list of all files in directory for php 7 . 2 . 0 and higher . |
24,965 | private function lsLegacy ( string $ path ) : array { $ list = [ ] ; foreach ( $ this -> nlist ( $ path ) as $ name ) { $ type = $ this -> isDir ( $ name ) ? 'dir' : 'file' ; $ size = $ this -> size ( $ name ) ; $ mtime = $ this -> mdtm ( $ name ) ; if ( $ mtime == - 1 ) { throw new RuntimeException ( 'FTP server doesnt support \'ftp_mdtm\'' ) ; } $ list [ ] = new File ( [ 'name' => $ name , 'modify' => $ mtime , 'type' => $ type , 'size' => $ size ] ) ; } return $ list ; } | Return list of all files in directory for php version below 7 . 2 . 0 . |
24,966 | public function lsDirs ( string $ path = '' ) : array { return array_filter ( $ this -> ls ( $ path ) , function ( File $ file ) { return $ file -> isDir ( ) ; } ) ; } | Return list of directories in given path . |
24,967 | public function lsFiles ( string $ path = '' ) : array { return array_filter ( $ this -> ls ( $ path ) , function ( File $ file ) { return $ file -> isFile ( ) ; } ) ; } | Return list of files in given path . |
24,968 | public function uploadFile ( string $ file , string $ path , string $ name ) { foreach ( $ this -> extractDirectories ( $ path ) as $ dir ) { try { $ this -> chDir ( $ dir ) ; } catch ( \ Exception $ e ) { $ this -> mkDir ( $ dir ) ; $ this -> chDir ( $ dir ) ; } } if ( ! $ this -> put ( $ name , $ file , FTP_BINARY ) ) { $ error = error_get_last ( ) ; $ message = $ error [ 'message' ] ; throw new RuntimeException ( sprintf ( 'error uploading file: %s - %s' , $ file , $ message ) ) ; } } | Upload local file to ftp server . |
24,969 | private function setup ( string $ url ) { $ parts = \ parse_url ( $ url ) ; $ this -> host = $ parts [ 'host' ] ?? '' ; $ this -> port = $ parts [ 'port' ] ?? 21 ; $ this -> user = $ parts [ 'user' ] ?? '' ; $ this -> password = $ parts [ 'pass' ] ?? '' ; } | Setup local member variables by parsing the ftp url . |
24,970 | private function login ( ) { if ( empty ( $ this -> host ) ) { throw new RuntimeException ( 'no host to connect to' ) ; } $ old = error_reporting ( 0 ) ; $ link = $ this -> isSecure ? ftp_ssl_connect ( $ this -> host , $ this -> port ) : ftp_connect ( $ this -> host , $ this -> port ) ; if ( ! $ link ) { error_reporting ( $ old ) ; throw new RuntimeException ( sprintf ( 'unable to connect to ftp server %s' , $ this -> host ) ) ; } $ this -> connection = $ link ; if ( ! ftp_login ( $ this -> connection , $ this -> user , $ this -> password ) ) { error_reporting ( $ old ) ; throw new RuntimeException ( sprintf ( 'authentication failed for %s@%s' , $ this -> user , $ this -> host ) ) ; } $ this -> pasv ( $ this -> passive ) ; error_reporting ( $ old ) ; } | Setup ftp connection |
24,971 | private function extractDirectories ( string $ path ) : array { $ remoteDirs = [ ] ; if ( ! empty ( $ path ) ) { $ remoteDirs = explode ( '/' , $ path ) ; if ( substr ( $ path , 0 , 1 ) === '/' ) { $ remoteDirs [ 0 ] = '/' ; } $ remoteDirs = array_filter ( $ remoteDirs ) ; } return $ remoteDirs ; } | Return list of remote directories to travers . |
24,972 | public final function getResultId ( int $ i ) : ? int { return ( $ result = $ this -> getResult ( $ i ) ) ? $ result -> getId ( ) : null ; } | Get result id . |
24,973 | public final function getResultsIds ( bool $ merge = true ) : array { $ return = [ ] ; if ( ! empty ( $ this -> results ) ) { if ( $ merge ) { foreach ( $ this -> results as $ result ) { $ return = array_merge ( $ return , $ result -> getIds ( ) ) ; } } else { foreach ( $ this -> results as $ result ) { $ return [ ] = $ result -> getIds ( ) ; } } } return $ return ; } | Get results ids . |
24,974 | public final function doQuery ( string $ query , array $ queryParams = null ) : BatchInterface { return $ this -> queue ( $ query , $ queryParams ) -> do ( ) ; } | Do query . |
24,975 | public function onOpen ( ConnectionInterface $ conn ) { $ this -> clients -> attach ( $ conn ) ; echo Messenger :: open ( $ this -> getIpAddress ( $ conn ) ) ; if ( defined ( 'SONAR_VERBOSE' ) === true ) { Profiler :: start ( ) ; } } | Open task event |
24,976 | public function onMessage ( ConnectionInterface $ conn , $ request ) { if ( is_array ( $ request = json_decode ( $ request , true ) ) === false ) { throw new AppServiceException ( 'The server received an invalid data format' ) ; } if ( isset ( $ request [ 'page' ] ) === false ) { throw new AppServiceException ( 'There is no current page data' ) ; } $ this -> queueService -> push ( $ request , function ( ) use ( $ request , $ conn ) { return [ 'ip' => $ this -> getIpAddress ( $ conn ) , 'hash' => md5 ( $ this -> getIpAddress ( $ conn ) . $ this -> getUserAgent ( $ conn ) ) , 'open' => time ( ) ] ; } ) ; if ( defined ( 'SONAR_VERBOSE' ) === true ) { echo Messenger :: message ( json_encode ( $ request ) ) ; $ conn -> send ( json_encode ( $ request ) ) ; } } | Push to task event |
24,977 | public function onClose ( ConnectionInterface $ conn ) { $ this -> clients -> detach ( $ conn ) ; $ data = $ this -> queueService -> pull ( [ 'hash' => md5 ( $ this -> getIpAddress ( $ conn ) . $ this -> getUserAgent ( $ conn ) ) , ] , function ( $ response ) use ( $ conn ) { return array_merge ( $ response , [ 'ua' => $ this -> getUserAgent ( $ conn ) , 'language' => $ this -> getLanguage ( $ conn ) , 'location' => $ this -> getLocation ( $ conn ) , 'close' => time ( ) ] ) ; } ) ; $ this -> storageService -> add ( $ data ) ; echo Messenger :: close ( $ this -> getIpAddress ( $ conn ) ) ; if ( defined ( 'SONAR_VERBOSE' ) === true ) { Profiler :: finish ( ) ; Profiler :: getProfilingData ( ) ; } } | Close conversation event |
24,978 | public function onError ( ConnectionInterface $ conn , \ Exception $ e ) { try { throw new \ Exception ( $ e -> getMessage ( ) ) ; } catch ( \ Exception $ e ) { throw new SocketServiceException ( Messenger :: error ( $ e -> getMessage ( ) ) ) ; } finally { $ conn -> close ( ) ; } } | Error event emitter |
24,979 | private function getLocation ( ConnectionInterface $ conn ) { if ( $ conn -> WebSocket instanceof \ StdClass ) { if ( ( $ cache = $ this -> cacheService ) != null ) { $ ip = $ this -> getIpAddress ( $ conn ) ; if ( $ cache -> getStorage ( ) -> exists ( $ ip ) === true ) { $ location = $ cache -> getStorage ( ) -> get ( $ ip ) ; } $ cache -> getStorage ( ) -> save ( $ ip , $ this -> geoService -> location ( $ ip ) ) ; } else { try { $ location = $ this -> geoService -> location ( $ this -> getIpAddress ( $ conn ) ) ; } catch ( GeoServiceException $ e ) { throw new AppServiceException ( $ e -> getMessage ( ) ) ; } } return $ location ; } throw new AppServiceException ( 'Location not defined' ) ; } | Get user location |
24,980 | public function byId ( $ id , $ databaseConnectionName = null ) { if ( empty ( $ databaseConnectionName ) ) { $ databaseConnectionName = $ this -> databaseConnectionName ; } return $ this -> VoucherType -> on ( $ databaseConnectionName ) -> find ( $ id ) ; } | Get a ... by ID |
24,981 | protected function _outputMessageSafe ( $ template ) { $ this -> controller -> layoutPath = null ; $ this -> controller -> subDir = null ; $ this -> controller -> viewPath = 'Errors' ; $ this -> controller -> layout = 'CakeTheme.error' ; $ this -> controller -> helpers = array ( 'Form' , 'Html' , 'Session' ) ; if ( ! empty ( $ template ) ) { $ template = 'CakeTheme.' . $ template ; } $ view = new View ( $ this -> controller ) ; $ this -> controller -> response -> body ( $ view -> render ( $ template , 'CakeTheme.error' ) ) ; $ this -> controller -> response -> type ( 'html' ) ; $ this -> controller -> response -> send ( ) ; } | A safer way to render error messages replaces all helpers with basics and doesn t call component methods . Set layout to CakeTheme . error . |
24,982 | public function render ( $ src , $ class = '' , $ id = '' , array $ attrs = array ( ) ) { $ attrs [ 'class' ] = false ; $ attrs = array_merge ( array ( 'fullUrl' => true ) , $ attrs ) ; $ attrs [ 'id' ] = $ id ; $ attrs = $ this -> _normalizeClassAttr ( $ attrs , $ this -> _jbSrt ( 'image' ) ) ; if ( $ class !== '' ) { $ attrs = $ this -> _normalizeClassAttr ( $ attrs , $ class ) ; } $ attrs [ 'class' ] = Str :: clean ( $ attrs [ 'class' ] ) ; $ isFull = $ attrs [ 'fullUrl' ] ; unset ( $ attrs [ 'fullUrl' ] ) ; $ src = FS :: clean ( $ src , '/' ) ; $ attrs [ 'src' ] = ( $ isFull ) ? Url :: root ( ) . '/' . $ src : $ src ; return '<img ' . $ this -> buildAttrs ( $ attrs ) . ' />' ; } | Create img tag . |
24,983 | public function setManialink ( ManialinkInterface $ manialink ) { $ this -> manialink = $ manialink ; $ this -> actionFirstPage = $ this -> actionFactory -> createManialinkAction ( $ manialink , array ( $ this , 'goToFirstPage' ) , [ ] , true ) ; $ this -> actionPreviousPage = $ this -> actionFactory -> createManialinkAction ( $ manialink , array ( $ this , 'goToPreviousPage' ) , [ ] , true ) ; $ this -> actionNextPage = $ this -> actionFactory -> createManialinkAction ( $ manialink , array ( $ this , 'goToNextPage' ) , [ ] , true ) ; $ this -> actionLastPage = $ this -> actionFactory -> createManialinkAction ( $ manialink , array ( $ this , 'goToLastPage' ) , [ ] , true ) ; $ this -> actionGotoPage = $ this -> actionFactory -> createManialinkAction ( $ manialink , array ( $ this , 'goToPage' ) , [ ] , true ) ; return $ this ; } | Set the manialink the content is generated for . |
24,984 | public function addActionColumn ( $ key , $ name , $ widthCoefficient , $ callback , $ renderer ) { $ this -> columns [ ] = new ActionColumn ( $ key , $ name , $ widthCoefficient , $ callback , $ renderer ) ; return $ this ; } | Add an action into a column . |
24,985 | public function goToFirstPage ( ManialinkInterface $ manialink , $ login = null , $ entries = [ ] ) { $ this -> updateDataCollection ( $ entries ) ; $ this -> changePage ( 1 ) ; } | Action callback to go to the first page . |
24,986 | public function goToPreviousPage ( ManialinkInterface $ manialink , $ login = null , $ entries = [ ] ) { $ this -> updateDataCollection ( $ entries ) ; if ( $ this -> currentPage - 1 >= 1 ) { $ this -> changePage ( $ this -> currentPage - 1 ) ; } } | Action callback to go to the previous page . |
24,987 | public function goToNextPage ( ManialinkInterface $ manialink , $ login = null , $ entries = [ ] ) { $ this -> updateDataCollection ( $ entries ) ; if ( $ this -> currentPage + 1 <= $ this -> dataCollection -> getLastPageNumber ( ) ) { $ this -> changePage ( $ this -> currentPage + 1 ) ; } } | Action callback to go to the next page . |
24,988 | public function goToLastPage ( ManialinkInterface $ manialink , $ login = null , $ entries = [ ] ) { $ this -> updateDataCollection ( $ entries ) ; $ this -> changePage ( $ this -> dataCollection -> getLastPageNumber ( ) ) ; } | Action callback to go to the last page . |
24,989 | public function updateDataCollection ( $ entries ) { $ process = false ; $ data = [ ] ; $ start = ( $ this -> currentPage - 1 ) * $ this -> dataCollection -> getPageSize ( ) ; foreach ( $ entries as $ key => $ value ) { if ( substr ( $ key , 0 , 6 ) == "entry_" ) { $ array = explode ( "_" , str_replace ( "entry_" , "" , $ key ) ) ; setType ( $ value , $ array [ 1 ] ) ; $ data [ $ array [ 0 ] ] = $ value ; $ process = true ; } } if ( $ process ) { $ lines = $ this -> dataCollection -> getData ( $ this -> currentPage ) ; $ counter = 0 ; foreach ( $ lines as $ i => $ lineData ) { $ newData = $ lineData ; foreach ( $ this -> columns as $ columnData ) { if ( $ columnData instanceof InputColumn ) { $ newData [ $ columnData -> getKey ( ) ] = $ data [ $ counter ] ; } } $ this -> dataCollection -> setDataByIndex ( $ start + $ counter , $ newData ) ; $ counter ++ ; } } } | Updates dataCollection from entries . |
24,990 | protected function changePage ( $ page ) { $ this -> currentPage = $ page ; $ this -> manialinkFactory -> update ( $ this -> manialink -> getUserGroup ( ) ) ; } | Handle page change & refresh user window . |
24,991 | public function destroy ( ) { $ this -> manialink = null ; $ this -> manialinkFactory = null ; $ this -> dataCollection = null ; $ this -> actionFirstPage = null ; $ this -> actionGotoPage = null ; $ this -> actionLastPage = null ; $ this -> actionNextPage = null ; $ this -> temporaryActions = [ ] ; $ this -> temporaryEntries = [ ] ; } | Prepare object so that it s destroyed easier . |
24,992 | public function addPoller ( Poller $ poller ) { $ name = $ poller -> getName ( ) ; if ( array_key_exists ( $ name , $ this -> pollers ) ) { throw new InvalidArgumentException ( "Poller named '$name' already exists" ) ; } $ this -> pollers [ $ name ] = $ poller ; } | Add poller to collection |
24,993 | public function getPoller ( $ name ) { if ( ! array_key_exists ( $ name , $ this -> pollers ) ) { throw new InvalidArgumentException ( "Poller named '$name' does not exist" ) ; } return $ this -> pollers [ $ name ] ; } | Returns poller by name |
24,994 | public function reset ( ) : void { $ this -> opening = new Record ( 'Opening' , new Obj ( 0 , $ this -> date , 'Date' ) , new Text ( 0 , 'AUTOGIRO' ) , new Text ( 0 , str_pad ( '' , 44 ) ) , new Number ( 0 , $ this -> bgcNr , 'PayeeBgcNumber' ) , $ this -> payeeBgNode , new Text ( 0 , ' ' ) ) ; $ this -> mandates = [ ] ; $ this -> payments = [ ] ; $ this -> amendments = [ ] ; } | Reset builder to initial state |
24,995 | public function addCreateMandateRequest ( string $ payerNr , AccountNumber $ account , IdInterface $ id ) : void { $ this -> mandates [ ] = new Record ( 'CreateMandateRequest' , $ this -> payeeBgNode , new Number ( 0 , $ payerNr , 'PayerNumber' ) , new Obj ( 0 , $ account , 'Account' ) , new Obj ( 0 , $ id , 'StateId' ) , new Text ( 0 , str_pad ( '' , 24 ) ) ) ; } | Add a new mandate request to tree |
24,996 | public function addDeleteMandateRequest ( string $ payerNr ) : void { $ this -> mandates [ ] = new Record ( 'DeleteMandateRequest' , $ this -> payeeBgNode , new Number ( 0 , $ payerNr , 'PayerNumber' ) , new Text ( 0 , str_pad ( '' , 52 ) ) ) ; } | Add a delete mandate request to tree |
24,997 | public function addUpdateMandateRequest ( string $ payerNr , string $ newPayerNr ) : void { $ this -> mandates [ ] = new Record ( 'UpdateMandateRequest' , $ this -> payeeBgNode , new Number ( 0 , $ payerNr , 'PayerNumber' ) , $ this -> payeeBgNode , new Number ( 0 , $ newPayerNr , 'PayerNumber' ) , new Text ( 0 , str_pad ( '' , 26 ) ) ) ; } | Add an update mandate request to tree |
24,998 | public function addOutgoingPaymentRequest ( string $ payerNr , SEK $ amount , \ DateTimeInterface $ date , string $ ref , string $ interval , int $ repetitions ) : void { $ this -> addPaymentRequest ( 'OutgoingPaymentRequest' , $ payerNr , $ amount , $ date , $ ref , $ interval , $ repetitions ) ; } | Add an outgoing payment request to tree |
24,999 | public function addImmediateIncomingPaymentRequest ( string $ payerNr , SEK $ amount , string $ ref ) : void { $ this -> addImmediatePaymentRequest ( 'IncomingPaymentRequest' , $ payerNr , $ amount , $ ref ) ; } | Add an incoming payment at next possible bank date request to tree |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.