Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix #436

  • Loading branch information...
commit e443b61a676a2f6d791a4f1e962b1e0e8f383946 1 parent 92d2677
@willdurand willdurand authored
Showing with 12 additions and 1 deletion.
  1. +12 −1 generator/lib/builder/om/PHP5PeerBuilder.php
View
13 generator/lib/builder/om/PHP5PeerBuilder.php
@@ -1311,9 +1311,20 @@ protected function addGetOMClass_NoInheritance_Abstract(&$script)
*
* This method must be overridden by the stub subclass, because
* ".$this->getObjectClassname()." is declared abstract in the schema.
- */
+ */";
+
+ if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+ $script .= "
abstract public static function getOMClass();
";
+ } else {
+ $script .= "
+ public static function getOMClass()
+ {
+ throw new LogicException(\"You can't get OMClass for an abstract Peer class.\");
+ }
+";
+ }
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.