phpDocumentor pivotx
[ class tree: pivotx ] [ index: pivotx ] [ all elements ]

Class: BaseConfig

Source Location: /objects.php

Class BaseConfig

Class Overview

Base Configuration Class

Handle the loading and saving configuration data. It contains defaults flows of reading, verifying/fixing and saving of configuration data.

Description of the load call:

      • verifyConfig
      • fixConfig
        • organizeConfig
        • initConfig
        Save call:
          • organizeConfig

          Located in /objects.php [line 37]

          
          
          		
          		
          		
          		

          Properties

          Methods

          [ Top ]
          Descendants
          Child Class Description
          Config Takes care of all configuration settings. The configuration is stored in pivotx/db/ser_config.php, but is completely accessible through this object.
          Users This Class handles all operations with regard to users: adding, deleting, getting info, etc.
          Weblogs This class deals with the Weblogs.
          Categories This class deals with the categories

          [ Top ]
          Property Summary
          mixed   $backup_configfile  
          mixed   $changed  
          mixed   $configfile  
          mixed   $data  
          mixed   $upgraded  

          [ Top ]
          Method Summary
          BaseConfig   __construct()   Constructor
          void   count()   Return configuration-array size
          void   fixConfig()   Fix configuration (this should be overwritten in subclass)
          void   initConfig()   Initialise configuration after has been read, fixed and organized.
          void   loadConfig()   Load and verify config
          true,   organizeConfig()   Organize configuration
          void   print_r()   Print a comprehensible representation of the users
          void   save()   Old save version
          void   saveConfig()   Save configuration if 'safe' to do so
          void   setChanged()   Set changed flag
          void   setUpgraded()   Set upgraded
          boolean   verifyConfig()   Verify configuration (this should be overwritten in subclass)

          [ Top ]
          Properties
          mixed   $backup_configfile = '' [line 40]

          [ Top ]
          mixed   $changed = false [line 42]

          [ Top ]
          mixed   $configfile = '' [line 39]

          [ Top ]
          mixed   $data = array() [line 41]

          [ Top ]
          mixed   $upgraded = false [line 43]

          [ Top ]
          Methods
          Constructor __construct  [line 51]

            BaseConfig __construct( filename $filename, [db_path $db_path = false]  )

          Constructor

          Parameters:
          filename   $filename:  configuration filename
          db_path   $db_path:  path to pivotx db directory, when false we assume config has been loaded


          Redefined in descendants as:

          [ Top ]
          count  [line 162]

            void count( )

          Return configuration-array size


          API Tags:
          Access:  public


          [ Top ]
          fixConfig  [line 113]

            void fixConfig( )

          Fix configuration (this should be overwritten in subclass)

          This is called when verifyConfig() fails.


          API Tags:
          Access:  protected


          Redefined in descendants as:

          [ Top ]
          initConfig  [line 138]

            void initConfig( )

          Initialise configuration after has been read, fixed and organized.


          API Tags:
          Access:  protected


          Redefined in descendants as:

          [ Top ]
          loadConfig  [line 85]

            void loadConfig( )

          Load and verify config


          API Tags:
          Access:  protected


          [ Top ]
          organizeConfig  [line 123]

            true, organizeConfig( )

          Organize configuration


          API Tags:
          Return:  

          if configuration can be saved

          This is called when just loaded and before configuration is saved.

          Access:  protected


          Redefined in descendants as:

          [ Top ]
          print_r  [line 173]

            void print_r( )

          Print a comprehensible representation of the users



          [ Top ]
          save  [line 184]

            void save( )

          Old save version

          This function force a save anyway.


          API Tags:
          Access:  public


          [ Top ]
          saveConfig  [line 145]

            void saveConfig( [ $force_changed = false]  )

          Save configuration if 'safe' to do so

          Parameters:
             $force_changed: 

          API Tags:
          Access:  protected


          [ Top ]
          setChanged  [line 78]

            void setChanged( [ $changed = true]  )

          Set changed flag

          Parameters:
             $changed: 

          API Tags:
          Access:  protected


          [ Top ]
          setUpgraded  [line 71]

            void setUpgraded( [ $upgraded = true]  )

          Set upgraded

          Parameters:
             $upgraded: 

          API Tags:
          Access:  protected


          [ Top ]
          verifyConfig  [line 104]

            boolean verifyConfig( )

          Verify configuration (this should be overwritten in subclass)


          API Tags:
          Return:  true if configuration is ok
          Access:  protected


          Redefined in descendants as:

          [ Top ]

          Documentation generated on Tue, 05 Sep 2017 01:06:12 +0200 by phpDocumentor 1.4.3