當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。