Util Package Overview
This package is a helper package and contains different utility classes and interfaces.
They do not rely on other Freeform packages and can be used even in non-freeform
applications.
Here is a brief description of the most important classes of this package:
-
interface Iterable
This is a basic interface that represents a collection of items that can be
iterated over. It declares two methods, hasMore() and getNext(),
that are used to test if there are more items available and fetch next item and
advance to the next item. Note that this interface has no connection to the SPL
-
interface PaginatedIterable
This interface extends Iterable and provides additional methods to access the iterable's
items trough pages. You will be dealing with instances of this interface when
you obtain result sets form database query in the SQL package. The HTMLShowIterable
and HTMLShowPagination tags from the HTML package utilize paginatedIterable's methods
to automatically show repeated paginated content
-
Validator
This is an abstract class with just one method, isValid(). The purpose of this
class is to unify arbitrary values validation by applications that collect
input and pass them over to other applications not knowing the nature of the
data collected. For example, InputFields actively employ validators to check the validity
of user-submitted data.
-
NoMoreElementsException, ConfigurationException
These two exceptions are thrown when Iterable attempts to read past end
of iterated over entity in its getNext() method and when
certain package detects that it has not been properly configured.
|
|