idx int64 0 60.3k | question stringlengths 92 4.62k | target stringlengths 7 635 |
|---|---|---|
50,400 | public function listAction ( $ notifiable ) { $ notifiableRepo = $ this -> get ( 'doctrine.orm.entity_manager' ) -> getRepository ( 'MgiletNotificationBundle:NotifiableNotification' ) ; $ notificationList = $ notifiableRepo -> findAllForNotifiableId ( $ notifiable ) ; return $ this -> render ( '@MgiletNotification/noti... | List of all notifications |
50,401 | public function markAsSeenAction ( $ notifiable , $ notification ) { $ manager = $ this -> get ( 'mgilet.notification' ) ; $ manager -> markAsSeen ( $ manager -> getNotifiableInterface ( $ manager -> getNotifiableEntityById ( $ notifiable ) ) , $ manager -> getNotification ( $ notification ) , true ) ; return new JsonR... | Set a Notification as seen |
50,402 | public function markAsUnSeenAction ( $ notifiable , $ notification ) { $ manager = $ this -> get ( 'mgilet.notification' ) ; $ manager -> markAsUnseen ( $ manager -> getNotifiableInterface ( $ manager -> getNotifiableEntityById ( $ notifiable ) ) , $ manager -> getNotification ( $ notification ) , true ) ; return new J... | Set a Notification as unseen |
50,403 | public function markAllAsSeenAction ( $ notifiable ) { $ manager = $ this -> get ( 'mgilet.notification' ) ; $ manager -> markAllAsSeen ( $ manager -> getNotifiableInterface ( $ manager -> getNotifiableEntityById ( $ notifiable ) ) , true ) ; return new JsonResponse ( true ) ; } | Set all Notifications for a User as seen |
50,404 | public function render ( NotifiableInterface $ notifiable , array $ options = array ( ) ) { if ( ! array_key_exists ( 'seen' , $ options ) ) { $ options [ 'seen' ] = true ; } return $ this -> renderNotifications ( $ notifiable , $ options ) ; } | Rendering notifications in Twig |
50,405 | public function renderNotifications ( NotifiableInterface $ notifiable , array $ options ) { $ order = array_key_exists ( 'order' , $ options ) ? $ options [ 'order' ] : null ; $ limit = array_key_exists ( 'limit' , $ options ) ? $ options [ 'limit' ] : null ; $ offset = array_key_exists ( 'offset' , $ options ) ? $ op... | Render notifications of the notifiable as a list |
50,406 | public function generatePath ( $ route , $ notifiable , NotificationInterface $ notification = null ) { if ( $ notifiable instanceof NotifiableInterface ) { $ notifiableId = $ this -> notificationManager -> getNotifiableEntity ( $ notifiable ) -> getId ( ) ; } elseif ( $ notifiable instanceof NotifiableEntity ) { $ not... | Returns the path to the NotificationController action |
50,407 | public function findAllForNotifiable ( $ notifiable_identifier , $ notifiable_class , $ order = 'DESC' ) { return $ this -> createQueryBuilder ( 'nn' ) -> join ( 'nn.notifiableEntity' , 'ne' ) -> join ( 'nn.notification' , 'no' ) -> where ( 'ne.identifier = :identifier' ) -> andWhere ( 'ne.class = :class' ) -> setParam... | Get all NotifiableNotifications for a notifiable |
50,408 | public function getNotificationCount ( $ notifiable_identifier , $ notifiable_class , $ seen = null ) { $ qb = $ this -> getNotificationCoundQb ( $ notifiable_identifier , $ notifiable_class ) ; if ( $ seen !== null ) { $ whereSeen = $ seen ? 1 : 0 ; $ qb -> andWhere ( 'nn.seen = :seen' ) -> setParameter ( 'seen' , $ w... | Get the count of Notifications for a Notifiable entity . |
50,409 | public function getNotifiable ( $ name ) { $ notifiables = $ this -> getDiscoveryNotifiables ( ) ; if ( isset ( $ notifiables [ $ name ] ) ) { return $ notifiables [ $ name ] ; } throw new \ RuntimeException ( 'Notifiable not found.' ) ; } | Returns one notifiable by name |
50,410 | public function getNotifiableEntityIdentifiers ( NotifiableEntity $ notifiableEntity ) { $ discoveryNotifiables = $ this -> getDiscoveryNotifiables ( ) ; foreach ( $ discoveryNotifiables as $ notifiable ) { if ( $ notifiable [ 'class' ] === $ notifiableEntity -> getClass ( ) ) { return $ notifiable [ 'identifiers' ] ; ... | Get the identifier mapping for a NotifiableEntity |
50,411 | public function generateIdentifier ( NotifiableInterface $ notifiable ) { $ Notifiableidentifiers = $ this -> getNotifiableIdentifier ( $ notifiable ) ; $ identifierValues = array ( ) ; foreach ( $ Notifiableidentifiers as $ identifier ) { $ method = sprintf ( 'get%s' , ucfirst ( $ identifier ) ) ; $ identifierValues [... | Generates the identifier value to store a NotifiableEntity |
50,412 | public function getNotifiableEntity ( NotifiableInterface $ notifiable ) { $ identifier = $ this -> generateIdentifier ( $ notifiable ) ; $ class = ClassUtils :: getRealClass ( get_class ( $ notifiable ) ) ; $ entity = $ this -> notifiableRepository -> findOneBy ( array ( 'identifier' => $ identifier , 'class' => $ cla... | Get a NotifiableEntity form a NotifiableInterface |
50,413 | public function addNotification ( $ notifiables , NotificationInterface $ notification , $ flush = false ) { foreach ( $ notifiables as $ notifiable ) { $ entity = $ this -> getNotifiableEntity ( $ notifiable ) ; $ notifiableNotification = new NotifiableNotification ( ) ; $ entity -> addNotifiableNotification ( $ notif... | Add a Notification to a list of NotifiableInterface entities |
50,414 | public function removeNotification ( array $ notifiables , NotificationInterface $ notification , $ flush = false ) { $ repo = $ this -> om -> getRepository ( 'MgiletNotificationBundle:NotifiableNotification' ) ; foreach ( $ notifiables as $ notifiable ) { $ repo -> createQueryBuilder ( 'nn' ) -> delete ( ) -> where ( ... | Deletes the link between a Notifiable and a Notification |
50,415 | public function resetFilters ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#CategoryQueryList#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } } | Removes filter options . |
50,416 | protected function parseRecommendation ( $ xml ) { $ r = array ( ) ; foreach ( $ xml -> children ( ) as $ x ) { if ( isset ( $ x -> Asin ) ) { $ r [ $ x -> getName ( ) ] [ 'ASIN' ] = ( string ) $ x -> Asin ; $ r [ $ x -> getName ( ) ] [ 'SKU' ] = ( string ) $ x -> Sku ; $ r [ $ x -> getName ( ) ] [ 'UPC' ] = ( string )... | Parses XML response for a single recommendation into an array . |
50,417 | public function resetReportTypes ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#ReportTypeList#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } } | Removes report type options . |
50,418 | public function fetchReportList ( $ r = true ) { $ this -> prepareToken ( ) ; $ url = $ this -> urlbase . $ this -> urlbranch ; $ query = $ this -> genQuery ( ) ; $ path = $ this -> options [ 'Action' ] . 'Result' ; if ( $ this -> mockMode ) { $ xml = $ this -> fetchMockFile ( ) -> $ path ; } else { $ response = $ this... | Fetches a list of Report Schedules from Amazon . |
50,419 | public function getSchedule ( $ i = 0 ) { if ( ! isset ( $ this -> scheduleList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> scheduleList [ $ i ] [ 'Schedule' ] ; } else { return false ; } } | Returns the schedule for the specified entry . |
50,420 | public function getScheduledDate ( $ i = 0 ) { if ( ! isset ( $ this -> scheduleList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> scheduleList [ $ i ] [ 'ScheduledDate' ] ; } else { return false ; } } | Returns the date the specified report is scheduled for . |
50,421 | protected function resetPackageDimensions ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#ShipmentRequestDetails.PackageDimensions#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } } | Resets the package dimension options . |
50,422 | public function fetchServices ( ) { $ services = new AmazonMerchantServiceList ( $ this -> storeName , $ this -> mockMode , $ this -> mockFiles , $ this -> config ) ; $ services -> mockIndex = $ this -> mockIndex ; $ services -> setLogPath ( $ this -> logpath ) ; $ services -> setDetailsByCreator ( $ this ) ; $ service... | Fetches eligible services for the shipment from Amazon using the current options . |
50,423 | public function fetchShipment ( ) { if ( ! array_key_exists ( 'ShipmentId' , $ this -> options ) ) { $ this -> log ( "Shipment ID must be set in order to fetch it!" , 'Warning' ) ; return false ; } $ this -> options [ 'Action' ] = 'GetShipment' ; $ url = $ this -> urlbase . $ this -> urlbranch ; $ query = $ this -> gen... | Fetches the specified merchant - fulfilled shipment from Amazon . |
50,424 | public function getWeight ( $ only = false ) { if ( isset ( $ this -> data [ 'Weight' ] ) ) { if ( $ only ) { return $ this -> data [ 'Weight' ] [ 'Value' ] ; } else { return $ this -> data [ 'Weight' ] ; } } else { return false ; } } | Returns the weight . |
50,425 | public function getInsurance ( $ only = false ) { if ( isset ( $ this -> data [ 'Insurance' ] ) ) { if ( $ only ) { return $ this -> data [ 'Insurance' ] [ 'Amount' ] ; } else { return $ this -> data [ 'Insurance' ] ; } } else { return false ; } } | Returns the insurance amount . |
50,426 | public function getServiceRate ( $ only = false ) { if ( isset ( $ this -> data [ 'ShippingService' ] ) ) { if ( $ only ) { return $ this -> data [ 'ShippingService' ] [ 'Rate' ] [ 'Amount' ] ; } else { return $ this -> data [ 'ShippingService' ] [ 'Rate' ] ; } } else { return false ; } } | Returns the service rate . |
50,427 | public function getDeclaredValue ( $ only = false ) { if ( isset ( $ this -> data [ 'ShippingService' ] [ 'DeclaredValue' ] ) ) { if ( $ only ) { return $ this -> data [ 'ShippingService' ] [ 'DeclaredValue' ] [ 'Amount' ] ; } else { return $ this -> data [ 'ShippingService' ] [ 'DeclaredValue' ] ; } } else { return fa... | Returns the declared value . |
50,428 | public function getLabelData ( $ raw = FALSE ) { if ( isset ( $ this -> data [ 'Label' ] ) ) { if ( $ raw ) { return $ this -> data [ 'Label' ] ; } $ r = $ this -> data [ 'Label' ] ; $ convert = $ this -> getLabelFileContents ( FALSE ) ; if ( $ convert ) { $ r [ 'FileContents' ] [ 'Contents' ] = $ convert ; } return $ ... | Returns an array containing all of the Label information . |
50,429 | public function getLabelFileContents ( $ raw = FALSE ) { if ( isset ( $ this -> data [ 'Label' ] [ 'FileContents' ] [ 'Contents' ] ) ) { if ( $ raw ) { return $ this -> data [ 'Label' ] [ 'FileContents' ] [ 'Contents' ] ; } try { return gzdecode ( base64_decode ( $ this -> data [ 'Label' ] [ 'FileContents' ] [ 'Content... | Returns the file contents for the Label . |
50,430 | protected function resetStatusFilter ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#ShipmentStatusList#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } } | Resets the status options . |
50,431 | protected function resetIdFilter ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#ShipmentIdList#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } } | Resets the shipment ID options . |
50,432 | public function getShipmentName ( $ i = 0 ) { if ( ! isset ( $ this -> shipmentList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> shipmentList [ $ i ] [ 'ShipmentName' ] ; } else { return false ; } } | Returns the name for the specified shipment . |
50,433 | public function getAddress ( $ i = 0 ) { if ( ! isset ( $ this -> shipmentList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> shipmentList [ $ i ] [ 'ShipFromAddress' ] ; } else { return false ; } } | Returns the shipping address for the specified entry . |
50,434 | public function getDestinationFulfillmentCenterId ( $ i = 0 ) { if ( ! isset ( $ this -> shipmentList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> shipmentList [ $ i ] [ 'DestinationFulfillmentCenterId' ] ; } else { return false ; } } | Returns the Destination Fulfillment Center ID for the specified shipment . |
50,435 | public function getLabelPrepType ( $ i = 0 ) { if ( ! isset ( $ this -> shipmentList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> shipmentList [ $ i ] [ 'LabelPrepType' ] ; } else { return false ; } } | Returns the label prep type for the specified shipment . |
50,436 | public function getShipmentStatus ( $ i = 0 ) { if ( ! isset ( $ this -> shipmentList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> shipmentList [ $ i ] [ 'ShipmentStatus' ] ; } else { return false ; } } | Returns the shipment status for the specified shipment . |
50,437 | public function getIfCasesRequired ( $ i = 0 ) { if ( ! isset ( $ this -> shipmentList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> shipmentList [ $ i ] [ 'AreCasesRequired' ] ; } else { return false ; } } | Returns whether or not cases are required for the specified shipment . |
50,438 | public function getConfirmedNeedByDate ( $ i = 0 ) { if ( ! isset ( $ this -> shipmentList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> shipmentList [ $ i ] [ 'ConfirmedNeedByDate' ] ; } else { return false ; } } | Returns the maximum arrival date for the specified shipment . |
50,439 | public function fetchReport ( ) { if ( ! array_key_exists ( 'ReportId' , $ this -> options ) ) { $ this -> log ( "Report ID must be set in order to fetch it!" , 'Warning' ) ; return false ; } $ url = $ this -> urlbase . $ this -> urlbranch ; $ query = $ this -> genQuery ( ) ; if ( $ this -> mockMode ) { $ this -> rawre... | Sends a request to Amazon for a report . |
50,440 | public function saveReport ( $ path ) { if ( ! isset ( $ this -> rawreport ) ) { return false ; } try { file_put_contents ( $ path , $ this -> rawreport ) ; $ this -> log ( "Successfully saved report #" . $ this -> options [ 'ReportId' ] . " at $path" ) ; } catch ( Exception $ e ) { $ this -> log ( "Unable to save repo... | Saves the raw report data to a path you specify |
50,441 | public function setMock ( $ b = true , $ files = null ) { if ( is_bool ( $ b ) ) { $ this -> resetMock ( true ) ; $ this -> mockMode = $ b ; if ( $ b ) { $ this -> log ( "Mock Mode set to ON" ) ; } if ( is_string ( $ files ) ) { $ this -> mockFiles = array ( ) ; $ this -> mockFiles [ 0 ] = $ files ; $ this -> log ( "Si... | Enables or disables Mock Mode for the object . |
50,442 | protected function fetchMockFile ( $ load = true ) { if ( ! is_array ( $ this -> mockFiles ) || ! array_key_exists ( 0 , $ this -> mockFiles ) ) { $ this -> log ( "Attempted to retrieve mock files, but no mock files present" , 'Warning' ) ; return false ; } if ( ! array_key_exists ( $ this -> mockIndex , $ this -> mock... | Fetches the given mock file or attempts to . |
50,443 | protected function fetchMockResponse ( ) { if ( ! is_array ( $ this -> mockFiles ) || ! array_key_exists ( 0 , $ this -> mockFiles ) ) { $ this -> log ( "Attempted to retrieve mock responses, but no mock responses present" , 'Warning' ) ; return false ; } if ( ! array_key_exists ( $ this -> mockIndex , $ this -> mockFi... | Generates a fake HTTP response using the mock file list . |
50,444 | protected function checkResponse ( $ r ) { if ( ! is_array ( $ r ) || ! array_key_exists ( 'code' , $ r ) ) { $ this -> log ( "No Response found" , 'Warning' ) ; return false ; } if ( $ r [ 'code' ] == 200 ) { return true ; } else { $ xml = simplexml_load_string ( $ r [ 'body' ] ) -> Error ; $ this -> log ( "Bad Respon... | Checks whether or not the response is OK . |
50,445 | public function setConfig ( $ path ) { if ( file_exists ( $ path ) && is_readable ( $ path ) ) { include ( $ path ) ; $ this -> config = $ path ; $ this -> setLogPath ( $ logpath ) ; if ( isset ( $ AMAZON_SERVICE_URL ) ) { $ this -> urlbase = rtrim ( $ AMAZON_SERVICE_URL , '/' ) . '/' ; } } else { throw new Exception (... | Set the config file . |
50,446 | public function setLogPath ( $ path ) { if ( ! file_exists ( $ path ) ) { touch ( $ path ) ; } if ( file_exists ( $ path ) && is_readable ( $ path ) ) { $ this -> logpath = $ path ; } else { throw new Exception ( "Log file does not exist or cannot be read! ($path)" ) ; } } | Set the log file path . |
50,447 | public function setStore ( $ s = null ) { if ( file_exists ( $ this -> config ) ) { include ( $ this -> config ) ; } else { throw new Exception ( "Config file does not exist!" ) ; } if ( empty ( $ store ) || ! is_array ( $ store ) ) { throw new Exception ( "No stores defined!" ) ; } if ( ! isset ( $ s ) && count ( $ st... | Sets the store values . |
50,448 | protected function genTime ( $ time = false ) { if ( ! $ time ) { $ time = time ( ) ; } else if ( is_numeric ( $ time ) ) { $ time = ( int ) $ time ; } else if ( is_string ( $ time ) ) { $ time = strtotime ( $ time ) ; } else { throw new InvalidArgumentException ( 'Invalid time input given' ) ; } return date ( 'c' , $ ... | Generates timestamp in ISO8601 format . |
50,449 | protected function genQuery ( ) { if ( file_exists ( $ this -> config ) ) { include ( $ this -> config ) ; } else { throw new Exception ( "Config file does not exist!" ) ; } if ( array_key_exists ( $ this -> storeName , $ store ) && array_key_exists ( 'secretKey' , $ store [ $ this -> storeName ] ) ) { $ secretKey = $ ... | Handles generation of the signed query string . |
50,450 | protected function sendRequest ( $ url , $ param ) { $ this -> log ( "Making request to Amazon: " . $ this -> options [ 'Action' ] ) ; $ response = $ this -> fetchURL ( $ url , $ param ) ; while ( isset ( $ response [ 'code' ] ) && $ response [ 'code' ] == '503' && $ this -> throttleStop == false ) { $ this -> sleep ( ... | Sends a request to Amazon via cURL |
50,451 | public function getLastErrorResponse ( ) { if ( ! empty ( $ this -> rawResponses ) ) { foreach ( array_reverse ( $ this -> rawResponses ) as $ x ) { if ( isset ( $ x [ 'error' ] ) ) { return $ x ; } } } } | Gives the last response with an error code . This may or may not be the same as the last response if multiple requests were made . |
50,452 | public function getLastErrorMessage ( ) { $ last = $ this -> getLastErrorResponse ( ) ; if ( ! empty ( $ last [ 'body' ] ) ) { $ xml = simplexml_load_string ( $ last [ 'body' ] ) ; if ( isset ( $ xml -> Error -> Message ) ) { return $ xml -> Error -> Message ; } } } | Gives the error message from the last error response . Not all error responses will have error messages . This data can also be found in the XML body given by getLastErrorResponse . |
50,453 | protected function sleep ( ) { flush ( ) ; $ s = ( $ this -> throttleTime == 1 ) ? '' : 's' ; $ this -> log ( "Request was throttled, Sleeping for " . $ this -> throttleTime . " second$s" , 'Throttle' ) ; sleep ( $ this -> throttleTime ) ; } | Sleeps for the throttle time and records to the log . |
50,454 | protected function checkToken ( $ xml ) { if ( $ xml && $ xml -> NextToken && ( string ) $ xml -> HasNext != 'false' && ( string ) $ xml -> MoreResultsAvailable != 'false' ) { $ this -> tokenFlag = true ; $ this -> options [ 'NextToken' ] = ( string ) $ xml -> NextToken ; } else { unset ( $ this -> options [ 'NextToken... | Checks for a token and changes the proper options |
50,455 | protected function _signParameters ( array $ parameters , $ key ) { $ algorithm = $ this -> options [ 'SignatureMethod' ] ; $ stringToSign = null ; if ( 2 === $ this -> options [ 'SignatureVersion' ] ) { $ stringToSign = $ this -> _calculateStringToSignV2 ( $ parameters ) ; } else { throw new Exception ( "Invalid Signa... | validates signature and sets up signing of them copied from Amazon |
50,456 | public function resetItems ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#InboundShipmentPlanRequestItems#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } } | Resets the item options . |
50,457 | public function getPlan ( $ i = null ) { if ( ! isset ( $ this -> planList ) ) { return false ; } else { if ( is_int ( $ i ) ) { return $ this -> planList [ $ i ] ; } else { return $ this -> planList ; } } } | Returns the supply type for the specified entry . |
50,458 | public function getShipmentIdList ( ) { if ( ! isset ( $ this -> planList ) ) { return false ; } $ a = array ( ) ; foreach ( $ this -> planList as $ x ) { $ a [ ] = $ x [ 'ShipmentId' ] ; } return $ a ; } | Returns an array of only the shipping IDs for convenient use . |
50,459 | public function resetRequestIds ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#ReportRequestIdList#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } } | Removes report request ID options . |
50,460 | public function resetReportStatuses ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#ReportProcessingStatusList#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } } | Removes report status options . |
50,461 | public function getStartDate ( $ i = 0 ) { if ( ! isset ( $ this -> reportList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> reportList [ $ i ] [ 'StartDate' ] ; } else { return false ; } } | Returns the start date for the specified report request . |
50,462 | public function getEndDate ( $ i = 0 ) { if ( ! isset ( $ this -> reportList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> reportList [ $ i ] [ 'EndDate' ] ; } else { return false ; } } | Returns the end date for the specified report request . |
50,463 | public function getIsScheduled ( $ i = 0 ) { if ( ! isset ( $ this -> reportList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> reportList [ $ i ] [ 'Scheduled' ] ; } else { return false ; } } | Returns whether or not the specified report request is scheduled . |
50,464 | public function getSubmittedDate ( $ i = 0 ) { if ( ! isset ( $ this -> reportList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> reportList [ $ i ] [ 'SubmittedDate' ] ; } else { return false ; } } | Returns the date the specified report request was submitted . |
50,465 | public function getStatus ( $ i = 0 ) { if ( ! isset ( $ this -> reportList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> reportList [ $ i ] [ 'ReportProcessingStatus' ] ; } else { return false ; } } | Returns the processing status for the specified report request . |
50,466 | public function getDateProcessingStarted ( $ i = 0 ) { if ( ! isset ( $ this -> reportList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> reportList [ $ i ] [ 'StartedProcessingDate' ] ; } else { return false ; } } | Returns the date processing for the specified report request started . |
50,467 | public function getDateCompleted ( $ i = 0 ) { if ( ! isset ( $ this -> reportList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> reportList [ $ i ] [ 'CompletedDate' ] ; } else { return false ; } } | Returns the date processing for the specified report request was finished . |
50,468 | public function getDestinations ( $ i = null ) { if ( isset ( $ this -> destinationList ) ) { if ( is_numeric ( $ i ) ) { return $ this -> destinationList [ $ i ] ; } else { return $ this -> destinationList ; } } else { return false ; } } | Returns the specified destination or all of them . |
50,469 | public function getDeliveryChannel ( $ i = 0 ) { if ( isset ( $ this -> destinationList [ $ i ] [ 'DeliveryChannel' ] ) ) { return $ this -> destinationList [ $ i ] [ 'DeliveryChannel' ] ; } else { return false ; } } | Returns the delivery channel for the specified entry . |
50,470 | public function getAttributes ( $ i = 0 , $ j = null ) { if ( isset ( $ this -> destinationList [ $ i ] [ 'AttributeList' ] ) ) { if ( isset ( $ this -> destinationList [ $ i ] [ 'AttributeList' ] [ $ j ] ) ) { return $ this -> destinationList [ $ i ] [ 'AttributeList' ] [ $ j ] ; } else { return $ this -> destinationL... | Returns the specified attribute set for the specified entry . |
50,471 | public function setUseToken ( $ b = true ) { if ( is_bool ( $ b ) ) { $ this -> tokenUseFlag = $ b ; $ this -> tokenItemFlag = $ b ; } else { return false ; } } | Sets whether or not the object should automatically use tokens if it receives one . |
50,472 | public function getFulfillmentNetworkSKU ( $ i = 0 ) { if ( ! isset ( $ this -> itemList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> itemList [ $ i ] [ 'FulfillmentNetworkSKU' ] ; } else { return false ; } } | Returns the Fulfillment Network SKU for the specified entry . |
50,473 | public function getQuantityReceived ( $ i = 0 ) { if ( ! isset ( $ this -> itemList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> itemList [ $ i ] [ 'QuantityReceived' ] ; } else { return false ; } } | Returns the quantity received for the specified entry . |
50,474 | public function getQuantityInCase ( $ i = 0 ) { if ( ! isset ( $ this -> itemList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> itemList [ $ i ] [ 'QuantityInCase' ] ; } else { return false ; } } | Returns the quantity in cases for the specified entry . |
50,475 | public function getPrepDetails ( $ i = 0 , $ j = null ) { if ( ! isset ( $ this -> itemList ) ) { return false ; } if ( is_int ( $ i ) && isset ( $ this -> itemList [ $ i ] [ 'PrepDetailsList' ] ) ) { if ( is_numeric ( $ j ) ) { return $ this -> itemList [ $ i ] [ 'PrepDetailsList' ] [ $ j ] ; } else { return $ this ->... | Returns the preperation details for the specified entry . |
50,476 | public function getReleaseDate ( $ i = 0 ) { if ( ! isset ( $ this -> itemList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> itemList [ $ i ] [ 'ReleaseDate' ] ; } else { return false ; } } | Returns the release date for the specified entry . |
50,477 | public function getSku ( $ i = 0 ) { if ( isset ( $ this -> prepList [ $ i ] [ 'SellerSKU' ] ) ) { return $ this -> prepList [ $ i ] [ 'SellerSKU' ] ; } else { return false ; } } | Returns the Seller SKU for the specified item preperation instruction . |
50,478 | public function getAsin ( $ i = 0 ) { if ( isset ( $ this -> prepList [ $ i ] [ 'ASIN' ] ) ) { return $ this -> prepList [ $ i ] [ 'ASIN' ] ; } else { return false ; } } | Returns the ASIN for the specified item preperation instruction . |
50,479 | public function getBarcodeInstruction ( $ i = 0 ) { if ( isset ( $ this -> prepList [ $ i ] [ 'BarcodeInstruction' ] ) ) { return $ this -> prepList [ $ i ] [ 'BarcodeInstruction' ] ; } else { return false ; } } | Returns the barcode instruction for the specified item preperation instruction . |
50,480 | public function getPrepGuidance ( $ i = 0 ) { if ( isset ( $ this -> prepList [ $ i ] [ 'PrepGuidance' ] ) ) { return $ this -> prepList [ $ i ] [ 'PrepGuidance' ] ; } else { return false ; } } | Returns the prep guidance message for the specified item preperation instruction . |
50,481 | public function getPrepList ( $ i = null ) { if ( ! isset ( $ this -> prepList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> prepList [ $ i ] ; } else { return $ this -> prepList ; } } | Returns the full list of preperation instructions . |
50,482 | public function getInvalidItemList ( $ i = null ) { if ( ! isset ( $ this -> invalidList ) ) { return false ; } if ( is_int ( $ i ) ) { return $ this -> invalidList [ $ i ] ; } else { return $ this -> invalidList ; } } | Returns the full list of invalid items . |
50,483 | public function resetMarketplaceIds ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#MarketplaceIdList#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } } | Removes ID options . |
50,484 | public function submitFeed ( ) { if ( ! $ this -> feedContent ) { $ this -> log ( "Feed's contents must be set in order to submit it!" , 'Warning' ) ; return false ; } if ( ! array_key_exists ( 'FeedType' , $ this -> options ) ) { $ this -> log ( "Feed Type must be set in order to submit a feed!" , 'Warning' ) ; return... | Submits a feed to Amazon . |
50,485 | public function resetMarketplaceFilter ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#MarketplaceId#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } if ( file_exists ( $ this -> config ) ) { include ( $ this -> config ) ; } else { throw new Exception ( 'Config file does not exist!'... | Removes marketplace ID options and sets the current store s marketplace instead . |
50,486 | public function resetPaymentMethodFilter ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#PaymentMethod#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } } | Removes payment method options . |
50,487 | protected function resetOrderIds ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#AmazonOrderId.Id.#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } } | Resets the order ID options . |
50,488 | protected function resetProductIds ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#IdList#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } } | Resets the product ID options . |
50,489 | public function getList ( $ i = null ) { if ( isset ( $ this -> list ) ) { if ( is_numeric ( $ i ) ) { return $ this -> list [ $ i ] ; } else { return $ this -> list ; } } else { return false ; } } | Returns the specified subscription or all of them . |
50,490 | public function getDeliveryChannel ( $ i = 0 ) { if ( isset ( $ this -> list [ $ i ] [ 'Destination' ] [ 'DeliveryChannel' ] ) ) { return $ this -> list [ $ i ] [ 'Destination' ] [ 'DeliveryChannel' ] ; } else { return false ; } } | Returns the delivery channel for the retrieved subscription s destination . |
50,491 | public function getAttributes ( $ i = 0 , $ j = null ) { if ( isset ( $ this -> list [ $ i ] [ 'Destination' ] [ 'AttributeList' ] ) ) { if ( isset ( $ this -> list [ $ i ] [ 'Destination' ] [ 'AttributeList' ] [ $ j ] ) ) { return $ this -> list [ $ i ] [ 'Destination' ] [ 'AttributeList' ] [ $ j ] ; } else { return $... | Returns the attribute list for the retrieved subscription s destination . |
50,492 | public function usePlan ( $ x ) { if ( is_array ( $ x ) ) { $ this -> options [ 'ShipmentId' ] = $ x [ 'ShipmentId' ] ; $ this -> setShipmentId ( $ x [ 'ShipmentId' ] ) ; $ this -> setDestination ( $ x [ 'DestinationFulfillmentCenterId' ] ) ; if ( $ x [ 'LabelPrepType' ] == 'AMAZON_LABEL' ) { $ this -> setLabelPrepPref... | Automatically fills in the necessary fields using a planner array . |
50,493 | public function createShipment ( ) { if ( ! isset ( $ this -> options [ 'ShipmentId' ] ) ) { $ this -> log ( "Shipment ID must be set in order to create it" , 'Warning' ) ; return false ; } if ( ! array_key_exists ( 'InboundShipmentHeader.ShipmentName' , $ this -> options ) ) { $ this -> log ( "Header must be set in or... | Sends a request to Amazon to create an Inbound Shipment . |
50,494 | protected function resetPackageIds ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#PackageLabelsToPrint#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } } | Resets the package ID parameters . |
50,495 | public function getDocument ( $ raw = FALSE ) { if ( isset ( $ this -> doc ) ) { if ( $ raw ) { return $ this -> doc ; } try { return base64_decode ( $ this -> doc ) ; } catch ( Exception $ ex ) { $ this -> log ( 'Failed to convert transport document file, file might be corrupt: ' . $ ex -> getMessage ( ) , 'Urgent' ) ... | Returns the file contents for the transport document . |
50,496 | public function getChecksum ( $ raw = FALSE ) { if ( isset ( $ this -> checksum ) ) { if ( $ raw ) { return $ this -> checksum ; } try { return base64_decode ( $ this -> checksum ) ; } catch ( Exception $ ex ) { $ this -> log ( 'Failed to convert transport document checksum, file might be corrupt: ' . $ ex -> getMessag... | Returns the checksum the transport document . |
50,497 | public function parseAddress ( $ xml ) { $ r = array ( ) ; $ r [ 'Name' ] = ( string ) $ xml -> Name ; $ r [ 'Line1' ] = ( string ) $ xml -> Line1 ; if ( isset ( $ xml -> Line2 ) ) { $ r [ 'Line2' ] = ( string ) $ xml -> Line2 ; } if ( isset ( $ xml -> Line3 ) ) { $ r [ 'Line3' ] = ( string ) $ xml -> Line3 ; } if ( is... | Parses XML for an address into an array . |
50,498 | public function resetFeedIds ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#FeedSubmissionIdList#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } } | Removes feed ID options . |
50,499 | public function resetFeedTypes ( ) { foreach ( $ this -> options as $ op => $ junk ) { if ( preg_match ( "#FeedTypeList#" , $ op ) ) { unset ( $ this -> options [ $ op ] ) ; } } } | Removes feed type options . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.