# tasks/system/PhpEvalTask.php

Executes PHP function or evaluates expression and sets return value to a property.

WARNING: This task can, of course, be abused with devastating effects. E.g. do not modify internal Phing classes unless you know what you are doing.

Author
  Hans Lellelid
Package
  phing.tasks.system
Todo
  Add support for evaluating expressions
Version
  $Revision: 1378 $

## \FunctionParam
jump to top

Package: phing\tasks\system

Supports the <param> nested tag for PhpTask.

### Properties

`$val= ''`
Details

Type
  n/a

### Methods

`addText( $v ) : void`

Parameters

Name | Type | Description
--- | --- | ---
$v |  |

`getValue( ) : void`

`setValue( $v ) : void`

Parameters

Name | Type | Description
--- | --- | ---
$v |  |

## \PhpEvalTask
jump to top

Package: phing\tasks\system

Executes PHP function or evaluates expression and sets return value to a property.

WARNING: This task can, of course, be abused with devastating effects. E.g. do not modify internal Phing classes unless you know what you are doing.

Parent(s)
  \Task < \ProjectComponent
Author
  Hans Lellelid
Todo
  Add support for evaluating expressions
Version
  $Revision: 1378 $

### Properties

`$class= ''`
Details

Type
  n/a

`$expression= ''`
Details

Type
  n/a

`$function= ''`
Details

Type
  n/a

`$logLevel= 'Project::MSG_INFO'`
Default value `Project::MSG_INFO` Details

Type
  n/a

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

Type
  n/a

`$returnProperty= 'null'`
Default value `null` Details

Type
  n/a

### Methods

`addText( $expression ) : void`

Set PHP expression to evaluate.

Parameters

Name | Type | Description
--- | --- | ---
$expression |  |

`callFunction( ) : mixed`

Calls function and returns results.

Returns

Type | Description
--- | ---
mixed |

`createParam( ) : void`

Add a nested tag.

`evalExpression( ) : mixed`

Evaluates expression and returns resulting value.

Returns

Type | Description
--- | ---
mixed |

`getDescription( ) : void`

`getLocation( ) : void`

`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`

`setClass( $c ) : void`

Set [static] class which contains function to execute

Parameters

Name | Type | Description
--- | --- | ---
$c |  |

`setDescription( ) : void`

`setExpression( $expression ) : void`

Set PHP expression to evaluate.

Parameters

Name | Type | Description
--- | --- | ---
$expression |  |

`setFunction( $f ) : void`

Set function to execute

Parameters

Name | Type | Description
--- | --- | ---
$f |  |

`setLevel( string $level ) : void`

Set level of log messages generated (default = info)

Parameters

Name | Type | Description
--- | --- | ---
$level | string |

`setLocation( ) : void`

`setOwningTarget( ) : void`

`setProject( ) : void`

`setReturnProperty( $r ) : void`

Sets property name to set with return value of function or expression.

Parameters

Name | Type | Description
--- | --- | ---
$r |  |

`setRuntimeConfigurableWrapper( ) : void`

`setTaskName( ) : void`

`setTaskType( ) : void`

Documentation was generated by DocBlox 0.17.1.