idx
int64
0
60.3k
question
stringlengths
92
4.62k
target
stringlengths
7
635
16,900
public function findByConnection ( $ connection ) { return $ this -> first ( function ( $ client , $ key ) use ( $ connection ) { return $ client -> connection === $ connection ; } ) ; }
Find a client by their connection .
16,901
public function broadcast ( array $ userList , $ msg ) { return $ this -> exec ( 'broadcast ' . $ this -> formatPeerList ( $ userList ) . ' ' . $ this -> escapeStringArgument ( $ msg ) ) ; }
Sends a text message to several users at once .
16,902
public function renameChat ( $ chat , $ newChatTitle ) { return $ this -> exec ( 'rename_chat' , $ this -> escapePeer ( $ chat ) , $ this -> escapeStringArgument ( $ newChatTitle ) ) ; }
Renames a chat . Both the chat title and the print - name will change .
16,903
public function chatAddUser ( $ chat , $ user , $ numberOfMessagesToFoward = 100 ) { return $ this -> exec ( 'chat_add_user' , $ this -> escapePeer ( $ chat ) , $ this -> escapePeer ( $ user ) , ( int ) $ numberOfMessagesToFoward ) ; }
Adds a user to a chat .
16,904
public function chatDeleteUser ( $ chat , $ user ) { return $ this -> exec ( 'chat_del_user' , $ this -> escapePeer ( $ chat ) , $ this -> escapePeer ( $ user ) ) ; }
Deletes a user from a chat .
16,905
public function setProfileName ( $ firstName , $ lastName ) { return $ this -> exec ( 'set_profile_name ' . $ this -> escapeStringArgument ( $ firstName ) . ' ' . $ this -> escapeStringArgument ( $ lastName ) ) ; }
Sets the profile name
16,906
public function addContact ( $ phoneNumber , $ firstName , $ lastName ) { $ phoneNumber = preg_replace ( '%[^0-9]%' , '' , ( string ) $ phoneNumber ) ; if ( empty ( $ phoneNumber ) ) { return false ; } return $ this -> exec ( 'add_contact ' . $ phoneNumber . ' ' . $ this -> escapeStringArgument ( $ firstName ) . ' ' . ...
Adds a user to the contact list
16,907
public function renameContact ( $ contact , $ firstName , $ lastName ) { return $ this -> exec ( 'rename_contact ' . $ this -> escapePeer ( $ contact ) . ' ' . $ this -> escapeStringArgument ( $ firstName ) . ' ' . $ this -> escapeStringArgument ( $ lastName ) ) ; }
Renames a user in the contact list
16,908
public function sendPicture ( $ peer , $ path ) { $ peer = $ this -> escapePeer ( $ peer ) ; $ formattedPath = $ this -> formatFileName ( $ path ) ; return $ this -> exec ( 'send_photo ' . $ peer . ' ' . $ formattedPath ) ; }
Send picture to peer
16,909
public function sendFile ( $ peer , $ path ) { $ peer = $ this -> escapePeer ( $ peer ) ; $ formattedPath = $ this -> formatFileName ( $ path ) ; return $ this -> exec ( 'send_file ' . $ peer . ' ' . $ formattedPath ) ; }
Send file to peer
16,910
public function send ( $ command , $ data ) { $ message = new Message ; $ message -> command = $ command ; $ message -> data = $ data ; $ this -> connection -> send ( $ message -> serialize ( ) ) ; }
Sends a message to this client .
16,911
public function getUser ( ) { $ session = $ this -> session_manager -> session ; if ( $ session && ! $ this -> user ) { $ user_id = $ session -> get ( Auth :: getName ( ) ) ; if ( $ user_id && is_null ( $ this -> user ) ) { $ user_model = Config :: get ( 'auth.providers.users.model' ) ; if ( $ user_model ) { $ this -> ...
Hooks in the user getter .
16,912
public function getUrl ( $ include_scheme = true ) { $ parts = parse_url ( url ( '/' ) ) ; $ scheme = '' ; if ( $ include_scheme ) { $ scheme = 'ws://' ; } return $ scheme . $ parts [ 'host' ] . ':' . $ this -> port ; }
Constructs and gets the endpoint URL .
16,913
public function javascript ( $ url = null ) { if ( ! $ url ) { $ parts = parse_url ( url ( '/' ) ) ; if ( ! isset ( $ parts [ 'port' ] ) ) { $ parts [ 'port' ] = Config :: get ( 'socket.default_port' ) ; } $ url = 'ws://' . $ parts [ 'host' ] . ':' . $ parts [ 'port' ] ; } return implode ( '' , [ '<script src="' . url ...
Includes the javascript file and initializes the Socket javascript object .
16,914
public function findByCampaignDraftId ( $ CampaignId ) { $ response = $ this -> mailjet -> get ( Resources :: $ Campaigndraft , [ 'id' => $ CampaignId ] ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "CampaignDraftManager:findByCampaignDraftId() failed" , $ response ) ; } return $ response -> getData (...
Access a given campaigndraft resource
16,915
public function create ( CampaignDraft $ campaignDraft ) { $ response = $ this -> mailjet -> post ( Resources :: $ Campaigndraft , [ 'body' => $ campaignDraft -> format ( ) ] ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "CampaignDraftManager:create() failed" , $ response ) ; } return $ response -> ge...
create a new fresh CampaignDraft
16,916
public function update ( $ CampaignId , CampaignDraft $ campaignDraft ) { $ response = $ this -> mailjet -> put ( Resources :: $ Campaigndraft , [ 'id' => $ CampaignId , 'body' => $ campaignDraft -> format ( ) ] ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "CampaignDraftManager:update() failed" , $ r...
Update one specific campaigndraft resource
16,917
public function removeSchedule ( $ CampaignId ) { $ response = $ this -> mailjet -> delete ( Resources :: $ CampaigndraftSchedule , [ 'id' => $ CampaignId ] ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "CampaignDraftManager:removeSchedule failed" , $ response ) ; } return $ response -> getData ( ) ; ...
Cancel a future sending
16,918
public function sendCampaign ( $ CampaignId ) { $ response = $ this -> mailjet -> post ( Resources :: $ CampaigndraftSend , [ 'id' => $ CampaignId ] ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "CampaignDraftManager:sendCampaign failed" , $ response ) ; } return $ response -> getData ( ) ; }
Send the campaign immediately
16,919
public function getCampaignStatus ( $ CampaignId ) { $ response = $ this -> mailjet -> get ( Resources :: $ CampaigndraftStatus , [ 'id' => $ CampaignId ] ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "CampaignDraftManager:getCampaignStatus failed" , $ response ) ; } return $ response -> getData ( ) ;...
Return the status of a CampaignDraft
16,920
public function create ( Template $ Template ) { $ response = $ this -> mailjet -> post ( Resources :: $ Template , [ 'body' => $ Template -> format ( ) ] ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "TemplateManager:create() failed" , $ response ) ; } return $ response -> getData ( ) ; }
Add a new template resource with a POST request .
16,921
private function getProvider ( $ providerServiceKey ) { try { $ provider = $ this -> getContainer ( ) -> get ( $ providerServiceKey ) ; } catch ( ServiceNotFoundException $ e ) { throw new \ InvalidArgumentException ( sprintf ( 'Provider "%s" should be defined as a service.' , $ providerServiceKey ) , $ e -> getCode ( ...
Get contact provider
16,922
private function refreshBatchesResult ( $ listId , $ batchesResult , & $ batchesError ) { $ refreshedBatchsResults = [ ] ; foreach ( $ batchesResult as $ key => $ batch ) { $ jobId = $ batch [ 'JobID' ] ; $ batch = $ this -> synchronizer -> getJob ( $ listId , $ jobId ) ; if ( $ batch [ 0 ] [ 'Status' ] == 'Error' ) { ...
Refresh all batch from Mailjet API
16,923
private function batchesFinished ( $ batchesResult ) { $ allfinished = true ; foreach ( $ batchesResult as $ key => $ batch ) { if ( $ batch [ 'Status' ] != 'Completed' ) { $ allfinished = false ; } } return $ allfinished ; }
Test if all batches are finished
16,924
private function displayBatchInfo ( $ batch ) { if ( $ batch [ 'Status' ] == 'Completed' ) { return sprintf ( 'batch %s is Completed, %d operations %s' , $ batch [ 'JobID' ] , $ batch [ 'Count' ] , $ batch [ 'Error' ] ) ; } else { return sprintf ( 'batch %s, current status %s, %d operations %s' , $ batch [ 'JobID' ] , ...
Pretty display of batch info
16,925
private function displayBatchesErrorFile ( $ batchesError ) { $ output = [ ] ; foreach ( $ batchesError as $ key => $ batch ) { $ errors = $ this -> synchronizer -> getJobJsonError ( $ batch [ 'JobID' ] ) ; array_push ( $ output , '<error><pre>' . print_r ( $ errors ) . '</pre></error>' ) ; } return $ output ; }
Print Batches Errors
16,926
public function delete ( $ resource , array $ args = [ ] , array $ options = [ ] ) { $ response = parent :: delete ( $ resource , $ args , $ options ) ; $ this -> calls [ ] = [ 'method' => 'DELETE' , 'resource' => $ resource , 'args' => $ args , 'options' => $ options , 'success' => $ response -> success ( ) , 'respons...
Trigger a GET request
16,927
public function create ( $ listId , Contact $ contact , $ action = Contact :: ACTION_ADDFORCE ) { $ contact -> setAction ( $ action ) ; $ response = $ this -> _exec ( $ listId , $ contact ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "ContactsListManager:create() failed" , $ response ) ; } return $ re...
create a new fresh Contact to listId
16,928
public function update ( $ listId , Contact $ contact , $ action = Contact :: ACTION_ADDNOFORCE ) { $ contact -> setAction ( $ action ) ; $ response = $ this -> _exec ( $ listId , $ contact ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "ContactsListManager:update() failed" , $ response ) ; } return $ ...
update a Contact to listId
16,929
public function unsubscribe ( $ listId , Contact $ contact ) { $ contact -> setAction ( Contact :: ACTION_UNSUB ) ; $ response = $ this -> _exec ( $ listId , $ contact ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "ContactsListManager:unsub() failed" , $ response ) ; } return $ response -> getData ( )...
unsubscribe a Contact from listId
16,930
public function changeEmail ( $ listId , Contact $ contact , $ oldEmail ) { $ response = $ this -> mailjet -> get ( Resources :: $ Contactdata , [ 'id' => $ oldEmail ] ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "ContactsListManager:changeEmail() failed" , $ response ) ; } $ oldContactData = $ respo...
Change email a Contact
16,931
public function queue ( ... $ values ) : bool { $ count = count ( $ values ) ; if ( $ count !== $ this -> numFields ) { throw new \ InvalidArgumentException ( sprintf ( 'The number of values (%u) does not match the field count (%u).' , $ count , $ this -> numFields ) ) ; } foreach ( $ values as $ value ) { $ this -> bu...
Queues an operation .
16,932
public function flush ( ) : void { if ( $ this -> bufferSize === 0 ) { return ; } $ query = $ this -> getQuery ( $ this -> bufferSize ) ; $ statement = $ this -> pdo -> prepare ( $ query ) ; $ statement -> execute ( $ this -> buffer ) ; $ this -> affectedRows += $ statement -> rowCount ( ) ; $ this -> buffer = [ ] ; $ ...
Flushes the pending data to the database .
16,933
public function reset ( ) : void { $ this -> buffer = [ ] ; $ this -> bufferSize = 0 ; $ this -> affectedRows = 0 ; $ this -> totalOperations = 0 ; }
Resets the bulk operator .
16,934
public function create ( ContactMetadata $ contactMetadata ) { $ response = $ this -> mailjet -> post ( Resources :: $ Contactmetadata , [ 'body' => $ contactMetadata -> format ( ) ] ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "ContactMetadataManager:create() failed" , $ response ) ; } return $ resp...
create a new fresh ContactMetadata
16,935
public function update ( $ id , ContactMetadata $ contactMetadata ) { $ response = $ this -> mailjet -> put ( Resources :: $ Contactmetadata , [ 'id' => $ id , 'body' => $ contactMetadata -> format ( ) ] ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "ContactMetadataManager:update() failed" , $ respons...
Update one ContactMetadata
16,936
public function synchronize ( ContactsList $ contactsList ) { $ batchesResultRemove = $ this -> batchRemoveContact ( $ contactsList ) ; $ batchesResultAdd = $ this -> batchAddContact ( $ contactsList ) ; return array_merge ( $ batchesResultRemove , $ batchesResultAdd ) ; }
Multiple contacts can be uploaded asynchronously using that action .
16,937
public function getJob ( $ listId , $ jobId ) { $ response = $ this -> mailjet -> get ( Resources :: $ ContactslistManagemanycontacts , [ 'id' => $ listId , 'actionid' => $ jobId ] ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "ContactsListSynchronizer:getJob() failed" , $ response ) ; } return $ resp...
Get Job data
16,938
public function getJobJsonError ( $ jobId ) { $ response = $ this -> mailjet -> get ( Resources :: $ BatchjobJsonerror , [ 'id' => $ jobId ] ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "ContactsListSynchronizer:getJobJsonError() failed" , $ response ) ; } return $ response -> getBody ( ) ; }
Retrieve JsonError for a job
16,939
private function batchAddContact ( ContactsList $ contactsList ) { $ contactsList -> setAction ( ContactsList :: ACTION_ADDFORCE ) ; return $ this -> manager -> manageManyContactsList ( $ contactsList ) ; }
Create batches to add Contacts to List
16,940
public function getAllCampaigns ( array $ filters = null ) { $ response = $ this -> mailjet -> get ( Resources :: $ Campaign , [ 'filters' => $ filters ] ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "CampaignDraftManager:getAllCampaigns() failed" , $ response ) ; } return $ response -> getData ( ) ; ...
List campaigns resources available for this apikey
16,941
public function findByCampaignId ( $ CampaignId ) { $ response = $ this -> mailjet -> get ( Resources :: $ Campaign , [ 'id' => $ CampaignId ] ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "CampaignManager:findByCampaignId() failed" , $ response ) ; } return $ response -> getData ( ) ; }
Access a given campaign resource
16,942
public function updateCampaign ( $ CampaignId , Campaign $ campaign ) { $ response = $ this -> mailjet -> put ( Resources :: $ Campaign , [ 'id' => $ CampaignId , 'body' => $ campaign -> format ( ) ] ) ; if ( ! $ response -> success ( ) ) { $ this -> throwError ( "CampaignManager:updateCampaign() failed" , $ response )...
Update one specific campaign resource with a PUT request providing the campaign s ID value
16,943
public function jsonSerialize ( ) { return [ 'draw' => ( int ) $ this -> draw , 'recordsTotal' => ( int ) $ this -> recordsTotal , 'recordsFiltered' => ( int ) $ this -> recordsFiltered , 'data' => $ this -> data , ] ; }
Convert results into array as expected by DataTables plugin .
16,944
public function addService ( DataTableHandlerInterface $ service , string $ id = null ) { $ service_id = $ id ?? $ service :: ID ; if ( $ service_id !== null ) { $ this -> services [ $ service_id ] = $ service ; } }
Registers specified DataTable handler .
16,945
public function getEmail ( $ reference ) { if ( ! isset ( $ this -> emails [ $ reference ] ) ) { $ this -> emails [ $ reference ] = $ this -> em -> getRepository ( $ this -> options [ 'email_class' ] ) -> findOneByReference ( $ reference ) ; } $ email = $ this -> emails [ $ reference ] ; if ( ! $ email instanceof Email...
Find an email from database
16,946
public function get ( $ reference , $ to , array $ parameters = array ( ) , $ locale = null ) { try { $ email = $ this -> getEmail ( $ reference ) ; return $ this -> generateMessage ( $ email , $ to , $ parameters , $ locale ) ; } catch ( ReferenceNotFoundException $ e ) { return $ this -> generateExceptionMessage ( $ ...
Find an email template and create a swift message .
16,947
public function generateMessage ( EmailInterface $ email , $ to , array $ parameters = array ( ) , $ locale = null ) { if ( null === $ locale ) { $ locale = $ this -> options [ 'default_locale' ] ; } if ( is_object ( $ to ) ) { $ to = $ this -> getRecipient ( $ to ) ; } try { $ email -> setLocale ( $ locale ) ; $ this ...
Create a swift message
16,948
protected function generateExceptionMessage ( $ reference ) { $ traces = debug_backtrace ( false ) ; $ file = null ; $ line = null ; foreach ( $ traces as $ trace ) { if ( isset ( $ trace [ 'function' ] ) && $ trace [ 'function' ] == 'get' && isset ( $ trace [ 'class' ] ) && $ trace [ 'class' ] == __CLASS__ ) { $ file ...
Create swift message when Email is not found .
16,949
protected function createMessageInstance ( ) { $ hasSigner = $ this -> signer -> hasSigner ( ) ; $ class = $ hasSigner ? '\Swift_SignedMessage' : '\Swift_Message' ; $ message = new $ class ( ) ; if ( $ hasSigner ) { $ message -> attachSigner ( $ this -> signer -> createSigner ( ) ) ; } return $ message ; }
Create Swiftf message instance
16,950
protected function renderFromAddress ( EmailInterface $ email , array $ parameters = array ( ) ) { if ( null === $ email -> getFromAddress ( ) ) { return $ this -> options [ 'admin_email' ] ; } return $ this -> renderTemplate ( 'from_address' , $ parameters , $ email -> getChecksum ( ) ) ; }
Render email from address
16,951
public function listAction ( Request $ request ) { $ pager = $ this -> get ( 'lexik_mailer.simple_pager' ) -> retrievePageElements ( $ this -> container -> getParameter ( 'lexik_mailer.email_entity.class' ) , $ request -> get ( 'page' , 1 ) ) ; return $ this -> render ( 'LexikMailerBundle:Email:list.html.twig' , array_...
List all emails
16,952
public function previewAction ( $ emailId , $ lang ) { $ class = $ this -> container -> getParameter ( 'lexik_mailer.email_entity.class' ) ; $ email = $ this -> get ( 'doctrine.orm.entity_manager' ) -> find ( $ class , $ emailId ) ; if ( ! $ email ) { throw $ this -> createNotFoundException ( sprintf ( 'No email found ...
Preview an email
16,953
public function deleteTranslationAction ( $ translationId ) { $ em = $ this -> get ( 'doctrine.orm.entity_manager' ) ; $ translation = $ em -> find ( 'LexikMailerBundle:EmailTranslation' , $ translationId ) ; if ( ! $ translation ) { throw $ this -> createNotFoundException ( sprintf ( 'No translation found for id "%d"'...
Delete a translation
16,954
protected function getSigner ( $ signerName ) { if ( empty ( $ this -> signers [ $ signerName ] ) ) { throw new \ Exception ( sprintf ( 'Signer %s doesnt exist' , $ signerName ) ) ; } return $ this -> signers [ $ signerName ] ; }
Get a signer
16,955
public function getTranslation ( $ lang ) { if ( strpos ( $ lang , '_' ) ) { $ parts = explode ( '_' , $ lang ) ; $ lang = array_shift ( $ parts ) ; } foreach ( $ this -> getTranslations ( ) as $ translation ) { if ( $ translation -> getLang ( ) === $ lang ) { return $ translation ; } } $ translation = new EmailTransla...
Get EmailTranslation for a given lang if not exist it will be created
16,956
public function specifyAdditionalParameters ( array $ data , array $ additionalParams ) : array { foreach ( $ additionalParams as $ param ) { $ method = 'get' . ucfirst ( $ param ) ; if ( method_exists ( $ this , $ method ) ) { $ value = $ this -> { $ method } ( ) ; if ( $ value ) { $ data [ $ param ] = $ value ; } } }...
Add additional params to data
16,957
protected function getPrivateKey ( ) { if ( empty ( $ this -> options [ 'private_key_path' ] ) ) { throw new \ RuntimeException ( 'Missing private_key_path for generate a DKIM signature.' ) ; } if ( ! is_readable ( $ this -> options [ 'private_key_path' ] ) ) { throw new \ RuntimeException ( sprintf ( 'Private key file...
Get private key
16,958
public function getBindingId ( $ binding_index ) { $ binding = $ this -> getBinding ( ) ; return array_key_exists ( 'bindingId' , $ binding [ $ binding_index ] ) ? $ binding [ $ binding_index ] [ 'bindingId' ] : null ; }
The identifier of the bundle created when the order was paid or used for payment .
16,959
public function getOrderStatus ( $ orderIndex = 0 ) { $ orderStatuses = $ this -> getOrderStatuses ( ) ; return array_key_exists ( 'orderStatus' , $ orderStatuses [ $ orderIndex ] ) ? $ orderStatuses [ $ orderIndex ] [ 'orderStatus' ] : null ; }
The status of the order in the payment system .
16,960
public function getActionCodeDescription ( $ orderIndex = 0 ) { $ orderStatuses = $ this -> getOrderStatuses ( ) ; return array_key_exists ( 'actionCodeDescription' , $ orderStatuses [ $ orderIndex ] ) ? $ orderStatuses [ $ orderIndex ] [ 'actionCodeDescription' ] : null ; }
Response code description
16,961
public function getAmount ( $ orderIndex = 0 ) { $ orderStatuses = $ this -> getOrderStatuses ( ) ; return array_key_exists ( 'amount' , $ orderStatuses [ $ orderIndex ] ) ? $ orderStatuses [ $ orderIndex ] [ 'amount' ] : null ; }
The amount of payment in the minimum units of currency .
16,962
public function getCurrency ( $ orderIndex = 0 ) { $ orderStatuses = $ this -> getOrderStatuses ( ) ; return array_key_exists ( 'currency' , $ orderStatuses [ $ orderIndex ] ) ? $ orderStatuses [ $ orderIndex ] [ 'currency' ] : null ; }
The currency code of the payment is ISO 4217 .
16,963
public function getDate ( $ orderIndex = 0 ) { $ orderStatuses = $ this -> getOrderStatuses ( ) ; return array_key_exists ( 'date' , $ orderStatuses [ $ orderIndex ] ) ? $ orderStatuses [ $ orderIndex ] [ 'date' ] : null ; }
Date of order registration .
16,964
public function getOrderDescription ( $ orderIndex = 0 ) { $ orderStatuses = $ this -> getOrderStatuses ( ) ; return array_key_exists ( 'orderDescription' , $ orderStatuses [ $ orderIndex ] ) ? $ orderStatuses [ $ orderIndex ] [ 'orderDescription' ] : null ; }
Description of the order transferred at its registration
16,965
public function getIp ( $ orderIndex = 0 ) { $ orderStatuses = $ this -> getOrderStatuses ( ) ; return array_key_exists ( 'ip' , $ orderStatuses [ $ orderIndex ] ) ? $ orderStatuses [ $ orderIndex ] [ 'ip' ] : null ; }
IP address of the buyer .
16,966
public function getMerchantOrderParams ( $ orderIndex = 0 ) { $ orderStatuses = $ this -> getOrderStatuses ( ) ; return array_key_exists ( 'merchantOrderParams' , $ orderStatuses [ $ orderIndex ] ) ? $ orderStatuses [ $ orderIndex ] [ 'merchantOrderParams' ] : [ ] ; }
Tag with attributes in which additional parameters of the merchant are transferred
16,967
public function getMerchantOrderParamName ( $ orderIndex = 0 , $ paramIndex = 0 ) { $ orderParam = $ this -> getMerchantOrderParams ( $ orderIndex ) ; return array_key_exists ( 'name' , $ orderParam [ $ paramIndex ] ) ? $ orderParam [ $ paramIndex ] [ 'name' ] : null ; }
Name of additional merchant parameter
16,968
public function getMerchantOrderParamValue ( $ orderIndex = 0 , $ paramIndex = 0 ) { $ orderParam = $ this -> getMerchantOrderParams ( $ orderIndex ) ; return array_key_exists ( 'value' , $ orderParam [ $ paramIndex ] ) ? $ orderParam [ $ paramIndex ] [ 'value' ] : null ; }
Value of additional merchant parameter
16,969
public function getBindingId ( $ orderIndex = 0 ) { $ bindingInfo = $ this -> getBindingInfo ( $ orderIndex ) ; return array_key_exists ( 'bindingId' , $ bindingInfo ) ? $ bindingInfo [ 'bindingId' ] : null ; }
The identifier of the bundle used for payment .
16,970
public function getAttributesName ( $ orderIndex = 0 , $ attributeIndex = 0 ) { $ attributes = $ this -> getAttributes ( $ orderIndex ) ; return array_key_exists ( 'name' , $ attributes [ $ attributeIndex ] ) ? $ attributes [ $ attributeIndex ] [ 'name' ] : null ; }
Name of attribute
16,971
public function getAttributesValue ( $ orderIndex = 0 , $ attributeIndex = 0 ) { $ attributes = $ this -> getAttributes ( $ orderIndex ) ; return array_key_exists ( 'value' , $ attributes [ $ attributeIndex ] ) ? $ attributes [ $ attributeIndex ] [ 'value' ] : null ; }
Value of attribute
16,972
public function getCardholderName ( $ orderIndex = 0 ) { $ cardAuthInfo = $ this -> getCardAuthInfo ( $ orderIndex ) ; return array_key_exists ( 'cardholderName' , $ cardAuthInfo ) ? $ cardAuthInfo [ 'cardholderName' ] : null ; }
Name of the card holder .
16,973
public function getApprovalCode ( $ orderIndex = 0 ) { $ cardAuthInfo = $ this -> getCardAuthInfo ( $ orderIndex ) ; return array_key_exists ( 'approvalCode' , $ cardAuthInfo ) ? $ cardAuthInfo [ 'approvalCode' ] : null ; }
The authorization code of the payment .
16,974
public function getPaymentAmountInfo ( $ index = 0 ) { $ orderStatuses = $ this -> getOrderStatuses ( ) ; return array_key_exists ( 'paymentAmountInfo' , $ orderStatuses [ $ index ] ) ? $ orderStatuses [ $ index ] [ 'paymentAmountInfo' ] : [ ] ; }
Information about the amounts of confirmation cancellation refund .
16,975
public function getPaymentState ( $ orderIndex = 0 ) { $ paymentAmountInfo = $ this -> getPaymentAmountInfo ( $ orderIndex ) ; return array_key_exists ( 'paymentState' , $ paymentAmountInfo ) ? $ paymentAmountInfo [ 'paymentState' ] : null ; }
State of payment
16,976
public function getApprovedAmount ( $ orderIndex = 0 ) { $ paymentAmountInfo = $ this -> getPaymentAmountInfo ( $ orderIndex ) ; return array_key_exists ( 'approvedAmount' , $ paymentAmountInfo ) ? $ paymentAmountInfo [ 'approvedAmount' ] : null ; }
Amount confirmed for cancellation .
16,977
public function getDepositedAmount ( $ orderIndex = 0 ) { $ paymentAmountInfo = $ this -> getPaymentAmountInfo ( $ orderIndex ) ; return array_key_exists ( 'depositedAmount' , $ paymentAmountInfo ) ? $ paymentAmountInfo [ 'depositedAmount' ] : null ; }
The amount charged from the card .
16,978
public function getRefundedAmount ( $ orderIndex = 0 ) { $ paymentAmountInfo = $ this -> getPaymentAmountInfo ( $ orderIndex ) ; return array_key_exists ( 'refundedAmount' , $ paymentAmountInfo ) ? $ paymentAmountInfo [ 'refundedAmount' ] : null ; }
Refund amount .
16,979
public function getBankInfo ( $ index = 0 ) { $ orderStatuses = $ this -> getOrderStatuses ( ) ; return array_key_exists ( 'bankInfo' , $ orderStatuses [ $ index ] ) ? $ orderStatuses [ $ index ] [ 'bankInfo' ] : [ ] ; }
Information about the Issuing Bank .
16,980
public function getBankName ( $ orderIndex = 0 ) { $ bankInfo = $ this -> getBankInfo ( $ orderIndex ) ; return array_key_exists ( 'bankName' , $ bankInfo ) ? $ bankInfo [ 'bankName' ] : null ; }
Name of the issuing bank .
16,981
public function getBankCountryCode ( $ orderIndex = 0 ) { $ bankInfo = $ this -> getBankInfo ( $ orderIndex ) ; return array_key_exists ( 'bankCountryCode' , $ bankInfo ) ? $ bankInfo [ 'bankCountryCode' ] : null ; }
Country code of the Issuing Bank .
16,982
public function getBankCountryName ( $ orderIndex = 0 ) { $ bankInfo = $ this -> getBankInfo ( $ orderIndex ) ; return array_key_exists ( 'bankCountryName' , $ bankInfo ) ? $ bankInfo [ 'bankCountryName' ] : null ; }
Country name of the Issuing Bank .
16,983
public function getTranslation ( $ lang ) { if ( strpos ( $ lang , '_' ) ) { $ parts = explode ( '_' , $ lang ) ; $ lang = array_shift ( $ parts ) ; } foreach ( $ this -> getTranslations ( ) as $ translation ) { if ( $ translation -> getLang ( ) === $ lang ) { return $ translation ; } } $ translation = new LayoutTransl...
Get LayoutTranslation for a given lang if not exist it will be created
16,984
public function setStrictVariables ( $ strict ) { if ( ( bool ) $ strict ) { $ this -> templating -> enableStrictVariables ( ) ; } else { $ this -> templating -> disableStrictVariables ( ) ; } }
Enable or not strict variables .
16,985
protected function transactionValue ( $ key ) { if ( isset ( $ this -> data -> transaction ) && $ this -> data -> transaction && isset ( $ this -> data -> transaction -> $ key ) ) { return $ this -> data -> transaction -> $ key ; } return null ; }
Return a value from the transaction object
16,986
public function theJsonNodeShouldNotContain ( $ jsonNode , $ unexpectedValue ) { $ this -> assert ( function ( ) use ( $ jsonNode , $ unexpectedValue ) { $ realValue = $ this -> evaluateJsonNodeValue ( $ jsonNode ) ; $ this -> asserter -> string ( ( string ) $ realValue ) -> notContains ( $ unexpectedValue ) ; } ) ; }
Checks that given JSON node does not contain given value .
16,987
public function theJsonNodeShouldExist ( $ jsonNode ) { try { $ this -> evaluateJsonNodeValue ( $ jsonNode ) ; } catch ( \ Exception $ e ) { throw new WrongJsonExpectation ( sprintf ( "The node '%s' does not exist." , $ jsonNode ) , $ this -> readJson ( ) , $ e ) ; } }
Checks that given JSON node exist .
16,988
public function theJsonNodeShouldNotExist ( $ jsonNode ) { $ e = null ; try { $ realValue = $ this -> evaluateJsonNodeValue ( $ jsonNode ) ; } catch ( \ Exception $ e ) { } if ( $ e === null ) { throw new WrongJsonExpectation ( sprintf ( "The node '%s' exists and contains '%s'." , $ jsonNode , json_encode ( $ realValue...
Checks that given JSON node does not exist .
16,989
public function setName ( $ value ) { $ names = explode ( ' ' , $ value , 2 ) ; $ this -> setFirstName ( $ names [ 0 ] ) ; $ this -> setLastName ( isset ( $ names [ 1 ] ) ? $ names [ 1 ] : null ) ; return $ this ; }
Sets the individual name .
16,990
public function register ( ) { $ this -> app -> bind ( 'mandrill_mail' , function ( $ app ) { return new Mail ( $ app [ 'config' ] [ 'services' ] [ 'mandrill' ] [ 'secret' ] ) ; } ) ; $ this -> app -> bind ( 'Weblee\Mandrill\Mail' , function ( $ app ) { return new Mail ( $ app [ 'config' ] [ 'services' ] [ 'mandrill' ]...
Register the mandrill service provider .
16,991
public function getBusinessData ( ) { $ business = $ this -> getBusiness ( ) ; if ( ! $ business ) { return array ( ) ; } $ data = array ( 'address' => array ( 'streetAddress' => $ business -> getAddress1 ( ) , 'locality' => $ business -> getCity ( ) , 'postalCode' => $ business -> getPostCode ( ) , 'region' => $ busin...
Get the business data .
16,992
public function setBusiness ( $ value ) { if ( $ value && ! $ value instanceof MerchantBusiness ) { $ value = new MerchantBusiness ( $ value ) ; } return $ this -> setParameter ( 'business' , $ value ) ; }
Sets the business .
16,993
public function getFundingData ( ) { $ funding = $ this -> getFunding ( ) ; if ( ! $ funding ) { return array ( ) ; } $ data = array ( 'accountNumber' => $ funding -> getAccountNumber ( ) , 'descriptor' => $ funding -> getDescriptor ( ) , 'destination' => $ funding -> getDestination ( ) , 'email' => $ funding -> getEma...
Get the funding data .
16,994
public function setFunding ( $ value ) { if ( $ value && ! $ value instanceof MerchantFunding ) { $ value = new MerchantFunding ( $ value ) ; } return $ this -> setParameter ( 'funding' , $ value ) ; }
Sets the funding .
16,995
public function getIndividualData ( ) { $ individual = $ this -> getIndividual ( ) ; if ( ! $ individual ) { return array ( ) ; } $ data = array ( 'address' => array ( 'streetAddress' => $ individual -> getAddress1 ( ) , 'locality' => $ individual -> getCity ( ) , 'postalCode' => $ individual -> getPostCode ( ) , 'regi...
Get the individual data .
16,996
public function setIndividual ( $ value ) { if ( $ value && ! $ value instanceof MerchantIndividual ) { $ value = new MerchantIndividual ( $ value ) ; } return $ this -> setParameter ( 'individual' , $ value ) ; }
Sets the individual .
16,997
public static function factory ( $ prefix , $ name = null ) { $ calledClass = get_called_class ( ) ; $ collection = new $ calledClass ( $ prefix ) ; if ( $ name ) { $ collection -> name ( $ name ) ; } return $ collection ; }
Returns collection with default values
16,998
public function endpoint ( ApiEndpoint $ endpoint ) { $ this -> endpointsByName [ $ endpoint -> getName ( ) ] = $ endpoint ; switch ( $ endpoint -> getHttpMethod ( ) ) { case HttpMethods :: GET : $ this -> get ( $ endpoint -> getPath ( ) , $ endpoint -> getHandlerMethod ( ) , $ this -> createRouteName ( $ endpoint ) ) ...
Mounts endpoint to the collection
16,999
public function allow ( ) { $ roleNames = func_get_args ( ) ; $ roleNames = Core :: array_flatten ( $ roleNames ) ; foreach ( $ roleNames as $ role ) { if ( ! in_array ( $ role , $ this -> allowedRoles ) ) { $ this -> allowedRoles [ ] = $ role ; } } return $ this ; }
Allows access to this collection for role with the given names . This can be overwritten on the Endpoint level .