Toggle Menu
Prev Up Next

# `langchain_community.document_loaders.parsers.language.php`.PHPSegmenter

class langchain_community.document_loaders.parsers.language.php.PHPSegmenter(code: str)

  Code segmenter for PHP.

  Methods

  `__init__`(code) |
  `extract_functions_classes`() |
  `get_chunk_query`() |
  `get_language`() |
  `get_parser`() |
  `is_valid`() |
  `make_line_comment`(text) |
  `simplify_code`() |

  Parameters

    code (str) –

  __init__(code: str)
    Parameters

      code (str) –

  extract_functions_classes() → List[str]
    Return type

      List[str]

  get_chunk_query() → str
    Return type

      str

  get_language() → Language
    Return type

      Language

  get_parser() → Parser
    Return type

      Parser

  is_valid() → bool
    Return type

      bool

  make_line_comment(text: str) → str
    Parameters

      text (str) –

    Return type

      str

  simplify_code() → str
    Return type

      str