Why exactly are all CakePHP Model methods instance methods. For example:
$post = $this->Post->findById($id);
in stead of
$post = Post::find($id);
I would think all methods that work on model instances (or records) would be instance methods, for example:
$post = ...;
$post->publish(); // Would be $this->Post->publish($id) using Cake
and all methods that create or find records (that work on the total collection of records) would be class methods (instance methods), for example:
$post = Post::findById($id); // Would be $this->Post->findById($id) using Cake
$newPost = Post::create(['title' => 'My post', 'body' => '<p>...</p>']);
// Would be $newPost = $this->Post->create([...]); using Cake
I think this Cake convention is contrary to logical OOP conventions. Does anyone know the reason of this design?