how to configure the bootstrap in php - prodigyview
DESCRIPTION
Learn how to modify the bootstrap to correctly boot the systemTRANSCRIPT
![Page 2: How to configure the Bootstrap in PHP - ProdigyView](https://reader033.vdocument.in/reader033/viewer/2022052321/548287bdb079592e0c8b482c/html5/thumbnails/2.jpg)
OverviewObjective
Learn how to use the bootstrap for configuring the system.
Requirements
Installed Version of ProdigyView
Understanding of the Defines
Estimated Time
7 Minutes
www.prodigyview.com
![Page 3: How to configure the Bootstrap in PHP - ProdigyView](https://reader033.vdocument.in/reader033/viewer/2022052321/548287bdb079592e0c8b482c/html5/thumbnails/3.jpg)
Follow Along With A Code Example
1. 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
![Page 4: How to configure the Bootstrap in PHP - ProdigyView](https://reader033.vdocument.in/reader033/viewer/2022052321/548287bdb079592e0c8b482c/html5/thumbnails/4.jpg)
What is the BootstrapIn computer science, the term bootstrap refers to starting a system.
In ProdigyView, the Bootstrap is used to configure the system and load the necessary data and files before execution.
In addition to several ways of booting the system, there are numerous configurations that can be passed to the bootstrap to customize it.
In many of the examples, if you look at the top of file you will notice that the system is booted before any code is executed.
www.prodigyview.com
![Page 5: How to configure the Bootstrap in PHP - ProdigyView](https://reader033.vdocument.in/reader033/viewer/2022052321/548287bdb079592e0c8b482c/html5/thumbnails/5.jpg)
Concepts CoveredBooting the entire system
Boot the system without plugins
Booting the system without a database
Class Loader
Bootstrap Options
Bootstrap Configuration
www.prodigyview.com
![Page 6: How to configure the Bootstrap in PHP - ProdigyView](https://reader033.vdocument.in/reader033/viewer/2022052321/548287bdb079592e0c8b482c/html5/thumbnails/6.jpg)
_BootCompleteSystemThe file _BootCompleteSystem.php is the automatic configuration when booting the entire system. This includes setting the database, loading plugins, loading the libraries, etc.
www.prodigyview.com
![Page 7: How to configure the Bootstrap in PHP - ProdigyView](https://reader033.vdocument.in/reader033/viewer/2022052321/548287bdb079592e0c8b482c/html5/thumbnails/7.jpg)
_BootSystemMinusPluginsThis boot options completely boots the entire system but does not load any plug-ins.
www.prodigyview.com
![Page 8: How to configure the Bootstrap in PHP - ProdigyView](https://reader033.vdocument.in/reader033/viewer/2022052321/548287bdb079592e0c8b482c/html5/thumbnails/8.jpg)
_BootSystemMinusDatabase
This boot configuration will boot the system but will not connect or set any database options. This means that database dependent features such as plug-ins will also not be booted. Unless a database is set at a different point in time, you will also not have access too other database coupled features such as:
CMS
Applications
MVC Initializer
![Page 9: How to configure the Bootstrap in PHP - ProdigyView](https://reader033.vdocument.in/reader033/viewer/2022052321/548287bdb079592e0c8b482c/html5/thumbnails/9.jpg)
Custom Bootstrap – Class Loader
The previous boot options provided by ProdigyView are very basic. Adding a more complex bootstrap configuration can be accomplished easily. Start by using the _classLoader. The _classLoader will enable the usage of all the core libraries.
![Page 10: How to configure the Bootstrap in PHP - ProdigyView](https://reader033.vdocument.in/reader033/viewer/2022052321/548287bdb079592e0c8b482c/html5/thumbnails/10.jpg)
Custom Bootstrap - Options
Next we have to configure the options that are passed into the PVBoostrap::bootSystem() method. These options control which classes are initialized. A complete list of configuration options is available in the API.
www.prodigyview.com
![Page 11: How to configure the Bootstrap in PHP - ProdigyView](https://reader033.vdocument.in/reader033/viewer/2022052321/548287bdb079592e0c8b482c/html5/thumbnails/11.jpg)
Boostrap Config OptionThe 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 Array
PVLibraries::init
PVTemplate::init
PVSession::init PVSecurity::init PVRouter::init
![Page 12: How to configure the Bootstrap in PHP - ProdigyView](https://reader033.vdocument.in/reader033/viewer/2022052321/548287bdb079592e0c8b482c/html5/thumbnails/12.jpg)
Challenge!If you are new to ProdigyView and also new to programming, this challenge may be a little more difficult than the others.
Go into the code of the file ‘core/system/PVSession.php’ init method. Modify the variables in the config section of the bootstrap in a way that it will affect your cookies.
www.prodigyview.com
![Page 13: How to configure the Bootstrap in PHP - ProdigyView](https://reader033.vdocument.in/reader033/viewer/2022052321/548287bdb079592e0c8b482c/html5/thumbnails/13.jpg)
Bootstrap ReviewThe bootstrap has many options that can change the way your system functions. Throughout various other tutorials, we will touch upon areas that will help you modify the bootstrap to fit your needs.
www.prodigyview.com
![Page 14: How to configure the Bootstrap in PHP - ProdigyView](https://reader033.vdocument.in/reader033/viewer/2022052321/548287bdb079592e0c8b482c/html5/thumbnails/14.jpg)
ReferencesFor further references, click on the following links:
PVBootstrap
PVBootstrap::bootSystem()
www.prodigyview.com