Override Phalcon\Model::create()

Hi (again),

I need to override the create-function of Phalcon\Model, because I will only use MySQL/MariaDB for my project.

I've defined a table with uniques. Therefor I don't wanna check, if the unique-title already exists. So I just wanna use: "INSERT IGNORE ...".

In the docs, there is nothing said about override the function. Is it possible or must I create a function with another name?

Thanks alot (again)



18.5k

Yeah, you can override it.



44.6k

You can override any public method unless it is declared final or is on a final class.