<?php
    class Blueprint {
        private $blueprintName;
        private $blueprintId;
        private $components;
        private $ME;
        private $PE;
        private $manufacturingTime;
        private $researchingTime;
        private $copyingTime;


        public function __construct($bluePrintName, $bpId){

                $this->blueprintId = $bpId;
                $this->blueprintName = $bluePrintName;
                $this->components = $this->setBPComponents($this->blueprintId);
                echo "Объект создан";


        }

        public function setBPComponents($bpId){
            // Берем компоненты из базы
            $components = array('id'=>'count');
            return $components;
        }

        static private function setBluePrintId($bluePrintName){
            if ($bluePrintName == "test"){
                $bpId = 5;
                return $bpId;
            };

        }



        public static function checBP($blueprintName){
            $bpId = self::setBluePrintId($blueprintName);

            if (isset($bpId)){
                $object = new Blueprint($blueprintName, $bpId);
                return $object;
            } else {
                echo "Нет такого БП";
                return false;
            }
        }
    }

$a = Blueprint::checBP("test");



