當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Data::Get方法代碼示例

本文整理匯總了PHP中Data::Get方法的典型用法代碼示例。如果您正苦於以下問題:PHP Data::Get方法的具體用法?PHP Data::Get怎麽用?PHP Data::Get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Data的用法示例。


在下文中一共展示了Data::Get方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Log

 public function Log()
 {
     $Filename = sprintf('%s_%s', (new \DateTime('now', new \DateTimeZone('GMT')))->format('Y-m-d'), $this->GetType());
     $Log = \Data::Get($Filename, true, false, array($this->LogDirectory));
     if (empty($Log) || !is_array($Log)) {
         $Log = array();
     }
     $Log[] = $this;
     return \Data::Set($Filename, $Log, true, true, array($this->LogDirectory));
 }
開發者ID:RhuanGonzaga,項目名稱:WhatsBot,代碼行數:10,代碼來源:Message.php

示例2: LoadPreview

 private function LoadPreview()
 {
     if (method_exists($this, 'GetPreview')) {
         $Filename = \FileManager::GetFilename($this->File);
         if (!empty($this->PreviewFilenameSuffix)) {
             $Filename .= '.' . $this->PreviewFilenameSuffix;
         }
         $Filename .= '.jpg';
         $Preview = \Data::Get($Filename, false, false, array($this->MediaDirectory));
         if (!empty($Preview)) {
             if (empty($this->Preview)) {
                 $this->Preview = $Preview;
             }
             return true;
         } elseif (!empty($this->Preview)) {
             return \Data::Set($Filename, $this->Preview, false, true, array($this->MediaDirectory));
         }
     }
     return false;
 }
開發者ID:RhuanGonzaga,項目名稱:WhatsBot,代碼行數:20,代碼來源:MediaMessage.php

示例3:

    <tr>
    <td style="text-align: center"><input title="Remove size from this material" type=button value="-" onclick="NotReady();"></td>
    <td><?php 
        echo $n + 1;
        ?>
</td>
    <td><?php 
        echo Data::Get('current_material', 'fraction_in', $n);
        ?>
</td>
    <td><?php 
        echo Data::Get('current_material', 'decimal_in', $n);
        ?>
</td>
    <td><?php 
        echo Data::Get('current_material', 'millimeters', $n);
        ?>
</td>
    </tr>
<?php 
    }
} else {
    ?>
  <tr>
    <td colspan="999" style="text-align: center">None found</td>
  </tr>
<?php 
}
?>
  <table>
    <!-- ============ END Sizes by Material ============ -->
開發者ID:donsmoore,項目名稱:ballcalc,代碼行數:31,代碼來源:view_sizes_materials.php

示例4: str_pad

    echo Data::Get('all_materials', 'balls_per_kilo', $n);
    ?>
'></td>
    <td><input id="id_<?php 
    echo str_pad(Data::Get('all_materials', 'id', $n), 2, '0', STR_PAD_LEFT);
    ?>
_page_link" readonly="readonly" type="text" style="width: 510px; background: none; border: 0; " value='<?php 
    echo Data::Get('all_materials', 'page_link', $n);
    ?>
'></td>
    <td style="background-color: white;">
      <input id="id_<?php 
    echo str_pad(Data::Get('all_materials', 'id', $n), 2, '0', STR_PAD_LEFT);
    ?>
_save"   type=button title="Save"      value="Save"   onclick="SaveMaterial();" style="display: none">&nbsp;
      <input id="id_<?php 
    echo str_pad(Data::Get('all_materials', 'id', $n), 2, '0', STR_PAD_LEFT);
    ?>
_cancel" type=button title="Cancel"    value="Cancel" onclick="CancelMaterial();" style="display: none">&nbsp;
    </td>
    </tr>
<?php 
}
?>
  </table>
<!-- ============ END Materials ============ -->

</div>

<?php 
include 'javascript.js.php';
開發者ID:donsmoore,項目名稱:ballcalc,代碼行數:31,代碼來源:view_materials.php

示例5:

      <br>&nbsp;&nbsp;Materials Available for size: <?php 
echo Data::GetData('all_sizes', 'fraction_in', 'id', $this->GetQs('size'));
?>
&nbsp;<br><br>

      <?php 
if (Data::GetRowCount('current_size') > 0) {
    ?>
      <?php 
    for ($n = 0; $n < Data::GetRowCount('current_size'); $n++) {
        ?>
          &nbsp;&nbsp;<a href="<?php 
        echo Data::Get('current_size', 'page_link', $n);
        ?>
"><?php 
        echo Data::Get('current_size', 'material', $n);
        ?>
</a><br>
      <?php 
    }
    ?>
      <?php 
} else {
    ?>
        &nbsp;&nbsp;None found for size
      <?php 
}
?>

    </div>
開發者ID:donsmoore,項目名稱:ballcalc,代碼行數:30,代碼來源:view_default.php

示例6: str_pad

    echo Data::Get('all_sizes', 'one_ball_weight_ounce', $n);
    ?>
'></td>
    <td><input id="id_<?php 
    echo str_pad(Data::Get('all_sizes', 'id', $n), 2, '0', STR_PAD_LEFT);
    ?>
_one_ball_weight_gram" readonly="readonly" type="text" style="width: 120px; background: none; border: 0; " value='<?php 
    echo Data::Get('all_sizes', 'one_ball_weight_gram', $n);
    ?>
'></td>
    <td style="background-color: white;">
      <input id="id_<?php 
    echo str_pad(Data::Get('all_sizes', 'id', $n), 2, '0', STR_PAD_LEFT);
    ?>
_save"   type=button title="Save"      value="Save"   onclick="SaveSize();" style="display: none">&nbsp;
      <input id="id_<?php 
    echo str_pad(Data::Get('all_sizes', 'id', $n), 2, '0', STR_PAD_LEFT);
    ?>
_cancel" type=button title="Cancel"    value="Cancel" onclick="CancelSize();" style="display: none">&nbsp;
    </td>
    </tr>
<?php 
}
?>
  </table>
<!-- ============ END Sizes ============ -->

</div>

<?php 
include 'javascript.js.php';
開發者ID:donsmoore,項目名稱:ballcalc,代碼行數:31,代碼來源:view_sizes.php


注:本文中的Data::Get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。