_id stringlengths 2 7 | title stringlengths 3 151 | partition stringclasses 3
values | text stringlengths 33 8k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q14800 | WP_CLI.do_hook | train | public static function do_hook( $when ) {
$args = func_num_args() > 1
? array_slice( func_get_args(), 1 )
: array();
self::$hooks_passed[ $when ] = $args;
if ( ! isset( self::$hooks[ $when ] ) ) {
return;
}
self::debug(
sprintf(
'Processing hook "%s" with %d callbacks',
$when,
count( self::$hooks[ $when ] )
),
'hooks' | php | {
"resource": ""
} |
q14801 | WP_CLI.add_wp_hook | train | public static function add_wp_hook( $tag, $function_to_add, $priority = 10, $accepted_args = 1 ) {
global $wp_filter, $merged_filters;
if ( function_exists( 'add_filter' ) ) {
add_filter( $tag, $function_to_add, $priority, $accepted_args );
} else {
$idx = self::wp_hook_build_unique_id( $tag, $function_to_add, $priority );
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited -- This is intentional & | php | {
"resource": ""
} |
q14802 | WP_CLI.defer_command_addition | train | private static function defer_command_addition( $name, $parent, $callable, $args = array() ) {
$args['is_deferred'] = true;
self::$deferred_additions[ $name ] = array(
'parent' => $parent,
'callable' => $callable,
'args' => $args,
);
self::add_hook(
"after_add_command:$parent",
function () use ( $name ) {
$deferred_additions = WP_CLI::get_deferred_additions();
if ( ! array_key_exists( $name, $deferred_additions ) ) {
| php | {
"resource": ""
} |
q14803 | WP_CLI.remove_deferred_addition | train | public static function remove_deferred_addition( $name ) {
if ( ! array_key_exists( $name, self::$deferred_additions ) ) {
self::warning( "Trying to | php | {
"resource": ""
} |
q14804 | WP_CLI.error_multi_line | train | public static function error_multi_line( $message_lines ) {
if ( ! isset( self::get_runner()->assoc_args['completions'] ) && is_array( $message_lines ) ) {
| php | {
"resource": ""
} |
q14805 | WP_CLI.confirm | train | public static function confirm( $question, $assoc_args = array() ) {
if ( ! \WP_CLI\Utils\get_flag_value( $assoc_args, 'yes' ) ) {
fwrite( STDOUT, $question . ' [y/n] ' );
| php | {
"resource": ""
} |
q14806 | WP_CLI.get_value_from_arg_or_stdin | train | public static function get_value_from_arg_or_stdin( $args, $index ) {
if ( isset( $args[ $index ] ) ) {
$raw_value = $args[ $index ];
} else {
// We don't use file_get_contents() here because it doesn't handle
// Ctrl-D properly, when typing in the value interactively. | php | {
"resource": ""
} |
q14807 | WP_CLI.read_value | train | public static function read_value( $raw_value, $assoc_args = array() ) {
if ( \WP_CLI\Utils\get_flag_value( $assoc_args, 'format' ) === 'json' ) {
$value = json_decode( $raw_value, true );
if ( null === | php | {
"resource": ""
} |
q14808 | WP_CLI.print_value | train | public static function print_value( $value, $assoc_args = array() ) {
if ( \WP_CLI\Utils\get_flag_value( $assoc_args, 'format' ) === 'json' ) {
$value = json_encode( $value );
} elseif ( \WP_CLI\Utils\get_flag_value( $assoc_args, 'format' ) === 'yaml' ) {
$value | php | {
"resource": ""
} |
q14809 | WP_CLI.error_to_string | train | public static function error_to_string( $errors ) {
if ( is_string( $errors ) ) {
return $errors;
}
// Only json_encode() the data when it needs it
$render_data = function( $data ) {
if ( is_array( $data ) || is_object( $data ) ) {
return json_encode( $data );
}
return '"' . $data . '"';
};
if ( is_object( $errors ) | php | {
"resource": ""
} |
q14810 | WP_CLI.launch_self | train | public static function launch_self( $command, $args = array(), $assoc_args = array(), $exit_on_error = true, $return_detailed = false, $runtime_args = array() ) {
$reused_runtime_args = array(
'path',
'url',
'user',
'allow-root',
);
foreach ( $reused_runtime_args as $key ) {
if ( isset( $runtime_args[ $key ] ) ) {
$assoc_args[ $key ] = $runtime_args[ $key ];
continue;
}
$value = self::get_runner()->config[ $key ];
if ( $value ) {
| php | {
"resource": ""
} |
q14811 | WP_CLI.get_config | train | public static function get_config( $key = null ) {
if ( null === $key ) {
return self::get_runner()->config;
}
| php | {
"resource": ""
} |
q14812 | SynopsisParser.render | train | public static function render( &$synopsis ) {
if ( ! is_array( $synopsis ) ) {
return '';
}
$bits = [
'positional' => '',
'assoc' => '',
'generic' => '',
'flag' => '',
];
$reordered_synopsis = [
'positional' => [],
'assoc' => [],
'generic' => [],
'flag' => [],
];
foreach ( $bits as $key => &$value ) {
foreach ( $synopsis as $arg ) {
if ( empty( $arg['type'] )
|| $key !== $arg['type'] ) {
continue;
}
if ( empty( $arg['name'] ) && 'generic' !== $arg['type'] ) {
continue;
}
if ( 'positional' === $key ) {
$rendered_arg = "<{$arg['name']}>";
$reordered_synopsis['positional'] [] = $arg;
} elseif ( 'assoc' === $key ) {
$arg_value = isset( $arg['value']['name'] ) ? $arg['value']['name'] : $arg['name'];
$rendered_arg = "--{$arg['name']}=<{$arg_value}>";
$reordered_synopsis['assoc'] [] = $arg;
} elseif ( 'generic' === $key ) {
$rendered_arg = '--<field>=<value>';
| php | {
"resource": ""
} |
q14813 | SynopsisParser.classify_token | train | private static function classify_token( $token ) {
$param = array();
list( $param['optional'], $token ) = self::is_optional( $token );
list( $param['repeating'], $token ) = self::is_repeating( $token );
$p_name = '([a-z-_0-9]+)';
$p_value = '([a-zA-Z-_|,0-9]+)';
if ( '--<field>=<value>' === $token ) {
$param['type'] = 'generic';
} elseif ( preg_match( "/^<($p_value)>$/", $token, $matches ) ) {
$param['type'] = 'positional';
$param['name'] = $matches[1];
} elseif ( preg_match( "/^--(?:\\[no-\\])?$p_name/", $token, $matches ) ) {
$param['name'] = $matches[1];
$value = substr( $token, strlen( $matches[0] ) );
// substr returns false <= PHP 5.6, and '' PHP 7+
if ( false === $value || '' === $value ) {
$param['type'] = 'flag';
} else | php | {
"resource": ""
} |
q14814 | SynopsisParser.is_optional | train | private static function is_optional( $token ) {
if ( '[' === substr( $token, 0, 1 ) && | php | {
"resource": ""
} |
q14815 | StatusMessage.setRefersTo | train | public function setRefersTo($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Debugger\V2\StatusMessage_Reference::class);
| php | {
"resource": ""
} |
q14816 | StatusMessage.setDescription | train | public function setDescription($var)
{
GPBUtil::checkMessage($var, | php | {
"resource": ""
} |
q14817 | ExportAssetsRequest.setContentType | train | public function setContentType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Asset\V1\ContentType::class);
| php | {
"resource": ""
} |
q14818 | ListDataSourcesResponse.setDataSources | train | public function setDataSources($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14819 | TimeSeries.setPoints | train | public function setPoints($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14820 | Date.createFromValues | train | public static function createFromValues($year, $month, $day)
{
$value = sprintf('%s-%s-%s', $year, $month, $day);
| php | {
"resource": ""
} |
q14821 | BatchJob.flush | train | public function flush(array $items = [])
{
if (! $this->callFunc($items)) { | php | {
"resource": ""
} |
q14822 | CreateIndexRequest.setIndex | train | public function setIndex($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index::class);
| php | {
"resource": ""
} |
q14823 | InstanceAdminGrpcClient.GetInstance | train | public function GetInstance(\Google\Cloud\Spanner\Admin\Instance\V1\GetInstanceRequest $argument,
$metadata = [], $options = []) {
return $this->_simpleRequest('/google.spanner.admin.instance.v1.InstanceAdmin/GetInstance',
| php | {
"resource": ""
} |
q14824 | InstanceAdminGrpcClient.DeleteInstance | train | public function DeleteInstance(\Google\Cloud\Spanner\Admin\Instance\V1\DeleteInstanceRequest $argument,
$metadata = [], $options = []) {
| php | {
"resource": ""
} |
q14825 | DatastoreKey.setEntityKey | train | public function setEntityKey($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\Key::class);
| php | {
"resource": ""
} |
q14826 | WorkflowMetadata.setCreateCluster | train | public function setCreateCluster($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\ClusterOperation::class);
| php | {
"resource": ""
} |
q14827 | WorkflowMetadata.setGraph | train | public function setGraph($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\WorkflowGraph::class);
| php | {
"resource": ""
} |
q14828 | WorkflowMetadata.setParameters | train | public function setParameters($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, | php | {
"resource": ""
} |
q14829 | CommitRequest.setWrites | train | public function setWrites($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14830 | ListTopicSubscriptionsResponse.setSubscriptions | train | public function setSubscriptions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
| php | {
"resource": ""
} |
q14831 | UpdateDocumentRequest.setMask | train | public function setMask($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class);
| php | {
"resource": ""
} |
q14832 | UpdateDocumentRequest.setCurrentDocument | train | public function setCurrentDocument($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class);
| php | {
"resource": ""
} |
q14833 | Entity.setMetadata | train | public function setMetadata($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, | php | {
"resource": ""
} |
q14834 | Entity.setMentions | train | public function setMentions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14835 | WriteLogEntriesPartialErrors.setLogEntryErrors | train | public function setLogEntryErrors($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, | php | {
"resource": ""
} |
q14836 | DeidentifyContentResponse.setItem | train | public function setItem($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\ContentItem::class);
| php | {
"resource": ""
} |
q14837 | DeidentifyContentResponse.setOverview | train | public function setOverview($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\TransformationOverview::class);
| php | {
"resource": ""
} |
q14838 | IntentBatch.setIntents | train | public function setIntents($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14839 | CreateDeviceRegistryRequest.setDeviceRegistry | train | public function setDeviceRegistry($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Iot\V1\DeviceRegistry::class);
| php | {
"resource": ""
} |
q14840 | CloudWorkspaceId.setRepoId | train | public function setRepoId($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\DevTools\Source\V1\RepoId::class);
| php | {
"resource": ""
} |
q14841 | Breakpoint.setAction | train | public function setAction($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Debugger\V2\Breakpoint_Action::class);
| php | {
"resource": ""
} |
q14842 | Breakpoint.setLocation | train | public function setLocation($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Debugger\V2\SourceLocation::class);
| php | {
"resource": ""
} |
q14843 | Breakpoint.setExpressions | train | public function setExpressions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
| php | {
"resource": ""
} |
q14844 | Breakpoint.setLogLevel | train | public function setLogLevel($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Debugger\V2\Breakpoint_LogLevel::class);
| php | {
"resource": ""
} |
q14845 | Breakpoint.setEvaluatedExpressions | train | public function setEvaluatedExpressions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14846 | Breakpoint.setVariableTable | train | public function setVariableTable($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14847 | Breakpoint.setLabels | train | public function setLabels($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, | php | {
"resource": ""
} |
q14848 | Finding.setState | train | public function setState($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\SecurityCenter\V1\Finding_State::class); | php | {
"resource": ""
} |
q14849 | Finding.setSourceProperties | train | public function setSourceProperties($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, | php | {
"resource": ""
} |
q14850 | Finding.setSecurityMarks | train | public function setSecurityMarks($var)
{
GPBUtil::checkMessage($var, | php | {
"resource": ""
} |
q14851 | MatchingFileIterator.accept | train | public function accept()
{
$candidate = $this->getInnerIterator()->current();
// Check that the candidate file (a full file path) ends in the pattern we are searching for.
| php | {
"resource": ""
} |
q14852 | CreateGroupRequest.setGroup | train | public function setGroup($var)
{
GPBUtil::checkMessage($var, | php | {
"resource": ""
} |
q14853 | ContentLocation.setRecordLocation | train | public function setRecordLocation($var)
{
GPBUtil::checkMessage($var, | php | {
"resource": ""
} |
q14854 | ContentLocation.setImageLocation | train | public function setImageLocation($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\ImageLocation::class);
| php | {
"resource": ""
} |
q14855 | ContentLocation.setDocumentLocation | train | public function setDocumentLocation($var)
{
GPBUtil::checkMessage($var, | php | {
"resource": ""
} |
q14856 | SysvProcessor.submit | train | public function submit($item, $idNum)
{
if (!array_key_exists($idNum, $this->sysvQs)) {
$this->sysvQs[$idNum] =
msg_get_queue($this->getSysvKey($idNum));
}
$result = @msg_send(
$this->sysvQs[$idNum],
self::$typeDirect,
$item
);
if ($result === false) {
// Try to put the content in a temp file and send the filename.
$tempFile = tempnam(sys_get_temp_dir(), 'Item');
| php | {
"resource": ""
} |
q14857 | ClusterUpdate.setDesiredAddonsConfig | train | public function setDesiredAddonsConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\AddonsConfig::class);
| php | {
"resource": ""
} |
q14858 | ClusterUpdate.setDesiredNodePoolAutoscaling | train | public function setDesiredNodePoolAutoscaling($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\NodePoolAutoscaling::class);
| php | {
"resource": ""
} |
q14859 | ClusterUpdate.setDesiredMasterAuthorizedNetworksConfig | train | public function setDesiredMasterAuthorizedNetworksConfig($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\MasterAuthorizedNetworksConfig::class); | php | {
"resource": ""
} |
q14860 | StreamingRecognitionResult.setMessageType | train | public function setMessageType($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\StreamingRecognitionResult_MessageType::class); | php | {
"resource": ""
} |
q14861 | AnnotationPayload.setTranslation | train | public function setTranslation($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1beta1\TranslationAnnotation::class);
| php | {
"resource": ""
} |
q14862 | AnnotationPayload.setClassification | train | public function setClassification($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1beta1\ClassificationAnnotation::class);
| php | {
"resource": ""
} |
q14863 | DeltaPresenceEstimationConfig.setAuxiliaryTables | train | public function setAuxiliaryTables($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14864 | ListDeviceRegistriesResponse.setDeviceRegistries | train | public function setDeviceRegistries($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14865 | InstantiateInlineWorkflowTemplateRequest.setTemplate | train | public function setTemplate($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dataproc\V1beta2\WorkflowTemplate::class); | php | {
"resource": ""
} |
q14866 | TranslationAnnotation.setTranslatedContent | train | public function setTranslatedContent($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1beta1\TextSnippet::class);
| php | {
"resource": ""
} |
q14867 | AttributeTrait.addAttributes | train | public function addAttributes(array $attributes)
{
foreach ($attributes as $key => $value) {
| php | {
"resource": ""
} |
q14868 | AttributeTrait.addAttribute | train | public function addAttribute($key, $value)
{
if (!$this->attributes) {
$this->attributes = new Attributes();
| php | {
"resource": ""
} |
q14869 | ValueMapper.encodeValuesAsSimpleType | train | public function encodeValuesAsSimpleType(array $values, $allowMixedArrayType = false)
{
$res = [];
foreach ($values as $value) {
$type = null;
$definition = null;
if (is_array($value) && (empty($value) || !$this->isAssoc($value))) {
$type = Database::TYPE_ARRAY;
| php | {
"resource": ""
} |
q14870 | ValueMapper.resolveTypeDefinition | train | private function resolveTypeDefinition($type, $key = null)
{
$definition = null;
if (is_array($type)) {
$type += [
1 => null,
2 => null
];
$definition = new ArrayType($type[1], $type[2]);
$type = Database::TYPE_ARRAY;
} elseif ($type instanceof ArrayType) {
| php | {
"resource": ""
} |
q14871 | ValueMapper.decodeValue | train | private function decodeValue($value, array $type)
{
if ($value === null || $value === '') {
return $value;
}
switch ($type['code']) {
case self::TYPE_INT64:
$value = $this->returnInt64AsObject
? new Int64($value)
: (int) $value;
break;
case self::TYPE_TIMESTAMP:
$value = $this->parseTimeString($value);
$value = new Timestamp($value[0], $value[1]);
break;
case self::TYPE_DATE:
$value = new Date(new \DateTimeImmutable($value));
break;
case self::TYPE_BYTES:
$value = new Bytes(base64_decode($value));
break;
case self::TYPE_ARRAY:
$res = [];
foreach ($value as $item) {
$res[] = $this->decodeValue($item, $type['arrayElementType']);
}
$value = $res;
break;
case self::TYPE_STRUCT:
$fields = isset($type['structType']['fields'])
? $type['structType']['fields']
: [];
$value = $this->decodeValues($fields, $value, Result::RETURN_ASSOCIATIVE);
break;
case self::TYPE_FLOAT64:
// NaN, Infinite and -Infinite are possible FLOAT64 values,
// but when the gRPC response is decoded, they are represented
// as strings. This conditional checks for a string, converts to
// an equivalent double value, or dies if something really weird
// happens.
| php | {
"resource": ""
} |
q14872 | ValueMapper.paramType | train | private function paramType(
$value,
$givenType = null,
$definition = null,
$allowMixedArrayType = false
) {
$valueType = gettype($value);
// If a definition is provided, the type is set to `array` to force
// the value to be interpreted as an array or a struct, even if null.
if ($definition !== null) {
$valueType = 'array';
}
switch ($valueType) {
case 'boolean':
$type = $this->typeObject($givenType ?: self::TYPE_BOOL);
break;
case 'integer':
$value = (string) $value;
$type = $this->typeObject($givenType ?: self::TYPE_INT64);
break;
case 'double':
$type = $this->typeObject($givenType ?: self::TYPE_FLOAT64);
switch ($value) {
case INF:
$value = 'Infinity';
break;
case -INF:
$value = '-Infinity';
break;
}
if (!is_string($value) && is_nan($value)) {
$value = 'NaN';
}
break;
case 'string':
$type = $this->typeObject($givenType ?: self::TYPE_STRING);
break;
case 'resource':
$type = $this->typeObject($givenType ?: self::TYPE_BYTES);
$value = base64_encode(stream_get_contents($value));
break;
case 'object':
list ($type, $value) = $this->objectParam($value);
break;
case 'array':
if ($givenType === Database::TYPE_STRUCT) {
if (!($definition instanceof StructType)) {
throw new \InvalidArgumentException(
'Struct parameter types must be declared explicitly, and must '.
| php | {
"resource": ""
} |
q14873 | ValueMapper.arrayParam | train | private function arrayParam($value, ArrayType $arrayType, $allowMixedArrayType = false)
{
if (!is_array($value) && $value !== null) {
throw new \InvalidArgumentException('Array value must be an array or null.');
}
$inferredTypes = [];
$res = null;
if ($value !== null) {
$res = [];
foreach ($value as $element) {
$type = $this->paramType(
$element,
$arrayType->type() === Database::TYPE_STRUCT ? $arrayType->type() : null,
$arrayType->structType()
);
$res[] = $type[0];
if (isset($type[1]['code'])) {
$inferredTypes[] = $type[1]['code'];
}
}
}
if (!$allowMixedArrayType && count(array_unique($inferredTypes)) > 1) {
throw new \InvalidArgumentException('Array values may not be of mixed type');
}
$nested = $arrayType->structType();
$arrayType = $arrayType->type();
if (!empty($value) && $arrayType && $arrayType !== $inferredTypes[0]) {
throw new \InvalidArgumentException('Array data does not | php | {
"resource": ""
} |
q14874 | ValueMapper.objectParam | train | private function objectParam($value)
{
if ($value instanceof \stdClass) {
throw new \InvalidArgumentException(
'Values of type `\stdClass` are interpreted as structs and must define their types.'
);
}
if ($value instanceof ValueInterface) {
return [
$this->typeObject($value->type()),
$value->formatAsString()
];
}
if ($value instanceof Int64) {
return [
| php | {
"resource": ""
} |
q14875 | ValueMapper.getColumnName | train | private function getColumnName($columns, $index)
{
return (isset($columns[$index]['name']) && $columns[$index]['name'])
| php | {
"resource": ""
} |
q14876 | GcRule.setIntersection | train | public function setIntersection($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\GcRule_Intersection::class); | php | {
"resource": ""
} |
q14877 | GcRule.setUnion | train | public function setUnion($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\GcRule_Union::class); | php | {
"resource": ""
} |
q14878 | SpeechClient.recognize | train | public function recognize($audio, array $options = [])
{
$results = [];
$response = $this->connection->recognize(
$this->formatRequest($audio, $options)
);
if (!isset($response['results'])) {
return $results; | php | {
"resource": ""
} |
q14879 | SpeechClient.beginRecognizeOperation | train | public function beginRecognizeOperation($audio, array $options = [])
{
$response = $this->connection->longRunningRecognize(
$this->formatRequest($audio, $options)
);
return new Operation(
| php | {
"resource": ""
} |
q14880 | PlanNode.setChildLinks | train | public function setChildLinks($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14881 | Dataset.exists | train | public function exists()
{
try {
$this->connection->getDataset($this->identity + ['fields' => 'datasetReference']);
| php | {
"resource": ""
} |
q14882 | Dataset.tables | train | public function tables(array $options = [])
{
$resultLimit = $this->pluck('resultLimit', $options, false);
return new ItemIterator(
new PageIterator(
function (array $table) {
return new Table(
$this->connection,
$table['tableReference']['tableId'],
| php | {
"resource": ""
} |
q14883 | Dataset.reload | train | public function reload(array $options = [])
{
| php | {
"resource": ""
} |
q14884 | RecordLocation.setRecordKey | train | public function setRecordKey($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\RecordKey::class);
| php | {
"resource": ""
} |
q14885 | RecordLocation.setFieldId | train | public function setFieldId($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\FieldId::class);
| php | {
"resource": ""
} |
q14886 | RecordLocation.setTableLocation | train | public function setTableLocation($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\TableLocation::class);
| php | {
"resource": ""
} |
q14887 | Field.setType | train | public function setType($var)
{
GPBUtil::checkMessage($var, | php | {
"resource": ""
} |
q14888 | BatchClient.snapshot | train | public function snapshot(array $options = [])
{
$options += [
'transactionOptions' => [],
];
// Single Use transactions are not supported in batch mode.
$options['transactionOptions']['singleUse'] = false;
$transactionOptions = $this->pluck('transactionOptions', $options);
$transactionOptions['returnReadTimestamp'] = true;
$transactionOptions = $this->configureSnapshotOptions($transactionOptions);
$session = $this->operation->createSession(
| php | {
"resource": ""
} |
q14889 | VideoAnnotationResults.setFrameLabelAnnotations | train | public function setFrameLabelAnnotations($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14890 | VideoAnnotationResults.setFaceAnnotations | train | public function setFaceAnnotations($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14891 | VideoAnnotationResults.setShotAnnotations | train | public function setShotAnnotations($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14892 | VideoAnnotationResults.setExplicitAnnotation | train | public function setExplicitAnnotation($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1\ExplicitContentAnnotation::class); | php | {
"resource": ""
} |
q14893 | VideoAnnotationResults.setSpeechTranscriptions | train | public function setSpeechTranscriptions($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14894 | VideoAnnotationResults.setTextAnnotations | train | public function setTextAnnotations($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14895 | VideoAnnotationResults.setObjectAnnotations | train | public function setObjectAnnotations($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14896 | ExplicitContentFrame.setPornographyLikelihood | train | public function setPornographyLikelihood($var)
{
GPBUtil::checkEnum($var, \Google\Cloud\VideoIntelligence\V1\Likelihood::class); | php | {
"resource": ""
} |
q14897 | CreateTableFromSnapshotMetadata.setOriginalRequest | train | public function setOriginalRequest($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest::class);
| php | {
"resource": ""
} |
q14898 | QueryResult.setFulfillmentMessages | train | public function setFulfillmentMessages($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, | php | {
"resource": ""
} |
q14899 | QueryResult.setSentimentAnalysisResult | train | public function setSentimentAnalysisResult($var)
{
GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\SentimentAnalysisResult::class); | php | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.