> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# getinstancesbyclass

> ترجع instances من Instance cache table التي يطابق ClassName field لها string المطلوب بالضبط. تتم قراءة الوسيط الأول باستخدام string type checking. Empty string يطلق "ClassName required". تنشئ function array table جديدة، وتكرر cache المخزنة تحت Instance cache، وتبقي فقط values التي يكون Lua type لها object، وتقرأ ClassName field لكل object value، وتقارنه باستخدام strcmp مع className المطلوب. تتم إضافة matches بشكل sequential بدءا من index 1. المطابقة exact و case-sensitive. لا تستخدم function دالة IsA، ولا تشمل subclasses، ولا تقوم بـ walk descendants، ولا تقوم بتصفية Parent، ولا ترتب النتيجة. getinstancesofclass هو alias لنفس function.

<div className="real-function-page">
  ```lua theme={null}
  getinstancesbyclass(className: string): table
  ```

  ## أسماء بديلة

  * `getinstancesofclass`

  ## الوسائط

  <ParamField path={"className"} type={"string"} required>
    Exact ClassName string للمطابقة. Empty strings تطلق "ClassName required".
  </ParamField>

  ## القيم الراجعة

  <ResponseField name={"instances"} type={"table"}>
    New array table تحتوي على matching object values من Instance cache table.
  </ResponseField>
</div>
