Fetch a property comment.

@throws UnexpectedValueException
@param string $name
@return Comment
359297
public function property($name)
    {
        if ( ! $this->object->hasProperty($name))
        {
            throw new UnexpectedValueException(
                "Property {$name} does not exist"
            );
        }

        return $this->extractComment($this->object->getProperty($name));
    }
148917
public function get($name)
    {
        if (!$this->exists($name)) {
            throw new PropertyNotExistsException($name);
        }

        return $this->data[$name];
    }
732288
public function get($key)
    {
        if (!$this->offsetExists($key)) {
            throw new UnexpectedValueException(sprintf('Unknown key %s.', $key));
        }

        return $this->offsetGet($key);
    }
1044301
public function create($args)
    {
        $comment_id = wp_new_comment($args);

        if (! $comment_id) {
            throw new UnexpectedValueException('[W600] Failed creating a new comment');
        } elseif (is_wp_error($comment_id)) {
            throw new UnexpectedValueException(
                sprintf('[W600] Failed creating a new comment: %s', $comment_id->get_error_message())
            );
        }

        return $this->get($comment_id);
    }
1367411
public function _get($name)
    {
        $object = $this->getObject();
		$callable = function() use ($name, $object) {
			if (!property_exists($object, $name) && !method_exists($object, '__get'))
			{
				throw new \Exception('Property ' . $name . ' doesn\'t exist on object of class ' . get_class($object));
			}
			if (is_array($object->$name))
			{
				$object->$name = new \ArrayObject($object->$name);
			}
			return $object->$name;
		};
		return $this->breakScopeAndExecute($callable);
    }
1252110
public function get($name)
    {
        $lowerName = strtolower($name);
        if (isset($this->properties[$lowerName])) {
            return $this->properties[$lowerName];
        }
        throw new \InvalidArgumentException(
            "Undefined property: $name (Node ID: ".$this->properties['id'].')'
        );
    }
190659
public function get($id, $args = [])
    {
        $comment = get_comment($id);

        if (! $comment) {
            throw new UnexpectedValueException(sprintf('[W601] Could not find comment with ID %d', $id));
        }

        return $comment;
    }
399092
public function call($name, $input)
	{
		$normalized_name = strtolower($name);

		if ( ! isset($this->handlers[$normalized_name]))
		{
			throw new UnexpectedValueException('No required handler: ' . $name, 1);
		}

		return $this->handlers[$normalized_name]($input);
	}
1159434
public function get($name)
    {
        $name = $this->cleanAttributeName($name);

        return isset($this->props[$name]) ? $this->props[$name] : null;
    }
1303233
public function get(Name $name)
    {
        if (!$this->arguments->contains((string) $name)) {
            throw new ArgumentNotDefined((string) $name);
        }

        if (!$this->values->contains((string) $name)) {
            throw new ArgumentNotProvided($this->arguments->get((string) $name));
        }

        return $this->values->get((string) $name);
    }
770830
private function getValue(array $properties, $name, $defaultValue)
    {
        $propertyName = 'phing.log.mail.' . $name;
        $value = $properties[$propertyName];
        if ($value === null) {
            $value = $defaultValue;
        }
        if ($value === null) {
            throw new BadMethodCallException('Missing required parameter: ' . $propertyName);
        }
        return $value;
    }
1127857
public function update( string $name, $value ) {
        if ( $this->comment->$name ) {
            return wp_update_comment([
                'comment_ID' => $this->ID,
                $name        => $value
            ]);
        } elseif ( $this->$name ) {
            return update_field( $name, $value, $this->comment );
        }

        return FALSE;
    }
1018046
protected function getPropertyCursor($name)
    {
        // Run through all property names
        foreach ($this->names as $cursor => $iri) {
            foreach ($this->aliases[strval($iri)] as $alias) {
                if ($name === $alias) {
                    return $cursor;
                }
            }
        }

        return $this->handleUnknownName($name);
    }
670397
public function getArgs($name)
    {
        $name = (string)$name;
        if (array_key_exists($name, $this->propertySetArgs)) {
            return $this->propertySetArgs[$name];
        }
        return null;
    }
1213031
public function createJobByName(string $name): TranslationJobInterface
    {
        if (!$this->configuration->hasJob($name)) {
            throw new \UnexpectedValueException('Job "' . $name . '" not found in configuration');
        }

        return $this->createJob($this->configuration->getJob($name));
    }
1102592
public function getPropertyByName($name)
    {
        foreach ($this->properties as $property) {
            if ($property->getName() === $name) {
                return $property;
            }
        }
    }
284164
protected function getPropertyCursor($name)
    {
        // Run through all property names
        foreach ($this->names as $cursor => $iri) {
            if (in_array($name, [$iri->name, strval($iri)])) {
                return $cursor;
            }
        }

        return $this->handleUnknownName($name);
    }