Set the identifier of the resource the MetadataValue describes.

@param string $resourceIdentifier An identifier.
@throws InvalidArgumentException If $resourceIdentifier is not a string or an empty string.
964221
public function setResourceIdentifier($resourceIdentifier)
    {
        if (is_string($resourceIdentifier) === false) {
            $msg = "The resourceIdentifier argument must be a string.";
            throw new InvalidArgumentException($msg);
        } elseif ($resourceIdentifier === '') {
            $msg = "The resourceIdentifier argument must be a non-empty string.";
            throw new InvalidArgumentException($msg);
        } else {
            $this->resourceIdentifier = $resourceIdentifier;
        }
    }
266007
func (s *DescribeResourceServerInput) SetIdentifier(v string) *DescribeResourceServerInput {
	s.Identifier = &v
	return s
}
119419
public function identifiersFromInput(
        $resourceDefinition,
        ContextContract $context,
        $request = null
    ) : IdentifierCollection
    {
        $resourceDefinition = ResourceDefinitionLibrary::make($resourceDefinition);

        $identifiers = $context->getInputParser()->getIdentifiers(
            $this,
            $resourceDefinition,
            $context,
            $request
        );

        if (!$identifiers) {
            throw new \InvalidArgumentException("No data found in body");
        }

        return $identifiers;
    }
1056257
public function setTemplateIdentifier($templateIdentifier)
    {
        if (Format::isIdentifier($templateIdentifier, false) === true) {
            $this->templateIdentifier = $templateIdentifier;
        } else {
            $msg = "The 'templateIdentifier' argument must be a valid QTI identifier, '" . $templateIdentifier . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
1339594
public function setSource($source)
    {
        if (Format::isIdentifier($source)) {
            $this->source = $source;
        } else {
            $msg = "'${source}' is not a valid QTI identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
1331196
public static function set($identifier, $object)
    {
        $objIdentifier = self::getIdentifier($identifier);
        $strIdentifier = (string) $objIdentifier;

        self::$_services->offsetSet($strIdentifier, $object);
    }
1368706
func (s *CreateResourceServerInput) SetIdentifier(v string) *CreateResourceServerInput {
	s.Identifier = &v
	return s
}
1278864
public function inject($identifier, $resource)
    {
        if (! $resource instanceof \core_kernel_classes_Resource) {
            throw new MetadataImportException(__('Metadata import requires an instance of core_kernel_classes_Resource to inject metadata'));
        }
        parent::inject($identifier, $resource);
    }
253805
public function setOutcomeIdentifier($outcomeIdentifier)
    {
        if (Format::isIdentifier($outcomeIdentifier)) {
            $this->outcomeIdentifier = $outcomeIdentifier;
        } else {
            $msg = "'${outcomeIdentifier}' is not a valid QTI Identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
521970
public function setIdentifier(array $identifier)
    {
        $this->identifier = $identifier;
        $this->isIdentifierComposite = (count($this->identifier) > 1);
    }
1181079
public function setIdentifier(string $identifier) : self
    {
        // Sanitize Identifier => remove space and slashes
        $this->identifier = strtr(
            ucwords(strtr(
                $identifier,
                ['_' => ' ', '/' => '-', '.' => '_ ', '\\' => '_ ']
            )),
            [' ' => '']
        );

        return $this;
    }
710395
private function setUnicodeLanguageIdentifier(?string $unicodeLanguageIdentifier): self
    {
        $this->updatePropertyValue(
            UnicodeLanguageIdentifierFieldInterface::PROP_UNICODE_LANGUAGE_IDENTIFIER,
            $unicodeLanguageIdentifier
        );

        return $this;
    }
1091259
public function remove(string $entryIdentifier): bool
    {
        if (!$this->isValidEntryIdentifier($entryIdentifier)) {
            throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233058495);
        }

        return $this->backend->remove($entryIdentifier);
    }
1046796
protected function setIdentifier(
        $field,
        $identifier,
        $default = null
    )
    {
        if ($default && $identifier === null) {
            $identifier = call_user_func($default);
        }

        if (!($identifier instanceof Identifier)) {
            throw new \InvalidArgumentException('$identifier must be instance of Identifier');
        }

        $this->{$field} = $identifier;
    }
1280061
public function claimUsedResourceIdentifier(ResourceInterface $resource) {
		if ($resource->getResource()->hasIdentification() === false) {
			throw new InputException('can not validate resource without identifier, set type and id first');
		}
		
		$resourceKey = $resource->getResource()->getIdentificationKey();
		if (isset($this->usedResourceIdentifiers[$resourceKey]) === false) {
			$this->usedResourceIdentifiers[$resourceKey] = true;
			return;
		}
		
		throw new DuplicateException('can not have multiple resources with the same identification');
	}
980163
public function setDefaultResourceMatcher($defaultResourceMatcher)
    {
        if (is_scalar($defaultResourceMatcher)) {
            $defaultResourceMatcher = 'Gobline\\Acl\\Matcher\\'.ucfirst($defaultResourceMatcher).'Matcher';
            $defaultResourceMatcher = new $defaultResourceMatcher();
        } elseif (!$resource instanceof MatcherInterface) {
            throw new \InvalidArgumentException('$defaultResourceMatcher is expected to be of type string or Gobline\Acl\Matcher\MatcherInterface');
        }

        $this->defaultResourceMatcher = $defaultResourceMatcher;
    }
1150737
public function set( $domain, $node = NULL, $resource = NULL ){
		if( !strlen( trim( $domain ) ) )
			throw new InvalidArgumentException( 'Domain is missing' );
		$this->domain	= $domain;
		$this->node		= $node;
		$this->resource	= $resource;
	}