My Project
総合概要
名前空間
クラス
ファイル
ファイル一覧
src
Shared
Foundation
ValueObject
StringValue.php
[詳解]
1
<?php
2
declare(strict_types=1);
3
4
namespace
Todo\Shared\Foundation\ValueObject
;
5
6
abstract
class
StringValue
7
{
13
protected
string
$value
;
14
20
abstract
public
function
__construct
(
string
$value);
21
27
public
function
__toString
(): string
28
{
29
return
(
string
)
$this->value
;
30
}
31
38
abstract
protected
function
validate
(
string
$value): void;
39
45
public
function
isEmpty
(): bool
46
{
47
return
mb_strlen($this->value) === 0;
48
}
49
}
Todo\Shared\Foundation\ValueObject
Definition:
Identifier.php:4
Todo\Shared\Foundation\ValueObject\StringValue\isEmpty
isEmpty()
Definition:
StringValue.php:45
Todo\Shared\Foundation\ValueObject\StringValue\__toString
__toString()
Definition:
StringValue.php:27
Todo\Shared\Foundation\ValueObject\StringValue\$value
string $value
Definition:
StringValue.php:13
Todo\Shared\Foundation\ValueObject\StringValue\__construct
__construct(string $value)
Todo\Shared\Foundation\ValueObject\StringValue\validate
validate(string $value)
Todo\Shared\Foundation\ValueObject\StringValue
Definition:
StringValue.php:6
構築:
1.8.11