Skip to content

Commit

Permalink
Update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Jan 11, 2024
1 parent a9097f1 commit aa4e21c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ use Yiisoft\ActiveRecord\ActiveRecord;
**/
final class User extends ActiveRecord
{
public function tableName(): string
public function getTableName(): string
{
return '{{%user}}';
}
Expand Down
6 changes: 3 additions & 3 deletions src/ActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@
* In this example, Active Record is providing an object-oriented interface for accessing data stored in the database.
* But Active Record provides much more functionality than this.
*
* To declare an ActiveRecord class you need to extend {@see ActiveRecord} and implement the `tableName` method:
* To declare an ActiveRecord class you need to extend {@see ActiveRecord} and implement the `getTableName` method:
*
* ```php
* <?php
*
* class Customer extends ActiveRecord
* {
* public static function tableName(): string
* public static function getTableName(): string
* {
* return 'customer';
* }
* }
* ```
*
* The `tableName` method only has to return the name of the database table associated with the class.
* The `getTableName` method only has to return the name of the database table associated with the class.
*
* Class instances are obtained in one of two ways:
*
Expand Down

0 comments on commit aa4e21c

Please sign in to comment.