prepareData

@param \Windwalker\Data\Data $data

@return  void
194375
protected function prepareData($data)
    {
        $data->collector = $data->item['collector'];

        $data->eventExecuted  = $data->collector['event.executed'];
        $data->eventListeners = $data->collector['event.listeners'];

        // Executed Events
        $events = [];

        foreach ((array) $data->eventExecuted as $event) {
            $eventName = $event['event'];

            if (!isset($events[$eventName])) {
                $events[$eventName] = [];
            }

            foreach ($event['listeners'] as $listener) {
                $id = implode('::', (array) $listener);

                if (!isset($events[$id])) {
                    $events[$eventName][$id] = [
                        'name' => $eventName,
                        'times' => 0,
                        'listener' => implode('::', (array) $listener),
                    ];
                }

                $events[$eventName][$id]['times']++;
            }
        }

        $data->executed = $events;

        // Event No executed
        $events = [];

        foreach ((array) $data->eventListeners as $eventName => $listeners) {
            foreach ($listeners as $listener) {
                if (!empty($data->executed[$eventName])) {
                    continue;
                }

                if (!isset($events[$eventName])) {
                    $events[$eventName] = [];
                }

                $events[$eventName][] = [
                    'name' => $eventName,
                    'times' => 0,
                    'listener' => implode('::', (array) $listener),
                ];
            }
        }

        $data->noExecuted = $events;
    }
83246
public function applyData ( $data = NULL ) {
        parent::applyData( $data );
        if ($data != null) {
            self::$propData[$this->getKey()] = $this;
            self::$keyCache[$this->getClassKey()] = $this->__keyName;
            $key = $this->__keyName;
            self::$__ids[$this->getClassKey()][$this->$key] = true;
        }
    }
1111440
public function setData($Data)
    {
        if (! is_object($Data) || ! $Data instanceof Data) {
            throw new \InvalidArgumentException(
                'The Data Interface must be a valid Data Object'
            );
        }
        $this->Data = $Data;

        return true;
    }
1319296
public function onData(string $data)
    {
        $data = trim($data);
        $this->log('->' . $data);
        $chunks = explode(' ', $data);
        $command = $chunks[0];
        unset($chunks[0]);
        $input = '';
        if (count($chunks) > 0) {
            $input = implode(' ', $chunks);
        }
        $input = trim($input);
        if ($this->node->getCommands()->has($command)) {
            $this
                ->node
                ->getCommands()
                ->get($command)
                ->handle($this, $input)
                ->then(function (array $lines) {
                    foreach ($lines as $line) {
                        $this->write($line);
                    }
                });
            return;
        }

        $list = implode(', ', $this->node->getCommands()->keys());
        $this->write(
            '# Unknown command. Try ' . substr_replace($list, ' or ', strrpos($list, ', '), 2)
        );
    }
775286
protected function setData($data)
    {
        $data = (array) json_decode($data, true);

        if (false === array_key_exists('data', $data)) {
            throw new \InvalidArgumentException('Provided JSON has no `data` member defined');
        }

        $this->data = $data['data'];

        if (!empty($data['included'])) {
            $this->include = $data['included'];
        }
    }
1076792
public function setup($data = array())
	{

		foreach (self::$_KEYS as $k)
		{
			if (array_key_exists($k, $data))
			{
				$this->_API[$k] = self::verifySetup($k, $data[$k]);
			}
		}
	}
180452
protected function save($data)
    {
        $currentStep = $this->getCurrentStep();
        if (is_array($data)) {
            foreach ($data as $field => $value) {
                if (in_array($field, $this->config()->get('ignored_fields'))) {
                    unset($data[$field]);
                }
            }
            $currentStep->saveData($data);
        }
        return;
    }
1276646
private function prepareData(array $data)
    {
        $inserts = array_dot($data);
        $updates = [];
        $deletes = [];

        foreach ($this->model()->lists('key') as $key) {
            if (isset($inserts[$key]))
                $updates[$key] = $inserts[$key];
            else
                $deletes[]     = $key;

            unset($inserts[$key]);
        }

        return [$inserts, $updates, $deletes];
    }
782976
public function init(array $data = [])
    {
        foreach ($data as $key => $value) {
            $key = $this->getPreparedKey($key);
            $method = 'set' . str_replace(' ', '', $key);

            if (method_exists($this, $method)) {
                $this->{$method}($value);
            }
        }
    }
1166199
public function set_data( $data ) {
		if ( isset( $data[ $this->slug ] ) ) {
			if ( is_string( $data[ $this->slug ] ) ) {
				$is_json = json_decode( $data[ $this->slug ], ARRAY_A );
				if ( ! empty( $is_json ) ) {
					$data[ $this->slug ] = $is_json;
				} else {
					$data[ $this->slug ] = str_replace( '{{@root', '{{json @root', $data[ $this->slug ] );
				}
			}
			$this->data[ $this->id() ][ $this->slug ] = apply_filters( 'uix_' . $this->slug . '_sanitize_' . $this->type, $data[ $this->slug ], $this );
		}

	}
849844
protected function prepareData($data)
    {
        $data['auth_key'] = $this->api_key;
        $data['format'] = $this->api_format;
        $data['pretty'] = $this->api_pretty;

        return $data;
    }
682486
protected function prepareData($data)
    {
        $default = new \StdClass;
        $default->name = null;
        $default->gender = null;
        $default->probability = null;
        $default->count = null;

        return (object) array_merge(
            (array) $default,
            (array) $data
        );
    }
860879
protected function update(Data $data)
    {
        $this->__before('update', $data);
        $data->validate();

        if (!$this->doUpdate($data)) {
            return false;
        }

        $this->pack([], $data);
        $this->__after('update', $data);

        return true;
    }
1202660
protected function processInboundData($data)
    {
        $node = $this->reader->nextTree($data);
        if ($node != null) {
            $this->processInboundDataNode($node);
        }
    }
1159353
public function setData($data)
    {
        $body = new Doozr_Response_Body();
        $body->write($data);

        $this->setBody($body);
    }
346589
protected function prepareData()
    {
        if ($this->prepared) {
            return;
        }

        $this->presences         = new Collection;
        $this->modulePresences   = new Collection;
        $this->permissions       = [];
        $this->modulePermissions = [];

        $this->loadAclModules()
             ->collapsePermissions();

        $this->prepared = true;
    }
938312
protected function prepareData($data)
    {
        $profiler        = $data->item['profiler'];
        $data->collector = $collector = $data->item['collector'];

        // Information
        $data->options = new Data($collector['database.info']);

        // Find system process points
        $queries = $data->collector['database.queries'];

        $data->queryProcess = TimelineHelper::prepareQueryTimeline($queries);
    }