FluentDOM\Element::isNodeOffset PHP Method

isNodeOffset() private method

Node offsets are integers, or strings containing only digits.
private isNodeOffset ( mixed $offset ) : boolean
$offset mixed
return boolean
    private function isNodeOffset($offset)
    {
        if (is_int($offset) || ctype_digit((string) $offset)) {
            return TRUE;
        } elseif ($this->isAttributeOffset($offset)) {
            return FALSE;
        }
        throw new \InvalidArgumentException('Invalid offset. Use integer for child nodes and strings for attributes.');
    }