Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc

# Logs and databases #
######################
*.log

# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
2 changes: 1 addition & 1 deletion src/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @author David Coallier <david@echolibre.com>
* @package echolibre\google_wave
* @version 0.1.0
* @license LGPL
* @license LGPL
* @uses \echolibre\google_wave\Document\StringEnum
*/
abstract class AbstractDocument
Expand Down
14 changes: 7 additions & 7 deletions src/Document/Annotation.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* Annotation class
*
* Annotations are used to store data representative in a document. They
* Annotations are used to store data representative in a document. They
* can also be used when interpreting the data to be displayed to a client/user.
*
* See the link lower for more reference.
Expand All @@ -15,37 +15,37 @@
* @author David Coallier <david@echolibre.com>
* @package echolibre\google_wave
* @version 0.1.0
* @license LGPL
* @license LGPL
* @uses \echolibre\google_wave\Document\Range
*/
class Annotation
class Annotation
{
/**
* The google wave api class
*/
const JAVA_CLASS = 'com.google.wave.api.Annotation';

/**
* The name of the annotation
*
* @var string $name
*/
protected $name;

/**
* The value of the annotation
*
* @var mixed $value Any value really.
*/
protected $value;

/**
* The range object for the annotation's validity.
*
* @var \echolibre\google_wave\Document\Range $range The range of the annotation
*/
protected $range;

/**
* Annotation Constructor
*
Expand Down
16 changes: 8 additions & 8 deletions src/Document/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@
* @author David Coallier <david@echolibre.com>
* @package echolibre\google_wave
* @version 0.1.0
* @license LGPL
* @license LGPL
*/
class Element
class Element
{
/**
* The google wave api class
*/
const JAVA_CLASS = 'com.google.wave.api.Element';

/**
* The type of element we are creating.
*
* @var string $type The element type
*/
public $type;

/**
* A private collection of variables used in the magic setters and getters.
*
* @var array $variables The class properties really.
*/
private $variables = array();

/**
* Element Constructor
*
Expand All @@ -51,15 +51,15 @@ public function __construct($elementType, $properties)
$this->$key = $value;
}
}

/**
* Magic setter
*/
public function __set($key, $value)
{
$this->variables[$key] = $value;
}

/**
* Magic getter
*/
Expand All @@ -68,7 +68,7 @@ public function __get($key)
if (isset($this->variables[$key])) {
return $this->variables[$key];
}

return false;
}
}
6 changes: 3 additions & 3 deletions src/Document/FormElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @author David Coallier <david@echolibre.com>
* @package echolibre\google_wave
* @version 0.1.0
* @license LGPL
* @license LGPL
* @uses \echolibre\google_wave\Document\Element
*/
class FormElement extends \echolibre\google_wave\Document\Element
Expand All @@ -21,7 +21,7 @@ class FormElement extends \echolibre\google_wave\Document\Element
* The google wave api class
*/
const JAVA_CLASS = 'com.google.wave.api.FormElement';

/**
* FormElement Constructor
*
Expand All @@ -35,7 +35,7 @@ class FormElement extends \echolibre\google_wave\Document\Element
* @param string $defaultValue The default value of that new element
* @param string $label The label of that new element
*/
public function __construct($elementType, $name,
public function __construct($elementType, $name,
$value = '', $defaultValue = '', $label = '')
{
parent::__construct($elementType, array(
Expand Down
4 changes: 2 additions & 2 deletions src/Document/Gadget.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @author David Coallier <david@echolibre.com>
* @package echolibre\google_wave
* @version 0.1.0
* @license LGPL
* @license LGPL
* @uses \echolibre\google_wave\Document\Element
* @uses \echolibre\google_wave\Document\AbstractDocument
*/
Expand All @@ -24,7 +24,7 @@ class Gadget extends \echolibre\google_wave\Document\Element
* The google wave api class
*/
const JAVA_CLASS = 'com.google.wave.api.Gadget';

/**
* Gadget Element Constructor
*
Expand Down
10 changes: 5 additions & 5 deletions src/Document/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @author David Coallier <david@echolibre.com>
* @package echolibre\google_wave
* @version 0.1.0
* @license LGPL
* @license LGPL
* @uses \echolibre\google_wave\Document\Element
* @uses \echolibre\google_wave\Document\AbstractDocument
*/
Expand All @@ -24,21 +24,21 @@ class Image extends \echolibre\google_wave\Document\Element
* The google wave api class
*/
const JAVA_CLASS = 'com.google.wave.api.Image';

/**
* Image Element Constructor
*
*
* This is the image element constructor.
*
* @uses parent::__construct()
*
*
* @param string $url The url of the image
* @param string $width The width of the image
* @param string $height The height of the image
* @param string $attachmentid The attachment id of the image
* @param string $caption Any caption that could be on the image.
*/
public function __construct($url = '', $width = null, $height = null,
public function __construct($url = '', $width = null, $height = null,
$attachmentId = null, $caption = null)
{
parent::__construct(AbstractDocument::$ELEMENTS->IMAGE, array(
Expand Down
20 changes: 10 additions & 10 deletions src/Document/Range.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @author David Coallier <david@echolibre.com>
* @package echolibre\google_wave
* @version 0.1.0
* @license LGPL
* @license LGPL
* @uses \echolibre\google_wave\RangeException
*/
class Range
Expand All @@ -21,21 +21,21 @@ class Range
* The google wave api class
*/
const JAVA_CLASS = 'com.google.wave.api.Range';

/**
* The starting value of the range.
*
* @var integer $start
* @var integer $start
*/
protected $start;

/**
* The ending value of the range.
*
* @var integer $end
*/
protected $end;

/**
* Range Constructor
*
Expand All @@ -46,29 +46,29 @@ class Range
* @param integer $start The start of the range
* @param integer $end The end of the range
*/
public function __construct($start = 0, $end = 1)
public function __construct($start = 0, $end = 1)
{
$this->start = (int)$start;
$this->end = (int)$end;

if ($this->end - $this->start < 0) {
throw new \echolibre\google_wave\RangeException('Range cannot be less than 0');
}
}

/**
* Is Collapsed
*
* This method returns whether the end is the same type and
* save value of the start value.
* save value of the start value.
*
* @return bool Whether $this->end is === to $this->start
*/
public function isCollapsed()
{
return $this->end === $this->start;
}

/**
* Magic tostring
*
Expand Down
12 changes: 6 additions & 6 deletions src/Document/StringEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @author David Coallier <david@echolibre.com>
* @package echolibre\google_wave
* @version 0.1.0
* @license LGPL
* @license LGPL
*/
class StringEnum
{
Expand All @@ -22,8 +22,8 @@ class StringEnum
* @var array $values
*/
private $values;
/**

/**
* StringEnum Constructor
*
* This method builds a list of enum values
Expand All @@ -37,16 +37,16 @@ public function __construct(array $values)
$this->values[$value] = $value;
}
}
/**

/**
* Magic getters.
*/
public function __get($key)
{
if (isset($this->values[$key])) {
return $this->values[$key];
}

return false;
}
}
4 changes: 2 additions & 2 deletions src/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @author David Coallier <david@echolibre.com>
* @package echolibre\google_wave
* @version 0.1.0
* @license LGPL
* @license LGPL
*/
class Exception extends \Exception {}

Expand All @@ -21,6 +21,6 @@ class Exception extends \Exception {}
* @author David Coallier <david@echolibre.com>
* @package echolibre\google_wave
* @version 0.1.0
* @license LGPL
* @license LGPL
*/
class RangeException extends \RangeException {}
Loading