invoiceninja/app/Constants/Domain.php

56 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2017-01-30 21:40:43 +02:00
<?php
namespace App\Constants;
2017-01-12 15:12:02 +02:00
2018-03-29 11:11:00 +03:00
use App\Libraries\Utils;
2017-01-12 15:12:02 +02: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);
}
2019-01-30 22:00:26 +11:00
public static function getPostmarkTokenFromId($id)
{
switch($id)
{
case static::INVOICENINJA_COM:
return config('services.postmark_token');
case static::INVOICE_SERVICES:
return config('services.postmark_token_2');
}
}
public static function getSupportDomainFromId($id)
{
switch($id)
{
case static::INVOICENINJA_COM:
return config('ninja.tickets.ticket_support_domain');
case static::INVOICE_SERVICES:
return config('ninja.tickets.ticket_support_domain_2');
}
}
2017-01-12 15:12:02 +02:00
}