/** Return the property options for the object
	* If an options method exists, answer the method result.
	* otherwise delegate to the types ClassDescriptor
	* If the type is a class name and the class has a method 'getInstances'
	* assume it is a static method, call it and return the result.
	* @throws PntReflectionError if ClassDescriptor returns null, or type is not a class
	* @param PntObject the object to get the options for 
	* @param PntSqlFilter $filter ignoored
	* @return Array the options
	*/
	function getOptionsFor($obj, $filter=true) {
		$name = $this->getName();
		$mth = "get$name".'Options';

		if (method_exists($obj, $mth))
			return $obj->$mth($filter); //use getter method if there

		$className = $this->getType();
		if ($className == 'boolean') 
			return array(true, false);
		
		if (!class_exists($className)) 
		 	Gen::tryIncludeClass($className, $this->getClassDir()); //parameters from own properties
		 	
		if (!class_exists($className)) 
			throw new PntReflectionError(
				$this. ' no options getter, and type is not a class'
			);
		
		$clsDesc = PntClassDescriptor::getInstance($className);
		try {
			return $clsDesc->getPeanuts();
		} catch (PntError $err) {
			throw new PntReflectionError(
					"$this can not get options: no getter or"
					, 0, $err);
		}
	}