PureMVC ApplicationFacade类模板
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PureMVC ApplicationFacade类模板相关的知识,希望对你有一定的参考价值。
/** * Base PureMVC Project */ package { import org.puremvc.as3.interfaces.IFacade; import org.puremvc.as3.patterns.facade.Facade; import controller.*; /** * Simple ApplicationFacade for PureMVC Structured Project */ public class ApplicationFacade extends Facade implements IFacade { /** * Notification name constants */ public static const STARTUP:String = "startup"; /** * Singleton ApplicationFacade Factory Method */ public static function getInstance(): ApplicationFacade { if (instance == null) { instance = new ApplicationFacade( ); } return instance as ApplicationFacade; } /** * Broadcast the STARTUP Notification */ public function startup(app:Object):void { sendNotification( STARTUP, app ); } /** * Register Commands with the Controller */ override protected function initializeController():void { super.initializeController(); registerCommand(STARTUP, StartupCommand); } } }
以上是关于PureMVC ApplicationFacade类模板的主要内容,如果未能解决你的问题,请参考以下文章