/** * @return Itk_Pgm_Result */ public function execute() { if (!$this->_adapter instanceof Itk_Connection_AdapterAbstract) { throw new Itk_Connection_Exception('Program object must be called from $adapter->getProgram("PGMNAM")'); } $result = $this->_adapter->execute($this); if (!$result instanceof Itk_Pgm_Result) { throw new Itk_Pgm_Exception('Invalid result type'); } return $result; }