Skip to content

Commit

Permalink
Removing inheritance from Object. Constructor workarounds are no long…
Browse files Browse the repository at this point in the history
…er needed and Object methods are not used on these classes.
  • Loading branch information
markstory committed Apr 18, 2010
1 parent c9f3fa5 commit 146ec00
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
6 changes: 1 addition & 5 deletions cake/libs/file.php
Expand Up @@ -22,9 +22,6 @@
* Included libraries.
*
*/
if (!class_exists('Object')) {
require LIBS . 'object.php';
}
if (!class_exists('Folder')) {
require LIBS . 'folder.php';
}
Expand All @@ -35,7 +32,7 @@
* @package cake
* @subpackage cake.cake.libs
*/
class File extends Object {
class File {

/**
* Folder object of the File
Expand Down Expand Up @@ -96,7 +93,6 @@ class File extends Object {
* @access private
*/
function __construct($path, $create = false, $mode = 0755) {
parent::__construct();
$this->Folder =& new Folder(dirname($path), $create, $mode);
if (!is_dir($path)) {
$this->name = basename($path);
Expand Down
6 changes: 1 addition & 5 deletions cake/libs/folder.php
Expand Up @@ -22,9 +22,6 @@
* Included libraries.
*
*/
if (!class_exists('Object')) {
require LIBS . 'object.php';
}

/**
* Folder structure browser, lists folders and files.
Expand All @@ -33,7 +30,7 @@
* @package cake
* @subpackage cake.cake.libs
*/
class Folder extends Object {
class Folder {

/**
* Path to Folder.
Expand Down Expand Up @@ -100,7 +97,6 @@ class Folder extends Object {
* @param mixed $mode Mode (CHMOD) to apply to created folder, false to ignore
*/
function __construct($path = false, $create = false, $mode = false) {
parent::__construct();
if (empty($path)) {
$path = TMP;
}
Expand Down
2 changes: 1 addition & 1 deletion cake/libs/i18n.php
Expand Up @@ -29,7 +29,7 @@
* @package cake
* @subpackage cake.cake.libs
*/
class I18n extends Object {
class I18n {

/**
* Instance of the I10n class for localization
Expand Down
3 changes: 1 addition & 2 deletions cake/libs/l10n.php
Expand Up @@ -24,7 +24,7 @@
* @package cake
* @subpackage cake.cake.libs
*/
class L10n extends Object {
class L10n {

/**
* The language for current locale
Expand Down Expand Up @@ -331,7 +331,6 @@ function __construct() {
if (defined('DEFAULT_LANGUAGE')) {
$this->default = DEFAULT_LANGUAGE;
}
parent::__construct();
}

/**
Expand Down

0 comments on commit 146ec00

Please sign in to comment.