PHP 클래스 HM\BackUpWordPress\Notices

Notices are messages along with an associated context, by default they are stored in the db and thus persist between page loads.
파일 보기 프로젝트 열기: humanmade/backupwordpress 1 사용 예제들

공개 메소드들

메소드 설명
clear_all_notices ( ) Clear all notices including persistent ones
get_instance ( ) : Notices Returns the *Singleton* instance of this class.
get_notices ( string $context = '' ) : array Fetch an array of notices messages
set_notices ( string $context, array $messages, boolean $persistent = true ) Set an array of notice messages for a specific context

보호된 메소드들

메소드 설명
__construct ( ) Protected constructor to prevent creating a new instance of the *Singleton* via the new operator from outside of this class.

비공개 메소드들

메소드 설명
__clone ( ) Private clone method to prevent cloning of the instance of the *Singleton* instance.
__wakeup ( ) Private unserialize method to prevent unserializing of the *Singleton* instance.
get_all_notices ( ) : array Get both standard and persistent notices
get_persistent_notices ( ) : array Load the persistent notices from the database

메소드 상세

__construct() 보호된 메소드

Protected constructor to prevent creating a new instance of the *Singleton* via the new operator from outside of this class.
protected __construct ( )

clear_all_notices() 공개 메소드

Clear all notices including persistent ones
public clear_all_notices ( )

get_instance() 공개 정적인 메소드

Returns the *Singleton* instance of this class.
public static get_instance ( ) : Notices
리턴 Notices The *Singleton* instance.

get_notices() 공개 메소드

If you specify a context then you'll just get messages for that context otherwise you get multidimensional array of all contexts and their messages.
public get_notices ( string $context = '' ) : array
$context string The context that you'd like the messages for
리턴 array The array of notice messages

set_notices() 공개 메소드

Set an array of notice messages for a specific context
public set_notices ( string $context, array $messages, boolean $persistent = true )
$context string The context of the notice message
$messages array The array of messages
$persistent boolean Whether the notice should persist via the database. Defaults to true.