object $DB_DataObject->database (
string $name
)
引数なしの場合、オブジェクトが扱うデータベースを返します。 文字列を渡した場合、そのオブジェクトが扱うデータベースをセットします。
This function can not be called statically.
データベース名の取得
<?php
$person = new DataObjects_Person;
echo $person->database();
// echo's mydatabase
// now use the same object to check on a mirror..
$person->database('mirror1');
$person->id = 12;
$person->find(true);
?>