/** * @param Client $client * @param string $className * * @return array */ protected function getModificationsNeededStatesAndIdentifiers(Client $client, $className) { $query = $this->persistenceManager->createQueryForType($className); $states = array(ObjectIndexer::ACTION_TYPE_CREATE => array(), ObjectIndexer::ACTION_TYPE_UPDATE => array(), ObjectIndexer::ACTION_TYPE_DELETE => array()); foreach ($query->execute() as $object) { $state = $this->objectIndexer->objectIndexActionRequired($object, $client); $states[$state][] = $this->persistenceManager->getIdentifierByObject($object); } return $states; }