I imagine that frameworks usually do the following to create a simple text field:
$campoTexto = new CampoTexto("nomeDoCampo", "valorDoCampo");
$campoTexto->gera();
The result would be:
<input type="text" name="nomeDoCampo" value="valorDoCampo">
My question is, is there any class / function that reverse-engineers the code above? I imagine something like this:
$tag = new ObjetoMilagroso("<input type=\"text\" name=\"nomeDoCampo\" value=\"valorDoCampo\">");
print $tag->type . " - " . $tag->name . " - " .$tag->value;
The result:
input - fieldName - field value