Ejemplo n.º 1
0
 public function create(ExtendedFloGraph $graph, Planck $planck)
 {
     $graph->addInitial($planck->getMapOut(), 'Callback_ForMap', 'callback');
     $graph->addInitial($planck->getContentOut(), 'Callback_ForContent', 'callback');
     if (is_array($planck->getMapIn())) {
         $graph->addInitial($planck->getMapIn(), 'ContentAndMap', 'map');
     }
     $graph->addInitial($planck->getContentIn(), 'ContentAndMap', 'content');
     $graph->addInitial('not sure about this... what should replace it?', 'ContentAndMap', 'last');
     return $this->createNetwork($graph);
 }
Ejemplo n.º 2
0
 /**
  * @param ExtendedFloGraph $graph
  * @return void
  */
 public function setupReplace(ExtendedFloGraph $graph)
 {
     $graph->addEdges(array(['ContentAndMap', 'content', 'WriteContent', 'in'], ['WriteContent', 'out', 'ReadContent', 'in'], ['ReadContent', 'out', 'FloReplace', 'content']));
 }
Ejemplo n.º 3
0
 /**
  * @param ExtendedFloGraph $graph
  * @return void
  */
 public function setupReplaceAfter(ExtendedFloGraph $graph)
 {
     $graph->addEdges(array(['ContentAndMap', 'out', 'ReadOriginalAndPlanckMap', 'in'], ['ReadOriginalAndPlanckMap', 'out', 'FloReplace', 'identities']));
 }
Ejemplo n.º 4
0
 /**
  * @param ExtendedFloGraph $graph
  * @return void
  */
 public function setupExtractStyle(ExtendedFloGraph $graph)
 {
     $graph->addEdges(array(['ExtractOriginals', 'style', 'Style', 'in'], ['Style', 'styleblocks', 'StyleRegexRepeater', 'styleblocks'], ['StyleRegexRepeater', 'identities', 'StyleIdentitiesRegex_Match', 'in'], ['StyleIdentitiesRegex_Match', 'out', 'AddOriginals', 'in'], ['StyleRegexRepeater', 'classes', 'StyleClassesRegex_Match', 'in'], ['StyleClassesRegex_Match', 'out', 'AddOriginals', 'in']));
 }
Ejemplo n.º 5
0
 /**
  * @param ExtendedFloGraph $graph
  * @return void
  */
 public function setupExtractMarkup(ExtendedFloGraph $graph)
 {
     $graph->addEdges(array(['ExtractOriginals', 'markup', 'Markup', 'in'], ['Markup', 'identities', 'MarkupIdentitiesRegex', 'in'], ['MarkupIdentitiesRegex', 'out', 'AddOriginals', 'in'], ['Markup', 'classes', 'MarkupClassesRegex', 'in'], ['MarkupClassesRegex', 'out', 'MarkupClassesFromMatchedRegex', 'in'], ['MarkupClassesFromMatchedRegex', 'out', 'AddOriginals', 'in']));
 }
Ejemplo n.º 6
0
 public static function loadFile($file)
 {
     $graph = ExtendedFloGraph::loadFile($file);
     return ExtendedFloNetwork::create($graph);
 }
Ejemplo n.º 7
0
 /**
  * @param ExtendedFloGraph $graph
  * @return void
  */
 public function setupReplaceStyle(ExtendedFloGraph $graph)
 {
     $graph->addEdges(array(["FloReplace", "identitiesout", "ReplaceStyleSelectors", "identities"], ["FloReplace", "contentout", "ReplaceStyleBlockStyles", "in"], ["ReplaceStyleBlockStyles", "regex", "StyleBlocksRegex_Replace", "in"], ["StyleBlocksRegex_Replace", "out", "ReplaceStyleSelectors", "match"], ["ReplaceStyleBlockStyles", "content", "DisplayOutputForTesting", "in"], ["ReadContent_ForStyleBlocks", "out", "ReplaceStyleSelectors", "content"]));
 }
Ejemplo n.º 8
0
 /**
  * @param ExtendedFloGraph $graph
  * @return void
  */
 public function setupReplaceScript(ExtendedFloGraph $graph)
 {
     $graph->addEdges(array(['FloReplace', 'contentout', 'ReplaceJavaScriptBlocks', 'in'], ['ReplaceJavaScriptBlocks', 'content', 'ReadContent_ForJavaScriptBlocks', 'in'], ['ReadContent_ForJavaScriptBlocks', 'out', 'ReplaceJavaScript', 'content'], ['ReplaceJavaScriptBlocks', 'regex', 'JavaScriptRegex_Replace', 'in'], ['JavaScriptRegex_Replace', 'out', 'ReplaceJavaScript', 'match'], ['FloReplace', 'identitiesout', 'ReplaceJavaScript', 'identities']));
 }
Ejemplo n.º 9
0
 /**
  * @param ExtendedFloGraph $graph
  * @return void
  */
 public function setupReplaceScript(ExtendedFloGraph $graph)
 {
     $graph->addEdges(array(['FloReplace', 'identitiesout', 'ReplaceJavaScript', 'identities'], ['FloReplace', 'contentout', 'ReplaceJavaScript', 'match']));
 }
Ejemplo n.º 10
0
 /**
  * @param ExtendedFloGraph $graph
  * @return void
  */
 public function setupExtract(ExtendedFloGraph $graph)
 {
     $graph->addEdges(array(['ContentAndMap', 'content', 'WriteContent', 'in'], ['WriteContent', 'out', 'ReadContent', 'in'], ['ReadContent', 'out', 'ExtractOriginals', 'in']));
 }
Ejemplo n.º 11
0
 public function setupReplaceMarkup(ExtendedFloGraph $graph)
 {
     $graph->addEdges(array(['FloReplace', 'contentout', 'ReplaceMarkupIdentities', 'content'], ['FloReplace', 'identitiesout', 'ReplaceMarkupIdentities', 'identities'], ['FloReplace', 'contentout', 'ReplaceMarkupClasses', 'content'], ['FloReplace', 'identitiesout', 'ReplaceMarkupClasses', 'identities']));
 }
Ejemplo n.º 12
0
 /**
  * @param ExtendedFloGraph $graph
  * @return void
  */
 public function setupAddOriginals(ExtendedFloGraph $graph)
 {
     $graph->addEdges(array(['AddOriginals', 'out', 'RemoveUselessOriginals', 'in'], ['RemoveUselessOriginals', 'out', 'SortOriginalsByLength', 'in'], ['SortOriginalsByLength', 'out', 'OriginalsToPlancks', 'in']));
 }