static protected function getByGetter($object, $propertyName, $failOnUnknownGetter)
    {
        $getter = array($object, 'get' . $propertyName);

        if (is_callable($getter))
        {
            return call_user_func($getter);
        }
        elseif ($failOnUnknownGetter === true)
        {
            throw new RuntimeException("Unknown getter for property '{$propertyName}'");
        }
    }