Пример #1
0
 /**
  * Adiciona as colunas para ler o arquivo.
  *
  * @param int                   $start
  * @param int                   $length
  * @param AbstractFilter|string $type
  * @param bool|array            $config array de config ou bool apenas obrigatorio
  *
  * @return Column
  */
 public function createColumn($start, $length, $type = null, $config = false)
 {
     if (is_string($type)) {
         $type = Types::getType($type, $config);
     }
     return new Column($start, $length, $type);
 }
Пример #2
0
 /**
  * Testa hasType.
  */
 public function testHasType()
 {
     $this->assertFalse(Types::hasType('custon1'));
     $this->assertTrue(Types::hasType('string'));
     Types::addType('custon1', 'CustonFilter');
     $this->assertTrue(Types::hasType('custon1'));
 }