Convert the batch values to LDAP batch mod specifications array.

@return OperatorCollection
162533
public function toLdap()
    {
        /** @var LdapObjectSchema $schema */
        foreach ($this->operators->getAliases() as $alias => $schema) {
            $this->schema = $schema;
            $this->processOperator($schema->getFilter(), null);
            foreach ($this->operators as $operator) {
                $this->processOperator($operator, $alias);
            }
        }

        return $this->operators;
    }
42184
public static function sanitizeBatchArray(array $batches)
    {
        foreach ($batches as $bI => $batch) {
            if (!isset($batch['values'])) {
                continue;
            }
            foreach ($batch['values'] as $vI => $value) {
                if (is_string($value) && self::isBinary($value)) {
                    $batches[$bI]['values'][$vI] = LdapUtilities::MASK_BINARY;
                }
            }
            if (isset($batch['attrib']) && in_array(strtolower($batch['attrib']), self::MASK_ATTRIBUTES)) {
                $batches[$bI]['values'] = [self::MASK_PASSWORD];
            }
        }

        return $batches;
    }
50871
public function toArray()
    {
        $result = array();
        foreach ($this->blockManagers as $blockManager) {
            if (null !== $blockManager) {
                $result[] = $blockManager->toArray();
            }
        }

        return $result;
    }
516828
public function getCollections()
    {
        if ($this->collections) {
            return $this->collections;
        }

        $collectionMapper = ($this->container->dataMapper)('CollectionMapper');

        return $this->collections = $collectionMapper->find();
    }
328608
public function toArray(): array
    {
        $this->internalDataListUpdate();

        // Copied from DataObjectToArrayTrait. Do not modify here !!!
        $toArray = function($object) use (&$toArray) {
            $result = [];
            $vars = get_object_vars($object);
            foreach ($vars as $name => $value) {
                if ($name !== 'internalDataObjectData') {
                    $reflectionProperty = new \ReflectionProperty($object, $name);
                    if ($reflectionProperty->isPublic()) {
                        $result[$name] = null;
                    }
                }
            }
            if (isset($object->internalDataObjectData)) {
                foreach ($object->internalDataObjectData as $name => $value) {
                    $result[substr($name, 1)] = null;
                }
            }
            ksort($result);
            foreach ($result as $name => $null) {
                $value = $object instanceof \ArrayAccess ? $object[$name] : (isset($object->$name) ? $object->$name : null);
                if (is_object($value)) {
                    if (method_exists($value, 'toArray')) {
                        $result[$name] = $value->toArray();
                    } else {
                        if ($value instanceof \DateTime) {
                            $result[$name] = $value->format('c');
                        } else {
                            $propertyVars = $toArray($value);
                            foreach ($propertyVars as $propertyVarName => $propertyVarValue) {
                                if (is_object($propertyVarValue)) {
                                    $propertyVars[$propertyVarName] = $toArray($propertyVarValue);
                                }
                            }
                            $result[$name] = $propertyVars;
                        }
                    }
                } else {
                    $result[$name] = $value;
                }
            }
            return $result;
        };

        $result = [];
        foreach ($this->internalDataListData as $index => $object) {
            $object = $this->internalDataListUpdateValueIfNeeded($this->internalDataListData, $index);
            if (method_exists($object, 'toArray')) {
                $result[] = $object->toArray();
            } else {
                $result[] = $toArray($object);
            }
        }
        return $result;
    }
527928
public function toArray()
    {
        if (null === $this->alBlock) {
            return array();
        }

        $content = $this->replaceHtmlCmsActive();
        if (null === $content) {
            $content = $this->getHtml();
        }

        $blockManager = array();
        $blockManager["HideInEditMode"] = $this->getHideInEditMode();
        $blockManager["Content"] = $content;
        $blockManager["EditInline"] = $this->editInline();
        $blockManager["Block"] = $this->alBlock->toArray();

        return $blockManager;
    }
669947
protected function get_batch() {
		global $wpdb;

		$table        = $wpdb->options;
		$column       = 'option_name';
		$key_column   = 'option_id';
		$value_column = 'option_value';

		if ( is_multisite() ) {
			$table        = $wpdb->sitemeta;
			$column       = 'meta_key';
			$key_column   = 'meta_id';
			$value_column = 'meta_value';
		}

		$key = $this->identifier . '_batch_%';

		$query = $wpdb->get_row( $wpdb->prepare( "
			SELECT *
			FROM {$table}
			WHERE {$column} LIKE %s
			ORDER BY {$key_column} ASC
			LIMIT 1
		", $key ) );

		$batch       = new \stdClass();
		$batch->key  = $query->$column;
		$batch->data = maybe_unserialize( $query->$value_column );

		return $batch;
	}
251964
public function getValues()
    {
        $values = $this->entity->getValues();
        $result = [];
        if ($values) {
            foreach ($values as $value) {
                $result[] = new OperatorValue($value, $this->locale);
            }

            return $result;
        }

        return;
    }
423350
public function values()
    {
        $r = [];

        foreach ($this->storage as $value) {
            array_push($r, $value);
        }

        return new Collection($r);
    }
373228
protected function rawCollection(): Collection
    {
        $conn = $this->connPool->getConnection();
        $database = $conn->defaultDatabase;

        return $conn->getRawConnection()->$database->{$this->collection};
    }
97850
public function toArray()
    {
        return array(

            'namespace'            => $this->namespace,
            'className'            => $this->className,
            'fileName'             => $this->fileName,
            'callableName'         => $this->callableName,
            'description'          => $this->description,
            'service'              => $this->service,
            'servers'              => $this->servers,
            'iterations'           => $this->iterations,
            'minimumExecutionTime' => $this->minimumExecutionTime,
            'timeout'              => $this->timeout,
            'jobs'                 => $this->jobCollection->toArray(),
        );
    }
324434
public function toDatamapperObject()
    {
        $entities = new DatamapperCollection;

        foreach ($this->items as $name => $item) {
            $entities->put($name, $item->toDatamapperObject());
        }

        return $entities;
    }
552104
public function toArray()
    {
        $collection = [];

        $webspaces = [];
        foreach ($this->webspaces as $webspace) {
            $webspaces[] = $webspace->toArray();
        }

        $portalInformations = [];
        foreach ($this->portalInformations as $environment => $environmentPortalInformations) {
            $portalInformations[$environment] = [];

            foreach ($environmentPortalInformations as $environmentPortalInformation) {
                $portalInformations[$environment][$environmentPortalInformation->getUrl()] = $environmentPortalInformation->toArray();
            }
        }

        $collection['webspaces'] = $webspaces;
        $collection['portalInformations'] = $portalInformations;

        return $collection;
    }
70364
public function getDataModel()
    {
        $dataModel = array();
        $model     = $this->config->getDataModel();

        foreach ($this->getEditFieldsArrays() as $name => $options) {
            //if this is a key, set it to 0
            if ($options['type'] === 'key') {
                $dataModel[$name] = 0;
            } else {
                //if this is a collection, convert it to an array
                if (is_a($model->$name, 'Illuminate\Database\Eloquent\Collection')) {
                    $dataModel[$name] = $model->$name->toArray();
                } else {
                    $dataModel[$name] = isset($options['value']) ? $options['value'] : null;
                }
            }
        }

        return $dataModel;
    }
1048864
protected function getAllKeyValues() {
    $keys = [];
    // add temporary permission to allow to read entitys
    $this->isLoadingKeys = true;
    $permissionManager = ObjectFactory::getInstance('permissionManager');
    $tmpPerm = $permissionManager->addTempPermission($this->entityType, '', PersistenceAction::READ);
    $persistenceFacade = ObjectFactory::getInstance('persistenceFacade');
    $objects = $persistenceFacade->loadObjects($this->entityType, BuildDepth::SINGLE);
    $permissionManager->removeTempPermission($tmpPerm);
    $this->isLoadingKeys = false;
    foreach ($objects as $object) {
      $key = ActionKey::createKey(
              $object->getValue($this->valueMap['resource']),
              $object->getValue($this->valueMap['context']),
              $object->getValue($this->valueMap['action'])
            );
      $keys[$key] = $object->getValue($this->valueMap['value']);
    }
    return $keys;
  }
255257
public function toArray()
    {
        $arrayResult = array(
            'id' => $this->id,
            'string' => $this->sql,
            'command' => $this->getCommand(),
            'executed' => $this->executed,
            'isDDL' => $this->isDDL(),
            'isDML' => $this->isDML(),
            'isDCL' => $this->isDCL(),
            'isTCL' => $this->isTCL(),
            'isAnon' => $this->isAnon(),
            'isRead' => $this->isRead(),
            'isWrite' => $this->isWrite(),
            'result' => $this->result->toarray(),
        );

        return $arrayResult;
    }
1021180
public function toArray() {
      $collectionArray = array();
      foreach ($this->data as $data) {
        $collectionArray[] = $data->toArray();
      }
      return $collectionArray;
    }