当前位置: 首页>>代码示例>>PHP>>正文


PHP destroy函数代码示例

本文整理汇总了PHP中destroy函数的典型用法代码示例。如果您正苦于以下问题:PHP destroy函数的具体用法?PHP destroy怎么用?PHP destroy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了destroy函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __destruct

 /**
  * Destructor
  */
 public function __destruct()
 {
     foreach ($this->archives as $archive) {
         destroy($archive);
     }
     $this->archives = array();
 }
开发者ID:nnnnathann,项目名称:piwik,代码行数:10,代码来源:Array.php

示例2: __destruct

 public function __destruct()
 {
     foreach ($this->records as $record) {
         destroy($record);
     }
     $this->records = array();
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:7,代码来源:RecordArray.php

示例3: fixed

function fixed($array)
{
    do {
        $word = $array[array_rand($array)];
        $word = ansiify($word);
        $word = caseify($word);
        $word = destroy($word);
    } while (strlen($word) < 4 || strlen($word) > 9);
    return $word;
}
开发者ID:JanSkalny,项目名称:tools,代码行数:10,代码来源:random.php

示例4: archiveDay

 /**
  * Archive the IntranetSubNetwork count
  */
 function archiveDay($notification)
 {
     $archiveProcessing = $notification->getNotificationObject();
     $recordName = 'IntranetSubNetwork_networkNameExt';
     $labelSQL = "location_IntranetSubNetwork";
     $interestByIntranetSubNetwork = $archiveProcessing->getArrayInterestForLabel($labelSQL);
     $tableIntranetSubNetwork = $archiveProcessing->getDataTableFromArray($interestByIntranetSubNetwork);
     $archiveProcessing->insertBlobRecord($recordName, $tableIntranetSubNetwork->getSerialized());
     destroy($tableIntranetSubNetwork);
 }
开发者ID:nachopavon,项目名称:IntranetSubNetwork,代码行数:13,代码来源:IntranetSubNetwork.php

示例5: archiveDay

 /**
  * Archive the provider count
  */
 function archiveDay($notification)
 {
     $archiveProcessing = $notification->getNotificationObject();
     $recordName = 'Provider_hostnameExt';
     $labelSQL = "location_provider";
     $interestByProvider = $archiveProcessing->getArrayInterestForLabel($labelSQL);
     $tableProvider = $archiveProcessing->getDataTableFromArray($interestByProvider);
     $archiveProcessing->insertBlobRecord($recordName, $tableProvider->getSerialized());
     destroy($tableProvider);
 }
开发者ID:ntulip,项目名称:piwik,代码行数:13,代码来源:Provider.php

示例6: archiveDayRecordInDatabase

 protected function archiveDayRecordInDatabase($archiveProcessing)
 {
     $tableCountry = $archiveProcessing->getDataTableFromArray($this->interestByCountry);
     $archiveProcessing->insertBlobRecord('UserCountry_country', $tableCountry->getSerialized());
     $archiveProcessing->insertNumericRecord('UserCountry_distinctCountries', $tableCountry->getRowsCount());
     destroy($tableCountry);
     $tableContinent = $archiveProcessing->getDataTableFromArray($this->interestByContinent);
     $archiveProcessing->insertBlobRecord('UserCountry_continent', $tableContinent->getSerialized());
     destroy($tableContinent);
 }
开发者ID:klando,项目名称:pgpiwik,代码行数:10,代码来源:UserCountry.php

示例7: archiveDataArray

 /** Build DataTable from array and archive it */
 private function archiveDataArray($keyword, &$data)
 {
     $dataTable = new Piwik_DataTable();
     foreach ($data as &$row) {
         $dataTable->addRow(new Piwik_SiteUsers_ExtendedDataTableRow(array(Piwik_DataTable_Row::COLUMNS => $row)));
     }
     $name = 'SiteUsers_' . $keyword;
     $this->archiveProcessing->insertBlobRecord($name, $dataTable->getSerialized());
     destroy($dataTable);
 }
开发者ID:BeezyT,项目名称:piwik-siteusers,代码行数:11,代码来源:Archive.php

示例8: destroy

 public function destroy()
 {
     $this->_result = null;
     foreach ($this->_list as $m) {
         if (is_subclass_of($m, 'model')) {
             destroy($m);
         }
     }
     $this->free();
     $this->_list = array();
 }
开发者ID:alexqwert,项目名称:kanon,代码行数:11,代码来源:modelResultSet.php

示例9: archiveDayRecordInDatabase

 protected function archiveDayRecordInDatabase($archiveProcessing)
 {
     $tableLocalTime = $archiveProcessing->getDataTableFromArray($this->interestByLocalTime);
     $this->makeSureAllHoursAreSet($tableLocalTime, $archiveProcessing);
     $archiveProcessing->insertBlobRecord('VisitTime_localTime', $tableLocalTime->getSerialized());
     destroy($tableLocalTime);
     $tableServerTime = $archiveProcessing->getDataTableFromArray($this->interestByServerTime);
     $this->makeSureAllHoursAreSet($tableServerTime, $archiveProcessing);
     $archiveProcessing->insertBlobRecord('VisitTime_serverTime', $tableServerTime->getSerialized());
     destroy($tableServerTime);
 }
开发者ID:ntulip,项目名称:piwik,代码行数:11,代码来源:VisitTime.php

示例10: archiveDay

 /**
  * Archive the provider count
  */
 function archiveDay($notification)
 {
     $archiveProcessing = $notification->getNotificationObject();
     $recordName = 'Provider_hostnameExt';
     $labelSQL = "location_provider";
     $interestByProvider = $archiveProcessing->getArrayInterestForLabel($labelSQL);
     $tableProvider = $archiveProcessing->getDataTableFromArray($interestByProvider);
     $columnToSortByBeforeTruncation = Piwik_Archive::INDEX_NB_VISITS;
     $maximumRowsInDataTableLevelZero = Zend_Registry::get('config')->General->datatable_archiving_maximum_rows_providers;
     $archiveProcessing->insertBlobRecord($recordName, $tableProvider->getSerialized($maximumRowsInDataTableLevelZero, null, $columnToSortByBeforeTruncation));
     destroy($tableProvider);
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:15,代码来源:Provider.php

示例11: destroy

function destroy()
{
    foreach (func_get_args() as $var) {
        if (is_object($var)) {
            $var->__destruct();
        } elseif (is_array($var)) {
            foreach ($var as $k => $v) {
                destroy($v);
            }
        }
        unset($var);
    }
}
开发者ID:alexqwert,项目名称:kanon,代码行数:13,代码来源:destroy.func.php

示例12: archiveDay

 public function archiveDay($notification)
 {
     $this->archiveProcessing = $notification->getNotificationObject();
     if (!$this->archiveProcessing->shouldProcessReportsForPlugin($this->getPluginName())) {
         return;
     }
     $recordName = 'VisitorInterest_timeGap';
     $tableTimegap = $this->getTableTimeGap();
     $this->archiveProcessing->insertBlobRecord($recordName, $tableTimegap->getSerialized());
     destroy($tableTimegap);
     $recordName = 'VisitorInterest_pageGap';
     $tablePagegap = $this->getTablePageGap();
     $this->archiveProcessing->insertBlobRecord($recordName, $tablePagegap->getSerialized());
     destroy($tablePagegap);
 }
开发者ID:Gninety,项目名称:Microweber,代码行数:15,代码来源:VisitorInterest.php

示例13: destroy

function destroy($dir) {
    $mydir = opendir($dir);
    while(false !== ($file = readdir($mydir))) {
        if($file != "." && $file != "..") {
            chmod($dir.$file, 0777);
            if(is_dir($dir.$file)) {
                chdir('.');
                destroy($dir.$file.'/');
                rmdir($dir.$file) or DIE("couldn't delete $dir$file<br />");
            }
            else
                unlink($dir.$file) or DIE("couldn't delete $dir$file<br />");
        }
    }
    closedir($mydir);
}
开发者ID:repli2dev,项目名称:re-eshop,代码行数:16,代码来源:cron.php

示例14: archiveDay

 function archiveDay($notification)
 {
     require_once PIWIK_INCLUDE_PATH . '/plugins/UserSettings/functions.php';
     $archiveProcessing = $notification->getNotificationObject();
     $this->archiveProcessing = $archiveProcessing;
     $recordName = 'UserSettings_configuration';
     $labelSQL = "CONCAT(config_os, ';', config_browser_name, ';', config_resolution)";
     $interestByConfiguration = $archiveProcessing->getArrayInterestForLabel($labelSQL);
     $tableConfiguration = $archiveProcessing->getDataTableFromArray($interestByConfiguration);
     $archiveProcessing->insertBlobRecord($recordName, $tableConfiguration->getSerialized());
     destroy($tableConfiguration);
     $recordName = 'UserSettings_os';
     $labelSQL = "config_os";
     $interestByOs = $archiveProcessing->getArrayInterestForLabel($labelSQL);
     $tableOs = $archiveProcessing->getDataTableFromArray($interestByOs);
     $archiveProcessing->insertBlobRecord($recordName, $tableOs->getSerialized());
     destroy($tableOs);
     $recordName = 'UserSettings_browser';
     $labelSQL = "CONCAT(config_browser_name, ';', config_browser_version)";
     $interestByBrowser = $archiveProcessing->getArrayInterestForLabel($labelSQL);
     $tableBrowser = $archiveProcessing->getDataTableFromArray($interestByBrowser);
     $archiveProcessing->insertBlobRecord($recordName, $tableBrowser->getSerialized());
     $recordName = 'UserSettings_browserType';
     $tableBrowserType = $this->getTableBrowserByType($tableBrowser);
     $archiveProcessing->insertBlobRecord($recordName, $tableBrowserType->getSerialized());
     destroy($tableBrowser);
     destroy($tableBrowserType);
     $recordName = 'UserSettings_resolution';
     $labelSQL = "config_resolution";
     $interestByResolution = $archiveProcessing->getArrayInterestForLabel($labelSQL);
     $tableResolution = $archiveProcessing->getDataTableFromArray($interestByResolution);
     $tableResolution->filter('ColumnCallbackDeleteRow', array('label', 'Piwik_UserSettings_keepStrlenGreater'));
     $archiveProcessing->insertBlobRecord($recordName, $tableResolution->getSerialized());
     $recordName = 'UserSettings_wideScreen';
     $tableWideScreen = $this->getTableWideScreen($tableResolution);
     $archiveProcessing->insertBlobRecord($recordName, $tableWideScreen->getSerialized());
     destroy($tableResolution);
     destroy($tableWideScreen);
     $recordName = 'UserSettings_plugin';
     $tablePlugin = $this->getDataTablePlugin();
     $archiveProcessing->insertBlobRecord($recordName, $tablePlugin->getSerialized());
     destroy($tablePlugin);
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:43,代码来源:UserSettings.php

示例15: done_testing

function done_testing()
{
    global $t;
    $funcs = get_defined_functions();
    $initialize = false;
    $finalize = false;
    if (in_array('initialize', $funcs['user'])) {
        $initialize = true;
    }
    if (in_array('finalize', $funcs['user'])) {
        $finalize = true;
    }
    if (in_array('build', $funcs['user'])) {
        build($t);
    }
    foreach ($funcs['user'] as $func) {
        # 予約された function
        if (in_array($func, array('build', 'destroy', 'initialize', 'finalize', 'done_testing'))) {
            continue;
        }
        # _function( ) は skip
        if (preg_match('/^_/', $func)) {
            continue;
        }
        if ($initialize) {
            initialize($t);
        }
        try {
            $t->diag("in function '{$func}'");
            $func($t);
        } catch (Exception $e) {
            $t->diag($e->getMessage() . " at {$func}( )");
            $t->fail();
        }
        if ($finalize) {
            finalize($t);
        }
    }
    if (in_array('destroy', $funcs['user'])) {
        destroy($t);
    }
}
开发者ID:hatyuki,项目名称:php-ClassTrigger,代码行数:42,代码来源:setup.php


注:本文中的destroy函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。