Should I know zephir or c to add constants to a class in phalconphp ? Reason behind is is that i'm currenlty using the file validator but when settting the options that I need I always need to go back to the documentation to find out the name of it. And what I would like to see is something like.
<?php $file = new Validation\Validator\File(); $file->setOption(Validation\Validator\File::MAX_SIZE,'2M'); $file->setOption(Validation\Validator\File::ALLOWED_TYPES,['image/jpeg','image/png');
Is this a better way or am I just delusional?