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

Class: PEAR_Task_Windowseol

Source Location: /PEAR-1.9.5/PEAR/Task/Windowseol.php

Class Overview

PEAR_Task_Common
   |
   --PEAR_Task_Windowseol

Implements the windows line endsings file task.


Author(s):

Version:

  • Release: 1.9.5

Copyright:

  • 1997-2009 The Authors

Variables

Methods


Child classes:

PEAR_Task_Windowseol_rw
Abstracts the windowseol task xml.

Inherited Variables

Inherited Methods

Class: PEAR_Task_Common

PEAR_Task_Common::PEAR_Task_Common()
PEAR_Task_Common::hasPostinstallTasks()
PEAR_Task_Common::init()
Initialize a task instance with the parameters
PEAR_Task_Common::isScript()
Determines whether a role is a script
PEAR_Task_Common::run()
This method is used to process each of the tasks for a particular multiple class type. Simple tasks need not implement this method.
PEAR_Task_Common::runPostinstallTasks()
PEAR_Task_Common::startSession()
Begin a task processing session. All multiple tasks will be processed after each file has been successfully installed, all simple tasks should perform their task here and return any errors using the custom throwError() method to allow forward compatibility
PEAR_Task_Common::throwError()
PEAR_Task_Common::validateXml()
Validate the basic contents of a task tag.

Class Details

[line 31]
Implements the windows line endsings file task.


[ Top ]


Class Variables

$phase =  PEAR_TASK_PACKAGE

[line 34]


Type:   mixed
Overrides:   Array


[ Top ]

$type =  'simple'

[line 33]


Type:   mixed
Overrides:   Array


[ Top ]



Method Detail

init   [line 57]

void init( array $xml, unused $attribs)

Initialize a task instance with the parameters

Overrides PEAR_Task_Common::init() (Initialize a task instance with the parameters)

Parameters:

array   $xml     raw, parsed xml
unused   $attribs     

[ Top ]

startSession   [line 71]

string|false|PEAR_Error startSession( PEAR_PackageFile_v1|PEAR_PackageFile_v2 $pkg, string $contents, string $dest)

Replace all line endings with windows line endings

See validateXml() source for the complete list of allowed fields

  • Return: false to skip this file, PEAR_Error to fail (use $this->throwError), otherwise return the new contents

Overrides PEAR_Task_Common::startSession() (Begin a task processing session. All multiple tasks will be processed after each file has been successfully installed, all simple tasks should perform their task here and return any errors using the custom throwError() method to allow forward compatibility)

Parameters:

PEAR_PackageFile_v1|PEAR_PackageFile_v2   $pkg     
string   $contents     file contents
string   $dest     the eventual final file location (informational only)

[ Top ]

validateXml   [line 44]

void validateXml( PEAR_PackageFile_v2 $pkg, array $xml, PEAR_Config $config, $fileXml)

Validate the raw xml at parsing-time.

Overrides PEAR_Task_Common::validateXml() (Validate the basic contents of a task tag.)

Parameters:

PEAR_PackageFile_v2   $pkg     
array   $xml     raw, parsed xml
PEAR_Config   $config     
   $fileXml     

[ Top ]


Documentation generated on Sat, 12 Jul 2014 14:01:40 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.