Page 1 of 1

PHP code generation error [SOLVED]

PostPosted: Thu 26 Feb 2015 07:36
by parodid
If you declare an attribute:
Code: Select all
  //Session timeout expressed in minutes
  private static $session_timeout = 15;

Get operation generat is:
Code: Select all
  final public static function getSession_timeout()
  {
    return $this->session_timeout;
  }

Instead of the correct form:
Code: Select all
  final public static function getSession_timeout()
  {
    return self::$session_timeout;
  }


Best regards

Edit: I forgot to mark this problem as solved, sorry

Re: PHP code generation error

PostPosted: Thu 26 Feb 2015 09:10
by Bruno Pagès
Hi,

You are right, the body of getter/setter have to take into account the fact the attribute is static or not

Best regards

Re: PHP code generation error

PostPosted: Thu 26 Feb 2015 17:39
by Bruno Pagès
Hi,

If I am not wrong you use Bouml under Windows, until I deliver an official version correcting this problem (à priori a release 6.8.1) I propose you to get http://www.bouml.fr/bouml.exe and to replace your bouml.exe by this new one, it is a 6.8 patch 1. To correct the PHP definition of the already existing getter/setter on static attributes/relations, just edit these attributes/relations and immediatly confirm ('ok' button) editing.

Best regards,

Bruno Pagès

Re: PHP code generation error

PostPosted: Sat 7 Mar 2015 17:05
by Bruno Pagès
The release 6.8.1 is available fixing this bug

To correct the PHP definition of the already existing getter/setter on static attributes/relations, just edit these attributes/relations and immediatly confirm ('ok' button) editing.

Best regards,

Bruno Pagès