mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +00:00
Updating file headers.
Removing Object::$_log. CakeLog is now called statically. Saving an instance is not longer necessary or desired.
This commit is contained in:
parent
c238d4d11b
commit
5506af8fcc
2 changed files with 7 additions and 25 deletions
|
@ -11,7 +11,6 @@
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistributions of files must retain the above copyright notice.
|
* Redistributions of files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @filesource
|
|
||||||
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
||||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
|
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake
|
||||||
|
@ -23,8 +22,8 @@
|
||||||
/**
|
/**
|
||||||
* File Storage stream for Logging
|
* File Storage stream for Logging
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake
|
||||||
* @subpackage cake.cake.libs.log
|
* @subpackage cake.cake.libs.log
|
||||||
*/
|
*/
|
||||||
class FileLog {
|
class FileLog {
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
/* SVN FILE: $Id$ */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Object class, allowing __construct and __destruct in PHP4.
|
* Object class, allowing __construct and __destruct in PHP4.
|
||||||
*
|
*
|
||||||
|
@ -10,20 +8,16 @@
|
||||||
* PHP versions 4 and 5
|
* PHP versions 4 and 5
|
||||||
*
|
*
|
||||||
* CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
|
* CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
|
||||||
* Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
* Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistributions of files must retain the above copyright notice.
|
* Redistributions of files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @filesource
|
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
||||||
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
|
|
||||||
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
|
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
|
||||||
* @package cake
|
* @package cake
|
||||||
* @subpackage cake.cake.libs
|
* @subpackage cake.cake.libs
|
||||||
* @since CakePHP(tm) v 0.2.9
|
* @since CakePHP(tm) v 0.2.9
|
||||||
* @version $Revision$
|
|
||||||
* @modifiedby $LastChangedBy$
|
|
||||||
* @lastmodified $Date$
|
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -33,19 +27,11 @@
|
||||||
* Also includes methods for logging and the special method RequestAction,
|
* Also includes methods for logging and the special method RequestAction,
|
||||||
* to call other Controllers' Actions from anywhere.
|
* to call other Controllers' Actions from anywhere.
|
||||||
*
|
*
|
||||||
* @package cake
|
* @package cake
|
||||||
* @subpackage cake.cake.libs
|
* @subpackage cake.cake.libs
|
||||||
*/
|
*/
|
||||||
class Object {
|
class Object {
|
||||||
|
|
||||||
/**
|
|
||||||
* Log object
|
|
||||||
*
|
|
||||||
* @var CakeLog
|
|
||||||
* @access protected
|
|
||||||
*/
|
|
||||||
var $_log = null;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A hack to support __construct() on PHP 4
|
* A hack to support __construct() on PHP 4
|
||||||
* Hint: descendant classes have no PHP4 class_name() constructors,
|
* Hint: descendant classes have no PHP4 class_name() constructors,
|
||||||
|
@ -160,13 +146,10 @@ class Object {
|
||||||
if (!class_exists('CakeLog')) {
|
if (!class_exists('CakeLog')) {
|
||||||
require LIBS . 'cake_log.php';
|
require LIBS . 'cake_log.php';
|
||||||
}
|
}
|
||||||
if (is_null($this->_log)) {
|
|
||||||
$this->_log = new CakeLog();
|
|
||||||
}
|
|
||||||
if (!is_string($msg)) {
|
if (!is_string($msg)) {
|
||||||
$msg = print_r($msg, true);
|
$msg = print_r($msg, true);
|
||||||
}
|
}
|
||||||
return $this->_log->write($type, $msg);
|
return CakeLog::write($type, $msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue