# tasks/ext/SymlinkTask.php

Generates symlinks based on a target / link combination.

Can also symlink contents of a directory, individually

Single target symlink example:

Symlink entire contents of directory

This will go through the contents of "/my/shared/library/*" and create a symlink for each entry into ${project.basedir}/library/

Author
  Andrei Serdeliuc
Extends
  Task
Package
  phing.tasks.ext
Version
  $ID$

## \SymlinkTask
jump to top

Package: phing\tasks\ext

Generates symlinks based on a target / link combination.

Can also symlink contents of a directory, individually

Single target symlink example:

Symlink entire contents of directory

This will go through the contents of "/my/shared/library/*" and create a symlink for each entry into ${project.basedir}/library/

Parent(s)
  \Task < \ProjectComponent
Author
  Andrei Serdeliuc
Extends
  Task
Version
  $ID$

### Properties

`array $_filesets= 'array()'`

Collection of filesets Used when linking contents of a directory

(default value: array())

Default value `array()`Details

Type
  array
Access
  private

`string $_link= 'null'`

Symlink location

(default value: null)

Default value `null` Details

Type
  string
Access
  private

`boolean $_overwrite= 'false'`

Whether to override the symlink if it exists but points to a different location

(default value: false)

Default value `false` Details

Type
  boolean
Access
  private

`string $_target= 'null'`

What we're symlinking from

(default value: null)

Default value `null` Details

Type
  string
Access
  private

### Methods

`createFileset( ) : \FileSet`

creator for _filesets

Returns

Type | Description
--- | ---
\FileSet |

Details

Access
  public

`getDescription( ) : void`

`getFilesets( ) : array`

getter for _filesets

Returns

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

Details

Access
  public

`getLink( ) : string`

getter for _link

Returns

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

Details

Access
  public

`getLocation( ) : void`

`getMap( ) : array | string`

Generates an array of directories / files to be linked If _filesets is empty, returns getTarget()

Returns

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

Details

Access
  protected

`getOverwrite( ) : boolean`

getter for _overwrite

Returns

Type | Description
--- | ---
boolean |

Details

Access
  public

`getOwningTarget( ) : void`

`getProject( ) : void`

`getRegisterSlot( ) : void`

`getRuntimeConfigurableWrapper( ) : void`

`getTarget( ) : string`

getter for _target

Returns

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

Details

Access
  public

`getTaskName( ) : void`

`getTaskType( ) : void`

`init( ) : void`

`log( ) : void`

`main( ) : bool`

Main entry point for task

Returns

Type | Description
--- | ---
bool |

Details

Access
  public

`maybeConfigure( ) : void`

`perform( ) : void`

`setDescription( ) : void`

`setLink( string $link ) : void`

setter for _link

Parameters

Name | Type | Description
--- | --- | ---
$link | string |

Details

Access
  public

`setLocation( ) : void`

`setOverwrite( boolean $overwrite ) : void`

setter for _overwrite

Parameters

Name | Type | Description
--- | --- | ---
$overwrite | boolean |

Details

Access
  public

`setOwningTarget( ) : void`

`setProject( ) : void`

`setRuntimeConfigurableWrapper( ) : void`

`setTarget( string $target ) : void`

setter for _target

Parameters

Name | Type | Description
--- | --- | ---
$target | string |

Details

Access
  public

`setTaskName( ) : void`

`setTaskType( ) : void`

`symlink( string $target, string $link ) : bool`

Create the actual link

Parameters

Name | Type | Description
--- | --- | ---
$target | string |
$link | string |

Returns

Type | Description
--- | ---
bool |

Details

Access
  protected

Documentation was generated by DocBlox 0.17.1.