_id
stringlengths
2
7
title
stringlengths
3
151
partition
stringclasses
3 values
text
stringlengths
33
8k
language
stringclasses
1 value
meta_information
dict
q15400
KeyManagementServiceGapicClient.keyRingName
train
public static function keyRingName($project, $location, $keyRing) { return self::getKeyRingNameTemplate()->render([ 'project' => $project,
php
{ "resource": "" }
q15401
KeyManagementServiceGapicClient.setIamPolicy
train
public function setIamPolicy($resource, $policy, array $optionalArgs = []) { $request = new SetIamPolicyRequest(); $request->setResource($resource); $request->setPolicy($policy); $requestParams = new RequestParamsHeaderDescriptor([ 'resource' => $request->getResource(), ]); $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
php
{ "resource": "" }
q15402
KeyManagementServiceGapicClient.getIamPolicy
train
public function getIamPolicy($resource, array $optionalArgs = []) { $request = new GetIamPolicyRequest(); $request->setResource($resource); $requestParams = new RequestParamsHeaderDescriptor([ 'resource' => $request->getResource(), ]); $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers'])
php
{ "resource": "" }
q15403
ReadStream.getSizeFromMetadata
train
private function getSizeFromMetadata() { foreach ($this->stream->getMetadata('wrapper_data') as $value) {
php
{ "resource": "" }
q15404
ReadStream.read
train
public function read($length) { $data = ''; do { $moreData = $this->stream->read($length); $data .= $moreData; $readLength = strlen($moreData);
php
{ "resource": "" }
q15405
CommuteFilter.setCommuteMethod
train
public function setCommuteMethod($var) { GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4beta1\CommuteMethod::class);
php
{ "resource": "" }
q15406
CommuteFilter.setRoadTraffic
train
public function setRoadTraffic($var) { GPBUtil::checkEnum($var, \Google\Cloud\Talent\V4beta1\CommuteFilter_RoadTraffic::class);
php
{ "resource": "" }
q15407
DocGenerator.generate
train
public function generate($basePath, $pretty) { $fileReflectorRegister = new ReflectorRegister(); $rootPath = $this->executionPath; foreach ($this->files as $file) { $currentFileArr = $this->isComponent ? explode("/$basePath/", $file) : explode("$rootPath", $file); if (isset($currentFileArr[1])) { $currentFile = str_replace('src/', '', $currentFileArr[1]); } else { throw new \Exception( sprintf('Failed to determine currentFile: %s', $file) ); } $isPhp = strrpos($file, '.php') == strlen($file) - strlen('.php'); $pathInfo = pathinfo($currentFile); $servicePath = $pathInfo['dirname'] === '.' ? strtolower($pathInfo['filename']) : strtolower($pathInfo['dirname'] . '/' . $pathInfo['filename']); $id = $this->isComponent ? strtolower($basePath) . '/' . $servicePath : $servicePath; if ($isPhp) { $parser = new CodeParser( $file, $fileReflectorRegister, $rootPath, $this->componentId, $this->manifestPath, $this->release, $this->output, $id,
php
{ "resource": "" }
q15408
Dictionary.setWordList
train
public function setWordList($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CustomInfoType_Dictionary_WordList::class);
php
{ "resource": "" }
q15409
Dictionary.setCloudStoragePath
train
public function setCloudStoragePath($var) { GPBUtil::checkMessage($var,
php
{ "resource": "" }
q15410
FieldFilter.setValue
train
public function setValue($var) { GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1beta1\Value::class);
php
{ "resource": "" }
q15411
BigQueryClient.runQuery
train
public function runQuery(JobConfigurationInterface $query, array $options = []) { $queryResultsOptions = $this->pluckArray([ 'maxResults', 'startIndex', 'timeoutMs', 'maxRetries' ], $options); $queryResultsOptions['initialTimeoutMs'] = 10000;
php
{ "resource": "" }
q15412
BigQueryClient.startQuery
train
public function startQuery(JobConfigurationInterface $query, array $options = []) { $config = $query->toArray(); $response = $this->connection->insertJob($config + $options); return new Job( $this->connection,
php
{ "resource": "" }
q15413
BigQueryClient.jobs
train
public function jobs(array $options = []) { $resultLimit = $this->pluck('resultLimit', $options, false); return new ItemIterator( new PageIterator( function (array $job) { return new Job( $this->connection,
php
{ "resource": "" }
q15414
BigQueryClient.datasets
train
public function datasets(array $options = []) { $resultLimit = $this->pluck('resultLimit', $options, false); return new ItemIterator( new PageIterator( function (array $dataset) { return new Dataset( $this->connection,
php
{ "resource": "" }
q15415
BigQueryClient.getServiceAccount
train
public function getServiceAccount(array $options = []) { $resp = $this->connection->getServiceAccount($options + ['projectId'
php
{ "resource": "" }
q15416
DominantColorsAnnotation.setColors
train
public function setColors($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15417
Filter.setPropertyFilter
train
public function setPropertyFilter($var) { GPBUtil::checkMessage($var, \Google\Cloud\Datastore\V1\PropertyFilter::class);
php
{ "resource": "" }
q15418
ProfileQuery.setWorkExperienceFilter
train
public function setWorkExperienceFilter($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15419
ProfileQuery.setApplicationDateFilters
train
public function setApplicationDateFilters($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15420
ProfileQuery.setApplicationOutcomeNotesFilters
train
public function setApplicationOutcomeNotesFilters($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15421
ProfileQuery.setApplicationLastStageFilters
train
public function setApplicationLastStageFilters($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15422
ProfileQuery.setApplicationJobFilters
train
public function setApplicationJobFilters($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15423
ProfileQuery.setApplicationStatusFilters
train
public function setApplicationStatusFilters($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15424
TimeEvent.setAnnotation
train
public function setAnnotation($var) { GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span_TimeEvent_Annotation::class);
php
{ "resource": "" }
q15425
ListNotificationChannelsResponse.setNotificationChannels
train
public function setNotificationChannels($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15426
LikelihoodAdjustment.setFixedLikelihood
train
public function setFixedLikelihood($var) { GPBUtil::checkEnum($var, \Google\Cloud\Dlp\V2\Likelihood::class);
php
{ "resource": "" }
q15427
SpannerGapicClient.databaseName
train
public static function databaseName($project, $instance, $database) { return self::getDatabaseNameTemplate()->render([ 'project' => $project,
php
{ "resource": "" }
q15428
SpannerGapicClient.sessionName
train
public static function sessionName($project, $instance, $database, $session) { return self::getSessionNameTemplate()->render([ 'project' => $project,
php
{ "resource": "" }
q15429
AppProfile.setMultiClusterRoutingUseAny
train
public function setMultiClusterRoutingUseAny($var) { GPBUtil::checkMessage($var, \Goog
php
{ "resource": "" }
q15430
AppProfile.setSingleClusterRouting
train
public function setSingleClusterRouting($var) { GPBUtil::checkMessage($var, \Googl
php
{ "resource": "" }
q15431
DatastoreClient.allocateId
train
public function allocateId(Key $key, array $options = []) {
php
{ "resource": "" }
q15432
DatastoreClient.transaction
train
public function transaction(array $options = []) { $transaction = $this->operation->beginTransaction([ // if empty, force request to encode as {} rather than []. 'readWrite' => $this->pluck('transactionOptions', $options, false) ?: (object) [] ], $options);
php
{ "resource": "" }
q15433
DatastoreClient.readOnlyTransaction
train
public function readOnlyTransaction(array $options = []) { $transaction = $this->operation->beginTransaction([ // if empty, force request to encode as {} rather than []. 'readOnly' => $this->pluck('transactionOptions', $options, false) ?: (object) [] ], $options);
php
{ "resource": "" }
q15434
DatastoreClient.insert
train
public function insert(EntityInterface $entity, array $options = []) { $res = $this->insertBatch([$entity],
php
{ "resource": "" }
q15435
DatastoreClient.update
train
public function update(EntityInterface $entity, array $options = []) { $res = $this->updateBatch([$entity],
php
{ "resource": "" }
q15436
DatastoreClient.upsert
train
public function upsert(EntityInterface $entity, array $options = []) { $res = $this->upsertBatch([$entity],
php
{ "resource": "" }
q15437
DatastoreClient.deleteBatch
train
public function deleteBatch(array $keys, array $options = []) { $options += [ 'baseVersion' => null ]; $mutations = [];
php
{ "resource": "" }
q15438
DatastoreClient.lookup
train
public function lookup(Key $key, array $options = []) { $res = $this->lookupBatch([$key], $options);
php
{ "resource": "" }
q15439
DatastoreClient.parseSingleMutationResult
train
private function parseSingleMutationResult(array $res) { $mutationResult = $res['mutationResults'][0]; if (isset($mutationResult['conflictDetected']) && $mutationResult['conflictDetected']) { throw new DomainException( 'A conflict was detected
php
{ "resource": "" }
q15440
ListInstancesResponse.setInstances
train
public function setInstances($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15441
Query.projection
train
public function projection($properties) { if (!is_array($properties)) { $properties = [$properties]; } foreach ($properties as $property) { $this->query['projection'][] = [
php
{ "resource": "" }
q15442
Query.kind
train
public function kind($kinds) { if (!is_array($kinds)) { $kinds = [$kinds];
php
{ "resource": "" }
q15443
Query.filter
train
public function filter($property, $operator, $value) { if (!isset($this->query['filter']) || !isset($this->query['filter']['compositeFilter'])) { $this->initializeFilter(); } $this->query['filter']['compositeFilter']['filters'][] = [ 'propertyFilter' => [ 'property' => $this->propertyName($property),
php
{ "resource": "" }
q15444
Query.order
train
public function order($property, $direction = self::ORDER_DEFAULT) { $this->query['order'][] = [ 'property' => $this->propertyName($property),
php
{ "resource": "" }
q15445
Query.distinctOn
train
public function distinctOn($property) { if (!is_array($property)) { $property = [$property];
php
{ "resource": "" }
q15446
Query.mapOperator
train
private function mapOperator($operator) { if (array_key_exists($operator, $this->shortOperators)) { $operator = $this->shortOperators[$operator]; } if (!in_array($operator, $this->allowedOperators)) { throw new InvalidArgumentException(sprintf( 'Invalid operator `%s`
php
{ "resource": "" }
q15447
ListJobsResponse.setJobs
train
public function setJobs($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15448
CommitRequest.setMutations
train
public function setMutations($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15449
OutputAudioConfig.setAudioEncoding
train
public function setAudioEncoding($var) { GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\OutputAudioEncoding::class);
php
{ "resource": "" }
q15450
OutputAudioConfig.setSynthesizeSpeechConfig
train
public function setSynthesizeSpeechConfig($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SynthesizeSpeechConfig::class);
php
{ "resource": "" }
q15451
TextClassificationDatasetMetadata.setClassificationType
train
public function setClassificationType($var) { GPBUtil::checkEnum($var, \Google\Cloud\AutoMl\V1beta1\ClassificationType::class);
php
{ "resource": "" }
q15452
TextProperty.setDetectedLanguages
train
public function setDetectedLanguages($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15453
TextProperty.setDetectedBreak
train
public function setDetectedBreak($var) { GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\TextAnnotation_DetectedBreak::class);
php
{ "resource": "" }
q15454
AnnotateImageResponse.setLandmarkAnnotations
train
public function setLandmarkAnnotations($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15455
AnnotateImageResponse.setLogoAnnotations
train
public function setLogoAnnotations($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15456
AnnotateImageResponse.setLabelAnnotations
train
public function setLabelAnnotations($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15457
AnnotateImageResponse.setLocalizedObjectAnnotations
train
public function setLocalizedObjectAnnotations($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15458
AnnotateImageResponse.setSafeSearchAnnotation
train
public function setSafeSearchAnnotation($var) { GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\SafeSearchAnnotation::class);
php
{ "resource": "" }
q15459
AnnotateImageResponse.setImagePropertiesAnnotation
train
public function setImagePropertiesAnnotation($var) { GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageProperties::class);
php
{ "resource": "" }
q15460
AnnotateImageResponse.setCropHintsAnnotation
train
public function setCropHintsAnnotation($var) { GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\CropHintsAnnotation::class);
php
{ "resource": "" }
q15461
AnnotateImageResponse.setWebDetection
train
public function setWebDetection($var) { GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\WebDetection::class);
php
{ "resource": "" }
q15462
AnnotateImageResponse.setProductSearchResults
train
public function setProductSearchResults($var) { GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ProductSearchResults::class);
php
{ "resource": "" }
q15463
AnnotateImageResponse.setContext
train
public function setContext($var) { GPBUtil::checkMessage($var, \Google\Cloud\Vision\V1\ImageAnnotationContext::class);
php
{ "resource": "" }
q15464
DatastoreSessionHandler.open
train
public function open($savePath, $sessionName) { $this->kind = $sessionName; if (preg_match(self::NAMESPACE_ALLOWED_PATTERN, $savePath) !== 1 || preg_match(self::NAMESPACE_RESERVED_PATTERN, $savePath) === 1) { throw new InvalidArgumentException( sprintf('The
php
{ "resource": "" }
q15465
DatastoreSessionHandler.read
train
public function read($id) { try { $key = $this->datastore->key( $this->kind, $id, ['namespaceId' => $this->namespaceId] ); $entity = $this->transaction->lookup($key);
php
{ "resource": "" }
q15466
DatastoreSessionHandler.write
train
public function write($id, $data) { try { $key = $this->datastore->key( $this->kind, $id, ['namespaceId' => $this->namespaceId] ); $entity = $this->datastore->entity( $key, [ 'data' => $data, 't' => time() ], $this->options['entityOptions']
php
{ "resource": "" }
q15467
DatastoreSessionHandler.destroy
train
public function destroy($id) { try { $key = $this->datastore->key( $this->kind, $id, ['namespaceId' => $this->namespaceId] ); $this->transaction->delete($key); $this->transaction->commit(); } catch (Exception $e) {
php
{ "resource": "" }
q15468
DatastoreSessionHandler.gc
train
public function gc($maxlifetime) { if ($this->gcLimit === 0) { return true; } try { $query = $this->datastore->query() ->kind($this->kind) ->filter('t', '<', time() - $maxlifetime) ->order('t') ->keysOnly() ->limit($this->gcLimit); $result = $this->datastore->runQuery( $query, ['namespaceId' => $this->namespaceId] ); $keys = []; /* @var Entity $e */ foreach ($result as $e) { $keys[] = $e->key(); } if (!empty($keys)) {
php
{ "resource": "" }
q15469
BoundingPoly.setVertices
train
public function setVertices($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15470
BoundingPoly.setNormalizedVertices
train
public function setNormalizedVertices($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15471
FaceAnnotation.setLandmarks
train
public function setLandmarks($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15472
FaceAnnotation.setJoyLikelihood
train
public function setJoyLikelihood($var) { GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class);
php
{ "resource": "" }
q15473
FaceAnnotation.setSorrowLikelihood
train
public function setSorrowLikelihood($var) { GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class);
php
{ "resource": "" }
q15474
FaceAnnotation.setAngerLikelihood
train
public function setAngerLikelihood($var) { GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class);
php
{ "resource": "" }
q15475
FaceAnnotation.setSurpriseLikelihood
train
public function setSurpriseLikelihood($var) { GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class);
php
{ "resource": "" }
q15476
FaceAnnotation.setUnderExposedLikelihood
train
public function setUnderExposedLikelihood($var) { GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class);
php
{ "resource": "" }
q15477
FaceAnnotation.setBlurredLikelihood
train
public function setBlurredLikelihood($var) { GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class);
php
{ "resource": "" }
q15478
FaceAnnotation.setHeadwearLikelihood
train
public function setHeadwearLikelihood($var) { GPBUtil::checkEnum($var, \Google\Cloud\Vision\V1\Likelihood::class);
php
{ "resource": "" }
q15479
BatchGetAssetsHistoryResponse.setAssets
train
public function setAssets($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15480
Result.rows
train
public function rows($format = self::RETURN_ASSOCIATIVE) { $bufferedResults = []; $call = $this->call; $generator = null; $shouldRetry = false; $backoff = new ExponentialBackoff($this->retries, function ($ex) { if ($ex instanceof ServiceException) { return $ex->getCode() === Grpc\STATUS_UNAVAILABLE; } return false; }); $valid = $backoff->execute(function () use ($call, &$generator) { $generator = $call(); return $generator->valid(); }); while ($valid) { try { $result = $generator->current(); $bufferedResults[] = $result; $this->setResultData($result, $format); $empty = false; if (!isset($result['values']) || $this->columnCount === 0) { $empty = true; } $hasResumeToken = $this->isSetAndTrue($result, 'resumeToken'); if ($hasResumeToken || count($bufferedResults) >= self::BUFFER_RESULT_LIMIT) { $chunkedResult = null; if (!$empty) { list($yieldableRows, $chunkedResult) = $this->parseRowsFromBufferedResults($bufferedResults); foreach ($yieldableRows as $row) { yield $this->mapper->decodeValues($this->columns, $row, $format); } } // Now that we've yielded all available rows, flush the buffer. $bufferedResults = []; $shouldRetry = $hasResumeToken; // If the last item in the buffer had a chunked value let's // hold on to it so we can stitch it together into a yieldable
php
{ "resource": "" }
q15481
Result.mergeValues
train
private function mergeValues(array $set1, array $set2) { // `$set2` may be empty if an array value is chunked at the end of the // list. Handling it normally results in an additional `null` value // being pushed onto the list of values. Since this method is only // called in cases where two chunks must be merged, we can safely // short-circuit the operation of the second chunk is empty. if (empty($set2)) { return $set1; } $lastItemSet1 = array_pop($set1); $firstItemSet2 = array_shift($set2); $item = $firstItemSet2;
php
{ "resource": "" }
q15482
AliasContext.setKind
train
public function setKind($var) { GPBUtil::checkEnum($var, \Google\Cloud\DevTools\Source\V1\AliasContext_Kind::class);
php
{ "resource": "" }
q15483
EntityType.setKind
train
public function setKind($var) { GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\EntityType_Kind::class);
php
{ "resource": "" }
q15484
EntityType.setAutoExpansionMode
train
public function setAutoExpansionMode($var) { GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\EntityType_AutoExpansionMode::class);
php
{ "resource": "" }
q15485
ListInstanceConfigsResponse.setInstanceConfigs
train
public function setInstanceConfigs($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15486
ListExclusionsResponse.setExclusions
train
public function setExclusions($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15487
ReceivedMessage.setMessage
train
public function setMessage($var) { GPBUtil::checkMessage($var, \Google\Cloud\PubSub\V1\PubsubMessage::class);
php
{ "resource": "" }
q15488
ImportProductSetsResponse.setReferenceImages
train
public function setReferenceImages($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15489
InspectJobConfig.setStorageConfig
train
public function setStorageConfig($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\StorageConfig::class);
php
{ "resource": "" }
q15490
InspectJobConfig.setInspectConfig
train
public function setInspectConfig($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\InspectConfig::class);
php
{ "resource": "" }
q15491
InspectJobConfig.setActions
train
public function setActions($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE,
php
{ "resource": "" }
q15492
BatchRunner.registerJob
train
public function registerJob($identifier, $func, array $options = []) { if ($func instanceof \Closure) { throw new \InvalidArgumentException('Closure is not allowed'); } // Always work on the latest data $result = $this->configStorage->lock(); if ($result === false) { return false; } $this->config = $this->configStorage->load(); $this->config->registerJob( $identifier, function ($id) use ($identifier, $func, $options) {
php
{ "resource": "" }
q15493
BatchRunner.submitItem
train
public function submitItem($identifier, $item) { $job = $this->getJobFromId($identifier); if ($job === null) { throw new \RuntimeException( "The identifier does not exist: $identifier"
php
{ "resource": "" }
q15494
BatchRunner.loadConfig
train
public function loadConfig() { $result = $this->configStorage->lock(); if ($result === false) { throw new \RuntimeException('Failed to lock the configStorage'); } try { $result = $this->configStorage->load(); } catch (\RuntimeException $e)
php
{ "resource": "" }
q15495
SpeechHelpersTrait.createAudioStreamFromResource
train
public function createAudioStreamFromResource($resource, $chunkSize = 32000) { while (!feof($resource)) { $chunk = fread($resource, $chunkSize);
php
{ "resource": "" }
q15496
ImageRedactionConfig.setInfoType
train
public function setInfoType($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\InfoType::class);
php
{ "resource": "" }
q15497
ImageRedactionConfig.setRedactionColor
train
public function setRedactionColor($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\Color::class);
php
{ "resource": "" }
q15498
Debuggee.register
train
public function register(array $options = []) { $resp = $this->connection->registerDebuggee(['debuggee' => $this->info()] + $options); if (array_key_exists('debuggee', $resp)) {
php
{ "resource": "" }
q15499
Debuggee.breakpointsWithWaitToken
train
public function breakpointsWithWaitToken(array $options = []) { $ret = $this->connection->listBreakpoints(['debuggeeId' => $this->id] + $options); if (array_key_exists('breakpoints', $ret)) { $ret['breakpoints'] = array_map(function ($breakpointData) { return
php
{ "resource": "" }