Set artist attribute

@param array|string $items
@return array
550330
protected function setByArtistAttribute($items)
    {
        if ( ! is_array($items))
        {
            return $items;
        }

        //Check if not multidimensional array (for backward compatibility)
        if((count($items) == count($items, COUNT_RECURSIVE)))
        {
            return $this->getNestedContext(MusicGroup::class, $items);
        }

        //multiple artists
        return array_map(function ($item) {
            return $this->getNestedContext(MusicGroup::class, $item);
        }, $items);
    }
246835
public function insertArray(array $items)
    {
        foreach ($items as $priority => $item) {
            $this->insert($item, $priority);
        }

        return $this;
    }
938308
public function assign(array $items): bool
    {
        foreach ($items as $name) {
            $item = $this->manager->getRole($name);
            $item = $item ?: $this->manager->getPermission($name);
            $this->manager->assign($item, $this->userId);
        }

        return true;
    }
441884
public function select($items)
	{
		$this->select = [];

		if (!empty($items)) {
			$this->addSelect($items);
		}

		return $this;
	}
1142610
public function setItems($items) {

      if (!is_array($items)) {
        throw new \InvalidArgumentException('You can set only array of items');
      }

      $this->items = $items;
      $this->rewind();
      return $this;
    }
1351607
public function setItems($items)
    {
        foreach ($items as $key => $dtoData) {
            $this->items[$key] = new BlockItemDto($dtoData);
        }
    
        return $this;
    }
482907
public function items($items)
    {
        $items = !is_array($items) ? $items->all() : $items;
        $this->message['items'] = $items;
        return $this;
    }
1292136
public function replace(array $items): parent {
        $ac = new ArrayCover($this->_data);
        $this->_data = $ac($items);
        return $this;
    }
1136459
public function setItemsAttribute($items)
     {
         static::saved(function ($model) use ($items) {
             $savedIds = [];
             foreach ($items as $data) {
                 // 상품ID는 필수
                 if (empty(array_filter($data)) || empty($data['product_id'])) {
                     continue;
                 }

                 // 이미 존재하면 저장, 없으면 생성
                 if(!empty($data['id']) && $orderItem = $this->items()->find($data['id'])) {
                     $orderItem->fill($data);
                     $orderItem->save();
                 }
                 else {
                     // 옵션이 무조건 저장되도록 설정 (옵션없이 저장되면 옵션이 삭제되어야 함)
                     if(empty($data['option_values'])) $data['option_values'] = [];
                     $orderItem = $this->items()->create($data);
                 }
                 $savedIds[] = $orderItem->id;
             }

             // 없어진 상품은 삭제
             if(!empty($savedIds)) {
                 $this->items()->whereNotIn('id', $savedIds)->delete();
             }
         });
     }
830778
public function process(array $items)
    {
        foreach ($items as $key => $item) {
            $items[$key] = $this->setImage($item);
        }

        return $items;
    }
987899
protected function setInAlbumAttribute($items)
    {
        if ( ! is_array($items))
        {
            return $items;
        }

        //Check if not multidimensional array (for backward compatibility)
        if((count($items) == count($items, COUNT_RECURSIVE)))
        {
            return $this->getNestedContext(MusicAlbum::class, $items);
        }

        //multiple albums
        return array_map(function ($item) {
            return $this->getNestedContext(MusicAlbum::class, $item);
        }, $items);
    }
887033
public function loadFromArray(array $items)
    {
        foreach ($items as $item) {
            if (is_array($item) && ! empty($item)) {
                $this->add($item);
            }
        }

        return $this;
    }
801644
public function setItems($items)
    {
        $this->items = ($items instanceof Collection) ? $items : Collection::make($items);

        return $this;
    }
1137458
public function setItems($items)
    {
        $orderItems = [];
        foreach ($items as $item) {
            if (is_array($item)) {
                $orderItems[] = new Item($item);
            } elseif (! ($item instanceof Item)) {
                throw new \InvalidArgumentException('Item should be an instance of ' . Item::class);
            }
        }

        return parent::setItems($orderItems);
    }
962158
public function append($items)
	{
		foreach( (array) $items as $key => $item ) 
		{
			array_push($this->attributes, $item);
		}

		return $this;
	}
172720
public function addAll(array $items) : Set
    {
        $values = $this->_pushAll($items);
        $this->setValues($values);
        return $this;
    }
1240095
protected function setCommentAttribute($items)
    {
        if (is_array($items) === false) {
            return $items;
        }

        return array_map(function ($item) {
            return $this->getNestedContext(Comment::class, $item);
        }, $items);
    }