# classes/phing/tasks/system/AdhocTask.php

Abstract class for creating adhoc Phing components in buildfile.

By itself this class can be used to declare a single class within your buildfile. You can then reference this class in any task that takes custom classes (selectors, mappers, filters, etc.)

Subclasses exist for conveniently declaring and registering tasks and types.

author
  Hans Lellelid
package
  phing.tasks.system
version
  $Revision: 526 $

## \AdhocTask
jump to top

Abstract class for creating adhoc Phing components in buildfile.

By itself this class can be used to declare a single class within your buildfile. You can then reference this class in any task that takes custom classes (selectors, mappers, filters, etc.)

Subclasses exist for conveniently declaring and registering tasks and types.

Extends from
  \Task
author
  Hans Lellelid
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.tasks.system
version
  $Revision: 526 $

### Properties

`$newClasses= 'array'`
Default value `array` Details

Type

`string $script= ''`

The PHP script

Details

Type
  string

### Methods

`addText( string $script ) :`
Set the script.
Parameters

Name | Type | Description
--- | --- | ---
$script | string |

`execute( ) : string`
Load the adhoc class, and perform any core validation.
Returns

Type | Description
--- | ---
string |

Details

throws
  - if more than one class is defined.

`getNewClasses( ) : array`
Get array of names of newly defined classes.
Returns

Type | Description
--- | ---
array |

`main( ) :`
Main entry point
Documentation was generated by DocBlox 0.13.1.