Skip to content

Commit

Permalink
Phpdoc updated for setTable() & getTable()
Browse files Browse the repository at this point in the history
  • Loading branch information
FarhanShares authored Jun 13, 2020
1 parent bd48a22 commit 84aa7eb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ public function __construct(Context $database)
$this->model = $this->getModel();
}


/**
* Get the table associated with a model based on the model class name.
* If you use different table use setTable()
*
* Eg: UserModel.php -> Table Name: User
*
* @return string
*/
protected function getTable(): string
{
preg_match('#(\w+)Model$#', get_class($this), $m);
Expand All @@ -43,7 +50,8 @@ protected function getTable(): string


/**
* Specify the table associated with a model
* Specify the table name associated with a model.
* You can change table on the runtime using setTable().
*
* @param string $table
*
Expand Down

0 comments on commit 84aa7eb

Please sign in to comment.