The name of the Table class referenced as
is in your control. There are names you can expect if you follow naming conventions, but you can change them if you have a need.
If you have a recommended lowercase plural table name in your db (eg xyz_files) and you bake the model with Cake’s command line tools you will get the Table class XyzFilesTable and will be able to call
If your db table name is non-standard (eg xyzfile) and you bake, you will get XyzfileTable and will be able to call
$this->Xyzfile->query(). But a cascade of side-effects will begin and you will have to account for them. For example, the standard Entity property will now be the same as the table property; $this->Xyzfile.
To understand the conventions:
But every call you make targets a class in your application. You can easily look and see what you should be calling, it is not arbitrary.
If you are using a command like
$this->loadModel(‘Person’), you are saying that you have the file src/Model/Table/PersonTable.php. and that its basic structure is along these lines:
* Person Model
class PersonTable extends Table
// your methods here