1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00
invoiceninja/app/Constants/Domain.php

34 lines
686 B
PHP
Raw Normal View History

2017-01-30 20:40:43 +01:00
<?php
namespace App\Constants;
2017-01-12 14:12:02 +01:00
2018-03-29 10:11:00 +02:00
use App\Libraries\Utils;
2017-01-12 14:12:02 +01:00
class Domain
{
const INVOICENINJA_COM = 1;
const INVOICE_SERVICES = 2;
public static function getDomainFromId($id)
{
switch ($id) {
case static::INVOICENINJA_COM:
return 'invoiceninja.com';
case static::INVOICE_SERVICES:
return 'invoice.services';
}
return 'invoiceninja.com';
}
public static function getLinkFromId($id)
{
return 'https://app.' . static::getDomainFromId($id);
}
public static function getEmailFromId($id)
{
return 'maildelivery@' . static::getDomainFromId($id);
}
2017-01-12 14:12:02 +01:00
}