PHP Class PartKeepr\SetupBundle\Services\SiPrefixSetupService

显示文件 Open project: partkeepr/PartKeepr

Public Methods

Method Description
__construct ( EntityManager $entityManager, Symfony\Component\HttpKernel\KernelInterface $kernel ) SiPrefixSetupService constructor.
importSiPrefixes ( ) : array Imports or updates the existing si prefixes.

Protected Methods

Method Description
getSiPrefix ( string $name ) : SiPrefix | null Finds an SI Prefix by name.

Method Details

__construct() public method

SiPrefixSetupService constructor.
public __construct ( EntityManager $entityManager, Symfony\Component\HttpKernel\KernelInterface $kernel )
$entityManager Doctrine\ORM\EntityManager
$kernel Symfony\Component\HttpKernel\KernelInterface

getSiPrefix() protected method

Finds an SI Prefix by name.
protected getSiPrefix ( string $name ) : SiPrefix | null
$name string The SI Prefix name
return PartKeepr\SiPrefixBundle\Entity\SiPrefix | null

importSiPrefixes() public method

Imports or updates the existing si prefixes.
public importSiPrefixes ( ) : array
return array An array with the keys "skipped" and "imported" which contain the number of si prefixes skipped and imported