-- Vadim Gabriel wrote
(on Tuesday, 05 May 2009, 12:57 PM +0300):
> According to the code it requires both parameters to be set. Other wise it
> throws an exception.
The namespace *can* be an empty string ('') however.
> $namespace = $this->getNamespace();
> if ((null === $namespace)
>
Hey,
Ahh that's right. if i got a quarter for every time i mixed the two... :P
On Tue, May 5, 2009 at 1:03 PM, till wrote:
> On Tue, May 5, 2009 at 11:57 AM, Vadim Gabriel wrote:
> > Hey,
> >
> > According to the code it requires both parameters to be set. Other wise
> it
> > throws an excepti
On Tue, May 5, 2009 at 11:57 AM, Vadim Gabriel wrote:
> Hey,
>
> According to the code it requires both parameters to be set. Other wise it
> throws an exception.
>
> $namespace = $this->getNamespace();
> if ((null === $namespace)
> || (null === $this->getBasePath())
>
Hey,
According to the code it requires both parameters to be set. Other wise it
throws an exception.
$namespace = $this->getNamespace();
if ((null === $namespace)
|| (null === $this->getBasePath())
) {
require_once 'Zend/Loader/Exception.php';
t
Matthew Weier O'Phinney-3 wrote:
>
> $loader = new Zend_Application_Module_Autoloader(array(
> 'basePath' => APPLICATION_PATH,
> 'namespace' => '', // no resource namespace
> ));
>
Hi, are there any side effects of having an "empty" namespace?
Regards,
Goran Juric
h
-- J DeBord wrote
(on Sunday, 03 May 2009, 09:23 PM +0200):
> On Sun, May 3, 2009 at 5:14 PM, Matthew Weier O'Phinney
> wrote:
>
> -- J DeBord wrote
> (on Sunday, 03 May 2009, 04:49 PM +0200):
> > Adding namespaces to the new Autoloader works great as long as they are
> in the
>
On Sun, May 3, 2009 at 5:14 PM, Matthew Weier O'Phinney wrote:
> -- J DeBord wrote
> (on Sunday, 03 May 2009, 04:49 PM +0200):
> > Adding namespaces to the new Autoloader works great as long as they are
> in the
> > include path. For example, a namespace 'App_' which refers to classes in
> the
>
-- J DeBord wrote
(on Sunday, 03 May 2009, 04:49 PM +0200):
> Adding namespaces to the new Autoloader works great as long as they are in the
> include path. For example, a namespace 'App_' which refers to classes in the
> 'App' directory that sits next to the Zend (framework) directory.
>
> Quest
Matthew and all,
Adding namespaces to the new Autoloader works great as long as they are in
the include path. For example, a namespace 'App_' which refers to classes in
the 'App' directory that sits next to the Zend (framework) directory.
Question:
Is there anyway to autoload the classes inside
Mike Wright wrote:
J DeBord wrote:
My code:
require_once 'Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace(array('Amazon_', 'Nba_'));
$filesDomain = new Nba_SimpleDb_Domain_Files;
There is a parse error in the class Nba_SimpleDb_
-- J DeBord wrote
(on Saturday, 02 May 2009, 07:43 PM +0200):
> My code:
>
> require_once 'Zend/Loader/Autoloader.php';
> $autoloader = Zend_Loader_Autoloader::getInstance();
> $autoloader->registerNamespace(array('Amazon_', 'Nba_'));
>
> $filesDomain = new Nba_SimpleDb_Domain_Files;
>
> There
-- Mike Wright wrote
(on Saturday, 02 May 2009, 11:15 AM -0700):
> J DeBord wrote:
>> My code:
>>
>> require_once 'Zend/Loader/Autoloader.php';
>> $autoloader = Zend_Loader_Autoloader::getInstance();
>> $autoloader->registerNamespace(array('Amazon_', 'Nba_'));
>>
>> $filesDomain = new Nba_SimpleDb
No worries Mike. It's just something new to learn.
I am having another problem though.
I've removed my /models directory from the include path and attempted to
use:
$modelLoader = new Zend_Application_Module_Autoloader(array(
'namespace' => 'Model',
'basePath' => APPLICATION_PATH . '/mo
Mike Wright wrote:
J DeBord wrote:
My code:
require_once 'Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace(array('Amazon_', 'Nba_'));
$filesDomain = new Nba_SimpleDb_Domain_Files;
There is a parse error in the class Nba_SimpleDb_
J DeBord wrote:
My code:
require_once 'Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace(array('Amazon_', 'Nba_'));
$filesDomain = new Nba_SimpleDb_Domain_Files;
There is a parse error in the class Nba_SimpleDb_Domain_Files.
With t
My code:
require_once 'Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace(array('Amazon_', 'Nba_'));
$filesDomain = new Nba_SimpleDb_Domain_Files;
There is a parse error in the class Nba_SimpleDb_Domain_Files.
With the code above, whe
Alright, I read the article. Great as usual. Thanks Matthew.
The following paragraph caught my attention early on:
"So, we then tried using the suppression operator ('@'). This gets rid of
the error notices (though they still show up in logs) -- but has a really
nasty side effect: if there are *p
Thanks guys! I will be reading Matthew's Dev Zone article this evening.
Regarding registerNamespace(). How exactly does this work? What is the
advantage? For example I'm using an Amazon SimpleDb library. I keep it in
the same library directory next to my Zend (framework) directory. The
library dir
-- David Mintz wrote
(on Saturday, 02 May 2009, 08:54 AM -0400):
> On Sat, May 2, 2009 at 8:50 AM, Matthew Weier O'Phinney
> wrote:
> -- J DeBord wrote
> (on Saturday, 02 May 2009, 11:32 AM +0200):
> > To make Zend_Loader_Autoloader match the functionality of this:
> >
> > re
On Sat, May 2, 2009 at 8:50 AM, Matthew Weier O'Phinney wrote:
> -- J DeBord wrote
> (on Saturday, 02 May 2009, 11:32 AM +0200):
> > To make Zend_Loader_Autoloader match the functionality of this:
> >
> > require_once "Zend/Loader.php";
> > Zend_Loader::registerAutoload();
> >
> > Would you do th
-- J DeBord wrote
(on Saturday, 02 May 2009, 11:32 AM +0200):
> To make Zend_Loader_Autoloader match the functionality of this:
>
> require_once "Zend/Loader.php";
> Zend_Loader::registerAutoload();
>
> Would you do this? :
>
> require_once 'Zend/Loader/Autoloader.php';
> $autoloader = Zend_Loa
To make Zend_Loader_Autoloader match the functionality of this:
require_once "Zend/Loader.php";
Zend_Loader::registerAutoload();
Would you do this? :
require_once 'Zend/Loader/Autoloader.php';
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->setFallbackAutoloader(true);
Thanks!
22 matches
Mail list logo