Skip to content

Commit

Permalink
Demo Concorde
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoulin78 committed Oct 12, 2019
1 parent 8d97721 commit 8da3823
Show file tree
Hide file tree
Showing 57 changed files with 201 additions and 213 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* Execute the SQL file ./database.sql
* Modify the file ./application/config/database.php according to your credentials
* Merise CDM: [./CDM.png](https://github.com/vmoulin78/demo-concorde-mysql/blob/master/CDM.png)
* Main files or folders about LightORM:
* Main files or folders about Artefact:
* [./application/business/models/](https://github.com/vmoulin78/demo-concorde-mysql/tree/master/application/business/models)
* [./application/business/associations/](https://github.com/vmoulin78/demo-concorde-mysql/tree/master/application/business/associations)
* [./application/config/config_lightORM.php](https://github.com/vmoulin78/demo-concorde-mysql/blob/master/application/config/config_lightORM.php)
* [./application/config/config_artefact.php](https://github.com/vmoulin78/demo-concorde-mysql/blob/master/application/config/config_artefact.php)
* [./application/controllers/Home_controller.php](https://github.com/vmoulin78/demo-concorde-mysql/blob/master/application/controllers/Home_controller.php)
* [./application/controllers/Blog_controller.php](https://github.com/vmoulin78/demo-concorde-mysql/blob/master/application/controllers/Blog_controller.php)
* [./system/helpers/lightorm_helper.php](https://github.com/vmoulin78/demo-concorde-mysql/blob/master/system/helpers/lightorm_helper.php)
* [./system/helpers/artefact_helper.php](https://github.com/vmoulin78/demo-concorde-mysql/blob/master/system/helpers/artefact_helper.php)
4 changes: 2 additions & 2 deletions application/business/associations/Article_Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

defined('BASEPATH') OR exit('No direct script access allowed');

use LightORM\Association;
use LightORM\Table_association_trait;
use Concorde\artefact\Association;
use Concorde\artefact\Table_association_trait;

class Article_Tag extends Association
{
Expand Down
4 changes: 2 additions & 2 deletions application/business/associations/Discount_Folder_Person.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

defined('BASEPATH') OR exit('No direct script access allowed');

use LightORM\Association;
use LightORM\Table_association_trait;
use Concorde\artefact\Association;
use Concorde\artefact\Table_association_trait;

class Discount_Folder_Person extends Association
{
Expand Down
4 changes: 2 additions & 2 deletions application/business/models/Article.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
defined('BASEPATH') OR exit('No direct script access allowed');

use Concorde\utils\php\Undefined;
use LightORM\Model;
use LightORM\Table_concrete_model_trait;
use Concorde\artefact\Model;
use Concorde\artefact\Table_concrete_model_trait;

class Article extends Model
{
Expand Down
2 changes: 1 addition & 1 deletion application/business/models/Author.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
defined('BASEPATH') OR exit('No direct script access allowed');

use Concorde\utils\php\Undefined;
use LightORM\Table_concrete_model_trait;
use Concorde\artefact\Table_concrete_model_trait;

class Author extends Person
{
Expand Down
4 changes: 2 additions & 2 deletions application/business/models/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
defined('BASEPATH') OR exit('No direct script access allowed');

use Concorde\utils\php\Undefined;
use LightORM\Model;
use LightORM\Table_concrete_model_trait;
use Concorde\artefact\Model;
use Concorde\artefact\Table_concrete_model_trait;

class Comment extends Model
{
Expand Down
2 changes: 1 addition & 1 deletion application/business/models/Commentator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
defined('BASEPATH') OR exit('No direct script access allowed');

use Concorde\utils\php\Undefined;
use LightORM\Table_concrete_model_trait;
use Concorde\artefact\Table_concrete_model_trait;

class Commentator extends Person
{
Expand Down
4 changes: 2 additions & 2 deletions application/business/models/Discount.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
defined('BASEPATH') OR exit('No direct script access allowed');

use Concorde\utils\php\Undefined;
use LightORM\Model;
use LightORM\Table_concrete_model_trait;
use Concorde\artefact\Model;
use Concorde\artefact\Table_concrete_model_trait;

class Discount extends Model
{
Expand Down
4 changes: 2 additions & 2 deletions application/business/models/Folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
defined('BASEPATH') OR exit('No direct script access allowed');

use Concorde\utils\php\Undefined;
use LightORM\Model;
use LightORM\Table_concrete_model_trait;
use Concorde\artefact\Model;
use Concorde\artefact\Table_concrete_model_trait;

class Folder extends Model
{
Expand Down
4 changes: 2 additions & 2 deletions application/business/models/Paragraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
defined('BASEPATH') OR exit('No direct script access allowed');

use Concorde\utils\php\Undefined;
use LightORM\Model;
use LightORM\Table_concrete_model_trait;
use Concorde\artefact\Model;
use Concorde\artefact\Table_concrete_model_trait;

class Paragraph extends Model
{
Expand Down
4 changes: 2 additions & 2 deletions application/business/models/Person.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
defined('BASEPATH') OR exit('No direct script access allowed');

use Concorde\utils\php\Undefined;
use LightORM\Model;
use LightORM\Table_abstract_model_trait;
use Concorde\artefact\Model;
use Concorde\artefact\Table_abstract_model_trait;

abstract class Person extends Model
{
Expand Down
4 changes: 2 additions & 2 deletions application/business/models/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
defined('BASEPATH') OR exit('No direct script access allowed');

use Concorde\utils\php\Undefined;
use LightORM\Enum_model;
use LightORM\Table_enum_model_trait;
use Concorde\artefact\Enum_model;
use Concorde\artefact\Table_enum_model_trait;

class Status extends Enum_model
{
Expand Down
4 changes: 2 additions & 2 deletions application/business/models/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
defined('BASEPATH') OR exit('No direct script access allowed');

use Concorde\utils\php\Undefined;
use LightORM\Model;
use LightORM\Table_concrete_model_trait;
use Concorde\artefact\Model;
use Concorde\artefact\Table_concrete_model_trait;

class Tag extends Model
{
Expand Down
4 changes: 2 additions & 2 deletions application/business/models/Title.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
defined('BASEPATH') OR exit('No direct script access allowed');

use Concorde\utils\php\Undefined;
use LightORM\Model;
use LightORM\Table_concrete_model_trait;
use Concorde\artefact\Model;
use Concorde\artefact\Table_concrete_model_trait;

class Title extends Model
{
Expand Down
2 changes: 1 addition & 1 deletion application/config/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
|
| NOTE: This item is intended for use ONLY if you have created custom
| config files. Otherwise, leave it blank.
| The config.php and config_lightORM.php files are automatically
| The config.php and config_artefact.php files are automatically
| loaded, so you don't need to add them in $autoload['config'].
|
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

/*
|--------------------------------------------------------------------------
| The Data Conversion for LightORM
| The Data Conversion for Artefact
|--------------------------------------------------------------------------
|
| List all the database tables and define the type of each field
|
| Example:
|
| $config['lightORM_data_conv'] = array(
| $config['artefact_data_conv'] = array(
| 'folder' => array(
| 'id' => 'pk',
| 'name' => 'string',
Expand Down Expand Up @@ -85,7 +85,7 @@
| );
|
*/
$config['lightORM_data_conv'] = array(
$config['artefact_data_conv'] = array(
'folder' => array(
'id' => 'pk',
'name' => 'string',
Expand Down Expand Up @@ -161,14 +161,14 @@

/*
|--------------------------------------------------------------------------
| The Mapping Models for LightORM
| The Mapping Models for Artefact
|--------------------------------------------------------------------------
|
| List the models present in the folder ./application/business/models and related to a database table
|
| Example:
|
| $config['lightORM_mapping_models'] = array(
| $config['artefact_mapping_models'] = array(
| 'Article' => [],
| 'Author' => [],
| 'Comment' => [],
Expand All @@ -183,7 +183,7 @@
| );
|
*/
$config['lightORM_mapping_models'] = array(
$config['artefact_mapping_models'] = array(
'Article' => [],
'Author' => [],
'Comment' => [],
Expand All @@ -199,14 +199,14 @@

/*
|--------------------------------------------------------------------------
| The Mapping Associations for LightORM
| The Mapping Associations for Artefact
|--------------------------------------------------------------------------
|
| List the associations between the mapping models
|
| Example:
|
| $config['lightORM_mapping_associations'] = array(
| $config['artefact_mapping_associations'] = array(
| array(
| 'associates' => array(
| array(
Expand Down Expand Up @@ -360,7 +360,7 @@
| );
|
*/
$config['lightORM_mapping_associations'] = array(
$config['artefact_mapping_associations'] = array(
array(
'associates' => array(
array(
Expand Down
6 changes: 3 additions & 3 deletions application/config/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@

/*
|--------------------------------------------------------------------------
| LightORM Constants
| Artefact Constants
|--------------------------------------------------------------------------
|
*/
defined('LIGHTORM_START_TABLE_ALIAS_NUMBER') OR define('LIGHTORM_START_TABLE_ALIAS_NUMBER', 1);
defined('LIGHTORM_START_MODEL_NUMBER') OR define('LIGHTORM_START_MODEL_NUMBER', 1);
defined('ARTEFACT_START_TABLE_ALIAS_NUMBER') OR define('ARTEFACT_START_TABLE_ALIAS_NUMBER', 1);
defined('ARTEFACT_START_MODEL_NUMBER') OR define('ARTEFACT_START_MODEL_NUMBER', 1);
4 changes: 2 additions & 2 deletions application/controllers/Blog_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
use Demo_concorde\business\models\Comment;
use Demo_concorde\business\models\Folder;
use Demo_concorde\business\associations\Article_Tag;
use LightORM\Finder;
use LightORM\Query_manager;
use Concorde\artefact\Finder;
use Concorde\artefact\Query_manager;
use Concorde\utils\datetime\Mysql_date;
use Concorde\utils\datetime\Mysql_datetime;
use Concorde\utils\datetime\Now;
Expand Down
23 changes: 0 additions & 23 deletions composer.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace LightORM;
namespace Concorde\artefact;

/**
* Concorde
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace LightORM;
namespace Concorde\artefact;

/**
* Concorde
Expand Down Expand Up @@ -59,7 +59,7 @@ private function __construct() {
$this->CI =& get_instance();

$association_number = 1;
foreach ($this->CI->config->item('lightORM_mapping_associations') as $config_association) {
foreach ($this->CI->config->item('artefact_mapping_associations') as $config_association) {
$association_array = array();

$there_is_one = false;
Expand Down Expand Up @@ -94,7 +94,7 @@ private function __construct() {
$association_array['table'] = strtolower($association_array['class']);
}
} else {
trigger_error('LightORM error: Configuration error', E_USER_ERROR);
trigger_error('Artefact error: Configuration error', E_USER_ERROR);
}

$this->associations['association_' . $association_number] = $association_array;
Expand Down Expand Up @@ -151,7 +151,7 @@ public function get_association_numbered_name($data) {
}
}
} else {
trigger_error('LightORM error: Error in parameters', E_USER_ERROR);
trigger_error('Artefact error: Error in parameters', E_USER_ERROR);
}

return false;
Expand Down Expand Up @@ -216,7 +216,7 @@ public function get_associate_array($data) {
}
}
} else {
trigger_error('LightORM error: Error in parameters', E_USER_ERROR);
trigger_error('Artefact error: Error in parameters', E_USER_ERROR);
}

return false;
Expand Down Expand Up @@ -251,7 +251,7 @@ public function get_opposite_associates_arrays($data) {
}
}
} else {
trigger_error('LightORM error: Error in parameters', E_USER_ERROR);
trigger_error('Artefact error: Error in parameters', E_USER_ERROR);
}

return $retour;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace LightORM;
namespace Concorde\artefact;

/**
* Concorde
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace LightORM;
namespace Concorde\artefact;

/**
* Concorde
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace LightORM;
namespace Concorde\artefact;

/**
* Concorde
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
namespace LightORM;
namespace Concorde\artefact;

/**
* Concorde
Expand Down
Loading

0 comments on commit 8da3823

Please sign in to comment.