<?php
namespace Models;
class Host extends ActiveRecord\Model {}
?>
And here is the output:
Array
(
[ip] => 192.168.1.2
[mac] => 00224d6a1b4d
[last_request] => 2013-04-28 06:10:42
[last_response] => 2013-04-28 06:10:42
[status] =>up
)
Fatal error: Class 'Models\Host' not found in ...DbHosts.php on line 45
My AR is Version 1.0 - June 27, 2010, PHP 5.4.13.
I'd appreciate any suggestions. Thanks.
Megan McVeyThu Jul 18 18:18:31 -0400 2013
Super late to the party.
I believe namespaced classes are expected to be in a directory for the namespace.
Subject: Models Class not found with Namespace
I have a Host class that clashes with the AR Model Host class, so I thought to use a Namespace to fix it.
This is a code snippet:
and dbmodels/host.php
And here is the output:
My AR is Version 1.0 - June 27, 2010, PHP 5.4.13.
I'd appreciate any suggestions. Thanks.