I'm creating a class that uses google.
I want to return the value as an object from another class.
Example:
$x = new SocialServices($key, $keySecret, $apiKey);
Here I call the Google() method which requires a google.php file and creates the new object
$x->Google();
Here I want return Google class as $this.
public function Google() {
require 'PHP/google.php';
new Google($this->key, $this->secret, $this->apiKey, "#Google");
}
When i call
$x->YouTube();
It will be works.