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


PHP type::getAttribute方法代码示例

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


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

示例1: _create

 /**
  * Cria os arquivos do CRUD
  * 
  * @param type $profile
  * @param type $table
  * @param type $adapter
  * @param type $module
  * @param type $overwrite
  * @throws Zend_Tool_Project_Provider_Exception 
  */
 private function _create($profile, $table, $adapter, $module, $overwrite)
 {
     $this->_registry->getRequest()->isPretend();
     $this->_print(' Criando CRUD ');
     $this->_print(' table: ' . $table . ' | adapter : ' . $adapter . ' | module: ' . $module);
     $table = strtolower($table);
     $module = strtolower($module);
     $path = $profile->getAttribute('projectDirectory');
     $dirModules = $path . '/application/configs/modules';
     if (!is_dir($dirModules)) {
         mkdir($dirModules);
     }
     $dirModule = $dirModules . '/' . $module;
     if (!is_dir($dirModule)) {
         mkdir($dirModule);
     }
     $fileName = $dirModule . '/' . $table . '.php';
     if (!file_exists($fileName)) {
         throw new Zend_Tool_Project_Provider_Exception('Para executar essa ação é necessário criar o arquivo ' . $fileName);
     }
     $config = (require $fileName);
     $this->_print(' Criando Tables ');
     ZendT_Tool_Crud_Table::create($path, $config);
     $this->_print(' Criando Mappers ');
     ZendT_Tool_Crud_Mapper::create($path, $config);
     $this->_print(' Criando MapperView ');
     ZendT_Tool_Crud_MapperView::create($path, $config);
     $this->_print(' Criando Element ');
     ZendT_Tool_Crud_Element::create($path, $config);
     $this->_print(' Criando Form ');
     ZendT_Tool_Crud_Form::create($path, $config);
     $this->_print(' Criando Controller ');
     ZendT_Tool_Crud_Controller::create($path, $config, $overwrite);
     $this->_print(' Criando Service ');
     ZendT_Tool_Crud_Service::create($path, $config);
     $this->_print(' Criando Language ');
     ZendT_Tool_Crud_Language::create($path, $config);
     $this->_print(' Criando Bootstrap ');
     ZendT_Tool_Crud_Bootstrap::create($path, $config);
     $this->_print(' Criando View ');
     ZendT_Tool_Crud_View::create($path, $config);
 }
开发者ID:rtsantos,项目名称:mais,代码行数:52,代码来源:CrudTProvider.php

示例2: isDateDMY

 /**
  * check if this date has any date qualifiers. Return true if no date qualifiers are found.
  * 
  * @param type $fact
  * @return boolean
  */
 private function isDateDMY($fact)
 {
     if ($fact && !preg_match('/^(FROM|BET|TO|AND|BEF|AFT|CAL|EST|INT|ABT) (.+)/', $fact->getAttribute('DATE'))) {
         return true;
     }
 }
开发者ID:bxbroze,项目名称:webtrees,代码行数:12,代码来源:FancyTreeviewClass.php

示例3: render

 /**
  * TODO: Create this description
  * 
  * @param type $model
  * @return string 
  */
 public function render($model)
 {
     //$array = $model->getAttributes($this->_modelFormatType);
     /**
      * The extract function makes the array keys available as variables in the current function scope.
      * we need this for the eval functoion.
      * 
      * example $array = array('name'=>'Pete'); becomes $name='Pete';
      * 
      * In the column definition we can supply a format like this:
      * 
      * 'format'=>'$name'
      */
     //extract($array);
     extract($this->_extraVars);
     if (isset($this->_format)) {
         $result = '';
         if ($this->_format != '') {
             eval('$result=' . $this->_format . ';');
         }
         return $result;
     } elseif (isset($model->{$this->_dataindex})) {
         if ($model instanceof \GO\Base\Db\ActiveRecord) {
             return $model->getAttribute($this->_dataindex, $this->_modelFormatType);
         }
         return $model->{$this->_dataindex};
     } else {
         return "";
     }
 }
开发者ID:ajaboa,项目名称:crmpuan,代码行数:36,代码来源:Column.php

示例4: getElementComponentContent

 /**
  * 
  * @param type $component
  * @param type $content
  * @return type
  */
 static function getElementComponentContent($component, $type, $content)
 {
     if ($component->getAttribute('bearcms-internal-attribute-container') === 'none') {
         return $content;
     }
     $attributes = '';
     if ($component->editable === 'true') {
         $htmlElementID = 'brelc' . md5($component->id);
         ElementsHelper::$editorData[] = ['element', $component->id, self::getComponentContextData($component), $type];
         $attributes .= ' id="' . $htmlElementID . '"';
     }
     return '<div' . $attributes . '>' . $content . '</div>';
 }
开发者ID:bearcms,项目名称:bearframework-addon,代码行数:19,代码来源:ElementsHelper.php

示例5: buildOptionValue

 /**
  * Returns option value with associated disabled flag
  *
  * @param type $node
  *
  * @return array
  */
 private function buildOptionValue($node)
 {
     $option = array();
     $defaultValue = isset($node->nodeValue) && !empty($node->nodeValue) ? $node->nodeValue : '1';
     $option['value'] = $node->hasAttribute('value') ? $node->getAttribute('value') : $defaultValue;
     $option['disabled'] = $node->hasAttribute('disabled') && $node->getAttribute('disabled') == 'disabled';
     return $option;
 }
开发者ID:rusli-nasir,项目名称:ERP_Accounting_Indonesia,代码行数:15,代码来源:ChoiceFormField.php

示例6: retrieveClassesForElement

 /**
  * Retrieves classes for element
  *
  * @param type $element NodeElement
  *
  * @return array without t_ already
  */
 private function retrieveClassesForElement($element)
 {
     $classes = $element->getAttribute('class');
     $matches = array();
     preg_match_all('/t_([a-zA-Z0-9\\_]+)/', $classes, $matches);
     return $matches[1];
 }
开发者ID:n-educatio,项目名称:testbundle,代码行数:14,代码来源:HookHarvester.php


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