Beginning with the 1.3.0 release, resource.xml will no longer exist. Its content will be split into dots.xml and router.xml

The resource.xml file stores the resource settings. When talking about resources, we mean modules, dots and other items like the session. If you need more settings related to these resources, feel free to add them here.

resource.xml has the following settings:

  • controllers – the controller for the dots.
  • route – stores the default controller for the modules and the default action for the controllers.
  • session – each module has a different session name and a different session expire time.

resource.xml sample code:

 <?xml version="1.0" encoding="utf-8"?>
 <resources>
     <!-- all controllers listed here -->
     <!-- 1.for whitelist approach & a secure autoload of all controllers -->
	<controllers>
		<frontend>Page</frontend>
		<frontend>User</frontend>
		<admin>Admin</admin>
		<admin>System</admin>
		<admin>User</admin>
	</controllers>
 	<route>
 		<!-- default controllers for modules -->
		<controller>
			<frontend>Page</frontend>
			<admin>System</admin>
		</controller>
		<action>
			<!-- default action for controllers ... -->
			<frontend>
				<Page>home</Page>
				<User>login</User>
			</frontend>
			<admin>
				<Admin>account</Admin>
				<System>dashboard</System>
				<User>list</User>
			</admin>
		</action>
 	</route>
	<!-- session item -->
	<session>
		<frontend>
			<name>frontend</name>
			<rememberMeSeconds>864000</rememberMeSeconds>
		</frontend>
		<admin>
			<name>admin</name>
			<rememberMeSeconds>864000</rememberMeSeconds>
		</admin>		
	</session>
 </resources>

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>