Make WordPress Core


Ignore:
Timestamp:
05/19/2014 06:48:56 AM (11 years ago)
Author:
wonderboymusic
Message:

Add missing access modifiers to methods in WP_Query. Add magic methods for __get(), __set(), __isset(), __unset(), and __call().

Add unit test for magic methods.

See #27881, #22234.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/functions.php

    r28493 r28523  
    5050    }
    5151
     52    public function __set( $name, $value ) {
     53        return $this->$name = $value;
     54    }
     55
     56    public function __isset( $name ) {
     57        return isset( $this->$name );
     58    }
     59
     60    public function __unset( $name ) {
     61        unset( $this->$name );
     62    }
     63
    5264    public function __call( $name, $arguments ) {
    5365        return call_user_func_array( array( $this, $name ), $arguments );
Note: See TracChangeset for help on using the changeset viewer.