Determine if the provided object is valid or not

@param mixed $item

@return bool
184795
public function isValid($item)
    {
        if (!$item) {
            $item = new \stdClass();
        }
        $validator = $this->getValidator();

        return $validator->validate($item);
    }
710347
private static function isSortable($item, $field) {
        if (is_array($item))
            return array_key_exists($field, $item);
        elseif (is_object($item))
            return isset($item->$field) || property_exists($item, $field);
        else
            return false;
    }
720933
public function checkHasSettings($item)
    {
        $plugin = Eresus_Plugin_Registry::getInstance()->load($item['name']);
        if (false === $plugin)
        {
            return false;
        }
        $provider = new Eresus_Admin_ContentProvider_Plugin($plugin);
        return false !== $provider->getSettingsController();
    }
1145638
public function isObject($item=null) {
    list($item) = self::_wrapArgs(func_get_args(), 1);
    return self::_wrap(is_object($item));
  }
1152589
private static function isValidArrayItem(Expr $item)
    {
        $value = ($item instanceof ArrayItem) ? $item->value : $item;

        while ($value instanceof ArrayDimFetch || $value instanceof PropertyFetch) {
            $value = $value->var;
        }

        // We just kind of give up if it's a method call. We can't tell if it's
        // valid via static analysis.
        return $value instanceof Variable || $value instanceof MethodCall || $value instanceof FuncCall;
    }
1074228
public function getItem($item)
	{
		return isset($this->items[$item]) ? $this->items[$item] : false;
	}
476837
public function __item($item = null)
    {
        $result = parent::__item($item);
        $result['content'] = true;
        return $result;
    }
306225
public function isString($item=null) {
    list($item) = self::_wrapArgs(func_get_args(), 1);
    return self::_wrap(is_string($item));
  }
1144301
public function isYamlFile($item)
    {
        return
            $this->isFile($item) && (
                ends_with(strtolower($item), '.yml') ||
                ends_with(strtolower($item), '.yaml')
            );
    }
438035
public function enqueue($item): bool {
        if (!$this->isValid()) return false;

        $this->queue[$this->head] = $item;
        $this->head++;
        return true;
    }
764824
private function _autoFilter($item)
	{
		# NULL
		if(null === $item) { return null; }

		# WHAT ELSE
		if(is_object($item) || is_resource($item)) {
			return $item;
		}

		# BOOL
		if(is_bool($item) || $item === 'false' || $item === 'true') {
			if($item === 'false') { $item = false; }
			elseif($item === 'true') { $item = true; }
			return $item;
		}

		# ARRAY
		if(is_array($item)) {
			foreach ($item as $k => $v) {
				$item[$k] = $this->_autoFilter($v);
			}
			return $item;
		}

		# INT
		$int = filter_var($item, FILTER_VALIDATE_INT);
		if($int !== false) { return $int; }

		# FLOAT
		if(preg_match('#^([\+\-])?(?!0[0-9]+)[0-9]+\.[0-9]+$#', $item)) {
			return floatval($item);
		}

		# STRING
		return filter_var($item, FILTER_SANITIZE_SPECIAL_CHARS);
	}
659796
public function isValidItemType(string $itemType): bool
    {
        if (!is_array($this->validItemTypes)) {
            return true;
        }

        return in_array($itemType, $this->validItemTypes, true);
    }
992369
public function valid()
    {
		if ($this->dontUsePaging || !$this->itemCountPerPage)
		{		
			return $this->position >= 0 && $this->position < count($this->getElements());
		}
		if ($this->position < 0) return false;
		if ($this->itemCountPerPage && $this->position >= $this->itemCountPerPage) return false;
		if ($this->getPosition() >= count($this->getElements())) return false;
		return true;
    }
330880
public function isItemModelDefined(core_kernel_classes_Resource $item)
    {
        $returnValue = (bool)false;

        if (!is_null($item)) {

            $model = $item->getOnePropertyValue($this->itemModelProperty);
            if ($model instanceof core_kernel_classes_Literal) {
                if (strlen((string)$model) > 0) {
                    $returnValue = true;
                }
            } else if (!is_null($model)) {
                $returnValue = true;
            }
        }

        return (bool)$returnValue;
    }
660606
protected function getValue( $item )
    {
        if ( is_bool( $item ) )
            $value = $item ? "true" : "false";
        else if ( is_array( $item ) )
            $value = 'Array(' . count( $item ) . ')';
        else if ( is_numeric( $item ) )
            $value = $item;
        else if ( is_string( $item ) )
            $value = "'" . $item . "'";
        else if ( is_object( $item ) )
            $value = method_exists( $item, '__toString' ) ? (string)$item : 'Object';
        else
            $value = $item;

        return $value;
    }
825149
public function shouldBeIncluded($item)
    {
        if (!is_object($item)) {
            return false;
        }

        $pageId = $this->getPageId($item);
        $showInMenu = get_field('hide_in_menu', $pageId) ? !get_field('hide_in_menu', $pageId) : true;
        $isNotTopLevelItem = !($item->post_type === 'page' && isset($item->post_parent) && $item->post_parent === 0);
        $showTopLevel = $this->args['include_top_level'];

        return ($showTopLevel || $isNotTopLevelItem) && $showInMenu;
    }
1132531
public function isDone($item) {
        //remove from local files list
        if(isset($this->data["files"]) && is_array($this->data["files"])) {
            if (isset($item->OriginalFile)) {
                $this->data["files"] = array_diff($this->data["files"], array($item->OriginalFile));
            }
            elseif (isset($item->SavedFile)) {
                $this->data["files"] = array_diff($this->data["files"], array($item->SavedFile));
            }
            elseif(isset($item->OriginalURL) && isset($this->data["pendingURLs"][$item->OriginalURL])) {
                $this->data["files"] = array_diff($this->data["files"], array($this->data["pendingURLs"][$item->OriginalURL]));
            }
        }
        //remove from pending URLs
        if(isset($item->OriginalURL)) {
            if(isset($this->data["pendingURLs"][$item->OriginalURL])) {
                unset($this->data["pendingURLs"][$item->OriginalURL]);
            }
            elseif(isset($this->data["urllist"]) && in_array($item->OriginalURL, $this->data["urllist"])) {
                $this->data["urllist"] = array_values(array_diff($this->data["urllist"], array($item->OriginalURL)));
            }
        }
    }