<?php
/**
 * The interface for form decorators.
 */
interface form_decorator
{
    ////////////////////////////////////////////////////////////////////////////
    // Overload functions.

    ////////////////////////////////////////////////////////////////////////////
    // Interface functions.
    
    /**
     * Decorates an error.
     *
     * @param string $error The error.
     * @return string The decorated error.
     */
    public function render_error($error);
    
    /**
     * Decorates a label.
     *
     * @param string $label The label.
     * @return string The decorated label.
     */
    public function render_label($label);
    
    /**
     * Decorates a field.
     *
     * @param string $field The field.
     * @return string The decorated field.
     */
    public function render_field($field);
    
    /**
     * Decorates an entry.
     *
     * @param string $error The error.
     * @param string $label The label.
     * @param array $field The field.
     * @return string The decorated entry.
     */
    public function render_entry($error, $label, $field);
    
    /**
     * Decorates a set.
     *
     * @param string $set The set.
     * @return string The decorated set.
     */
    public function render_set($set);
}
