public static function isValidWebhooksClass($className, $classCollection = null)
    {
        if (!isset($classCollection)) {
            $classCollection = ReflectionUtil::loadWebServicesClassAndReturnNames();
        }

        if (!isset($className) || trim($className) === '') {
            return null;
        }

        $singlerClassName = ClassNamingUtil::singularize($className);
        $capitalFirstSinglerClassName = ucfirst($singlerClassName);

        foreach ($classCollection as $k => $v) {
            if (strcmp($capitalFirstSinglerClassName, $v) == 0) {
                return $capitalFirstSinglerClassName;
            }
        }

        return null;
    }
public static function isValidWebhooksClass($className, $classCollection = null)
    {
        if (!isset($classCollection)) {
            $classCollection = ReflectionUtil::loadWebServicesClassAndReturnNames();
        }

        if (!isset($className) || trim($className) === '') {
            return null;
        }

        $singlerClassName = ClassNamingUtil::singularize($className);
        $capitalFirstSinglerClassName = ucfirst($singlerClassName);

        foreach ($classCollection as $k => $v) {
            if (strcmp($capitalFirstSinglerClassName, $v) == 0) {
                return $capitalFirstSinglerClassName;
            }
        }

        return null;
    }
public static function isValidWebhooksClass ( $ className , $ classCollection = null ) { if ( ! isset ( $ classCollection ) ) { $ classCollection = ReflectionUtil :: loadWebServicesClassAndReturnNames ( ) ; } if ( ! isset ( $ className ) || trim ( $ className ) === '' ) { return null ; } $ singlerClassName = ClassNamingUtil :: singularize ( $ className ) ; $ capitalFirstSinglerClassName = ucfirst ( $ singlerClassName ) ; foreach ( $ classCollection as $ k => $ v ) { if ( strcmp ( $ capitalFirstSinglerClassName , $ v ) == 0 ) { return $ capitalFirstSinglerClassName ; } } return null ; }
When given a WehbooksService name, check if the given class name is defined on the WehbooksService directory

@param $className
The object name that belongs to WebhooksService
@param null $classCollection
Default to be null. User can choose to pass their own collection
@return null|string
If the class name can be found in Webhooks Service, return the name; otherwise, return null.
When given a WehbooksService name check if the given class name is defined on the WehbooksService directory