1
0
mirror of https://github.com/hauke68/Magallanes.git synced 2025-08-26 13:20:17 +02:00
Magallanes/Mage/Task/Factory.php

16 lines
360 B
PHP

<?php
class Mage_Task_Factory
{
/**
*
*
* @param string $taskName
* @return Mage_Task_TaskAbstract
*/
public static function get($taskName)
{
$taskName = str_replace(' ', '_', ucwords(str_replace('/', ' ', $taskName)));
$className = 'Mage_Task_BuiltIn_' . $taskName;
return new $className;
}
}