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

Class: PEAR_Command_Package

Source Location: /PEAR-1.3.5/PEAR/Command/Package.php

Class Overview

PEAR
   |
   --PEAR_Command_Common
      |
      --PEAR_Command_Package

Base class for other PEAR classes. Provides rudimentary emulation of destructors.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: PEAR_Command_Common

PEAR_Command_Common::PEAR_Command_Common()
PEAR_Command_Common constructor.
PEAR_Command_Common::getCommands()
Return a list of all the commands defined by this class.
PEAR_Command_Common::getGetoptArgs()
PEAR_Command_Common::getHelp()
Returns the help message for the given command
PEAR_Command_Common::getHelpArgs()
Returns the help for the accepted arguments of a command
PEAR_Command_Common::getOptions()
PEAR_Command_Common::getShortcuts()
Return a list of all the command shortcuts defined by this class.
PEAR_Command_Common::run()

Class: PEAR

PEAR::PEAR()
Constructor. Registers this object in $_PEAR_destructor_object_list for destructor emulation if a destructor object exists.
PEAR::delExpect()
This method deletes all occurences of the specified element from the expected error codes stack.
PEAR::expectError()
This method is used to tell which errors you expect to get.
PEAR::getStaticProperty()
If you have a class that's mostly/entirely static, and you need static
PEAR::isError()
Tell whether a value is a PEAR error.
PEAR::loadExtension()
OS independant PHP extension load. Remember to take care on the correct extension name for case sensitive OSes.
PEAR::popErrorHandling()
Pop the last error handler used
PEAR::popExpect()
This method pops one element off the expected error codes stack.
PEAR::pushErrorHandling()
Push a new error handler on top of the error handler options stack. With this you can easily override the actual error handler for some code and restore it later with popErrorHandling.
PEAR::raiseError()
This method is a wrapper that returns an instance of the configured error class with this object's default error handling applied. If the $mode and $options parameters are not specified, the object's defaults are used.
PEAR::registerShutdownFunc()
Use this function to register a shutdown method for static classes.
PEAR::setErrorHandling()
Sets how errors generated by this object should be handled.
PEAR::staticPopErrorHandling()
PEAR::staticPushErrorHandling()
PEAR::throwError()
Simpler form of raiseError with fewer options. In most cases message, code and userinfo are enough.
PEAR::_PEAR()
Destructor (the emulated type of...). Does nothing right now, but is included for forward compatibility, so subclass destructors should always call it.

Class Details

[line 26]
Base class for other PEAR classes. Provides rudimentary emulation of destructors.

If you want a destructor in your class, inherit PEAR and make a destructor method called _yourclassname (same name as the constructor, but with a "_" prefix). Also, in your constructor you have to call the PEAR constructor: $this->PEAR();. The destructor method will be called without parameters. Note that at in some SAPI implementations (such as Apache), any output during the request shutdown (in which destructors are called) seems to be discarded. If you need to get any debug information from your destructor, use error_log(), syslog() or something similar.

IMPORTANT! To use the emulated destructors you need to create the objects by reference: $obj =& new PEAR_child;



[ Top ]


Class Variables

$commands = array(
        'package' => array(
            'summary' => 'Build Package',
            'function' => 'doPackage',
            'shortcut' => 'p',
            'options' => array(
                'nocompress' => array(
                    'shortopt' => 'Z',
                    'doc' => 'Do not gzip the package file'
                    ),'showname'=>array('shortopt'=>'n','doc'=>'Print the name of the packaged file.',),),'doc'=>'[descfile]
Creates a PEAR package from its description file (usually called
package.xml).
'),'package-validate'=>array('summary'=>'Validate Package Consistency','function'=>'doPackageValidate','shortcut'=>'pv','options'=>array(),'doc'=>'
',),'cvsdiff'=>array('summary'=>'Run a "cvs diff" for all files in a package','function'=>'doCvsDiff','shortcut'=>'cd','options'=>array('quiet'=>array('shortopt'=>'q','doc'=>'Be quiet',),'reallyquiet'=>array('shortopt'=>'Q','doc'=>'Be really quiet',),'date'=>array('shortopt'=>'D','doc'=>'Diff against revision of DATE','arg'=>'DATE',),'release'=>array('shortopt'=>'R','doc'=>'Diff against tag for package release REL','arg'=>'REL',),'revision'=>array('shortopt'=>'r','doc'=>'Diff against revision REV','arg'=>'REV',),'context'=>array('shortopt'=>'c','doc'=>'Generate context diff',),'unified'=>array('shortopt'=>'u','doc'=>'Generate unified diff',),'ignore-case'=>array('shortopt'=>'i','doc'=>'Ignore case, consider upper- and lower-case letters equivalent',),'ignore-whitespace'=>array('shortopt'=>'b','doc'=>'Ignore changes in amount of white space',),'ignore-blank-lines'=>array('shortopt'=>'B','doc'=>'Ignore changes that insert or delete blank lines',),'brief'=>array('doc'=>'Report only whether the files differ, no details',),'dry-run'=>array('shortopt'=>'n','doc'=>'Don\'t do anything, just pretend',),),'doc'=>'<package.xml>
Compares all the files in a package.  Without any options, this
command will compare the current code with the last checked-in code.
Using the -r or -R option you may compare the current code with that
of a specific release.
',),'cvstag'=>array('summary'=>'Set CVS Release Tag','function'=>'doCvsTag','shortcut'=>'ct','options'=>array('quiet'=>array('shortopt'=>'q','doc'=>'Be quiet',),'reallyquiet'=>array('shortopt'=>'Q','doc'=>'Be really quiet',),'slide'=>array('shortopt'=>'F','doc'=>'Move (slide) tag if it exists',),'delete'=>array('shortopt'=>'d','doc'=>'Remove tag',),'dry-run'=>array('shortopt'=>'n','doc'=>'Don\'t do anything, just pretend',),),'doc'=>'<package.xml>
Sets a CVS tag on all files in a package.  Use this command after you have
packaged a distribution tarball with the "package" command to tag what
revisions of what files were in that release.  If need to fix something
after running cvstag once, but before the tarball is released to the public,
use the "slide" option to move the release tag.
',),'run-tests'=>array('summary'=>'Run Regression Tests','function'=>'doRunTests','shortcut'=>'rt','options'=>array('recur'=>array('shortopt'=>'r','doc'=>'Run tests in child directories, recursively.  4 dirs deep maximum',),'ini'=>array('shortopt'=>'i','doc'=>'actual string of settings to pass to php in format " -d setting=blah"','arg'=>'SETTINGS'),'realtimelog'=>array('shortopt'=>'l','doc'=>'Log test runs/results as they are run',),),'doc'=>'[testfile|dir ...]
Run regression tests with PHP\'s regression testing script (run-tests.php).',),'package-dependencies'=>array('summary'=>'Show package dependencies','function'=>'doPackageDependencies','shortcut'=>'pd','options'=>array(),'doc'=>'
List all depencies the package has.'),'sign'=>array('summary'=>'Sign a package distribution file','function'=>'doSign','shortcut'=>'si','options'=>array(),'doc'=>'<package-file>
Signs a package distribution (.tar or .tgz) file with GnuPG.',),'makerpm'=>array('summary'=>'Builds an RPM spec file from a PEAR package','function'=>'doMakeRPM','shortcut'=>'rpm','options'=>array('spec-template'=>array('shortopt'=>'t','arg'=>'FILE','doc'=>'Use FILE as RPM spec file template'),'rpm-pkgname'=>array('shortopt'=>'p','arg'=>'FORMAT','doc'=>'Use FORMAT as format string for RPM package name, %s is replaced
by the PEAR package name, defaults to "PEAR::%s".',),),'doc'=>'<package-file>

Creates an RPM .spec file for wrapping a PEAR package inside an RPM
package.  Intended to be used from the SPECS directory, with the PEAR
package tarball in the SOURCES directory:

$ pear makerpm ../SOURCES/Net_Socket-1.0.tgz
Wrote RPM spec file PEAR::Net_Geo-1.0.spec
$ rpm -bb PEAR::Net_Socket-1.0.spec
...
Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
',),)

[line 30]


Type:   mixed


[ Top ]

$output =

[line 225]


Type:   mixed


[ Top ]



Method Detail

PEAR_Command_Package (Constructor)   [line 235]

PEAR_Command_Package PEAR_Command_Package( &$ui, &$config)

PEAR_Command_Package constructor.
  • Access: public

Parameters:

   &$ui   — 
   &$config   — 

[ Top ]

doCvsDiff   [line 384]

void doCvsDiff( $command, $options, $params)


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doCvsTag   [line 325]

void doCvsTag( $command, $options, $params)


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doMakeRPM   [line 690]

void doMakeRPM( $command, $options, $params)


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doPackage   [line 264]

void doPackage( $command, $options, $params)


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doPackageDependencies   [line 567]

void doPackageDependencies( $command, $options, $params)


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doPackageValidate   [line 295]

void doPackageValidate( $command, $options, $params)


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doRunTests   [line 447]

void doRunTests( $command, $options, $params)


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]

doSign   [line 626]

void doSign( $command, $options, $params)


Parameters:

   $command   — 
   $options   — 
   $params   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:23:58 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.