Get the value of a property for the first element in the set of matched elements
or set one or more properties for every matched element.

@param string $name
@param string $val

@return $this|mixed|null
546932
public function prop(string $name, $val=null)
    {
        if ($val !== null) { // set attribute for all nodes
            foreach ($this->nodes as $node) {
                $node->$name = $val;
            }

            return $this;
        }
        // get property value for first element
        if ($name === 'outerHTML') {
            return $this->getOuterHtml();
        }
        if ($node = $this->getFirstElmNode()) {
            if (isset($node->$name)) {
                return $node->$name;
            }
        }
    }
1276062
public function get(string $name, $default = null, $onlyReturnFirst = true)
    {
        if ($this->has($name)) {
            $value = $this->data[$this->normalizeName($name)];

            if ($onlyReturnFirst) {
                return $value[0];
            }
        } else {
            $value = $default;
        }

        return $value;
    }
1316300
public function get(string $name)
    {
        if (empty($name)) {
            return null;
        }

        if (isset($this->{$name})) {
            return $this->{$name};
        }

        if (isset($this->properties[$name])) {
            return $this->properties[$name];
        }

        return null;
    }
1114349
private function getOtherValue( $val )
	{
		/**
		 * @var XPath2Item $otherValue
		 */
		$otherValue = $val->getValue();
		return $otherValue instanceof XPath2Item
			? $otherValue->getValue()
			: $otherValue;
	}
172638
static function val($name, $value = null) 
    {
        if ($value === null)
            return static::$vars[$name];
        static::$vars[$name] = $value;
    }
493621
public function get($name)
    {
        if (strpos($name, '.')) {
            $names = explode('.', $name);
            $node = $this;

            foreach ($names as $n) {
                if ($node instanceof self && property_exists($node, $n)) {
                    $node = $node->$n;
                } else {
                    if ($this->isStrict()) {
                        exit("Stored data don't exists node '$n'\n");
                    }

                    $node = null;
                    break;
                }
            }

            return $node;
        }

        return property_exists($this, $name) ? $this->$name : null;
    }
748468
protected function _id($name, $val)
    {
        $name = $this->_domId($name);

        $idSuffix = mb_strtolower(str_replace(['/', '@', '<', '>', ' ', '"', '\''], '-', $val));
        $count = 1;
        $check = $idSuffix;
        while (in_array($check, $this->_idSuffixes)) {
            $check = $idSuffix . $count++;
        }
        $this->_idSuffixes[] = $check;

        return trim($name . '-' . $check, '-');
    }
435505
public function getValueAttribute($name, $value = null)
    {
        if (is_null($name)) {
            return $value;
        }

        if (! is_null($value)) {
            return $value;
        }
    }
781440
public function _get($name)
    {
        $object = $this->getObject();
        $property = $this->getReflectionProperty($name);

        $value = $property->getValue($this->getObject());
        if (is_array($value))
		{
		    $property->setValue($object, new \ArrayObject($value));
        }

        return $property->getValue($this->getObject());
    }
505382
public function setConfig($name, $val = null)
    {
        $setting = $this->settings;
        if (is_array($name)) {
            $setting = array_merge($setting, $name);
        } elseif ($val === null) {
            if (file_exists($name)) {
                $configs = include $name;
                $setting = array_merge($setting, $configs);
            } else {
                throw new Exception("不存在的配置文件:" . $name);
            }
        } else {
            $setting[$name] = $val;
        }
        $this->settings = $setting;
        return $this;
    }
570884
public function setParam($name, $val)
    {
        if ( ! is_string($name) || ! is_string($val)) {
            return;
        }
        $this->data[$name] = $val;

        return $this;
    }
700600
public function set($key, $val = null)
    {
        if (is_array($key)) {
            $this->locals = array_merge($this->locals->all(), $key);
        } else {
            $this->locals[$key] = $val;
        }
        return $this;
    }
935001
public function get($val)
    {
        // If we already have the code, just return that
        if (is_numeric($val)) {
            return $val;
        }

        if (array_key_exists($val, $this->colors)) {
            return $this->colors[$val];
        }

        return null;
    }
337853
function (name, val) {
    if (typeof name === 'object') {
      return this.visit('set', name);
    }
    utils.set(this.snippets, name, val);
    return this;
  }
1355959
public function css(string $name, $val=null)
    {
        if ($val !== null) { // set css for all nodes
            foreach ($this->getElements() as $node) {
                $style = self::parseStyle($node->getAttribute('style'));
                $style[$name] = $val;
                $node->setAttribute('style', self::getStyle($style));
            }
            return $this;
        }
        if ($node = $this->getFirstElmNode()) { // get css value for first element
            $style = self::parseStyle($node->getAttribute('style'));
            if (isset($style[$name])) {
                return $style[$name];
            }
        }
    }
723552
public function getVal($name)
	{
		if(isset($this->data[$name]))
		{
			return $this->data[$name];
		}
		else
		{
			return null;
		}
	}
136643
public function get(string $name): Property
    {
        if (!$this->has($name)) {
            //Automatically creating constant
            $property = new Property($name);
            $this->add($property);

            return $property;
        }

        return parent::get($name);
    }