{
                        $dataMap['media_content']->fromString(implode('-', array_unique($relatedObjectIds)));
                        $dataMap['media_content']->store();
                    }
                }
            }
            else
            {
                $cli->warning((string) $article . ' : object not fetchable');
            }
        }

        eZContentObject::clearCache();

        $db->commit();
    }
    catch(Exception $e)
    {
        $db->rollback();
        $cli->error((is_object($article) ? (string) $article : '') . ' ' . $e->getMessage());
    }
}

MMSynchMonitor::stop();
$cli->output();

// Statistics
$cli->output(MMSynchMonitor::stats());

$script->shutdown();
예제 #2
0
 public function __destruct()
 {
     $this->cli->output(implode(', ', MMSynchMonitor::stats()));
 }