本文整理汇总了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();
}
示例2: __destruct
public function __destruct()
{
foreach ($this->records as $record) {
destroy($record);
}
$this->records = array();
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}