Adds a submitted address
@param string $type
355459
protected function addAddressCheckout($type)
    {
        $submitted = $this->getSubmitted("address.$type");

        if ($this->{"show_{$type}_address_form"} && !empty($submitted)) {

            $address_id = $this->address->add($submitted);
            $this->setSubmitted("{$type}_address", $address_id);

            foreach ($this->address->getExceeded($this->order_user_id) as $address) {
                $this->address->delete($address['address_id']);
            }
        }
    }
246578
private function add ($message, $type = Notification::ERROR, $isRaw = false, $canHide = true)
		{
			$this->_data[] = new Notification ($message, $type, $isRaw, $canHide);
		}
367980
private function addAddressArray(array $address_array, $type)
    {
        foreach ($address_array as $address => $name) {

            if (!method_exists($this, $type)) {
                return false;
            }

            if (is_int($address)) {
                $this->$type($name);
            } else {
                $this->$type($address, $name);
            }
        }

        return true;
    }
224721
public function addFromRequest(Type $type, Request $request)
    {
        $key = parent::addFromRequest($type, $request);

        return $this->saveFromRequest($key, $request);
    }
240026
final public function registerPostType(string $postType): void {
		
		// we make this a public method because we use it in our
		// initialization method below but frequently from the activation
		// action of the plugin itself so that we can flush permalinks
		// based on our new types.
		
		$args = $this->getPostTypeArgs($postType);
		$args["labels"] = $this->getPostTypeLabels($postType);
		$args["rewrite"] = $this->getPostTypeRewrite($postType);
		unset($args["label"], $args["register_meta_box_cb"]);
		
		register_post_type($postType, $args);
	}
1354386
protected function addAddress($address, $label, $field)
    {
        $label = is_string($label) ? trim($label) : $label;
        $address = is_string($address) ? trim($address) : $label;

        $label = $label ?: $address;

        if (!empty($address)) {
            $this->{$field}[$address] = $label;
        }
    }
300532
public function addType(Type $type, $name = '')
    {
        if (!$name) {
            $name = (string)$type;
        }

        $this->types[$name] = $type;
    }
951073
public function addCredential($type)
    {
        $this->data_type = $type;

        $this->setTitleEditCredential();
        $this->setBreadcrumbEditCredential();

        $this->credential->callHandler($type, 'edit');
    }
632926
public function setAddressType($addressType)
    {
        if (!in_array($addressType,
            array(
                AF_INET,
                AF_INET6,
                AF_UNIX
            )
        )) {
            throw new \DomainException('Unsupported address type');
        }

        $this->addressType = $addressType;
        return $this;
    }
811591
protected function addAddresses($address, $name, $type)
    {
        if (is_array($address)) {
            $this->swiftMessage->{"set{$type}"}($address, $name);

            return $this;
        }

        $this->swiftMessage->{"add{$type}"}($address, $name);

        return $this;
    }
471760
public function addType(Type $type)
    {
        $name = $type->getName();

        if (!Type::hasType($name)) {
            Type::addType($name, get_class($type));
        }

        $this->types[$name] = $type;
    }
545947
private function addAsset($type, $uri)
    {
        if(!array_key_exists($type, $this->assets)){
            $this->assets[$type] = array();
        }
        if(!empty($uri) && !in_array($uri, $this->assets[$type])){
            $this->assets[$type][] = $uri;
        }
    }
346115
public function onAddedToType(TypeInterface &$type)
    {
        parent::onAddedToType($type);

        if ($this->getAddIndex()) {
            $type->addIndex(new Index($this->name));
        }

        $type->addTrait(CreatedAtInterface::class, CreatedAtInterfaceImplementation::class)->serialize($this->name);
    }
271149
public function addType(string $name, string $type): void{
        $this->types[$name] = new Type($type);
    }
78908
public function setType($type)
    {
        if ($type instanceof PagSeguroPaymentMethodType) {
            $this->type = $type;
        } else {
            $this->type = new PagSeguroPaymentMethodType($type);
        }
    }
1374452
public function setType($type)
    {
        $const = sprintf('%s::TYPE_%s', __CLASS__, strtoupper($type));
        
        if(defined($const))
        {
            $type = constant($const);
        }
        
        $this->setAttributeDirectly('type', $type);
        
        $this->enumerationStrategy = null;
    }
750815
protected function _addRecipient($type, $address, $name = null)
    {
        $classes = $this->_classes;
        $headers = $this->headers();
        if (!isset($headers[$type])) {
            $addresses = $classes['addresses'];
            $headers[$type] = new $addresses();
        }
        $class = $classes['address'];
        $value = new $class($address, $name);
        $headers[$type][] = $value;
        return $value;
    }