public static function getSimpleAnnouncement(
        $announcementPathFile=Null
    ) {

        // If you modify this default path, make sure you use the right kind of slash
        if ( ! $announcementPathFile) {
            $announcementPathFile = '/data/ssp-announcement.php';
        }

        if ( ! file_exists($announcementPathFile)) {
            return Null;
        }

        //  Note: This will not actually catch errors in the included file
        try {
            $announcement = include $announcementPathFile;
        } catch (Exception $e) {
            return Null;
        }

        if ( ! is_string($announcement)) {
            return Null;
        }

        return $announcement;

    }
public static function getSimpleAnnouncement(
        $announcementPathFile=Null
    ) {

        // If you modify this default path, make sure you use the right kind of slash
        if ( ! $announcementPathFile) {
            $announcementPathFile = '/data/ssp-announcement.php';
        }

        if ( ! file_exists($announcementPathFile)) {
            return Null;
        }

        //  Note: This will not actually catch errors in the included file
        try {
            $announcement = include $announcementPathFile;
        } catch (Exception $e) {
            return Null;
        }

        if ( ! is_string($announcement)) {
            return Null;
        }

        return $announcement;

    }
public static function getSimpleAnnouncement ( $ announcementPathFile = Null ) { // If you modify this default path, make sure you use the right kind of slash if ( ! $ announcementPathFile ) { $ announcementPathFile = '/data/ssp-announcement.php' ; } if ( ! file_exists ( $ announcementPathFile ) ) { return Null ; } //  Note: This will not actually catch errors in the included file try { $ announcement = include $ announcementPathFile ; } catch ( Exception $ e ) { return Null ; } if ( ! is_string ( $ announcement ) ) { return Null ; } return $ announcement ; }
Includes a php file and if it is only a string, returns that string. Otherwise, returns Null.

@param string $announcementPathFile - optional for unit tests
If missing, then the announcement file will be expected to be /data/ssp-announcement.php
@return string|null
Includes a php file and if it is only a string returns that string . Otherwise returns Null .