Update length_class.php

Make it class extension friendly, especially for method addLengthClass