public static function getMaxLength($array, $key) {
        $maxLen = 0;
        foreach ($array as $element) {
            $str = call_user_func(array($element, $key));
            $maxLen = strlen($str) > $maxLen ? strlen($str) : $maxLen;
        }
        return $maxLen;
    }