<p>So I'm refactoring my code to implement more OOP.  I set up a class to hold page attributes.</p>

<pre><code>class PageAtrributes 
{
  private $db_connection;
  private $page_title;

    public function __construct($db_connection) 
    {
        $this-&gt;db_connection = $db_connection;
        $this-&gt;page_title = '';
    }

    public function get_page_title()
    {
        return $this-&gt;page_title;
    }

    public function set_page_title($page_title)
    {
        $this-&gt;page_title = $page_title;
    }
}
</code></pre>

<p>Later on I call the set_page_title() function like so</p>

<pre><code>function page_properties($objPortal) {    
    $objPage-&gt;set_page_title($myrow['title']);
}
</code></pre>

<p>When I do I receive the error message:</p>

<blockquote>
  <p>Call to a member function set_page_title() on a non-object</p>
</blockquote>

<p>So what am I missing?</p>

It means that
```
$objPage
```
is not an instance of an object.  Can we see the code you used to initialize the variable?
As you expect a specific object type, you can also make use of
PHPs type-hinting feature
Docs
to get the error when your logic is violated:
```
```
function page_properties(PageAtrributes $objPortal) {    
    ...
    $objPage->set_page_title($myrow['title']);
}
```
```
This function will only accept
```
PageAtrributes
```
for the first parameter.