same as title.
thanks.
Page 1 of 1
Where is the best place to store my own classes
#2
Posted 18 December 2009 - 11:04 AM
I would say...components/
Or components/lib/ - lib/ is not part of Yii but it's how I like to call it.
Or components/lib/ - lib/ is not part of Yii but it's how I like to call it.
#3
Posted 18 December 2009 - 11:14 AM
I think, /components is better for classes that extends CComponent.
I prefer to use my own folder called 'vendors' (CakePHP legacy
I prefer to use my own folder called 'vendors' (CakePHP legacy

God is real unless declared as integer
#4
Posted 18 December 2009 - 11:16 AM
I use /components for app-components, /components/controllers for special parent controllers, /components/classes for classes and so on.
#5
Posted 18 December 2009 - 11:28 AM
All classes that are used by my application are stored under protected/components/$classgroup$
eg:
protected
protected/components
protected/components/auth
protected/components/controllers
protected/components/mailer
protected/components/widgets
etc...
if the class is not a part of a group then i place it under
protected/components
eg:
protected
protected/components
protected/components/auth
protected/components/controllers
protected/components/mailer
protected/components/widgets
etc...
if the class is not a part of a group then i place it under
protected/components
php: foreach(array('cat', 'dog', 'cow') as $animal) echo $animal."\n"; python: [(animal, print(animal)) for animal in ['cat', 'dog', 'cow']] ruby: ['cat', 'dog', 'cow'].each {|animal| puts animal}
You say Tomato, I say Tomato.
#6
Posted 18 December 2009 - 02:49 PM
Can anyone give me an example how to call methods I put in components folder.
I like to have something like:
Is this possible. thanks.
I like to have something like:
class.myclass.addit(x,y)
Is this possible. thanks.
Share this topic:
Page 1 of 1