public function pack($assetEncoders = array(), $nestedResourcesInclusion = true)
    {

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

            $itemPacker->setAssetEncoders($assetEncoders);
            $itemPacker->setNestedResourcesInclusion($nestedResourcesInclusion);

            //then create the pack
            $itemPack = $itemPacker->packItem($this->item, $this->lang, $this->getStorageDirectory());

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

        return $itemPack;
    }
public function pack($assetEncoders = array(), $nestedResourcesInclusion = true)
    {

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

            $itemPacker->setAssetEncoders($assetEncoders);
            $itemPacker->setNestedResourcesInclusion($nestedResourcesInclusion);

            //then create the pack
            $itemPack = $itemPacker->packItem($this->item, $this->lang, $this->getStorageDirectory());

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

        return $itemPack;
    }
public function pack ( $ assetEncoders = array ( ) , $ nestedResourcesInclusion = true ) { try { //call the factory to get the itemPacker implementation $ itemPacker = $ this -> getItemPacker ( ) ; $ itemPacker -> setAssetEncoders ( $ assetEncoders ) ; $ itemPacker -> setNestedResourcesInclusion ( $ nestedResourcesInclusion ) ; //then create the pack $ itemPack = $ itemPacker -> packItem ( $ this -> item , $ this -> lang , $ this -> getStorageDirectory ( ) ) ; } catch ( Exception $ e ) { throw new common_Exception ( 'The item ' . $ this -> item -> getUri ( ) . ' cannot be packed : ' . $ e -> getMessage ( ) ) ; } return $ itemPack ; }
Pack an item.
@param array $assetEncoders the list of encoders to use in packing (configure the item packer)
@param boolean $nestedResourcesInclusion
@return ItemPack of the item. It can be serialized directly.
@throws common_Exception
Pack an item .