-
Notifications
You must be signed in to change notification settings - Fork 7
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
69 changed files
with
4,037 additions
and
1,467 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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
language: php | ||
|
||
php: | ||
- '5.5' | ||
- '5.6' | ||
- '7.0' | ||
- hhvm | ||
- nightly | ||
|
||
install: | ||
- composer install | ||
|
||
env: | ||
- DB=mysql | ||
- DB=pgsql POSTGRESQL_VERSION=9.1 | ||
- DB=pgsql POSTGRESQL_VERSION=9.2 | ||
- DB=pgsql POSTGRESQL_VERSION=9.3 | ||
- DB=pgsql POSTGRESQL_VERSION=9.4 | ||
|
||
before_script: | ||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database qcubed;'; mysql -u root qcubed < test/db/mysql_innodb.sql; fi" | ||
- sh -c "if [ '$DB' = 'pgsql' ]; then createdb qcubed -U postgres; psql -d qcubed -f test/db/pgsql.sql -U postgres; fi" | ||
|
||
script: | ||
- ./vendor/bin/phpunit -c ./test/phpunit.xml --coverage-clover ./build/logs/clover.xml | ||
|
||
# code coverage | ||
addons: | ||
code_climate: | ||
repo_token: 814dfe2ee0ae6198e43e566e32ab85f40379b5abe06cd52b1f6a24e92b5de883 | ||
|
||
# code coverage | ||
after_script: | ||
- vendor/bin/test-reporter | ||
|
||
sudo: false | ||
|
||
matrix: | ||
exclude: | ||
- php: hhvm | ||
env: DB=pgsql POSTGRESQL_VERSION=9.1 # driver currently unsupported by HHVM | ||
- php: hhvm | ||
env: DB=pgsql POSTGRESQL_VERSION=9.2 # driver currently unsupported by HHVM | ||
- php: hhvm | ||
env: DB=pgsql POSTGRESQL_VERSION=9.3 # driver currently unsupported by HHVM | ||
- php: hhvm | ||
env: DB=pgsql POSTGRESQL_VERSION=9.4 # driver currently unsupported by HHVM | ||
|
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,6 +1,6 @@ | ||
MIT License | ||
|
||
Copyright (c) 2017 Shannon | ||
Copyright (c) 2017 Shannon Pekary [email protected] | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
|
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,2 +1,2 @@ | ||
# qcubed-orm | ||
# QCubed Orm | ||
QCubed Standalone ORM |
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
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,4 +1,2 @@ | ||
<?php | ||
require(__MODEL_GEN__ . '/QQN.class.php'); | ||
require(__MODEL_GEN__ . '/_class_pathis.inc.php'); | ||
require(__MODEL_GEN__ . '/_type_class_pathis.inc.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,62 @@ | ||
<?php | ||
/** | ||
* CodeGen | ||
* | ||
* Overrides the Codegen\AbstractBase class. | ||
* | ||
* Feel free to override any of those methods here to customize your code generation. | ||
* | ||
*/ | ||
|
||
/** | ||
* Class Codegen | ||
* | ||
* Overrides the default codegen class. Override and implement any functions here to customize the code generation process. | ||
* @package Project | ||
* @was CodeGen | ||
*/ | ||
class Codegen extends \QCubed\Codegen\AbstractBase { | ||
|
||
/** | ||
* Construct the CodeGen object. | ||
* | ||
* Gives you an opportunity to read your xml file and make codegen changes accordingly. | ||
*/ | ||
public function __construct($objSettingsXml) { | ||
// Specify the paths to your template files here. These paths will be searched in the order declared, to | ||
// find a particular template file. Template files found lower down in the order will override the previous ones. | ||
static::$TemplatePaths = array ( | ||
__QCUBED_CORE__ . '/../../orm/templates/', | ||
__DIR__ . '/templates/' | ||
); | ||
} | ||
|
||
/** | ||
* CodeGen::Pluralize() | ||
* | ||
* Example: Overriding the Pluralize method | ||
* | ||
* @param string $strName | ||
* @return string | ||
*/ | ||
protected function Pluralize($strName) { | ||
// Special Rules go Here | ||
switch (true) { | ||
case ($strName == 'person'): | ||
return 'people'; | ||
case ($strName == 'Person'): | ||
return 'People'; | ||
case ($strName == 'PERSON'): | ||
return 'PEOPLE'; | ||
|
||
// Trying to be cute here... | ||
case (strtolower($strName) == 'fish'): | ||
return $strName . 'ies'; | ||
|
||
// Otherwise, call parent | ||
default: | ||
return parent::Pluralize($strName); | ||
} | ||
} | ||
} | ||
|
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,9 @@ | ||
# About `codegen` directory | ||
|
||
The codegen-related class in this directory allow you to override | ||
the functionality of the codegen operation. | ||
|
||
Feel free to make any changes to these customizations as you wish. | ||
|
||
NOTE: the templates subdirectory is available for you to place customizations to the templates | ||
and subtemplates themselves. Read the README.md file in templates/ to find out more. |
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,31 @@ | ||
# About `templates` directory | ||
|
||
This directory is for customizations and additions of the QCubed Codegen | ||
Templates and Subtemplates. If there are any template files in this directory which have the | ||
same name as a template or subtemplate file in `/includes/qcubed/_core/codegen/templates`, then the | ||
file in this directory will be used *instead* of the one there. | ||
|
||
If there are any template files in this directory in *addition* to the ones in | ||
`/includes/qcubed/_core/codegen/templates`, these additional template files will be | ||
processed as well. | ||
|
||
Feel free to add as you wish. Just remember the naming structure for CodeGen | ||
template files: | ||
|
||
`/includes/qcubed/_core/codegen/templates/[TYPE]/[MODULE]/[FILE]` | ||
|
||
Where `[TYPE]` is the object being generated, for example: | ||
* db_orm | ||
* db_type | ||
|
||
And `[MODULE]` is the category of file being generated, for example: | ||
* **class_gen** - templates and subtemplates for the Data Class Gen file | ||
* **class_subclass** - templates and subtemplates for the Data Class customizable subclass | ||
* **drafts** - templates and subtemplates for all things with regards to draft forms/panels | ||
* **model_connector** - templates and subtemplates for the ModelConnector | ||
* **datagrid_connector** - templates and subtemplates for the datagrid connector | ||
|
||
And `[FILE]` is the filename of the template or subtemplate, itself. | ||
Note that any file with a "_" prefix is considered a template and will | ||
be processed by the code generator. All other files are considered | ||
subtemplates, and are only processed if envoked by a template. |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.