contributions/db.tristate/doxygen.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * @defgroup Tristate 00004 * @ingroup DB 00005 * 00006 * @since 0.5.1 00007 * 00008 * A tristate DB field, allowing a user choice of YES, NO, and UNKNOWN. 00009 * 00010 * While a tristate also can be achieved unsing a boolean field together with a NULL value, 00011 * the Tristate DB field allows easier user input, since NULL is difficult to represent 00012 * using default boolean user input widgets. 00013 * 00014 * @section Usage 00015 * 00016 * The tristate field is basically an Enum field, and can be used like this. 00017 * 00018 * Use class DBFieldTristate in table declaration: 00019 * 00020 * @code 00021 * ... 00022 * new DBFieldTristate('fieldname', Tristate::UNKNOWN, DBField::NOT_NULL), 00023 * ... 00024 * @endcode 00025 * 00026 * The Tristate class defines the three possible tristate values and offers helper functions. 00027 */