Changeset 11748
- Timestamp:
- 09/23/08 15:21:56 (5 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfPHPFitPlugin/trunk/README
r11747 r11748 1 # sfPHPFitPlugin # 1 sfPHPFitPlugin 2 ============== 2 3 3 # Installation # 4 Installation 5 ============ 4 6 5 * Install the plugin 7 Install the plugin 8 ------------------ 6 9 7 {{{ 8 10 [shell] 9 11 php symfony plugin-install http://plugins.symfony-project.com/sfPHPFitPlugin 10 12 11 }}} 13 Enable the module in your *settings.yml* 14 ---------------------------------------- 12 15 13 * Enable the module in your *settings.yml* 14 15 {{{ 16 16 [yml] 17 17 dev: 18 18 .settings: 19 19 enabled_modules: [phpFit] 20 20 21 }}} 21 Clear your cache 22 ---------------- 22 23 23 * Clear your cache 24 25 {{{ 26 24 [shell] 27 25 php symfony cc 28 26 29 }}} 27 Add the settings *app.yml* 28 -------------------------- 30 29 31 * Add the settings *app.yml* 32 33 {{{ 34 30 [yml] 35 31 dev: 36 32 fit: … … 66 62 class: PHPFitWiki_Textile 67 63 68 }}}69 64 70 # Usage # 65 Usage 66 ===== 71 67 72 * create HTML test case 68 create HTML test case 69 --------------------- 73 70 74 {project_path}/test/acceptance/input71 {project_path}/test/acceptance/input 75 72 76 73 examples 77 74 : sfPHPFitPlugin/test_example/acceptance/input 78 75 79 * testcase index80 76 81 http://{your symfony app path}/fit 77 access testcase index 78 -------------- 79 80 http://{your symfony app path}/fit 82 81 83 82 or 84 83 85 http://{your symfony app path}/fit/index84 http://{your symfony app path}/fit/index 86 85 87 * run testcase88 86 89 http://{your symfony app path}/fit/process?in=example.html&type=html 87 run testcase 88 ------------ 89 90 http://{your symfony app path}/fit/process?in=example.html&type=html 90 91 91 * create fixture 92 create fixture 93 -------------- 92 94 93 {project_path}/test/acceptance/fixture95 {project_path}/test/acceptance/fixture 94 96 95 examples: sfPHPFitPlugin/test_example/acceptance/fixture 97 examples 98 : sfPHPFitPlugin/test_example/acceptance/fixture 96 99 97 # Includes package # 100 101 102 Includes vendors 103 ================ 98 104 99 105 PHPFit … … 102 108 HatenaSyntax 103 109 : <http://coderepos.org/share/wiki/HatenaSyntax> 110 plugins/sfPHPFitPlugin/trunk/lib/vendor/HatenaSyntax/HatenaSyntax.php
r11746 r11748 78 78 public function addFirstCharSyntax(HatenaSyntax_FirstCharSyntaxInterface $syntax) 79 79 { 80 $this->firstCharSyntaxes[$syntax->getIdentifier()] = &$syntax;80 $this->firstCharSyntaxes[$syntax->getIdentifier()] = $syntax; 81 81 return $this; 82 82 } 83 83 public function addInlineSyntax(HatenaSyntax_InlineSyntaxInterface $syntax) 84 84 { 85 $this->inlineSyntaxes[] = &$syntax;85 $this->inlineSyntaxes[] = $syntax; 86 86 return $this; 87 87 } 88 88 public function parseStructure($contents) 89 89 { 90 $openingTags = &$this->openingTags;91 $closingTags = &$this->closingTags;92 $markupSyntaxes = &$this->markupSyntaxes;93 $firstCharSyntaxes = &$this->firstCharSyntaxes;90 $openingTags = $this->openingTags; 91 $closingTags = $this->closingTags; 92 $markupSyntaxes = $this->markupSyntaxes; 93 $firstCharSyntaxes = $this->firstCharSyntaxes; 94 94 95 95 $lines = $this->getLines($contents); … … 101 101 // MarkupSyntaxだったら 102 102 if(isset($openingTags[$lines[$i]])) { 103 $block['syntax'] = &$markupSyntaxes[$lines[$i]];103 $block['syntax'] = $markupSyntaxes[$lines[$i]]; 104 104 $block['type'] = 'markup'; 105 105 … … 113 113 $firstChar = $this->getFirstCharSyntaxIdentifier($lines[$i]); 114 114 115 $block['syntax'] = &$firstCharSyntaxes[$firstChar];115 $block['syntax'] = $firstCharSyntaxes[$firstChar]; 116 116 $block['type'] = 'firstchar'; 117 117 … … 300 300 $id = $this->id; 301 301 $line = $result[0] 302 . '(<a href="#f' . $num . $id . '" name =" #b' . $num . $id302 . '(<a href="#f' . $num . $id . '" name ="b' . $num . $id 303 303 .'" title="' . $result[1] . '">*' . $num . '</a>)' . $result[2] . PHP_EOL; 304 304 } … … 334 334 335 335 foreach($footnotes as $num => $note) 336 $result .= '<p><a href="#b' . ++$num . $id . '" name=" #f' . $num . $id . '">*' . $num336 $result .= '<p><a href="#b' . ++$num . $id . '" name="f' . $num . $id . '">*' . $num 337 337 . '</a>: ' . $note . '</p>' . PHP_EOL; 338 338