Refactored project structure.
This commit is contained in:
parent
cfe93434ad
commit
c015d8c58b
|
@ -6,7 +6,7 @@ coverage:
|
|||
- "runtime"
|
||||
- "tests"
|
||||
- "vendor"
|
||||
- "src/PHPCensor/Migrations"
|
||||
- "src/PHPCensor/Languages"
|
||||
- "src/Migrations"
|
||||
- "src/Languages"
|
||||
|
||||
comment: off
|
||||
|
|
|
@ -5,7 +5,7 @@ if (!defined('ROOT_DIR')) {
|
|||
}
|
||||
|
||||
if (!defined('SRC_DIR')) {
|
||||
define('SRC_DIR', ROOT_DIR . 'src/PHPCensor/');
|
||||
define('SRC_DIR', ROOT_DIR . 'src/');
|
||||
}
|
||||
|
||||
if (!defined('PUBLIC_DIR')) {
|
||||
|
|
|
@ -36,14 +36,12 @@
|
|||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PHPCensor\\": "src/PHPCensor/",
|
||||
"b8\\": "src/B8Framework/"
|
||||
"PHPCensor\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Tests\\PHPCensor\\": "tests/PHPCensor/",
|
||||
"Tests\\b8\\": "tests/B8Framework/"
|
||||
"Tests\\PHPCensor\\": "tests/src/"
|
||||
}
|
||||
},
|
||||
"require": {
|
||||
|
|
10
phpunit.xml
10
phpunit.xml
|
@ -20,20 +20,16 @@
|
|||
<const name="POSTGRESQL_DBNAME" value="b8_test" />
|
||||
</php>
|
||||
<testsuites>
|
||||
<testsuite name="B8Framework Test Suite">
|
||||
<directory suffix="Test.php">./tests/B8Framework</directory>
|
||||
</testsuite>
|
||||
|
||||
<testsuite name="PHP Common Test Suite">
|
||||
<directory suffix="Test.php">./tests/PHPCensor</directory>
|
||||
<directory suffix="Test.php">./tests/src</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">./src</directory>
|
||||
<exclude>
|
||||
<directory suffix=".php">./src/PHPCensor/Migrations</directory>
|
||||
<directory suffix=".php">./src/PHPCensor/Languages</directory>
|
||||
<directory suffix=".php">./src/Migrations</directory>
|
||||
<directory suffix=".php">./src/Languages</directory>
|
||||
</exclude>
|
||||
</whitelist>
|
||||
</filter>
|
||||
|
|
|
@ -86,7 +86,7 @@ LOGO;
|
|||
if ($databaseSettings) {
|
||||
$phinxSettings = [
|
||||
'paths' => [
|
||||
'migrations' => ROOT_DIR . 'src/PHPCensor/Migrations',
|
||||
'migrations' => ROOT_DIR . 'src/Migrations',
|
||||
],
|
||||
'environments' => [
|
||||
'default_migration_table' => 'migration',
|
|
@ -167,18 +167,12 @@ abstract class Element
|
|||
*/
|
||||
public function render($viewFile = null)
|
||||
{
|
||||
$viewPath = SRC_DIR . 'View/';
|
||||
|
||||
if (is_null($viewFile)) {
|
||||
$class = explode('\\', get_called_class());
|
||||
$viewFile = end($class);
|
||||
}
|
||||
|
||||
if (file_exists($viewPath . 'Form/' . $viewFile . '.phtml')) {
|
||||
$view = new View('Form/' . $viewFile);
|
||||
} else {
|
||||
$view = new View($viewFile, SRC_DIR . 'Form/View/');
|
||||
}
|
||||
$view = new View('Form/' . $viewFile);
|
||||
|
||||
$view->name = $this->getName();
|
||||
$view->id = $this->getId();
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue