-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
<?php | ||
include ROOT_PATH . '/vendor/sifophp/sifo-common-instance/config/configuration_files.config.php'; | ||
$config['locale'] = 'instances/example/config/locale.config.php'; | ||
$config['domains'] = 'instances/example/config/domains.config.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
$config['core_inheritance'] = array( 'Sifo' ); | ||
|
||
$config['redirections'] = array( | ||
array( 'from' => 'www.sifo.local', 'to' => 'http://sifo.local' ), | ||
array( 'from' => 'www2.sifo.local', 'to' => 'http://sifo.local' ), | ||
); | ||
|
||
$config['instance_type'] = 'instantiable'; | ||
|
||
$config['sifo.local'] = array( | ||
'devel' => true, // Domain is marked as development | ||
'has_debug' => true, // Domain shows the floating debug box. | ||
'instance' => 'example', | ||
'language' => 'en_US', | ||
'language_domain' =>'messages', | ||
'lang_in_subdomain' => array( 'es' => 'es_ES', 'en' => 'en_US' ), | ||
'www_as_subdomain' => false, | ||
'static_host' => 'http://static.sifo.local', | ||
'media_host' => 'http://static.sifo.local', // Alternative static content (media). Comment to disable. | ||
'database' => array( | ||
'db_driver' => 'mysql', // To use transactions you must use mysqli driver. | ||
'db_host' => '127.0.0.1', | ||
'db_user' => 'root', | ||
'db_password' => 'root', | ||
'db_name' => 'yourdatabase', | ||
'db_init_commands' => array( 'SET NAMES utf8' ) // Commands launched before the queries. | ||
), | ||
'php_ini_sets' => array( // Empty array if you don't want any php.ini overriden. | ||
'log_errors' => 'On', | ||
'error_log' => ROOT_PATH . '/logs/errors_' . date( 'Y-m' ) . '.log', // Store a different error file per month. For the lazy rotator :) | ||
), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Sifo\Test\Sifo; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Sifo\Domains; | ||
|
||
class DomainsTest extends TestCase | ||
{ | ||
private const DOMAIN_NAME = 'sifo.local'; | ||
|
||
public function testGetInstanceFromDomainName() | ||
{ | ||
$domain = Domains::getInstanceFromDomainName(self::DOMAIN_NAME); | ||
$this->assertSame(self::DOMAIN_NAME, $domain->getDomain()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters