Initializes the options for the object.

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

@param 	object 	An optional AnConfig object with configuration options.
194258
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'readonly' => false,
            'enabled' => true,
            'token' => null,
            'version' => '1.0',
            'scope' => array(),
            'consumer' => new ComConnectOauthConsumer(new AnConfig()),
            'response_format' => 'json',
            'api_url' => '',
            'request_token_url' => '',
            'access_token_url' => '',
            'authenticate_url' => '',
            'authorize_url' => '',
        ));

        parent::_initialize($config);
    }
1198733
public function setConfig(AnConfig $config)
    {
        parent::setConfig($config);

        $this->_entityset = $config->entityset;
        $this->_cardinality = $config->cardinality;

        if (is_numeric($this->_cardinality)) {
            $this->_cardinality = (int) $this->_cardinality;
        }

        $this->_delete_rule = $config->parent_delete;
        $this->_child_key = $config->child_key;
    }
464448
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'resources' => array('people_people'),
            'attributes' => array(
                'administratingIds' => array(
                    'type' => 'set',
                    'default' => 'set'
                ),
                'alias' => array(
                    'key' => true,
                    'format' => 'username'
                ),
                'givenName',
                'familyName',
                'username' => array(
                    'key' => true,
                    'format' => 'username'
                ),
                'email',
                'password' => array(
                    'format' => 'password'
                ),
                'usertype',
                'gender',
                'lastVisitDate' => array(
                    'default' => 'date'
                ),
                'activationCode'
            ),
            'aliases' => array(
                'registrationDate' => 'creationTime'
            ),
            'behaviors' => to_hash(array(
                //@todo if viewer is admin, then make email searchable too
                'describable' => array(
                    'searchable_properties' => array(
                        'givenName',
                        'familyName',
                        'username',
                        'email'
                    )
                ),
                'administrator',
                'notifiable',
                'leadable'
            )),
        ));

        $config->behaviors->append(array(
            'followable' => array('subscribe_after_follow' => false)
        ));

        parent::_initialize($config);

        AnHelperArray::unsetValues($config->behaviors, array('administrable'));
    }
909110
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'options' => array(),
            'charset' => 'UTF-8',
            'table_prefix' => 'an_',
            'table_needle' => '#__',
            'command_chain' => $this->getService('anahita:command.chain'),
            'dispatch_events' => true,
            'event_dispatcher' => $this->getService('anahita:event.dispatcher'),
            'enable_callbacks' => false,
            'connection' => null,
        ));

        parent::_initialize($config);
    }
405249
protected function _initialize(AnConfig $config)
    {
        $permission = clone $this->getIdentifier();
        $permission->path = array($permission->path[0], 'permission');
        register_default(array('identifier' => $permission, 'prefix' => $this));

        $config->append(array(
            'behaviors' => array($permission),
            'request' => array('format' => 'html'),
        ))->append(array(
            'view' => $config->request->get ? $config->request->get : ($config->request->view ? $config->request->view : $this->getIdentifier()->name),
        ));

        parent::_initialize($config);
    }
1038884
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'resources' => array('subscriptions_packages'),
            'attributes' => array(
                'name' => array('required' => true),
                'body' => array('format' => 'html'),
                'price' => array(
                    'type' => 'float',
                    'required' => true,
                ),
                'duration' => array(
                    'type' => 'integer',
                    'required' => true,
                ),
                'recurring' => array(
                    'type' => 'integer',
                    'default' => 0,
                ),
                'billingPeriod' => array(
                    'default' => self::BILLING_PERIOD_YEAR,
                    'required' => true,
                ),
            ),
            'relationships' => array(
                //let the cleaner to take care of it
                'subscriptions' => array(
                    'parent_delete' => 'ignore',
                 ),
            ),
            'behaviors' => array(
                'authorizer',
                'orderable',
                'describable',
                'enableable',
                'dictionariable',
                'modifiable',
            ),
        ));

        parent::_initialize($config);
    }
504281
protected function _initialize(AnConfig $config)
    {
        $count = count($this->getIdentifier()->path);

        $config->append(array(
            'path' => '',
            'filename' => $this->getIdentifier()->path[$count - 1].'.'.$this->getIdentifier()->name,
            'disposition' => 'attachment',
        ));

        parent::_initialize($config);
    }
587604
protected function _initialize(AnConfig $config)
    {
        $base_url = AnRequest::base();
        $settings = $this->getService('com:settings.setting');

        if (PHP_SAPI == 'cli' && $settings->live_site != '') {
            $scheme = is_ssl() ? 'https://' : 'http://';
            $base_url = $scheme.$settings->live_site;
        }

        $config->append(array(
            'base_url' => $base_url,
            'test_options' => array(
                'enabled' => get_config_value('mailer.debug', false),
                'email' => get_config_value('mailer.redirect_email'),
                'log' => $settings->tmp_path . '/emails/',
            ),
            'template_view' => null,
        ));

        parent::_initialize($config);
    }
342259
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'behaviors' => array(
                'assignable' => array(
                    'assignment_option' => ComComponentsDomainBehaviorAssignable::OPTION_NOT_OPTIONAL,
                    'actor_identifiers' => array('com:people.domain.entity.person'),
                ),
            ),
        ));

        parent::_initialize($config);
    }
55624
protected function _initialize(ObjectConfig $config)
    {
        $config->append(array(
            'priority' => self::PRIORITY_LOWEST,
        ));

        parent::_initialize($config);
    }
338966
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'asset_paths' => array(ANPATH_THEMES.'/'.AnService::get('application')->getTemplate().'/media'),
        ));

        parent::_initialize($config);
    }
375107
protected function _initialize(AnConfig $config)
    {
        $settings = $this->getService('com:settings.setting');

        $config->append(array(
    		'charset' => 'utf-8',
            'maxLineLength' => 900,
            'priority' => self::PRIORITY_NORMAL,
            'contentType' => 'text/html',
            'site_settings' => $settings
        ))->append(array(
            'mailer' => $settings->mailer
        ));

        parent::_initialize($config);
    }
912389
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'viewer' => $this->getService('com:people.viewer'),
            'language' => 'com_'.$this->getIdentifier()->package,
            'behaviors' => to_hash('com:application.controller.behavior.message'),
        ));

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

        parent::_initialize($config);
    }
201926
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'send_after_insert' => !get_config_value('notifications.use_cron', false),
        ));

        parent::_initialize($config);
    }
19601
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'enabled' => AnRequest::format() != 'json' && $config->mixer->isDispatched(),
        ));

        parent::_initialize($config);
    }
974783
protected function _initialize(AnConfig $config)
    {
        $config->append(array(
            'priority' => AnCommand::PRIORITY_LOWEST,
            'validator' => $this->_repository->getIdentifier()->name,
        ));

        parent::_initialize($config);
    }