From 746a413141f63dc4323a8f9f7b9cdc8e427f1d65 Mon Sep 17 00:00:00 2001 From: Messias Dias Date: Sun, 16 May 2021 10:55:30 -0300 Subject: [PATCH 1/3] Remove var in bin/doc-readme acordding with issue #50 --- bin/doc-readme | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/doc-readme b/bin/doc-readme index 07b9be1..2f55a73 100644 --- a/bin/doc-readme +++ b/bin/doc-readme @@ -1,12 +1,11 @@ #!/usr/local/bin/php Date: Sun, 16 May 2021 11:08:18 -0300 Subject: [PATCH 2/3] Update README.md acordding with issue #51 --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 251387c..dec925a 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,10 @@ As the name says, it is made to be basic and direct. ## Get Started +

+ +

+ Add library in to you project with Composer ``` composer require basicis/core @@ -41,11 +45,11 @@ APP_TIMEZONE='America/Recife' # For MySQL databases #DB_DRIVER="pdo_mysql" -DB_HOST="127.0.0.1" -DB_PORT=3306 -DB_NAME="dbname" -DB_USER="user" -DB_PASS="userpass" +#DB_HOST="127.0.0.1" +#DB_PORT=3306 +#DB_NAME="dbname" +#DB_USER="user" +#DB_PASS="userpass" #DATABASE_URL="${DB_DRIVER}://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}" # For Sqlite database From a61781948b0fc6ec8bf9199828b117278f5c7797 Mon Sep 17 00:00:00 2001 From: Messias Dias Date: Sun, 16 May 2021 11:17:40 -0300 Subject: [PATCH 3/3] Define method Basicis\Model\Model::setId() to fix error acordding with issue #52 --- src/Model/Model.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Model/Model.php b/src/Model/Model.php index c694dd9..14f45b0 100644 --- a/src/Model/Model.php +++ b/src/Model/Model.php @@ -87,6 +87,20 @@ public function getProtecteds() : array return $this->protecteds; } + /** + * Function setId + * Set entity ID (unique on system identification) + * @param int $id + * @return Model + */ + public function setId(int $id = null) : Model + { + if ($id > 0) { + $this->id = $id; + } + return $this; + } + /** * Function getId * Return entity ID (unique on system identification)