Skip to content

Commit

Permalink
Changed Autoload PSR-4
Browse files Browse the repository at this point in the history
  • Loading branch information
riculum committed May 21, 2022
1 parent 48f2fed commit 4bf7f84
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@
],
"autoload": {
"psr-4": {
"Datatables\\" : "./"
"Riculum\\Datatables\\" : "src/"
}
},
"require": {
"vlucas/phpdotenv": "^5.3",
"riculum/php-pdo": "^1.0",
"ext-pdo": "*"
},
"require-dev": {
"phpunit/phpunit": "^9"
}
}
4 changes: 3 additions & 1 deletion docs/example.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?php

use Riculum\Datatables\Datatable;

require_once __DIR__ . '/../vendor/autoload.php';

use Datatables\core\Datatable;

/**
* Load .env file
Expand Down
4 changes: 2 additions & 2 deletions core/Datatable.php → src/Datatable.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
namespace Datatables\core;
namespace Riculum\Datatables;

use Database\Core\Database as DB;
use PDO;
use Riculum\Database as DB;

class Datatable {
static function getDatatable(string $table, array $columns, array $where = []): string
Expand Down

0 comments on commit 4bf7f84

Please sign in to comment.