public static function loadWebServicesClassAndReturnNames($dir = null)
    {
        if ($dir == null) {
            $dir = dirname(__DIR__) . DIRECTORY_SEPARATOR . UtilityConstants::WEBHOOKSDIR;
        }

        $webhooksClassNames = array();

        foreach (glob("{$dir}/*.php") as $fileName) {
            require_once($fileName);
            //get class name
            $className = substr($fileName, strrpos($fileName, '/') + 1);
            //remove extension
            $classNameWithoutExtension = preg_replace('/\\.[^.\\s]{3,4}$/', '', $className);
            array_push($webhooksClassNames, $classNameWithoutExtension);
        }
        return $webhooksClassNames;
    }
public static function loadWebServicesClassAndReturnNames($dir = null)
    {
        if ($dir == null) {
            $dir = dirname(__DIR__) . DIRECTORY_SEPARATOR . UtilityConstants::WEBHOOKSDIR;
        }

        $webhooksClassNames = array();

        foreach (glob("{$dir}/*.php") as $fileName) {
            require_once($fileName);
            //get class name
            $className = substr($fileName, strrpos($fileName, '/') + 1);
            //remove extension
            $classNameWithoutExtension = preg_replace('/\\.[^.\\s]{3,4}$/', '', $className);
            array_push($webhooksClassNames, $classNameWithoutExtension);
        }
        return $webhooksClassNames;
    }
public static function loadWebServicesClassAndReturnNames ( $ dir = null ) { if ( $ dir == null ) { $ dir = dirname ( __DIR__ ) . DIRECTORY_SEPARATOR . UtilityConstants :: WEBHOOKSDIR ; } $ webhooksClassNames = array ( ) ; foreach ( glob ( "{$dir}/*.php" ) as $ fileName ) { require_once ( $ fileName ) ; //get class name $ className = substr ( $ fileName , strrpos ( $ fileName , '/' ) + 1 ) ; //remove extension $ classNameWithoutExtension = preg_replace ( '/\\.[^.\\s]{3,4}$/' , '' , $ className ) ; array_push ( $ webhooksClassNames , $ classNameWithoutExtension ) ; } return $ webhooksClassNames ; }
Get all WebhooksService Class under WebhooksService directory

Pre-assumption: the WebhooksService dir is at the top layer of the SDK class.

@return array
Get all WebhooksService Class under WebhooksService directory