Sets or gets layout OpenGraph property.

@param string $property
@param string $value

@return string
10047
public static function og(string $property, string $value = null)
    {
        return $value !== null ? static::$openGraph[$property] = $value : (static::$openGraph[$property] ?? null);
    }
329312
public function set($property, $value = null)
    {
        if (is_array($property)) {
            foreach ($property as $k => $v) {
                $this->set($k, $v);
            }

            return $this;
        }

        if ($this->has($property)) {
            $method = 'set' . Str::studly($property);
            $value  = $this->sanitizeSetterValue($method, $value);

            $this->message->{$method}($value);
        }

        return $this;
    }
654810
public static function find_one_by($property, $value)
    {
        global $wpdb;

        // Escape the value
        $value = esc_sql($value);

        // Get the table name
        $table = static::get_table();

        // Get the item
        $obj = $wpdb->get_row("SELECT * FROM `{$table}` WHERE `{$property}` = '{$value}'", ARRAY_A);

        // Return false if no item was found, or a new model
        return ($obj ? static::create($obj) : false);
    }
111840
protected function getProperty($value) {
        $prop = $this->reflectionClass->getProperty($value);
        $prop->setAccessible(true);
        return $prop;
    }
658441
private function setPropertyIfExists($property, $value)
    {
        if (property_exists($this, $property)) {
            if ($value == null) {
                return $this;
            }

            $action = new HpsBuilderAction($property, array($this, 'setProperty'));
            $action->arguments = array($property, $value);
            $this->addAction($action);
        } else {
            throw new HpsUnknownPropertyException($this, $property);
        }
        return $this;
    }
263639
private function drawPropertyRow($name, $value)
    {
        $html = new HtmlOutputHelper(
            $this->server->getBaseUri(),
            $this->server->xml->namespaceMap
        );

        return '<tr><th>'.$html->xmlName($name).'</th><td>'.$this->drawPropertyValue($html, $value).'</td></tr>';
    }
123481
protected static function compile_layouts($value)
	{
		// If the Blade template is not using "layouts", we'll just return it
		// unchanged since there is nothing to do with layouts and we will
		// just let the other Blade compilers handle the rest.
		if ( ! starts_with($value, '@layout'))
		{
			return $value;
		}

		// First we'll split out the lines of the template so we can get the
		// layout from the top of the template. By convention it must be
		// located on the first line of the template contents.
		$lines = preg_split("/(\r?\n)/", $value);

		$pattern = static::matcher('layout');

		$lines[] = preg_replace($pattern, '$1@include$2', $lines[0]);

		// We will add a "render" statement to the end of the templates and
		// then slice off the "@layout" shortcut from the start so the
		// sections register before the parent template renders.
		return implode(CRLF, array_slice($lines, 1));
	}
232249
protected function processXmlAttribute(Parameter $property, array &$value)
    {
        $sentAs = $property->getWireName();
        if (isset($value['@attributes'][$sentAs])) {
            $value[$property->getName()] = $value['@attributes'][$sentAs];
            unset($value['@attributes'][$sentAs]);
            if (empty($value['@attributes'])) {
                unset($value['@attributes']);
            }
        }
    }
486404
protected function setProperty($key, $property, $value = null)
    {
        // Can't be changed
        if ($key[0] === '@') {
            return $this->properties[$key] = $property;
        }

        // If the attribute has a get mutator, we will call that
        // then return what it returns as the value.
        if ($this->hasGetMutator($key)) {
            return $this->properties[$key] = $this->mutateAttribute($key, $value);
        }

        // Format date and time to UTC
        if ($value instanceof DateTime) {
            return $this->properties[$key] = $value->format('Y-m-d\TH:i:s');
        }

        // Set nested context
        if ($value instanceof Context) {
            return $this->properties[$key] = $this->filterNestedContext($value->getProperties());
        }

        // Set nested context from class
        if ($property && class_exists($property)) {
            return $this->properties[$key] = $this->getNestedContext($property, $value);
        }

        // Map properties to object
        if ($property !== null && is_array($property) && is_array($value)) {
            return $this->properties[$key] = $this->mapProperty($property, $value);
        }

        // Set value
        return $this->properties[$key] = $value;
    }
586131
protected function setProperty($property, $value, Project $project, $noWait)
    {
        $type = $this->getType($property);
        if (!$type) {
            $this->stdErr->writeln("Property not writable: <error>$property</error>");
            return 1;
        }
        if ($type === 'boolean' && $value === 'false') {
            $value = false;
        }
        settype($value, $type);
        $currentValue = $project->getProperty($property);
        if ($currentValue === $value) {
            $this->stdErr->writeln(
                "Property <info>$property</info> already set as: " . $this->formatter->format($value, $property)
            );

            return 0;
        }

        $project->ensureFull();
        $result = $project->update([$property => $value]);
        $this->stdErr->writeln(sprintf(
            'Property <info>%s</info> set to: %s',
            $property,
            $this->formatter->format($value, $property)
        ));

        $this->api()->clearProjectsCache();

        $success = true;
        if (!$noWait) {
            /** @var \Platformsh\Cli\Service\ActivityMonitor $activityMonitor */
            $activityMonitor = $this->getService('activity_monitor');
            $success = $activityMonitor->waitMultiple($result->getActivities(), $this->getSelectedProject());
        }

        return $success ? 0 : 1;
    }
384447
private function mapYvalue($value)
    {

        $rangeMapper = new \sb\Math\RangeMapper(Array(30, $this->graph_height), Array($this->min, $this->max));
        return $rangeMapper->convert($value);
    }
561001
public function withProperty(string $property, $value): self
    {
        return new self(
            $this->class,
            $this->properties->put($property, $value),
            $this->injectionStrategy,
            $this->instanciator
        );
    }
871727
private function createValueExposure($property): string
    {
        if ($property->readValueFilter) {
            $exposure = \sprintf('$data[\'%s\'] = %s;', $property->exposeAs, $property->readValueFilter);
        } elseif ($property->isScalarType()) {
            $exposure = \sprintf('$data[\'%s\'] = (%s) $value;', $property->exposeAs, $property->type);
        } elseif ($property->isMixedCollectionType()) {
            $exposure = \sprintf('$data[\'%s\'] = $value;', $property->exposeAs);
        } elseif ($property->isCollection()) {
            $template = <<<STRING
\$collection = [];
    foreach (\$value as \$key => \$val) {
        \$collection[\$key] = {reader}
    }
    \$data['{exposeAs}'] = \$collection;
STRING;
            if ($property->isScalarCollectionType()) {
                $reader = \sprintf('(%s) $val;', $property->getTypeOfCollection());
            } else {
                $reader = '$this->serializer->normalize($val, $context);';
            }

            $exposure = \strtr($template, [
                '{reader}' => $reader,
                '{exposeAs}' => $property->exposeAs,
            ]);
        } else {
            $exposure = \sprintf('$data[\'%s\'] = $this->serializer->normalize($value, $context);', $property->exposeAs);
        }

        if (!$this->configuration->isMaxDepthCheckEnabled()) {
            return $exposure;
        }

        $maxDepthWrap = <<<STRING
if (!\$context->isMaxDepthAchieve(\$this->classMetadata->{locatePropertyAt}['{propertyName}'])) {
        {exposure}
    }
STRING;

        return \strtr($maxDepthWrap, [
            '{exposure}' => $exposure,
            '{propertyName}' => $property->name,
            '{locatePropertyAt}' => $property instanceof PropertyMetadata ? 'propertyMetadata' : 'methodMetadata',
        ]);
    }
353266
public function parameter($value)
	{

        // Validate whether the requested field is the
        // node id, in that case id(n) doesn't work as
        // a placeholder so we transform it to the id replacement instead.

        // When coming from a WHERE statement we'll have to pluck out the column
        // from the collected attributes.

        if (is_bool($value)) {
            // For the boolean column this need to be un-quote unless orientdb will reject
            return $value ? 'true' : 'false';
        }
        elseif(is_array($value) && isset($value['binding']))
        {
            $value = $value['binding'];
        }
        elseif (is_array($value) && isset($value['column']))
        {
            $value = $value['column'];
        }
        elseif ($this->isExpression($value))
        {
            $value = $this->getValue($value);
        }

        $property = $this->getIdReplacement($value);

        if (strpos($property, '.') !== false) $property = explode('.', $property)[1];
        
        if(is_string($property) && is_array(json_decode($property, true)) && (json_last_error() == JSON_ERROR_NONE))
        {// Don't wrap json data
            return $property;
        }
        
        $property = str_replace(array('\\', "\0", "\n", "\r", "'", '"', "\x1a"), array('\\\\', '\\0', '\\n', '\\r', "\\'", '\\"', '\\Z'), $property);

        if(preg_match('~#(-)?[0-9]+:[0-9]+~', $property)) {//is (graph) id, don't wrap it or error would be thrown
            return $property;
        }

		return "'" . $property . "'";
	}
1322273
public function set($property, $value)
    {
        $this->storage->openWriter();
        $object = $this->getObjectSafely('openWriter');
        $data = $object->getData();
        $data->{$property} = $value;
        $object->setData($data);
        $this->storage->setObject($object);
        $this->storage->close();
        return $value;
    }
817414
public function reflect($model, $value, $property = 'id')
    {
        $attribute = new \ReflectionProperty($model, $property);
        $attribute->setAccessible(true);
        $attribute->setValue($model, $value);

        return $model;
    }
151906
public function set($property, $value = null)
    {
        if (is_string($property) && $value != '') {
            $property = [$property => $value];
        }

        foreach ($property as $name => $value) {
            $this->properties[$name] = $value;
        }

        return $this;
    }