This Chapter applies to all cases of habeas corpus for the enlargement of persons illegally held in custody or in any manner restrained in their personal liberty, for the admission of prisoners to bail, and for the discharge of prisoners before indictment upon a hearing of the testimony. Instead of a writ of habeas corpus in other cases heretofore used, a simple order shall be substituted.
Tex. Code Crim. Proc. § 11.64