playlist_id = $playlist_id; $this->api = $api; $platform_ins = new $platform( $this ); if ( ! ( $platform_ins instanceof Platform ) ) { throw new \Exception( 'Invalid Platform' ); } $this->platform = $platform_ins; } public function get(): Platform { return $this->platform; } }