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.multicore.interfaces.IModel IModel
@see org.puremvc.swift.multicore.interfaces.IView IView
@see org.puremvc.swift.multicore.interfaces.IController IController
@see org.puremvc.swift.multicore.interfaces.ICommand ICommand
@see org.puremvc.swift.multicore.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
Observers.This method is left public mostly for backward compatibility, and to allow you to send custom notification classes using the facade.
Usually you should just call sendNotification and pass the parameters, never having to construct the notification yourself.
Declaration
Swift
func notifyObservers(_ notification: INotification)Parameters
notificationthe
INotificationto have theViewnotifyObserversof.
IFacade Protocol Reference