获取样式
@param string $name
@return Style
@throws \InvalidArgumentException
323840
public function getStyle($name) {
        if (!$this->hasStyle($name)) {
            throw new \InvalidArgumentException(sprintf('Undefined style: %s', $name));
        }

        return $this->styles[strtolower($name)];
    }
1295673
public function get($name)
    {
        if (! $this->has($name)) throw new \InvalidArgumentException('no such task');

        $task = new Task($this, $this->getReflection()->getMethod($name . 'Task'));
        return $task;
    }
33942
protected function setStyle($style)
    {
        if (is_string($style) === false) {
            throw new \InvalidArgumentException(
                'The style label must be a string.'
            );
        }
        if (!in_array($style, $this->STYLES)) {
            throw new \InvalidArgumentException(
                'Invalid style.'
            );
        }

        $this->style = $style;

        return $this;
    }
628643
public function getElement($name)
    {

        if (!isset($this->elements[$name])) {
            throw new InvalidArgumentException(" Element not found : {$name}");
        }

        return $this->elements[$name];
    }
498682
public function setProperty($name, $value)
    {
        if (!is_string($name)) {
            throw new InvalidArgumentException(sprintf('%s expects parameter 1 to be string, %s given', __METHOD__, (is_object($name) ? get_class($name) : gettype($name))));
        }

        if (!is_string($value)) {
            throw new InvalidArgumentException(sprintf('%s expects parameter 2 to be string, %s given', __METHOD__, (is_object($value) ? get_class($value) : gettype($value))));
        }

        $this->parseStyleAttribute();

        $this->properties[$name] = $value;

        $this->updateStyleAttribute();

        return $this;
    }
151737
public static function normalize($name)
	{
		if (!static::isValid($name))
		{
			throw new InvalidArgumentException("Invalid tag name '" . $name . "'");
		}

		// Non-namespaced tags are uppercased
		if (strpos($name, ':') === false)
		{
			$name = strtoupper($name);
		}

		return $name;
	}
703397
public function _get($name)
    {
        $getMethod = 'get' . ucfirst($name);
        if (method_exists($this, $getMethod)) {
            return $this->$getMethod();
        }
        throw new \InvalidArgumentException(sprintf('Getter does not exist for "%s" property', $name));
    }
680374
public function get($name)
    {
        if (!isset($this->assets[$name])) {
            throw new \InvalidArgumentException(sprintf('There is no "%s" asset.', $name));
        }

        return $this->assets[$name];
    }
1251651
public function getConstant($name)
    {
        if ( ! isset($this->constants[$name])) {
            throw new \InvalidArgumentException(sprintf('The constant "%s" does not exist.'));
        }

        return $this->constants[$name];
    }
1000099
public static function lookupByName($name)
    {
        if (empty($name)) {
            throw new \InvalidArgumentException('Argument "name" cannot be empty');
        }

        if (!isset(self::$methods_config[$name])) {
            throw new \InvalidArgumentException('Method "' . $name . '" doesn\'t exist');
        }

        return self::$methods_config[$name];
    }
974556
public function getBranding($name)
    {
        foreach ($this->brandings as $branding) {
            if ($branding->getName() === $name) {
                return $branding;
            }
        }

        $names = array_map(function ($branding) {
            return $branding->getName();
        }, $this->brandings);

        throw new \InvalidArgumentException(sprintf('No branding named "%s". Available are: %s.', $name, implode(', ', $names)));
    }
483965
public function setName($name)
    {
        if (is_scalar($name) || method_exists($name, '__toString')) {
            $this->name = (string) $name;
        } else {
            throw new InvalidArgumentException('The name must be a string.');
        }

        if ($this->name === '') {
            $this->name = 'Error';
        }

        return $this;
    }
610955
public static function corAuxiliar($name)
    {
        $style = str_replace("#", "", $name);
        $style = strlen($style) === 3 ? $style[0] . $style[0] . $style[1] . $style[1] . $style[2] . $style[2] : $style;

        $todo = hexdec($style[0] . $style[1]) + hexdec($style[2] . $style[3]) + hexdec($style[4] . $style[5]) - 550;

        if ($todo > 0): //cor clara
            $base = round($todo / 60);
            return "#{$base}{$base}{$base}";
        else: //cor escura
            return "#FFF";
        endif;
    }
426921
final public function getColumn(string $name): Column
    {
        if (!array_key_exists($name, $this->columns)) {
            throw new InvalidArgumentException('Column '.$name.' not added');
        }

        return $this->columns[$name];
    }
947720
public static function fromQName( $name )
	{
		if ( $name instanceof QName )
		{
			$name = "{$name->prefix}:{$name->localName}";
		}
		if ( ! is_string( $name ) )
		{
			throw new \InvalidArgumentException( "$name must be string or a QName instanxe" );
		}

		$types = SchemaTypes::getInstance();
		$attribute = $types->getElement( $name );

		if ( ! $attribute )
		{
			return null;
		}

		$result = new DOMSchemaAttribute();
		error_log( __CLASS__ . " need to populate the DOMSchemaAttribute instance" );
		return $result;
	}
832011
public function get($name)
    {
        if (!isset($this->formats[$name])) {
            throw new \InvalidArgumentException(sprintf(
                'Unknown format "%s", known formats: "%s"',
                $name, implode(', ', array_keys($this->formats))
            ));
        }

        return $this->formats[$name];
    }
1045856
public function getTheme($name)
    {
        $key = $this->normalizeKey($name);
        
        return (array_key_exists($key, $this->themes)) ? $this->themes[$key] : null;
    }