I know that for some that might sound stupid, but I was thinking if I hava a delete() method in a class that removes all the object data (from DB and file system), how can I destroy/remove the object from within the class.
This is a PHP question. Something like unset($this);
Is it possible and wise? And what is the right way to do it?
Another approach is to make the delete-method static, which then could receive a PDO object and data, that determines what to delete. This way you don't need to initialise the object.