/** * Factory method. Create a Docman_Metadata object based on the type of the * medatadata. Object is created from a row from the DB. */ function &_createFromRow(&$row) { switch ($row['data_type']) { case PLUGIN_DOCMAN_METADATA_TYPE_LIST: $md = new Docman_ListMetadata(); break; default: $md = new Docman_Metadata(); } $md->initFromRow($row); return $md; }