[Solar-talk] Solar Content & Model brainstorm
Paul M Jones
pmjones at solarphp.com
Mon Oct 16 06:44:12 PDT 2006
Hi Rodrigo,
> Models requirements differs (see the "Solar Model performance"
> thread), but Solar could still provide a content class to tie them. A
> small change I've made to use the areas, nodes and tags concepts was
> to create my own Content class and then define which models are used:
>
> protected $_Tipos_Content = array(
> 'sql' => 'sql',
> 'areas' => 'Tipos_Model_Areas',
> 'nodes' => 'Tipos_Model_Nodes',
> 'tags' => 'Tipos_Model_Tags',
> );
>
> ...and then in __construct():
> ...
> $this->areas = Solar::factory($this->_config['areas'], $this-
> >_config);
> $this->nodes = Solar::factory($this->_config['nodes'], $this-
> >_config);
> $this->tags = Solar::factory($this->_config['tags'], $this-
> >_config);
> ...
>
> This way, you can still use the areas and tags models, but change the
> node model to use your own, for example.
This is a good idea; can you enter it as a feature request in Trac
for me?
--
Paul M. Jones <http://paul-m-jones.com>
Solar: Simple Object Library and Application Repository
for PHP5. <http://solarphp.com>
Savant: The simple, elegant, and powerful solution for
templates in PHP. <http://phpsavant.com>
More information about the solar-talk
mailing list