Initializes the default configuration for the object.

Called from {@link __construct()} as a first step of object instantiation.

@param AnConfig $config An optional AnConfig object with configuration options.
423165
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'theme' => 'base'
        ));

        $config->append(array(
            'view' => 'tmpl:'.$config->theme.'.view.'.$this->getIdentifier()->name.'.'.$config->request->getFormat(),
        ));

        parent::_initialize($config);
    }
660452
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'paths' => array(
                ANPATH_ROOT.'/components/com_stories/templates/stories',
                ANPATH_ROOT.'/components/com_actors/templates/stories',
                ),
            'filters' => array('alias', 'shorttag'),
            'alias' => array(
                '@escape(' => 'htmlspecialchars(',
                '@route(' => 'route(',
                '@name(' => '$this->renderHelper(\'com://site/actors.template.helper.story.names\',',
                '@possessive(' => '$this->renderHelper(\'com://site/stories.template.helper.story.possessiveNoune\',$story,',
                '@link(' => '$this->renderHelper(\'com://site/actors.template.helper.story.link\',',
            ),
        ));

        parent::_initialize($config);
    }
52762
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'priority' => AnCommand::PRIORITY_NORMAL,
        ));

        parent::_initialize($config);
    }
838925
protected function _initialize(AnConfig $config)
    {
        $identifier = clone $this->getIdentifier();

        $identifier->path = array();

        $paths[] = ANPATH_THEMES.DS.'base'.DS.$this->getFormat();
        $paths[] = ANPATH_BASE.dirname($identifier->filepath).DS.$this->getFormat();

        $config->append(array(
            'template_paths' => $paths,
        ));

        $params = '';

        if (is_readable($file = ANPATH_THEMES.DS.$this->getIdentifier()->package.DS.'params.ini')) {
            $params = parse_ini_file($file);
        }

        $config->append(array(
            'mimetype' => 'text/html',
            'params' => $params,
            'template_filters' => array('shorttag', 'html', 'alias'),
        ));

        parent::_initialize($config);
    }
1016444
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'resources' => array('sessions'),
            'attributes' => array(
                'id',
                'sessionId' => array(
                    'required' => true
                ),
                'username' => array(
                    'default' => ''
                ),
                'nodeId' => array(
                    'default' => 0
                ),
                'usertype' => array(
                    'default' => ComPeopleDomainEntityPerson::USERTYPE_GUEST,
                    'required' => true
                ),
                'guest' => array(
                    'default' => 1,
                    'required' => true
                ),
                'meta' => array(
                    'default' => '',
                ),
                'time' => array(
                    'default' => 0
                )
            )
        ));

        parent::_initialize($config);
    }
436861
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
              'paths' => array(dirname(__FILE__).'/ui'),
        ));

        parent::_initialize($config);
    }
768744
public static function registerDefault($config)
    {
        if (!isset($config['identifier'])) {
            throw new AnException('identifier [AnServiceIdentifier] options is requied');
        }

        $strIdentifier = (string) $config['identifier'];

        if (isset($config['default'])) {
            $config['default'] = (array) $config['default'];
        } else {
            if (is_object($config['prefix'])) {
                $config['prefix'] = get_class(($config['prefix']));
            }

            if (empty($config['name'])) {
                $path = AnInflector::implode($config['identifier']->path);
                $config['name'] = array($path.ucfirst($config['identifier']->name), $path.'Default');
            }

            unset($config['default']);
        }

        self::$_identifiers[$strIdentifier] = $config;

        if (isset(self::$_defaults[$strIdentifier])) {
            unset(self::$_defaults[$strIdentifier]);
        }
    }
781000
protected function _initialize(AnConfig $config)
     {
         $config->append(array(
             'session' => false,
             'session_name' => $this->getName()
         ));

         parent::_initialize($config);
    }
402214
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            //whilte list these tags
            'tag_method' => 0,
            'tag_list' => array('p', 'strike', 'u', 'pre', 'address', 'blockquote', 'b', 'i', 'ul', 'ol', 'li', 'h1', 'h2', 'h3', 'h4', 'h5'),
        ));

        if ($config->tag_list) {
            $config['tag_list'] = AnConfig::unbox($config->tag_list);
        }

        if ($config->tag_method) {
            $config['tag_method'] = AnConfig::unbox($config->tag_method);
        }

        $config['attribute_method'] = 0;
        $config['attribute_list'] = array();

        parent::_initialize($config);
    }
1133105
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'request' => array(
                'scope' => '',
                'sort' => 'trending',
                'days' => AnRequest::get('get.days', 'int', 7),
            ),
        ));

        parent::_initialize($config);

        $this->getService('anahita:language')->load('com_tags');
    }
675818
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'toolbars' => array($this->getIdentifier()->name, 'menubar', 'actorbar'),
        ));

        parent::_initialize($config);
    }
728745
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'max_upload_limit' => (int) ini_get('upload_max_filesize'),
        ));

        parent::_initialize($config);

        $config->append(array(
            'behaviors' => to_hash(array(
                'com:search.controller.behavior.searchable',
                'com:stories.controller.behavior.publisher',
                'com:notifications.controller.behavior.notifier',
                'followable',
                'administrable',
                'ownable',
                'privatable',
                'enablable',
                'verifiable',
                'subscribable',
                'com:hashtags.controller.behavior.hashtagable',
                'com:locations.controller.behavior.geolocatable',
                'coverable',
            )),
        ));

        $this->getService('anahita:language')->load('com_actors');
    }
1318038
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'command_chain'     => null,
            'event_dispatcher'  => null,
            'dispatch_events'   => true,
            'event_priority'    => AnCommand::PRIORITY_LOWEST,
            'enable_callbacks'  => false,
            'callback_priority' => AnCommand::PRIORITY_HIGH,
        ));
        
        parent::_initialize($config);
    }
666602
protected function _initialize(AnConfig $config)
    {
        $child = clone $this->_parent;

        $child->name = AnInflector::singularize($config->name);

        $config->append(array(
            'entityset' => 'anahita:domain.entityset.onetomany',
            'cardinality' => 'many',
            'child_key' => $this->_parent->name,
            'parent_delete' => AnDomain::DELETE_CASCADE,
            'child' => $child,
        ));

        parent::_initialize($config);
    }
905026
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'enable' => true,
            'priority' => AnCommand::PRIORITY_LOWEST,
        ));

        parent::_initialize($config);
    }
895612
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'attributes' => array(
                'access' => array(
                    'default' => get_config_value('people.access', self::GUEST)
                ),
                'permissions' => array(
                    'type' => 'json',
                    'default' => 'json',
                    'write' => 'private'
                ),
            ),
        ));

        parent::_initialize($config);
    }
348516
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'cache_file' => ANPATH_CACHE.'/'.basename($this->_file).'.'.md5($this->_file),
        ));

        parent::_initialize($config);
    }