Esensi\Model\Traits\JugglingModelTrait::juggleAttributes PHP Method

juggleAttributes() public method

Juggles all attributes that are configured to be juggled.
public juggleAttributes ( )
    public function juggleAttributes()
    {
        // Iterate the juggable fields, and if the field is present
        // cast the attribute and replace within the attributes array.
        foreach ($this->getJugglable() as $attribute => $type) {
            if (isset($this->attributes[$attribute])) {
                $this->juggleAttribute($attribute, $this->attributes[$attribute]);
            }
        }
    }