cosmetic changes
This commit is contained in:
parent
f697228f97
commit
1472d4bcc7
9 changed files with 18 additions and 16 deletions
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
d<?php
|
||||
/**
|
||||
* doctrine cli configuration and bootstrapping
|
||||
*
|
||||
|
@ -80,4 +80,4 @@ $cli->addCommands(array(
|
|||
));
|
||||
$cli->run();
|
||||
|
||||
?>
|
||||
?>
|
|
@ -54,4 +54,4 @@ $r = new Router();
|
|||
$r->run();
|
||||
$r->view->send();
|
||||
|
||||
?>
|
||||
?>
|
|
@ -33,7 +33,7 @@ class DataIterator implements \Iterator, \Countable {
|
|||
protected $current;
|
||||
protected $key; // incrementing key
|
||||
protected $stmt; // PDOStatement
|
||||
protected $size; // total readings in PDOStatement
|
||||
protected $size; // total readings in PDOStatement
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
|
|
@ -85,7 +85,7 @@ class Aggregator extends Entity {
|
|||
}
|
||||
|
||||
public function removeAggregator(Aggregator $child) {
|
||||
$this->children->removeElement($child);
|
||||
return $this->children->removeElement($child);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -93,20 +93,22 @@ class Aggregator extends Entity {
|
|||
*
|
||||
* @param Channel $child
|
||||
* @todo check if the channel is already member of the group
|
||||
* @todo add bidrection association
|
||||
* @todo add bidrectional association
|
||||
*/
|
||||
public function addChannel(Channel $child) {
|
||||
$this->channels->add($child);
|
||||
}
|
||||
|
||||
public function removeChannel(Channel $child) {
|
||||
$this->channels->removeElement($child);
|
||||
return $this->channels->removeElement($child);
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo return array via ArrayCollection::toArray()?
|
||||
/*
|
||||
* Setter & getter
|
||||
*/
|
||||
public function getChannels() { return $this->channels; }
|
||||
public function getChannels() { return $this->channels->toArray(); }
|
||||
public function getChildren() { return $this->children->toArray(); }
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -70,8 +70,7 @@ class Data {
|
|||
*/
|
||||
protected $channel;
|
||||
|
||||
public function __construct(Model\Channel $channel, $value, $timestamp) {
|
||||
$channel->addData($this); // bidirectional association
|
||||
public function __construct(Model\Channel $channel, $timestamp, $value) {
|
||||
$this->channel = $channel;
|
||||
|
||||
$this->value = $value;
|
||||
|
|
|
@ -66,7 +66,7 @@ class EntityDefinition extends Definition {
|
|||
protected $unit;
|
||||
|
||||
/**
|
||||
* @todo url relative or absolute?
|
||||
* Relative url to an icon
|
||||
* @var string
|
||||
*/
|
||||
protected $icon;
|
||||
|
|
|
@ -30,6 +30,7 @@ use Volkszaehler\Util;
|
|||
*
|
||||
* @author Steffen Vogel <info@steffenvogel.de>
|
||||
* @package default
|
||||
* @todo this is a draft! has to be discussed and implemented
|
||||
*
|
||||
* @Entity
|
||||
* @Table(name="tokens")
|
||||
|
|
|
@ -28,6 +28,7 @@ namespace Volkszaehler\Util;
|
|||
*
|
||||
* @package util
|
||||
* @author Steffen Vogel <info@steffenvogel.de>
|
||||
* @todo why not with json?
|
||||
*/
|
||||
class Configuration {
|
||||
static protected $values = array();
|
||||
|
|
|
@ -66,7 +66,7 @@ class Debug {
|
|||
self::$instance = $this;
|
||||
|
||||
// assert options
|
||||
assert_options(ASSERT_ACTIVE, TRUE);
|
||||
assert_options(ASSERT_ACTIVE, TRUE); // activate assertions
|
||||
assert_options(ASSERT_BAIL, FALSE);
|
||||
assert_options(ASSERT_WARNING, FALSE);
|
||||
assert_options(ASSERT_CALLBACK, array($this, 'assertHandler'));
|
||||
|
@ -98,7 +98,6 @@ class Debug {
|
|||
* simple assertion passthrough for future improvements
|
||||
*
|
||||
* @param string $code code to be evaluated
|
||||
* @todo check how should be en/disabled (options etc..)
|
||||
*/
|
||||
public static function assert($code) {
|
||||
return assert($code);
|
||||
|
@ -147,7 +146,7 @@ class Debug {
|
|||
|
||||
/**
|
||||
* @return Debug the Debug instance if available
|
||||
* @todo OOP? Should we remove this? Replace by State class?
|
||||
* @todo encapsulate in state class? or inherit from singleton class?
|
||||
*/
|
||||
public static function getInstance() { return self::$instance; }
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue