SlideShare ist ein Scribd-Unternehmen logo
1 von 18
DEFINES
Objective

Learn how the defines are used to manipulate the system.

Requirements

 Understanding of define() function.
Estimated Time

5 minutes




                     www.prodigyview.com
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 DEFINES.php




                    www.prodigyview.com
What are DEFINES
In PHP defines are named constants that are global among
the code being executed.
In ProdigyView the DEFINES have two functions.
1. Specify the location of the xml configuration file and the
   database configuration file
2. Structure the file system for applications, libraries and other
   features


On our next slide, we will view an example of the defines file.




                        www.prodigyview.com
Example Of Defines File
File Structure
In the previous slide when it was stated that Defines can
“structure the file system”, what was being referenced was
ProdigyView gives components of the system places where
they belong.

IE: All images go in the image folder

IE: All videos go in the videos folder

Changing the defines allows you to change where you want
these resources to exist. Libraries do not have to be in
/resources/libraries/, they can be in another folder such as
/system/libs/ if you change it in the defines.

So lets run through the defines if you are looking for
clarification on any.
                        www.prodigyview.com
PV_ROOT
The PV_ROOT is the root directory of the site. All files
should in a location that can be referenced by the
PV_ROOT.

The root location can be set multiple ways such as:

 $_SERVER[„DOCUMENT_ROOT‟
 dir(__FILE__)
 „/var/www/mysite/‟.



                        www.prodigyview.com
PV_CORE
PV_CORE is the core location of the classes that make
up ProdigyView‟s root system. All the folders and classes
that begin with PV should be in this folder.




                     www.prodigyview.com
PV_APPLICATIONS /
 PV_ADMIN_APPLICATIONS
PV_APPLICATIONS is the directory that all applications
should exist that are called with PVApplications::execute
function.

In an attempt to separate front-end from backend, the
applications administrative section can be placed in a
separate locations.




                     www.prodigyview.com
PV_MODULES
Modules are components that interact with applications.
Files that contain the modules have a folder they are
assigned.




                     www.prodigyview.com
PV_LIBRARIES
PV_LIBRARIES is the location of the libraries that work
with ProdigyView. Libraries are handled through the
PVLibraries class.




                     www.prodigyview.com
PV_PLUGINS
Plugins are extensions in ProdigyView whose addition is
controlled by the database. Plugins can be object oriented
or procedural additions and are persistent once loaded.




                     www.prodigyview.com
PV_MVC
ProdigyView is a framework that allows multiple MVCs.
MVCs are defined by the developer. An example MVC
that comes with ProdigyView is Helium.




                    www.prodigyview.com
Configuration Files
The configuration files are divided into two files. The php
file contains the database connections. The xml file
contains system configurations.




                      www.prodigyview.com
PV_TEMPLATES
If the system being created allows templates, the template
directory can set.




                     www.prodigyview.com
Javascript Libraries
ProdigyView distinguishes the JavaScript files from normal
JavaScript, JQuery, Prototype and Mootools. Also it recognizes
a difference between front-end js files vs admin files. The files
do not contain the PV_ROOT because they are accessed in the
browser and having PV_ROOT might make them inaccessible
from the browser.
Media Files
Media files consist of images, video, audio and files.
ProdigyView allows separation of each file type. Parts of
the framework such as the CMS make use of these
defines for placing the files. These files also do not
contain PV_ROOT.




                     www.prodigyview.com
Admin
The last define is the administrative define. If this define is
set to true, applications will be allowed to access their
administrative section. If set to false, the function
PVApplication::pv_exec_admin() will not be accessible.
This is done to separate the front end from backend.




                       www.prodigyview.com
Review
As seen, there are numerous defines that can set. Those
defines are changeable to change how your system is set
up.

When you are comfortable with various aspects of the
ProdigyView, take the time to change the defines to
customize the system you build.




                    www.prodigyview.com

Weitere Àhnliche Inhalte

Mehr von ProdigyView

Mehr von ProdigyView (18)

Email Configuration
Email ConfigurationEmail Configuration
Email Configuration
 
HTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialHTML5 Tags and Elements Tutorial
HTML5 Tags and Elements Tutorial
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
 
Html Tags Tutorial
Html Tags TutorialHtml Tags Tutorial
Html Tags Tutorial
 
Video Conversion PHP
Video Conversion PHPVideo Conversion PHP
Video Conversion PHP
 
Sending Email Basics PHP
Sending Email Basics PHPSending Email Basics PHP
Sending Email Basics PHP
 
Tools ProdigyView
Tools ProdigyViewTools ProdigyView
Tools ProdigyView
 
Custom Validation PHP
Custom Validation PHPCustom Validation PHP
Custom Validation PHP
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web Cache
 
Javascript And CSS Libraries
Javascript And CSS LibrariesJavascript And CSS Libraries
Javascript And CSS Libraries
 
PHP Libraries
PHP LibrariesPHP Libraries
PHP Libraries
 
Database Basics
Database BasicsDatabase Basics
Database Basics
 
Implementing the Adapter Design Pattern
Implementing the Adapter Design PatternImplementing the Adapter Design Pattern
Implementing the Adapter Design Pattern
 
Intercepting Filters Design Pattern
Intercepting Filters Design PatternIntercepting Filters Design Pattern
Intercepting Filters Design Pattern
 
Creating Dynamic Objects PHP
Creating Dynamic Objects PHPCreating Dynamic Objects PHP
Creating Dynamic Objects PHP
 
PV Standard Search Query
PV Standard Search QueryPV Standard Search Query
PV Standard Search Query
 
Prodigyview XML COnfiguration File
Prodigyview XML COnfiguration FileProdigyview XML COnfiguration File
Prodigyview XML COnfiguration File
 
Learning PHP Basics Part 2
Learning PHP Basics Part 2Learning PHP Basics Part 2
Learning PHP Basics Part 2
 

KĂŒrzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

KĂŒrzlich hochgeladen (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

PHP Defines in ProdigyView

  • 1. DEFINES Objective Learn how the defines are used to manipulate the system. Requirements  Understanding of define() function. Estimated Time 5 minutes www.prodigyview.com
  • 2. 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 DEFINES.php www.prodigyview.com
  • 3. What are DEFINES In PHP defines are named constants that are global among the code being executed. In ProdigyView the DEFINES have two functions. 1. Specify the location of the xml configuration file and the database configuration file 2. Structure the file system for applications, libraries and other features On our next slide, we will view an example of the defines file. www.prodigyview.com
  • 5. File Structure In the previous slide when it was stated that Defines can “structure the file system”, what was being referenced was ProdigyView gives components of the system places where they belong. IE: All images go in the image folder IE: All videos go in the videos folder Changing the defines allows you to change where you want these resources to exist. Libraries do not have to be in /resources/libraries/, they can be in another folder such as /system/libs/ if you change it in the defines. So lets run through the defines if you are looking for clarification on any. www.prodigyview.com
  • 6. PV_ROOT The PV_ROOT is the root directory of the site. All files should in a location that can be referenced by the PV_ROOT. The root location can be set multiple ways such as:  $_SERVER[„DOCUMENT_ROOT‟  dir(__FILE__)  „/var/www/mysite/‟. www.prodigyview.com
  • 7. PV_CORE PV_CORE is the core location of the classes that make up ProdigyView‟s root system. All the folders and classes that begin with PV should be in this folder. www.prodigyview.com
  • 8. PV_APPLICATIONS / PV_ADMIN_APPLICATIONS PV_APPLICATIONS is the directory that all applications should exist that are called with PVApplications::execute function. In an attempt to separate front-end from backend, the applications administrative section can be placed in a separate locations. www.prodigyview.com
  • 9. PV_MODULES Modules are components that interact with applications. Files that contain the modules have a folder they are assigned. www.prodigyview.com
  • 10. PV_LIBRARIES PV_LIBRARIES is the location of the libraries that work with ProdigyView. Libraries are handled through the PVLibraries class. www.prodigyview.com
  • 11. PV_PLUGINS Plugins are extensions in ProdigyView whose addition is controlled by the database. Plugins can be object oriented or procedural additions and are persistent once loaded. www.prodigyview.com
  • 12. PV_MVC ProdigyView is a framework that allows multiple MVCs. MVCs are defined by the developer. An example MVC that comes with ProdigyView is Helium. www.prodigyview.com
  • 13. Configuration Files The configuration files are divided into two files. The php file contains the database connections. The xml file contains system configurations. www.prodigyview.com
  • 14. PV_TEMPLATES If the system being created allows templates, the template directory can set. www.prodigyview.com
  • 15. Javascript Libraries ProdigyView distinguishes the JavaScript files from normal JavaScript, JQuery, Prototype and Mootools. Also it recognizes a difference between front-end js files vs admin files. The files do not contain the PV_ROOT because they are accessed in the browser and having PV_ROOT might make them inaccessible from the browser.
  • 16. Media Files Media files consist of images, video, audio and files. ProdigyView allows separation of each file type. Parts of the framework such as the CMS make use of these defines for placing the files. These files also do not contain PV_ROOT. www.prodigyview.com
  • 17. Admin The last define is the administrative define. If this define is set to true, applications will be allowed to access their administrative section. If set to false, the function PVApplication::pv_exec_admin() will not be accessible. This is done to separate the front end from backend. www.prodigyview.com
  • 18. Review As seen, there are numerous defines that can set. Those defines are changeable to change how your system is set up. When you are comfortable with various aspects of the ProdigyView, take the time to change the defines to customize the system you build. www.prodigyview.com