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 * doctrine cli configuration and bootstrapping
* *

View file

@ -85,7 +85,7 @@ class Aggregator extends Entity {
} }
public function removeAggregator(Aggregator $child) { 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 * @param Channel $child
* @todo check if the channel is already member of the group * @todo check if the channel is already member of the group
* @todo add bidrection association * @todo add bidrectional association
*/ */
public function addChannel(Channel $child) { public function addChannel(Channel $child) {
$this->channels->add($child); $this->channels->add($child);
} }
public function removeChannel(Channel $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; protected $channel;
public function __construct(Model\Channel $channel, $value, $timestamp) { public function __construct(Model\Channel $channel, $timestamp, $value) {
$channel->addData($this); // bidirectional association
$this->channel = $channel; $this->channel = $channel;
$this->value = $value; $this->value = $value;

View file

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

View file

@ -30,6 +30,7 @@ use Volkszaehler\Util;
* *
* @author Steffen Vogel <info@steffenvogel.de> * @author Steffen Vogel <info@steffenvogel.de>
* @package default * @package default
* @todo this is a draft! has to be discussed and implemented
* *
* @Entity * @Entity
* @Table(name="tokens") * @Table(name="tokens")

View file

@ -28,6 +28,7 @@ namespace Volkszaehler\Util;
* *
* @package util * @package util
* @author Steffen Vogel <info@steffenvogel.de> * @author Steffen Vogel <info@steffenvogel.de>
* @todo why not with json?
*/ */
class Configuration { class Configuration {
static protected $values = array(); static protected $values = array();

View file

@ -66,7 +66,7 @@ class Debug {
self::$instance = $this; self::$instance = $this;
// assert options // assert options
assert_options(ASSERT_ACTIVE, TRUE); assert_options(ASSERT_ACTIVE, TRUE); // activate assertions
assert_options(ASSERT_BAIL, FALSE); assert_options(ASSERT_BAIL, FALSE);
assert_options(ASSERT_WARNING, FALSE); assert_options(ASSERT_WARNING, FALSE);
assert_options(ASSERT_CALLBACK, array($this, 'assertHandler')); assert_options(ASSERT_CALLBACK, array($this, 'assertHandler'));
@ -98,7 +98,6 @@ class Debug {
* simple assertion passthrough for future improvements * simple assertion passthrough for future improvements
* *
* @param string $code code to be evaluated * @param string $code code to be evaluated
* @todo check how should be en/disabled (options etc..)
*/ */
public static function assert($code) { public static function assert($code) {
return assert($code); return assert($code);
@ -147,7 +146,7 @@ class Debug {
/** /**
* @return Debug the Debug instance if available * @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; } public static function getInstance() { return self::$instance; }
} }