src/Event/EventType.php
public static function fromJSONLDEvent($eventString)
    {
        $event = json_decode($eventString);
        foreach ($event->terms as $term) {
            if ($term->domain == self::DOMAIN) {
                return new self($term->id, $term->label);
            }
        }
        return null;
    }
public static function fromJSONLDEvent($eventString)
    {
        $event = json_decode($eventString);
        foreach ($event->terms as $term) {
            if ($term->domain == self::DOMAIN) {
                return new self($term->id, $term->label);
            }
        }
        return null;
    }
public static function fromJSONLDEvent ( $ eventString ) { $ event = json_decode ( $ eventString ) ; foreach ( $ event -> terms as $ term ) { if ( $ term -> domain == self :: DOMAIN ) { return new self ( $ term -> id , $ term -> label ) ; } } return null ; }
Creates a new EventType object from a JSON-LD encoded event.

@param string $eventString
The cultural event encoded as JSON-LD

@return self|null
Creates a new EventType object from a JSON - LD encoded event .