Get token attribute using accessor.

@param  mixed  $value

@return \Orchestra\OneAuth\Token
436489
public function getTokenAttribute($value)
    {
        if (! is_null($value)) {
            $value = json_decode($value, true);
        }

        return new Token($value);
    }
593680
public function setFilterAttribute($value)
    {
        return ($value) ? $this->attributes['filter'] = json_encode($value) : $this->attributes['filter'] = null;
    }
450166
public function getValue028Attribute($value)
    {
        if($this->data_type_type_028 == 'array')
            $value = explode(',', $value);
        else
            settype($value, $this->data_type_type_028);

        return $value;
    }
1163461
public function attr($attribute, $value = null)
    {
        if (is_array($attribute)) return $this->attributes($attribute);
        if ($value) return $this->attributes(array($attribute => $value));
    }
153910
protected function parseIsRefreshGrantEnabled(string $value): Client
    {
        $value === '1' ? $this->enableRefreshGrant() : $this->disableRefreshGrant();

        return $this;
    }
999000
public function attribute($attribute, $value = null)
    {
        $element = clone $this;

        $element->attributes->setAttribute($attribute, (string) $value);

        return $element;
    }
502223
public static function make($value)
    {
        if (is_resource($value)) {
            $value = null;
        } elseif (Arr::accessible($value)) {
            $value = new ArraySerialization($value);
        } elseif ($value instanceof stdClass) {
            $value = new ObjectSerialization($value);
        } elseif ($value instanceof Container) {
            $value = new ContainerSerialization($value);
        } elseif ($value instanceof DateTime) {
            $value = new DateTimeSerialization($value);
        } elseif ($value instanceof Validator) {
            $value = new ValidatorSerialization($value);
        } elseif ($value instanceof Throwable) {
            $value = new ThrowableSerialization($value);
        } elseif ($value instanceof Closure) {
            $value = null;
        }

        return $value;
    }
170418
public function getValueAttribute($name, $value = null)
    {
        if (is_null($name)) return $value;

        if ( ! is_null($this->old($name)))
        {
            return $this->old($name);
        }

        if ( ! is_null($value)) return $value;

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

        if ($this->canUpdateValueWithSessionLang())
        {
            $language_input = $this->getOldLanguageInput();
            if($this->isAValidFormAttribute($name, $language_input)) return $language_input[$name];
        }
    }
339213
public function passes($attribute, $value)
    {
        $passwordStatus = $this->passwordExposedChecker->passwordExposed($value);

        return $passwordStatus !== PasswordStatus::EXPOSED;
    }
1092078
public static function create($attribute, $value)
    {
        $attributesType = self::getAllAttributeType();
        foreach ($attributesType as $attributeType) {
            if ($attributeType->isMember($attribute)) {
                return $attributeType->create($value);
            }
        }

        return $value;
    }
306430
public function get($value)
    {

        if (!empty($this->_array[$value])) {
            return $this->_array[$value];
        } else {
            return $value;
        }

    }
592332
public function getCreatedByAttribute($value)
    {
        if ($value > 0)
            if ($user = Sentinel::findUserById($value))
                if ($user != null)
                    return $user->first_name . ' ' . $user->last_name . ' (ID: ' . $user->id . ')';

        return $value;
    }
758937
public function setValue($value)
    {
        // Set name in payload
        $payload = $this->getPayload();
        $payload['value'] = $value;

        return $this->setPayload($payload);
    }
1247433
public function attribute(string $name, string $value = null) : object
    {
        $this->attributes[$name] = $value;
        return $this;
    }
1041953
public static function rawValue($value)
    {
        if ($tokenType = Tokens::test($value)) {
            if ($tokenType == 'u') {
                $value = Crush::$process->tokens->get($value)->value;
            }
            elseif ($tokenType == 's') {
                $value = Crush::$process->tokens->get($value);
            }
        }

        return $value;
    }
524159
function sign($openid,$attribute,$value)
   {
      $samlObj = new SAML();
      $responseXmlString = $samlObj->createSamlAssertion($openid, 
                                                         $this->notBefore, 
                                                         $this->notOnOrAfter, 
                                                         $this->rsadsa,
                                                         $this->acsURI,
                                                         $attribute,
                                                         sha1($value),
                                                      $this->assertionTemplate);
      $signedAssertion=$samlObj->signAssertion($responseXmlString,
                                               $this->private_key,
                                               $this->public_key_certificate);
      return $signedAssertion;
   }
573205
public static function fromValue( $value )
	{
		$result = new ContextProvider();
		$result->m_iter = XPath2NodeIterator::Create( $value );
		return $result;
	}