idx int64 0 60.3k | question stringlengths 92 4.62k | target stringlengths 7 635 |
|---|---|---|
43,500 | public function listProjectsHistories ( $ projectId , $ optParams = array ( ) ) { $ params = array ( 'projectId' => $ projectId ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'list' , array ( $ params ) , "Google_Service_ToolResults_ListHistoriesResponse" ) ; } | Lists Histories for a given Project . |
43,501 | public function destroy ( $ name , Google_Service_CloudKMS_DestroyCryptoKeyVersionRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'name' => $ name , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'destroy' , array ( $ params ) , "Google_Servi... | Schedule a CryptoKeyVersion for destruction . |
43,502 | public function restore ( $ name , Google_Service_CloudKMS_RestoreCryptoKeyVersionRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'name' => $ name , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'restore' , array ( $ params ) , "Google_Servi... | Restore a CryptoKeyVersion in the DESTROY_SCHEDULED state . |
43,503 | public function create ( Google_Service_Classroom_Registration $ postBody , $ optParams = array ( ) ) { $ params = array ( 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'create' , array ( $ params ) , "Google_Service_Classroom_Registration" ) ; } | Creates a Registration causing Classroom to start sending notifications from the provided feed to the destination provided in cloudPubSubTopic . |
43,504 | public function predict ( $ name , Google_Service_CloudMachineLearning_GoogleCloudMlV1beta1PredictRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'name' => $ name , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'predict' , array ( $ params )... | Performs prediction on the data in the request . |
43,505 | public function listCoursesCourseWorkStudentSubmissions ( $ courseId , $ courseWorkId , $ optParams = array ( ) ) { $ params = array ( 'courseId' => $ courseId , 'courseWorkId' => $ courseWorkId ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'list' , array ( $ params ) , "Google_Service... | Returns a list of student submissions that the requester is permitted to view factoring in the OAuth scopes of the request . - may be specified as the course_work_id to include student submissions for multiple course work items . |
43,506 | public function modifyAttachments ( $ courseId , $ courseWorkId , $ id , Google_Service_Classroom_ModifyAttachmentsRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'courseId' => $ courseId , 'courseWorkId' => $ courseWorkId , 'id' => $ id , 'postBody' => $ postBody ) ; $ params = array_merge ( $ para... | Modifies attachments of student submission . |
43,507 | public function patch ( $ courseId , $ courseWorkId , $ id , Google_Service_Classroom_StudentSubmission $ postBody , $ optParams = array ( ) ) { $ params = array ( 'courseId' => $ courseId , 'courseWorkId' => $ courseWorkId , 'id' => $ id , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ... | Updates one or more fields of a student submission . |
43,508 | public function reclaim ( $ courseId , $ courseWorkId , $ id , Google_Service_Classroom_ReclaimStudentSubmissionRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'courseId' => $ courseId , 'courseWorkId' => $ courseWorkId , 'id' => $ id , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params ... | Reclaims a student submission on behalf of the student that owns it . |
43,509 | public function returnCoursesCourseWorkStudentSubmissions ( $ courseId , $ courseWorkId , $ id , Google_Service_Classroom_ReturnStudentSubmissionRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'courseId' => $ courseId , 'courseWorkId' => $ courseWorkId , 'id' => $ id , 'postBody' => $ postBody ) ; $... | Returns a student submission . |
43,510 | public function turnIn ( $ courseId , $ courseWorkId , $ id , Google_Service_Classroom_TurnInStudentSubmissionRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'courseId' => $ courseId , 'courseWorkId' => $ courseWorkId , 'id' => $ id , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , ... | Turns in a student submission . |
43,511 | public function batchDelete ( Google_Service_StreetViewPublish_BatchDeletePhotosRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'batchDelete' , array ( $ params ) , "Google_Service_StreetViewPubl... | Deletes a list of Photos and their metadata . |
43,512 | public function batchUpdate ( Google_Service_StreetViewPublish_BatchUpdatePhotosRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'batchUpdate' , array ( $ params ) , "Google_Service_StreetViewPubl... | Updates the metadata of Photos such as pose place association connections etc . Changing the pixels of photos is not supported . |
43,513 | public function listPhotos ( $ optParams = array ( ) ) { $ params = array ( ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'list' , array ( $ params ) , "Google_Service_StreetViewPublish_ListPhotosResponse" ) ; } | Lists all the Photos that belong to the user . |
43,514 | public function execute ( $ instanceName , Google_Service_RemoteBuildExecution_BuildBazelRemoteExecutionV2ExecuteRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'instanceName' => $ instanceName , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call (... | Execute an action remotely . |
43,515 | public function listProjectsModels ( $ parent , $ optParams = array ( ) ) { $ params = array ( 'parent' => $ parent ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'list' , array ( $ params ) , "Google_Service_CloudMachineLearningEngine_GoogleCloudMlV1ListModelsResponse" ) ; } | Lists the models in a project . |
43,516 | public function search ( Google_Service_PhotosLibrary_SearchMediaItemsRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'search' , array ( $ params ) , "Google_Service_PhotosLibrary_SearchMediaItem... | Searches for media items in a user s Google Photos library . If no filters are set then all media items in the user s library will be returned . |
43,517 | public function listProjectsBuilds ( $ projectId , $ optParams = array ( ) ) { $ params = array ( 'projectId' => $ projectId ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'list' , array ( $ params ) , "Google_Service_CloudBuild_ListBuildsResponse" ) ; } | Lists previously requested builds . |
43,518 | public function retry ( $ projectId , $ id , Google_Service_CloudBuild_RetryBuildRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'projectId' => $ projectId , 'id' => $ id , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'retry' , array ( $ pa... | Creates a new build based on the specified build . |
43,519 | public function create ( $ projectId , $ historyId , $ executionId , $ stepId , Google_Service_ToolResults_PerfMetricsSummary $ postBody , $ optParams = array ( ) ) { $ params = array ( 'projectId' => $ projectId , 'historyId' => $ historyId , 'executionId' => $ executionId , 'stepId' => $ stepId , 'postBody' => $ post... | Creates a PerfMetricsSummary resource . Returns the existing one if it has already been created . |
43,520 | public function batchUpdate ( $ documentId , Google_Service_Docs_BatchUpdateDocumentRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'documentId' => $ documentId , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'batchUpdate' , array ( $ params... | Applies one or more updates to the document . |
43,521 | public function create ( Google_Service_Docs_Document $ postBody , $ optParams = array ( ) ) { $ params = array ( 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'create' , array ( $ params ) , "Google_Service_Docs_Document" ) ; } | Creates a blank document using the title given in the request . Other fields in the request including any provided content are ignored . |
43,522 | public function initializeSettings ( $ projectId , $ optParams = array ( ) ) { $ params = array ( 'projectId' => $ projectId ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'initializeSettings' , array ( $ params ) , "Google_Service_ToolResults_ProjectSettings" ) ; } | Creates resources for settings which have not yet been set . |
43,523 | public function patch ( $ userId , $ sendAsEmail , Google_Service_Gmail_SendAs $ postBody , $ optParams = array ( ) ) { $ params = array ( 'userId' => $ userId , 'sendAsEmail' => $ sendAsEmail , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'patch' , array ( $ ... | Updates a send - as alias . If a signature is provided Gmail will sanitize the HTML before saving it with the alias . |
43,524 | public function verify ( $ userId , $ sendAsEmail , $ optParams = array ( ) ) { $ params = array ( 'userId' => $ userId , 'sendAsEmail' => $ sendAsEmail ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'verify' , array ( $ params ) ) ; } | Sends a verification email to the specified send - as alias address . The verification status must be pending . |
43,525 | public function get ( $ instanceName , $ hash , $ sizeBytes , $ optParams = array ( ) ) { $ params = array ( 'instanceName' => $ instanceName , 'hash' => $ hash , 'sizeBytes' => $ sizeBytes ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'get' , array ( $ params ) , "Google_Service_Remot... | Retrieve a cached execution result . |
43,526 | public function update ( $ instanceName , $ hash , $ sizeBytes , Google_Service_RemoteBuildExecution_BuildBazelRemoteExecutionV2ActionResult $ postBody , $ optParams = array ( ) ) { $ params = array ( 'instanceName' => $ instanceName , 'hash' => $ hash , 'sizeBytes' => $ sizeBytes , 'postBody' => $ postBody ) ; $ param... | Upload a new execution result . |
43,527 | public function batchUpdate ( $ spreadsheetId , Google_Service_Sheets_BatchUpdateSpreadsheetRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'spreadsheetId' => $ spreadsheetId , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'batchUpdate' , ar... | Applies one or more updates to the spreadsheet . |
43,528 | public function getByDataFilter ( $ spreadsheetId , Google_Service_Sheets_GetSpreadsheetByDataFilterRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'spreadsheetId' => $ spreadsheetId , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'getByData... | Returns the spreadsheet at the given ID . The caller must specify the spreadsheet ID . |
43,529 | public function sync ( $ name , Google_Service_CloudSourceRepositories_SyncRepoRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'name' => $ name , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'sync' , array ( $ params ) , "Google_Service_Clo... | Synchronize a connected repo . |
43,530 | public function updatePrimaryVersion ( $ name , Google_Service_CloudKMS_UpdateCryptoKeyPrimaryVersionRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'name' => $ name , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'updatePrimaryVersion' , ar... | Update the version of a CryptoKey that will be used in Encrypt . |
43,531 | public function create ( Google_Service_StreetViewPublish_Photo $ postBody , $ optParams = array ( ) ) { $ params = array ( 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'create' , array ( $ params ) , "Google_Service_StreetViewPublish_Photo" ) ; } | After the client finishes uploading the photo with the returned UploadRef CreatePhoto publishes the uploaded Photo to Street View on Google Maps . |
43,532 | public function startUpload ( Google_Service_StreetViewPublish_StreetviewpublishEmpty $ postBody , $ optParams = array ( ) ) { $ params = array ( 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'startUpload' , array ( $ params ) , "Google_Service_StreetViewPublis... | Creates an upload session to start uploading photo bytes . The method uses the upload URL of the returned UploadRef to upload the bytes for the Photo . |
43,533 | public function listCoursesTopics ( $ courseId , $ optParams = array ( ) ) { $ params = array ( 'courseId' => $ courseId ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'list' , array ( $ params ) , "Google_Service_Classroom_ListTopicResponse" ) ; } | Returns the list of topics that the requester is permitted to view . |
43,534 | public function disable ( $ name , Google_Service_ServiceUser_DisableServiceRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'name' => $ name , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'disable' , array ( $ params ) , "Google_Service_Ser... | Disable a service so it can no longer be used with a project . This prevents unintended usage that may cause unexpected billing charges or security leaks . |
43,535 | public function generateAuthenticationToken ( $ enterpriseId , $ userId , $ optParams = array ( ) ) { $ params = array ( 'enterpriseId' => $ enterpriseId , 'userId' => $ userId ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'generateAuthenticationToken' , array ( $ params ) , "Google_Se... | Generates an authentication token which the device policy client can use to provision the given EMM - managed user account on a device . The generated token is single - use and expires after a few minutes . |
43,536 | public function patch ( $ enterpriseId , $ userId , Google_Service_AndroidEnterprise_User $ postBody , $ optParams = array ( ) ) { $ params = array ( 'enterpriseId' => $ enterpriseId , 'userId' => $ userId , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'patch'... | Updates the details of an EMM - managed user . |
43,537 | public function revokeDeviceAccess ( $ enterpriseId , $ userId , $ optParams = array ( ) ) { $ params = array ( 'enterpriseId' => $ enterpriseId , 'userId' => $ userId ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'revokeDeviceAccess' , array ( $ params ) ) ; } | Revokes access to all devices currently provisioned to the user . The user will no longer be able to use the managed Play store on any of their managed devices . |
43,538 | public function update ( $ parent , $ name , Google_Service_ManufacturerCenter_Attributes $ postBody , $ optParams = array ( ) ) { $ params = array ( 'parent' => $ parent , 'name' => $ name , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'update' , array ( $ pa... | Inserts or updates the attributes of the product in a Manufacturer Center account . |
43,539 | public function listStatements ( $ optParams = array ( ) ) { $ params = array ( ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'list' , array ( $ params ) , "Google_Service_Digitalassetlinks_ListResponse" ) ; } | Retrieves a list of all statements from a given source that match the specified target and statement string . |
43,540 | public function batchUpdate ( $ presentationId , Google_Service_Slides_BatchUpdatePresentationRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'presentationId' => $ presentationId , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'batchUpdate' ... | Applies one or more updates to the presentation . |
43,541 | public function unclaim ( $ parent , Google_Service_AndroidProvisioningPartner_CustomerUnclaimDeviceRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'parent' => $ parent , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'unclaim' , array ( $ pa... | Unclaims a device from a customer and removes it from zero - touch enrollment . |
43,542 | public function listProjectsLocationsJobs ( $ projectId , $ location , $ optParams = array ( ) ) { $ params = array ( 'projectId' => $ projectId , 'location' => $ location ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'list' , array ( $ params ) , "Google_Service_Dataflow_ListJobsRespo... | List the jobs of a project . |
43,543 | public function deleteByFilter ( Google_Service_JobService_DeleteJobsByFilterRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'deleteByFilter' , array ( $ params ) , "Google_Service_JobService_Job... | Deprecated . Use BatchDeleteJobs instead . |
43,544 | public function histogram ( Google_Service_JobService_GetHistogramRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'histogram' , array ( $ params ) , "Google_Service_JobService_GetHistogramRespons... | Deprecated . Use SearchJobsRequest . histogram_facets instead to make a single call with both search and histogram . |
43,545 | public function setDefault ( $ name , Google_Service_CloudMachineLearning_GoogleCloudMlV1beta1SetDefaultVersionRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'name' => $ name , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'setDefault' , ar... | Designates a version to be the default for the model . |
43,546 | public function listUsersSettingsDelegates ( $ userId , $ optParams = array ( ) ) { $ params = array ( 'userId' => $ userId ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'list' , array ( $ params ) , "Google_Service_Gmail_ListDelegatesResponse" ) ; } | Lists the delegates for the specified account . |
43,547 | public function batchRead ( $ instanceName , Google_Service_RemoteBuildExecution_BuildBazelRemoteExecutionV2BatchReadBlobsRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'instanceName' => $ instanceName , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this ... | Download many blobs at once . |
43,548 | public function batchUpdate ( $ instanceName , Google_Service_RemoteBuildExecution_BuildBazelRemoteExecutionV2BatchUpdateBlobsRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'instanceName' => $ instanceName , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ t... | Upload many blobs at once . |
43,549 | public function findMissing ( $ instanceName , Google_Service_RemoteBuildExecution_BuildBazelRemoteExecutionV2FindMissingBlobsRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'instanceName' => $ instanceName , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ t... | Determine if blobs are present in the CAS . |
43,550 | public function create ( Google_Service_ServiceManagement_ManagedService $ postBody , $ optParams = array ( ) ) { $ params = array ( 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'create' , array ( $ params ) , "Google_Service_ServiceManagement_Operation" ) ; } | Creates a new managed service . Please note one producer project can own no more than 20 services . |
43,551 | public function disable ( $ serviceName , Google_Service_ServiceManagement_DisableServiceRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'serviceName' => $ serviceName , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'disable' , array ( $ par... | Disables a service for a project so it can no longer be be used for the project . It prevents accidental usage that may cause unexpected billing charges or security leaks . |
43,552 | public function undelete ( $ serviceName , $ optParams = array ( ) ) { $ params = array ( 'serviceName' => $ serviceName ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'undelete' , array ( $ params ) , "Google_Service_ServiceManagement_Operation" ) ; } | Revives a previously deleted managed service . The method restores the service using the configuration at the time the service was deleted . The target service must exist and must have been deleted within the last 30 days . |
43,553 | public function create ( $ projectId , $ historyId , $ executionId , Google_Service_ToolResults_Step $ postBody , $ optParams = array ( ) ) { $ params = array ( 'projectId' => $ projectId , 'historyId' => $ historyId , 'executionId' => $ executionId , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ o... | Creates a Step . |
43,554 | public function patch ( $ projectId , $ historyId , $ executionId , $ stepId , Google_Service_ToolResults_Step $ postBody , $ optParams = array ( ) ) { $ params = array ( 'projectId' => $ projectId , 'historyId' => $ historyId , 'executionId' => $ executionId , 'stepId' => $ stepId , 'postBody' => $ postBody ) ; $ para... | Updates an existing Step with the supplied partial entity . |
43,555 | public function publishXunitXmlFiles ( $ projectId , $ historyId , $ executionId , $ stepId , Google_Service_ToolResults_PublishXunitXmlFilesRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'projectId' => $ projectId , 'historyId' => $ historyId , 'executionId' => $ executionId , 'stepId' => $ stepId... | Publish xml files to an existing Step . |
43,556 | public function create ( Google_Service_FirebaseDynamicLinks_CreateManagedShortLinkRequest $ postBody , $ optParams = array ( ) ) { $ params = array ( 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'create' , array ( $ params ) , "Google_Service_FirebaseDynamicL... | Creates a managed short Dynamic Link given either a valid long Dynamic Link or details such as Dynamic Link domain Android and iOS app information . The created short Dynamic Link will not expire . |
43,557 | public function upload ( $ resourceName , Google_Service_CloudSearch_Media $ postBody , $ optParams = array ( ) ) { $ params = array ( 'resourceName' => $ resourceName , 'postBody' => $ postBody ) ; $ params = array_merge ( $ params , $ optParams ) ; return $ this -> call ( 'upload' , array ( $ params ) , "Google_Servi... | Uploads media for indexing . |
43,558 | protected function normalizeUrl ( $ url ) { if ( empty ( $ url ) ) { return ; } return $ this -> adapter -> getResponse ( ) -> getUrl ( ) -> getAbsolute ( $ url ) ; } | Returns the url as absolute . |
43,559 | private function extractOembed ( Response $ response ) { if ( ( $ response -> getUrl ( ) -> getExtension ( ) === 'xml' ) || ( $ response -> getUrl ( ) -> getQueryParameter ( 'format' ) === 'xml' ) ) { if ( $ xml = $ response -> getXmlContent ( ) ) { foreach ( $ xml as $ element ) { $ content = trim ( ( string ) $ eleme... | Save the oembed data in the bag . |
43,560 | public function getResult ( ) { $ result = curl_getinfo ( $ this -> resource ) ; if ( curl_errno ( $ this -> resource ) ) { $ result [ 'error' ] = curl_error ( $ this -> resource ) ; } return [ 'url' => isset ( $ result [ 'url' ] ) ? $ result [ 'url' ] : null , 'statusCode' => isset ( $ result [ 'http_code' ] ) ? $ res... | Returns the response result . |
43,561 | public function headerCallback ( $ resource , $ string ) { if ( ! strpos ( $ string , ':' ) ) { return strlen ( $ string ) ; } list ( $ name , $ value ) = array_map ( 'trim' , explode ( ':' , $ string , 2 ) ) ; $ name = strtolower ( $ name ) ; if ( ! isset ( $ this -> headers [ $ name ] ) ) { $ this -> headers [ $ name... | Callback used to collect the headers . |
43,562 | public function writeCallback ( $ resource , $ string ) { $ this -> body .= $ string ; if ( $ this -> onBody === null || call_user_func ( $ this -> onBody , $ this -> body , $ this -> data ) !== false ) { return strlen ( $ string ) ; } $ this -> body = null ; return - 1 ; } | Callback used to get the body content . |
43,563 | public static function flash ( $ src , $ width = null , $ height = null ) { $ code = self :: element ( 'object' , [ 'width' => $ width ? : 600 , 'height' => $ height ? : 400 , 'classid' => 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' , 'codebase' => 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#v... | Creates a flash element . |
43,564 | private static function element ( $ name , array $ attrs ) { $ str = "<$name" ; foreach ( $ attrs as $ name => $ value ) { if ( $ value === null ) { continue ; } elseif ( $ value === true ) { $ str .= " $name" ; } elseif ( $ value !== false ) { $ str .= ' ' . $ name . '="' . htmlspecialchars ( $ value ) . '"' ; } } ret... | Creates an html element . |
43,565 | public static function toUtf8 ( $ content , $ charset ) { $ charset = strtoupper ( $ charset ) ; if ( empty ( $ charset ) || $ charset === 'UTF-8' ) { return $ content ; } $ encodings = array_map ( 'strtoupper' , mb_list_encodings ( ) ) ; if ( in_array ( $ charset , $ encodings , true ) ) { return mb_convert_encoding (... | Convert a string to utf - 8 . |
43,566 | public static function xpathQuery ( DOMDocument $ document , $ query , $ returnFirst = true ) { $ xpath = new DOMXPath ( $ document ) ; $ entries = $ xpath -> query ( $ query ) ; if ( $ entries -> length ) { return $ returnFirst ? $ entries -> item ( 0 ) : $ entries ; } } | Search and return the first element matching with a xpath |
43,567 | public function getEndPoint ( ) { $ html = $ this -> response -> getHtmlContent ( ) ; if ( $ html && ( $ url = self :: getEndPointFromDom ( $ html ) ) ) { try { $ endPoint = $ this -> response -> getUrl ( ) -> createAbsolute ( $ url ) ; } catch ( Exception $ exception ) { return null ; } if ( $ endPoint -> getExtension... | Returns the oembed endPoint . |
43,568 | private static function getPosition ( $ mode , Url $ url ) { $ position = [ 'coordinates' => '' , 'zoom' => '4' , 'heading' => '0' , 'pitch' => '0' , 'fov' => '90' ] ; if ( $ mode === 'view' ) { $ pos = explode ( "," , $ url -> getDirectoryPosition ( 1 ) ) ; $ position [ 'coordinates' ] = str_replace ( '@' , '' , $ pos... | Returns parsed position data from url . |
43,569 | public function getHtmlContent ( ) { if ( $ this -> htmlContent === null ) { try { if ( empty ( $ content = $ this -> content ) ) { return $ this -> htmlContent = false ; } $ errors = libxml_use_internal_errors ( true ) ; $ entities = libxml_disable_entity_loader ( true ) ; $ this -> htmlContent = new DOMDocument ( ) ;... | Get the content as HTML . |
43,570 | public function getJsonContent ( ) { if ( $ this -> jsonContent === null ) { try { if ( ( $ content = $ this -> content ) === '' ) { return $ this -> jsonContent = false ; } $ this -> jsonContent = json_decode ( $ content , true ) ; } catch ( \ Exception $ exception ) { return $ this -> jsonContent = false ; } } return... | Get the content as an array from JSON . |
43,571 | public function getXMLContent ( ) { if ( $ this -> xmlContent === null ) { try { if ( ( $ content = $ this -> content ) === '' ) { return $ this -> xmlContent = false ; } $ errors = libxml_use_internal_errors ( true ) ; $ this -> xmlContent = new SimpleXMLElement ( $ content ) ; libxml_use_internal_errors ( $ errors ) ... | Get the content as XML . |
43,572 | private function setContent ( $ content ) { $ this -> content = $ content ; if ( empty ( $ this -> contentType ) ) { return ; } if ( strpos ( $ this -> contentType , ';' ) !== false ) { list ( $ mime , $ charset ) = array_map ( 'trim' , explode ( ';' , $ this -> contentType ) ) ; $ this -> contentType = $ mime ; $ char... | Set the response content . |
43,573 | public function withExtension ( $ extension ) { $ clone = clone $ this ; $ clone -> info [ 'extension' ] = $ extension ; if ( empty ( $ clone -> info [ 'file' ] ) ) { $ clone -> info [ 'file' ] = array_pop ( $ clone -> info [ 'path' ] ) ; } return $ clone ; } | Returns a clone with other extension . |
43,574 | public function getDirectoryPosition ( $ position ) { if ( $ position === count ( $ this -> info [ 'path' ] ) ) { return urldecode ( $ this -> info [ 'file' ] ) ; } return isset ( $ this -> info [ 'path' ] [ $ position ] ) ? urldecode ( $ this -> info [ 'path' ] [ $ position ] ) : null ; } | Return a specific directory position in the path of the url . |
43,575 | public function withDirectoryPosition ( $ key , $ value ) { $ clone = clone $ this ; $ pos = $ clone -> info [ 'path' ] ; $ hasFile = isset ( $ clone -> info [ 'file' ] ) ; if ( $ hasFile ) { $ pos [ ] = $ clone -> info [ 'file' ] ; } $ pos [ $ key ] = $ value ; if ( $ hasFile ) { $ clone -> info [ 'file' ] = array_pop... | Returns a clone with other directory in a specific position . |
43,576 | public function getSlicePath ( $ offset , $ length = null ) { $ array = explode ( '/' , $ this -> getPath ( ) ) ; if ( empty ( $ array [ 0 ] ) ) { array_shift ( $ array ) ; } return array_slice ( $ array , $ offset , $ length ) ; } | Slice path . |
43,577 | public function getPath ( ) { $ path = ! empty ( $ this -> info [ 'path' ] ) ? '/' . implode ( '/' , array_map ( 'self::urlEncode' , $ this -> info [ 'path' ] ) ) . '/' : '/' ; if ( isset ( $ this -> info [ 'file' ] ) ) { $ path .= self :: urlEncode ( $ this -> info [ 'file' ] ) ; if ( isset ( $ this -> info [ 'extensi... | Return the url path . |
43,578 | public function getQueryParameter ( $ name ) { return isset ( $ this -> info [ 'query' ] [ $ name ] ) ? $ this -> info [ 'query' ] [ $ name ] : null ; } | Returns a query parameter value . |
43,579 | public function withAddedQueryParameters ( array $ parameters ) { $ clone = clone $ this ; $ clone -> info [ 'query' ] = empty ( $ clone -> info [ 'query' ] ) ? $ parameters : array_replace ( $ clone -> info [ 'query' ] , $ parameters ) ; return $ clone ; } | Returns a clone with new query parameters merged . |
43,580 | public function getClassNameForDomain ( ) { $ className = str_replace ( array ( '-' , ' ' ) , '' , ucwords ( strtolower ( $ this -> getDomain ( ) ) ) ) ; if ( is_numeric ( mb_substr ( $ className , 0 , 1 ) ) ) { $ className = 'N' . $ className ; } return $ className ; } | Return ClassName for domain . |
43,581 | protected function buildUrl ( ) { $ url = '' ; if ( isset ( $ this -> info [ 'content' ] ) ) { return 'data:' . $ this -> info [ 'content' ] ; } if ( isset ( $ this -> info [ 'scheme' ] ) ) { $ url .= $ this -> info [ 'scheme' ] . '://' ; } $ user = isset ( $ this -> info [ 'user' ] ) ? $ this -> info [ 'user' ] : '' ;... | Build the url using the splitted data . |
43,582 | protected function parseUrl ( $ url ) { $ this -> info = self :: parse ( $ url ) ; if ( isset ( $ this -> info [ 'path' ] ) ) { $ this -> setPath ( $ this -> info [ 'path' ] ) ; } if ( empty ( $ this -> info [ 'query' ] ) ) { $ this -> info [ 'query' ] = [ ] ; return ; } $ queryString = preg_replace_callback ( '/(^|(?<... | Parse an url and split into different pieces . |
43,583 | public function getAbsolute ( $ url ) { $ url = trim ( $ url ) ; if ( empty ( $ url ) ) { return '' ; } if ( preg_match ( '|^\w+:[^/]|' , $ url ) ) { return $ url ; } if ( preg_match ( '|^\w+://|' , $ url ) ) { return self :: validUrlOrEmpty ( $ url ) ; } if ( strpos ( $ url , '://' ) === 0 ) { return self :: validUrlO... | Return an absolute url based in a relative . |
43,584 | private function setPath ( $ path ) { $ this -> info [ 'path' ] = $ this -> info [ 'file' ] = $ this -> info [ 'extension' ] = $ this -> info [ 'content' ] = null ; if ( $ this -> getScheme ( ) === 'data' ) { $ this -> info [ 'content' ] = $ path ; return ; } $ file = substr ( strrchr ( $ path , '/' ) , 1 ) ; if ( strl... | Parses and adds path and file value . |
43,585 | public static function createFromBase64 ( Url $ url ) { $ pieces = explode ( ';' , $ url -> getContent ( ) , 2 ) ; if ( ( count ( $ pieces ) !== 2 ) || ( strpos ( $ pieces [ 0 ] , 'image/' ) === false ) || ( strpos ( $ pieces [ 1 ] , 'base64,' ) !== 0 ) ) { return false ; } if ( ( $ info = @ getimagesizefromstring ( ba... | Create a ImageResponse using a bas64 url . |
43,586 | public function set ( $ name , $ value = null ) { if ( ! is_array ( $ name ) ) { $ name = [ $ name => $ value ] ; } foreach ( $ name as $ name => $ value ) { $ name = self :: normalizeName ( $ name ) ; $ value = self :: normalizeValue ( $ value ) ; $ this -> parameters [ $ name ] = $ value ; } } | Save a value . |
43,587 | public function add ( $ name , $ value = null ) { $ name = self :: normalizeName ( $ name ) ; $ value = self :: normalizeValue ( $ value ) ; if ( ! isset ( $ this -> parameters [ $ name ] ) ) { $ this -> parameters [ $ name ] = [ ] ; } elseif ( ! is_array ( $ this -> parameters [ $ name ] ) ) { $ this -> parameters [ $... | Adds a subvalue . |
43,588 | public function has ( $ name ) { $ name = self :: normalizeName ( $ name ) ; if ( strpos ( $ name , '[' ) !== false ) { $ names = explode ( '[' , str_replace ( ']' , '' , $ name ) ) ; $ key = array_shift ( $ names ) ; $ item = isset ( $ this -> parameters [ $ key ] ) ? $ this -> parameters [ $ key ] : [ ] ; foreach ( $... | Check if a value exists and is not empty . |
43,589 | private static function normalizeValue ( $ value ) { if ( is_string ( $ value ) ) { $ value = str_ireplace ( [ ' ' , ' ' ] , ' ' , $ value ) ; $ value = trim ( $ value ) ; return ( $ value === '' ) ? null : $ value ; } return $ value ; } | Normalize a value . If it s a string removes spaces and normalize some utf - 8 chars . |
43,590 | private static function toPlainValue ( $ value ) { if ( is_string ( $ value ) ) { $ value = strip_tags ( $ value ) ; $ value = html_entity_decode ( $ value , ENT_QUOTES | ENT_XML1 , 'UTF-8' ) ; $ value = trim ( $ value ) ; return ( $ value === '' ) ? null : $ value ; } return $ value ; } | Remove the html code and entities in a value |
43,591 | private function getEndPoint ( ) { $ url = $ this -> adapter -> getResponse ( ) -> getUrl ( ) ; $ key = $ this -> adapter -> getConfig ( 'facebook[key]' ) ; if ( empty ( $ key ) ) { return ; } if ( $ url -> getDirectoryPosition ( 0 ) === 'events' ) { return Url :: create ( 'https://graph.facebook.com/' ) -> withAddedPa... | Returns the Graph API Endpoint |
43,592 | public static function resolve ( Url $ url ) { foreach ( self :: $ patterns as $ method => $ pattern ) { if ( $ url -> match ( $ pattern ) ) { return self :: $ method ( $ url ) ; } } return $ url ; } | Resolve the url redirection . |
43,593 | public static function google ( Url $ url ) { if ( ( $ value = $ url -> getQueryParameter ( 'url' ) ) ) { return Url :: create ( $ value ) ; } return $ url ; } | Resolve a google redirection url . |
43,594 | public static function googleTranslator ( Url $ url ) { if ( ( $ value = $ url -> getQueryParameter ( 'u' ) ) ) { return Url :: create ( $ value ) ; } return $ url ; } | Resolve a google translation url . |
43,595 | public static function tumblr ( Url $ url ) { if ( ( $ value = $ url -> getQueryParameter ( 'z' ) ) ) { return Url :: create ( $ value ) ; } return $ url ; } | Redirect the tumblr url |
43,596 | public function getHtml ( ) { $ code = $ this -> code ; if ( empty ( $ code ) ) { return ; } $ errors = libxml_use_internal_errors ( true ) ; $ entities = libxml_disable_entity_loader ( true ) ; $ dom = new \ DOMDocument ( ) ; $ dom -> loadHTML ( $ code ) ; libxml_use_internal_errors ( $ errors ) ; libxml_disable_entit... | Returns the code as DOMNodeList elements |
43,597 | public function getProviderIcon ( ) { $ icons = $ this -> providerIcons ; if ( empty ( $ icons ) ) { return null ; } $ sizes = [ ] ; foreach ( $ icons as $ icon ) { $ sizes [ $ icon [ 'url' ] ] = $ icon [ 'size' ] ; } return static :: getBigger ( $ sizes ) ; } | Gets the best icon provider |
43,598 | public function getImage ( ) { $ this -> imageWidth = null ; $ this -> imageHeight = null ; $ images = $ this -> images ; $ bigger = ( bool ) $ this -> getConfig ( 'choose_bigger_image' ) ; $ minWidth = $ this -> getConfig ( 'min_image_width' , 1 ) ; $ minHeight = $ this -> getConfig ( 'min_image_height' , 1 ) ; $ imag... | Gets the best image |
43,599 | private function dispatchImagesInfo ( $ urls ) { if ( empty ( $ urls ) ) { return [ ] ; } $ requests = [ ] ; foreach ( $ urls as $ url ) { $ requests [ ] = Url :: create ( $ url ) ; } return array_map ( function ( ImageResponse $ response ) { return [ 'url' => ( string ) $ response -> getUrl ( ) , 'width' => $ response... | Get images info . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.