Aller au contenu

omnibase/scholar Référence de l’API

Étage
Structure préparée · Omnibase
Version
main
Vérifié en réel
Son README ne le dit pas
Licence
MIT
composer require omnibase/scholar:dev-main

Lue dans les fichiers PHP du paquet au commit 19769706a596 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.

Base\Scholar

  • ScholarBundle class

    A researcher's site: who they are (Scholar), what they published (Publication: a glitchr/omnischolar Work kept here, with what the site adds to it), their CV (Cv\Position, Degree, Award, Grant, Course, Supervision) and their research themes and projects (Theme). The works are read again each week by scholar:sync (the cron container); a new one waits in the back office until it is validated. Talks are omnibase/agenda Events, services omnibase/consulting Offerings.

    3 methods

Base\Scholar\Admin\Widget

  • PendingPublicationsWidgetType class

    The dashboard's "New publications to validate": what the last syncs found that is not on the site yet - each with its "Validate" and "Reject" -, the CV lines read and still hidden, and when the sources were last read. `yield MenuItem::block('scholar_pending', ...)` in the dashboard's configureWidgetItems() places it.

    4 methods

Base\Scholar\Command

  • SyncCommand class

    Every scholar's works read again from their sources (OpenAlex, HAL, Crossref... through glitchr/omnischolar), their counts and their CV: new works wait in the back office's "Publications to validate", known ones are brought up to date, what the site added is kept. Run it from the cron container (once a week is plenty: deployments/docker/cron/crontab), or from the back office's "Sync now".

    1 method

Base\Scholar\Controller\Admin\Crud\Scholar

  • AwardCrudController class

    A line of the CV: a distinction - a prize, a medal, a fellowship - and who gave it.

    6 methods

  • CourseCrudController class

    A course taught: its title, where, the level, its volume, its years, a link to its material.

    6 methods

  • DegreeCrudController class

    A line of the CV: a degree - its title, where, when, the thesis and its supervisor.

    6 methods

  • GrantCrudController class

    A line of the CV: a grant or a funded project - its funder, reference, role, years and amount.

    6 methods

  • PositionCrudController class

    A line of the CV: a position held - the title, the organization, the department, the years.

    6 methods

  • PublicationCrudController class

    The publications: what the sources gave (read only, refreshed at each sync) and what the site adds (validated or not, hidden, pinned, in the selection, a PDF, links to buy it or to the publisher, a cover, a note, themes). "Validate" and "Reject" on each one - the dashboard's "Publications to validate" has the same two buttons. A publication typed by hand ("New") is the site's: its title, authors, year and venue are the record.

    10 methods

  • ScholarCrudController class

    Who the site is about: the name and the title, the affiliation, the identifiers, where the works are read from (one "source: author" a line - "openalex: A5108007452", "hal: Keitaro Nakatani"), the pages that are theirs elsewhere, the portrait and the biography. "Sync now" reads the sources at once, as the weekly scholar:sync does.

    6 methods

  • SupervisionCrudController class

    A supervision: the student, the level, the subject, the co-supervisors, what became of it.

    6 methods

  • ThemeCrudController class

    The research themes and the projects: a page each (/research/{slug}), the publications filed under it (chosen on each publication).

    3 methods

Base\Scholar\Controller\Client

  • ScholarController class

    The scholar's pages: the publications (filtered by kind, year, theme and words; each to cite or to take as BibTeX, RIS or CSL-JSON, the list as well), one publication's page, the books with their covers, the CV, the teaching (courses and supervisions), the research themes and projects. Only what was validated and not hidden is shown.

    10 methods

Base\Scholar\DependencyInjection

Base\Scholar\Entity

  • Publication class

    A work of the scholar's, as the site shows it: the glitchr/omnischolar Work the sources gave, kept whole (`work`, JSON) and refreshed at each sync, with a few columns copied out of it to sort and filter by; and what the site adds, which no sync ever touches - hidden, pinned, in the selection, a PDF of its own, a link to buy it or to the publisher's page, a cover, a note, its themes, and its status (a new work waits to be validated). A publication typed by hand (`manual`) is the site's alone: its columns are the record.

    74 methods

  • Scholar class

    The person the site is about: how they are named and titled, where they work, their identifiers (ORCID, idHAL, OpenAlex), where their works are read from (the profiles: an omnischolar source's name => the author there), the pages that are theirs elsewhere (sameAs), a portrait and a biography - both left empty until they are given: the pages then show a marked draft, never an invented text.

    51 methods

  • Theme class

    A line of research ("Photochromism and fluorescence switching") or a project (with its years, its funder, its page): a page of its own on the site, and the publications filed under it.

    33 methods

Base\Scholar\Entity\Cv

  • Award class

    A distinction: a prize, a medal, a fellowship, an honorary title - given by whom (`organization`), the year (`start`).

  • Course class

    A course taught: its title, where (`organization`), the level ("L3", "Master 2", "teacher training"), its years, its volume, a link to its material.

    4 methods

  • CvEntry class

    A line of the CV: what (`title`), where (`organization`, `city`, `country`), when (`start` and `end`, ISO 8601 as precise as known: "2001", "2001-09"), a few words more, a link - and where it came from: typed in the back office, or read from ORCID by scholar:sync (`origin`, `externalKey`), in which case it waits hidden until it is checked.

    33 methods · 1 constant

  • Degree class

    A degree: its title ("PhD in Chemistry", "Habilitation"), where and when (`end`, or `start` alone), its thesis, and who supervised it.

    4 methods

  • Grant class

    A grant or a funded project: its title, the funder (`organization`), its reference, the scholar's role ("Principal investigator", "Partner"), its years, its amount as it should be printed.

    6 methods

  • Position class

    A position held: "Professeur des universités" at "ENS Paris-Saclay", since 2015 - the title, the organization, the department or the laboratory.

    2 methods

  • Supervision class

    A supervision: who (`title` holds the student's name), at what level (PhD, master, post-doc), the subject, with whom, and what became of it.

    9 methods

Base\Scholar\Enum

  • PublicationStatus enum

    Where a publication stands: read by scholar:sync and waiting for the scholar's eye (pending), on the site (published), or set aside for good (rejected: a homonym's work, a duplicate the sources could not tell apart) - a rejected work found again by the next sync stays rejected.

    2 methods · 3 cases

  • SupervisionLevel enum

    Who was supervised: a doctoral student, a master's student, a post-doc, an intern.

    2 methods · 5 cases

  • ThemeKind enum

    A line of research (a theme), or a project with its dates and funding.

    2 methods · 2 cases

Base\Scholar\EventListener

  • SitemapListener class

    The publications' and the themes' own pages in /sitemap.xml: omnibase lists the routes it can generate by itself (/publications, /cv...), a publication or a theme is behind an id or a slug it cannot know.

    2 methods

Base\Scholar\Model

  • SyncSummary class

    What one sync did for one scholar: works new (waiting to be validated, or online at once when the scholar says so), brought up to date, found unchanged, the CV lines read, the sources that did not answer - a sync with a source missing is never taken for "that work is gone".

    2 methods · 8 properties

Base\Scholar\Repository

Base\Scholar\Service

  • Citations class

    How a publication is cited: a reference line to copy (authors, year, title, where, volume, pages, DOI - the order the sciences read), and the files a reference manager takes - BibTeX, RIS, CSL-JSON - written by glitchr/omnischolar's Export from what the site shows (its overrides included).

    6 methods

  • Curriculum class

    The CV's sections, each line checked (visible) and in order: the position set by hand first, then the latest - a current one before those that ended.

    4 methods · 1 constant

  • JsonLd class

    The scholar and their works as schema.org reads them: a Person (name, title, affiliation, the pages that are theirs - ORCID, OpenAlex, HAL - as sameAs, research interests as knowsAbout), a ScholarlyArticle, a Book (its ISBNs, its publisher) or a Chapter for each publication.

    3 methods

  • PublicationIndex class

    The scholar's publications, findable by what names a work: any identifier ever seen for it (a DOI, a HAL id, an ISBN of any edition), else its title and year - unless both carry a DOI and they differ (two versions of a dataset, an erratum).

    3 methods

  • Synchronizer class

    A scholar's works read again from every source of their profiles (glitchr/omnischolar's Collector: every page, merged), and laid over the publications the site has: a work it does not know comes in waiting to be validated (online at once if the scholar auto-approves), a known one has its sources' record refreshed - and nothing the site added to it moves (hidden, pinned, selection, PDF, links, cover, note, themes, and a work typed by hand). A rejected work found again stays rejected. A work the sources no longer give is left as it is. The counts (h-index...) come from the metrics source, the CV lines from the CV source (ORCID), hidden until checked.

    4 methods

  • WorkData class

    A glitchr/omnischolar Work as the database keeps it - plain arrays in a JSON column - and back, every field included (authors with their identifiers, the venue, a book's editions). What makes two records the same work for the site (keys(), fingerprint()) is here too.

    5 methods

Base\Scholar\Twig

  • ScholarExtension class

    What a host's own pages ask the scholar bundle: the person (a home page's portrait and title, their JSON-LD), the selection or the latest publications, the books, the themes, a CV section, a publication's reference line, a work type's name.

    3 methods

Base\Scholar

ScholarBundle class

class ScholarBundle extends AbstractBaseBundle ScholarBundle.php:18

A researcher's site: who they are (Scholar), what they published (Publication: a glitchr/omnischolar Work kept here, with what the site adds to it), their CV (Cv\Position, Degree, Award, Grant, Course, Supervision) and their research themes and projects (Theme). The works are read again each week by scholar:sync (the cron container); a new one waits in the back office until it is validated. Talks are omnibase/agenda Events, services omnibase/consulting Offerings.

ScholarBundle::__construct()

public function __construct()

ScholarBundle::getPath()

public function getPath(): string

Modern layout: the class lives in src/, the bundle root is the package root.

ScholarBundle::build()

public function build(ContainerBuilder $container): void

Base\Scholar\Admin\Widget

PendingPublicationsWidgetType class

final class PendingPublicationsWidgetType implements DashboardWidgetTypeInterface PendingPublicationsWidgetType.php:18

The dashboard's "New publications to validate": what the last syncs found that is not on the site yet - each with its "Validate" and "Reject" -, the CV lines read and still hidden, and when the sources were last read. yield MenuItem::block('scholar_pending', ...) in the dashboard's configureWidgetItems() places it.

PendingPublicationsWidgetType::__construct()

public function __construct(readonly PublicationRepository $publications, readonly ScholarRepository $scholars, readonly Curriculum $curriculum)

PendingPublicationsWidgetType::getName()

public static function getName(): string

PendingPublicationsWidgetType::getTemplate()

public function getTemplate(): string

PendingPublicationsWidgetType::getTemplateVars()

public function getTemplateVars(MenuItem $widget): array

Base\Scholar\Command

SyncCommand class

final class SyncCommand extends Command SyncCommand.php:22

Every scholar's works read again from their sources (OpenAlex, HAL, Crossref... through glitchr/omnischolar), their counts and their CV: new works wait in the back office's "Publications to validate", known ones are brought up to date, what the site added is kept. Run it from the cron container (once a week is plenty: deployments/docker/cron/crontab), or from the back office's "Sync now".

SyncCommand::__construct()

public function __construct(readonly ScholarRepository $scholars, readonly Synchronizer $synchronizer)

Base\Scholar\Controller\Admin\Crud\Scholar

AwardCrudController class

class AwardCrudController extends AbstractCrudController AwardCrudController.php:20

A line of the CV: a distinction - a prize, a medal, a fellowship - and who gave it.

AwardCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

AwardCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

AwardCrudController::setScholarRepository()

public function setScholarRepository(ScholarRepository $scholars): void

AwardCrudController::configureFilters()

public function configureFilters(Filters $filters): Filters

AwardCrudController::createEntity()

public function createEntity(string $entityFqcn): object

AwardCrudController::configureFields()

public function configureFields(string $pageName): iterable

CourseCrudController class

class CourseCrudController extends AbstractCrudController CourseCrudController.php:20

A course taught: its title, where, the level, its volume, its years, a link to its material.

CourseCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

CourseCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

CourseCrudController::setScholarRepository()

public function setScholarRepository(ScholarRepository $scholars): void

CourseCrudController::configureFilters()

public function configureFilters(Filters $filters): Filters

CourseCrudController::createEntity()

public function createEntity(string $entityFqcn): object

CourseCrudController::configureFields()

public function configureFields(string $pageName): iterable

DegreeCrudController class

class DegreeCrudController extends AbstractCrudController DegreeCrudController.php:20

A line of the CV: a degree - its title, where, when, the thesis and its supervisor.

DegreeCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

DegreeCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

DegreeCrudController::setScholarRepository()

public function setScholarRepository(ScholarRepository $scholars): void

DegreeCrudController::configureFilters()

public function configureFilters(Filters $filters): Filters

DegreeCrudController::createEntity()

public function createEntity(string $entityFqcn): object

DegreeCrudController::configureFields()

public function configureFields(string $pageName): iterable

GrantCrudController class

class GrantCrudController extends AbstractCrudController GrantCrudController.php:20

A line of the CV: a grant or a funded project - its funder, reference, role, years and amount.

GrantCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

GrantCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

GrantCrudController::setScholarRepository()

public function setScholarRepository(ScholarRepository $scholars): void

GrantCrudController::configureFilters()

public function configureFilters(Filters $filters): Filters

GrantCrudController::createEntity()

public function createEntity(string $entityFqcn): object

GrantCrudController::configureFields()

public function configureFields(string $pageName): iterable

PositionCrudController class

class PositionCrudController extends AbstractCrudController PositionCrudController.php:20

A line of the CV: a position held - the title, the organization, the department, the years.

PositionCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

PositionCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

PositionCrudController::setScholarRepository()

public function setScholarRepository(ScholarRepository $scholars): void

PositionCrudController::configureFilters()

public function configureFilters(Filters $filters): Filters

PositionCrudController::createEntity()

public function createEntity(string $entityFqcn): object

PositionCrudController::configureFields()

public function configureFields(string $pageName): iterable

PublicationCrudController class

class PublicationCrudController extends AbstractCrudController PublicationCrudController.php:38

The publications: what the sources gave (read only, refreshed at each sync) and what the site adds (validated or not, hidden, pinned, in the selection, a PDF, links to buy it or to the publisher, a cover, a note, themes). "Validate" and "Reject" on each one - the dashboard's "Publications to validate" has the same two buttons. A publication typed by hand ("New") is the site's: its title, authors, year and venue are the record.

PublicationCrudController::setScholarServices()

public function setScholarServices(TranslatorInterface $translator, ScholarRepository $scholars): void

PublicationCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

PublicationCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

PublicationCrudController::configureCrud()

public function configureCrud(Crud $crud): Crud

PublicationCrudController::configureFilters()

public function configureFilters(Filters $filters): Filters

PublicationCrudController::configureFields()

public function configureFields(string $pageName): iterable

PublicationCrudController::configureActions()

public function configureActions(Actions $actions): Actions

PublicationCrudController::createEntity()

public function createEntity(string $entityFqcn): object

PublicationCrudController::approve()

public function approve(Request $request, string $entityId): Response

PublicationCrudController::reject()

public function reject(Request $request, string $entityId): Response

ScholarCrudController class

class ScholarCrudController extends AbstractCrudController ScholarCrudController.php:29

Who the site is about: the name and the title, the affiliation, the identifiers, where the works are read from (one "source: author" a line - "openalex: A5108007452", "hal: Keitaro Nakatani"), the pages that are theirs elsewhere, the portrait and the biography. "Sync now" reads the sources at once, as the weekly scholar:sync does.

ScholarCrudController::setScholarServices()

public function setScholarServices(Synchronizer $synchronizer, TranslatorInterface $translator): void

ScholarCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

ScholarCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

ScholarCrudController::configureFields()

public function configureFields(string $pageName): iterable

ScholarCrudController::configureActions()

public function configureActions(Actions $actions): Actions

ScholarCrudController::sync()

public function sync(string $entityId): Response

The scholar's sources read now, as scholar:sync does each week.

SupervisionCrudController class

class SupervisionCrudController extends AbstractCrudController SupervisionCrudController.php:21

A supervision: the student, the level, the subject, the co-supervisors, what became of it.

SupervisionCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

SupervisionCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

SupervisionCrudController::setScholarRepository()

public function setScholarRepository(ScholarRepository $scholars): void

SupervisionCrudController::configureFilters()

public function configureFilters(Filters $filters): Filters

SupervisionCrudController::createEntity()

public function createEntity(string $entityFqcn): object

SupervisionCrudController::configureFields()

public function configureFields(string $pageName): iterable

ThemeCrudController class

class ThemeCrudController extends AbstractCrudController ThemeCrudController.php:21

The research themes and the projects: a page each (/research/{slug}), the publications filed under it (chosen on each publication).

ThemeCrudController::getEntityFqcn()

public static function getEntityFqcn(): string

ThemeCrudController::getPreferredIcon()

public static function getPreferredIcon(): ?string

ThemeCrudController::configureFields()

public function configureFields(string $pageName): iterable

Base\Scholar\Controller\Client

ScholarController class

class ScholarController extends AbstractController ScholarController.php:29

The scholar's pages: the publications (filtered by kind, year, theme and words; each to cite or to take as BibTeX, RIS or CSL-JSON, the list as well), one publication's page, the books with their covers, the CV, the teaching (courses and supervisions), the research themes and projects. Only what was validated and not hidden is shown.

ScholarController::__construct()

public function __construct(readonly PublicationRepository $publications, readonly ScholarRepository $scholars, readonly ThemeRepository $themes, readonly Curriculum $curriculum, readonly Citations $citations, readonly JsonLd $jsonLd, readonly int $perPage = 100, readonly bool $withJsonLd = true)

ScholarController::publications()

public function publications(Request $request): Response

ScholarController::publicationsExport()

public function publicationsExport(Request $request, string $format): Response

The list, filtered as the page is, for a reference manager.

ScholarController::publication()

public function publication(Request $request, int $id, string $slug = ''): Response

ScholarController::publicationExport()

public function publicationExport(int $id, string $format): Response

ScholarController::books()

public function books(): Response

ScholarController::cv()

public function cv(Request $request): Response

ScholarController::teaching()

public function teaching(): Response

ScholarController::research()

public function research(): Response

ScholarController::theme()

public function theme(string $slug): Response

Base\Scholar\DependencyInjection

ScholarConfiguration class

class ScholarConfiguration extends AbstractBaseConfiguration ScholarConfiguration.php:8

ScholarConfiguration::getConfigTreeBuilder()

public function getConfigTreeBuilder(): TreeBuilder

ScholarExtension class

class ScholarExtension extends AbstractBaseExtension ScholarExtension.php:11

ScholarExtension::getConfiguration()

public function getConfiguration(array $config, ContainerBuilder $container): ScholarConfiguration

ScholarExtension::load()

public function load(array $configs, ContainerBuilder $container): void

Base\Scholar\Entity

Publication class

class Publication Publication.php:30

A work of the scholar's, as the site shows it: the glitchr/omnischolar Work the sources gave, kept whole (work, JSON) and refreshed at each sync, with a few columns copied out of it to sort and filter by; and what the site adds, which no sync ever touches - hidden, pinned, in the selection, a PDF of its own, a link to buy it or to the publisher's page, a cover, a note, its themes, and its status (a new work waits to be validated). A publication typed by hand (manual) is the site's alone: its columns are the record.

Publication::__construct()

public function __construct(?Scholar $scholar = null, ?Work $work = null)

Publication::__toString()

public function __toString(): string

Publication::refresh()

public function refresh(Work $work, ?\DateTimeImmutable $at = null): bool

The sources' record, again: the columns follow it, nothing the site added moves. Answers whether anything the page shows changed.

Publication::toWork()

public function toWork(): Work

The work as the site shows and exports it: the sources' record with what the site changed - the columns of a manual one, its own PDF, the publisher's page it gave.

Publication::getId()

public function getId(): ?int

Publication::getScholar()

public function getScholar(): ?Scholar

Publication::setScholar()

public function setScholar(?Scholar $scholar): self

Publication::getStatus()

public function getStatus(): PublicationStatus

Publication::setStatus()

public function setStatus(PublicationStatus|string $status): self

Publication::isPending()

public function isPending(): bool

Publication::isPublished()

public function isPublished(): bool

Publication::approve()

public function approve(): self

Publication::reject()

public function reject(): self

Publication::isShown()

public function isShown(): bool

On the site: validated and not hidden.

Publication::getTitle()

public function getTitle(): ?string

Publication::setTitle()

public function setTitle(?string $title): self

Publication::getType()

public function getType(): string

Publication::setType()

public function setType(WorkType|string|null $type): self

Publication::getWorkType()

public function getWorkType(): WorkType

Publication::isBook()

public function isBook(): bool

Publication::getYear()

public function getYear(): ?int

Publication::setYear()

public function setYear(?int $year): self

Publication::getVenue()

public function getVenue(): ?string

Publication::setVenue()

public function setVenue(?string $venue): self

Publication::getAuthors()

public function getAuthors(): ?string

Publication::setAuthors()

public function setAuthors(?string $authors): self

Publication::getDoi()

public function getDoi(): ?string

Publication::setDoi()

public function setDoi(?string $doi): self

Publication::getCitations()

public function getCitations(): ?int

Publication::getWork()

public function getWork(): ?array

Publication::getAbstract()

public function getAbstract(): ?string

The sources' abstract.

Publication::getSources()

public function getSources(): array

Publication::getIdentifiers()

public function getIdentifiers(): array
Returns

identifiers by scheme

Publication::getHalId()

public function getHalId(): ?string

Publication::getArxivId()

public function getArxivId(): ?string

Publication::getIsbns()

public function getIsbns(): array
Returns

ISBN-13s, the editions' included

Publication::getEditions()

public function getEditions(): array
Returns

a book's editions, newest first

Publication::getMatchKeys()

public function getMatchKeys(): array

Publication::getFingerprint()

public function getFingerprint(): ?string

Publication::getFetchedAt()

public function getFetchedAt(): ?\DateTimeImmutable

Publication::getLastSeenAt()

public function getLastSeenAt(): ?\DateTimeImmutable

Publication::getCreatedAt()

public function getCreatedAt(): \DateTimeImmutable

Publication::isManual()

public function isManual(): bool

Publication::setManual()

public function setManual(bool $manual): self

Publication::isHidden()

public function isHidden(): bool

Publication::setHidden()

public function setHidden(bool $hidden): self

Publication::isPinned()

public function isPinned(): bool

Publication::setPinned()

public function setPinned(bool $pinned): self

Publication::isSelected()

public function isSelected(): bool

Publication::setSelected()

public function setSelected(bool $selected): self

Publication::getPdf()

public function getPdf(): ?string

Publication::getPdfFile()

public function getPdfFile(): ?File

Publication::setPdf()

public function setPdf($pdf): self

Publication::hasPdf()

public function hasPdf(): bool

Publication::getPdfUrl()

public function getPdfUrl(): ?string

Publication::setPdfUrl()

public function setPdfUrl(?string $pdfUrl): self

Publication::getBuyUrl()

public function getBuyUrl(): ?string

Publication::setBuyUrl()

public function setBuyUrl(?string $buyUrl): self

Publication::getPublisherUrl()

public function getPublisherUrl(): ?string

Publication::setPublisherUrl()

public function setPublisherUrl(?string $publisherUrl): self

Publication::getCover()

public function getCover(): ?string

Publication::getCoverFile()

public function getCoverFile(): ?File

Publication::setCover()

public function setCover($cover): self

Publication::hasCover()

public function hasCover(): bool

Publication::getCoverUrl()

public function getCoverUrl(): ?string

The cover to show: the one uploaded, else the sources' (Open Library's).

Publication::getFullTextUrl()

public function getFullTextUrl(): ?string

The full text to offer: the PDF uploaded, the address given, else the sources'.

public function getLink(): ?string

Where the work is read: the publisher's page given, else the DOI, else the sources' page.

Publication::isOpenAccess()

public function isOpenAccess(): bool

Publication::getNote()

public function getNote(): ?string

Publication::setNote()

public function setNote(?string $note): self

Publication::getThemes()

public function getThemes(): Collection

Publication::addTheme()

public function addTheme(Theme $theme): self

Publication::removeTheme()

public function removeTheme(Theme $theme): self

Publication::getSlug()

public function getSlug(): string

The page's address piece: "acid-sensitive-photoswitches".

Scholar class

class Scholar Scholar.php:19

The person the site is about: how they are named and titled, where they work, their identifiers (ORCID, idHAL, OpenAlex), where their works are read from (the profiles: an omnischolar source's name => the author there), the pages that are theirs elsewhere (sameAs), a portrait and a biography - both left empty until they are given: the pages then show a marked draft, never an invented text.

Scholar::__construct()

public function __construct(?string $name = null)

Scholar::__toString()

public function __toString(): string

Scholar::getId()

public function getId(): ?int

Scholar::getName()

public function getName(): ?string

Scholar::setName()

public function setName(?string $name): self

Scholar::getGivenName()

public function getGivenName(): ?string

Scholar::setGivenName()

public function setGivenName(?string $givenName): self

Scholar::getFamilyName()

public function getFamilyName(): ?string

Scholar::setFamilyName()

public function setFamilyName(?string $familyName): self

Scholar::getHonorific()

public function getHonorific(): ?string

Scholar::setHonorific()

public function setHonorific(?string $honorific): self

Scholar::getFullName()

public function getFullName(): string

"Dr. Monica Neagoy".

Scholar::getJobTitle()

public function getJobTitle(): ?string

Scholar::setJobTitle()

public function setJobTitle(?string $jobTitle): self

Scholar::getAffiliation()

public function getAffiliation(): ?string

Scholar::setAffiliation()

public function setAffiliation(?string $affiliation): self

Scholar::getAffiliationUrl()

public function getAffiliationUrl(): ?string

Scholar::setAffiliationUrl()

public function setAffiliationUrl(?string $affiliationUrl): self

Scholar::getOrcid()

public function getOrcid(): ?string

Scholar::setOrcid()

public function setOrcid(?string $orcid): self

Scholar::getProfiles()

public function getProfiles(): array

Scholar::setProfiles()

public function setProfiles(array $profiles): self

Scholar::addProfile()

public function addProfile(string $source, string $author): self

Scholar::getProfilesText()

public function getProfilesText(): string

The profiles as the back office types them: one "source: author" a line.

Scholar::setProfilesText()

public function setProfilesText(?string $text): self

Scholar::getSameAs()

public function getSameAs(): array

Scholar::setSameAs()

public function setSameAs(array $sameAs): self

Scholar::getSameAsText()

public function getSameAsText(): string

Scholar::setSameAsText()

public function setSameAsText(?string $text): self

Scholar::getIdentityUrls()

public function getIdentityUrls(): array

Every page that is this person's: the ones typed, and the profiles read from that have an address (ORCID, OpenAlex, HAL's idHAL).

Scholar::getKeywords()

public function getKeywords(): array

Scholar::setKeywords()

public function setKeywords(array $keywords): self

Scholar::getKeywordsText()

public function getKeywordsText(): string

Scholar::setKeywordsText()

public function setKeywordsText(?string $text): self

Scholar::getPortrait()

public function getPortrait(): ?string

Scholar::getPortraitFile()

public function getPortraitFile(): ?File

Scholar::setPortrait()

public function setPortrait($portrait): self

Scholar::hasPortrait()

public function hasPortrait(): bool

Scholar::getPortraitUrl()

public function getPortraitUrl(): ?string

The portrait's address on the site ("/uploads/…"), what an <img> takes.

Scholar::getBiography()

public function getBiography(): ?string

Scholar::setBiography()

public function setBiography(?string $biography): self

Scholar::getBiographyParagraphs()

public function getBiographyParagraphs(): array

Scholar::isAutoApprove()

public function isAutoApprove(): bool

Scholar::setAutoApprove()

public function setAutoApprove(bool $autoApprove): self

Scholar::getFromYear()

public function getFromYear(): ?int

Scholar::setFromYear()

public function setFromYear(?int $fromYear): self

Scholar::getMetrics()

public function getMetrics(): ?array

Scholar::setMetrics()

public function setMetrics(?array $metrics): self

Scholar::getLastSyncAt()

public function getLastSyncAt(): ?\DateTimeImmutable

Scholar::getLastSync()

public function getLastSync(): ?array

Scholar::rememberSync()

public function rememberSync(array $summary, \DateTimeImmutable $at): self

Theme class

class Theme Theme.php:21

A line of research ("Photochromism and fluorescence switching") or a project (with its years, its funder, its page): a page of its own on the site, and the publications filed under it.

Theme::__construct()

public function __construct(?string $title = null, ThemeKind $kind = ThemeKind::THEME)

Theme::__toString()

public function __toString(): string

Theme::getId()

public function getId(): ?int

Theme::getKind()

public function getKind(): ThemeKind

Theme::setKind()

public function setKind(ThemeKind|string $kind): self

Theme::isProject()

public function isProject(): bool

Theme::getTitle()

public function getTitle(): ?string

Theme::setTitle()

public function setTitle(?string $title): self

Theme::getSlug()

public function getSlug(): ?string

Theme::setSlug()

public function setSlug(?string $slug): self

Theme::getSummary()

public function getSummary(): ?string

Theme::setSummary()

public function setSummary(?string $summary): self

Theme::getDescription()

public function getDescription(): ?string

Theme::setDescription()

public function setDescription(?string $description): self

Theme::getParagraphs()

public function getParagraphs(): array

Theme::getImage()

public function getImage(): ?string

Theme::getImageFile()

public function getImageFile(): ?File

Theme::setImage()

public function setImage($image): self

Theme::getImageUrl()

public function getImageUrl(): ?string

The picture's address on the site ("/uploads/…").

Theme::getStartYear()

public function getStartYear(): ?int

Theme::setStartYear()

public function setStartYear(?int $startYear): self

Theme::getEndYear()

public function getEndYear(): ?int

Theme::setEndYear()

public function setEndYear(?int $endYear): self

Theme::getYears()

public function getYears(): ?string

"2019–2023", "since 2021".

Theme::getFunder()

public function getFunder(): ?string

Theme::setFunder()

public function setFunder(?string $funder): self

Theme::getUrl()

public function getUrl(): ?string

Theme::setUrl()

public function setUrl(?string $url): self

Theme::getPosition()

public function getPosition(): int

Theme::setPosition()

public function setPosition(?int $position): self

Theme::isVisible()

public function isVisible(): bool

Theme::setVisible()

public function setVisible(bool $visible): self

Theme::getPublications()

public function getPublications(): Collection

Base\Scholar\Entity\Cv

Award class

class Award extends CvEntry Award.php:11

A distinction: a prize, a medal, a fellowship, an honorary title - given by whom (organization), the year (start).

Course class

class Course extends CvEntry Course.php:11

A course taught: its title, where (organization), the level ("L3", "Master 2", "teacher training"), its years, its volume, a link to its material.

Course::getLevel()

public function getLevel(): ?string

Course::setLevel()

public function setLevel(?string $level): static

Course::getVolume()

public function getVolume(): ?string

Course::setVolume()

public function setVolume(?string $volume): static

CvEntry class

abstract class CvEntry CvEntry.php:16

A line of the CV: what (title), where (organization, city, country), when (start and end, ISO 8601 as precise as known: "2001", "2001-09"), a few words more, a link - and where it came from: typed in the back office, or read from ORCID by scholar:sync (origin, externalKey), in which case it waits hidden until it is checked.

const ORIGIN_SITE = 'site'

CvEntry::__construct()

public function __construct(?Scholar $scholar = null, ?string $title = null)

CvEntry::__toString()

public function __toString(): string

CvEntry::getId()

public function getId(): ?int

CvEntry::getScholar()

public function getScholar(): ?Scholar

CvEntry::setScholar()

public function setScholar(?Scholar $scholar): static

CvEntry::getTitle()

public function getTitle(): ?string

CvEntry::setTitle()

public function setTitle(?string $title): static

CvEntry::getOrganization()

public function getOrganization(): ?string

CvEntry::setOrganization()

public function setOrganization(?string $organization): static

CvEntry::getCity()

public function getCity(): ?string

CvEntry::setCity()

public function setCity(?string $city): static

CvEntry::getCountry()

public function getCountry(): ?string

CvEntry::setCountry()

public function setCountry(?string $country): static

CvEntry::getStart()

public function getStart(): ?string

CvEntry::setStart()

public function setStart(int|string|null $start): static

CvEntry::getEnd()

public function getEnd(): ?string

CvEntry::setEnd()

public function setEnd(int|string|null $end): static

CvEntry::getStartYear()

public function getStartYear(): ?int

CvEntry::getEndYear()

public function getEndYear(): ?int

CvEntry::isCurrent()

public function isCurrent(): bool

Started and not ended.

CvEntry::getPeriod()

public function getPeriod(): ?string

"2019–2023", "2019–" (current), "2019".

CvEntry::getDescription()

public function getDescription(): ?string

CvEntry::setDescription()

public function setDescription(?string $description): static

CvEntry::getUrl()

public function getUrl(): ?string

CvEntry::setUrl()

public function setUrl(?string $url): static

CvEntry::getPosition()

public function getPosition(): int

CvEntry::setPosition()

public function setPosition(?int $position): static

CvEntry::isVisible()

public function isVisible(): bool

CvEntry::setVisible()

public function setVisible(bool $visible): static

CvEntry::getOrigin()

public function getOrigin(): string

CvEntry::setOrigin()

public function setOrigin(?string $origin): static

CvEntry::getExternalKey()

public function getExternalKey(): ?string

CvEntry::setExternalKey()

public function setExternalKey(?string $externalKey): static

Degree class

class Degree extends CvEntry Degree.php:11

A degree: its title ("PhD in Chemistry", "Habilitation"), where and when (end, or start alone), its thesis, and who supervised it.

Degree::getThesis()

public function getThesis(): ?string

Degree::setThesis()

public function setThesis(?string $thesis): static

Degree::getAdvisor()

public function getAdvisor(): ?string

Degree::setAdvisor()

public function setAdvisor(?string $advisor): static

Grant class

class Grant extends CvEntry Grant.php:11

A grant or a funded project: its title, the funder (organization), its reference, the scholar's role ("Principal investigator", "Partner"), its years, its amount as it should be printed.

Grant::getReference()

public function getReference(): ?string

Grant::setReference()

public function setReference(?string $reference): static

Grant::getRole()

public function getRole(): ?string

Grant::setRole()

public function setRole(?string $role): static

Grant::getAmount()

public function getAmount(): ?string

Grant::setAmount()

public function setAmount(?string $amount): static

Position class

class Position extends CvEntry Position.php:11

A position held: "Professeur des universités" at "ENS Paris-Saclay", since 2015 - the title, the organization, the department or the laboratory.

Position::getDepartment()

public function getDepartment(): ?string

Position::setDepartment()

public function setDepartment(?string $department): static

Supervision class

class Supervision extends CvEntry Supervision.php:12

A supervision: who (title holds the student's name), at what level (PhD, master, post-doc), the subject, with whom, and what became of it.

Supervision::getStudent()

public function getStudent(): ?string

Supervision::getLevel()

public function getLevel(): SupervisionLevel

Supervision::setLevel()

public function setLevel(SupervisionLevel|string $level): static

Supervision::getSubject()

public function getSubject(): ?string

Supervision::setSubject()

public function setSubject(?string $subject): static

Supervision::getCoSupervisors()

public function getCoSupervisors(): ?string

Supervision::setCoSupervisors()

public function setCoSupervisors(?string $coSupervisors): static

Supervision::getOutcome()

public function getOutcome(): ?string

Supervision::setOutcome()

public function setOutcome(?string $outcome): static

Base\Scholar\Enum

PublicationStatus enum

enum PublicationStatus implements TranslatableInterface PublicationStatus.php:14

Where a publication stands: read by scholar:sync and waiting for the scholar's eye (pending), on the site (published), or set aside for good (rejected: a homonym's work, a duplicate the sources could not tell apart) - a rejected work found again by the next sync stays rejected.

case PENDING = 'pending'
case PUBLISHED = 'published'
case REJECTED = 'rejected'

PublicationStatus::label()

public function label(): string

PublicationStatus::trans()

public function trans(TranslatorInterface $translator, ?string $locale = null): string

Its name in the scholar domain: what a select of the back office shows.

SupervisionLevel enum

enum SupervisionLevel implements TranslatableInterface SupervisionLevel.php:9

Who was supervised: a doctoral student, a master's student, a post-doc, an intern.

case PHD = 'phd'
case MASTER = 'master'
case POSTDOC = 'postdoc'
case INTERN = 'intern'
case OTHER = 'other'

SupervisionLevel::label()

public function label(): string

SupervisionLevel::trans()

public function trans(TranslatorInterface $translator, ?string $locale = null): string

Its name in the scholar domain: what a select of the back office shows.

ThemeKind enum

enum ThemeKind implements TranslatableInterface ThemeKind.php:9

A line of research (a theme), or a project with its dates and funding.

case THEME = 'theme'
case PROJECT = 'project'

ThemeKind::label()

public function label(): string

ThemeKind::trans()

public function trans(TranslatorInterface $translator, ?string $locale = null): string

Its name in the scholar domain: what a select of the back office shows.

Base\Scholar\EventListener

SitemapListener class

final class SitemapListener SitemapListener.php:15

The publications' and the themes' own pages in /sitemap.xml: omnibase lists the routes it can generate by itself (/publications, /cv...), a publication or a theme is behind an id or a slug it cannot know.

SitemapListener::__construct()

public function __construct(readonly PublicationRepository $publications, readonly ThemeRepository $themes)

SitemapListener::__invoke()

public function __invoke(SitemapEvent $event): void

Base\Scholar\Model

SyncSummary class

final class SyncSummary SyncSummary.php:11

What one sync did for one scholar: works new (waiting to be validated, or online at once when the scholar says so), brought up to date, found unchanged, the CV lines read, the sources that did not answer - a sync with a source missing is never taken for "that work is gone".

public int $read = 0
public int $created = 0
public int $updated = 0
public int $unchanged = 0
public int $ignored = 0

Works the scholar rejected once, found again: they stay rejected.

public int $cv = 0
public array $incomplete = []
public array $errors = []

SyncSummary::isComplete()

public function isComplete(): bool

SyncSummary::toArray()

public function toArray(): array

Base\Scholar\Repository

PublicationRepository class

class PublicationRepository extends ServiceEntityRepository PublicationRepository.php:14

PublicationRepository::__construct()

public function __construct(ManagerRegistry $registry)

PublicationRepository::shown()

public function shown(): QueryBuilder

What the site shows: validated, not hidden.

PublicationRepository::findShown()

public function findShown(array $types = [], ?int $year = null, ?Theme $theme = null, ?string $text = null, ?int $limit = null, int $offset = 0, array $excludeTypes = []): array

The list of the publications page: pinned first, then newest first; filtered by kind, year, theme and words of the title, authors or venue.

PublicationRepository::countShown()

public function countShown(array $types = [], ?int $year = null, ?Theme $theme = null, ?string $text = null, array $excludeTypes = []): int

PublicationRepository::findSelected()

public function findSelected(int $limit = 5): array
Returns

the selection: the ones marked, else the pinned, else the latest

PublicationRepository::findOneShown()

public function findOneShown(int $id): ?Publication

PublicationRepository::findYears()

public function findYears(): array
Returns

the years that have a publication, newest first

PublicationRepository::countByType()

public function countByType(): array
Returns

type => count

PublicationRepository::findAllOf()

public function findAllOf(Scholar $scholar): array
Returns

every publication of a scholar, whatever its status: what a sync matches against

PublicationRepository::findPending()

public function findPending(?int $limit = null): array
Returns

the ones waiting for the scholar's eye, newest first

PublicationRepository::countPending()

public function countPending(): int

ScholarRepository class

class ScholarRepository extends ServiceEntityRepository ScholarRepository.php:10

ScholarRepository::__construct()

public function __construct(ManagerRegistry $registry)

ScholarRepository::findMain()

public function findMain(): ?Scholar

The site's scholar: the first one typed (a site is usually one person's).

ThemeRepository class

class ThemeRepository extends ServiceEntityRepository ThemeRepository.php:11

ThemeRepository::__construct()

public function __construct(ManagerRegistry $registry)

ThemeRepository::findVisible()

public function findVisible(?ThemeKind $kind = null): array
Returns

the visible ones, in their order; of one kind when asked

ThemeRepository::findOneVisible()

public function findOneVisible(string $slug): ?Theme

Base\Scholar\Service

Citations class

final class Citations Citations.php:19

How a publication is cited: a reference line to copy (authors, year, title, where, volume, pages, DOI - the order the sciences read), and the files a reference manager takes - BibTeX, RIS, CSL-JSON - written by glitchr/omnischolar's Export from what the site shows (its overrides included).

Citations::__construct()

public function __construct(bool $abstracts = false)

Citations::reference()

public function reference(Publication $publication): string

"Chocron, L., Nakatani, K. et al. (2024). Acid-sensitive photoswitches. Chemical Science, 15(41), 17060–17071. https://doi.org/10.1039/d4sc04973j"

Citations::export()

public function export(string $format, Publication|iterable $publications): string
$format

bibtex, ris, csl-json

Citations::contentType()

public static function contentType(string $format): string

Citations::extension()

public static function extension(string $format): string

"bib" for BibTeX, "ris", "json" for CSL-JSON: the file's extension.

Citations::format()

public static function format(string $extension): ?string

"bib" => bibtex: a file's extension to its format, null if none.

Curriculum class

final class Curriculum Curriculum.php:19

The CV's sections, each line checked (visible) and in order: the position set by hand first, then the latest - a current one before those that ended.

const SECTIONS = ['positions' => Position::class, 'degrees' => Degree::class, 'awards' => Award::class, 'grants' => Grant::class, 'courses' => Course::class, 'supervisions' =…

Section => entity, in the order a CV reads.

Curriculum::__construct()

public function __construct(readonly EntityManagerInterface $entityManager)

Curriculum::sections()

public function sections(?array $sections = null): array
$sections

the ones wanted (SECTIONS' keys)

Returns

the sections that have a line

Curriculum::entries()

public function entries(string $class): array

Curriculum::countHidden()

public function countHidden(): int

How many lines of the CV wait hidden (read from ORCID, not checked yet).

JsonLd class

final class JsonLd JsonLd.php:16

The scholar and their works as schema.org reads them: a Person (name, title, affiliation, the pages that are theirs - ORCID, OpenAlex, HAL - as sameAs, research interests as knowsAbout), a ScholarlyArticle, a Book (its ISBNs, its publisher) or a Chapter for each publication.

JsonLd::person()

public function person(Scholar $scholar, ?string $url = null, ?string $image = null): array

JsonLd::publication()

public function publication(Publication $publication, ?string $url = null, ?Scholar $scholar = null): array

JsonLd::list()

public function list(array $publications, string $name, ?Scholar $scholar = null): array

PublicationIndex class

final class PublicationIndex PublicationIndex.php:14

The scholar's publications, findable by what names a work: any identifier ever seen for it (a DOI, a HAL id, an ISBN of any edition), else its title and year - unless both carry a DOI and they differ (two versions of a dataset, an erratum).

PublicationIndex::__construct()

public function __construct(iterable $publications = [])

PublicationIndex::add()

public function add(Publication $publication): void

PublicationIndex::find()

public function find(Work $work): ?Publication

Synchronizer class

class Synchronizer Synchronizer.php:34

A scholar's works read again from every source of their profiles (glitchr/omnischolar's Collector: every page, merged), and laid over the publications the site has: a work it does not know comes in waiting to be validated (online at once if the scholar auto-approves), a known one has its sources' record refreshed - and nothing the site added to it moves (hidden, pinned, selection, PDF, links, cover, note, themes, and a work typed by hand). A rejected work found again stays rejected. A work the sources no longer give is left as it is. The counts (h-index...) come from the metrics source, the CV lines from the CV source (ORCID), hidden until checked.

Synchronizer::__construct()

public function __construct(readonly EntityManagerInterface $entityManager, readonly PublicationRepository $publications, readonly ?Registry $registry = null, readonly ?Collector $collector = null, readonly int $max = 2000, readonly ?string $metricsSource = 'openalex', readonly ?string $cvSource = 'orcid')

Synchronizer::isAvailable()

public function isAvailable(): bool

Whether omnischolar is there to be asked.

Synchronizer::sync()

public function sync(Scholar $scholar, ?\DateTimeImmutable $at = null): SyncSummary

Synchronizer::merge()

public function merge(Scholar $scholar, iterable $works, ?SyncSummary $summary = null, ?\DateTimeImmutable $at = null): SyncSummary

Works laid over the scholar's publications, as a sync does after reading them (public: a test, an import of a file, call it directly).

Persisted, not flushed.

WorkData class

final class WorkData WorkData.php:18

A glitchr/omnischolar Work as the database keeps it - plain arrays in a JSON column - and back, every field included (authors with their identifiers, the venue, a book's editions). What makes two records the same work for the site (keys(), fingerprint()) is here too.

WorkData::toArray()

public static function toArray(Work $work): array

WorkData::fromArray()

public static function fromArray(array $data): Work
$data

what toArray() gave

WorkData::keys()

public static function keys(Work $work): array

What names the work for good: its identifiers ("doi:10.1039/d4sc04973j", "hal:hal-04772417", "isbn:9781412996600"...), its editions' included.

WorkData::fingerprint()

public static function fingerprint(Work $work): string

Its title without accents nor punctuation, and its year: the last resort to tell it again.

WorkData::authorsLine()

public static function authorsLine(Work $work, int $max = 8): string

"Chocron, L.; Nakatani, K. et al.": the authors as a list prints them.

Base\Scholar\Twig

ScholarExtension class

final class ScholarExtension extends AbstractExtension ScholarExtension.php:26

What a host's own pages ask the scholar bundle: the person (a home page's portrait and title, their JSON-LD), the selection or the latest publications, the books, the themes, a CV section, a publication's reference line, a work type's name.

ScholarExtension::__construct()

public function __construct(readonly ScholarRepository $scholars, readonly PublicationRepository $publications, readonly ThemeRepository $themes, readonly Curriculum $curriculum, readonly Citations $citations, readonly JsonLd $jsonLd, readonly TranslatorInterface $translator)

ScholarExtension::getFunctions()

public function getFunctions(): array

ScholarExtension::getFilters()

public function getFilters(): array