AFAIK PHP does not have a "WITH" construct like other OO languages and your property references are incorrect. It should be something more like this:
// notice that object properties must be explicitely declared with "var"
// notice that the "constructor" is a function witht he same name as the class.
// the constructor is helpful for doing initialization things but can be
// omitted.
class colorObject {
var $color;
function colorObject ($this->color) {
//do other constructor stuff
}
}
// include the object
// assuming the name of the file with our object def is "colorObject.php"
require ("colorObject.php");
// instantiate the object
$myobject = new colorObject("blue");
// reference properties and methods with the "->" operator
print $myobject->color;
Hope this quick example helps!
-- Rich Rijnders
-- Irvine, CA US