Created
July 24, 2011 14:55
-
-
Save naoaki011/1102699 to your computer and use it in GitHub Desktop.
Callcack object MT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head1 Object Callbacks | |
The Object callbacks are those that are tied to I<MT::Object> and its | |
descendants. This includes classes such as I<MT::Entry>, I<MT::Blog>, etc. | |
=over 4 | |
=item * <package>::pre_save | |
callback($cb, $obj, $original) | |
Callback issued prior to saving C<$obj> to the database. C<$original> is | |
the instance that was invoked to be saved. If C<$obj-E<gt>id> is unset, | |
then it is a new object. | |
=item * <package>::post_save | |
callback($cb, $obj, $original) | |
Callback issued after to saving C<$obj> to the database. C<$original> is | |
the instance that was invoked to be saved. | |
=item * <package>::pre_update | |
callback($cb, $obj, $original) | |
Callback issued prior to saving an existing C<$obj> to the database. | |
C<$original> is the instance that was invoked to be saved. | |
=item * <package>::post_update | |
callback($cb, $obj, $original) | |
Callback issued after saving an existing C<$obj> to the database. | |
C<$original> is the instance that was invoked to be saved. | |
=item * <package>::pre_insert | |
callback($cb, $obj, $original) | |
Callback issued prior to saving a new C<$obj> to the database. C<$original> is | |
the instance that was invoked to be saved. | |
=item * <package>::post_insert | |
callback($cb, $obj, $original) | |
Callback issued after to saving a new C<$obj> to the database. C<$original> is | |
the instance that was invoked to be saved. | |
=item * <package>::pre_load | |
callback($cb, \@params) | |
C<\@params> is an array containing the arguments that were passed to | |
the C<load> method. | |
=item * <package>::post_load | |
callback($cb, \@params, $obj) | |
C<\@params> is an array containing the arguments that were passed to | |
the C<load> method. The object returned by the load method is provided | |
through the C<$obj> parameter. | |
=item * <package>::pre_remove | |
callback($cb, $obj) | |
=item * <package>::post_remove | |
callback($cb, $obj) | |
=item * <package>::pre_direct_remove | |
callback($cb, $class, $terms, $args) | |
=item * <package>::post_clone | |
callback($cb, %param) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment