# 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

Package: phing\tasks\system

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.

Parent(s)
  \Task < \ProjectComponent
Children
  \AdhocTaskdefTask
  \AdhocTypedefTask
Author
  Hans Lellelid
Version
  $Revision: 526 $

### Properties

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

Type
  n/a

`string $script= ''`

The PHP script

Details

Type
  string

### Methods

`addText( string $script ) : void`

Set the script.

Parameters

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

`execute( ) : string`

Load the adhoc class, and perform any core validation.

Returns

Type | Description
--- | ---
string | The classname of the ProjectComponent class.

Throws

Exception | Description
--- | ---
\BuildException | - if more than one class is defined.

`getDescription( ) : void`

`getLocation( ) : void`

`getNewClasses( ) : array`

Get array of names of newly defined classes.

Returns

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

`getOwningTarget( ) : void`

`getProject( ) : void`

`getRegisterSlot( ) : void`

`getRuntimeConfigurableWrapper( ) : void`

`getTaskName( ) : void`

`getTaskType( ) : void`

`init( ) : void`

`log( ) : void`

`main( ) : void`

Main entry point

`maybeConfigure( ) : void`

`perform( ) : void`

`setDescription( ) : void`

`setLocation( ) : void`

`setOwningTarget( ) : void`

`setProject( ) : void`

`setRuntimeConfigurableWrapper( ) : void`

`setTaskName( ) : void`

`setTaskType( ) : void`

Documentation was generated by DocBlox 0.17.1.