Pods::__get PHP Method

__get() public method

Handle variables that have been deprecated and PodsData vars
Since: 2.0
public __get ( $name ) : mixed
return mixed
    public function __get($name)
    {
        $name = (string) $name;
        // PodsData vars
        if (0 === strpos($name, 'field_') && isset($this->data->{$name})) {
            return $this->data->{$name};
        }
        if (!isset($this->deprecated)) {
            require_once PODS_DIR . 'deprecated/classes/Pods.php';
            $this->deprecated = new Pods_Deprecated($this);
        }
        $var = null;
        if (isset($this->deprecated->{$name})) {
            if (!class_exists('Pod') || Pod::$deprecated_notice) {
                pods_deprecated("Pods->{$name}", '2.0');
            }
            $var = $this->deprecated->{$name};
        } elseif (!class_exists('Pod') || Pod::$deprecated_notice) {
            pods_deprecated("Pods->{$name}", '2.0');
        }
        return $var;
    }