The right to receive compensation, as has been seen, is founded upon custom; and as it has been thought expedient to secure a certain amount of uniformity in these matters, the legislature has intervened, and they are now for the most part regulated by statute