Returns a single consent code object.

@param string $description
@return \Gems\Util\ConsentCode
178935
public function getConsent($description)
    {
        static $codes = array();

        if (! isset($codes[$description])) {
            $codes[$description] = $this->_loadClass('consentCode', true, array($description));
        }

        return $codes[$description];
    }
15500
public static function defaultCommandFactory(Description $description)
    {
        return function (
            $name,
            array $args = [],
            GuzzleClientInterface $client
        ) use ($description) {

            $operation = null;

            if ($description->hasOperation($name)) {
                $operation = $description->getOperation($name);
            } else {
                $name = ucfirst($name);
                if ($description->hasOperation($name)) {
                    $operation = $description->getOperation($name);
                }
            }

            if (!$operation) {
                return null;
            }

            // this is the only line which is patched
            $args += ($operation->getData('defaults') ?: []);

            return new Command($operation, $args, clone $client->getEmitter());
        };
    }
966640
public function setDescription($id, $description)
    {
        return $this->put($this->getPath().'/'.rawurlencode($id).'/desc', array('value' => $description));
    }
1363414
public function getConsentTextForWebsite($consentUrl, $websiteId)
    {
        if (! isset($this->consentText[$websiteId])) {
            $this->consentText[$websiteId] = $this->configHelper->getConsentSubscriberText($websiteId);
        }
        $consentText = $this->consentText[$websiteId];

        if (! isset($this->customerConsentText[$websiteId])) {
            $this->customerConsentText[$websiteId] = $this->configHelper->getConsentCustomerText($websiteId);
        }
        $customerConsentText = $this->customerConsentText[$websiteId];

        //customer checkout and registration if consent text not empty
        if ($this->isLinkMatchCustomerRegistrationOrCheckout($consentUrl) && strlen($customerConsentText)) {
            $consentText = $customerConsentText;
        }

        return $consentText;
    }
855121
public function setDescription($description)
	{
		$description = strip_tags($description);

		if (strlen($description) > $this->maxDescriptionLength) {
			$description = substr($description, 0, $this->maxDescriptionLength);
		}

		$this->description = $description;
	}
494042
public function log($description = '')
    {
        $payload = [
            'user_id' => auth()->id(),
            'description' => $description,
            'request' => json_encode([
                'url' => request()->url(),
                'method' => request()->method(),
                'query' => request()->fullUrl(),
                'secure' => request()->secure(),
                'client_ip' => request()->ip(),
                'payload' => request()->all(),
            ]),
        ];

        return $this->model->create($payload);
    }
44184
public function setDescription($description)
	{
		$description = strip_tags($description);

		if (mb_strlen($description) > 160) {
			$description = mb_substr($description, 0, 160);
		}

		$this->description = $description;
	}
82721
public function setDescription($description)
    {
        $stripURLRegex = "/((?<!=\")(http|ftp)+(s)?:\/\/[^<>()\s]+)/i";
        $description = preg_replace($stripURLRegex, '', $description);
        $description = strip_tags($description);
        $description = htmlentities($description);
        $description = str_replace(array('#', '@'), '', $description);
        $description = AnService::get('com:base.template.helper.text')->truncate($description, array('length' => 160));
        $description = trim($description);

        $this->_description = $description;
	}
287466
public static function getDescription($code)
    {
        if (array_key_exists($code, self::$codes_to_string_map)) {
            return self::$codes_to_string_map[$code];
        } else {
            return false;
        }
    }
889325
public function createScope($scope, $description = null)
    {
        if ($scopeObject = $this->findScopeByScope($scope)) {
          return $scopeObject;
        }

        $scopeObject = new \OAuth2\ServerBundle\Entity\Scope();
        $scopeObject->setScope($scope);
        $scopeObject->setDescription($description);

        // Store Scope
        $this->em->persist($scopeObject);
        $this->em->flush();

        return $scopeObject;
    }
185397
public static function keepSnapshot($description) {
		
		$app = Application::getInstance();
		$router = Router::getInstance();
		
		$snap = new self();
		
		$snap->createdTime	= new \DateTime();
		$snap->userId		= $app->currentUser->id;
		$snap->module		= $router->module;
		$snap->action		= $router->action;
		$snap->getData		= serialize($_GET);
		$snap->postData		= serialize($_POST);
		$snap->cookieData	= serialize($_COOKIE);
		$snap->description	= $description;
		$snap->userMessages	= serialize($app->messages);
		
		if (isset($_SERVER['HTTP_REFERER'])) {

			// removes application base url from referer
			if (0 === strpos($_SERVER['HTTP_REFERER'], BASE_HREF)) {
				$snap->referer = substr($_SERVER['HTTP_REFERER'], strlen(BASE_HREF));
			} else {
				$snap->referer = $_SERVER['HTTP_REFERER'];
			}
			
		}

		return $snap->create();
		
	}
604651
public function create(Description $description)
    {
        return new TipGroup(
            $description->getMandatoryProperty('name'),
            $description->getMandatoryProperty('type'),
            $this->getTips($description)
        );
    }
960481
public function description(string $value = null)
    {
        if (null === $value) {
            return $this->description;
        }
        $this->description = $value;
        return $this;
    }
536168
public function setDescription($description)
    {
        if (!$this->setHeaderFieldModel('Content-Description', $description)) {
            $this->headers->addTextHeader('Content-Description', $description);
        }

        return $this;
    }
940848
public function createFailure(string $description)
    {
        $exception = new AssertionException($description);

        $suiteClass = $this->suiteClass;
        $suiteClass::current()->assert([
            'handler' => function () use ($exception) {
                throw $exception;
            },
            'type' => AssertionException::class,
        ]);
    }
1013724
public function create(Description $description)
    {
        return new Photo(
            new Identifier($description->getMandatoryProperty('id')),
            (new \DateTimeImmutable())->setTimestamp($description->getMandatoryProperty('createdAt')),
            sprintf(
                '%s%sx%s%s',
                $description->getMandatoryProperty('prefix'),
                $description->getMandatoryProperty('width'),
                $description->getMandatoryProperty('height'),
                $description->getMandatoryProperty('suffix')
            ),
            $description->getMandatoryProperty('visibility')
        );
    }
697451
function setDescription($description) {
        $description = (string) $description;
        
        if(\mb_strlen($description) > 2048) {
            throw new \InvalidArgumentException('Embed description can not be longer than 2048 characters');
        }
        
        $this->description = $description;
        return $this;
    }