Set a list of type definitions

@param TypeDefinitionInterface[] $list
764586
public function setList(array $list)
    {
        foreach ($list as $item) {
            $this->checkType(TypeDefinitionInterface::class, $item);
        }
        $this->list = $list;
    }
181650
public function setMapTypeIds(array $types)
    {
        $parsed = [];
        foreach ($types as $type) {
            $parsed[] = MapTypeId::getIsValid($type)
                ? new JsExpression($type)
                : $type;
        }

        $this->options['mapTypeIds'] = $parsed;
    }
1164411
def DEFINE_list(self, name, default, help, constant=False):
    """"""
    self.AddOption(
        type_info.List(
            name=name,
            default=default,
            description=help,
            validator=type_info.String()),
        constant=constant)
41124
private function setDefinitionArguments(Definition $definition, array $array)
    {
        if (true === array_key_exists('arguments', $array)) {
            foreach ($array['arguments'] as $arg) {
                $definition->addArgument($this->convertArgument($arg));
            }
        }
    }
458061
private void addTypeInternal(AbstractTypeDefinition type) {

        if (type == null) {
            return;
        }

        if (m_types.containsKey(type.getId())) {
            // can't overwrite a type
            return;
        }

        TypeDefinitionContainerImpl tc = new TypeDefinitionContainerImpl();
        tc.setTypeDefinition(type);

        // add to parent
        if (type.getParentTypeId() != null) {
            TypeDefinitionContainerImpl tdc = m_types.get(type.getParentTypeId());
            if (tdc != null) {
                if (tdc.getChildren() == null) {
                    tdc.setChildren(new ArrayList<TypeDefinitionContainer>());
                }
                tdc.getChildren().add(tc);
            }
        }

        m_types.put(type.getId(), tc);
        m_typeList.add(tc);
    }
861345
private void addDefines(final String[] defs, final boolean isDefine) {
    for (final String def2 : defs) {
      UndefineArgument def;
      if (isDefine) {
        def = new DefineArgument();
      } else {
        def = new UndefineArgument();
      }
      def.setName(def2);
      this.defineList.addElement(def);
    }
  }
993253
function setBlockList($list)
    {
        if ($list instanceof \Traversable)
            $list = \Poirot\Std\cast($list)->toArray();

        if (! is_array($list) )
            throw new \InvalidArgumentException(sprintf(
                'List must instanceof Traversable or array; given (%s).'
                , \Poirot\Std\flatten($list)
            ));

        $this->blockList = $list;
        return $this;
    }
858143
private function initMethodDefinitionList()
    {
        $class = new \ReflectionClass( $this->className );
        $methods = $class->getMethods( \ReflectionMethod::IS_PUBLIC );

        foreach( $methods as /* @var $reflect \ReflectionMethod */
                 $reflect )
        {
            if( $reflect->class != $this->className )
            {
                continue;
            }

            $docComment = $reflect->getDocComment();
            $phpDoc = array(
                'name' => $reflect->getName(),
                'definition' => implode( "\n", array_map( 'trim', explode( "\n", $docComment ) ) )
            );

            $this->methodDefinitionList[] = $phpDoc;
        }
    }
154770
protected function initListCharDefinition()
    {
        switch ($this->_type) {
            case self::TYPE_ARROW:
                $this->_listCharFont = new PHPRtfLite_Font(10, 'Wingdings');
                $this->_listChar = '\\\'d8';
                break;
            case self::TYPE_CIRCLE:
                $this->_listCharFont = new PHPRtfLite_Font(10, 'Courier New');
                $this->_listChar = ' o';
                break;
            case self::TYPE_DIAMOND:
                $this->_listCharFont = new PHPRtfLite_Font(10, 'Wingdings');
                $this->_listChar = ' v';
                break;
            case self::TYPE_SQUARE:
                $this->_listCharFont = new PHPRtfLite_Font(10, 'Wingdings');
                $this->_listChar = '\\\'a7';
                break;
            // default is bullet
            default:
                $this->_listCharFont = new PHPRtfLite_Font(10, 'Symbol');
                $this->_listChar = '\\\'B7';
        }

        $this->_rtf->registerFont($this->_listCharFont);
    }
1333788
protected function clear_list($list)
	{
		is_array($list) or $list = array($list);

		foreach ($list as $_list)
		{
			$this->{$_list} = array();
		}
	}
763251
private function setDefinitionTags(Definition $definition, array $array)
    {
        if (isset($array['tags'])) {
            if (!is_array($array['tags'])) {
                throw new InvalidArgumentException(sprintf('Parameter "tags" must be an array for service "%s".', $id));
            }

            foreach ($array['tags'] as $tag) {
                if (!isset($tag['name'])) {
                    throw new InvalidArgumentException(sprintf(
                        'A "tags" entry is missing a "name" key for service "%s".',
                        $id
                    ));
                }

                $name = $tag['name'];
                unset($tag['name']);

                foreach ($tag as $attribute => $value) {
                    if (!is_scalar($value)) {
                        throw new InvalidArgumentException(sprintf(
                            'A "tags" attribute must be of a scalar-type for service "%s", tag "%s".',
                            $id,
                            $name
                        ));
                    }
                }

                $definition->addTag($name, $tag);
            }
        }
    }
1190806
public function import($list)
    {
        if (!is_array($list) && !($list instanceof Iterator)) {
            throw new InvalidArgumentException("Expected a list of properties and types");
        }

        foreach ($list as $name => $type) {
            $this->add($name, $type);
        }

        return $this;
    }
1100864
public function setType($types)
    {
        if (!is_array($types)) {
            $types = [$types];
        }

        $typesToSet = [];
        foreach ($types as $type) {
            if ($type === 'int') {
                $type = 'integer';
            }
            if ($type === 'hash') {
                $type = 'object';
            }

            // handle non-primitive types
            if (!in_array($type, $this->primitiveTypes)) {
                $setType = 'string';
                if (isset($this->specialTypeMapping[$type])) {
                    $setType = $this->specialTypeMapping[$type];
                }
                $typesToSet[] = $setType;

                if (isset($this->formatOverrides[$type])) {
                    $type = $this->formatOverrides[$type];
                }

                $this->setFormat($type);
            } else {
                $typesToSet[] = $type;
            }
        }

        $this->type = new SchemaType($typesToSet);
    }
1299578
public function setByIDList($idList)
    {
        $has = [];

        // Index current data
        foreach ($this->column() as $id) {
            $has[$id] = true;
        }

        // Keep track of items to delete
        $itemsToDelete = $has;

        // add items in the list
        // $id is the database ID of the record
        if ($idList) {
            foreach ($idList as $id) {
                unset($itemsToDelete[$id]);
                if ($id && !isset($has[$id])) {
                    $this->add($id);
                }
            }
        }

        // Remove any items that haven't been mentioned
        $this->removeMany(array_keys($itemsToDelete));
    }
1264516
public function defineAll(array $typemap)
    {
        foreach ($typemap as $id => $type) {
            $this->define($id, $type);
        }
    }
1147266
public function setType($type)
    {
        if (in_array($type, array_keys($this->devices))) {
            $this->type = $type;
        }
    }
131371
private function setDefinitionConfigurator(Definition $definition, array $array)
    {
        if (isset($array['configurator'])) {
            $configurator = $array['configurator'];
            if (is_array($configurator)) {
                $configurator[0] = $this->convertArgument($configurator[0]);
            }

            $definition->setConfigurator($configurator);
        }
    }