<?php

namespace Shopeca\XML\Feed;

use Shopeca\XML\Generators\BaseGenerator;

class FeedGenerator extends BaseGenerator {

	/**
	 * @param $name
	 * @return string
	 */
	protected function getTemplate($name)
	{
		$reflectionClass = new \ReflectionClass($this);
		return dirname($reflectionClass->getFileName()) . '/latte/' . $name . '.latte';
	}

	public function generate () {
		// Here might go some processing before the file is created
	}

}
<?php

namespace Shopeca\XML\Feed;

use Shopeca\XML\Generators\BaseGenerator;

class FeedGenerator extends BaseGenerator {

	/**
	 * @param $name
	 * @return string
	 */
	protected function getTemplate($name)
	{
		return __DIR__ . '/latte/' . $name . '.latte';
	}

	public function generate () {
		// Here might go some processing before the file is created
	}

}
--- 
+++ 
@@ -12,7 +12,8 @@
 	 */
 	protected function getTemplate($name)
 	{
-		return __DIR__ . '/latte/' . $name . '.latte';
+		$reflectionClass = new \ReflectionClass($this);
+		return dirname($reflectionClass->getFileName()) . '/latte/' . $name . '.latte';
 	}
 
 	public function generate () {
Fix of Latte directory localization
