CreateTag
in package
Use case for creating a new tag.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor.
- execute() : Tag
- Execute the create tag use case.
- executeWithResult() : Tag, error: ?string}
- Execute and return result.
Properties
$repository
private
TagRepositoryInterface
$repository
Methods
__construct()
Constructor.
public
__construct(TagRepositoryInterface $repository) : mixed
Parameters
- $repository : TagRepositoryInterface
-
Tag repository
execute()
Execute the create tag use case.
public
execute(string $text[, string $comment = '' ]) : Tag
Parameters
- $text : string
-
Tag text (max 20 chars, no spaces/commas)
- $comment : string = ''
-
Tag comment (max 200 chars)
Tags
Return values
Tag —The created tag entity
executeWithResult()
Execute and return result.
public
executeWithResult(string $text[, string $comment = '' ]) : Tag, error: ?string}
Parameters
- $text : string
-
Tag text
- $comment : string = ''
-
Tag comment
Return values
Tag, error: ?string} —Result