/** * Initializes the session with the connection. * * @param \AppserverIo\RemoteMethodInvocation\ConnectionInterface $connection The connection for the session */ public function __construct(ConnectionInterface $connection) { // parent constructor to ensure property preset parent::__construct(null); // initialize the array for the collections $this->connections = array(); // add the passed connection $this->addConnection($connection); }
/** * The default constructor. * * @param \AppserverIo\Properties\Properties $defaults The properties we want want to use for initialization */ public function __construct(Properties $defaults = null) { // check if properties are passed if ($defaults != null) { // if yes set them parent::__construct($defaults->toArray()); } else { parent::__construct(); } }