/** * Creates `count` number of documents with fake data for the given module. * * @param IModule $module module to create documents for * @param array $options use `count` for number of documents to create. For other options see fill() method. * * @return array of new documents with fake data * * @throws \Dat0r\Core\Document\InvalidValueException in case of fake data being invalid for the given field * @throws \InvalidArgumentException in case of invalid locale option string * @throws \Dat0r\Core\Error\LogicException on AggregateField misconfiguration * @throws \Dat0r\Core\Error\InvalidImplementorException on various misconfigurations * @throws \Dat0r\Core\Error\ObjectImmutableException if an instance is frozen (closed to modifications) */ public static function createDocuments(IModule $module, array $options = array()) { $data_generator = new DataGenerator(); return $data_generator->createFakeDocuments($module, $options); }