for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Sylius\Component\Channel\Model;
use Sylius\Component\Resource\Model\TimestampableTrait;
use Sylius\Component\Resource\Model\ToggleableTrait;
class Channel implements ChannelInterface
{
use TimestampableTrait, ToggleableTrait;
/** @var mixed|null */
protected $id;
/** @var string|null */
protected $code;
protected $name;
protected $description;
protected $hostname;
protected $color;
public function __construct()
$this->createdAt = new \DateTime();
}
public function __toString(): string
return (string) $this->name;
/**
* {@inheritdoc}
public function getId()
return $this->id;
public function getCode(): ?string
return $this->code;
public function setCode(?string $code): void
$this->code = $code;
public function getName(): ?string
return $this->name;
public function setName(?string $name): void
$this->name = $name;
public function getDescription(): ?string
return $this->description;
public function setDescription(?string $description): void
$this->description = $description;
public function getHostname(): ?string
return $this->hostname;
public function setHostname(?string $hostname): void
$this->hostname = $hostname;
public function getColor(): ?string
return $this->color;
public function setColor(?string $color): void
$this->color = $color;