/** * Checking that relation type is correct * @param string $type * @return type */ public static function relation_type($type) { if (in_array($type, Relation::relations())) { return true; } throw new LazerException('Wrong relation type'); }