As the doc (https://docs.phalcon.io/en/latest/reference/odm.html) says:
If you’re using PHP 5.4/5.5 is recommended declare each column that makes part of the model in order to save memory and reduce the memory allocation.
With that in mind, i'm explicitly declaring each field on my model, but what i'm only able to declare it as public, if not the field wouldn't be save.
Is there's a away to the save field value and at the same time protecting my field from outside access?
Use case:
// collection
class Posts extends Collection
{
use Behavior\Sluggable
}
trait Sluggable
{
// here's the problem
public $slug;
}
Thanks