/**
  * {inheritdoc}
  */
 public function handle(AbstractEvent $event)
 {
     $name = $event->getName();
     $emitter = $event->getEmitter();
     $emitter->removeListener($name, $this->listener);
     return call_user_func_array([$this->listener, 'handle'], func_get_args());
 }
    public function record($requestId, AbstractEvent $event) {
        $duration = $event->getDuration();

        global $user;
        $referencedDataSourceName = gd_datasource_get_active();

        if (!isset($this->recordsHolder)) {
            $this->recordsHolder = new IndexedRecordsHolder();
        }

        $recordInstance = $this->recordsHolder->initiateRecordInstance();
        $recordInstance->initializeFrom(array(
            NULL, $requestId, $user->uid, $referencedDataSourceName, $event->type, $event->owner, $event->getStartDateTime(), $duration));
        $this->recordsHolder->registerRecordInstance($recordInstance);
    }
 /**
  * 
  * @param WebSoccer $websoccer Application context.
  * @param DbConnection $db DB connection.
  * @param I18n $i18n Messages context.
  * @param SimulationPlayer $player player data model.
  * @param int $teamId ID of team.
  * @param int $seasonId ID of season.
  * @param int $rank Team's table position at the end of the season.
  */
 function __construct(WebSoccer $websoccer, DbConnection $db, I18n $i18n, $teamId, $seasonId, $rank)
 {
     parent::__construct($websoccer, $db, $i18n);
     $this->teamId = $teamId;
     $this->seasonId = $seasonId;
     $this->rank = $rank;
 }
 /**
  * 
  * @param WebSoccer $websoccer Application context.
  * @param DbConnection $db DB connection.
  * @param I18n $i18n Messages context.
  * @param int $teamId ID of team.
  * @param int $scoutId ID of scout.
  * @param int $playerId ID of created youth player.
  */
 function __construct(WebSoccer $websoccer, DbConnection $db, I18n $i18n, $teamId, $scoutId, $playerId)
 {
     parent::__construct($websoccer, $db, $i18n);
     $this->teamId = $teamId;
     $this->scoutId = $scoutId;
     $this->playerId = $playerId;
 }
 /**
  * 
  * @param WebSoccer $websoccer Application context.
  * @param DbConnection $db DB connection.
  * @param I18n $i18n Messages context.
  * @param int $userid ID of user.
  * @param string $username entered user name.
  * @param string $email entered e-mail address with lower case letters.
  */
 function __construct(WebSoccer $websoccer, DbConnection $db, I18n $i18n, $userid, $username, $email)
 {
     parent::__construct($websoccer, $db, $i18n);
     $this->userId = $userid;
     $this->username = $username;
     $this->email = $email;
 }
 /**
  * 
  * @param WebSoccer $websoccer Application context.
  * @param DbConnection $db DB connection.
  * @param I18n $i18n Messages context.
  * @param int $effectFreshness training effect.
  * @param int $effectTechnique training effect.
  * @param int $effectStamina training effect.
  * @param int $effectSatisfaction training effect.
  */
 function __construct(WebSoccer $websoccer, DbConnection $db, I18n $i18n, $playerId, $teamId, $trainerId, &$effectFreshness, &$effectTechnique, &$effectStamina, &$effectSatisfaction)
 {
     parent::__construct($websoccer, $db, $i18n);
     $this->playerId = $playerId;
     $this->teamId = $teamId;
     $this->trainerId = $trainerId;
     $this->effectFreshness =& $effectFreshness;
     $this->effectTechnique =& $effectTechnique;
     $this->effectStamina =& $effectStamina;
     $this->effectSatisfaction =& $effectSatisfaction;
 }
 /**
  * 
  * @param WebSoccer $websoccer Application context.
  * @param DbConnection $db DB connection.
  * @param I18n $i18n Messages context.
  * @param SimulationMatch $match Match data model.
  * @param int $stadiumId ID of stadium.
  * @param float $rateStands sales rate.
  * @param float $rateSeats sales rate.
  * @param float $rateStandsGrand sales rate.
  * @param float $rateSeatsGrand sales rate.
  * @param float $rateVip sales rate.
  */
 function __construct(WebSoccer $websoccer, DbConnection $db, I18n $i18n, SimulationMatch $match, $stadiumId, &$rateStands, &$rateSeats, &$rateStandsGrand, &$rateSeatsGrand, &$rateVip)
 {
     parent::__construct($websoccer, $db, $i18n);
     $this->match = $match;
     $this->stadiumId = $stadiumId;
     $this->rateStands =& $rateStands;
     $this->rateSeats =& $rateSeats;
     $this->rateStandsGrand =& $rateStandsGrand;
     $this->rateSeatsGrand =& $rateSeatsGrand;
     $this->rateVip =& $rateVip;
 }
 function __construct($data)
 {
     parent::__construct();
     $this->result = $data;
 }
Exemple #9
0
 /**
  * Initializes a new instance of this class.
  */
 public function __construct($name)
 {
     parent::__construct();
     $this->createSocket(self::SOCKET_OUT);
     $this->setParam('name', $name);
 }
 public function __construct()
 {
     parent::__construct();
 }
Exemple #11
0
 public function __construct($filename, $destFilename)
 {
     parent::__construct($filename);
     $this->destFilename = $destFilename;
 }
 /**
  * 
  * @param WebSoccer $websoccer Application context.
  * @param DbConnection $db DB connection.
  * @param I18n $i18n Messages context.
  * @param SimulationPlayer $player player data model.
  * @param int $strengthChange change in strength after match.
  */
 function __construct(WebSoccer $websoccer, DbConnection $db, I18n $i18n, SimulationPlayer $player, &$strengthChange)
 {
     parent::__construct($websoccer, $db, $i18n);
     $this->player = $player;
     $this->strengthChange =& $strengthChange;
 }
Exemple #13
0
 /**
  * @param \DateTime $dateTime
  */
 public function compare(\DateTime $dateTime)
 {
     if ($this->schedule !== null) {
     }
     return parent::compare($dateTime);
 }
Exemple #14
0
 /**
  * Adds an event to the loop.
  *
  * This just calls the add method of the Event, and is really just a
  * shortcut.
  *
  * @return void
  */
 public function add(AbstractEvent $event)
 {
     $event->setBase($this);
     $this->events[] = $event;
 }
 /**
  * Constructor
  *
  * @param string $platform  Platform name
  * @param string $url       optional Endpoint url
  */
 public function __construct($platform, $url = null)
 {
     parent::__construct();
     $this->message = sprintf("User %s changed cloud pricing for '%s' platform%s", strip_tags($this->getUserEmail()), $platform, !empty($url) ? ', url:' . strip_tags($url) : '');
     $this->messageToHash = sprintf('%s|%s|%s', $this->timelineEvent->dtime->format('Y-m-d'), $platform, $url ?: '');
 }
 /**
  * 
  * @param WebSoccer $websoccer Application context.
  * @param DbConnection $db DB connection.
  * @param I18n $i18n Messages context.
  * @param SimulationMatch $match Match data model.
  */
 function __construct(WebSoccer $websoccer, DbConnection $db, I18n $i18n, SimulationMatch $match)
 {
     parent::__construct($websoccer, $db, $i18n);
     $this->match = $match;
 }