View stunning SlideShares in full-screen with the new iOS app!Introducing SlideShare for AndroidExplore all your favorite topics in the SlideShare appGet the SlideShare app to Save for Later — even offline
View stunning SlideShares in full-screen with the new Android app!View stunning SlideShares in full-screen with the new iOS app!
OverviewObjectiveLearn how to use the bootstrap for configuring thesystem.Requirements Installed Version of ProdigyView Understanding of the DefinesEstimated Time7 Minutes www.prodigyview.com
Follow Along With A Code Example1. Download a copy of the example code at www.prodigyview.com/source.2. Install the system in an environment you feel comfortable testing in.3. Proceed to examples/basics/Bootstrap.php www.prodigyview.com
What is the BootstrapIn computer science, the term bootstrap refers to startinga system.In ProdigyView, the Bootstrap is used to configure thesystem and load the necessary data and files beforeexecution.In addition to several ways of booting the system, thereare numerous configurations that can be passed to thebootstrap to customize it.In many of the examples, if you look at the top of file youwill notice that the system is booted before any code isexecuted. www.prodigyview.com
Concepts Covered Booting the entire system Boot the system without plugins Booting the system without a database Class Loader Bootstrap Options Bootstrap Configuration www.prodigyview.com
_BootCompleteSystemThe file _BootCompleteSystem.php is the automaticconfiguration when booting the entire system. Thisincludes setting the database, loading plugins, loading thelibraries, etc. www.prodigyview.com
_BootSystemMinusPluginsThis boot options completely boots the entire system butdoes not load any plug-ins. www.prodigyview.com
_BootSystemMinusDatabaseThis boot configuration will boot the system but will notconnect or set any database options. This means thatdatabase dependent features such as plug-ins will alsonot be booted. Unless a database is set at a differentpoint in time, you will also not have access too otherdatabase coupled features such as: CMS Applications MVC Initializer
Custom Bootstrap – Class LoaderThe previous boot options provided by ProdigyView arevery basic. Adding a more complex bootstrapconfiguration can be accomplished easily. Start by usingthe _classLoader. The _classLoader will enable the usageof all the core libraries.
Custom Bootstrap - OptionsNext we have to configure the options that are passedinto the PVBoostrap::bootSystem() method. Theseoptions control which classes are initialized. A completelist of configuration options is available in the API. www.prodigyview.com
Boostrap Config Option The most important function in the bootstrap is the config options array. The variables in the array are passed to the init functions of various other classes. PVBootstrap Config ArrayPVLibraries::init PVTemplate::init PVSession::init PVSecurity::init PVRouter::init
Challenge!If you are new to ProdigyView and also new to programming, thischallenge may be a little more difficult than the others.Go into the code of the file ‘core/system/PVSession.php’ initmethod. Modify the variables in the config section of thebootstrap in a way that it will affect your cookies. www.prodigyview.com
Bootstrap ReviewThe bootstrap has many options that can change the wayyour system functions. Throughout various othertutorials, we will touch upon areas that will help youmodify the bootstrap to fit your needs. www.prodigyview.com
ReferencesFor further references, click on the following links: PVBootstrap PVBootstrap::bootSystem() www.prodigyview.com