SC
Size: a a a
SC
SG
S
VY
VY
SG
SG
S
SG
public function __construct()$this->termOne
{
$this->termsDefinition(new TermStdClass());
}
protected function termsDefinition(TermStdClass $termStdClass)
{
$this->termOne = $termStdClass;
$this->termOne->name = 'Слагаемое 1';
$this->termTwo = $termStdClass;
$this->termTwo->name = 'Слагаемое 2';
}
```
public function __construct()
{
$this->termsDefinition(TermStdClass::class);
}
protected function termsDefinition(string $termStdClass)
{
$this->termOne = new $termStdClass;
$this->termOne->name = 'Слагаемое 1';
$this->termTwo = new $termStdClass;
$this->termTwo->name = 'Слагаемое 2';
}
YH
АО
ДК
Gt
k
VY
public function __construct()}
{
$this->name = '';
$this->isError = false;
$this->value = 0;
$this->isFloat = false;
$this->integers = [];
$this->decimals = [];
}
ЕК
ЕК
А
public function __construct()}
{
$this->name = '';
$this->isError = false;
$this->value = 0;
$this->isFloat = false;
$this->integers = [];
$this->decimals = [];
}
TermStdClass
, а если поменяете на self
, то заполнить ничего нельзя будет, т.к. заполнять сам класс нельзяЕК
public function __construct()}
{
$this->name = '';
$this->isError = false;
$this->value = 0;
$this->isFloat = false;
$this->integers = [];
$this->decimals = [];
}
ЕК