SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 74 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

The method returns all
of the properties to their default values specified by the class. The getNextOrder()
method determines the next space in the record ordering. If there are no existing
records, this will be 1. In case the check() method returns false, we should have
some handling in place. In most circumstances using a redirect and en-queuing the
check() error message will suffice.
Chapter 3
[ 55 ]
Let us tidy up our example. Some of the fields have default values defined in the
table, so our buffer will not be up to date after the record is created. When we create
a new record because the class knows what the table primary key is, the primary key
buffer property is automatically updated. After the previous example the buffer for
$table looks like this:
[id] => 1
[content] => Lorem ipsum dolor sit amet
[checked_out] =>
[checked_out_time] =>
[params] =>
[ordering] => 1
[hits] => 0
After storing the new record, we can load the record from the database ensuring
that the buffer is up to date.


Pages:
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86