renamed classes
This commit is contained in:
parent
38a539b9a9
commit
134811e285
19 changed files with 29 additions and 29 deletions
|
@ -30,7 +30,7 @@ use \Volkszaehler\Model;
|
|||
* @author Steffen Vogel <info@steffenvogel.de>
|
||||
* @package channel
|
||||
*/
|
||||
class Channel extends Controller {
|
||||
class ChannelController extends Controller {
|
||||
|
||||
// TODO authentification/indentification
|
||||
public function get() {
|
|
@ -31,7 +31,7 @@ use Volkszaehler\Util;
|
|||
* @todo call via redirect from Controller\Channel
|
||||
* @package data
|
||||
*/
|
||||
class Data extends Controller {
|
||||
class DataController extends Controller {
|
||||
|
||||
/**
|
||||
* @todo authentification/indentification
|
|
@ -28,7 +28,7 @@ namespace Volkszaehler\Controller;
|
|||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
* @package group
|
||||
*/
|
||||
class Group extends Controller {
|
||||
class GroupController extends Controller {
|
||||
|
||||
/**
|
||||
*
|
|
@ -81,15 +81,15 @@ class Dispatcher {
|
|||
case 'png':
|
||||
case 'jpeg':
|
||||
case 'gif':
|
||||
$this->view = new View\JpGraph($request, $response, $format);
|
||||
$this->view = new View\JpGraphView($request, $response, $format);
|
||||
break;
|
||||
|
||||
case 'json':
|
||||
case 'xml':
|
||||
$controller = 'channel';
|
||||
case 'csv':
|
||||
$viewClassName = 'Volkszaehler\View\\' . strtoupper($format) . '\\' . ucfirst($controller);
|
||||
if (!(\Volkszaehler\Util\ClassLoader::classExists($viewClassName)) || !is_subclass_of($viewClassName, '\Volkszaehler\View\View')) {
|
||||
$viewClassName = 'Volkszaehler\View\\' . strtoupper($format) . '\\' . strtoupper($format) . ucfirst($controller) . 'View';
|
||||
if (!(Util\ClassLoader::classExists($viewClassName)) || !is_subclass_of($viewClassName, '\Volkszaehler\View\View')) {
|
||||
throw new \InvalidArgumentException('\'' . $viewClassName . '\' is not a valid View');
|
||||
}
|
||||
|
||||
|
@ -103,8 +103,8 @@ class Dispatcher {
|
|||
}
|
||||
|
||||
// initialize controller
|
||||
$controllerClassName = 'Volkszaehler\Controller\\' . ucfirst(strtolower($request->getParameter('controller')));
|
||||
if (!(\Volkszaehler\Util\ClassLoader::classExists($controllerClassName)) || !is_subclass_of($controllerClassName, '\Volkszaehler\Controller\Controller')) {
|
||||
$controllerClassName = 'Volkszaehler\Controller\\' . ucfirst(strtolower($request->getParameter('controller'))) . 'Controller';
|
||||
if (!(Util\ClassLoader::classExists($controllerClassName)) || !is_subclass_of($controllerClassName, '\Volkszaehler\Controller\Controller')) {
|
||||
throw new \InvalidArgumentException('\'' . $controllerClassName . '\' is not a valid controller');
|
||||
}
|
||||
$this->controller = new $controllerClassName($this->view, $this->em);
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace Volkszaehler\Interpreter;
|
|||
* @author Steffen Vogel (info@steffenvogel.de)
|
||||
*
|
||||
*/
|
||||
class Meter extends Interpreter {
|
||||
class MeterInterpreter extends Interpreter {
|
||||
|
||||
/**
|
||||
* calculates the consumption for interval speciefied by $from and $to
|
|
@ -28,7 +28,7 @@ namespace Volkszaehler\Interpreter;
|
|||
* @package data
|
||||
* @author Steffen Vogel <info@steffenvogel.de>
|
||||
*/
|
||||
class Sensor extends Interpreter {
|
||||
class SensorInterpreter extends Interpreter {
|
||||
|
||||
/**
|
||||
*
|
|
@ -31,7 +31,7 @@ namespace Volkszaehler\Logger;
|
|||
* @author Steffen Vogel <info@steffenvogel.de>
|
||||
* @todo to be implemented
|
||||
*/
|
||||
class Flukso implements Logger {
|
||||
class FluksoLogger implements Logger {
|
||||
|
||||
}
|
||||
|
|
@ -92,7 +92,7 @@ class Channel extends Entity {
|
|||
* obtain channels data interpreter to calculate statistical information
|
||||
*/
|
||||
public function getInterpreter(\Doctrine\ORM\EntityManager $em) {
|
||||
$interpreterClassName = 'Volkszaehler\Interpreter\\' . ucfirst(self::$indicators[$this->indicator][0]);
|
||||
$interpreterClassName = 'Volkszaehler\Interpreter\\' . ucfirst(self::$indicators[$this->indicator][0]) . 'Interpreter';
|
||||
if (!(\Volkszaehler\Util\ClassLoader::classExists($interpreterClassName)) || !is_subclass_of($interpreterClassName, '\Volkszaehler\Interpreter\Interpreter')) {
|
||||
throw new \InvalidArgumentException('\'' . $interpreterClassName . '\' is not a valid Interpreter');
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace Volkszaehler\View\CSV;
|
|||
* @author Steffen Vogel <info@steffenvogel.de>
|
||||
* @package data
|
||||
*/
|
||||
class Data extends CSV {
|
||||
class CSVDataView extends CSVView {
|
||||
public function add($obj, $data) {
|
||||
$this->csv = array_merge($this->csv, $data);
|
||||
}
|
|
@ -34,7 +34,7 @@ use Volkszaehler\Util;
|
|||
* @author Steffen Vogel <info@steffenvogel.de>
|
||||
* @package default
|
||||
*/
|
||||
abstract class CSV extends View\View {
|
||||
abstract class CSVView extends View\View {
|
||||
protected $csv = array();
|
||||
protected $header = array();
|
||||
protected $footer = array();
|
|
@ -63,7 +63,7 @@ class Request {
|
|||
* setter & getter
|
||||
*/
|
||||
public function getHeader($header) { return $this->headers[$header]; }
|
||||
public function getMethod() { return $this->method; };
|
||||
public function getMethod() { return $this->method; }
|
||||
public function getParameter($name, $method = 'get') {
|
||||
return (isset($this->parameters[$method][$name])) ? $this->parameters[$method][$name] : NULL;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace Volkszaehler\View\JSON;
|
|||
* @author Steffen Vogel <info@steffenvogel.de>
|
||||
* @package channel
|
||||
*/
|
||||
class Channel extends JSON {
|
||||
class JSONChannelView extends JSONView {
|
||||
|
||||
public function add(\Volkszaehler\Model\Channel $obj, array $data = NULL) {
|
||||
$channel['uuid'] = (string) $obj->getUuid();
|
|
@ -28,7 +28,7 @@ namespace Volkszaehler\View\JSON;
|
|||
* @author Steffen Vogel <info@steffenvogel.de>
|
||||
* @package group
|
||||
*/
|
||||
class Group extends JSON {
|
||||
class JSONGroupView extends JSONView {
|
||||
|
||||
public function add(\Volkszaehler\Model\Group $obj, $recursive = FALSE) {
|
||||
$group['uuid'] = (string) $obj->getUuid();
|
|
@ -35,7 +35,7 @@ use Volkszaehler\Util;
|
|||
* @package default
|
||||
* @author Steffen Vogel <info@steffenvogel.de>
|
||||
*/
|
||||
abstract class JSON extends View\View {
|
||||
abstract class JSONView extends View\View {
|
||||
protected $json = array();
|
||||
|
||||
/**
|
|
@ -36,7 +36,7 @@ require_once \Volkszaehler\BACKEND_DIR . '/lib/vendor/JpGraph/jpgraph_date.php';
|
|||
* @link http://jpgraph.net/
|
||||
* @todo add caching
|
||||
*/
|
||||
class JpGraph extends View {
|
||||
class JpGraphView extends View {
|
||||
/**
|
||||
* indicator => ynaxis[n] mapping
|
||||
*/
|
||||
|
@ -133,14 +133,14 @@ class JpGraph extends View {
|
|||
$yaxis = $this->graph->yaxis;
|
||||
}
|
||||
else {
|
||||
$this->axes[$obj->getIndicator()] = $count - 1;
|
||||
$this->axes[$channel->getIndicator()] = $count - 1;
|
||||
|
||||
$this->graph->SetYScale($this->axes[$obj->getIndicator()],'lin');
|
||||
$this->graph->SetYScale($this->axes[$channel->getIndicator()],'lin');
|
||||
|
||||
$yaxis = $this->graph->ynaxis[$this->axes[$obj->getIndicator()]];
|
||||
$yaxis = $this->graph->ynaxis[$this->axes[$channel->getIndicator()]];
|
||||
}
|
||||
|
||||
$yaxis->title->Set($obj->getUnit());
|
||||
$yaxis->title->Set($channel->getUnit());
|
||||
|
||||
$yaxis->SetFont(FF_ARIAL);
|
||||
$yaxis->title->SetFont(FF_ARIAL);
|
||||
|
@ -148,7 +148,7 @@ class JpGraph extends View {
|
|||
$yaxis->SetTitleMargin('50');
|
||||
}
|
||||
|
||||
return $this->axes[$obj->getIndicator()];
|
||||
return $this->axes[$channel->getIndicator()];
|
||||
}
|
||||
|
||||
/**
|
|
@ -32,7 +32,7 @@ use Volkszaehler\View\HTTP;
|
|||
* @author Steffen Vogel <info@steffenvogel.de>
|
||||
* @package channel
|
||||
*/
|
||||
class Channel extends XML {
|
||||
class XMLChannelView extends XMLView {
|
||||
|
||||
public function __construct(HTTP\Request $request, HTTP\Response $response) {
|
||||
parent::__construct($request, $response);
|
|
@ -30,7 +30,7 @@ use Volkszaehler\View\HTTP;
|
|||
* @author Steffen Vogel <info@steffenvogel.de>
|
||||
* @package group
|
||||
*/
|
||||
class Group extends XML {
|
||||
class XMLGroupView extends XMLView {
|
||||
protected $xml;
|
||||
|
||||
public function __construct(HTTP\Request $request, HTTP\Request $response) {
|
|
@ -32,7 +32,7 @@ use Volkszaehler\Util;
|
|||
* @author Steffen Vogel <info@steffenvogel.de>
|
||||
* @package default
|
||||
*/
|
||||
abstract class XML extends View\View {
|
||||
abstract class XMLView extends View\View {
|
||||
protected $xmlDoc;
|
||||
|
||||
public function __construct(HTTP\Request $request, HTTP\Response $response) {
|
|
@ -55,8 +55,8 @@ exec($cmd, $output, $rc);
|
|||
|
||||
if ($rc == 0) {
|
||||
# update dokumentation
|
||||
//$cmd = $vzDir . '/phpdoc/phpdoc -c ' . $vzDir . '/github/share/tools/phpdoc.ini';
|
||||
$cmd = 'php5 ' . $vzDir . '/phpdoctor/phpdoc.php ' . $vzDir . '/github/share/tools/phpdoctor.ini';
|
||||
$cmd = $vzDir . '/phpdoc/phpdoc -c ' . $vzDir . '/github/share/tools/phpdoc.ini';
|
||||
//$cmd = 'php5 ' . $vzDir . '/phpdoctor/phpdoc.php ' . $vzDir . '/github/share/tools/phpdoctor.ini';
|
||||
$output[] = PHP_EOL . $cmd . PHP_EOL;
|
||||
exec($cmd, $output, $rc);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue