Code Duplication    Length = 11-12 lines in 2 locations

src/dispatcher/Dispatcher.class.php 1 location

@@ 707-717 (lines=11) @@
704
	 * @author     David Zülke <[email protected]>
705
	 * @since      0.11.0
706
	 */
707
	public function getOutputType($name = null)
708
	{
709
		if($name === null) {
710
			$name = $this->defaultOutputType;
711
		}
712
		if(isset($this->outputTypes[$name])) {
713
			return $this->outputTypes[$name];
714
		} else {
715
			throw new AgaviException('Output Type "' . $name . '" has not been configured.');
716
		}
717
	}
718
}
719
720
?>

src/dispatcher/OutputType.class.php 1 location

@@ 202-213 (lines=12) @@
199
	 * @author     David Zülke <[email protected]>
200
	 * @since      0.11.0
201
	 */
202
	public function getLayout($name = null)
203
	{
204
		if($name === null) {
205
			$name = $this->defaultLayout;
206
		}
207
		
208
		if(isset($this->layouts[$name])) {
209
			return $this->layouts[$name];
210
		} else {
211
			throw new AgaviException('Unknown layout "' . $name . '"');
212
		}
213
	}
214
	
215
	/**
216
	 * Get the exception template filename for this renderer.