public function pack(){

        try{
            //call the factory to get the itemPacker implementation
            $testPacker = $this->getTestPacker();

            //then create the pack
            $testPack = $testPacker->packTest($this->test);

        } catch(Exception $e){
            throw new common_Exception('The test '. $this->test->getUri() .' cannot be packed : ' . $e->getMessage());
        }

        return $testPack;
    }
public function pack(){

        try{
            //call the factory to get the itemPacker implementation
            $testPacker = $this->getTestPacker();

            //then create the pack
            $testPack = $testPacker->packTest($this->test);

        } catch(Exception $e){
            throw new common_Exception('The test '. $this->test->getUri() .' cannot be packed : ' . $e->getMessage());
        }

        return $testPack;
    }
public function pack ( ) { try { //call the factory to get the itemPacker implementation $ testPacker = $ this -> getTestPacker ( ) ; //then create the pack $ testPack = $ testPacker -> packTest ( $ this -> test ) ; } catch ( Exception $ e ) { throw new common_Exception ( 'The test ' . $ this -> test -> getUri ( ) . ' cannot be packed : ' . $ e -> getMessage ( ) ) ; } return $ testPack ; }
Pack a test.

@return TestPack of the test. It can be serialized directly.
@throws common_Exception
Pack a test .