Changeset View
Changeset View
Standalone View
Standalone View
src/grammar/PhutilContextFreeGrammar.php
| <?php | <?php | ||||
| /** | /** | ||||
| * Generate nonsense test data according to a context-free grammar definition. | * Generate nonsense test data according to a context-free grammar definition. | ||||
| */ | */ | ||||
| abstract class PhutilContextFreeGrammar { | abstract class PhutilContextFreeGrammar extends Phobject { | ||||
| private $limit = 65535; | private $limit = 65535; | ||||
| abstract protected function getRules(); | abstract protected function getRules(); | ||||
| public function generateSeveral($count, $implode = ' ') { | public function generateSeveral($count, $implode = ' ') { | ||||
| $paragraph = array(); | $paragraph = array(); | ||||
| for ($ii = 0; $ii < $count; $ii++) { | for ($ii = 0; $ii < $count; $ii++) { | ||||
| ▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines | |||||