Jyxo\Mail\Parser::addPart PHP 메소드

addPart() 개인적인 메소드

Adds a part to the list.
private addPart ( integer $structureNo, string $partType )
$structureNo integer Part Id in the structure
$partType string Part type
    private function addPart(int $structureNo, string $partType)
    {
        $fields = ['fname', 'pid', 'ftype', 'fsize', 'hasAttach', 'charset'];
        $no = isset($this->parts[$partType]['pid']) ? count($this->parts[$partType]['pid']) : 0;
        foreach ($fields as $field) {
            if (!empty($this->structure[$field][$structureNo])) {
                $this->parts[$partType][$field][$no] = $this->structure[$field][$structureNo];
            }
        }
    }