Skip to content

Instantly share code, notes, and snippets.

@dg
Created October 6, 2011 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dg/1267660 to your computer and use it in GitHub Desktop.
Save dg/1267660 to your computer and use it in GitHub Desktop.
MultiplierControl
<?php
class MultiplierControl extends Nette\Application\UI\Control
{
private $factory;
public function __construct($factory)
{
parent::__construct();
$this->factory = $factory;
}
public function createComponent($name)
{
return call_user_func($this->factory, $this, $name);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment