-
Notifications
You must be signed in to change notification settings - Fork 20
Consider introducing histories to reduce data duplication #11
Comments
Hi, thank you ;) I'm not sure to understand what the histories of facebook open graph does. Are you talking about grouping old actions as stephpy/timeline-bundle#90 ? A history of action of a subject are already implemented (but without any grouping actions system). Can you describe me what would be the feature on this bundle in some examples please ? |
I think macro is suggesting a way to insert timeline actions in the past? |
Sorry, I wasn't clear. Yes, now seems that verbs aren't normalized. I'm suggesting something like this (already thinking in stephpy/timeline-bundle#90): $verb = new Verb('control');
// Chuck Norris controls the world
// Chuck Norris and two other friends control the world
$verb->addTense(Verb::PRESENT_TENSE, new VerbTense(['singular' => 'controls', 'plural' => 'control'));
// Chuck Norris controlled the world
// Chuck Norris and two other friends controlled the world
$verb->addTense(Verb::PAST_TENSE, new VerbTense(['singular' => 'controlled', 'plural' => 'controlled'));
// Hey Chuck Norris, let's control the world!
$verb->addTense(Verb::IMPERATIVE_TENSE, new VerbTense(['singular' => 'control', 'plural' => 'control'));
// tense, subject count
echo $verb->getTense(Verb::PRESENT_TENSE); // prints controls
echo $verb->getTense(Verb::PRESENT_TENSE, 2); // prints control
echo $verb->getTense(Verb::PRESENT_TENSE, 5); // prints control
$actionManager = $this->get('spy_timeline.action_manager');
$subject = $actionManager->findOrCreateComponent('\User', 'chucknorris');
$action = $actionManager->create($subject, $verb, array('directComplement' => 'the world', 'tense' => Verb::PRESENT_TENSE);
$actionManager->updateAction($action);
// Let's assume that the toString is implemented
echo $action; // prints "Chuck Norris controls the world" |
I think tense should be managed in views, you can add a component By this way, timeline already work with it ... without feature of stephpy/timeline-bundle#90 |
Hello Stéphane,
First of all, congratulations, you have done a very good job!
As you probably know, Facebook introduced the Open Graph, and one of the coolest things are the histories . The good thing related to histories is the data duplication reduction and the ease updating information. Furthermore, configuring histories allow you define verb tenses that will be automatically updated according with
dateStart
anddateEnd
properties. This is something that can be introduced in this amazing library.The text was updated successfully, but these errors were encountered: