PHPEclipse.net : New XDebug CVS modules

Christian Perkonig worked the last weeks on a new debugger for PHP. It uses the XDebug library.

The following CVS modules contain the XDebug plugins

PHPEclipseがCVS上ではXDebugに対応し始めてるらしいです。 dbgでも動作は十分ですけどXDebugの方がmagumaも採用してるしメジャーっぽい気がします。 何よりdbgは対応バージョンが4.3.10で眠っ(略)

怠惰なテンプレライブラリRaw Template Engineを更新しました。

Raw Template Engine 0.2

更新点:

  • プラグインによる拡張機能追加

大層な新機能ですが実際は・・・

テンプレ:

<html>
<head>
<title><?=$title?></title>
</head>

<body>
<h1><?=$title?><h1>
<hr />
<h2>Methods</h2>
<ul>
<?foreach ($methods as $method):?>
    <li><?=$method?></li>
<?endforeach;?>
</ul>
<h2>Directories</h2>
<ul>
    <li>
        plugins/
        <ul>
            <li>html_options.php</li>
            <li>html_radios.php</li>
        </ul>
    </li>
    <li>
        templates/
        <ul>
            <li>index.php</li>
        </ul>
    </li>
    <li>index.php</li>
</ul>
<h2>Plugins</h2>
<ul>
    <li><?html_options("html_options", $plugins)?></li>
    <li><?html_radios("html_radios", $plugins)?></li>
</ul>
</body>
</html>

PHP:

<?php
include_once("Raw.php");

$raw =& new Raw();
$raw->assign("title", "Raw Template Engine");
$raw->assign("methods", array("assign", "assign_by_ref", "fetch", "display"));
$raw->assign("plugins", array(1 => "html_options", 2 => "html_radios"));
$raw->display("index.php");

ライブラリ:

<?php
//
// Raw Template Engine - the template engine using raw php.
//
// Copyright (C) 2005 Masaki Komagata <komagata@p0t.jp> 
//     All rights reserved.
//     This is free software with ABSOLUTELY NO WARRANTY.
//
// You can redistribute it and/or modify it under the terms of 
// the PHP License, version 3.0.
//
class Raw {
    var $template_dir = "templates/";
    var $plugin_dir = "plugins/";
    var $template_vars = array();
    function assign($name, $value) { $this->template_vars[$name] = $value; }
    function assign_by_ref($name, &$value) { $this->template_vars[$name] =& $value; }
    function display($template) { echo $this->fetch($template); }
    function fetch($template) {
        $this->_load_plugins();
        extract($this->template_vars);
        ob_start();
        include($this->template_dir.$template);
        $result = ob_get_contents();
        ob_end_clean();
        return $result;
    }
    function _load_plugins() {
        if (is_dir($this->plugin_dir) and ($dh = opendir($this->plugin_dir))) {
            while (($file = readdir($dh)) !== false) @include_once($this->plugin_dir.$file);
            closedir($dh);
        }
    }
}

表示:

raw-0.2.png

ただの関数をsmartyプラグインみたいに見せてるだけです!

Php Phrasebook
  • Php Phrasebook
  • Sams(2005-09-02)
  • (著)Christian Wenz
  • 定価:¥ 1,746
  • 新品価格:¥ 1,484
  • ASIN:0672328178

PHPのフレーズブック! 表紙怖過ぎだけど注文しました。まったく前評判調べてないので届くのが楽しみ!

↓他のサイトでの説明。

The PHP Phrasebook is actually a pocket guide that is jam-packed with useful and essential PHP code ””phrases”” for the PHP developer’s everyday use. The code is flexible, so it can be easily adapted to your needs and mulitple situations, and your time isn’t wasted wading through chapters of tutorial lessons and extraneous information.

ZDNet Japan Blog – 八田真行のオープンソース考現学

「はった」と読むということを初めて知る。

Zopeジャンキー日記 :Webのターニング・ポイントをとらえた重要文献、ティム・オライリーの 「Web 2.0とは何か」

「Web 2.0とは何か?」という議論がバズ(Buzz)的にひろがっているのを受けて(例)、言いだしっぺの本家、ティム・オライリーによる論文「Web 2.0とは何か」が出た。

サラッとまとまっていて分かりやすい。

よくきたblog – php.s3.toのマニュアルが新しくなってる

参考リンクいれるとランク上げに貢献するのでしません(何 とりあえず今年の5月,おそらく公式サイトにあるものを使用しているのでしょう.

php.s3.toのマニュアル問題がちょっと改善した模様! 笑った。

何が良いのかあまり共感を呼び辛いかもしれませんが、テンプレートエンジンを作りました。

Raw Template Engine 0.1

特徴:

  • 新しいテンプレ文法覚えたくない → テンプレがPHP
  • 新しい使い方覚えたくない → Smartyと使い方(メソッド)が同じ
  • chmodしたくない → キャッシュしない(一時ファイルを作らない)
  • 複雑なものは使いたくない → 15行

という後ろ向きなライブラリです。下記、使い方です。

テンプレ:

<html>
<head>
<title><?=$title?></title>
</head>

<body>
<h1><?=$title?><h1>
<hr />
<h2>Methods</2>
<ul>
<?foreach ($methods as $method):?>
    <li><?=$method?></li>
<?endforeach;?>
</ul>
</body>
</html>

PHP:

<?php
include_once("Raw.php");

$raw =& new Raw();
$raw->assign("title", "Raw Template Engine");
$raw->assign("methods", array("assign", "assign_by_ref", "fetch", "display"));
$raw->display("index.php");

ライブラリ:

<?php
//
// Raw Template Engine - the template engine using raw php.
//
// Copyright (C) 2005 Masaki Komagata <komagata@p0t.jp> 
//     All rights reserved.
//     This is free software with ABSOLUTELY NO WARRANTY.
//
// You can redistribute it and/or modify it under the terms of 
// the PHP License, version 3.0.
//
class Raw {
    var $template_dir = "templates/";
    var $template_vars = array();
    function assign($name, $value) { $this->template_vars[$name] = $value; }
    function assign_by_ref($name, &$value) { $this->template_vars[$name] =& $value; }
    function display($template) { echo $this->fetch($template); }
    function fetch($template) {
        extract($this->template_vars);
        ob_start();
        include($this->template_dir.$template);
        $result = ob_get_contents();
        ob_end_clean();
        return $result;
    }
}

表示:

raw.png

賢明なみなさまのこと、一瞥しただけで全てが把握できたことでしょう。
やっつけ仕事や組み込み用途に!

MovableTyep 3.2日本語版にアップデートしました。 管理画面がやたらこなれてます。

MySQLの1テーブル1インデックス問題(勝手に名づけました)が気になってしょうがない! 何故なら「MySQLモデリング」というのが根本的なレベルで存在するとしたら嫌だからです。

yohgaki’s blog – 不自由なWebサイト

「Night Crawler」と呼ばれるシステムでクロールして未登録サイトを見付けて閉鎖させているようです。

大陸ではNight Crawlerが未登録サイトを見つけては閉鎖!((((((;゚Д゚))))))