src/Tolkien/Factories/GenerateFactory.php
public function generate()
	{
		switch ($this->properties['node']) {
			case 'post':
				return new GeneratePost($this->prepareConfig($this->config), $this->properties);
				break;

			case 'page':
				return new GeneratePage($this->prepareConfig($this->config), $this->properties);
				break;
			
			default:
				return;
				break;
		}
	}
public function generate()
	{
		switch ($this->properties['node']) {
			case 'post':
				return new GeneratePost($this->prepareConfig($this->config), $this->properties);
				break;

			case 'page':
				return new GeneratePage($this->prepareConfig($this->config), $this->properties);
				break;
			
			default:
				return;
				break;
		}
	}
public function generate ( ) { switch ( $ this -> properties [ 'node' ] ) { case 'post' : return new GeneratePost ( $ this -> prepareConfig ( $ this -> config ) , $ this -> properties ) ; break ; case 'page' : return new GeneratePage ( $ this -> prepareConfig ( $ this -> config ) , $ this -> properties ) ; break ; default : return ; break ; } }
Create class instance of GenerateNode
Create class instance of GenerateNode