Check GENERAL access to the property

@param    string   Type of access to check for
@param    string   Property name to check access for
@return   bool
186868
protected function ___getterSetterCheckAccess ($type, $name)
    {
        // Check for explicit definition
        if (isset($this->_getterSetterAccessMap)) {
            if (array_key_exists($name, $this->_getterSetterAccessMap)) {
                if (array_key_exists($type, $this->_getterSetterAccessMap[$name])) {
                    return $this->_getterSetterAccessMap[$name][$type];
                }
            }
        }

        // Check for default privilege setting
        $typeUcf = ucfirst($type);
        $defaultAccessPropertyName = "_getterSetterDefault{$typeUcf}Allow";
        if (isset($this->{$defaultAccessPropertyName})) {
            return $this->{$defaultAccessPropertyName};
        }

        // Otherwise return default sensible answer (write no, read yes)
        if ('read' == $type) {
            return true;
        } else {
            return false;
        }
    }
472527
public function canGetProperty($name, $checkVars = true)
    {
        if (!in_array($name, $this->attrs)) {
            return parent::canGetProperty($name, $checkVars);
        }

        return true;
    }
722006
public function canGetProperty($name, $checkVars = true)
    {
        if (property_exists($this, $name)) {
            return true;
        }
        if ($this->hasPropertyKey($name)) {
            return true;
        }

        return parent::canGetProperty($name, $checkVars);
    }
852484
public function isAccessible($property)
    {
        $value = isset($this->_accessible[$property]) ?
            $this->_accessible[$property] :
            null;

        return ($value === null && !empty($this->_accessible['*'])) || $value;
    }
797277
private function is_readonly_property( $name ) {
		return is_string( $name ) && property_exists( $this, 'readonly_properties' ) && in_array( $name, $this->readonly_properties );
	}
162117
public static function property(
    $name,
    $visibility = 'public',
    $default = null,
    $type = 'mixed'
  )
  {
    $property = (new PropertyGenerator($name, $default))
    ->setVisibility($visibility);

    $property->setIndentation(Generator::$indentation);

    $docBlock = new DocBlockGenerator();
    $docBlock->setIndentation(Generator::$indentation);

    $tag = new Tag();
    $tag->setName('var');
    $tag->setContent($type);
    $tag->setIndentation(Generator::$indentation);

    $docBlock->setTag($tag);

    $property->setDocBlock($docBlock);

    return $property;
  }
700865
private function checkType($type)
    {
        if (!empty($this->allowTypes)) {
            return in_array(strtolower($type), $this->allowTypes);
        }
        return true;
    }
689584
function(type){
    return function(prop){
        var accessor = this.getAccessor(prop, type),
            accessorName = this._accessorName;

        /**
         * Prevent recursive get calls by checking if it's currently accessing
         * and if the accessor name is the same as the property arg. If all positive,
         * then return the value from _data/_previousData, otherwise return from 
         * the accessor function. Fallback to returning from the _data/_previousData
         * if an accessor function does not exist.
         */
        if (accessor && accessorName != prop) {
            return accessor();
        }

        return this.parent(prop);
    }.overloadGetter();
}
282466
private function isExistingPropertyGetterAvailable(string $propertyName): bool
    {
        assert($this->propertyExists($propertyName));
        if ($this->isExistingPropertyVirtual($propertyName)) {
            return !is_null($this->virtualGetters[$propertyName]);
        } else {
            return $this->realGetAvailable[$propertyName];
        }
    }
171768
public function __isset($name)
    {
        if (isset($this->deprecatedProperties[$name])) {
            $method = $this->deprecatedProperties[$name]['get'];
            deprecationWarning(
                "Accessing {$name} as a property will be removed in 4.0.0. " .
                "Use {$method} instead."
            );

            return isset($this->{$name});
        }

        deprecationWarning(
            'Accessing routing parameters through __isset will removed in 4.0.0. ' .
            'Use getParam() instead.'
        );

        return isset($this->params[$name]);
    }
677660
private function checkProperty($property = self::LOGIN_PROPERTY, $strict = false)
    {
        if (!isset($this->properties[$property])) {
            if ($strict) {
                throw new \LogicException(sprintf(
                    'Cannot get property "%s"!',
                    $property
                ));
            }

            return false;
        }

        return true;
    }
1144614
public function __isset($name) {

        if (isset($this->_writeProperties[$name])) {
            
            return true;
        }

        return isset($this->_readProperties[$name]);
    }
458879
public function getAccessListItems($accessType = PermissionKey::ACCESS_TYPE_INCLUDE, $filterEntities = [], $checkCache = true)
    {
        $app = Application::getFacadeApplication();
        if ($checkCache) {
            $cache = $app->make('cache/request');
            $item = $cache->getItem($this->getCacheIdentifier($accessType, $filterEntities));
            if (!$item->isMiss()) {
                return $item->get();
            }
            $item->lock();
        }
        $db = $app->make(Connection::class);
        $list = parent::getAccessListItems($accessType, $filterEntities, false);
        $pobj = $this->getPermissionObjectToCheck();
        foreach ($list as $l) {
            $pe = $l->getAccessEntityObject();
            if ($pobj instanceof Page) {
                $permission = $db->fetchColumn('select permission from BlockTypePermissionBlockTypeAccessList where paID = ?', [$l->getPermissionAccessID()]);
            } else {
                $permission = $db->fetchColumn('select permission from AreaPermissionBlockTypeAccessList where peID = ? and paID = ?', [$pe->getAccessEntityID(), $l->getPermissionAccessID()]);
            }
            if ($permission != 'N' && $permission != 'C') {
                $permission = 'A';
            }
            $l->setBlockTypesAllowedPermission($permission);
            if ($permission == 'C') {
                if ($pobj instanceof Area) {
                    $rs = $db->executeQuery('select btID from AreaPermissionBlockTypeAccessListCustom where peID = ? and paID = ?', [$pe->getAccessEntityID(), $l->getPermissionAccessID()]);
                } else {
                    $rs = $db->executeQuery('select btID from BlockTypePermissionBlockTypeAccessListCustom where paID = ?', [$l->getPermissionAccessID()]);
                }
                $btIDs = [];
                while (($btID = $rs->fetchColumn()) !== false) {
                    $btIDs[] = (int) $btID;
                }
                $l->setBlockTypesAllowedArray($btIDs);
            }
        }

        if ($checkCache) {
            $cache->save($item->set($list));
        }

        return $list;
    }
597887
protected function checkAccessPolicy($access_policy_name, Reference $ref)
	{
		// Allow by default
		if (empty($access_policy_name)) {
			return true;
		}

		if (!isset($this->access_policies[$access_policy_name])) {
			throw new \InvalidArgumentException('Unknown policy: '.$access_policy_name);
		}
		$access_policy = $this->access_policies[$access_policy_name];

		//debug_dump($access_policy, 'POLICY: '.$access_policy_name.' @ '.get_class($this));

		if ($this->auth->isAllMighty()) {
			return true;
		}

		switch ($access_policy['type']) {

			// anyone: Completely open for anyone
			case 'anyone':
				return true;

			// nobody: Nobody is allowed, except all mighty users.
			case 'nobody':
				return false;

			// anonymous: Only anonymous users allowed (not logged in)
			case 'anonymous':
				$user_id = $this->auth->getUserId();
				return $user_id === null;

			// user: All logged-in users allowed
			case 'user':
				$user_id = $this->auth->getUserId();
				return $user_id !== null;

			// owner: Owner must match current user
			case 'owner':
				if ($ref->isNullRef()) {
					// Everyone owns nothing :)
					return true;
				}
				$properties = $ref->properties;
				$user_id = $this->auth->getUserId();
				$owner_property = $access_policy['owner_property'];
				if (isset($access_policy['session_state'])) {
					$session_machine = $this->auth->getSessionMachine();
					if (!$session_machine || $session_machine->state != $access_policy['session_state']) {
						return false;
					}
				}
				return $user_id !== null ? $user_id == $properties[$owner_property] : $properties[$owner_property] === null;

			// role: Current user must have specified role ($ref is ignored)
			case 'role':
				return $this->auth->hasUserRoles($access_policy['required_role']);

			// These are done by SQL select.
			case 'condition':
				if ($ref->isNullRef()) {
					// Nonexistent entity has nulls everywhere
					// FIXME: Are we sure?
					return false;
				}
				$properties = $ref->properties;
				return !empty($properties['_access_policy_'.$access_policy_name]);

			// These are done by SQL select.
			case 'user_relation':
				if ($ref->isNullRef()) {
					// No relation to nonexistent entity.
					return false;
				}
				$properties = $ref->properties;
				return !empty($properties['_access_policy_'.$access_policy_name]);

			// unknown policies are considered unsafe
			default:
				return false;
		}

		// This should not happen.
		throw new \RuntimeException('Policy '.$policy.' did not decide.');
	}
988416
private function propertyIsIgnored(string $type, string $propertyName): bool
    {
        return isset($this->ignoredEncodedPropertyNamesByType[$type][$this->normalizePropertyName($propertyName)]);
    }
352488
static Accessor accessorFor(Class<?> type, String accessorName, InheritingConfiguration configuration) {
    PropertyInfoKey key = new PropertyInfoKey(type, accessorName, configuration);
    if (!ACCESSOR_CACHE.containsKey(key) || !FIELD_CACHE.containsKey(key)) {
      @SuppressWarnings("unchecked")
      Class<Object> uncheckedType = (Class<Object>) type;
      for (Entry<String, Accessor> entry : TypeInfoRegistry.typeInfoFor(uncheckedType, configuration).getAccessors().entrySet()) {
        if (entry.getValue().getMember() instanceof Method)
          accessorFor(type, (Method) entry.getValue().getMember(), configuration, entry.getKey());
        else if (entry.getValue().getMember() instanceof Field)
          fieldPropertyFor(type, (Field) entry.getValue().getMember(), configuration, entry.getKey());
      }
    }

    if (ACCESSOR_CACHE.containsKey(key))
      return ACCESSOR_CACHE.get(key);
    return FIELD_CACHE.get(key);
  }
1116405
public final boolean isPropertyTypeDeclared(String propertyName) {
    StaticTypedSlot slot = getSlot(propertyName);
    return slot == null ? false : !slot.isTypeInferred();
  }