Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/worker/src/MWP/Action
File: Registry.php
<?php
[0] Fix | Delete
/*
[1] Fix | Delete
* This file is part of the ManageWP Worker plugin.
[2] Fix | Delete
*
[3] Fix | Delete
* (c) ManageWP LLC <contact@managewp.com>
[4] Fix | Delete
*
[5] Fix | Delete
* For the full copyright and license information, please view the LICENSE
[6] Fix | Delete
* file that was distributed with this source code.
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
class MWP_Action_Registry
[10] Fix | Delete
{
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* @var MWP_Action_Definition[]
[14] Fix | Delete
*/
[15] Fix | Delete
private $definitions = array();
[16] Fix | Delete
[17] Fix | Delete
public function addDefinition($name, MWP_Action_Definition $definition)
[18] Fix | Delete
{
[19] Fix | Delete
$this->definitions[$name] = $definition;
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
public function getDefinition($name)
[23] Fix | Delete
{
[24] Fix | Delete
if (!isset($this->definitions[$name])) {
[25] Fix | Delete
throw new MWP_Worker_Exception(MWP_Worker_Exception::ACTION_NOT_REGISTERED, sprintf('Action "%s" is not registered', $name), array(
[26] Fix | Delete
'action' => $name,
[27] Fix | Delete
));
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
return $this->definitions[$name];
[31] Fix | Delete
}
[32] Fix | Delete
[33] Fix | Delete
public function hasDefinition($name)
[34] Fix | Delete
{
[35] Fix | Delete
return isset($this->definitions[$name]);
[36] Fix | Delete
}
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function