[buildLogs description].

@param mixed $event

@return [type] [description]
961615
public function buildLogs($event)
    {
        $refPath  = '/composer/installed.json';
        $packages = [];

        if (file_exists($path = "{$this->vendorPath}{$refPath}")) {
            $packages = json_decode(file_get_contents($path), true);
        }

        $no_log = true;

        foreach ($packages as $one) {
            if (isset($one['extra']['changeLog'])) {
                $name           = $this->format($one['name']);
                $log_path       = $one['extra']['changeLog'];
                $version        = $one['version'];
                $package_path   = "$this->vendorPath/{$name}";
                $log_file       = glob("$package_path/$log_path/$version.*");

                if (!$log_file) {
                    continue;
                }

                $no_log      = false;
                $log_content = file_get_contents($log_file[0]);

                $this->alert("\"$name\" {$version} ChangeLog:", $event);
                $this->info($log_content, $event);

                // rename file so we dont display it again
                rename($log_file[0], "$package_path/$log_path/$version");
            }
        }

        if ($no_log) {
            $this->alert('No Available ChangeLogs At The Moment', $event);
        }
    }
68175
protected function _write($event)
    {
        $data = array();
        if (empty($this->getColumnMap())) {
            $data = $event;
        } else {
            foreach ($this->getColumnMap() as $name => $value) {
                if (isset($event[$name])) {
                    $data[$name] = $event[$name];
                }
            }
        }

        $entry = new $this->modelClass();
        $entry->fromArray($data);
        $entry->save();

        return $this;
    }
220548
private function getEventMessage(Event $event)
    {
        return json_encode([
            'title' => $event->getTitle(),
            'text' => $event->getText(),
            'timestamp' => $event->getTimeStamp(),
            'host' => $event->getHost(),
            'type' => $event->getType()
        ]);
    }
205117
protected function _write($event)
    {
        // $output = '<table cellspacing="10">';
        $output = '<tr>';
        $output .= '<td style="color:%color%;text-align:right;padding-right:1em">%priorityName%</td>';
        $output .= '<td style="color:%color%;text-align:right;padding-right:1em">%memory%</td>';
        $output .= '<td style="color:%color%;">%message%</td></tr>'; // (%priority%)
        $event['color'] = '#C9C9C9';
        // Count errors
        if ($event['priority'] < 7) {
            $event['color'] = 'green';
        }
        if ($event['priority'] < 6) {
            $event['color'] = '#fd9600';
        }
        if ($event['priority'] < 5) {
            $event['color'] = 'red';
            $this->_errors++;
        }

        if ($event['priority'] == ZFDebug_Controller_Plugin_Debug_Plugin_Log::ZFLOG) {
            $event['priorityName'] = $event['message']['time'];
            $event['memory'] = $event['message']['memory'];
            $event['message'] = $event['message']['message'];
        } else {
            // self::$_lastEvent = null;
            $event['message'] = $event['priorityName'] .': '. $event['message'];
            $event['priorityName'] = '&nbsp;';
            $event['memory'] = '&nbsp;';
        }
        foreach ($event as $name => $value) {
            if ('message' == $name) {
                $measure = '&nbsp;';
                if ((is_object($value) && !method_exists($value,'__toString'))) {
                    $value = gettype($value);
                } elseif (is_array($value)) {
                    $measure = $value[0];
                    $value = $value[1];
                }
            }
            $output = str_replace("%$name%", $value, $output);
        }
        $this->_messages[] = $output;
    }
743755
public function getEventLogInfo(Event $event, $eventName)
    {
        $this->default = array(
            'type' => $eventName,
            'description' => $eventName,
        );

        if (!isset($this->commands[$eventName])) {
            return $this->default;
        }

        return $this->getEventLogDetails($event, $this->commands[$eventName]);
    }
232527
public function taskFinished(BuildEvent $event)
    {
        $start = array_pop($this->profileData);

        $name = $event->getTask()->getTaskName();
        $this->logFinish($event, $start, $name);
    }
175863
protected function getEventOutput(Event $event)
    {
        if (! $event->output ||
            $event->output === $event->getDefaultOutput() ||
            $event->shouldAppendOutput ||
            ! file_exists($event->output)) {
            return '';
        }

        return trim(file_get_contents($event->output));
    }
1260402
protected function buildCondition($event) {
        $conditions = array();
        foreach ($event->getControlIds() as $control) {
            if (substr($control, 0, 1) === '.') {
                $condition = 'Event.Control.HasClass("' . substr($control, 1) . '")';
            } else {
                $condition = 'Event.ControlId == "' . $control . '"';
            }
            $conditions[$control] = $condition;
        }

        $result = '';
        if (!empty($conditions)) {
            $result = implode(' || ', $conditions);
        }
        return $result;
    }
956778
public static function dump(Event $event)
    {
        $composer = $event->getComposer();

        $extra = $composer->getPackage()->getExtra();
        $includeAssetsDir = realpath($extra['bolt-web-path']) === realpath($extra['bolt-root-path']);

        /** @var PackageDescriptor[] $extensions */
        $extensions = [];

        $finder = self::getInstalledComposerJson();
        foreach ($finder as $jsonFile) {
            $jsonData = json_decode($jsonFile->getContents(), true);
            if (isset($jsonData['type']) && $jsonData['type'] === 'bolt-extension') {
                $webPath = sprintf('extensions/vendor/%s', $jsonData['name']);

                if ($includeAssetsDir && !empty($jsonData['extra']['bolt-assets'])) {
                    $webPath .= '/' . trim($jsonData['extra']['bolt-assets'], '/');
                }

                $extensions[$jsonData['name']] = PackageDescriptor::parse($composer, $webPath, $jsonFile->getPath(), $jsonData);
            }
        }

        $vendorDir = $composer->getConfig()->get('vendor-dir');
        $fs = new Filesystem();
        $fs->dumpFile($vendorDir . '/autoload.json', json_encode($extensions, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
    }
85254
public function logActivity($event)
    {
        // if cronjob / no user
        if (user()->id <= 0) {
            return;
        }

        // log adjustment
        LogAdminActivity::create([
            'subject_id'   => $this->id,
            'subject_type' => get_class($this),
            'name'         => $this->getActivityName($this, $event),
            'before'       => $this->before,
            'after'        => $this->after,
            'user_id'      => user()->id,
        ]);
    }
217054
public function getListeners($event = null){
        if (!$event){
            return $this->listeners;
        }
        return isset($this->listeners[$event]) ? $this->listeners[$event] : null;
    }
460029
public function dispatch(Event $event)
        {
            $message = sprintf(self::FMT_INF_DISPATCHING, $event->getId(), count($this->subscriptions));
            $this->logger->info($message);

            $dispatchCount = 0;

            foreach ($this->subscriptions as $subscription) {
                $result = $this->tryDispatch($subscription, $event);

                $dispatchCount += (int)$result;
            }

            $message = sprintf(self::FMT_INF_DISPATCHED, $event->getId(), $dispatchCount);
            $this->logger->info($message);

            return $dispatchCount;
        }
190519
public function processStream($event)
    {
        /**
         * @var Request $event->message
         */
        
        if($event->message->isCtlFrame()) {
            if($event->message->isCloseFrame()) {
                return $this->processClose($event);
            }else if($event->message->isPingFrame()){
                return $this->processPing($event);
            }else if($event->message->isPongFrame()){
                return $this->processPong($event);
            }
            
        }else{
            return $this->processData($event);
        }
    }
38437
public function col_time($event) {

        if (empty($this->download)) {
            $dateformat = get_string('strftimedatetime', 'core_langconfig');
        } else {
            $dateformat = get_string('strftimedatetimeshort', 'core_langconfig');
        }
        return userdate($event->timecreated, $dateformat);
    }
93571
public function getListeners($event)
    {
        $parentListeners = [];
        $wildcards = [];

        if( is_object($event) )
        {
            $eventName = get_class($event);
            $parentListeners = $this->getParentListeners($event);
        }
        else
        {
            $eventName = $event;
            $wildcards = $this->getWildcardListeners($event);
        }

        if (!isset($this->sorted[$eventName])) {
            $this->sortListeners($eventName);
        }

        return array_merge($this->sorted[$eventName], $wildcards, $parentListeners);
    }
184230
protected static function getProjectDir(Event $event): string
    {
        return $event->getComposer()->getConfig()->get('vendor-dir')
            . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR;
    }
1329048
public function buildFinished(BuildEvent $event)
    {
        parent::buildFinished($event);

        $project = $event->getProject();
        $properties = $project->getProperties();

        $filename = $properties['phing.log.mail.properties.file'];

        // overlay specified properties file (if any), which overrides project
        // settings
        $fileProperties = new Properties();
        $file = new PhingFile($filename);

        try {
            $fileProperties->load($file);
        } catch (IOException $ioe) {
            // ignore because properties file is not required
        }

        foreach ($fileProperties as $key => $value) {
            $properties['key'] = $project->replaceProperties($value);
        }

        $success = $event->getException() === null;
        $prefix = $success ? 'success' : 'failure';

        try {
            $notify = StringHelper::booleanValue($this->getValue($properties, $prefix . '.notify', 'on'));
            if (!$notify) {
                return;
            }

            if (is_string(Phing::getDefinedProperty('phing.log.mail.subject'))) {
                $defaultSubject = Phing::getDefinedProperty('phing.log.mail.subject');
            } else {
                $defaultSubject = ($success) ? 'Build Success' : 'Build Failure';
            }
            $hdrs = [];
            $hdrs['From'] = $this->getValue($properties, 'from', $this->from);
            $hdrs['Reply-To'] = $this->getValue($properties, 'replyto', '');
            $hdrs['Cc'] = $this->getValue($properties, $prefix . '.cc', '');
            $hdrs['Bcc'] = $this->getValue($properties, $prefix . '.bcc', '');
            $hdrs['Body'] = $this->getValue($properties, $prefix . '.body', '');
            $hdrs['Subject'] = $this->getValue($properties, $prefix . '.subject', $defaultSubject);
            $tolist = $this->getValue($properties, $prefix . '.to', $this->tolist);
        } catch (BadMethodCallException $e) {
            $project->log($e->getMessage(), Project::MSG_WARN);
        }

        if (empty($tolist)) {
            return;
        }

        $mail = Mail::factory('mail');
        $mail->send($tolist, $hdrs, $this->mailMessage);
    }