static protected function setBySetter($object, $propertyName, $propertyValue, $failOnUnknownGetter)
    {
        $setter = array($object, 'set' . $propertyName);

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