Video.

@param string $value
@param array $options
@param string $ns
@return OpenGraphHelper
161616
public function video($value, array $options = array(), $ns = 'og') {
        $this->tag($ns . ':video', $value, $options);

        return $this;
    }
633179
public function label($name, $value = null, $options = [])
    {
        return parent::label($name, $value, $this->appendErrors($name, $options));
    }
867479
public function serialize($value, array $options, $mode) {
        if ($mode === self::TO && $options['encode']) {
            return serialize($value);
        }

        if ($mode === self::FROM && $options['decode']) {
            return @unserialize($value);
        }

        return $value;
    }
1023578
private static function getChoices(Options $options, $value)
    {
        return $value instanceof ChoiceLoaderInterface && empty($options['choices'])
            ? $value->loadChoiceList()->getStructuredValues()
            : $options['choices'];
    }
10973
public function html(array $options = array(), array $ns = array()) {
        if ($ns) {
            foreach ($ns as $key => $url) {
                $this->ns($key, $url);
            }
        }

        return $this->Html->tag('html', null, $this->_namespaces + $options);
    }
302861
public function option($option, $value = null)
    {
        if (func_num_args() == 1) {
            return Arr::get($this->options, $option);
        }

        $this->options[$option] = $value;

        return $this;
    }
933923
public static function xss($value, array $options = array()) {
        $options = $options + array('strip' => true);

        $value = str_replace("\0", '', $value);

        if (!$options['strip']) {

            // Remove any attribute starting with on or xmlns
            $value = preg_replace('/\s?(?:on[a-z]+|xmlns)\s?=\s?"(?:.*?)"/isu', '', $value);

            // Remove namespaced elements
            $value = preg_replace('/<\/?\w+:\w+(?:.*?)>/isu', '', $value);

            // Remove really unwanted tags
            do {
                $old = $value;
                $value = preg_replace('/<\/?(?:applet|base|bgsound|embed|frame|frameset|iframe|layer|link|meta|object|script|style|title|xml|audio|video)(?:.*?)>/isu', '', $value);
            } while ($old !== $value);
        }

        return static::html($value, $options);
    }
1368194
public function initPasswordReset($value, $options = []) {
		$defaults = [
			'field' => [
				$this->_table->aliasField($this->_field('email')),
				$this->_table->aliasField($this->_field('username'))
			]
		];

		$options = Hash::merge($defaults, $this->_config['initPasswordReset'], $options);
		$result = $this->_getUser($value, $options);

		if (empty($result)) {
			throw new RecordNotFoundException(__d('burzum/user_tools', 'User not found.'));
		}

		$result->set([
			$this->_field('passwordToken') => $this->generateToken($options['tokenLength']),
			$this->_field('passwordTokenExpires') => $this->expirationTime($options['expires'])
		], [
			'guard' => false
		]);

		if (!$this->_table->save($result, ['checkRules' => false])) {
			new RuntimeException('Could not initialize password reset. Data could not be saved.');
		}

		$this->sendPasswordResetToken($result, [
			'to' => $result->get($this->_field('email'))
		]);
	}
584282
public function submit($value = null, $options = [])
    {
        $options['type'] = 'submit';
        $options = $this->appendClassToOptions(Config::get('form-builder.submit-class'), $options);

        return $this->button($value, $options);
    }
366343
public static function extensions($value = null) {
		$options = [
			'gif' => __('GIF (*.gif)'),
			'png' => __('PNG (*.png)'),
			'jpg' => __('JPG (*.jpg)'),
		];

		if ($value !== null) {
			if (array_key_exists($value, $options)) {
				return $options[$value];
			}
			return '';
		}
		return $options;
	}
82388
public static function encode($value, $options = null)
    {
        if ($options === null) {
            $options = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT;
        }

        $json = json_encode($value, $options);

        static::handleJsonError(json_last_error());

        return $json;
    }
390730
public function filter($value, array $options = [])
    {
        if ( ! is_string($value)) return $value;

        $value = trim($value);

        if ( ! Str::startsWith($value, ['http://', 'https://'])) {
            $value = "http://$value";
        }

        return filter_var($value, FILTER_SANITIZE_URL);
    }
1175335
public static function string(&$value, $options = ['length'=>null, 'regex'=>null, 'default'=>null])
    {
        $value = htmlspecialchars(trim($value));
        self::processString($value, $options);
        return $value;
    }
1346938
public static function encodeJson($value, int $options = JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION): string
    {
        return \json_encode($value, $options);
    }
1194981
public function addTag($tag, $value, array $options = [])
    {
        $this->config("tags.twitter.$tag", $options ? [$value, $options] : $value);
        return $this;
    }
376219
public function validate($value, $options)
	{
		$this->value = $value;
		$this->options = $options;
		$this->errors = [];

		return $this->checkIt();
	}
848495
public function serialize($value, array $options=[])
    {

        if (!is_string($value)) {
            throw new UnexpectedValueException('I can only work with strings, not ' . Type::of($value));
        }

        return $value;

    }