
Upgrade: Create a "database" factory class to migrate database subsystem to 2.0
Reported by dleffler | May 29th, 2011 @ 02:55 AM | in 2.0.2 (closed)
When working with an IDE which uses PHPDoc for help and suggestions, it needs appropriate PHPDoc comments in the source to find the appropriate information. If we had a "database" class which each of the specific databases (mysqli, etc...) extended/subcalssed, it would fix this break.
The current work-around is that I've typed the 'subsystem/database.php' file with the 'connect' method returning a 'mysqli_database' object since we currently only support mysqli databases.
Comments and changes to this ticket
-
dleffler May 29th, 2011 @ 11:55 AM
- Assigned user set to expNinja
More correctly stated...the workaround that I've typed is the PHPDoc comments, NOT the data itself!
-
dleffler May 29th, 2011 @ 12:02 PM
- Assigned user cleared.
-
expNinja June 2nd, 2011 @ 08:57 PM
(from [5b69eade623383a843516ed78fc3005cc16ba3e4]) [#198] Add PHPDoc comments to some base files. Fix some parameters in the eLog function. for PHPDoc type of database to msqli_database since it's the only one we use at this point. https://github.com/exponentcms/exponent-cms/commit/5b69eade623383a8...
-
dleffler July 8th, 2011 @ 01:56 AM
- Assigned user set to dleffler
- State changed from new to open
This is required to work in the use of other database engines in the future...must move some of the 'mysql_xxx' calls into the database engine to abstract them for future expansion. Espaecially since we are using 'mysqli' instead of 'mysql' at this point!
-
expNinja July 8th, 2011 @ 07:57 PM
(from [94c598a2a707f7c1ca8efe9a295cc3c9ec6ad076]) Remove foreign calls from database engines (MySql in PG, MySql in MySqlI, etc...) Keep things pure by using DB specific call in that engine (only minor changes) [#198] https://github.com/exponentcms/exponent-cms/commit/94c598a2a707f7c1...
-
expNinja July 8th, 2011 @ 09:54 PM
(from [9da5733358966ce4591d4691fbd8b8d940bbfbf1]) Changes mysql_error calls to mysqli_error calls (interim measure) [#198] https://github.com/exponentcms/exponent-cms/commit/9da5733358966ce4...
-
expNinja July 8th, 2011 @ 09:54 PM
(from [3ed564b4e1a345521534ef3d0747393480290b0f]) Changes mysql_escape_string calls to ...real_escape_string function with condition call based on db engine [#198] https://github.com/exponentcms/exponent-cms/commit/3ed564b4e1a34552...
-
expNinja July 9th, 2011 @ 12:30 AM
(from [c236d0875adb97fec8b322e7835f410610bc4ce3]) Changes mysqli_error() calls to $db->error() to pass details to selected db engine [#198] https://github.com/exponentcms/exponent-cms/commit/c236d0875adb97fe...
-
expNinja July 9th, 2011 @ 12:41 AM
(from [6e7ec235fe5ca3aa10e29b8c3e2caab8c769c1b8]) Changes another mysqli_error() calls in installation to $db->error() to pass details to selected db engine [#198] https://github.com/exponentcms/exponent-cms/commit/6e7ec235fe5ca3aa...
-
dleffler July 9th, 2011 @ 12:52 AM
- Milestone set to Release Candidate 1
- Milestone order changed from 63 to 0
Next step is to abstract xxx_real_escape_string, then to build a parent/super class
-
expNinja July 14th, 2011 @ 03:24 AM
(from [0b2dbe143aea207cdbf3afc8f2d5ebd9a484d422]) Abstracts mysqli_real_escape_string into the database engine as "escapeString" function to allow for future expansion of database engines. [#198] https://github.com/exponentcms/exponent-cms/commit/0b2dbe143aea207c...
-
dleffler July 27th, 2011 @ 05:31 PM
- Milestone changed from Release Candidate 1 to 2.0.1
- Milestone order changed from 6 to 0
-
dleffler July 31st, 2011 @ 01:46 AM
- Title changed from Create a "database" parent class to subclass the individual database classes to Create a "database" abstract class to extend (tie together) the individual database classes
After reading more about inheritence and abstracting...seems that creating an abstract class database {} would be the way to go.
-
dleffler September 15th, 2011 @ 02:18 PM
- Milestone cleared.
-
dleffler September 24th, 2011 @ 09:09 PM
- Title changed from Create a "database" abstract class to extend (tie together) the individual database classes to Upgrade: Create a "database" abstract class to extend (tie together) the individual database classes
-
dleffler September 30th, 2011 @ 04:49 PM
- Milestone set to 2.0.2
- Tag changed from database, phpdoc to database, phpdoc, subsystem
- Milestone order changed from 1 to 0
This will become part of the subsystem migration to 2.0 and will likely use the php 'Factory' pattern to implement
-
dleffler September 30th, 2011 @ 05:24 PM
- Title changed from Upgrade: Create a "database" abstract class to extend (tie together) the individual database classes to Upgrade: Create a "database" factory class to migrate database subsystem to 2.0
-
expNinja September 30th, 2011 @ 07:13 PM
(from [d2d028391139381728b490ebe98975308da37ede]) Initial conversion of database subsystem to 2.0 format [#198] https://github.com/exponentcms/exponent-cms/commit/d2d0283911393817...
-
expNinja September 30th, 2011 @ 07:24 PM
(from [9ed744cf029b23682dfd90fe27b4b5326d2c6353]) Actually the database subsystem migration to 2.0 requires the files (duh!) [#198] https://github.com/exponentcms/exponent-cms/commit/9ed744cf029b2368...
-
expNinja September 30th, 2011 @ 08:04 PM
(from [c3ee4abaaee7f20fc7ceecd001a60f0f894a6d58]) Tweaks to new 2.0 expDatabase subsystems and drivers, also deletes old database subsystem and drivers [#198] https://github.com/exponentcms/exponent-cms/commit/c3ee4abaaee7f20f...
-
expNinja September 30th, 2011 @ 08:54 PM
(from [bfcf017194253f1fa7a19f158c7b321ba99f9bb0]) More tweaks to new 2.0 expDatabase subsystem, also moves database abstract class into expDatabase [#198] https://github.com/exponentcms/exponent-cms/commit/bfcf017194253f1f...
-
dleffler September 30th, 2011 @ 08:56 PM
Notes:
- expDatabase is a php 'factory' pattern...these two methods could possibly be moved inot expFramework.php
- database is a php abstract class inside expDatabase.php to prevent it being instantiated (actually it began as a copy of the mysqli.php database driver file)
- though a php interface like idatabase.php might be desired, it can probably best be accomplished by the use of abstract methods inside the abstract database class (e.g., the __construct method is used to connect to the database which is different for each database engine..therefore it will be an abstract method)
- at some point, we need to remove methods from the database driver files that are alike in every driver...e.g., those that perform NO database engine calls.
-
dleffler October 13th, 2011 @ 05:04 PM
This is fixed in the feature/smarty3 branch and will be merged w/ develop for the 2.0.2 release
-
dleffler October 17th, 2011 @ 08:33 PM
- State changed from open to resolved
feature/smarty3 branch merged into develop branch
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Bug Tracker for Exponent CMS
Referenced by
-
198 Create a "database" parent class to subclass the individual database classes (from [5b69eade623383a843516ed78fc3005cc16ba3e4]) [#198] ...
-
244 Upgrade: Migrate old school subsystems into framework/core/subsystems Database subsystem covered by separate ticket #198