public function getSourceUserdb($source)
 {
     $userdbs = array();
     $sourceName = $source->getName();
     foreach ($this->tReadUserdbs as $userdb) {
         foreach ($userdb->getSourceNames() as $userdbSourceName) {
             if ($sourceName == $userdbSourceName) {
                 $userdbs[] = $userdb;
                 break;
             }
         }
     }
     $userdbCount = count($userdbs);
     if ($userdbCount == 0) {
         $userdbs[] = new MonitorUserdb(Userdb::TYPE_NONE);
     } elseif ($userdbCount > 1) {
         throw new Exception(Log::err("Unexpected number ({$userdbCount}) of user db references to {$source}"));
     }
     $userdb = $userdbs[0];
     return Userdb::create($userdb->getType(), $userdb->getProperties());
 }
 public function __construct($properties)
 {
     parent::__construct($properties);
 }
 private function beginUserdb($data)
 {
     $type = trim($data["type"]);
     $typeValid = $this->validateAttributeValue("type", $type, Userdb::validTypes());
     if ($typeValid) {
         $this->tCurrentUserdb = new MonitorUserdb($type);
     }
 }