protected static function parseProperty($property)
{
$name = '(?P<name>[\\w\\-]*)';
$args = '(?:\\((?P<args>[^\\)]+)\\))';
$regexp = '/(?:' . $name . $args . '?)?/is';
if (preg_match($regexp, $property, $segments)) {
$result = [];
$result['name'] = $segments['name'];
$result['args'] = isset($segments['args']) ? explode('|', $segments['args']) : [];
return $result;
}
throw new RuntimeException('Invalid selector');
}