split the text in this frame at the offset specified.  The remaining
text is added a sibling frame following this one and is returned.

@param $offset
@return Frame|null
960855
function split_text($offset)
    {
        if ($offset == 0) {
            return null;
        }

        $split = $this->_frame->get_node()->splitText($offset);

        $deco = $this->copy($split);

        $p = $this->get_parent();
        $p->insert_child_after($deco, $this, false);

        if ($p instanceof Inline) {
            $p->split($deco);
        }

        return $deco;
    }
914510
public function getSlice($offset, $length)
    {
        $childrenTags = $this->tagsService->loadTagChildren($this->tag, $offset, $length);

        if (!isset($this->nbResults)) {
            $this->nbResults = $this->tagsService->getTagChildrenCount($this->tag);
        }

        return $childrenTags;
    }
45893
public function offsetGet($offset)
    {
        return isset($this->lines[$offset]) ? $this->lines[$offset] : null;
    }
393455
protected function split($content)
    {
        // Pull off all annotation lines
        $continuation = false;
        $annotation = '';

        $lines = explode("\n", $content);
        $remaining = $lines;

        foreach ($lines as $i => $line) {
            if (!$line) {
                $continuation = false;
                continue;
            }

            if ($line[0] == '@') {
                $this->addAnnotation($annotation);
                $annotation = '';
                $continuation = true;
            } elseif ($continuation) {
                $annotation .= ' ';
            } else {
                continue;
            }

            $annotation .= trim($line);
            unset($remaining[$i]);
        }

        $this->addAnnotation($annotation);

        // Split remaining lines by paragrah
        $remaining = implode("\n", $remaining);
        $parts = preg_split("/(\n\n|\r\n\r\n)/", $remaining, -1, PREG_SPLIT_NO_EMPTY);

        // Into two parts
        if ($parts) {
            $first = $parts[0];
            $this->shortDescription = trim($first);

            $rest = array_slice($parts, 1);
            if ($rest) {
                $long = implode("\n\n", $rest);
                $long = preg_replace('/(\w) *\n *(\w)/', '\1 \2', $long);
                $long = trim($long);
                $this->longDescription = $long;
            }
        }
    }
1298186
public function offsetGet($offset) {
		if ($offset instanceOf Argument) {
			$offset = $offset->key;
		}

		if (isset($this->_parsed[$offset])) {
			return $this->_parsed[$offset];
		}
	}
268120
public function offsetGet($offset)
    {
        // Get name of the method, the class should have. Like "getText"
        $method = Text::camelCase("get $offset");

        // If it exists, call it and return its return value
        if (method_exists($this, $method)) {
            return $this->{$method}();
        }

        // If not return the data from the array after checking it is set
        return isset($this->container[$offset]) ? $this->container[$offset] : null;
    }
36714
public function offsetGet($offset)
    {
        return isset($this->repository[$offset]) ? $this->repository[$offset] : null;
    }
614934
public function offsetUnset($offset)
    {
        if (false === method_exists($this, 'set' . ucfirst($offset))) {
            unset($this->$offset);

            return $this;
        }

        return $this->offsetSet($offset, null);
    }
53349
public function offsetGet($offset) {
    if (is_string($offset)) {
      return $this->get($offset);
    }
    return parent::offsetGet($offset);
  }
760386
public function slice($offset, $length = null) {
		$offset = $this->prepareOffset($offset);
		$length = $this->prepareLength($offset, $length);

		if ($length === 0) {
			return new Text('', $this->encoding);
		}

		return new Text(mb_substr($this->string, $offset, $length, $this->encoding), $this->encoding);
	}
584626
public function offsetGet($offset)
    {
        $offset = trim(strval($offset));
        $value  = parent::offsetGet($offset);
        $value  = $this->getField($offset)->filter($value);

        return $value;
    }
841156
public function offsetGet($offset)
    {
        return isset($this->dataPlaceHolder[$offset]) ? $this->dataPlaceHolder[$offset] : null;
    }
840513
public function offsetUnset($offset) {
        $detach = NULL;

        if(parent::offsetExists($offset)) {
            $child = parent::offsetGet($offset);
            if($child instanceof Element && $child->__parent === $this) {
                $detach = $child;
            }
        }

        parent::offsetUnset($offset);

        if($detach) {
            $detach->detach();
        }
    }
1319323
public function getRequestByOffset( $offset ) {
		$reqs = glob($this->tmpDir . DIRECTORY_SEPARATOR . 'request.*');
		natsort($reqs);

		$item = array_slice($reqs, $offset, 1);
		if( !$item ) {
			return null;
		}

		$path    = reset($item);
		$content = file_get_contents($path);
		$data    = @unserialize($content);
		if( $data instanceof RequestInfo ) {
			return $data;
		}

		return null;
	}
1043275
public function offsetGet($offset)
    {
        $messages = $this->getMessages();

        return isset($messages[$offset]) ? $messages[$offset] : null;
    }
197256
public function setOffset($offset)
    {
        $this->offset = $offset;
        $this->queryBuilder->setFirstResult($offset);
        return $this;
    }
922400
protected function getChunk($offset)
	{
		if ( ! is_numeric($offset) || ! is_int(+$offset) || $offset < 0) {
			throw new \InvalidArgumentException(
				__METHOD__."() expects parameter one, offset, to be a positive "
					. "integer or zero"
			);	
		}
		
		$chunk = false;
		
		$text = (string) $this->text;
		
		if ($offset < mb_strlen($text)) {
			$chunk = mb_substr($text, $offset, $this->size, $this->encoding);
		} 
		
		return $chunk;
	}