• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP eZINI类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中eZINI的典型用法代码示例。如果您正苦于以下问题:PHP eZINI类的具体用法?PHP eZINI怎么用?PHP eZINI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了eZINI类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getBlockConfiguration

 public function getBlockConfiguration()
 {
     $iniFile = new \eZINI('block.ini', 'extension/ezflow/settings', null, false, true);
     foreach (self::$configs as $config) {
         $iniFile->parseFile(self::$path . '/' . $config);
     }
     return $iniFile->getNamedArray();
 }
开发者ID:ezsystems,项目名称:ezflow-migration-toolkit,代码行数:8,代码来源:Wrapper.php


示例2: setUp

 public function setUp()
 {
     parent::setUp();
     ezpINIHelper::setINISetting('site.ini', 'SearchSettings', 'AllowEmptySearch', 'enabled');
     ezpINIHelper::setINISetting('site.ini', 'RegionalSettings', 'SiteLanguageList', array('eng-GB'));
     $this->findINI = eZINI::instance('ezfind.ini');
     $this->findINI->loadCache(true);
     $this->solrSearch = new eZSolr();
     $this->object = new ezpObject('folder', 2);
     $this->object->name = 'foo';
     $this->object->publish();
     $this->object->addNode(43);
     // Add a location under Media node
     $this->solrSearch->addObject($this->object->object);
 }
开发者ID:netbliss,项目名称:ezfind,代码行数:15,代码来源:ezsolr_regression.php


示例3: updateDebugSettings

 /**
  * Initializes/updates debug settings, system wide
  */
 public function updateDebugSettings()
 {
     $ini = eZINI::instance();
     $debugSettings = array();
     $debugSettings['debug-enabled'] = ($ini->variable('DebugSettings', 'DebugOutput') == 'enabled' and $this->restINI->variable('DebugSettings', 'Debug') == 'enabled');
     $debugSettings['debug-by-ip'] = $ini->variable('DebugSettings', 'DebugByIP') == 'enabled';
     $debugSettings['debug-ip-list'] = $ini->variable('DebugSettings', 'DebugIPList');
     $logList = $ini->variable('DebugSettings', 'AlwaysLog');
     $logMap = array('notice' => eZDebug::LEVEL_NOTICE, 'warning' => eZDebug::LEVEL_WARNING, 'error' => eZDebug::LEVEL_ERROR, 'debug' => eZDebug::LEVEL_DEBUG, 'strict' => eZDebug::LEVEL_STRICT);
     $debugSettings['always-log'] = array();
     foreach ($logMap as $name => $level) {
         $debugSettings['always-log'][$level] = in_array($name, $logList);
     }
     eZDebug::updateSettings($debugSettings);
 }
开发者ID:jordanmanning,项目名称:ezpublish,代码行数:18,代码来源:debug.php


示例4: requestToken

 public function requestToken($Account)
 {
     $NGPushIni = eZINI::instance('ngpush.ini');
     $ConsumerKey = $NGPushIni->variable($Account, 'ConsumerKey');
     $ConsumerSecret = $NGPushIni->variable($Account, 'ConsumerSecret');
     $AccessToken = $NGPushIni->variable($Account, 'AccessToken');
     $AccessTokenSecret = $NGPushIni->variable($Account, 'AccessTokenSecret');
     // If access tokens are given
     if ($AccessToken && $AccessTokenSecret) {
         // Save request signing tokens to cache
         ngPushBase::save_token($Account, $AccessToken, 'request_sign_oauth_token');
         ngPushBase::save_token($Account, $AccessTokenSecret, 'request_sign_oauth_token_secret');
         ngPushBase::save_token($Account, $AccessToken . '%%%' . $AccessTokenSecret, 'main_token');
     } else {
         $connection = new TwitterOAuth($ConsumerKey, $ConsumerSecret);
         $connection->host = "https://api.twitter.com/1.1/";
         $AdministrationUrl = '/';
         eZURI::transformURI($AdministrationUrl, false, 'full');
         $AdministrationUrl = base64_encode($AdministrationUrl);
         $SettingsBlock = base64_encode($Account);
         $temporary_credentials = $connection->getRequestToken('http://' . $NGPushIni->variable('PushNodeSettings', 'ConnectURL') . '/redirect.php/' . $AdministrationUrl . '/' . $SettingsBlock . '?case=twitter');
         // Save request signing tokens to cache
         ngPushBase::save_token($Account, $temporary_credentials['oauth_token'], 'request_sign_oauth_token');
         ngPushBase::save_token($Account, $temporary_credentials['oauth_token_secret'], 'request_sign_oauth_token_secret');
         $redirect_url = $connection->getAuthorizeURL($temporary_credentials, FALSE);
         self::$response['RequestPermissionsUrl'] = $redirect_url;
     }
 }
开发者ID:netgen,项目名称:ngpush,代码行数:28,代码来源:ngpush_twitter_base.php


示例5: initialize

 function initialize($params = array())
 {
     eZExchangeRatesUpdateHandler::initialize($params);
     $shopINI = eZINI::instance('shop.ini');
     if (!isset($params['ServerName'])) {
         $params['ServerName'] = '';
         if ($shopINI->hasVariable('ECBExchangeRatesSettings', 'ServerName')) {
             $params['ServerName'] = $shopINI->variable('ECBExchangeRatesSettings', 'ServerName');
         }
     }
     if (!isset($params['ServerPort'])) {
         $params['ServerPort'] = '';
         if ($shopINI->hasVariable('ECBExchangeRatesSettings', 'ServerPort')) {
             $params['ServerPort'] = $shopINI->variable('ECBExchangeRatesSettings', 'ServerPort');
         }
     }
     if (!isset($params['RatesURI'])) {
         $params['RatesURI'] = '';
         if ($shopINI->hasVariable('ECBExchangeRatesSettings', 'RatesURI')) {
             $params['RatesURI'] = $shopINI->variable('ECBExchangeRatesSettings', 'RatesURI');
         }
     }
     if (!isset($params['BaseCurrency'])) {
         // the ECB returns currencies against 'EUR'
         $params['BaseCurrency'] = 'EUR';
     }
     $this->setServerName($params['ServerName']);
     $this->setServerPort($params['ServerPort']);
     $this->setRatesURI($params['RatesURI']);
     $this->setBaseCurrency($params['BaseCurrency']);
 }
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:31,代码来源:ezecbhandler.php


示例6: display

    function display()
    {
        // Get site templates from setup.ini
        $config = eZINI::instance( 'setup.ini' );
        $thumbnailBase = $config->variable( 'SiteTemplates', 'ThumbnailBase' );
        $thumbnailExtension = $config->variable( 'SiteTemplates', 'ThumbnailExtension' );

        $site_templates = array();

        $packages = eZPackage::fetchPackages( array( 'path' => 'kernel/setup/packages' ) );
        foreach( $packages as $key => $package )
        {
            $site_templates[$key]['name'] = $package->attribute( 'summary' );
            $site_templates[$key]['identifier'] = $package->attribute( 'name' );
            $thumbnails = $package->thumbnailList( 'default' );
            if ( count( $thumbnails ) > 0 )
                $site_templates[$key]['image_file_name'] = $package->fileItemPath( $thumbnails[0], 'default', 'kernel/setup/packages' );
            else
                $site_templates[$key]['image_file_name'] = false;
        }

        $this->Tpl->setVariable( 'site_templates', $site_templates );
        $this->Tpl->setVariable( 'error', $this->Error );

        // Return template and data to be shown
        $result = array();
        // Display template
        $result['content'] = $this->Tpl->fetch( 'design:setup/init/site_templates.tpl' );
        $result['path'] = array( array( 'text' => ezpI18n::tr( 'design/standard/setup/init',
                                                          'Site template selection' ),
                                        'url' => false ) );
        return $result;

    }
开发者ID:robinmuilwijk,项目名称:ezpublish,代码行数:34,代码来源:ezstep_site_templates.php


示例7: create

 static function create($user_id)
 {
     $config = eZINI::instance('site.ini');
     $dateTime = time();
     $row = array('id' => null, 'title' => ezpI18n::tr('kernel/pdfexport', 'New PDF Export'), 'show_frontpage' => 1, 'intro_text' => '', 'sub_text' => '', 'source_node_id' => 0, 'export_structure' => 'tree', 'export_classes' => '', 'site_access' => '', 'pdf_filename' => 'file.pdf', 'modifier_id' => $user_id, 'modified' => $dateTime, 'creator_id' => $user_id, 'created' => $dateTime, 'status' => 0, 'version' => 1);
     return new eZPDFExport($row);
 }
开发者ID:CG77,项目名称:ezpublish-legacy,代码行数:7,代码来源:ezpdfexport.php


示例8: getInstance

 /**
  * Get singleton instance for filter
  * @param string $filterID
  * @return eZFindExtendedAttributeFilterInterface|false
  */
 public static function getInstance($filterID)
 {
     if (!isset(self::$instances[$filterID])) {
         try {
             if (!self::$filtersList) {
                 $ini = eZINI::instance('ezfind.ini');
                 self::$filtersList = $ini->variable('ExtendedAttributeFilters', 'FiltersList');
             }
             if (!isset(self::$filtersList[$filterID])) {
                 throw new Exception($filterID . ' extended attribute filter is not defined');
             }
             $className = self::$filtersList[$filterID];
             if (!class_exists($className)) {
                 throw new Exception('Could not find class ' . $className);
             }
             $instance = new $className();
             if (!$instance instanceof eZFindExtendedAttributeFilterInterface) {
                 throw new Exception($className . ' is not a valid eZFindExtendedAttributeFilterInterface');
             }
             self::$instances[$filterID] = $instance;
         } catch (Exception $e) {
             eZDebug::writeWarning($e->getMessage(), __METHOD__);
             self::$instances[$filterID] = false;
         }
     }
     return self::$instances[$filterID];
 }
开发者ID:kevindejour,项目名称:ezfind,代码行数:32,代码来源:ezfindextendedattributefilterfactory.php


示例9: lazyDbHelper

    protected static function lazyDbHelper()
    {
        $dbMapping = array( 'ezmysqli' => 'mysql',
                            'ezmysql' => 'mysql',
                            'mysql' => 'mysql',
                            'mysqli' => 'mysql',
                            'postgresql' => 'pgsql',
                            'ezpostgresql' => 'pgsql',
                            'ezoracle' => 'oracle',
                            'oracle' => 'oracle' );

        $ini = eZINI::instance();
        list( $dbType, $dbHost, $dbPort, $dbUser, $dbPass, $dbName ) =
            $ini->variableMulti( 'DatabaseSettings',
                                 array( 'DatabaseImplementation', 'Server', 'Port',
                                        'User', 'Password', 'Database',
                                       )
                                );

        if ( !isset( $dbMapping[$dbType] ) )
        {
            // @TODO: Add a proper exception type here.
            throw new Exception( "Unknown / unmapped DB type '$dbType'" );
        }

        $dbType = $dbMapping[$dbType];

        $dsnHost = $dbHost . ( $dbPort != '' ? ":$dbPort" : '' );
        $dsnAuth = $dbUser . ( $dbPass != '' ? ":$dbPass" : '' );
        $dsn = "{$dbType}://{$dbUser}:{$dbPass}@{$dsnHost}/{$dbName}";

        return $dsn;
    }
开发者ID:sushilbshinde,项目名称:ezpublish-study,代码行数:33,代码来源:lazy.php


示例10: execute

 function execute($process, $event)
 {
     $ini = eZINI::instance('workflow.ini');
     $cost = $ini->variable("SimpleShippingWorkflow", "ShippingCost");
     $description = $ini->variable("SimpleShippingWorkflow", "ShippingDescription");
     $parameters = $process->attribute('parameter_list');
     if (isset($parameters['order_id'])) {
         $orderID = $parameters['order_id'];
         $order = eZOrder::fetch($orderID);
         $orderItems = $order->attribute('order_items');
         $addShipping = true;
         foreach ($orderItems as $orderItem) {
             if ($orderItem->attribute('type') == 'ezsimpleshipping') {
                 $addShipping = false;
                 break;
             }
         }
         if ($addShipping) {
             $productCollection = $order->attribute('productcollection');
             $orderCurrency = $productCollection->attribute('currency_code');
             $cost = eZShopFunctions::convertAdditionalPrice($orderCurrency, $cost);
             $orderItem = new eZOrderItem(array('order_id' => $orderID, 'description' => $description, 'price' => $cost, 'type' => 'ezsimpleshipping'));
             $orderItem->store();
         }
     }
     return eZWorkflowType::STATUS_ACCEPTED;
 }
开发者ID:mugoweb,项目名称:ezpublish-legacy,代码行数:27,代码来源:ezsimpleshippingtype.php


示例11: store

 /**
  * Create a scheduled script that will store the modification made to an eZContentClass.
  *
  * @param eZContentClass Content class to be stored.
  * @param array[eZContentClassAttribute] Attributes of the new content class.
  * @param array Unordered view parameters
  */
 public function store(eZContentClass $class, array $attributes, array &$unorderedParameters)
 {
     $script = eZScheduledScript::create('syncobjectattributes.php', eZINI::instance('ezscriptmonitor.ini')->variable('GeneralSettings', 'PhpCliCommand') . ' extension/ezscriptmonitor/bin/' . eZScheduledScript::SCRIPT_NAME_STRING . ' -s ' . eZScheduledScript::SITE_ACCESS_STRING . ' --classid=' . $class->attribute('id'));
     $script->store();
     $unorderedParameters['ScheduledScriptID'] = $script->attribute('id');
     $class->storeVersioned($attributes, eZContentClass::VERSION_STATUS_MODIFIED);
 }
开发者ID:netbliss,项目名称:ezscriptmonitor,代码行数:14,代码来源:ezcontentclasseditdeferredhandler.php


示例12: checkRecurrenceCondition

 function checkRecurrenceCondition($newsletter)
 {
     if (!$newsletter->attribute('recurrence_condition')) {
         return true;
     }
     if (0 < count($this->conditionExtensions)) {
         foreach ($this->conditionExtensions as $conditionExtension) {
             // TODO: Extend to ask multiple condition extensions to allow more complex checks
             $siteINI = eZINI::instance();
             $siteINI->loadCache();
             $extensionDirectory = $siteINI->variable('ExtensionSettings', 'ExtensionDirectory');
             $extensionDirectories = eZDir::findSubItems($extensionDirectory);
             $directoryList = eZExtension::expandedPathList($extensionDirectories, 'condition_handler');
             foreach ($directoryList as $directory) {
                 $handlerFile = $directory . '/' . strtolower($conditionExtension) . 'handler.php';
                 // we only check one extension for now
                 if ($conditionExtension === $newsletter->attribute('recurrence_condition') && file_exists($handlerFile)) {
                     include_once $handlerFile;
                     $className = $conditionExtension . 'Handler';
                     if (class_exists($className)) {
                         $impl = new $className();
                         // Ask if condition is fullfilled
                         return $impl->checkCondition($newsletter);
                     } else {
                         eZDebug::writeError("Class {$className} not found. Unable to verify recurrence condition. Blocked recurrence.");
                         return false;
                     }
                 }
             }
         }
     }
     // If we have a condition but no match we prevent the sendout
     eZDebug::writeError("Newsletter recurrence condition '" . $newsletter->attribute('recurrence_condition') . "' extension not found ");
     return false;
 }
开发者ID:EVE-Corp-Center,项目名称:ECC-Website,代码行数:35,代码来源:ezrecurrence.php


示例13: instance

 /**
  * Returns a shared instance of the eZNotificationTransport class.
  *
  *
  * @param string|false $transport Uses notification.ini[TransportSettings]DefaultTransport if false
  * @param bool $forceNewInstance
  * @return eZNotificationTransport
  */
 static function instance($transport = false, $forceNewInstance = false)
 {
     $ini = eZINI::instance('notification.ini');
     if ($transport == false) {
         $transport = $ini->variable('TransportSettings', 'DefaultTransport');
     }
     $transportImpl =& $GLOBALS['eZNotificationTransportGlobalInstance_' . $transport];
     $class = $transportImpl !== null ? strtolower(get_class($transportImpl)) : '';
     $fetchInstance = false;
     if (!preg_match('/.*?transport/', $class)) {
         $fetchInstance = true;
     }
     if ($forceNewInstance) {
         $fetchInstance = true;
     }
     if ($fetchInstance) {
         $extraPluginPathArray = $ini->variable('TransportSettings', 'TransportPluginPath');
         $pluginPathArray = array_merge(array('kernel/classes/notification/'), $extraPluginPathArray);
         foreach ($pluginPathArray as $pluginPath) {
             $transportFile = $pluginPath . $transport . 'notificationtransport.php';
             if (file_exists($transportFile)) {
                 include_once $transportFile;
                 $className = $transport . 'notificationtransport';
                 $impl = new $className();
                 break;
             }
         }
     }
     if (!isset($impl)) {
         $impl = new eZNotificationTransport();
         eZDebug::writeError('Transport implementation not supported: ' . $transport, __METHOD__);
     }
     return $impl;
 }
开发者ID:jordanmanning,项目名称:ezpublish,代码行数:42,代码来源:eznotificationtransport.php


示例14: sendMail

 function sendMail(eZMail $mail)
 {
     $ini = eZINI::instance();
     $sendmailOptions = '';
     $emailFrom = $mail->sender();
     $emailSender = $emailFrom['email'];
     if (!$emailSender || count($emailSender) <= 0) {
         $emailSender = $ini->variable('MailSettings', 'EmailSender');
     }
     if (!$emailSender) {
         $emailSender = $ini->variable('MailSettings', 'AdminEmail');
     }
     if (!eZMail::validate($emailSender)) {
         $emailSender = false;
     }
     $isSafeMode = ini_get('safe_mode');
     if ($isSafeMode and $emailSender and $mail->sender() == false) {
         $mail->setSenderText($emailSender);
     }
     $filename = time() . '-' . mt_rand() . '.mail';
     $data = preg_replace('/(\\r\\n|\\r|\\n)/', "\r\n", $mail->headerText() . "\n" . $mail->body());
     $returnedValue = eZFile::create($filename, 'var/log/mail', $data);
     if ($returnedValue === false) {
         eZDebug::writeError('An error occurred writing the e-mail file in var/log/mail', __METHOD__);
     }
     return $returnedValue;
 }
开发者ID:EVE-Corp-Center,项目名称:ECC-Website,代码行数:27,代码来源:ezfiletransport.php


示例15: push

 public function push($Account, $TwitterStatus)
 {
     $NGPushIni = eZINI::instance('ngpush.ini');
     $Token = self::getToken($Account);
     if (!$Token) {
         self::requestToken($Account);
         $Token = self::getToken($Account);
     }
     if ($Token) {
         $tokenCredentials = explode('%%%', $Token);
         $connection = new TwitterOAuth($NGPushIni->variable($Account, 'ConsumerKey'), $NGPushIni->variable($Account, 'ConsumerSecret'), $tokenCredentials[0], $tokenCredentials[1]);
         $connection->host = "https://api.twitter.com/1.1/";
         $TwitterResponse = $connection->post('statuses/update', array('status' => $TwitterStatus));
         self::$response['response'] = $TwitterResponse;
         //Let's analyize some Twitter JSON response (lots of data but no clear structure and no status)
         if ($TwitterResponse->error) {
             self::$response['status'] = 'error';
             self::$response['messages'][] = $TwitterResponse->error;
         } elseif ($TwitterResponse->errors) {
             self::$response['status'] = 'error';
             foreach ($TwitterResponse->errors as $TwitterResponseError) {
                 self::$response['messages'][] = $TwitterResponseError->message;
             }
         } else {
             self::$response['status'] = 'success';
             if ($TwitterResponse->created_at) {
                 self::$response['messages'][] = 'Status is published!';
             }
         }
     } else {
         self::$response['status'] = 'error';
         self::$response['messages'][] = 'You need access token to use this application with Twitter.';
     }
     return self::$response;
 }
开发者ID:netgen,项目名称:ngpush,代码行数:35,代码来源:ngpush_twitter_status.php


示例16: initializeTopNodes

 function initializeTopNodes($package, $http, $step, &$persistentData, $tpl, $module)
 {
     if (!isset($persistentData['top_nodes_map'])) {
         $persistentData['top_nodes_map'] = array();
         $rootDOMNode = $this->rootDOMNode();
         $topNodeListNode = $rootDOMNode->getElementsByTagName('top-node-list')->item(0);
         $ini = eZINI::instance('content.ini');
         $defaultPlacementNodeID = $ini->variable('NodeSettings', 'RootNode');
         $defaultPlacementNode = eZContentObjectTreeNode::fetch($defaultPlacementNodeID);
         $defaultPlacementName = $defaultPlacementNode->attribute('name');
         foreach ($topNodeListNode->getElementsByTagName('top-node') as $topNodeDOMNode) {
             $persistentData['top_nodes_map'][(string) $topNodeDOMNode->getAttribute('node-id')] = array('old_node_id' => $topNodeDOMNode->getAttribute('node-id'), 'name' => $topNodeDOMNode->textContent, 'new_node_id' => $defaultPlacementNodeID, 'new_parent_name' => $defaultPlacementName);
         }
     }
     foreach (array_keys($persistentData['top_nodes_map']) as $topNodeArrayKey) {
         if ($http->hasPostVariable('BrowseNode_' . $topNodeArrayKey)) {
             eZContentBrowse::browse(array('action_name' => 'SelectObjectRelationNode', 'description_template' => 'design:package/installers/ezcontentobject/browse_topnode.tpl', 'from_page' => '/package/install', 'persistent_data' => array('PackageStep' => $http->postVariable('PackageStep'), 'InstallerType' => $http->postVariable('InstallerType'), 'InstallStepID' => $http->postVariable('InstallStepID'), 'ReturnBrowse_' . $topNodeArrayKey => 1)), $module);
         } else {
             if ($http->hasPostVariable('ReturnBrowse_' . $topNodeArrayKey) && !$http->hasPostVariable('BrowseCancelButton')) {
                 $nodeIDArray = $http->postVariable('SelectedNodeIDArray');
                 if ($nodeIDArray != null) {
                     $persistentData['top_nodes_map'][$topNodeArrayKey]['new_node_id'] = $nodeIDArray[0];
                     $contentNode = eZContentObjectTreeNode::fetch($nodeIDArray[0]);
                     $persistentData['top_nodes_map'][$topNodeArrayKey]['new_parent_name'] = $contentNode->attribute('name');
                 }
             }
         }
     }
     $tpl->setVariable('top_nodes_map', $persistentData['top_nodes_map']);
 }
开发者ID:brookinsconsulting,项目名称:ezecosystem,代码行数:30,代码来源:ezcontentobjectpackageinstaller.php


示例17: modify

 function modify(&$tpl, &$operatorName, &$operatorParameters, &$rootNamespace, &$currentNamespace, &$operatorValue, &$namedParameters)
 {
     switch ($operatorName) {
         case 'recaptcha_get_html':
             include_once 'extension/recaptcha/classes/recaptchalib.php';
             // Retrieve the reCAPTCHA public key from the ini file
             $ini = eZINI::instance('recaptcha.ini');
             $key = $ini->variable('Keys', 'PublicKey');
             if (is_array($key)) {
                 $hostname = eZSys::hostname();
                 if (isset($key[$hostname])) {
                     $key = $key[$hostname];
                 } else {
                     // try our luck with the first entry
                     $key = array_shift($key);
                 }
             }
             // check if the current user is able to bypass filling in the captcha and
             // return nothing so that no captcha is displayed
             $currentUser = eZUser::currentUser();
             $accessAllowed = $currentUser->hasAccessTo('recaptcha', 'bypass_captcha');
             if ($accessAllowed["accessWord"] == 'yes') {
                 $operatorValue = 'User bypasses CAPTCHA';
             } else {
                 // Run the HTML generation code from the reCAPTCHA PHP library
                 $operatorValue = recaptcha_get_html($key);
             }
             break;
     }
 }
开发者ID:landinsicht,项目名称:ezpublish-recaptcha,代码行数:30,代码来源:recaptchatemplateoperator.php


示例18: eZSimplifiedXMLInput

 function eZSimplifiedXMLInput(&$xmlData, $aliasedType, $contentObjectAttribute)
 {
     $this->eZXMLInputHandler($xmlData, $aliasedType, $contentObjectAttribute);
     $this->IsInputValid = true;
     $this->ContentObjectAttribute = $contentObjectAttribute;
     $contentIni = eZINI::instance('content.ini');
 }
开发者ID:odnarb,项目名称:ezpublish-legacy,代码行数:7,代码来源:ezsimplifiedxmlinput.php


示例19: __construct

 /**
  * Constructor
  *
  * If provided with $filePath, will use this file for further operations.
  * If not given, the file* methods must be used instead
  *
  * @param string $filePath Path of the file to handle
  *
  * @throws eZDBNoConnectionException DB connection failed
  */
 function __construct($filePath = false)
 {
     if (self::$nonExistantStaleCacheHandling === null) {
         $fileINI = eZINI::instance('file.ini');
         self::$nonExistantStaleCacheHandling = $fileINI->variable("ClusteringSettings", "NonExistantStaleCacheHandling");
         unset($fileINI);
     }
     // DB Backend init
     if (self::$dbbackend === null) {
         self::$dbbackend = eZExtension::getHandlerClass(new ezpExtensionOptions(array('iniFile' => 'file.ini', 'iniSection' => 'eZDFSClusteringSettings', 'iniVariable' => 'DBBackend')));
         self::$dbbackend->_connect(false);
         $fileINI = eZINI::instance('file.ini');
         if ($fileINI->variable('ClusterEventsSettings', 'ClusterEvents') === 'enabled' && self::$dbbackend instanceof eZClusterEventNotifier) {
             $listener = eZExtension::getHandlerClass(new ezpExtensionOptions(array('iniFile' => 'file.ini', 'iniSection' => 'ClusterEventsSettings', 'iniVariable' => 'Listener', 'handlerParams' => array(new eZClusterEventLoggerEzdebug()))));
             if ($listener instanceof eZClusterEventListener) {
                 self::$dbbackend->registerListener($listener);
                 $listener->initialize();
             }
         }
     }
     if ($filePath !== false) {
         $filePath = self::cleanPath($filePath);
         eZDebugSetting::writeDebug('kernel-clustering', "dfs::ctor( '{$filePath}' )");
     } else {
         eZDebugSetting::writeDebug('kernel-clustering', "dfs::ctor()");
     }
     $this->filePath = $filePath;
 }
开发者ID:CG77,项目名称:ezpublish-legacy,代码行数:38,代码来源:ezdfsfilehandler.php


示例20: operationIsAvailable

 /**
  * Checks if a trigger is defined in worklow.ini/[OperationSettings]/AvailableOperations
  *
  * @param string $name
  * @return boolean true if the operation is available, false otherwise
  */
 public static function operationIsAvailable($name)
 {
     $workflowINI = eZINI::instance('workflow.ini');
     $operationList = $workflowINI->variableArray('OperationSettings', 'AvailableOperations');
     $operationList = array_unique(array_merge($operationList, $workflowINI->variable('OperationSettings', 'AvailableOperationList')));
     return in_array($name, $operationList) || in_array("before_{$name}", $operationList) || in_array("after_{$name}", $operationList);
 }
开发者ID:nlescure,项目名称:ezpublish,代码行数:13,代码来源:ezoperationhandler.php



注:本文中的eZINI类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP eZInformationCollection类代码示例发布时间:2022-05-23
下一篇:
PHP eZIEImageToolResize类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap