protected function setDirectory(string $dir = null, bool $append = false)
	{
		$dir = ucfirst($dir);

		if ($append !== true || empty($this->directory))
		{
			$this->directory = str_replace('.', '', trim($dir, '/')) . '/';
		}
		else
		{
			$this->directory .= str_replace('.', '', trim($dir, '/')) . '/';
		}
	}
protected function setDirectory(string $dir = null, bool $append = false)
	{
		$dir = ucfirst($dir);

		if ($append !== true || empty($this->directory))
		{
			$this->directory = str_replace('.', '', trim($dir, '/')) . '/';
		}
		else
		{
			$this->directory .= str_replace('.', '', trim($dir, '/')) . '/';
		}
	}
protected function setDirectory ( string $ dir = null , bool $ append = false ) { $ dir = ucfirst ( $ dir ) ; if ( $ append !== true || empty ( $ this -> directory ) ) { $ this -> directory = str_replace ( '.' , '' , trim ( $ dir , '/' ) ) . '/' ; } else { $ this -> directory .= str_replace ( '.' , '' , trim ( $ dir , '/' ) ) . '/' ; } }
Sets the sub-directory that the controller is in.

@param string|null   $dir
@param boolean|false $append
Sets the sub - directory that the controller is in .