public function validate($command)
	{
		if ($command instanceof SelfValidating) {
            return $this->container->call([$command, 'validate']);
		}
		
		$validatorClass = $this->getValidatorClass($command);
		if(!$validatorClass) {
			return;
		}
        
		$validator = $this->container->make($validatorClass);
		$method = $this->getValidatorMethod($command);

		call_user_func([$validator, $method], $command);
	}
public function validate($command)
	{
		if ($command instanceof SelfValidating) {
            return $this->container->call([$command, 'validate']);
		}
		
		$validatorClass = $this->getValidatorClass($command);
		if(!$validatorClass) {
			return;
		}
        
		$validator = $this->container->make($validatorClass);
		$method = $this->getValidatorMethod($command);

		call_user_func([$validator, $method], $command);
	}
public function validate ( $ command ) { if ( $ command instanceof SelfValidating ) { return $ this -> container -> call ( [ $ command , 'validate' ] ) ; } $ validatorClass = $ this -> getValidatorClass ( $ command ) ; if ( ! $ validatorClass ) { return ; } $ validator = $ this -> container -> make ( $ validatorClass ) ; $ method = $ this -> getValidatorMethod ( $ command ) ; call_user_func ( [ $ validator , $ method ] , $ command ) ; }
Validate a command with its appropriate validator.

@param  mixed  $command

@return mixed
Validate a command with its appropriate validator .