I'm trying to figure out how can the constants IS_IMPLICIT_ABSTRACT
and IS_EXPLICIT_ABSTRACT
of the ReflectionClass be used (if possible at all) to make the ReflectionClass::isAbstract()
to return true only when the class is abstract because of its definition NOT because it contains abstract methods.
By default, when used with interface, this method returns true and I would like to know whether there is a way of changing this behaviour using these two pre-defined constants.
Example would be:
interface BookInterface {
public function getTitle();
public function getAuthors();
public function getYear();
public function getIsbn();
}
$book = new ReflectionClass('BookInterface');
$book->isAbstract() // returns true
Obviously ReflectionClass::isAbstract()
doesn't take any arguments - so not quite sure if it's possible.
Aucun commentaire:
Enregistrer un commentaire