cosmetic changes

This commit is contained in:
Steffen Vogel 2010-09-22 02:32:03 +02:00
parent f697228f97
commit 1472d4bcc7
9 changed files with 18 additions and 16 deletions

View file

@ -1,4 +1,4 @@
<?php
d<?php
/**
* doctrine cli configuration and bootstrapping
*
@ -80,4 +80,4 @@ $cli->addCommands(array(
));
$cli->run();
?>
?>

View file

@ -54,4 +54,4 @@ $r = new Router();
$r->run();
$r->view->send();
?>
?>

View file

@ -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

View file

@ -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(); }
}
?>

View file

@ -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;

View file

@ -66,7 +66,7 @@ class EntityDefinition extends Definition {
protected $unit;
/**
* @todo url relative or absolute?
* Relative url to an icon
* @var string
*/
protected $icon;

View file

@ -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")

View file

@ -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();

View file

@ -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; }
}