Skip to content

Commit

Permalink
Update docs (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw authored Jan 11, 2024
1 parent a9097f1 commit 2ba318b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"require-dev": {
"maglnet/composer-require-checker": "^4.2",
"phpunit/phpunit": "^10.5",
"rector/rector": "^0.18",
"rector/rector": "^0.19",
"roave/infection-static-analysis-plugin": "^1.34",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^5.8",
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 2ba318b

Please sign in to comment.