Sets the build metadata identifiers.

@param array $identifiers The build metadata identifiers.

@return Builder The Version builder.

@throws InvalidIdentifierException If an identifier is invalid.
426113
public function setBuild(array $identifiers)
    {
        foreach ($identifiers as $identifier) {
            if (!Validator::isIdentifier($identifier)) {
                throw new InvalidIdentifierException($identifier);
            }
        }

        $this->build = $identifiers;

        return $this;
    }
703331
function checkIdentifierGivenToAnyUser(array $identifiers)
    {
        $response = $this->call( new Command\Members\Exists($identifiers) );
        if ( $ex = $response->hasException() )
            throw $ex;

        $r = $response->expected();
        $r = ($r instanceof iDataEntity) ? $r->get('result') : $r;
        return $r;
    }
1007078
public function setFieldIdentifier($fieldIdentifier)
    {
        if ($fieldIdentifier == '' || Format::isIdentifier($fieldIdentifier)) {
            $this->fieldIdentifier = $fieldIdentifier;
        } else {
            $msg = "'${fieldIdentifier}' is not a valid QTI identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
48966
public function addIdentifier($identifier)
    {
        if (!isset($this->identifiers[$identifier])) {
            $this->identifiers[$identifier] = $identifier;
        }

        return $this;
    }
1215118
protected function fetchIdentifiers(array $identifiers): array
    {
        if (count($identifiers) == 1 && is_string($identifiers[0])) {
            return array_map('trim', explode(',', $identifiers[0]));
        }

        if (count($identifiers) == 1 && is_array($identifiers[0])) {
            return $identifiers[0];
        }

        return $identifiers;
    }
1306751
private function registerInitializers(array $initializers)
    {
        foreach ($initializers as $initializer) {
            if (is_string($initializer) && class_exists($initializer)) {
                $initializer = new $initializer();
                if (! ($initializer instanceof InitializerInterface)) {
                    throw InvalidArgumentException::fromInvalidInitializer($initializer);
                }
            }
            if (is_callable($initializer)) {
                $this->initializers[] = $initializer;
            } else {
                throw InvalidArgumentException::fromInvalidInitializer($initializer);
            }
        }
    }
633400
public function set($identifier, $value)
    {
        $attributes = $this->getData()->attributes;
        $attributes[$identifier] = $value;

        return $this;
    }
973895
public function set($identifier, $value)
    {
        $this->internalSet($this->configsContainer, $identifier, $value);

        return $this;
    }
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);
        }
    }
1062236
public function setIdentification($properties)
    {
        $this->reset($properties);

        if (!empty($this->model)) {
            $this->generic = false;
        }
        
        $this->identified |= Constants\Id::MATCH_UA;
    }
828462
public static function setIdentifierName(string $identifier): void
    {
        if (empty($identifier)) {
            throw new InvalidArgumentException("Identifier shouldn't be empty.");
        } elseif (\in_array($identifier, ['password'])) {
            throw new InvalidArgumentException("Identifier [{$identifier}] is not allowed!");
        }

        static::$identifier = $identifier;
    }
1251026
public function update($identifiers)
    {
        $parents = func_get_args();

        $id = array_pop($parents);

        $entity = $parents ? $this->resource->singleByParent(end($parents), $id) : $this->resource->single($id);

        if ($this->failsSecurity($entity)) {
            return $this->responseDenied();
        }

        if (!$entity || $this->failsParentMatch($parents)) {
            return $this->responseNotFound();
        }

        $input = $this->getInput();

        if ($this->failsValidation($input)) {
            return $this->responseBadInput();
        }

        $this->resource->update($id, $input);

        return $this->response(null, 204);
    }
1122683
public function create($identifiers = null)
    {
        $parents = func_get_args();

        if ($this->failsSecurity()) {
            return $this->responseDenied();
        }

        if ($this->failsParentMatch($parents)) {
            return $this->responseNotFound();
        }

        $input = $this->getInput();

        if ($this->failsValidation($input)) {
            return $this->responseBadInput();
        }

        $entity = $parents ? $this->resource->createWithParent(end($parents), $input) : $this->resource->create($input);

        return $this->response($entity, 201);
    }
708047
public function setModifiers(array $modifiers)
    {
        $modifiers = array_map('strtolower', $modifiers);

        // Validate modifiers are supported
        $allowed = $this->getSupportedModifiers();
        $unsupported = array_diff($modifiers, $allowed);
        if ($unsupported) {
            throw new InvalidArgumentException(
                static::class . ' does not accept ' . implode(', ', $unsupported) . ' as modifiers'
            );
        }

        $this->modifiers = $modifiers;
    }
1107488
public function offsetSet($identifier, $value)
    {
        $keys = $this->_parseIdentifier($identifier);

        foreach(array_reverse($keys, true) as $key) {
            $value = array($key => $value);
        }

        $this->_data = $this->_mergeArrays($this->_data, $value);
    }
1025473
public function createFromArray(array $identifiers)
    {
        foreach ($identifiers as $identifier) {
            $this->collection->add(Identifier::fromString($identifier));
        }

        return $this->collection;
    }
769146
public function addIdentifier($identifier)
    {
        $this->validateIdentifier($identifier);

        if (in_array($identifier, $this->identifiers)) {
            throw new InvalidIdentifierException('Error: Cannot add the identifier "'.$identifier.'" twice');
        }

        $this->identifiers[] = $identifier;
    }