class City
{
private $name;
private $people = [];
public function setName($vaule)
{
$this->name = $vaule;
}
public function getName()
{
return $this->name;
}
public function addPerson($person)
{
$this->people = $person;
}
public function getPeople()
{
$result = [];
foreach ($this->people as $person) {
$result[] = $person->getName();
}
return $result;
}
}
class Person
{
private $name;
public function setName($vaule)
{
$this->name = $vaule;
}
public function getName()
{
return $this->name;
}
}
$person = new Person();
$person->setName('Misha');
$person2 = new Person();
$person2->setName('Misha2');
$person3 = new Person();
$person3->setName('Misha3');
$Moscow = new City();
$Moscow->setName('Moscow');
echo $Moscow->getName() . '<br>';
$Moscow->addPerson([$person, $person2, $person3]);
print_r($Moscow->getPeople());
$res = CCrmCompany::GetList(['DATE_MODIFY' => 'DESC'], [['LOGIC' => 'OR', 'ASSIGNED_BY' => 1526, 'UF_CRM_1444399075' => 1526]], ['ASSIGNED_BY', 'UF_CRM_1444399075', 'ID'], 5);
$("#FormControlSelectSize").append(`<option>${$("input").val()}</option>`);