Your IP : 3.145.37.153


Current Path : /home/bitrix/initial_sites/coffe.land_1/bitrix/modules/main/lib/mail/smtp/
Upload File :
Current File : /home/bitrix/initial_sites/coffe.land_1/bitrix/modules/main/lib/mail/smtp/config.php

<?php

namespace Bitrix\Main\Mail\Smtp;

class Config
{

	protected $from, $host, $port, $login, $password;

	public function __construct(array $params = null)
	{
		if (!empty($params) && is_array($params))
		{
			foreach ($params as $name => $value)
			{
				$setter = sprintf('set%s', $name);
				if (is_callable(array($this, $setter)))
					$this->$setter($value);
			}
		}
	}

	public function setFrom($from)
	{
		$this->from = $from;
		return $this;
	}

	public function setHost($host)
	{
		$this->host = $host;
		return $this;
	}

	public function setPort($port)
	{
		$this->port = (int) $port;
		return $this;
	}

	public function setLogin($login)
	{
		$this->login = $login;
		return $this;
	}

	public function setPassword($password)
	{
		$this->password = $password;
		return $this;
	}

	public function getFrom()
	{
		return $this->from;
	}

	public function getHost()
	{
		return $this->host;
	}

	public function getPort()
	{
		return $this->port;
	}

	public function getLogin()
	{
		return $this->login;
	}

	public function getPassword()
	{
		return $this->password;
	}

}