public function getTarget(Args $args)
    {
        if (!is_object($this->target) && $this->getClass()) {
            $class = $this->getClass();
            $targetObject = new $class($args);
            if (!$targetObject instanceof Command) {
                $command = $this->getCommand();
                throw new Exception("$command: $class is not an instance of LiteFrame\CLI\Command");
            }
            
            $this->setTarget($targetObject);
        }

        return $this->target;
    }
public function getTarget(Args $args)
    {
        if (!is_object($this->target) && $this->getClass()) {
            $class = $this->getClass();
            $targetObject = new $class($args);
            if (!$targetObject instanceof Command) {
                $command = $this->getCommand();
                throw new Exception("$command: $class is not an instance of LiteFrame\CLI\Command");
            }
            
            $this->setTarget($targetObject);
        }

        return $this->target;
    }
public function getTarget ( Args $ args ) { if ( ! is_object ( $ this -> target ) && $ this -> getClass ( ) ) { $ class = $ this -> getClass ( ) ; $ targetObject = new $ class ( $ args ) ; if ( ! $ targetObject instanceof Command ) { $ command = $ this -> getCommand ( ) ; throw new Exception ( "$command: $class is not an instance of LiteFrame\CLI\Command" ) ; } $ this -> setTarget ( $ targetObject ) ; } return $ this -> target ; }
Get command object if initialized
@return Command
Get command object if initialized