Esempio n. 1
0
 /**
  * @param int|array $sentences
  *
  * @throws InvalidArgumentException
  */
 public function __construct($sentences = null)
 {
     if (empty($sentences) || !is_int($sentences)) {
         throw new InvalidArgumentException('You have to pass the number of sentences.');
     }
     $parameters = [];
     $parameters['formatter'] = 'sentence';
     $parameters['arguments'] = array('nbSentences' => $sentences);
     parent::__construct($parameters);
 }
 public function __construct(array $arguments = array())
 {
     $arguments['formatter'] = 'company';
     parent::__construct($arguments);
 }
 public function __construct(array $arguments = array())
 {
     $arguments['formatter'] = 'firstName';
     parent::__construct($arguments);
 }