コード例 #1
0
 protected static final function _optimalImportExportFormat(Kwf_Model_Interface $model1, Kwf_Model_Interface $model2)
 {
     $formats = array_values(array_intersect($model1->getSupportedImportExportFormats(), $model2->getSupportedImportExportFormats()));
     if (!$formats || !$formats[0]) {
         throw new Kwf_Exception("Model '" . get_class($model1) . "' cannot copy data " . "from model '" . get_class($model2) . "'. Import / Export Formats are not compatible.");
     }
     return $formats[0];
 }