Where is created $class varicle in presenterFactory.php?

Notice: This thread is very old.
Jakub Bouček
Member | 54
+
-1
-

Hi, here in PresenterFactory is on line 36 varible $class and i still can't understand, where is filled.

	/**
	 * @param  callable  function (string $class): IPresenter
	 */
	public function __construct(callable $factory = NULL)
	{
		$this->factory = $factory ?: function ($class) { return new $class; };
	}

It's bug or any class property? Thanks.

Jan Tvrdík
Nette guru | 2595
+
+1
-

The first $class is closure parametr declaration and the second $class is reading the argument.

Maybe you look for https://github.com/…xtension.php#…

Jakub Bouček
Member | 54
+
0
-

OMG i see. I am now feeling little stupid. Thanks :)

Please close topic.

Last edited by Jakub Bouček (2015-12-28 00:14)