Hi,

Is this structure correct guys because I get this error message "Fatal error: Class doL contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (AbstractData......."

Thanks in advance

abstract class AbstractDatabase{

...
Some function
...

	abstract public function setLogin();

	abstract protected function setLogout();

	abstract public function doLogin();

	abstract protected function doLogout();

}

class setL extends AbstractDatabase{

	public function setLogin(){
	}

	protected function setLogout(){
	}
}

class doL extends AbstractDatabase{

	public function doLogin(){
	}

	protected function doLogout(){
	}
}

Any non-abstract child class must implement all inherited abstract methods. You are getting the error because the doL class inherited 4 abstract methods from AbstractDatabase class, but implemented only 2 of them. Because of inheritance, to the compiler it looks like the doL class still has 2 abstract methods.

I am assuming the same error would be generated for the setL class.

Hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.