idx int64 0 60.3k | question stringlengths 92 4.62k | target stringlengths 7 635 |
|---|---|---|
17,700 | protected function instantiate ( $ id ) { $ this -> instances [ $ id ] = call_user_func ( $ this -> callbacks [ $ id ] , $ this ) ; } | Instantiates specified service . |
17,701 | public function apply ( ComponentInterface $ component ) { $ component -> isRootOfCustomizations = true ; parent :: apply ( $ component ) ; unset ( $ component -> isRootOfCustomizations ) ; } | Applies customization to target component and its children . |
17,702 | public function registerPath ( $ path , $ highPriority = true ) { if ( $ highPriority ) { array_unshift ( $ this -> paths , $ path ) ; } else { array_push ( $ this -> paths , $ path ) ; } return $ this ; } | Registers path to views . |
17,703 | public function getTemplatePath ( $ templateName ) { $ fileName = "$templateName.php" ; foreach ( $ this -> paths as $ path ) { $ fullPath = $ path . DIRECTORY_SEPARATOR . $ fileName ; if ( is_file ( $ fullPath ) ) { return $ fullPath ; } } return false ; } | Returns full path to template file . |
17,704 | public function setDataProvider ( DataProviderInterface $ dataProvider = null ) { $ this -> setData ( $ dataProvider ) ; $ this -> isOperationsApplied = false ; return $ this ; } | Sets data provider . |
17,705 | protected function prepare ( ) { $ collection = $ this -> getComponent ( 'collection_view' ) ; $ collection -> setData ( $ this -> getDataProvider ( ) ) ; if ( $ collection -> getDataInjector ( ) === null ) { $ collection -> setDataInjector ( $ this -> makeDataInjector ( ) ) ; } $ this -> applyOperations ( ) ; $ this -... | Prepares component for rendering . |
17,706 | protected function hideSubmitButtonIfNotUsed ( ) { $ submit = $ this -> getComponent ( static :: SUBMIT_BUTTON_ID ) ; if ( ! $ submit ) { return ; } if ( ! $ this -> getChildrenRecursive ( ) -> filterByProperty ( 'manual_form_submit_required' , true , true ) -> isEmpty ( ) ) { return ; } $ submit -> parent ( ) -> setVi... | Hides submit_button component if it s not required by another components . |
17,707 | protected function applyOperations ( ) { if ( ! $ this -> isOperationsApplied ) { $ this -> isOperationsApplied = true ; foreach ( $ this -> getControls ( ) as $ control ) { $ this -> getDataProvider ( ) -> operations ( ) -> add ( $ control -> getOperation ( ) ) ; } } } | Applies operations provided by controls to data provider . |
17,708 | public function setTemplate ( $ template ) { if ( is_string ( $ template ) ) { $ template = new TemplateView ( $ template ) ; } $ template -> mergeData ( [ 'layout' => $ this ] ) ; $ this -> addChild ( new Part ( $ template , 'template' ) ) ; return $ this ; } | Sets layout template . |
17,709 | public function section ( $ name , $ createIfNotExists = true ) { $ section = $ this -> getComponent ( 'section-' . $ name ) ; if ( ! $ section && $ createIfNotExists ) { $ section = new Section ( $ name ) ; $ section -> attachToCompound ( $ this ) ; } return $ section ; } | Returns section with specified name . |
17,710 | public function placeToSections ( array $ componentsBySections ) { foreach ( $ componentsBySections as $ section => $ children ) { if ( ! is_array ( $ children ) ) { throw new InvalidArgumentException ( 'Wrong argument format for Layout::placeToSections. Array of components for each section expected.' ) ; } $ this -> s... | Places components to layout sections . |
17,711 | public function render ( ) { $ this -> moveChildrenToMainSection ( ) ; $ this -> getTemplate ( ) -> mergeData ( $ this -> getData ( ) ) -> mergeData ( [ 'layout' => $ this ] ) ; return parent :: render ( ) ; } | Renders layout . |
17,712 | protected function getResourceManager ( ) { if ( $ this -> resourceManager === null ) { $ this -> resourceManager = Services :: resourceManager ( ) ; } return $ this -> resourceManager ; } | Returns resource manager instance used by component . |
17,713 | public function css ( $ name , $ attributes = [ ] ) { $ this -> getLayout ( ) -> css ( $ name , $ attributes ) -> attachTo ( $ this ) ; return $ this ; } | Includes CSS resource . Prevents including same resource twice . |
17,714 | public function removeComponent ( $ id ) { $ component = $ this -> getComponents ( ) -> findByProperty ( 'id' , $ id , true ) ; if ( $ component ) { $ this -> getComponents ( ) -> remove ( $ component ) ; } return $ this ; } | Removes component from compound . |
17,715 | public function apply ( ComponentInterface $ component , $ operations ) { if ( is_string ( $ operations ) || $ operations instanceof Closure ) { $ operations = [ $ operations ] ; } foreach ( $ operations as $ operation ) { if ( is_string ( $ operation ) ) { list ( $ key , $ value ) = explode ( ':' , $ operation ) ; $ o... | Applies operations to target component . |
17,716 | public function render ( ) { $ cloner = new VarCloner ( ) ; $ dumper = ( 'cli' === PHP_SAPI ? new CliDumper : new HtmlDumper ) ; $ output = fopen ( 'php://memory' , 'r+b' ) ; $ dumper -> dump ( $ cloner -> cloneVar ( $ this -> getData ( ) ) , $ output ) ; return stream_get_contents ( $ output , - 1 , 0 ) ; } | Renders data . |
17,717 | protected function field ( $ form , $ model , $ attribute , $ button ) { $ field = $ form -> field ( $ model , $ attribute , $ this -> fieldOptions ) ; $ field = call_user_func_array ( [ $ field , $ this -> inputMethod ] , $ this -> inputMethodArgs ) ; return str_replace ( '{button}' , $ button , $ field ) ; } | Render field of \ yii \ widgets \ ActiveForm . |
17,718 | public function Add ( $ name , $ subject , $ fromEmail , $ fromName , $ templateType = \ ElasticEmailEnums \ TemplateType :: RawHTML , $ templateScope = \ ElasticEmailEnums \ TemplateScope :: EEPrivate , $ bodyHtml = null , $ bodyText = null , $ css = null , $ originalTemplateID = 0 ) { return $ this -> sendRequest ( '... | Create new Template . Needs to be sent using POST method |
17,719 | public function EECopy ( $ templateID , $ name , $ subject , $ fromEmail , $ fromName ) { return $ this -> sendRequest ( 'template/copy' , array ( 'templateID' => $ templateID , 'name' => $ name , 'subject' => $ subject , 'fromEmail' => $ fromEmail , 'fromName' => $ fromName ) ) ; } | Copy Selected Template |
17,720 | public function Update ( $ templateID , $ templateScope = \ ElasticEmailEnums \ TemplateScope :: EEPrivate , $ name = null , $ subject = null , $ fromEmail = null , $ fromName = null , $ bodyHtml = null , $ bodyText = null , $ css = null , $ removeScreenshot = true ) { return $ this -> sendRequest ( 'template/update' ,... | Update existing template overwriting existing data . Needs to be sent using POST method . |
17,721 | public function ExportCsv ( $ channelNames , $ compressionFormat = \ ElasticEmailEnums \ CompressionFormat :: None , $ fileName = null ) { return $ this -> sendRequest ( 'channel/exportcsv' , array ( 'channelNames' => ( count ( $ channelNames ) === 0 ) ? null : join ( ';' , $ channelNames ) , 'compressionFormat' => $ c... | Export channels in CSV file format . |
17,722 | public function GetStatus ( $ transactionID , $ showFailed = false , $ showSent = false , $ showDelivered = false , $ showPending = false , $ showOpened = false , $ showClicked = false , $ showAbuse = false , $ showUnsubscribed = false , $ showErrors = false , $ showMessageIDs = false ) { return $ this -> sendRequest (... | Get email batch status |
17,723 | public function Export ( $ publicSurveyID , $ fileName , $ fileFormat = \ ElasticEmailEnums \ ExportFileFormats :: Csv , $ compressionFormat = \ ElasticEmailEnums \ CompressionFormat :: None ) { return $ this -> sendRequest ( 'survey/export' , array ( 'publicSurveyID' => $ publicSurveyID , 'fileName' => $ fileName , 'f... | Export given survey s data to provided format |
17,724 | public function buildCurlClient ( ) { $ this -> curl = curl_init ( $ this -> getEndPoint ( ) ) ; $ sslCertificate = $ this -> getSslCertificate ( ) ; $ sslKey = $ this -> getSslKey ( ) ; $ sslKeyPassword = $ this -> getSslKeyPassword ( ) ; $ userName = $ this -> getUsername ( ) ; $ password = $ this -> getPassword ( ) ... | Build the cURL client . |
17,725 | public function Add ( $ listName , $ createEmptyList = false , $ allowUnsubscribe = false , $ rule = null , array $ emails = array ( ) , $ allContacts = false ) { return $ this -> sendRequest ( 'list/add' , array ( 'listName' => $ listName , 'createEmptyList' => $ createEmptyList , 'allowUnsubscribe' => $ allowUnsubscr... | Create new list based on filtering rule or list of IDs |
17,726 | public function AddContacts ( $ listName , $ rule = null , array $ emails = array ( ) , $ allContacts = false ) { return $ this -> sendRequest ( 'list/addcontacts' , array ( 'listName' => $ listName , 'rule' => $ rule , 'emails' => ( count ( $ emails ) === 0 ) ? null : join ( ';' , $ emails ) , 'allContacts' => $ allCo... | Add existing Contacts to chosen list |
17,727 | public function EECopy ( $ sourceListName , $ newlistName = null , $ createEmptyList = null , $ allowUnsubscribe = null , $ rule = null ) { return $ this -> sendRequest ( 'list/copy' , array ( 'sourceListName' => $ sourceListName , 'newlistName' => $ newlistName , 'createEmptyList' => $ createEmptyList , 'allowUnsubscr... | Copy your existing List with the option to provide new settings to it . Some fields when left empty default to the source list s settings |
17,728 | public function CreateFromCampaign ( $ campaignID , $ listName , array $ statuses = array ( ) ) { return $ this -> sendRequest ( 'list/createfromcampaign' , array ( 'campaignID' => $ campaignID , 'listName' => $ listName , 'statuses' => ( count ( $ statuses ) === 0 ) ? null : join ( ';' , $ statuses ) ) ) ; } | Create a new list from the recipients of the given campaign using the given statuses of Messages |
17,729 | public function CreateNthSelectionLists ( $ listName , $ numberOfLists , $ excludeBlocked = true , $ allowUnsubscribe = false , $ rule = null , $ allContacts = false ) { return $ this -> sendRequest ( 'list/createnthselectionlists' , array ( 'listName' => $ listName , 'numberOfLists' => $ numberOfLists , 'excludeBlocke... | Create a series of nth selection lists from an existing list or segment |
17,730 | public function CreateRandomList ( $ listName , $ count , $ excludeBlocked = true , $ allowUnsubscribe = false , $ rule = null , $ allContacts = false ) { return $ this -> sendRequest ( 'list/createrandomlist' , array ( 'listName' => $ listName , 'count' => $ count , 'excludeBlocked' => $ excludeBlocked , 'allowUnsubsc... | Create a new list with randomized contacts from an existing list or segment |
17,731 | public function MoveContacts ( $ oldListName , $ newListName , array $ emails = array ( ) , $ moveAll = null , array $ statuses = array ( ) , $ rule = null ) { return $ this -> sendRequest ( 'list/movecontacts' , array ( 'oldListName' => $ oldListName , 'newListName' => $ newListName , 'emails' => ( count ( $ emails ) ... | Move selected contacts from one List to another |
17,732 | public function RemoveContacts ( $ listName , $ rule = null , array $ emails = array ( ) ) { return $ this -> sendRequest ( 'list/removecontacts' , array ( 'listName' => $ listName , 'rule' => $ rule , 'emails' => ( count ( $ emails ) === 0 ) ? null : join ( ';' , $ emails ) ) ) ; } | Remove selected Contacts from your list |
17,733 | public function Update ( $ listName , $ newListName = null , $ allowUnsubscribe = false ) { return $ this -> sendRequest ( 'list/update' , array ( 'listName' => $ listName , 'newListName' => $ newListName , 'allowUnsubscribe' => $ allowUnsubscribe ) ) ; } | Update existing list |
17,734 | public function Update ( $ tokenName , $ accessLevel , $ tokenNameNew = null ) { return $ this -> sendRequest ( 'accesstoken/update' , array ( 'tokenName' => $ tokenName , 'accessLevel' => $ accessLevel , 'tokenNameNew' => $ tokenNameNew ) ) ; } | Edit AccessToken . |
17,735 | public function getConfigurations ( ) { if ( $ this -> crops_internal === null ) { $ model = $ this -> owner ; if ( ! empty ( $ this -> crops ) ) { $ this -> crops_internal = $ this -> crops ; } else { $ o = [ ] ; foreach ( [ 'cropped_field' , 'crop_field' , 'crop_width' , 'ratio' ] as $ f ) { if ( $ this -> $ f ) { $ ... | return array with list of configurations |
17,736 | protected function createCrop ( $ crop , $ image ) { if ( ! empty ( $ crop [ 'cropped_field' ] ) ) { $ save_path = $ this -> getUploadPath ( $ crop [ 'cropped_field' ] ) ; } else { $ save_path = $ this -> getUploadPath ( $ this -> attribute ) ; } $ sizes = explode ( '-' , $ crop [ 'value' ] ) ; $ real_size = $ image ->... | this method crops the image |
17,737 | public function createResponseHash ( $ amount , $ dateTime , $ code ) { $ this -> validate ( 'storeId' , 'sharedSecret' , 'currency' ) ; $ storeId = $ this -> getStoreId ( ) ; $ sharedSecret = $ this -> getSharedSecret ( ) ; $ currency = $ this -> getCurrencyNumeric ( ) ; $ stringToHash = $ sharedSecret . $ code . $ am... | Generate a hash string that matches the format of the one returned by the payment gateway |
17,738 | public function AddSubAccount ( $ email , $ password , $ confirmPassword , $ requiresEmailCredits = false , $ enableLitmusTest = false , $ requiresLitmusCredits = false , $ maxContacts = 0 , $ enablePrivateIPRequest = true , $ sendActivation = false , $ returnUrl = null , $ sendingPermission = null , $ enableContactFea... | Create new subaccount and provide most important data about it . |
17,739 | public function AddSubAccountCredits ( $ credits , $ notes , $ creditType = \ ElasticEmailEnums \ CreditType :: Email , $ subAccountEmail = null , $ publicAccountID = null ) { return $ this -> sendRequest ( 'account/addsubaccountcredits' , array ( 'credits' => $ credits , 'notes' => $ notes , 'creditType' => $ creditTy... | Add email template or litmus credits to a sub - account |
17,740 | public function ChangePassword ( $ newPassword , $ confirmPassword , $ currentPassword = null ) { return $ this -> sendRequest ( 'account/changepassword' , array ( 'newPassword' => $ newPassword , 'confirmPassword' => $ confirmPassword , 'currentPassword' => $ currentPassword ) ) ; } | Create new password for your account . Password needs to be at least 6 characters long . |
17,741 | public function LoadPaymentHistory ( $ limit , $ offset , $ fromDate , $ toDate ) { return $ this -> sendRequest ( 'account/loadpaymenthistory' , array ( 'limit' => $ limit , 'offset' => $ offset , 'fromDate' => $ fromDate , 'toDate' => $ toDate ) ) ; } | Lists all payments |
17,742 | public function RemoveSubAccountCredits ( $ creditType , $ notes , $ subAccountEmail = null , $ publicAccountID = null , $ credits = null , $ removeAll = false ) { return $ this -> sendRequest ( 'account/removesubaccountcredits' , array ( 'creditType' => $ creditType , 'notes' => $ notes , 'subAccountEmail' => $ subAcc... | Remove email template or litmus credits from a sub - account |
17,743 | public function UpdateAdvancedOptions ( $ enableClickTracking = null , $ enableLinkClickTracking = null , $ manageSubscriptions = null , $ manageSubscribedOnly = null , $ transactionalOnUnsubscribe = null , $ skipListUnsubscribe = null , $ autoTextFromHtml = null , $ allowCustomHeaders = null , $ bccEmail = null , $ co... | Update sending and tracking options of your account . |
17,744 | public function UpdateCustomBranding ( $ enablePrivateBranding = false , $ logoUrl = null , $ supportLink = null , $ privateBrandingUrl = null , $ smtpAddress = null , $ smtpAlternative = null , $ paymentUrl = null ) { return $ this -> sendRequest ( 'account/updatecustombranding' , array ( 'enablePrivateBranding' => $ ... | Update settings of your private branding . These settings are needed if you want to use Elastic Email under your brand . |
17,745 | public function UpdateHttpNotification ( $ url , $ notifyOncePerEmail = false , $ settings = null ) { return $ this -> sendRequest ( 'account/updatehttpnotification' , array ( 'url' => $ url , 'notifyOncePerEmail' => $ notifyOncePerEmail , 'settings' => $ settings ) ) ; } | Update http notification URL . |
17,746 | public function UpdateProfile ( $ firstName , $ lastName , $ address1 , $ city , $ state , $ zip , $ countryID , $ marketingConsent = null , $ address2 = null , $ company = null , $ website = null , $ logoUrl = null , $ taxCode = null , $ phone = null ) { return $ this -> sendRequest ( 'account/updateprofile' , array (... | Update your profile . |
17,747 | public function UpdateSubAccountSettings ( $ requiresEmailCredits = false , $ monthlyRefillCredits = 0 , $ requiresLitmusCredits = false , $ enableLitmusTest = false , $ dailySendLimit = null , $ emailSizeLimit = 10 , $ enablePrivateIPRequest = false , $ maxContacts = 0 , $ subAccountEmail = null , $ publicAccountID = ... | Updates settings of specified subaccount |
17,748 | public function Add ( $ publicAccountID , $ email , array $ publicListID = array ( ) , array $ listName = array ( ) , $ firstName = null , $ lastName = null , $ source = \ ElasticEmailEnums \ ContactSource :: ContactApi , $ returnUrl = null , $ sourceUrl = null , $ activationReturnUrl = null , $ activationTemplate = nu... | Add a new contact and optionally to one of your lists . Note that your API KEY is not required for this call . |
17,749 | public function ChangeStatus ( $ status , $ rule = null , array $ emails = array ( ) ) { return $ this -> sendRequest ( 'contact/changestatus' , array ( 'status' => $ status , 'rule' => $ rule , 'emails' => ( count ( $ emails ) === 0 ) ? null : join ( ';' , $ emails ) ) ) ; } | Changes status of selected Contacts . You may provide RULE for selection or specify list of Contact IDs . |
17,750 | public function Export ( $ fileFormat = \ ElasticEmailEnums \ ExportFileFormats :: Csv , $ rule = null , array $ emails = array ( ) , $ compressionFormat = \ ElasticEmailEnums \ CompressionFormat :: None , $ fileName = null ) { return $ this -> sendRequest ( 'contact/export' , array ( 'fileFormat' => $ fileFormat , 'ru... | Export selected Contacts to file . |
17,751 | public function ExportUnsubscribeReasonCount ( $ from = null , $ to = null , $ fileFormat = \ ElasticEmailEnums \ ExportFileFormats :: Csv , $ compressionFormat = \ ElasticEmailEnums \ CompressionFormat :: None , $ fileName = null ) { return $ this -> sendRequest ( 'contact/exportunsubscribereasoncount' , array ( 'from... | Export contacts unsubscribe reasons count to file . |
17,752 | public function EEList ( $ rule = null , $ limit = 20 , $ offset = 0 ) { return $ this -> sendRequest ( 'contact/list' , array ( 'rule' => $ rule , 'limit' => $ limit , 'offset' => $ offset ) ) ; } | List of all contacts . If you have not specified RULE all Contacts will be listed . |
17,753 | public function LoadBlocked ( $ statuses , $ search = null , $ limit = 0 , $ offset = 0 ) { return $ this -> sendRequest ( 'contact/loadblocked' , array ( 'statuses' => ( count ( $ statuses ) === 0 ) ? null : join ( ';' , $ statuses ) , 'search' => $ search , 'limit' => $ limit , 'offset' => $ offset ) ) ; } | Load blocked contacts |
17,754 | public function QuickAdd ( $ emails , $ firstName = null , $ lastName = null , $ publicListID = null , $ listName = null , $ status = \ ElasticEmailEnums \ ContactStatus :: Active , $ notes = null , $ consentDate = null , $ consentIP = null , array $ field = array ( ) , $ notifyEmail = null , $ consentTracking = \ Elas... | Add new Contact to one of your Lists . |
17,755 | public function Upload ( $ contactFile , $ allowUnsubscribe = false , $ listID = null , $ listName = null , $ status = \ ElasticEmailEnums \ ContactStatus :: Active , $ consentDate = null , $ consentIP = null , $ consentTracking = \ ElasticEmailEnums \ ConsentTracking :: Unknown ) { return $ this -> sendRequest ( 'cont... | Upload contacts in CSV file . |
17,756 | public function EECopy ( $ sourceSegmentName , $ newSegmentName = null , $ rule = null ) { return $ this -> sendRequest ( 'segment/copy' , array ( 'sourceSegmentName' => $ sourceSegmentName , 'newSegmentName' => $ newSegmentName , 'rule' => $ rule ) ) ; } | Copy your existing Segment with the optional new rule and custom name |
17,757 | public function Export ( $ segmentName , $ fileFormat = \ ElasticEmailEnums \ ExportFileFormats :: Csv , $ compressionFormat = \ ElasticEmailEnums \ CompressionFormat :: None , $ fileName = null ) { return $ this -> sendRequest ( 'segment/export' , array ( 'segmentName' => $ segmentName , 'fileFormat' => $ fileFormat ,... | Exports all the contacts from the provided segment |
17,758 | public function EEList ( $ includeHistory = false , $ from = null , $ to = null ) { return $ this -> sendRequest ( 'segment/list' , array ( 'includeHistory' => $ includeHistory , 'from' => $ from , 'to' => $ to ) ) ; } | Lists all your available Segments |
17,759 | public function LoadByName ( $ segmentNames , $ includeHistory = false , $ from = null , $ to = null ) { return $ this -> sendRequest ( 'segment/loadbyname' , array ( 'segmentNames' => ( count ( $ segmentNames ) === 0 ) ? null : join ( ';' , $ segmentNames ) , 'includeHistory' => $ includeHistory , 'from' => $ from , '... | Lists your available Segments using the provided names |
17,760 | public function Update ( $ segmentName , $ newSegmentName = null , $ rule = null ) { return $ this -> sendRequest ( 'segment/update' , array ( 'segmentName' => $ segmentName , 'newSegmentName' => $ newSegmentName , 'rule' => $ rule ) ) ; } | Rename or change RULE for your segment |
17,761 | public function Export ( array $ channelIDs = array ( ) , $ fileFormat = \ ElasticEmailEnums \ ExportFileFormats :: Csv , $ compressionFormat = \ ElasticEmailEnums \ CompressionFormat :: None , $ fileName = null ) { return $ this -> sendRequest ( 'campaign/export' , array ( 'channelIDs' => ( count ( $ channelIDs ) === ... | Export selected campaigns to chosen file format . |
17,762 | public function EEList ( $ search = null , $ offset = 0 , $ limit = 0 ) { return $ this -> sendRequest ( 'campaign/list' , array ( 'search' => $ search , 'offset' => $ offset , 'limit' => $ limit ) ) ; } | List all of your campaigns |
17,763 | public function send ( Message $ message , $ registrationIds ) { if ( empty ( $ registrationIds ) ) { throw new \ InvalidArgumentException ( 'registrationIds cannot be empty' ) ; } if ( ! is_array ( $ registrationIds ) ) { $ registrationIds = array ( $ registrationIds ) ; } $ chunks = array_chunk ( $ registrationIds , ... | Sends a GCM message to one or more devices retrying up to the specified number of retries in case of unavailability . |
17,764 | public function createDeviceGroup ( $ senderId , $ notificationKeyName , array $ registrationIds ) { return $ this -> performDeviceGroupOperation ( $ senderId , $ notificationKeyName , null , $ registrationIds , self :: DEVICE_GROUP_CREATE ) ; } | Creates a device group under the specified senderId with the specificed notificationKeyName and adds all devices in registrationIds to the group . |
17,765 | public function addDeviceToGroup ( $ senderId , $ notificationKeyName , $ notificationKey , array $ registrationIds ) { if ( empty ( $ notificationKey ) ) { throw new \ InvalidArgumentException ( 'notificationKey cannot be empty' ) ; } return $ this -> performDeviceGroupOperation ( $ senderId , $ notificationKeyName , ... | Adds devices to an existing device group . |
17,766 | public function removeDeviceFromGroup ( $ senderId , $ notificationKeyName , $ notificationKey , array $ registrationIds ) { if ( empty ( $ notificationKey ) ) { throw new \ InvalidArgumentException ( 'notificationKey cannot be empty' ) ; } return $ this -> performDeviceGroupOperation ( $ senderId , $ notificationKeyNa... | Removes devices from an existing device group . |
17,767 | private function updateStatus ( $ unsentRegIds , & $ allResults , MulticastResult $ multicastResult ) { $ results = $ multicastResult -> getResults ( ) ; if ( count ( $ results ) != count ( $ unsentRegIds ) ) { throw new \ RuntimeException ( 'Internal error: sizes do not match. currentResults: ' . $ results . '; unsent... | Updates the status of the messages sent to devices and the list of devices that should be retried . |
17,768 | public function getDataItem ( $ itemname ) { if ( isset ( $ this -> data [ $ itemname ] ) ) { return $ this -> data [ $ itemname ] ; } return null ; } | Get an item from the internal data array |
17,769 | public function Export ( $ statuses , $ fileFormat = \ ElasticEmailEnums \ ExportFileFormats :: Csv , $ from = null , $ to = null , $ channelName = null , $ includeEmail = true , $ includeSms = true , array $ messageCategory = array ( ) , $ compressionFormat = \ ElasticEmailEnums \ CompressionFormat :: None , $ fileNam... | Export email log information to the specified file format . |
17,770 | public function ExportLinkTracking ( $ from , $ to , $ channelName = null , $ fileFormat = \ ElasticEmailEnums \ ExportFileFormats :: Csv , $ limit = 0 , $ offset = 0 , $ compressionFormat = \ ElasticEmailEnums \ CompressionFormat :: None , $ fileName = null ) { return $ this -> sendRequest ( 'log/exportlinktracking' ,... | Export detailed link tracking information to the specified file format . |
17,771 | public function LinkTracking ( $ from = null , $ to = null , $ limit = 0 , $ offset = 0 , $ channelName = null ) { return $ this -> sendRequest ( 'log/linktracking' , array ( 'from' => $ from , 'to' => $ to , 'limit' => $ limit , 'offset' => $ offset , 'channelName' => $ channelName ) ) ; } | Track link clicks |
17,772 | public function Load ( $ statuses , $ from = null , $ to = null , $ channelName = null , $ limit = 0 , $ offset = 0 , $ includeEmail = true , $ includeSms = true , array $ messageCategory = array ( ) , $ email = null , $ useStatusChangeDate = false ) { return $ this -> sendRequest ( 'log/load' , array ( 'statuses' => (... | Returns logs filtered by specified parameters . |
17,773 | public function LoadNotifications ( $ statuses , $ from = null , $ to = null , $ limit = 0 , $ offset = 0 , array $ messageCategory = array ( ) , $ useStatusChangeDate = false , $ notificationType = \ ElasticEmailEnums \ NotificationType :: All ) { return $ this -> sendRequest ( 'log/loadnotifications' , array ( 'statu... | Returns notification logs filtered by specified parameters . |
17,774 | public function Summary ( $ from , $ to , $ channelName = null , $ interval = \ ElasticEmailEnums \ IntervalType :: Summary , $ transactionID = null ) { return $ this -> sendRequest ( 'log/summary' , array ( 'from' => $ from , 'to' => $ to , 'channelName' => $ channelName , 'interval' => $ interval , 'transactionID' =>... | Loads summary information about activity in chosen date range . |
17,775 | public function createHash ( $ dateTime , $ amount ) { $ storeId = $ this -> getStoreId ( ) ; $ sharedSecret = $ this -> getSharedSecret ( ) ; $ currency = $ this -> getCurrencyNumeric ( ) ; $ stringToHash = $ storeId . $ dateTime . $ amount . $ currency . $ sharedSecret ; $ ascii = bin2hex ( $ stringToHash ) ; return ... | Returns a SHA - 1 hash of the transaction data . |
17,776 | protected function getBaseData ( ) { $ data = array ( ) ; $ data [ 'gateway_id' ] = $ this -> getGatewayID ( ) ; $ data [ 'password' ] = $ this -> getPassword ( ) ; $ data [ 'transaction_type' ] = $ this -> getTransactionType ( ) ; return $ data ; } | Get the base transaction data . |
17,777 | protected function buildHashString ( $ contentDigest , $ gge4Date , $ uri ) { return sprintf ( "%s\n%s\n%s\n%s\n%s" , self :: METHOD_POST , self :: CONTENT_TYPE , $ contentDigest , $ gge4Date , $ uri ) ; } | Composes the hash string needed for the newer versions of the API |
17,778 | protected function buildAuthString ( $ hashString ) { return sprintf ( 'GGE4_API %s:%s' , $ this -> getKeyId ( ) , base64_encode ( hash_hmac ( "sha1" , $ hashString , $ this -> getHmac ( ) , true ) ) ) ; } | Composes the auth string needed for the newer versions of the API |
17,779 | public static function getCardType ( $ type ) { if ( isset ( self :: $ cardTypes [ $ type ] ) ) { return self :: $ cardTypes [ $ type ] ; } return $ type ; } | Get the card type name from the card type code . |
17,780 | public function getAVSHash ( ) { $ parts = array ( ) ; $ parts [ ] = $ this -> getCard ( ) -> getAddress1 ( ) ; $ parts [ ] = $ this -> getCard ( ) -> getPostcode ( ) ; $ parts [ ] = $ this -> getCard ( ) -> getCity ( ) ; $ parts [ ] = $ this -> getCard ( ) -> getState ( ) ; $ parts [ ] = $ this -> getCard ( ) -> getCo... | Get the AVS Hash . |
17,781 | public function Add ( $ domain , $ trackingType = \ ElasticEmailEnums \ TrackingType :: Http ) { return $ this -> sendRequest ( 'domain/add' , array ( 'domain' => $ domain , 'trackingType' => $ trackingType ) ) ; } | Add new domain to account |
17,782 | public function VerifyTracking ( $ domain , $ trackingType = \ ElasticEmailEnums \ TrackingType :: Http ) { return $ this -> sendRequest ( 'domain/verifytracking' , array ( 'domain' => $ domain , 'trackingType' => $ trackingType ) ) ; } | Verification of tracking CNAME record for domain |
17,783 | final public function deserializeXml ( $ xmlstr ) { try { $ element = new \ SimpleXMLElement ( $ xmlstr ) ; } catch ( \ Exception $ ex ) { return false ; } foreach ( $ element as $ name => $ value ) { $ this -> $ name = stripslashes ( urldecode ( htmlspecialchars_decode ( $ value ) ) ) ; } return true ; } | The deserialize method is called during xml parsing create an object of the xml received based on the entity called |
17,784 | final public function serializeXml ( array $ fields ) { $ className = $ this -> stripNamespaceFromClassName ( $ this ) ; $ output = '<' . $ className . '>' ; foreach ( $ fields as $ key => $ value ) { if ( empty ( $ value ) ) { continue ; } $ key = str_replace ( ' ' , '_' , ucwords ( str_replace ( [ '_' , '$' , '%5F' ,... | Called during array to xml parsing create an string of the xml to send for api based on the request values for sustitution of specials chars use E prefix instead of % for hexadecimal |
17,785 | public function setEuDomain ( $ eu = true ) { $ this -> baseUri = $ eu ? self :: BASE_URI_EU : self :: BASE_URI ; } | Select EU Domain |
17,786 | public function convertLead ( $ leadId , $ data , $ params = [ ] , $ options = [ ] ) { $ params [ 'leadId' ] = $ leadId ; return $ this -> call ( 'convertLead' , $ params , $ data , $ options ) ; } | Implements convertLead API method . |
17,787 | public function deleteRecords ( $ id ) { if ( is_array ( $ id ) ) { $ params [ 'idlist' ] = implode ( ';' , $ id ) ; } else { $ params [ 'id' ] = $ id ; } return $ this -> call ( 'deleteRecords' , $ params ) ; } | Implements deleteRecords API method . |
17,788 | public function getRecordById ( $ id , $ params = [ ] , $ options = [ ] ) { if ( is_array ( $ id ) ) { $ params [ 'idlist' ] = implode ( ';' , $ id ) ; } else { $ params [ 'id' ] = $ id ; } return $ this -> call ( 'getRecordById' , $ params ) ; } | Implements getRecordById API method . |
17,789 | public function getSearchRecords ( $ searchCondition , $ params = [ ] , $ options = [ ] ) { $ params [ 'searchCondition' ] = $ searchCondition ; if ( empty ( $ params [ 'selectColumns' ] ) ) { $ params [ 'selectColumns' ] = 'All' ; } return $ this -> call ( 'getSearchRecords' , $ params ) ; } | Implements getSearchRecords API method . |
17,790 | public function searchRecords ( $ criteria , $ params = [ ] , $ options = [ ] ) { $ params [ 'criteria' ] = $ criteria ; if ( empty ( $ params [ 'selectColumns' ] ) ) { $ params [ 'selectColumns' ] = 'All' ; } return $ this -> call ( 'searchRecords' , $ params ) ; } | Implements searchRecords API method . |
17,791 | public function getUsers ( $ type = 'AllUsers' , $ newFormat = 1 ) { $ params [ 'type' ] = $ type ; $ params [ 'newFormat' ] = $ newFormat ; return $ this -> call ( 'getUsers' , $ params ) ; } | Implements getUsers API method . |
17,792 | public function insertRecords ( $ data , $ params = [ ] , $ options = [ ] ) { if ( ! isset ( $ params [ 'version' ] ) && isset ( $ data [ 'records' ] ) && count ( $ data [ 'records' ] ) > 1 ) { $ params [ 'version' ] = 4 ; } return $ this -> call ( 'insertRecords' , $ params , $ data , $ options ) ; } | Implements insertRecords API method . |
17,793 | public function updateRecords ( $ id , $ data , $ params = [ ] , $ options = [ ] ) { if ( is_array ( $ data ) && count ( $ data [ 'records' ] ) > 1 ) { $ params [ 'version' ] = 4 ; } else { if ( empty ( $ id ) ) { throw new \ InvalidArgumentException ( 'Record Id is required and cannot be empty.' ) ; } $ params [ 'id' ... | Implements updateRecords API method . |
17,794 | public function updateRelatedRecords ( $ id , $ data , $ params = array ( ) , $ options = array ( ) ) { if ( empty ( $ id ) ) { throw new \ InvalidArgumentException ( 'Record Id is required and cannot be empty.' ) ; } $ params [ 'id' ] = $ id ; return $ this -> call ( 'updateRelatedRecords' , $ params , $ data , $ opti... | Implements updateRelatedRecords API method . |
17,795 | public function uploadFile ( $ id , $ content , $ params = [ ] ) { if ( empty ( $ id ) ) { throw new \ InvalidArgumentException ( 'Record Id is required and cannot be empty.' ) ; } $ params [ 'id' ] = $ id ; if ( substr ( $ content , 0 , 4 ) === 'http' ) { $ params [ 'attachmentUrl' ] = $ content ; } else { $ params [ ... | Implements uploadFile API method . |
17,796 | public function toXML ( $ data ) { $ root = isset ( $ data [ 'root' ] ) ? $ data [ 'root' ] : $ this -> module ; $ no = 1 ; $ xml = '<' . $ root . '>' ; if ( isset ( $ data [ 'options' ] ) ) { $ xml .= '<row no="' . $ no . '">' ; foreach ( $ data [ 'options' ] as $ key => $ value ) { $ xml .= '<option val="' . $ key . ... | Convert from array to XML |
17,797 | public function mapEntity ( $ entity , $ entityName = null ) { if ( is_null ( $ entityName ) ) { if ( empty ( $ this -> module ) ) { throw new \ Exception ( 'Invalid module, it must be set before mapping entity' , 1 ) ; } $ entityName = $ this -> module ; $ entity = [ $ entity ] ; } $ xml = '<' . $ entityName . '>' ; $... | Convert an entity into XML |
17,798 | protected function mapSingleEntity ( Element $ entity ) { $ element = new \ ReflectionObject ( $ entity ) ; $ properties = $ element -> getProperties ( ) ; $ xml = '' ; foreach ( $ properties as $ property ) { $ propName = $ property -> getName ( ) ; $ propValue = $ entity -> $ propName ; if ( $ propValue !== null ) { ... | Convert single entity into XML |
17,799 | protected function mapEntityList ( array $ list , $ rowElementName = null ) { if ( is_null ( $ rowElementName ) ) { $ rowElementName = 'row' ; } $ xml = '' ; $ no = 1 ; foreach ( $ list as $ element ) { $ xml .= '<' . $ rowElementName . ' no="' . $ no ++ . '">' ; $ xml .= $ this -> mapSingleEntity ( $ element ) ; $ xml... | Convert list of entities into XML |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.