@param string $property
@param string $keyword
@param string $pointer

@return \League\JsonGuard\Exception\InvalidSchemaException
161452
public static function missingProperty($property, $keyword, $pointer)
    {
        $message = sprintf(
            'The schema must contain the property %s',
            $property
        );

        return new self($message, $keyword, $pointer);
    }
671097
public static function invalidParameterType($actualType, array $allowedTypes, $keyword, $pointer)
    {
        $message = sprintf(
            'Value has type "%s" but must be one of: "%s"',
            $actualType,
            implode(', ', $allowedTypes)
        );

        return new self($message, $keyword, $pointer);
    }
436731
public static function normalize($pointer, array $context = null)
    {
        if (is_object($pointer)) {
            return ['value' => $pointer];
        }
        if (is_string($pointer)) {
            return ['classname' => $pointer];
        }
        if ($pointer === null) {
            return [];
        }
        if ($pointer === false) {
            throw new Disabled('');
        }
        if (!is_array($pointer)) {
            throw new InvalidPointer('invalid pointer type');
        }
        if (!isset($pointer[0])) {
            return $pointer;
        }
        return self::normalizeNumeric($pointer, $context);
    }
508568
protected function validateRef(&$document_data, &$data, array $data_pointer, array $parent_data_pointer, ISchema $document, stdClass $schema, ValidationResult $bag): bool
    {
        $ref = $schema->{'$ref'};

        // $vars
        if ($this->varsSupport) {
            $ref = URI::parseTemplate($ref, $this->getVars($document_data, $data_pointer, $schema));
        }

        $map_used = $this->mapSupport && property_exists($schema, Schema::MAP_PROP);

        // $map
        if ($map_used) {
            unset($data);
            $data = $this->deepClone($schema->{Schema::MAP_PROP});
            $this->resolveVars($data,$document_data, $data_pointer);

            unset($document_data);
            $document_data = &$data;

            if ($data_pointer) {
                $parent_data_pointer = array_merge($parent_data_pointer, $data_pointer);
                $data_pointer = [];
            }
        }

        // Check if is relative json pointer
        if ($relative = JsonPointer::parseRelativePointer($ref, true)) {
            if (!JsonPointer::isEscapedPointer($ref)) {
                throw new InvalidJsonPointerException($ref);
            }

            $schema = JsonPointer::getDataByRelativePointer(
                $document->resolve(),
                $relative,
                $schema->{Schema::PATH_PROP} ?? [],
                $this
            );
            if ($schema === $this) {
                throw new InvalidJsonPointerException($ref);
            }

            return $this->validateSchema($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag);
        }

        // Check if is a json pointer relative to this document
        if (isset($ref[0]) && $ref[0] === '#') {
            $pointer = substr($ref, 1);
            if (JsonPointer::isPointer($pointer)) {
                if (!JsonPointer::isEscapedPointer($pointer)) {
                    throw new InvalidJsonPointerException($pointer);
                }
                $schema = JsonPointer::getDataByPointer($document->resolve(), $pointer, $this);
                if ($schema === $this) {
                    throw new InvalidJsonPointerException($pointer);
                }

                return $this->validateSchema($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag);
            }
            unset($pointer);
        }

        // Merge uris
        $ref = URI::merge($ref, $schema->{Schema::BASE_ID_PROP} ?? '', true);

        list($base_ref, $fragment) = explode('#', $ref, 2);

        if (JsonPointer::isPointer($fragment)) {
            if (!JsonPointer::isEscapedPointer($fragment)) {
                throw new InvalidJsonPointerException($fragment);
            }

            // try to resolve locally
            $schema = $document->resolve($base_ref . '#');

            if ($schema === null) {
                if (!$this->loader) {
                    throw new SchemaNotFoundException($base_ref);
                }
                // use loader
                $document = $this->loader->loadSchema($base_ref);
                if (!($document instanceof ISchema)) {
                    throw new SchemaNotFoundException($base_ref);
                }

                if ($fragment === '' || $fragment === '/') {
                    $schema = $document->resolve();
                } else {
                    $schema = JsonPointer::getDataByPointer($document->resolve(), $fragment, $this);
                    if ($schema === $this) {
                        throw new InvalidJsonPointerException($fragment);
                    }
                }

                if (!$map_used) {
                    unset($document_data);
                    $document_data = &$data;
                    if ($data_pointer) {
                        $parent_data_pointer = array_merge($parent_data_pointer, $data_pointer);
                        $data_pointer = [];
                    }
                }
            } else {
                if ($fragment !== '' && $fragment !== '/') {
                    $schema = JsonPointer::getDataByPointer($schema, $fragment, $this);
                    if ($schema === $this) {
                        throw new InvalidJsonPointerException($fragment);
                    }
                }
            }

            return $this->validateSchema($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag);
        }

        // Not a json pointer
        $schema = $document->resolve($ref);
        if ($schema !== null) {
            return $this->validateSchema($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag);
        }

        if (!$this->loader) {
            throw new SchemaNotFoundException($base_ref);
        }
        // use loader
        $document = $this->loader->loadSchema($base_ref);
        if (!($document instanceof ISchema)) {
            throw new SchemaNotFoundException($base_ref);
        }

        $schema = $document->resolve($ref);

        if (!$map_used) {
            unset($document_data);
            $document_data = &$data;
            if ($data_pointer) {
                $parent_data_pointer = array_merge($parent_data_pointer, $data_pointer);
                $data_pointer = [];
            }
        }

        return $this->validateSchema($document_data, $data, $data_pointer, $parent_data_pointer, $document, $schema, $bag);
    }
1331440
protected function DoGetSet(string $property, bool $setter, $v = null)
    {
        $props = $setter ? static::DaftObjectPublicSetters() : static::DaftObjectPublicGetters();

        $this->MaybeThrowOnDoGetSet($property, $setter, $props);

        /**
        * @var callable
        */
        $callable = [$this, TypeUtilities::MethodNameFromProperty($property, $setter)];
        $closure = Closure::fromCallable($callable);

        /**
        * @var scalar|array|object|null
        */
        $out = $closure->__invoke($v);

        return $out;
    }
166487
public function getDocument($keyword)
    {
        $keyword = $this->suppressSpecialCharacterHelper->transform($keyword);
        $keywordClass = $this->keywordClass;
        $keywordEntity = $this->keywordRepository->findOneByLabel($keyword);

        if (is_null($keywordEntity)
            && !$this->authorizationChecker->isGranted(ContributionActionInterface::CREATE, KeywordInterface::ENTITY_TYPE)
        ) {
            throw new AccessDeniedHttpException();
        }
        if (is_null($keywordEntity)) {
            $keywordEntity = new $keywordClass();
            $keywordEntity->setLabel($keyword);
            $this->keywordRepository->getManager()->persist($keywordEntity);
            $this->keywordRepository->getManager()->flush($keywordEntity);
        }

        return $keywordEntity;
    }
92880
public function getMandatoryProperty($property)
    {
        \Assert\that($property)->string()->notEmpty();

        if (isset($this->description->{$property}) === false) {
            throw InvalidDescriptionException::missingMandatoryProperty($property);
        }

        if ($this->description->{$property} instanceof \stdClass) {
            return new static($this->description->{$property});
        }

        return $this->description->{$property};
    }
1328614
public static function createArgs(array $pointer, array $context)
    {
        if (array_key_exists('args', $pointer)) {
            $args = $pointer['args'];
            if (!is_array($args)) {
                throw new InvalidPointer('args must be an array');
            }
        } elseif (array_key_exists('options', $pointer)) {
            $args = [$pointer['options']];
        } else {
            $args = [];
        }
        if (!empty($pointer['reset_args'])) {
            return $args;
        }
        if (!empty($context['args'])) {
            $args = array_merge($context['args'], $args);
        }
        if (!empty($context['append_args'])) {
            $args = array_merge($args, $context['append_args']);
        }
        return $args;
    }
1254383
function Get($key, $property) {
		$key = strtolower($key);
		$property = strtolower($property);

		list($tag, $subtag) = explode(':', $key);
		list($tag, $class) = explode('.', $tag);
		list($tag, $id) = explode('#', $tag);
		$result = '';
		foreach($this->css as $_tag => $value) {
			list($_tag, $_subtag) = explode(':', $_tag);
			list($_tag, $_class) = explode('.', $_tag);
			list($_tag, $_id) = explode('#', $_tag);

			$tagmatch = (strcmp($tag, $_tag) == 0) | (strlen($_tag) == 0);
			$subtagmatch = (strcmp($subtag, $_subtag) == 0) | (strlen($_subtag) == 0);
			$classmatch = (strcmp($class, $_class) == 0) | (strlen($_class) == 0);
			$idmatch = (strcmp($id, $_id) == 0);

			if($tagmatch & $subtagmatch & $classmatch & $idmatch) {
		    	$temp = $_tag;
				if((strlen($temp) > 0) & (strlen($_class) > 0)) {
					$temp .= '.' . $_class;
				} elseif(strlen($temp) == 0) {
					$temp = '.' . $_class;
				}
				if((strlen($temp) > 0) & (strlen($_subtag) > 0)) {
					$temp .= ':' . $_subtag;
				} elseif(strlen($temp) == 0) {
					$temp = ':' . $_subtag;
				}
				if(isset($this->css[$temp][$property])) {
					$result = $this->css[$temp][$property];
				}
			}
		}
		return $result;
	}
655694
public function get($pointer)
    {
        $pointer = new Pointer($pointer);
        $data    = $pointer->evaluate($this->_properties);

        return $data;
    }
1067036
public static function invalidParameter($actualParameter, array $allowedParameter, $keyword, $pointer)
    {
        $message = sprintf(
            'Value is "%s" but must be one of: "%s"',
            $actualParameter,
            implode(', ', $allowedParameter)
        );

        return new self($message, $keyword, $pointer);
    }
296041
public static function nonNegative($value, $keyword, $pointer)
    {
        if ($value >= 0) {
            return;
        }

        throw InvalidSchemaException::negativeValue(
            $value,
            $keyword,
            $pointer
        );
    }
649274
private function getJsonInstance($property)
    {
        if(!$this->isJsonProperty($property))
            throw new JsonPropertyException("Requested property '{$property}' is not a valid for '".get_class($this->model)."'.");

        if(!array_key_exists($property, $this->jsonInstances))
            $this->jsonInstances[$property] = new JsonProperty( $this->model, $property );

        return $this->jsonInstances[$property];
    }
1055039
private function handleNotFound(?PropertyMetadata $parentPropertyMetadata, string $resourceClass, string $property): PropertyMetadata
    {
        if ($parentPropertyMetadata) {
            return $parentPropertyMetadata;
        }

        throw new PropertyNotFoundException(sprintf('Property "%s" of the resource class "%s" not found.', $property, $resourceClass));
    }
470026
public static function build(array $pointer, array $context)
    {
        if (array_key_exists('value', $pointer)) {
            return $pointer['value'];
        }
        if (!empty($pointer['classname'])) {
            $classname = NameResolver::resolve($pointer['classname'], $context);
            return self::buildByClassname($classname, $pointer, $context);
        }
        if (!empty($pointer['creator'])) {
            return Callback::call($pointer['creator'], [$pointer, $context]);
        }
        if (!empty($context['classname'])) {
            return self::buildByClassname($context['classname'], $pointer, $context);
        }
        if (!empty($context['creator'])) {
            return Callback::call($context['creator'], [$pointer, $context]);
        }
        throw new InvalidPointer('');
    }
1271236
public function setData($property, $value = null)
    {
        if (is_array($property)) {
            $description = $this->getEntityDescription();
            $properties = $property;
            $access = pick($value, AnDomain::ACCESS_PUBLIC);

            foreach ($properties as $key => $value) {
                $property = $description->getProperty($key);
                if ($property && $property->getWriteAccess() >= $access) {
                    //ignore any type related exceptions
                      try {
                          $this->setData($property->getName(), $value);
                      } catch (AnDomainExceptionType $e) {
                          print $e->getMessage();
                          die;
                      }
                } elseif (!$property) {
                    $this->$key = $value;
                }
            }

            return $this;
        } else {
            $name = $property;
            $description = $this->getEntityDescription();
            $property = $description->getProperty($property);

            if (!$property instanceof AnDomainPropertyAbstract) {
                $this->set($name, $value);

                return $this;
            }

            $name = $property->getName();
            $method = 'set'.ucfirst($name);

            if ($this->methodExists($method)) {
                $this->$method($value);
            } else {
                //only set the property if it's not write proteced (write != private )
                if ($property->getWriteAccess() < AnDomain::ACCESS_PROTECTED) {
                    throw new AnException(get_class($this).'::$'.$name.' is write protected');
                }

                $this->set($name, $value);
            }

            return $this;
        }
    }
237898
public function addKeyword($keyword, array $properties = null)
    {
        if ($properties === null) {
            $properties = [];
        }

        foreach ($properties as $propertyIdent) {
            $val = ('%'.$keyword.'%');
            $this->addFilter([
                'property' => $propertyIdent,
                'operator' => 'LIKE',
                'value'    => $val,
                'operand'  => 'OR'
            ]);
        }

        return $this;
    }