2017 © Pedro PelĂĄez
 

library rutverifier

This class is able to do integrity verification on chilean RUTs and RUNs

image

unreal4u/rutverifier

This class is able to do integrity verification on chilean RUTs and RUNs

  • Thursday, April 10, 2014
  • by unreal4u
  • Repository
  • 1 Watchers
  • 0 Stars
  • 32 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 15 Versions
  • 0 % Grown

The README.md

Latest Stable Version Build Status Scrutinizer Code Quality Code Coverage License, (*1)

rutverifier.php

Credits

This class is made by unreal4u (Camilo Sperberg) Homepage, (*2)

About this class

  • Can be used to verify chilean RUT (Rol Ășnico tributario) or RUN (Rol Ășnico nacional). (Difference [spanish])
  • Will give you some information, such as the RUT/RUN being consulted is an enterprise (RUT) or a natural person (RUN).
  • Allows you to make use of a blacklist (Useful for known frauders).
  • Will also format the RUT/RUN into the correct format.
  • Can deliver also a pure (more basic) Javascript coded version to verify the validity of a RUT/RUN

Detailed description

This package will do all kinds of things you can do with a RUT or RUN, such as:, (*3)

  • Verifying that it is valid.
  • Finding out whether it is a RUT or a RUN.
  • Format it to the correct format to use / store / work with

Basic usage

include('src/unreal4u/rutverifier.php');
$rutVerifier = new unreal4u\rutverifier();
$result = $rutVerifier->isValidRUT('30.686.957-4');
  • Congratulations! Result does now contain true or false depending on the RUT/RUN being valid or not.
  • Please see examples for more options and advanced usage

Composer

This class has support for Composer install. Just add the following section to your composer.json with:, (*4)

{
    "require": {
        "unreal4u/rutverifier": "@stable"
    }
}

Now you can instantiate a new rutverifier class by executing:, (*5)

require('vendor/autoload.php');

$rutverifier = new unreal4u\rutverifier();

Don't forget to do a composer.phar install or download and include http://packagist.org/unreal4u/rutverifier-js manually, (*6)

Pending

  • Class will throw exceptions instead of adding silently to an internal error array
  • Native i18n support

Version History

  • 1.0 :
    • Initial version
  • 1.1:
    • PHPUnit testing
    • Documentation improved (Created this README actually)
    • More examples
    • Solved some bugs
  • 1.2:
    • Compatibility with composer
    • Better documentation
  • 1.2.1:
    • Real compatibility with composer
  • 1.2.2:
    • Minor bugs in documentation
  • 1.2.4:
    • Documentation
    • Better PHPUnit tests
    • Fixed a bug related to cache and blacklisting
    • Included PHPDocumentor to src code
  • 1.2.6:
    • Excluded PHPDocumentation
  • 1.2.8:
    • Travis-CI support
    • Very small optimization on Javascript function
    • Began deprecating some old naming conventions
  • 2.0.0:
    • Removed c_javascript function
    • Standarized data type on return for all functions, no more mixed types
    • Updated PHPUnit dependency to latest stable version
    • Will now test PHP 5.3 in Travis-CI as well
    • Class will now sprintf into the error array in preparation for later i18n implementation
  • 2.1.0:
    • Now checking JavaScript code with grunt
  • 2.2.0:
    • This class has now a dependency on unreal4u/rutverifier-js, downloadable on packagist
    • Cleaned up javascript code that had nothing to do with PHP

Contact the author

The Versions

10/04 2014

dev-master

9999999-dev

This class is able to do integrity verification on chilean RUTs and RUNs

  Sources   Download

MIT

The Requires

 

The Development Requires

run rut chile rutverifier carnet de identidad cedula de identidad

22/03 2014

v2.2.1

2.2.1.0

This class is able to do integrity verification on chilean RUTs and RUNs

  Sources   Download

MIT

The Requires

 

The Development Requires

run rut chile rutverifier carnet de identidad cedula de identidad

22/03 2014

v2.2.0

2.2.0.0

This class is able to do integrity verification on chilean RUTs and RUNs

  Sources   Download

MIT

The Requires

 

The Development Requires

run rut chile rutverifier carnet de identidad cedula de identidad

19/03 2014

v2.1.0

2.1.0.0

This class is able to do integrity verification on chilean RUTs and RUNs

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

run rut chile rutverifier carnet de identidad cedula de identidad

11/03 2014

v2.0.0

2.0.0.0

This class is able to do integrity verification on chilean RUTs and RUNs

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

run rut chile rutverifier carnet de identidad cedula de identidad

27/02 2014

v1.2.10

1.2.10.0

This class is able to do integrity verification on chilean RUTs and RUNs

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

run rut chile rutverifier carnet de identidad cedula de identidad

27/02 2014

v1.2.9

1.2.9.0

This class is able to do integrity verification on chilean RUTs and RUNs

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

run rut chile rutverifier carnet de identidad

21/02 2014

v1.2.8

1.2.8.0

This class is able to do integrity verification on chilean RUTs and RUNs

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

08/01 2014

v1.2.7

1.2.7.0

This class is able to do integrity verification on chilean RUTs and RUNs

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

07/01 2014

v1.2.6

1.2.6.0

This class is able to do integrity verification on chilean RUTs and RUNs

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

07/01 2014

v1.2.5

1.2.5.0

This class is able to do integrity verification on chilean RUTs and RUNs

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

07/01 2014

v1.2.4

1.2.4.0

This class is able to do integrity verification on chilean RUTs and RUNs

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

28/12 2013

v1.2.3

1.2.3.0

This class is able to do integrity verification on chilean RUTs and RUNs

  Sources   Download

MIT

The Development Requires

27/12 2013

v1.2.2

1.2.2.0

This class is able to do integrity verification on chilean RUTs and RUNs

  Sources   Download

MIT

The Development Requires

26/12 2013

v1.2.1

1.2.1.0

This class is able to do integrity verification on chilean RUTs and RUNs

  Sources   Download

MIT

The Development Requires