public static function create($post, $config) {
		$cmd = new CmdUnknown ( $post, $config );
		self::$log = new Logger ( $config->log_dir, $config->log_level );
		self::$log->debug ( "CommandFactory: post received (json encoded): " . json_encode ( $post ) );
		
		// checking if commands definitions have been loaded
		if (self::$commands == null || self::$help_data == null) {
			self::reloadDefinitions ( $config );
		}
		self::$log->debug ( "Raw post (csv): " . implode ( ",", $post ) );
		
		// TODO move strings parameter 'text' to global definition
		if (isset ( $post ['text'] ) && self::$commands != null) {
			self::$log->debug ( "CommandFactory: text received: " . $post ['text'] );
			// the first word represents the command
			$split_regexp = "/[\\s]+/";
			$input = preg_split ( $split_regexp, $post ['text'] );
			$command_string = $input [0];
			array_shift ( $input );
			if (in_array ( $command_string, array_keys ( self::$commands ) )) {
				$class = self::$commands [$command_string] ["class"];
				if (array_key_exists ( "split_regexp", self::$commands [$command_string] )) {
					$split_regexp = self::$commands [$command_string] ["split_regexp"];
					$input = preg_split ( $split_regexp, implode ( " ", $input ) );
				}
				
				$cmd = new $class ( $post, $config, $input );
			}
		}
		return $cmd;
	}