Skip to content

Commit 66b2b92

Browse files
committed
updates and corrections
1 parent 1bb52a9 commit 66b2b92

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
***A class to make it very easy to deal with database connections.***
66

7-
This is [__version 4__](https://github.com/ezSQL/ezSQL/tree/v4) that has many modern programming practices in which will break users of version 3.
7+
This is [__version 4__](https://github.com/ezSQL/ezsql/tree/v4) that has many modern programming practices in which will break users of version 3.
88

9-
[__Version 3__](https://github.com/ezSQL/ezSQL/tree/v3) broke version 2.1.7 in one major way, it required *PHP 5.6*. Which drop mysql extension support, other than that, nothing as far using the library was changed, only additional features.
9+
[__Version 3__](https://github.com/ezSQL/ezsql/tree/v3) broke version 2.1.7 in one major way, it required *PHP 5.6*. Which drop mysql extension support, other than that, nothing as far using the library was changed, only additional features.
1010

11-
This library has an `Database` class, an combination of the [Factory](https://en.wikipedia.org/wiki/Factory_method_pattern) pattern with an [Dependency Injection](https://en.wikipedia.org/wiki/Dependency_injection) container hosting. This library now is following many OOP principles, one in which, the methods properties public access has been removed. This library also following PSR-2, PSR-4, and PSR-11 conventions.
11+
This library has an `Database` class, an combination of the [Factory](https://en.wikipedia.org/wiki/Factory_method_pattern) pattern with an [Dependency Injection](https://en.wikipedia.org/wiki/Dependency_injection) container hosting. This library now is following many OOP principles, one in which, the methods properties public access has been removed. This library also following PSR-2, PSR-4, PSR-11 conventions, and mostly PSR-1, that's still an work in progress.
1212

1313
* More Todo...
1414

15-
For an full overview see [documentation Wiki](https://github.com/ezSQL/ezSQL/wiki/Documentation), which is not completely finish.
15+
For an full overview see [documentation Wiki](https://github.com/ezSQL/ezsql/wiki/Documentation), which is not completely finish.
1616

1717
## Installation
1818

@@ -39,8 +39,10 @@ $db = new ez_****($settings);
3939

4040
This library will assume the developer is using some sort of IDE with intellisense enabled. The comments/doc-block area will hold any missing documentations. For additional examples see __phpunit__ tests, The tests are fully functional integration tests, meaning the are live database tests, no mocks.
4141

42-
##### General Methods
43-
---
42+
The following has been added since version 2.1.7.
43+
44+
___General Methods___
45+
4446
to_string($arrays, $separation = ',');
4547
clean($string);
4648
create_cache(string $path = null);
@@ -103,4 +105,12 @@ prepareOff(); // When off shortcut SQL Methods calls will use vendors escape rou
103105

104106
query_prepared(string $query_string, array $param_array);
105107

106-
**For** **[Authors/Contributors](https://github.com/ezSQL/ezSQL/blob/master/CONTRIBUTORS.md)**
108+
## For Authors and **[Contributors](https://github.com/ezSQL/ezsql/blob/master/CONTRIBUTORS.md)**
109+
110+
## Contributing
111+
112+
Contributions are encouraged and welcome; I am always happy to get feedback or pull requests on Github :) Create [Github Issues](https://github.com/ezSQL/ezsql/issues) for bugs and new features and comment on the ones you are interested in.
113+
114+
## License
115+
116+
**ezsql** is open-sourced software licensed originally under (LGPL-3.0), and the addon parts under (MIT).

lib/ezSchema.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class ezSchema
6161
'sqlite3' => ''
6262
];
6363

64-
const autoNUMBERS = [
64+
const AUTO_NUMBERS = [
6565
'mysqli' => 'AUTO_INCREMENT',
6666
'pgsql' => 'SERIAL',
6767
'sqlsrv' => 'IDENTITY(1,1)',
@@ -224,7 +224,7 @@ public static function column(string $column = null, string $type = null, ...$ar
224224
$data = self::datatype($type, ...$args);
225225
if (!empty($data)) {
226226
// check for sequence placeholder and replace with vendors
227-
$data = \str_replace(\SEQUENCE, self::autoNUMBERS[$vendor], $data);
227+
$data = \str_replace(\SEQUENCE, self::AUTO_NUMBERS[$vendor], $data);
228228
$columnData = $column.' '.$data.', ';
229229
}
230230
}

lib/ezsqlModel.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,10 @@ public function __call($function, $args)
187187
{
188188
$prefix = \substr($function, 0, 3);
189189
$property = \strtolower(substr($function, 3, \strlen($function)));
190+
// Todo: make properties PSR-1, add following for backward compatibility
191+
//if (\strpos($property, '_') !== false)
192+
// $property = \str_replace('_', '', $property);
193+
190194
if (($prefix == 'set') && \property_exists($this, $property)) {
191195
$this->$property = $args[0];
192196
} elseif (($prefix == 'get') && \property_exists($this, $property)) {

0 commit comments

Comments
 (0)