PEAR
[ class tree: PEAR ] [ index: PEAR ] [ all elements ]

Class: PEAR_PackageFile_Generator_v2

Source Location: /PEAR-1.10.0dev1/PEAR/PackageFile/Generator/v2.php

Class Overview


This class converts a PEAR_PackageFile_v2 object into any output format.


Author(s):

Version:

  • Release: 1.10.0dev1

Copyright:

  • 1997-2009 The Authors

Methods


Inherited Variables

Inherited Methods


Class Details

[line 37]
This class converts a PEAR_PackageFile_v2 object into any output format.

Supported output formats include array, XML string (using S. Schmidt's XML_Serializer, slightly customized)



[ Top ]


Method Detail

__construct (Constructor)   [line 102]

PEAR_PackageFile_Generator_v2 __construct( PEAR_PackageFile_v2 &$packagefile)


Parameters:

PEAR_PackageFile_v2   &$packagefile   — 

[ Top ]

getPackagerVersion   [line 113]

string getPackagerVersion( )


[ Top ]

getSerializedData   [line 601]

string getSerializedData( )

get the result of the serialization
  • Return: serialized XML
  • Access: public

[ Top ]

resetOptions   [line 509]

void resetOptions( )

reset all options to default options

[ Top ]

serialize   [line 547]

boolean serialize( mixed $data, [ $options = null])

serialize data
  • Return: true on success, pear error on failure
  • Access: public

Parameters:

mixed   $data   —  data to serialize
   $options   — 

[ Top ]

setOption   [line 522]

void setOption( $name, $value)

set an option

You can use this method if you do not want to set all options in the constructor

  • See: resetOption(), XML_Serializer()
  • Access: public

Parameters:

   $name   — 
   $value   — 

[ Top ]

setOptions   [line 535]

void setOptions( $options)

sets several options at once

You can use this method if you do not want to set all options in the constructor


Parameters:

   $options   — 

[ Top ]

toPackageFile   [line 302]

void toPackageFile( [ $where = null], [ $state = PEAR_VALIDATE_NORMAL], [ $name = 'package.xml'])


Parameters:

   $where   — 
   $state   — 
   $name   — 

[ Top ]

toTgz   [line 123]

void toTgz( PEAR_Packager &$packager, [bool $compress = true], [string|null $where = null])


Parameters:

PEAR_Packager   &$packager   — 
bool   $compress   —  generate a .tgz or a .tar
string|null   $where   —  temporary directory to package in

[ Top ]

toTgz2   [line 136]

void toTgz2( PEAR_Packager &$packager, PEAR_PackageFile_v1 &$pf1, [bool $compress = true], [string|null $where = null])

Package up both a package.xml and package2.xml for the same release

Parameters:

PEAR_Packager   &$packager   — 
PEAR_PackageFile_v1   &$pf1   — 
bool   $compress   —  generate a .tgz or a .tar
string|null   $where   —  temporary directory to package in

[ Top ]

toV2   [line 329]

void &toV2( )


[ Top ]

toXml   [line 340]

string toXml( [ $state = PEAR_VALIDATE_NORMAL], [ $options = array()])

Return an XML document based on the package info (as returned by the PEAR_Common::infoFrom* methods).
  • Return: XML data

Parameters:

   $state   — 
   $options   — 

[ Top ]


Documentation generated on Sat, 25 Jul 2015 13:30:26 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.