Commentable objects

Some RDBMS provide a way to comment various database objects. DbMeta can retrieve those comments through the weeDbMetaCommentable interface.

Checking whether a database object is commentable

When a database object is commentable, its class implements the weeDbMetaCommentable interface.

<?php

$bIsCommentable = $oDbObject instanceof weeDbMetaCommentable;

Retrieving the comment of a database object

To get the comment of a commentable database object, use the comment method. If the database object does not have a comment, null is returned.

<?php

$mComment = $oCommentableObject->comment();