当前位置: 首页>>代码示例>>PHP>>正文


PHP Container::init方法代码示例

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


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

示例1: __construct

 public function __construct($app)
 {
     $this->app = $app;
     $this->container = new Container();
     $this->defineEnv($this->container);
     $this->defineApp();
     $this->container->init();
     Profile::Checkpoint('Container has been Created');
 }
开发者ID:natxet,项目名称:operacore,代码行数:9,代码来源:Bootstrap.php

示例2: MenuItem

 /**
  * Public constructor
  *
  * @param    string   $value  The Name (title)
  * @param    string   $action The action to execute when it gets a mouse click
  * @param    strng    $icon   If you want to add an image to the MenuItem
  * @access   public
  */
 function MenuItem($value, $action = '', $icon = '')
 {
     $this->_value = $value;
     $this->_action = $action;
     $this->_icon = $icon;
     $this->childs = array();
     parent::init();
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:16,代码来源:MenuItem.php

示例3: FieldSet

 /**
  * Public constructor
  *
  * @access   public
  */
 function FieldSet($legend = '')
 {
     $this->_name = 'fieldset' . rand(1, 100);
     $this->_direction = 'horizontal';
     $this->_legendID = '';
     $this->setLegend($legend);
     parent::init();
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:13,代码来源:FieldSet.php

示例4: ViewPort

 /**
  * Public Constructor
  *
  * @param  string    $id     ID of the viewport
  * @param  string    $width  Width of the viewport
  * @param  string    $height Height of the Viewport
  * @access public
  */
 function ViewPort($id = 'viewport', $width = 300, $height = 150)
 {
     $this->_id = $id;
     $this->_width = $width;
     $this->_height = $height;
     if (empty($this->_id)) {
         $this->_id = 'viewport_' . rand(1, 100);
     }
     parent::init();
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:18,代码来源:ViewPort.php

示例5: MenuBar

 /**
  * Public constructor
  *
  * @param    string   $id   The ID of the div that will have the menubar.
  *                          if you are using another menubar, you should give it another ID and
  *                          another CSS sheet!
  * @access   public
  */
 function MenuBar($id = 'menubar')
 {
     $this->_id = $id;
     $this->_paths = array();
     $this->_class = 'ddmx';
     if (empty($this->_id)) {
         die("Menubar should have an id!");
     }
     parent::init();
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:18,代码来源:MenuBar.php

示例6: DataGridCapture

 function DataGridCapture($numrows, $numcolumns, $titles, $gadget, $action, $entry_type, $caption = '', $id = '')
 {
     $this->_name = 'datagridcapture';
     $this->_class = 'datagrid';
     $this->_columns = array();
     $this->_caption = $caption;
     $this->_actionColumns = array();
     $this->_data = array();
     if (empty($id)) {
         $this->_id = 'datagridcapture_' . rand(1, 100);
     } else {
         $this->_id = $id;
     }
     /*if (is_array($data)) {
           $this->_data = $data;
       } else {
           die("beh!");
       }
       */
     $this->setOddColor('#eee');
     $this->setEvenColor('#fff');
     for ($id = 0; $id < $numrows; $id++) {
         $idtext = $this->_id . '_' . $id;
         $keyField1 = new Entry('name_' . $idtext, str_replace('"', '&quot;', ''));
         #$keyField->setStyle('background: transparent;border-style: solid; border: 10px;');
         $keyField1->setStyle('border-style: solid; border: 10px;');
         $keyField1->setEnabled(true);
         $keyField1->setSize(30);
         $data[$id]['key'] = $keyField1->get();
         $keyField2 = new Entry('value_' . $idtext, str_replace('"', '&quot;', ''));
         $keyField2->setStyle('background: transparent; border: 1px;');
         $keyField2->setEnabled(true);
         $keyField2->setSize(30);
         $data[$id]['value'] = $keyField2->get();
         $data[$id]['action'] = '<a OnClick="javascript: if(confirm(\'Are this values correct?\')) { window.location=\'?gadget=' . $gadget . '&action=' . $action . '&id=' . $id . '&key=\'+document.getElementById(\'' . $keyField1->getID() . '\').value+\'&value=\'+document.getElementById(\'' . $keyField2->getID() . '\').value+\'&entry_type=' . $entry_type . '\';}"><img id="imgcat' . $id . '" src="images/stock/save.png" border="0" alt="" /></a>';
     }
     parent::init();
     foreach ($titles as $t) {
         $this->addColumn(new Column(_("{$t}"), "{$t}", true));
     }
     $this->addData($data);
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:42,代码来源:DataGridCapture.php

示例7: foreach

 /**
  * Main Constructor
  *
  * @access  public
  * @param   string  $gadget Gadget name
  * @param   string  $name   Name of editor
  * @param   string  $value  Default content of editor
  * @param   string  $label  Label/Title of editor
  * @return  void
  */
 function Jaws_Widgets_CKEditor($gadget, $name, $value = '', $label = '')
 {
     require_once JAWS_PATH . 'include/Jaws/String.php';
     $value = str_replace('&lt;', '&amp;lt;', $value);
     $value = str_replace('&gt;', '&amp;gt;', $value);
     $this->_Name = $name;
     $this->_Value = $value;
     $this->_Gadget = $gadget;
     // set toolbar options
     if (JAWS_SCRIPT == 'admin') {
         $toolbars = $GLOBALS['app']->Registry->fetch('editor_ckeditor_backend_toolbar', 'Settings');
     } else {
         $toolbars = $GLOBALS['app']->Registry->fetch('editor_ckeditor_frontend_toolbar', 'Settings');
     }
     $toolbars = array_filter(explode('|', $toolbars));
     foreach ($toolbars as $key => $items) {
         $items = array_values(array_filter(explode(',', $items)));
         if (!empty($items)) {
             $this->toolbars[] = $items;
         }
     }
     $this->TextArea =& Piwi::CreateWidget('TextArea', $this->_Name, $this->_Value);
     $this->TextArea->setClass($name);
     $this->TextArea->setID($this->_Name);
     $this->TextArea->setName($this->_Name);
     $this->_Label =& Piwi::CreateWidget('Label', $label, $this->TextArea);
     $this->_BasePath = 'libraries/ckeditor/';
     $this->_Language = $GLOBALS['app']->GetLanguage();
     $this->_Direction = _t('GLOBAL_LANG_DIRECTION');
     $this->_Container =& Piwi::CreateWidget('Division');
     $this->_Container->setClass('jaws_editor');
     parent::init();
 }
开发者ID:uda,项目名称:jaws,代码行数:43,代码来源:CKEditor.php

示例8:

 /**
  * Main Constructor
  *
  * @access  public
  * @param   string  $gadget
  * @param   string  $name
  * @param   string  $value
  * @param   string  $label
  * @return  void
  */
 function Jaws_Widgets_TinyMCE($gadget, $name, $value = '', $label = '')
 {
     require_once JAWS_PATH . 'include/Jaws/String.php';
     //$value = Jaws_String::AutoParagraph($value);
     $value = str_replace('&lt;', '&amp;lt;', $value);
     $value = str_replace('&gt;', '&amp;gt;', $value);
     $this->_Name = $name;
     $this->_Value = $value;
     $this->_Gadget = $gadget;
     if (JAWS_SCRIPT == 'admin') {
         $this->toolbars[] = $GLOBALS['app']->Registry->fetch('editor_tinymce_backend_toolbar', 'Settings');
     } else {
         $this->toolbars[] = $GLOBALS['app']->Registry->fetch('editor_tinymce_frontend_toolbar', 'Settings');
     }
     $this->TextArea =& Piwi::CreateWidget('TextArea', $name, $this->_Value, '', '14');
     $this->_Label =& Piwi::CreateWidget('Label', $label, $this->TextArea);
     $this->setClass($name);
     $this->_Container =& Piwi::CreateWidget('Division');
     $this->_Container->SetClass('jaws_editor');
     parent::init();
 }
开发者ID:uda,项目名称:jaws,代码行数:31,代码来源:TinyMCE.php

示例9: container

 /**
  * Makes and IoC-container, that is: gives more functionality to a class with typehinting
  *
  * @param string $class    name of the class
  * @param string $method   name of the method
  * @param array  $args     arguments for this specify method
  * @param array  $main     arguments for the sub-methods
  *
  * @return mixed the result of the selected/created object
  */
 public static function container($class, $method = null, $args = [], $main = [])
 {
     return Container::init($class, $method, $args, $main);
 }
开发者ID:wijnandmet,项目名称:Foundation,代码行数:14,代码来源:app.php

示例10: Form

 /**
  * Public constructor
  *
  * @param    string  $action Action to use
  * @param    string  $method Method to use
  * @param    string  $encoding Encoding to use
  * @param    string  $id     Id of the form
  *
  * @access   public
  */
 function Form($action, $method = 'get', $encoding = '', $id = '')
 {
     $this->_action = $action;
     $this->_method = strtolower($method);
     $this->_hiddenItems = array();
     $this->_shouldValidate = false;
     $this->_customValidate = false;
     $this->encodeUrl(false);
     $this->setEncodingType($encoding);
     $this->setTableClass('tableform');
     if (empty($id)) {
         $this->_id = 'form_' . rand(1, 100);
     } else {
         $this->_id = $id;
     }
     parent::init();
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:27,代码来源:Form.php

示例11:

 /**
  * Main Constructor
  *
  * @access  public
  * @param   $gadget
  * @param   $name
  * @param   string  $value
  * @param   string  $label
  * @return  void
  */
 function Jaws_Widgets_TextArea($gadget, $name, $value = '', $label = '')
 {
     $this->_Name = $name;
     $this->_Value = $value;
     $this->_Gadget = $gadget;
     $this->_ToolbarControl =& Piwi::CreateWidget('Toolbar');
     $this->_ToolbarControl->SetID('toolbar_' . $name);
     $this->TextArea =& Piwi::CreateWidget('TextArea', $name, $value);
     $this->TextArea->SetClass('xx-large');
     $this->_Label =& Piwi::CreateWidget('Label', $label, $this->TextArea);
     $this->_Container =& Piwi::CreateWidget('Division');
     $this->_Container->SetClass('jaws_editor');
     $this->_Container->AddFile('include/Jaws/Resources/TextArea.js');
     parent::init();
     $this->setID($name);
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:26,代码来源:TextArea.php

示例12: DataGrid

 /**
  * Public constructor
  *
  * @param   array   $data  Datagrid Data
  * @param   string  $caption Caption of the DataGrid
  * @param   string  $id    Id of the DataGrid
  * @access  public
  */
 function DataGrid($data, $caption = '', $id = '')
 {
     $this->_columns = array();
     $this->_caption = $caption;
     $this->_actionColumns = array();
     $this->_data = array();
     $this->_pagerLabels = array('first' => 'First', 'prev' => 'Previous', 'next' => 'Next', 'last' => 'Last');
     $this->_class = Piwi::getVarConf('DATAGRID_CLASS_CSS');
     if (empty($this->_class)) {
         $this->_class = 'datagrid';
     }
     $this->_actionLabel = Piwi::getVarConf('DATAGRID_ACTION_LABEL');
     if (empty($this->_actionLabel)) {
         $this->_actionLabel = 'Actions';
     }
     $this->_actionStyle = '';
     $this->_pagerSize = Piwi::getVarConf('DATAGRID_PAGER_PAGEBY');
     if (empty($this->_pagerSize)) {
         $this->_pagerSize = 10;
     }
     if (empty($id)) {
         $this->_id = 'datagrid_' . rand(1, 100);
     } else {
         $this->_id = $id;
     }
     if (is_array($data)) {
         $this->_data = $data;
     } else {
         die("The data provided to " . $this->getId() . " is not an array.");
     }
     $oddColor = Piwi::getVarConf('COLOR_ODD');
     if (empty($oddColor)) {
         $oddColor = '#edf3fe';
     }
     $this->setOddColor($oddColor);
     $evenColor = Piwi::getVarConf('COLOR_EVEN');
     if (empty($evenColor)) {
         $evenColor = '#fff';
     }
     $this->setEvenColor($evenColor);
     $this->addData($data);
     $pagerMode = Piwi::getVarConf('DATAGRID_PAGER_MODE');
     $pagerFirstAction = Piwi::getVarConf('DATAGRID_PAGER_FIRSTACTION');
     $pagerPrevAction = Piwi::getVarConf('DATAGRID_PAGER_PREVACTION');
     $pagerNextAction = Piwi::getVarConf('DATAGRID_PAGER_NEXTACTION');
     $pagerLastAction = Piwi::getVarConf('DATAGRID_PAGER_LASTACTION');
     $pagerGotoAction = Piwi::getVarConf('DATAGRID_PAGER_GOTOACTION');
     if (!empty($pagerMode)) {
         if (defined($pagerMode)) {
             $pagerMode = constant($pagerMode);
         }
         $this->usePager($pagerMode);
     }
     $this->setAction('first', $pagerFirstAction);
     $this->setAction('prev', $pagerPrevAction);
     $this->setAction('next', $pagerNextAction);
     $this->setAction('last', $pagerLastAction);
     $this->setAction('goto', $pagerGotoAction);
     $firstLabel = Piwi::getVarConf('DATAGRID_PAGER_LABEL_FIRST');
     if (!empty($firstLabel)) {
         $this->setLabelString('first', $firstLabel);
     }
     $prevLabel = Piwi::getVarConf('DATAGRID_PAGER_LABEL_PREV');
     if (!empty($prevLabel)) {
         $this->setLabelString('prev', $prevLabel);
     }
     $nextLabel = Piwi::getVarConf('DATAGRID_PAGER_LABEL_NEXT');
     if (!empty($nextLabel)) {
         $this->setLabelString('next', $nextLabel);
     }
     $lastLabel = Piwi::getVarConf('DATAGRID_PAGER_LABEL_LAST');
     if (!empty($lastLabel)) {
         $this->setLabelString('last', $lastLabel);
     }
     $this->_dataActions['onLoading'] = Piwi::getVarConf('DATAGRID_DATA_ONLOADING');
     $this->_dataActions['onLoaded'] = Piwi::getVarConf('DATAGRID_DATA_ONLOADED');
     parent::init();
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:86,代码来源:DataGrid.php

示例13: Toolbar

 /**
  * Public constructor
  *
  * @access public
  */
 function Toolbar()
 {
     parent::init();
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:9,代码来源:Toolbar.php


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