vendredi 12 mai 2017

Confuse with `: Something`c After abstract function declaration

I am just exploring one GitHub repo and comes with a doubt that I not able to find out in google.

I know we can only define an abstract function. but here with this code

namespace DesignPatterns\Creational\AbstractFactory;
/**
 * In this case, the abstract factory is a contract for creating some components
 * for the web. There are two ways of rendering text: HTML and JSON
 */
abstract class AbstractFactory
{
    abstract public function createText(string $content): Text;
}

They have putted :Text behind function. I Checked and found Text is an another abstract class they have defined inside the repo. what it mean here? I am not getting what it mean by : Text After abstract function declaration.

Aucun commentaire:

Enregistrer un commentaire