The following code does not work :
$s = new jSelectorInterface('test');
$long_selector = $s->toString(true);
$s2 = jSelectorFactory::create($long_selector);
Because here, $long_selector equals "iface:modulename~test" and then jSelectorFactory tries to create a jSelectoriface instead of a jSelectorInterface.
I see 2 solutions :
- Rename jSelectorInterface to jSelectorIface but this may cause a problem to those who already use jSelectorInterface directly (without jClass::incIface), maybe not many people after all.
- Change regexp of jSelectorFactory from "/^([a-z]{3,5})\:([\w~\/\.]+)$/" to "/^([a-z]{3,9})\:([\w~\/\.]+)$/" and change jSelectorInterface::type to "interface"
But maybe I don't see all impacts of such modifications...
Your choice.