1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 18:32:41 +01:00
phorge-phorge/src/applications/diviner/atomizer/DivinerFileAtomizer.php
epriestley 57a9c3f07c Improve Diviner handling of paths and remarkup
Summary:
  - Currently, the atomizers don't emit atoms with the right file in all cases. Make them always emit it correctly.
  - Currently, we use absolute paths in some cases and relative paths in other cases. Use them consistently: relative when storing/presenting, absolute when accessing data.
  - Don't preserve linebreaks when marking up documentation (documentation is generally wrapped at 80col, but should not be wrapped in this way when displayed).
  - Markup Diviner link rules (albeit uselesly).

Test Plan:
Before:

{F33044}

After:

{F33045}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D4992
2013-02-17 15:40:44 -08:00

14 lines
303 B
PHP

<?php
final class DivinerFileAtomizer extends DivinerAtomizer {
protected function executeAtomize($file_name, $file_data) {
$atom = $this->newAtom(DivinerAtom::TYPE_FILE)
->setName($file_name)
->setFile($file_name)
->setContentRaw($file_data);
return array($atom);
}
}