Beispiel #1
0
 /**
  * 
  * @param mixed $input
  * @param NefubObject $oOutput
  * @return NefubObject
  */
 public static function mapFromAPI($input, NefubObject $oOutput = null)
 {
     self::$log = '';
     $sAction = 'geupdatet';
     $sClassName = static::getClassName();
     if (!$oOutput) {
         $oOutput = static::getExistingNefubObject($input);
         if (!$oOutput) {
             $oOutput = new $sClassName();
             $sAction = 'toegevoegd';
         }
     }
     static::handleMapping($input, $oOutput);
     $oOutput->save();
     static::mapPostSave($input, $oOutput);
     self::log($sClassName . ' ' . $sAction . ': ' . static::getName($oOutput));
     return $oOutput;
 }