tasks/ext/git/GitGcTask.php
Wrapper around git-gc
- Author
- Victor Farazdagi
- Package
- phing.tasks.ext.git
- See
- \VersionControl_Git
- Since
- 2.4.3
- Version
- $Id: 13487520850c3a7ad71d85f02afbddfd408bfbba $
\GitGcTask
Wrapper around git-gc
Use {@link Project#createTask} to register a new Task.
- Parent(s)
- \GitBaseTask < \Task < \ProjectComponent
- See
- \VersionControl_Git
- Author
- Victor Farazdagi
- Copyright
- 2001,2002 THYRELL. All rights reserved
- Since
- 2.4.3
- Version
- $Id: 13487520850c3a7ad71d85f02afbddfd408bfbba $
Properties


string
$description= ''
- Type
- string
- Inherited_from
- \Task::$$description
- Inherited_from
- \GitBaseTask::$$description


\VersionControl_Git
$gitClient= 'null'
null
Details- Type
- \VersionControl_Git
- Inherited_from
- \GitBaseTask::$$gitClient


string
$gitPath= ''/usr/bin/git''
'/usr/bin/git'
Details- Type
- string
- Inherited_from
- \GitBaseTask::$$gitPath


\Location
$location= ''
- Type
- \Location
- Inherited_from
- \Task::$$location
- Inherited_from
- \GitBaseTask::$$location


\Project
$project= 'null'
Holds a reference to the project that a project component (a task, a target, etc.) belongs to
A reference to the current project instanceInherited from: \ProjectComponent::$$project\Task::$$project\GitBaseTask::$$projectnull
Details- Type
- \Project
- Inherited_from
- \ProjectComponent::$$project
- Inherited_from
- \Task::$$project
- Inherited_from
- \GitBaseTask::$$project


string
$prune= ''2.weeks.ago''
--prune=<date>option of git-gc
'2.weeks.ago'
Details- Type
- string


\Target
$target= ''
- Type
- \Target
- Inherited_from
- \Task::$$target
- Inherited_from
- \GitBaseTask::$$target


string
$taskName= ''
- Type
- string
- Inherited_from
- \Task::$$taskName
- Inherited_from
- \GitBaseTask::$$taskName


string
$taskType= ''
- Type
- string
- Inherited_from
- \Task::$$taskType
- Inherited_from
- \GitBaseTask::$$taskType


\RuntimeConfigurable
$wrapper= ''
- Type
- \RuntimeConfigurable
- Inherited_from
- \Task::$$wrapper
- Inherited_from
- \GitBaseTask::$$wrapper
Methods


getDescription(
)
:
string
Returns the textual description of the task
Inherited from: \Task::getDescription()\GitBaseTask::getDescription()Type | Description |
---|---|
string | The text description of the task |


getGitClient(
$reset
=
false, $repository
=
null
)
:
void
Name | Type | Description |
---|---|---|
$reset | ||
$repository |


getLocation(
)
:
\Location
Returns the location within the buildfile this task occurs. Used by {@link BuildException} to give detailed error messages.
Inherited from: \Task::getLocation()\GitBaseTask::getLocation()Type | Description |
---|---|
\Location | The location object describing the position of this task within the buildfile. |


getOwningTarget(
)
:
\Target
Returns the owning target of this task.
Inherited from: \Task::getOwningTarget()\GitBaseTask::getOwningTarget()Type | Description |
---|---|
\Target | The target object that owns this task |


getProject(
)
:
\Project
Returns a reference to current project
Inherited from: \ProjectComponent::getProject()\Task::getProject()\GitBaseTask::getProject()Type | Description |
---|---|
\Project | Reference to current porject object |


getRuntimeConfigurableWrapper(
)
:
\RuntimeConfigurable
Returns the wrapper object for runtime configuration
Inherited from: \Task::getRuntimeConfigurableWrapper()\GitBaseTask::getRuntimeConfigurableWrapper()Type | Description |
---|---|
\RuntimeConfigurable | The wrapper object used by this task |


getTaskName(
)
:
string
Returns the name of task, used only for log messages
Inherited from: \Task::getTaskName()\GitBaseTask::getTaskName()Type | Description |
---|---|
string | Name of this task |


getTaskType(
)
:
string
Returns the name of the task under which it was invoked, usually the XML tagname
Inherited from: \Task::getTaskType()\GitBaseTask::getTaskType()Type | Description |
---|---|
string | The type of this task (XML Tag) |


log(
string $msg, integer $level
=
Project::MSG_INFO
)
:
void
Provides a project level log event to the task.
Inherited from: \Task::log()\GitBaseTask::log()Name | Type | Description |
---|---|---|
$msg | string | The message to log |
$level | integer | The priority of the message |
- See
- \BuildEvent
- See
- \BuildListener


main(
)
:
void
The main entry point for the task
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.


maybeConfigure(
)
:
void
Configure this task if it hasn't been done already.
Inherited from: \Task::maybeConfigure()\GitBaseTask::maybeConfigure()

setDescription(
string $desc
)
:
void
Sets a textual description of the task
Inherited from: \Task::setDescription()\GitBaseTask::setDescription()Name | Type | Description |
---|---|---|
$desc | string | The text describing the task |


setGitPath(
string $gitPath
)
:
\GitBaseTask
Name | Type | Description |
---|---|---|
$gitPath | string | New path to git repository |
Type | Description |
---|---|
\GitBaseTask |


setLocation(
\Location $location
)
:
void
Sets the location within the buildfile this task occurs. Called by the parser to set location information.
Inherited from: \Task::setLocation()\GitBaseTask::setLocation()Name | Type | Description |
---|---|---|
$location | \Location | The location object describing the position of this task within the buildfile. |


setOwningTarget(
\Target $target
)
:
void
Sets the owning target this task belongs to.
Inherited from: \Task::setOwningTarget()\GitBaseTask::setOwningTarget()Name | Type | Description |
---|---|---|
$target | \Target | Reference to owning target |


setProject(
\Project $project
)
:
void
References the project to the current component.
Inherited from: \ProjectComponent::setProject()\Task::setProject()\GitBaseTask::setProject()Name | Type | Description |
---|---|---|
$project | \Project | The reference to the current project |


setRepository(
string $repository
)
:
\GitBaseTask
Name | Type | Description |
---|---|---|
$repository | string | Repo directory |
Type | Description |
---|---|
\GitBaseTask |


setRuntimeConfigurableWrapper(
\RuntimeConfigurable $wrapper
)
:
void
Sets the wrapper object this task should use for runtime configurable elements.
Inherited from: \Task::setRuntimeConfigurableWrapper()\GitBaseTask::setRuntimeConfigurableWrapper()Name | Type | Description |
---|---|---|
$wrapper | \RuntimeConfigurable | The wrapper object this task should use |


setTaskName(
string $name
)
:
string
Sets the name of this task for log messages
Inherited from: \Task::setTaskName()\GitBaseTask::setTaskName()Name | Type | Description |
---|---|---|
$name | string |
Type | Description |
---|---|
string | A string representing the name of this task for log |


setTaskType(
string $name
)
:
void
Sets the type of the task. Usually this is the name of the XML tag
Inherited from: \Task::setTaskType()\GitBaseTask::setTaskType()Name | Type | Description |
---|---|---|
$name | string | The type of this task (XML Tag) |