get fan information

@return void
961939
private function _fans()
    {
        if (count($this->_values) == 14) {
            $dev1 = new SensorDevice();
            $dev1->setName('fan1');
            $dev1->setValue($this->_values[4]);
//            $dev1->setMin(3000);
            $this->mbinfo->setMbFan($dev1);
            $dev2 = new SensorDevice();
            $dev2->setName('fan2');
            $dev2->setValue($this->_values[5]);
//            $dev2->setMin(3000);
            $this->mbinfo->setMbFan($dev2);
            $dev3 = new SensorDevice();
            $dev3->setName('fan3');
            $dev3->setValue($this->_values[6]);
//            $dev3->setMin(3000);
            $this->mbinfo->setMbFan($dev3);
        }
    }
1242843
public function index()
    {
        $configurations = Configuration::all();
        $configurations_by_sections = ['init' => [], 'email' => [], 'tickets' => [], 'perms' => [], 'editor' => [], 'other' => []];
        $init_section = ['main_route', 'main_route_path', 'admin_route', 'admin_route_path', 'master_template', 'bootstrap_version', 'routes'];
        $email_section = ['status_notification', 'comment_notification', 'queue_emails', 'assigned_notification',
        'email.template', 'email.header', 'email.signoff', 'email.signature', 'email.dashboard',
        'email.google_plus_link', 'email.facebook_link', 'email.twitter_link', 'email.footer', 'email.footer_link',
        'email.color_body_bg', 'email.color_header_bg', 'email.color_content_bg', 'email.color_footer_bg',
        'email.color_button_bg', ];
        $tickets_section = ['default_status_id', 'default_close_status_id', 'default_reopen_status_id', 'paginate_items'];
        $perms_section = ['agent_restrict', 'close_ticket_perm', 'reopen_ticket_perm'];
        $editor_section = ['editor_enabled', 'include_font_awesome', 'editor_html_highlighter', 'codemirror_theme',
          'summernote_locale', 'summernote_options_json_file', 'purifier_config', ];

        // Split them into configurations sections for tabs
        foreach ($configurations as $config_item) {
            //trim long values (ex serialised arrays)
            $config_item->value = $config_item->getShortContent(25, 'value');
            $config_item->default = $config_item->getShortContent(25, 'default');

            if (in_array($config_item->slug, $init_section)) {
                $configurations_by_sections['init'][] = $config_item;
            } elseif (in_array($config_item->slug, $email_section)) {
                $configurations_by_sections['email'][] = $config_item;
            } elseif (in_array($config_item->slug, $tickets_section)) {
                $configurations_by_sections['tickets'][] = $config_item;
            } elseif (in_array($config_item->slug, $perms_section)) {
                $configurations_by_sections['perms'][] = $config_item;
            } elseif (in_array($config_item->slug, $editor_section)) {
                $configurations_by_sections['editor'][] = $config_item;
            } else {
                $configurations_by_sections['other'][] = $config_item;
            }
        }

        return view('ticketit::admin.configuration.index', compact('configurations', 'configurations_by_sections'));
    }
1062059
public function getHeaderInfo()
	{
		if( !$this->info )
			$this->info	= imap_headerinfo( $this->stream, $this->messageNumber );
		return $this->info;
	}
186100
public function getFileInfo()
    {
        $ret = array(
            'uploadId' => $this->id,
            'mimeType' => $this->mime_type,
            'filename' => $this->filename,
            'extension'=> $this->extension,
            'fileSize' => $this->getFileSize(),
            'hashKey'  => $this->getHashKey()
        );
        if (!$this->id && is_file($this->filename)) {
            $ret['mimeType'] = $this->_getMimeType($this->filename);
            $ret['extension'] = substr(strrchr($this->filename, '.'), 1);
        }
        $size = $this->getImageDimensions();
        if ($size) {
            $ret['image'] = true;
            $ret['imageHandyScaleFactor'] = Kwf_Media_Image::getHandyScaleFactor($size);
            if (abs($size['rotation']) == 90) {
                $size = array('width'=>$size['height'], 'height'=>$size['width']);
            }
            $ret['imageWidth'] = $size['width'];
            $ret['imageHeight'] = $size['height'];
        } else {
            $ret['image'] = false;
        }
        return $ret;
    }
1346122
public static function info()
    {
        $database = Config::get('database.database');
        $host = Config::get('database.host');
        $username = Config::get('database.username');
        //
        return "\n\n-- Database : $database\n-- Host : $host\n-- User : $username\n";
    }
190165
public function getServerInfo()
    {
        // init empty variables (can be filled if exec is allowed)
        $iMemTotal = $iMemFree = $sCpuModelName = $sCpuModel = $sCpuFreq = $iCpuCores = null;

        // fill, if exec is allowed
        if ($this->isExecAllowed()) {
            $iCpuAmnt = $this->_getCpuAmount();
            $iCpuMhz = $this->_getCpuMhz();
            $iBogo = $this->_getBogoMips();
            $iMemTotal = $this->_getMemoryTotal();
            $iMemFree = $this->_getMemoryFree();
            $sCpuModelName = $this->_getCpuModel();
            $sCpuModel = $iCpuAmnt . 'x ' . $sCpuModelName;
            $sCpuFreq = $iCpuMhz . ' MHz';

            // prevent "division by zero" error
            if ($iBogo && $iCpuMhz) {
                $iCpuCores = $iBogo / $iCpuMhz;
            }
        }

        $aServerInfo = [
            'Server OS'     => @php_uname('s'),
            'VM'            => $this->_getVirtualizationSystem(),
            'PHP'           => $this->_getPhpVersion(),
            'MySQL'         => $this->_getMySqlServerInfo(),
            'Apache'        => $this->_getApacheVersion(),
            'Disk total'    => $this->_getDiskTotalSpace(),
            'Disk free'     => $this->_getDiskFreeSpace(),
            'Memory total'  => $iMemTotal,
            'Memory free'   => $iMemFree,
            'CPU Model'     => $sCpuModel,
            'CPU frequency' => $sCpuFreq,
            'CPU cores'     => round($iCpuCores, 0),
        ];

        return $aServerInfo;
    }
471362
private function _cpuinfo()
    {
        if (CommonFunctions::executeProgram('kstat', '-p d cpu_info:*:cpu_info*:core_id', $m, PSI_DEBUG) && ($m!=="")) {
            $cpuc = count(preg_split('/\n/', $m, -1, PREG_SPLIT_NO_EMPTY));
            for ($cpu=0; $cpu < $cpuc; $cpu++) {
                $dev = new CpuDevice();
                if (($buf = $this->_kstat('cpu_info:'.$cpu.':cpu_info'.$cpu.':clock_MHz')) !== "") {
                   $dev->setCpuSpeed($buf);
                }
                if (($buf = $this->_kstat('cpu_info:'.$cpu.':cpu_info'.$cpu.':current_clock_Hz')) !== "") {
                    $dev->setCpuSpeedMax($buf/1000000);
                }
                if (($buf  =$this->_kstat('cpu_info:'.$cpu.':cpu_info'.$cpu.':brand')) !== "") {
                    $dev->setModel($buf);
                } elseif (($buf  =$this->_kstat('cpu_info:'.$cpu.':cpu_info'.$cpu.':cpu_type')) !== "") {
                    $dev->setModel($buf);
                } elseif (CommonFunctions::executeProgram('uname', '-p', $buf, PSI_DEBUG) && ($buf!="")) {
                    $dev->setModel($buf);
                } elseif (CommonFunctions::executeProgram('uname', '-i', $buf, PSI_DEBUG) && ($buf!="")) {
                    $dev->setModel($buf);
                }
                $this->sys->setCpus($dev);
            }
         }
    }
118233
public function getFileInfo()
    {
        $fullName = str_replace('source/','',$this->fullName);
        return [
            "msg"    => $this->stateInfo,
            "code" => $this->stateInfo == "SUCCESS" ? 0 : $this->stateInfo,
            "data"=>[
                "src"=>$this->imgDomain.$fullName,
                'title'=>$fullName,
            ],
            "type"     => $this->fileType,
            "size"     => $this->fileSize
        ];
    }
85857
protected function _cpuinfo()
    {
        if (CommonFunctions::executeProgram('pidin', 'info', $buf)
           && preg_match('/^Processor\d+: (.*)/m', $buf)) {
            $lines = preg_split("/\n/", $buf, -1, PREG_SPLIT_NO_EMPTY);
            foreach ($lines as $line) {
                if (preg_match('/^Processor\d+: (.+)/', $line, $proc)) {
                    $dev = new CpuDevice();
                    $dev->SetModel(trim($proc[1]));
                    if (preg_match('/(\d+)MHz/', $proc[1], $mhz)) {
                        $dev->setCpuSpeed($mhz[1]);
                    }
                    $this->sys->setCpus($dev);
                }
            }
        }
    }
955840
public function getUserInfo()
    {
        if (!isset($this->userinfo)) {
            $this->userinfo = $this->request('GET', 'userInfo');
        }

        return $this->userinfo;
    }
316526
public function getAllInfo()
    {
        $list = (new UserList($this->_user, $this->_type, 7))->getAllInfo();

        $cover = '';
        foreach ($list as $c) {
            if ($this->_type == 'anime') {
                $temp = str_replace(['{id}', '{url}'], [$c['anime_id'], $c['anime_image_path']], $this->_style);
            } else {
                $temp = str_replace(['{id}', '{url}'], [$c['manga_id'], $c['manga_image_path']], $this->_style);
            }
            $cover .= $temp."\n";
        }

        return $cover;
    }
230756
public function info() {
        $info             = $this->data;
        $info['id']       = $this->uid;
        $info['username'] = $this->username;
        $info['nickname'] = $this->nickname;
        $info['phone']    = $this->phone;
        $info['email']    = $this->email;
        $info['avatar']   = $this->avatar;

        return $info;
    }
569552
public function get_server_info() {
        static $info = null; // TODO: move to real object property

        if (is_null($info)) {
            $this->query_start("--oci_server_version()", null, SQL_QUERY_AUX);
            $description = oci_server_version($this->oci);
            $this->query_end(true);
            preg_match('/(\d+\.)+\d+/', $description, $matches);
            $info = array('description'=>$description, 'version'=>$matches[0]);
        }

        return $info;
    }
164826
private function _buildMbinfo()
    {
        $mbinfo = $this->_xml->addChild('MBInfo');
        $temp = $fan = $volt = $power = $current = $other = null;

        if (sizeof(unserialize(PSI_MBINFO))>0) {
            foreach (unserialize(PSI_MBINFO) as $mbinfoclass) {
                $mbinfo_data = new $mbinfoclass();
                $mbinfo_detail = $mbinfo_data->getMBInfo();

                if (!$this->_sysinfo->getBlockName() || $this->_sysinfo->getBlockName()==='temperature') foreach ($mbinfo_detail->getMbTemp() as $dev) {
                    if ($temp == null) {
                        $temp = $mbinfo->addChild('Temperature');
                    }
                    $item = $temp->addChild('Item');
                    $item->addAttribute('Label', $dev->getName());
                    $item->addAttribute('Value', $dev->getValue());
                    if ($dev->getMax() !== null) {
                        $item->addAttribute('Max', $dev->getMax());
                    }
                    if (defined('PSI_SENSOR_EVENTS') && PSI_SENSOR_EVENTS && $dev->getEvent() !== "") {
                        $item->addAttribute('Event', $dev->getEvent());
                    }
                }

                if (!$this->_sysinfo->getBlockName() || $this->_sysinfo->getBlockName()==='fans') foreach ($mbinfo_detail->getMbFan() as $dev) {
                    if ($fan == null) {
                        $fan = $mbinfo->addChild('Fans');
                    }
                    $item = $fan->addChild('Item');
                    $item->addAttribute('Label', $dev->getName());
                    $item->addAttribute('Value', $dev->getValue());
                    if ($dev->getMin() !== null) {
                        $item->addAttribute('Min', $dev->getMin());
                    }
                    if (defined('PSI_SENSOR_EVENTS') && PSI_SENSOR_EVENTS && $dev->getEvent() !== "") {
                        $item->addAttribute('Event', $dev->getEvent());
                    }
                }

                if (!$this->_sysinfo->getBlockName() || $this->_sysinfo->getBlockName()==='voltage') foreach ($mbinfo_detail->getMbVolt() as $dev) {
                    if ($volt == null) {
                        $volt = $mbinfo->addChild('Voltage');
                    }
                    $item = $volt->addChild('Item');
                    $item->addAttribute('Label', $dev->getName());
                    $item->addAttribute('Value', $dev->getValue());
                    if ($dev->getMin() !== null) {
                        $item->addAttribute('Min', $dev->getMin());
                    }
                    if ($dev->getMax() !== null) {
                        $item->addAttribute('Max', $dev->getMax());
                    }
                    if (defined('PSI_SENSOR_EVENTS') && PSI_SENSOR_EVENTS && $dev->getEvent() !== "") {
                        $item->addAttribute('Event', $dev->getEvent());
                    }
                }

                if (!$this->_sysinfo->getBlockName() || $this->_sysinfo->getBlockName()==='power') foreach ($mbinfo_detail->getMbPower() as $dev) {
                    if ($power == null) {
                        $power = $mbinfo->addChild('Power');
                    }
                    $item = $power->addChild('Item');
                    $item->addAttribute('Label', $dev->getName());
                    $item->addAttribute('Value', $dev->getValue());
                    if ($dev->getMax() !== null) {
                        $item->addAttribute('Max', $dev->getMax());
                    }
                    if (defined('PSI_SENSOR_EVENTS') && PSI_SENSOR_EVENTS && $dev->getEvent() !== "") {
                        $item->addAttribute('Event', $dev->getEvent());
                    }
                }

                if (!$this->_sysinfo->getBlockName() || $this->_sysinfo->getBlockName()==='current') foreach ($mbinfo_detail->getMbCurrent() as $dev) {
                    if ($current == null) {
                        $current = $mbinfo->addChild('Current');
                    }
                    $item = $current->addChild('Item');
                    $item->addAttribute('Label', $dev->getName());
                    $item->addAttribute('Value', $dev->getValue());
                    if ($dev->getMin() !== null) {
                        $item->addAttribute('Min', $dev->getMin());
                    }
                    if ($dev->getMax() !== null) {
                        $item->addAttribute('Max', $dev->getMax());
                    }
                    if (defined('PSI_SENSOR_EVENTS') && PSI_SENSOR_EVENTS && $dev->getEvent() !== "") {
                        $item->addAttribute('Event', $dev->getEvent());
                    }
                }

                if (!$this->_sysinfo->getBlockName() || $this->_sysinfo->getBlockName()==='other') foreach ($mbinfo_detail->getMbOther() as $dev) {
                    if ($other == null) {
                        $other = $mbinfo->addChild('Other');
                    }
                    $item = $other->addChild('Item');
                    $item->addAttribute('Label', $dev->getName());
                    $item->addAttribute('Value', $dev->getValue());
                    if (defined('PSI_SENSOR_EVENTS') && PSI_SENSOR_EVENTS && $dev->getEvent() !== "") {
                        $item->addAttribute('Event', $dev->getEvent());
                    }
                }
            }
        }
    }
826992
public function getInfo() {
		$info = $this->createInfoset()
			->setName('Php engine')
			->setIcon('elephant');
		
		$this->createTitle($info);
		$this->engineInfo($info);
		$this->extensionsInfo($info);
		
		return $info;
	}
228155
private function _fans()
    {
        if (isset($this->_buf['Fan'])) foreach ($this->_buf['Fan'] as $name=>$value) {
            $dev = new SensorDevice();
            $dev->setName($name);
            $dev->setValue($value);
            $this->mbinfo->setMbFan($dev);
        }
    }
1040086
public function getAccountInformation() {
    $url = $this->url . self::$API_ROUTES['ACCOUNT_INFO'];
    $url .= '?apiVersion=' . $this->apiVersion;

    $result = $this->doGet($url, array(), false);

    if ($result !== null && is_object($result)) {
      $accountInfo = AccountInformation::getFromJson($result);

      if ($accountInfo != null) {
        return $accountInfo;
      }
    }

    return null;
  }