PHP 클래스 PartKeepr\SetupBundle\Services\UnitSetupService

파일 보기 프로젝트 열기: partkeepr/PartKeepr

공개 메소드들

메소드 설명
__construct ( EntityManager $entityManager, Symfony\Component\HttpKernel\KernelInterface $kernel ) UnitSetupService constructor.
importUnits ( ) : array Imports units.

보호된 메소드들

메소드 설명
getSiPrefix ( string $name ) : SiPrefix | null Finds an SI Prefix by name.
getUnit ( string $name ) : Unit | null Checks if the specified SI Prefix.

메소드 상세

__construct() 공개 메소드

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

getSiPrefix() 보호된 메소드

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

getUnit() 보호된 메소드

Checks if the specified SI Prefix.
protected getUnit ( string $name ) : Unit | null
$name string The footprint name
리턴 PartKeepr\UnitBundle\Entity\Unit | null

importUnits() 공개 메소드

Imports units.
public importUnits ( ) : array
리턴 array An array with the keys "skipped" and "imported" which contain the number of units skipped and imported