Destiny\Advisors\Event::isActive PHP Method

isActive() public method

public isActive ( )
    public function isActive()
    {
        if (!$this->expirationKnown) {
            return true;
        }
        return !$this->expirationDate->isPast();
    }

Usage Example

Beispiel #1
0
 protected function gEvents()
 {
     $collection = $this->newCollection();
     foreach ($this->properties['events']['events'] as $event) {
         $hash = (string) $event['eventHash'];
         $event = new Advisors\Event($event);
         if ($event->isActive()) {
             $collection->put($hash, $event);
         }
     }
     return $collection;
 }