IFacade
public protocol IFacade : INotifier
The interface definition for a PureMVC Facade.
The Facade Pattern suggests providing a single class to act as a central point of communication for a subsystem.
In PureMVC, the Facade acts as an interface between the core MVC actors (Model, View, Controller) and the rest of your application.
@see org.puremvc.swift.interfaces.IModel IModel
@see org.puremvc.swift.interfaces.IView IView
@see org.puremvc.swift.interfaces.IController IController
@see org.puremvc.swift.interfaces.ICommand ICommand
@see org.puremvc.swift.interfaces.INotification INotification
-
Check if a Proxy is registered
Declaration
Swift
func hasProxy(_ proxyName: String) -> BoolParameters
proxyNameReturn Value
whether a Proxy is currently registered with the given
proxyName. -
Register an
ICommandwith theController.Declaration
Swift
func registerCommand(_ notificationName: String, closure: @escaping () -> ICommand)Parameters
noteNamethe name of the
INotificationto associate theICommandwith.closurereference that returns
ICommand -
Check if a Command is registered for a given Notification
Declaration
Swift
func hasCommand(_ notificationName: String) -> BoolParameters
notificationNameReturn Value
whether a Command is currently registered for the given
notificationName. -
Remove a previously registered
ICommandtoINotificationmapping from the Controller.Declaration
Swift
func removeCommand(_ notificationName: String)Parameters
notificationNamethe name of the
INotificationto remove theICommandmapping for -
Check if a Mediator is registered or not
Declaration
Swift
func hasMediator(_ mediatorName: String) -> BoolParameters
mediatorNameReturn Value
whether a Mediator is registered with the given
mediatorName. -
Notify the
IObserversfor a particularINotification.All previously attached
IObserversfor thisINotification‘s list are notified and are passed a reference to theINotificationin the order in which they were registered.NOTE: Use this method only if you are sending custom Notifications. Otherwise use the sendNotification method which does not require you to create the Notification instance.
Declaration
Swift
func notifyObservers(_ notification: INotification)Parameters
notificationthe
INotificationto notifyIObserversof.
IFacade Protocol Reference