We will declare four class variables. Each variable will be a private variable to the class, so we will precede each name with an underscore character. As we touched on a moment ago, PHP does not actually provide functionality to create public and private members of a class. We will name our variables and functions to reflect that they are public or private however to demonstrate good programming technique. By naming your class members appropriately, you create self documenting code.
We will create a variables to store our database resource, the URLs provided to the class, words that should not be included in the index, and words that should always be included in the index. Below are their declarations.
<?php var $_db; var $_urlarray; var $_stopwords = array ('and', 'but', 'are', 'the'); var $_allowwords = array ('c++', 'ado', 'vb'); ?>