Set the InlineChoice objects composing the interaction.

@param \qtism\data\content\interactions\InlineChoiceCollection $content A collection of at least one InlineChoice object.
@throws \InvalidArgumentException If $content is empty.
964388
public function setContent(InlineChoiceCollection $content)
    {
        if (count($content) > 0) {
            $this->content = $content;
        } else {
            $msg = "An InlineChoiceInteraction must be composed by at lease one InlineChoice object, none given.";
            throw new InvalidArgumentException($msg);
        }
    }
558824
public function setSimpleAssociableChoices(SimpleAssociableChoiceCollection $simpleAssociableChoices)
    {
        if (count($simpleAssociableChoices) > 0) {
            $this->simpleAssociableChoices = $simpleAssociableChoices;
        } else {
            $msg = "An AssociateInteraction object must be composed of at lease one SimpleAssociableChoice object, none given.";
            throw new InvalidArgumentException($msg);
        }
    }
584896
public function visit(vfsStreamContent $content)
    {
        switch ($content->getType()) {
            case vfsStreamContent::TYPE_FILE:
                $this->visitFile($content);
                break;

            case vfsStreamContent::TYPE_DIR:
                $this->visitDirectory($content);
                break;

            default:
                throw new InvalidArgumentException('Unknown content type');
        }

        return $this;
    }
39518
public function setContent($content)
    {
        if(strlen($content) > 9900)
        {
            throw new \InvalidArgumentException('Maximum content length is 9900 characters');
        }

        $this->content = $content;

        $this->setHash(sha1($content));

        return $this;
    }
1021508
public function setContent($content)
    {
        if (is_array($content) || $content instanceof ArrayAccess || $content instanceof JsonSerializable) {
            $this->headers->add(['Content-Type' => 'application/json; charset=utf-8']);
            $content = json_encode($content, JSON_UNESCAPED_UNICODE);
        }

        parent::setContent($content);
        parent::setCharset('utf-8');

        return $this;
    }
402637
public function modify(string $content, string $plainText = null)
    {
        $this->content = $content;
        $this->plainText = (string) $plainText;
    }
1232259
public function setOption($key, $value)
    {
        if (!in_array($key, array_keys($this->defaultOptions))) {
            throw InvalidOptionException::build([], ['option' => $key]);
        }

        $this->options[$key] = $value;
    }
954953
public function setContent( $content )
	{
		if( $this->content === (string) $content )
			return FALSE;
		$this->content = (string) $content;
		return TRUE;
	}
937782
public function createExistingFieldsInNewVersion(Content $content)
    {
        foreach ($content->fields as $field) {
            $this->createExistingFieldInNewVersion($field, $content);
        }
    }
55339
public function setContent($content)
    {
        $this->original = $content;

        // If the content is "JSONable" we will set the appropriate header and convert
        // the content to JSON. This is useful when returning something like models
        // from routes that will be automatically transformed to their JSON form.
        if ($this->shouldBeJson($content)) {
            $this->headers->set('Content-Type', 'application/json');

            $content = $this->morphToJson($content);
        }

        // If this content implements the "RenderableInterface", then we will call the
        // render method on the object so we will avoid any "__toString" exceptions
        // that might be thrown and have their errors obscured by PHP's handling.
        else if ($content instanceof RenderableInterface) {
            $content = $content->render();
        }

        return parent::setContent($content);
    }
1107288
public void setContent(Content content) {
        setSize(content.getContent().length);
        setAttachmentContentId(content.getId());
    }
1216537
public function value($options = [], $content = '')
    {
        if (!is_array($options)) {
            $options = ['value' => $options];
        }

        $this->values[] = new Option($this->form->expression('option'), $options, $content);
        return $this;
    }
870022
public function setContent(string $content = null): ResponseContextAbstract
    {
        if (is_null($content)) {
            return $this;
        }

        $this->assertIsValid($content);

        $this->content = $content;

        return $this;
    }
992808
public function setContent( $content = NULL )
	{
		if( is_object( $content ) ){
			if( !method_exists( $content, '__toString' ) ){											//  content is not a renderable object
				$message	= 'Object of class "'.get_class( $content ).'" cannot be rendered';		//  prepare message about not renderable object
				throw new InvalidArgumentException( $message ); 									//  break with error message
			}
			$content	= (string) $content;														//  render object to string
		}
		$this->content	= $content;
	}
882992
private function setPostedRelations(Entity\Content $content, $formValues)
    {
        /** @var Collection\Relations $related */
        $related = $this->em->createCollection(Entity\Relations::class);
        $related->setFromPost($formValues, $content);
        $content->setRelation($related);
    }
1124826
public function revert(AbstractClassContent $content, array $data = [])
    {
        if (0 === count($data)) {
            $data['parameters'] = array_keys($content->getAllParams());
            if ($content instanceof ContentSet) {
                $data['elements'] = true;
            } else {
                $data['elements'] = array_keys($content->getData());
            }
        }

        if (!isset($data['parameters']) && !isset($data['elements'])) {
            throw new \InvalidArgumentException('Provided data are not valids for ClassContentManager::revert.');
        }

        if (null === $draft = $this->getDraft($content)) {
            throw new InvalidArgumentException(sprintf(
                '%s with identifier "%s" has not draft, nothing to revert.',
                $content->getContentType(),
                $content->getUid()
            ));
        }

        $this->executeRevert($content, $draft, $data);
        $this->revertPostProcess($content, $draft);

        return $this;
    }
845748
public function setBody($content, $name = 'default')
    {
        if (!$content || !$name) return;
        array_push($this->bodyIndex, $name);
        $this->body[$name] = $content;
    }