cvs: phpdoc /ja/functions mhash.xml ming.xml misc.xml mnogosearch.xml msql.xml mssql.xml mysql.xml network.xml
| From: | Rui Hirokawa | Date: | Sat, 26 Jan 2002 08:55:52 +0000 |
| Subject: | cvs: phpdoc /ja/functions mhash.xml ming.xml misc.xml mnogosearch.xml msql.xml mssql.xml mysql.xml network.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969341628@lists.php.net to get a copy of this message | ||
hirokawa Sat Jan 26 03:55:52 2002 EDT
Modified files:
/phpdoc/ja/functions mhash.xml ming.xml misc.xml mnogosearch.xml
msql.xml mssql.xml mysql.xml network.xml
Log:
fixed typos and changed script code based on php notation rule.
Index: phpdoc/ja/functions/mhash.xml diff -u phpdoc/ja/functions/mhash.xml:1.10 phpdoc/ja/functions/mhash.xml:1.11 --- phpdoc/ja/functions/mhash.xml:1.10 Wed Dec 12 15:53:18 2001 +++ phpdoc/ja/functions/mhash.xml Sat Jan 26 03:55:51 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.11 $ --> <reference id="ref.mhash"> <title>Mhash颿°</title> <titleabbrev>mhash</titleabbrev> @@ -29,30 +30,35 @@ <example> <title>MD5ãã¤ã¸ã§ã¹ãã¨hmacãè¨ç®ãã16鲿°ã§åºåãã</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $input = "what do ya want for nothing?"; $hash = mhash (MHASH_MD5, $input); -print "The hash is ".bin2hex ($hash)."\n<br>"; +print "The hash is ".bin2hex ($hash)."<br />\n"; $hash = mhash (MHASH_MD5, $input, "Jefe"); -print "The hmac is ".bin2hex ($hash)."\n<br>"; -?> +print "The hmac is ".bin2hex ($hash)."<br />\n"; +?> +]]> </programlisting> - </example> - ãã®ä¾ã®åºåã¯æ¬¡ã®ããã«ãªãã¾ãã - <programlisting> + <para> + ãã®ä¾ã®åºåã¯æ¬¡ã®ããã«ãªãã¾ãã + <screen> +<![CDATA[ The hash is d03cb659cbf9192dcd066272249f8412 The hmac is 750c783e6ab0b503eaa86e310a5db738 - </programlisting> - ãµãã¼ããããããã·ã¥ã®å®å ¨ãªãªã¹ãã«ã¤ãã¦ã¯ãmhashã®ããã¥ã¡ã³ãã - åç §ä¸ããã - PHPããç¹å®ã®ããã·ã¥ã¢ã«ã´ãªãºã ã«ã¢ã¯ã»ã¹ããã«ã¯ããMHASH_ããã·ã¥åã - ãæå®ãã¾ããä¾ãã°ãTIGERã«ã¢ã¯ã»ã¹ããã«ã¯ãPHP宿° MHASH_TIGER - ã使ç¨ãã¾ãã +]]> + </screen> + </para> + </example> + ãµãã¼ããããããã·ã¥ã®å®å ¨ãªãªã¹ãã«ã¤ãã¦ã¯ãmhashã®ããã¥ã¡ + ã³ããåç §ä¸ãããPHPããç¹å®ã®ããã·ã¥ã¢ã«ã´ãªãºã ã«ã¢ã¯ã»ã¹ã + ãã«ã¯ããMHASH_ããã·ã¥åããæå®ãã¾ããä¾ãã°ãTIGERã«ã¢ã¯ã» + ã¹ããã«ã¯ãPHP宿° MHASH_TIGERã使ç¨ãã¾ãã </para> <para> 以ä¸ã«ç¾å¨mhashã«ãããµãã¼ãããã¦ããããã·ã¥ã®ä¸è¦§ã示ãã¾ãã - mhashã«ãµãã¼ãããã¦ããããã·ã¥ãããã®ãªã¹ãã«ãªãå ´åã¯ã - ãã®ããã¥ã¡ã³ããå¤ãã¨ä»®å®ãã¦ä¸ããã + mhashã«ãµãã¼ãããã¦ããããã·ã¥ãããã®ãªã¹ãã«ãªãå ´åã¯ãã + ã®ããã¥ã¡ã³ããå¤ãã¨ä»®å®ãã¦ä¸ããã <itemizedlist> <listitem> <simpara> @@ -139,17 +145,23 @@ <example> <title><function>mhash_get_hash_name</function>ã®ä¾</title> <programlisting> -<?php +<![CDATA[ +<?php $hash = MHASH_MD5; print mhash_get_hash_name ($hash); -?> +?> +]]> </programlisting> + <para> + ä¸ã®ä¾ã®åºåã¯æ¬¡ã®ããã«ãªãã¾ãã + <screen> +<![CDATA[ + MD5 +]]> + </screen> + </para> </example> - ä¸ã®ä¾ã®åºåã¯æ¬¡ã®ããã«ãªãã¾ãã - <programlisting> -MD5 - </programlisting> </para> </refsect1> </refentry> @@ -190,7 +202,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>mhash_count</function></funcdef> - <paramdef>void </paramdef> + <void/> </funcprototype> </funcsynopsis> <para> @@ -201,16 +213,18 @@ <example> <title>å ¨ããã·ã¥ãã«ã¼ããã</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $nr = mhash_count(); -for ($i = 0; $i <= $nr; $i++) { +for ($i = 0; $i <= $nr; $i++) { echo sprintf ("The blocksize of %s is %d\n", - mhash_get_hash_name ($i), - mhash_get_block_size ($i)); + mhash_get_hash_name ($i), + mhash_get_block_size ($i)); } -?> +?> +]]> </programlisting> </example> </para> @@ -240,7 +254,7 @@ <function>mhash</function>ã¯ã<parameter>data</parameter>ã« <parameter>hash</parameter>ã§æå®ããããã·ã¥é¢æ°ãé©ç¨ãã (ãã¤ã¸ã§ã¹ãã¨ãå¼ã°ãã)ããã·ã¥ãè¿ãã¾ãã - <parameter> key</parameter> ãæå®ããã¦ããå ´åãçµæã¨ãã¦HMAC + <parameter>key</parameter> ãæå®ããã¦ããå ´åãçµæã¨ãã¦HMAC ãè¿ããã¾ããHMACã¯ãã¡ãã»ã¼ã¸èªè¨¼æã¯ãã¼ã«åºã¥ãããã·ã¥ãã¾ã ã¯æå®ãããã¼ã«åºã¥ãåãªãã¡ãã»ã¼ã¸ãã¤ã¸ã§ã¹ãã§ããmhashã§ãµ ãã¼ãããã¦ããå ¨ã¦ã®ã¢ã«ã´ãªãºã ãHMACã¢ã¼ãã§ä½¿ç¨ã§ããããã§ Index: phpdoc/ja/functions/ming.xml diff -u phpdoc/ja/functions/ming.xml:1.9 phpdoc/ja/functions/ming.xml:1.10 --- phpdoc/ja/functions/ming.xml:1.9 Wed Dec 12 15:53:19 2001 +++ phpdoc/ja/functions/ming.xml Sat Jan 26 03:55:51 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.10 $ --> <reference id="ref.ming"> <title>Flash ç¨ Ming 颿°</title> <titleabbrev>Ming (flash)</titleabbrev> @@ -66,13 +67,17 @@ <sect2 id="ming.install.php.unix"> <title>PHP (unix) ã«çµã¿è¾¼ã</title> <para> - <literallayout> - mkdir <phpdir>/ext/ming - cp php_ext/* <phpdir>/ext/ming - cd <phpdir> + <informalexample> + <literallayout> +<![CDATA[ + mkdir <phpdir>/ext/ming + cp php_ext/* <phpdir>/ext/ming + cd <phpdir> ./buildconf - ./configure --with-ming <other config options> - </literallayout> + ./configure --with-ming <other config options> +]]> + </literallayout> + </informalexample> PHP ãé常ã¨åæ§ã«æ§ç¯ãã¤ã³ã¹ãã¼ã«ãã¦ä¸ãããå¿ è¦ãªãã° Web ãµã¼ããåèµ·åãã¦ä¸ããã </para> @@ -168,6 +173,90 @@ </itemizedlist> </sect1> </partintro> + + <refentry id='function.ming-setcubicthreshold'> + <refnamediv> + <refname>ming_setcubicthreshold</refname> + <refpurpose> + Set cubic threshold (?) + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>ming_setcubicthreshold</function></funcdef> + <paramdef>int <parameter>threshold</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.ming-setscale'> + <refnamediv> + <refname>ming_setscale</refname> + <refpurpose> + Set scale (?) + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>ming_setscale</function></funcdef> + <paramdef>int <parameter>scale</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.ming-useswfversion'> + <refnamediv> + <refname>ming_useswfversion</refname> + <refpurpose> + Use SWF version (?) + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>ming_useswfversion</function></funcdef> + <paramdef>int <parameter>version</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.swfbutton-keypress'> + <refnamediv> + <refname>swfbutton_keypress</refname> + <refpurpose> + Returns the action flag for keyPress(char) + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>swfbutton_keypress</function></funcdef> + <paramdef>string <parameter>str</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> <!-- SWFMovie --> @@ -183,9 +272,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swfmovie</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie</function> ã¯ãSWFãã¼ã¸ã§ã³4ã ã¼ãã¼å½¢å¼ã§æ°ã ã«ã ã¼ãã¼ãªãã¸ã§ã¯ãã使ãã¾ãã @@ -221,7 +311,7 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfmovie->output</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> <para> @@ -229,9 +319,11 @@ ãã¾ããPHP ã§ã¯ããã®åã«æ¬¡ã®ã³ãã³ããå®è¡ãããã¨ã«ããããã© ã¦ã¶ã«flashã ã¼ãã¼ãåºåããã¾ãã <programlisting role="php"> -<?php +<![CDATA[ +<?php header('Content-type: application/x-shockwave-flash'); -?> +?> +]]> </programlisting> </para> <simpara> @@ -259,6 +351,7 @@ <paramdef>string <parameter>filename</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie->save</function> ã¯ãã ã¼ãã¼ã <parameter>filename</parameter> ã¨ããååã®ãã¡ã¤ã«ã«ä¿åãã¾ãã @@ -323,6 +416,7 @@ <paramdef>ressource <parameter>instance</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie->remove</function> ã¯ã表示ãªã¹ããããªãã¸ã§ ã¯ãã®ã¤ã³ã¹ã¿ã³ã¹ <parameter>instance</parameter>ãåé¤ãã¾ãã @@ -348,6 +442,7 @@ <paramdef>int <parameter>blue</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie->setbackground</function>ã¯èæ¯è²ãè¨å®ãã¾ãã Why is @@ -373,6 +468,7 @@ <paramdef>int <parameter>rate</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>nom_de_la_fonction</function> sets the frame rate to <parameter>rate</parameter>, in frame per seconds. @@ -397,6 +493,7 @@ <paramdef>int <parameter>height</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie->setdimension</function> ã¯ãã ã¼ãã¼ã®å¹ ã <parameter>width</parameter> ã«ãé«ãã @@ -418,6 +515,7 @@ <paramdef>string <parameter>numberofframes</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie->setframes</function> sets the total number of frames in the animation to <parameter>numberofframes</parameter>. @@ -435,9 +533,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfmovie->nextframe</function></funcdef> - <paramdef>void </paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie->setframes</function> moves to the next frame of the animation. @@ -458,6 +557,7 @@ <paramdef>string <parameter>mp3FileName</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie->streammp3</function> streams the mp3 file <parameter>mp3FileName</parameter>. Not very robust in dealing with @@ -476,18 +576,20 @@ <example> <title><function>swfmovie->streammp3</function> ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $m = new SWFMovie(); - $m->setRate(12.0); - $m->streamMp3("distortobass.mp3"); -// use your own MP3 + $m->setRate(12.0); + $m->streamMp3("distortobass.mp3"); + // use your own MP3 // 11.85 seconds at 12.0 fps = 142 frames - $m->setFrames(142); + $m->setFrames(142); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -506,9 +608,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swfdisplayitem</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem</function> creates a new swfdisplayitem object. </para> @@ -545,6 +648,7 @@ <paramdef>int <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->moveto</function> moves the current object to (<parameter>x</parameter>,<parameter>y</parameter>) in global coordinates. @@ -575,6 +679,7 @@ <paramdef>int <parameter>dy</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->move</function> moves the current object by (<parameter>dx</parameter>,<parameter>dy</parameter>) from its @@ -606,6 +711,7 @@ <paramdef>int <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->scaleto</function> scales the current object to (<parameter>x</parameter>,<parameter>y</parameter>) in global coordinates. @@ -636,6 +742,7 @@ <paramdef>int <parameter>dy</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->scale</function> scales the current object by (<parameter>dx</parameter>,<parameter>dy</parameter>) from its @@ -663,9 +770,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->rotateto</function></funcdef> - <paramdef>double <parameter>degrees</parameter></paramdef> + <paramdef>float <parameter>degrees</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->rotateto</function> set the current object rotation to <parameter>degrees</parameter> degrees in global coordinates. @@ -682,15 +790,16 @@ <example> <title><function>swfdisplayitem->rotateto</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $thetext = "ming!"; $f = new SWFFont("Bauhaus 93.fdb"); $m = new SWFMovie(); - $m->setRate(24.0); - $m->setDimension(2400, 1600); - $m->setBackground(0xff, 0xff, 0xff); + $m->setRate(24.0); + $m->setDimension(2400, 1600); + $m->setBackground(0xff, 0xff, 0xff); // functions with huge numbers of arbitrary // arguments are always a good idea! Really! @@ -700,23 +809,23 @@ global $f, $m; $t = new SWFText(); - $t->setFont($f); - $t->setColor($r, $g, $b, $a); - $t->setHeight(960); - $t->moveTo(-($f->getWidth($string))/2, $f->getAscent()/2); - $t->addString($string); + $t->setFont($f); + $t->setColor($r, $g, $b, $a); + $t->setHeight(960); + $t->moveTo(-($f->getWidth($string))/2, $f->getAscent()/2); + $t->addString($string); // we can add properties just like a normal php var, // as long as the names aren't already used. - // e.g., we can't set $i->scale, because that's a function + // e.g., we can't set $i->scale, because that's a function - $i = $m->add($t); - $i->x = $x; - $i->y = $y; - $i->rot = $rot; - $i->s = $scale; - $i->rotateTo($rot); - $i->scale($scale, $scale); + $i = $m->add($t); + $i->x = $x; + $i->y = $y; + $i->rot = $rot; + $i->s = $scale; + $i->rotateTo($rot); + $i->scale($scale, $scale); // but the changes are local to the function, so we have to // return the changed object. kinda weird.. @@ -726,15 +835,15 @@ function step($i) { - $oldrot = $i->rot; - $i->rot = 19*$i->rot/20; - $i->x = (19*$i->x + 1200)/20; - $i->y = (19*$i->y + 800)/20; - $i->s = (19*$i->s + 1.0)/20; - - $i->rotateTo($i->rot); - $i->scaleTo($i->s, $i->s); - $i->moveTo($i->x, $i->y); + $oldrot = $i->rot; + $i->rot = 19*$i->rot/20; + $i->x = (19*$i->x + 1200)/20; + $i->y = (19*$i->y + 800)/20; + $i->s = (19*$i->s + 1.0)/20; + + $i->rotateTo($i->rot); + $i->scaleTo($i->s, $i->s); + $i->moveTo($i->x, $i->y); return $i; } @@ -745,18 +854,19 @@ $i2 = text(0x00, 0x33, 0xff, 0x7f, -560, 1200, 800, 0.04, $thetext); $i3 = text(0xff, 0xff, 0xff, 0x9f, 180, 1200, 800, 0.001, $thetext); - for($i=1; $i<=100; ++$i) + for($i=1; $i<=100; ++$i) { $i1 = step($i1); $i2 = step($i2); $i3 = step($i3); - $m->nextFrame(); + $m->nextFrame(); } header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -776,9 +886,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->rotate</function></funcdef> - <paramdef>double <parameter>ddegrees</parameter></paramdef> + <paramdef>float <parameter>ddegrees</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->rotate</function> rotates the current object by <parameter>ddegrees</parameter> degrees from its current rotation. @@ -805,9 +916,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->skewxto</function></funcdef> - <paramdef>double <parameter>degrees</parameter></paramdef> + <paramdef>float <parameter>degrees</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->skewxto</function> sets the x-skew to <parameter>degrees</parameter>. For <parameter>degrees</parameter> @@ -838,9 +950,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->skewx</function></funcdef> - <paramdef>double <parameter>ddegrees</parameter></paramdef> + <paramdef>float <parameter>ddegrees</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->skewx</function> adds <parameter>ddegrees</parameter> to current x-skew. @@ -869,9 +982,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->skewyto</function></funcdef> - <paramdef>double <parameter>degrees</parameter></paramdef> + <paramdef>float <parameter>degrees</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->skewyto</function> sets the y-skew to <parameter>degrees</parameter>. For <parameter>degrees</parameter> @@ -902,9 +1016,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->skewy</function></funcdef> - <paramdef>double <parameter>ddegrees</parameter></paramdef> + <paramdef>float <parameter>ddegrees</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->skewy</function> adds <parameter>ddegrees</parameter> to current y-skew. @@ -933,7 +1048,7 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->setdepth</function></funcdef> - <paramdef>double <parameter>depth</parameter></paramdef> + <paramdef>float <parameter>depth</parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -962,9 +1077,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->remove</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->remove</function> removes this object from the movie's display list. @@ -994,6 +1110,7 @@ <paramdef>string <parameter>name</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->setname</function> sets the object's name to <parameter>name</parameter>, for targetting with action script. @@ -1018,9 +1135,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->setratio</function></funcdef> - <paramdef>double <parameter>ratio</parameter></paramdef> + <paramdef>float <parameter>ratio</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->setratio</function> sets the object's ratio to <parameter>ratio</parameter>. Obviously only useful for morphs. @@ -1036,63 +1154,65 @@ <example> <title><function>swfdisplayitem->setname</function>ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $p = new SWFMorph(); $g = new SWFGradient(); - $g->addEntry(0.0, 0, 0, 0); - $g->addEntry(0.16, 0xff, 0xff, 0xff); - $g->addEntry(0.32, 0, 0, 0); - $g->addEntry(0.48, 0xff, 0xff, 0xff); - $g->addEntry(0.64, 0, 0, 0); - $g->addEntry(0.80, 0xff, 0xff, 0xff); - $g->addEntry(1.00, 0, 0, 0); - - $s = $p->getShape1(); - $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); - $f->scaleTo(0.05); - $s->setLeftFill($f); - $s->movePenTo(-160, -120); - $s->drawLine(320, 0); - $s->drawLine(0, 240); - $s->drawLine(-320, 0); - $s->drawLine(0, -240); + $g->addEntry(0.0, 0, 0, 0); + $g->addEntry(0.16, 0xff, 0xff, 0xff); + $g->addEntry(0.32, 0, 0, 0); + $g->addEntry(0.48, 0xff, 0xff, 0xff); + $g->addEntry(0.64, 0, 0, 0); + $g->addEntry(0.80, 0xff, 0xff, 0xff); + $g->addEntry(1.00, 0, 0, 0); + + $s = $p->getShape1(); + $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); + $f->scaleTo(0.05); + $s->setLeftFill($f); + $s->movePenTo(-160, -120); + $s->drawLine(320, 0); + $s->drawLine(0, 240); + $s->drawLine(-320, 0); + $s->drawLine(0, -240); $g = new SWFGradient(); - $g->addEntry(0.0, 0, 0, 0); - $g->addEntry(0.16, 0xff, 0, 0); - $g->addEntry(0.32, 0, 0, 0); - $g->addEntry(0.48, 0, 0xff, 0); - $g->addEntry(0.64, 0, 0, 0); - $g->addEntry(0.80, 0, 0, 0xff); - $g->addEntry(1.00, 0, 0, 0); - - $s = $p->getShape2(); - $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); - $f->scaleTo(0.05); - $f->skewXTo(1.0); - $s->setLeftFill($f); - $s->movePenTo(-160, -120); - $s->drawLine(320, 0); - $s->drawLine(0, 240); - $s->drawLine(-320, 0); - $s->drawLine(0, -240); + $g->addEntry(0.0, 0, 0, 0); + $g->addEntry(0.16, 0xff, 0, 0); + $g->addEntry(0.32, 0, 0, 0); + $g->addEntry(0.48, 0, 0xff, 0); + $g->addEntry(0.64, 0, 0, 0); + $g->addEntry(0.80, 0, 0, 0xff); + $g->addEntry(1.00, 0, 0, 0); + + $s = $p->getShape2(); + $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); + $f->scaleTo(0.05); + $f->skewXTo(1.0); + $s->setLeftFill($f); + $s->movePenTo(-160, -120); + $s->drawLine(320, 0); + $s->drawLine(0, 240); + $s->drawLine(-320, 0); + $s->drawLine(0, -240); $m = new SWFMovie(); - $m->setDimension(320, 240); - $i = $m->add($p); - $i->moveTo(160, 120); + $m->setDimension(320, 240); + $i = $m->add($p); + $i->moveTo(160, 120); - for($n=0; $n<=1.001; $n+=0.01) + for($n=0; $n<=1.001; $n+=0.01) { - $i->setRatio($n); - $m->nextFrame(); + $i->setRatio($n); + $m->nextFrame(); } header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1111,20 +1231,21 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->addcolor</function></funcdef> - <paramdef>integer + <paramdef>int <parameter><optional>red</optional></parameter> </paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>green</optional></parameter> </paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>blue</optional></parameter> </paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>a</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->addcolor</function> adds the color to this item's color transform. The color is given in its RGB form. @@ -1148,20 +1269,21 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->multcolor</function></funcdef> - <paramdef>integer + <paramdef>int <parameter><optional>red</optional></parameter> </paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>green</optional></parameter> </paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>blue</optional></parameter> </paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>a</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->multcolor</function> multiplies the item's color transform by the given values. @@ -1178,32 +1300,34 @@ <example> <title><function>swfdisplayitem->multcolor</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $b = new SWFBitmap("backyard.jpg"); // note use your own picture :-) $s = new SWFShape(); - $s->setRightFill($s->addFill($b)); - $s->drawLine($b->getWidth(), 0); - $s->drawLine(0, $b->getHeight()); - $s->drawLine(-$b->getWidth(), 0); - $s->drawLine(0, -$b->getHeight()); + $s->setRightFill($s->addFill($b)); + $s->drawLine($b->getWidth(), 0); + $s->drawLine(0, $b->getHeight()); + $s->drawLine(-$b->getWidth(), 0); + $s->drawLine(0, -$b->getHeight()); $m = new SWFMovie(); - $m->setDimension($b->getWidth(), $b->getHeight()); + $m->setDimension($b->getWidth(), $b->getHeight()); - $i = $m->add($s); + $i = $m->add($s); - for($n=0; $n<=20; ++$n) + for($n=0; $n<=20; ++$n) { - $i->multColor(1.0-$n/10, 1.0, 1.0); - $i->addColor(0xff*$n/20, 0, 0); - $m->nextFrame(); + $i->multColor(1.0-$n/10, 1.0, 1.0); + $i->addColor(0xff*$n/20, 0, 0); + $m->nextFrame(); } header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1222,9 +1346,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swfshape</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfshape</function> creates a new shape object. </para> @@ -1241,24 +1366,26 @@ <example> <title><function>swfshape</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $s = new SWFShape(); - $s->setLine(40, 0x7f, 0, 0); - $s->setRightFill($s->addFill(0xff, 0, 0)); - $s->movePenTo(200, 200); - $s->drawLineTo(6200, 200); - $s->drawLineTo(6200, 4600); - $s->drawCurveTo(200, 4600, 200, 200); + $s->setLine(40, 0x7f, 0, 0); + $s->setRightFill($s->addFill(0xff, 0, 0)); + $s->movePenTo(200, 200); + $s->drawLineTo(6200, 200); + $s->drawLineTo(6200, 4600); + $s->drawCurveTo(200, 4600, 200, 200); $m = new SWFMovie(); - $m->setDimension(6400, 4800); - $m->setRate(12.0); - $m->add($s); - $m->nextFrame(); + $m->setDimension(6400, 4800); + $m->setRate(12.0); + $m->add($s); + $m->nextFrame(); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1276,12 +1403,13 @@ <funcprototype> <funcdef>void <function>swfshape->setline</function></funcdef> <paramdef>int <parameter>width</parameter></paramdef> - <paramdef>integer <parameter><optional>red</optional></parameter></paramdef> - <paramdef>integer <parameter><optional>green</optional></parameter></paramdef> - <paramdef>integer <parameter><optional>blue</optional></parameter></paramdef> - <paramdef>integer <parameter><optional>a</optional></parameter></paramdef> + <paramdef>int <parameter><optional>red</optional></parameter></paramdef> + <paramdef>int <parameter><optional>green</optional></parameter></paramdef> + <paramdef>int <parameter><optional>blue</optional></parameter></paramdef> + <paramdef>int <parameter><optional>a</optional></parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfshape->setline</function> sets the shape's line style. <parameter>width</parameter> is the line's width. If <parameter>width</parameter> @@ -1303,56 +1431,58 @@ <example> <title><function>swfshape->setline</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $s = new SWFShape(); - $f1 = $s->addFill(0xff, 0, 0); - $f2 = $s->addFill(0xff, 0x7f, 0); - $f3 = $s->addFill(0xff, 0xff, 0); - $f4 = $s->addFill(0, 0xff, 0); - $f5 = $s->addFill(0, 0, 0xff); + $f1 = $s->addFill(0xff, 0, 0); + $f2 = $s->addFill(0xff, 0x7f, 0); + $f3 = $s->addFill(0xff, 0xff, 0); + $f4 = $s->addFill(0, 0xff, 0); + $f5 = $s->addFill(0, 0, 0xff); // bug: have to declare all line styles before you use them - $s->setLine(40, 0x7f, 0, 0); - $s->setLine(40, 0x7f, 0x3f, 0); - $s->setLine(40, 0x7f, 0x7f, 0); - $s->setLine(40, 0, 0x7f, 0); - $s->setLine(40, 0, 0, 0x7f); + $s->setLine(40, 0x7f, 0, 0); + $s->setLine(40, 0x7f, 0x3f, 0); + $s->setLine(40, 0x7f, 0x7f, 0); + $s->setLine(40, 0, 0x7f, 0); + $s->setLine(40, 0, 0, 0x7f); $f = new SWFFont('Techno.fdb'); - $s->setRightFill($f1); - $s->setLine(40, 0x7f, 0, 0); - $s->drawGlyph($f, '!'); - $s->movePen($f->getWidth('!'), 0); - - $s->setRightFill($f2); - $s->setLine(40, 0x7f, 0x3f, 0); - $s->drawGlyph($f, '#'); - $s->movePen($f->getWidth('#'), 0); - - $s->setRightFill($f3); - $s->setLine(40, 0x7f, 0x7f, 0); - $s->drawGlyph($f, '%'); - $s->movePen($f->getWidth('%'), 0); - - $s->setRightFill($f4); - $s->setLine(40, 0, 0x7f, 0); - $s->drawGlyph($f, '*'); - $s->movePen($f->getWidth('*'), 0); - - $s->setRightFill($f5); - $s->setLine(40, 0, 0, 0x7f); - $s->drawGlyph($f, '@'); + $s->setRightFill($f1); + $s->setLine(40, 0x7f, 0, 0); + $s->drawGlyph($f, '!'); + $s->movePen($f->getWidth('!'), 0); + + $s->setRightFill($f2); + $s->setLine(40, 0x7f, 0x3f, 0); + $s->drawGlyph($f, '#'); + $s->movePen($f->getWidth('#'), 0); + + $s->setRightFill($f3); + $s->setLine(40, 0x7f, 0x7f, 0); + $s->drawGlyph($f, '%'); + $s->movePen($f->getWidth('%'), 0); + + $s->setRightFill($f4); + $s->setLine(40, 0, 0x7f, 0); + $s->drawGlyph($f, '*'); + $s->movePen($f->getWidth('*'), 0); + + $s->setRightFill($f5); + $s->setLine(40, 0, 0, 0x7f); + $s->drawGlyph($f, '@'); $m = new SWFMovie(); - $m->setDimension(3000,2000); - $m->setRate(12.0); - $i = $m->add($s); - $i->moveTo(1500-$f->getWidth("!#%*@")/2, 1000+$f->getAscent()/2); + $m->setDimension(3000,2000); + $m->setRate(12.0); + $i = $m->add($s); + $i->moveTo(1500-$f->getWidth("!#%*@")/2, 1000+$f->getAscent()/2); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1369,32 +1499,35 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->addfill</function></funcdef> - <paramdef>integer <parameter>red</parameter></paramdef> - <paramdef>integer <parameter>green</parameter></paramdef> - <paramdef>integer <parameter>blue</parameter></paramdef> - <paramdef>integer + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter><optional>a</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->addfill</function></funcdef> <paramdef>SWFbitmap <parameter>bitmap</parameter></paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>flags</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->addfill</function></funcdef> <paramdef>SWFGradient <parameter>gradient</parameter></paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>flags</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfshape->addfill</function> adds a solid fill to the shape's list @@ -1437,54 +1570,56 @@ <example> <title><function>swfshape->addfill</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $p = new SWFMorph(); $b = new SWFBitmap("alphafill.jpg"); // use your own bitmap - $width = $b->getWidth(); - $height = $b->getHeight(); + $width = $b->getWidth(); + $height = $b->getHeight(); - $s = $p->getShape1(); - $f = $s->addFill($b, SWFFILL_TILED_BITMAP); - $f->moveTo(-$width/2, -$height/4); - $f->scaleTo(1.0, 0.5); - $s->setLeftFill($f); - $s->movePenTo(-$width/2, -$height/4); - $s->drawLine($width, 0); - $s->drawLine(0, $height/2); - $s->drawLine(-$width, 0); - $s->drawLine(0, -$height/2); + $s = $p->getShape1(); + $f = $s->addFill($b, SWFFILL_TILED_BITMAP); + $f->moveTo(-$width/2, -$height/4); + $f->scaleTo(1.0, 0.5); + $s->setLeftFill($f); + $s->movePenTo(-$width/2, -$height/4); + $s->drawLine($width, 0); + $s->drawLine(0, $height/2); + $s->drawLine(-$width, 0); + $s->drawLine(0, -$height/2); - $s = $p->getShape2(); - $f = $s->addFill($b, SWFFILL_TILED_BITMAP); + $s = $p->getShape2(); + $f = $s->addFill($b, SWFFILL_TILED_BITMAP); // these two have no effect! - $f->moveTo(-$width/4, -$height/2); - $f->scaleTo(0.5, 1.0); + $f->moveTo(-$width/4, -$height/2); + $f->scaleTo(0.5, 1.0); - $s->setLeftFill($f); - $s->movePenTo(-$width/4, -$height/2); - $s->drawLine($width/2, 0); - $s->drawLine(0, $height); - $s->drawLine(-$width/2, 0); - $s->drawLine(0, -$height); + $s->setLeftFill($f); + $s->movePenTo(-$width/4, -$height/2); + $s->drawLine($width/2, 0); + $s->drawLine(0, $height); + $s->drawLine(-$width/2, 0); + $s->drawLine(0, -$height); $m = new SWFMovie(); - $m->setDimension($width, $height); - $i = $m->add($p); - $i->moveTo($width/2, $height/2); + $m->setDimension($width, $height); + $i = $m->add($p); + $i->moveTo($width/2, $height/2); - for($n=0; $n<1.001; $n+=0.03) + for($n=0; $n<1.001; $n+=0.03) { - $i->setRatio($n); - $m->nextFrame(); + $i->setRatio($n); + $m->nextFrame(); } header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1504,17 +1639,19 @@ <paramdef>swfgradient <parameter>fill</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->setleftfill</function></funcdef> - <paramdef>integer <parameter>red</parameter></paramdef> - <paramdef>integer <parameter>green</parameter></paramdef> - <paramdef>integer <parameter>blue</parameter></paramdef> - <paramdef>integer + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter><optional>a</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> What this nonsense is about is, every edge segment borders at most two fills. When rasterizing the object, it's pretty handy to know what those fills are @@ -1552,17 +1689,19 @@ <paramdef>swfgradient <parameter>fill</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->setrightfill</function></funcdef> - <paramdef>integer <parameter>red</parameter></paramdef> - <paramdef>integer <parameter>green</parameter></paramdef> - <paramdef>integer <parameter>blue</parameter></paramdef> - <paramdef>integer + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter><optional>a</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <simpara> See also <function>swfshape->setleftfill</function>. </simpara> @@ -1582,10 +1721,11 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->movepento</function></funcdef> - <paramdef>integer <parameter>x</parameter></paramdef> - <paramdef>integer <parameter>y</parameter></paramdef> + <paramdef>int <parameter>x</parameter></paramdef> + <paramdef>int <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <simpara> <function>swfshape->setrightfill</function> move the shape's pen to (<parameter>x</parameter>,<parameter>y</parameter>) in the shape's @@ -1611,10 +1751,11 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->movepen</function></funcdef> - <paramdef>integer <parameter>dx</parameter></paramdef> - <paramdef>integer <parameter>dy</parameter></paramdef> + <paramdef>int <parameter>dx</parameter></paramdef> + <paramdef>int <parameter>dy</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <simpara> <function>swfshape->setrightfill</function> move the shape's pen from coordinates (current x,current y) to (current x + <parameter>dx</parameter>, @@ -1640,10 +1781,11 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->drawlineto</function></funcdef> - <paramdef>integer <parameter>x</parameter></paramdef> - <paramdef>integer <parameter>y</parameter></paramdef> + <paramdef>int <parameter>x</parameter></paramdef> + <paramdef>int <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <simpara> <function>swfshape->setrightfill</function> draws a line (using the current line style, set by <function>swfshape->setline</function>) from the current @@ -1670,10 +1812,11 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->drawline</function></funcdef> - <paramdef>integer <parameter>dx</parameter></paramdef> - <paramdef>integer <parameter>dy</parameter></paramdef> + <paramdef>int <parameter>dx</parameter></paramdef> + <paramdef>int <parameter>dy</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <simpara> <function>swfshape->setrightfill</function> draws a line (using the current line style set by <function>swfshape->setline</function>) from the current pen position to @@ -1699,12 +1842,13 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->drawcurveto</function></funcdef> - <paramdef>integer <parameter>controlx</parameter></paramdef> - <paramdef>integer <parameter>controly</parameter></paramdef> - <paramdef>integer <parameter>anchorx</parameter></paramdef> - <paramdef>integer <parameter>anchory</parameter></paramdef> + <paramdef>int <parameter>controlx</parameter></paramdef> + <paramdef>int <parameter>controly</parameter></paramdef> + <paramdef>int <parameter>anchorx</parameter></paramdef> + <paramdef>int <parameter>anchory</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <simpara> <function>swfshape->drawcurveto</function> draws a quadratic curve (using the current line style, set by <function>swfshape->setline</function>) @@ -1734,12 +1878,13 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->drawcurve</function></funcdef> - <paramdef>integer <parameter>controldx</parameter></paramdef> - <paramdef>integer <parameter>controldy</parameter></paramdef> - <paramdef>integer <parameter>anchordx</parameter></paramdef> - <paramdef>integer <parameter>anchordy</parameter></paramdef> + <paramdef>int <parameter>controldx</parameter></paramdef> + <paramdef>int <parameter>controldy</parameter></paramdef> + <paramdef>int <parameter>anchordx</parameter></paramdef> + <paramdef>int <parameter>anchordy</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <simpara> <function>swfshape->drawcurve</function> draws a quadratic curve (using the current line style,set by <function>swfshape->setline</function>) @@ -1772,9 +1917,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swfgradient</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfgradient</function> creates a new SWFGradient object. </para> @@ -1791,50 +1937,52 @@ <example> <title><function>swfgradient</function> ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $m = new SWFMovie(); - $m->setDimension(320, 240); + $m->setDimension(320, 240); $s = new SWFShape(); // first gradient- black to white $g = new SWFGradient(); - $g->addEntry(0.0, 0, 0, 0); - $g->addEntry(1.0, 0xff, 0xff, 0xff); + $g->addEntry(0.0, 0, 0, 0); + $g->addEntry(1.0, 0xff, 0xff, 0xff); - $f = $s->addFill($g, SWFFILL_LINEAR_GRADIENT); - $f->scaleTo(0.01); - $f->moveTo(160, 120); - $s->setRightFill($f); - $s->drawLine(320, 0); - $s->drawLine(0, 240); - $s->drawLine(-320, 0); - $s->drawLine(0, -240); + $f = $s->addFill($g, SWFFILL_LINEAR_GRADIENT); + $f->scaleTo(0.01); + $f->moveTo(160, 120); + $s->setRightFill($f); + $s->drawLine(320, 0); + $s->drawLine(0, 240); + $s->drawLine(-320, 0); + $s->drawLine(0, -240); - $m->add($s); + $m->add($s); $s = new SWFShape(); // second gradient- radial gradient from red to transparent $g = new SWFGradient(); - $g->addEntry(0.0, 0xff, 0, 0, 0xff); - $g->addEntry(1.0, 0xff, 0, 0, 0); + $g->addEntry(0.0, 0xff, 0, 0, 0xff); + $g->addEntry(1.0, 0xff, 0, 0, 0); - $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); - $f->scaleTo(0.005); - $f->moveTo(160, 120); - $s->setRightFill($f); - $s->drawLine(320, 0); - $s->drawLine(0, 240); - $s->drawLine(-320, 0); - $s->drawLine(0, -240); + $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); + $f->scaleTo(0.005); + $f->moveTo(160, 120); + $s->setRightFill($f); + $s->drawLine(320, 0); + $s->drawLine(0, 240); + $s->drawLine(-320, 0); + $s->drawLine(0, -240); - $m->add($s); + $m->add($s); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1851,13 +1999,14 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfgradient->addentry</function></funcdef> - <paramdef>double <parameter>ratio</parameter></paramdef> - <paramdef>integer <parameter>red</parameter></paramdef> - <paramdef>integer <parameter>green</parameter></paramdef> - <paramdef>integer <parameter>blue</parameter></paramdef> - <paramdef>integer <parameter><optional>a</optional></parameter></paramdef> + <paramdef>float <parameter>ratio</parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter><optional>a</optional></parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfgradient->addentry</function> adds an entry to the gradient list. <parameter>ratio</parameter> is a number between 0 and 1 indicating where in @@ -1883,9 +2032,10 @@ <funcprototype> <funcdef>new <function>swfbitmap</function></funcdef> <paramdef>string <parameter>filename</parameter></paramdef> - <paramdef>integer <parameter><optional>alphafilename</optional></parameter></paramdef> + <paramdef>int <parameter><optional>alphafilename</optional></parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbitmap</function> creates a new SWFBitmap object from the Jpeg or DBL file named <parameter>filename</parameter>. @@ -1910,23 +2060,25 @@ <example> <title>Import PNG files</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $s = new SWFShape(); - $f = $s->addFill(new SWFBitmap("png.dbl")); - $s->setRightFill($f); + $f = $s->addFill(new SWFBitmap("png.dbl")); + $s->setRightFill($f); - $s->drawLine(32, 0); - $s->drawLine(0, 32); - $s->drawLine(-32, 0); - $s->drawLine(0, -32); + $s->drawLine(32, 0); + $s->drawLine(0, 32); + $s->drawLine(-32, 0); + $s->drawLine(0, -32); $m = new SWFMovie(); - $m->setDimension(32, 32); - $m->add($s); + $m->setDimension(32, 32); + $m->add($s); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1935,53 +2087,55 @@ <example> <title><function>swfbitmap</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $s = new SWFShape(); // .msk file generated with "gif2mask" utility - $f = $s->addFill(new SWFBitmap("alphafill.jpg", "alphafill.msk")); - $s->setRightFill($f); + $f = $s->addFill(new SWFBitmap("alphafill.jpg", "alphafill.msk")); + $s->setRightFill($f); - $s->drawLine(640, 0); - $s->drawLine(0, 480); - $s->drawLine(-640, 0); - $s->drawLine(0, -480); + $s->drawLine(640, 0); + $s->drawLine(0, 480); + $s->drawLine(-640, 0); + $s->drawLine(0, -480); $c = new SWFShape(); - $c->setRightFill($c->addFill(0x99, 0x99, 0x99)); - $c->drawLine(40, 0); - $c->drawLine(0, 40); - $c->drawLine(-40, 0); - $c->drawLine(0, -40); + $c->setRightFill($c->addFill(0x99, 0x99, 0x99)); + $c->drawLine(40, 0); + $c->drawLine(0, 40); + $c->drawLine(-40, 0); + $c->drawLine(0, -40); $m = new SWFMovie(); - $m->setDimension(640, 480); - $m->setBackground(0xcc, 0xcc, 0xcc); + $m->setDimension(640, 480); + $m->setBackground(0xcc, 0xcc, 0xcc); // draw checkerboard background - for($y=0; $y<480; $y+=40) + for($y=0; $y<480; $y+=40) { - for($x=0; $x<640; $x+=80) + for($x=0; $x<640; $x+=80) { - $i = $m->add($c); - $i->moveTo($x, $y); + $i = $m->add($c); + $i->moveTo($x, $y); } $y+=40; - for($x=40; $x<640; $x+=80) + for($x=40; $x<640; $x+=80) { - $i = $m->add($c); - $i->moveTo($x, $y); + $i = $m->add($c); + $i->moveTo($x, $y); } } - $m->add($s); + $m->add($s); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1998,9 +2152,10 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>swfbitmap->getwidth</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbitmap->getwidth</function> returns the bitmap's width in pixels. </para> @@ -2020,9 +2175,10 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>swfbitmap->getheight</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbitmap->getheight</function> returns the bitmap's height in pixels. </para> @@ -2064,10 +2220,11 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swffill->moveto</function></funcdef> - <paramdef>integer <parameter>x</parameter></paramdef> - <paramdef>integer <parameter>y</parameter></paramdef> + <paramdef>int <parameter>x</parameter></paramdef> + <paramdef>int <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swffill->moveto</function> moves fill's origin to (<parameter>x</parameter>,<parameter>y</parameter>) in global coordinates. @@ -2085,10 +2242,11 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swffill->scaleto</function></funcdef> - <paramdef>integer <parameter>x</parameter></paramdef> - <paramdef>integer <parameter>y</parameter></paramdef> + <paramdef>int <parameter>x</parameter></paramdef> + <paramdef>int <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swffill->scaleto</function> sets fill's scale to <parameter>x</parameter> in the x-direction, @@ -2107,9 +2265,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swffill->rotateto</function></funcdef> - <paramdef>double <parameter>degrees</parameter></paramdef> + <paramdef>float <parameter>degrees</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swffill->rotateto</function> sets fill's rotation to <parameter>degrees</parameter> degrees. @@ -2127,9 +2286,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swffill->skewxto</function></funcdef> - <paramdef>double <parameter>x</parameter></paramdef> + <paramdef>float <parameter>x</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swffill->skewxto</function> sets fill x-skew to <parameter>x</parameter>. For <parameter>x</parameter> is 1.0, it is a is a 45-degree @@ -2148,9 +2308,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swffill->skewyto</function></funcdef> - <paramdef>double <parameter>y</parameter></paramdef> + <paramdef>float <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swffill->skewyto</function> sets fill y-skew to <parameter>y</parameter>. For <parameter>y</parameter> is 1.0, it is a is a 45-degree @@ -2171,9 +2332,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swfmorph</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmorph</function> creates a new SWFMorph object. </para> @@ -2199,47 +2361,49 @@ <example> <title><function>swfmorph</function>ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $p = new SWFMorph(); - $s = $p->getShape1(); - $s->setLine(0,0,0,0); + $s = $p->getShape1(); + $s->setLine(0,0,0,0); /* Note that this is backwards from normal shapes (left instead of right). I have no idea why, but this seems to work.. */ - $s->setLeftFill($s->addFill(0xff, 0, 0)); - $s->movePenTo(-1000,-1000); - $s->drawLine(2000,0); - $s->drawLine(0,2000); - $s->drawLine(-2000,0); - $s->drawLine(0,-2000); - - $s = $p->getShape2(); - $s->setLine(60,0,0,0); - $s->setLeftFill($s->addFill(0, 0, 0xff)); - $s->movePenTo(0,-1000); - $s->drawLine(1000,1000); - $s->drawLine(-1000,1000); - $s->drawLine(-1000,-1000); - $s->drawLine(1000,-1000); + $s->setLeftFill($s->addFill(0xff, 0, 0)); + $s->movePenTo(-1000,-1000); + $s->drawLine(2000,0); + $s->drawLine(0,2000); + $s->drawLine(-2000,0); + $s->drawLine(0,-2000); + + $s = $p->getShape2(); + $s->setLine(60,0,0,0); + $s->setLeftFill($s->addFill(0, 0, 0xff)); + $s->movePenTo(0,-1000); + $s->drawLine(1000,1000); + $s->drawLine(-1000,1000); + $s->drawLine(-1000,-1000); + $s->drawLine(1000,-1000); $m = new SWFMovie(); - $m->setDimension(3000,2000); - $m->setBackground(0xff, 0xff, 0xff); + $m->setDimension(3000,2000); + $m->setBackground(0xff, 0xff, 0xff); - $i = $m->add($p); - $i->moveTo(1500,1000); + $i = $m->add($p); + $i->moveTo(1500,1000); - for($r=0.0; $r<=1.0; $r+=0.1) + for($r=0.0; $r<=1.0; $r+=0.1) { - $i->setRatio($r); - $m->nextFrame(); + $i->setRatio($r); + $m->nextFrame(); } header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -2256,9 +2420,10 @@ <funcsynopsis> <funcprototype> <funcdef>mixed <function>swfmorph->getshape1</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmorph->getshape1</function> gets a handle to the morph's starting shape. <function>swfmorph->getshape1</function> returns an @@ -2277,9 +2442,10 @@ <funcsynopsis> <funcprototype> <funcdef>mixed <function>swfmorph->getshape2</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmorph->getshape2</function> gets a handle to the morph's ending shape. <function>swfmorph->getshape2</function> returns an @@ -2300,9 +2466,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swftext</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext</function> creates a new SWFText object, fresh for manipulating. @@ -2319,23 +2486,25 @@ <example> <title><function>swftext</function>ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $f = new SWFFont("Techno.fdb"); $t = new SWFText(); - $t->setFont($f); - $t->moveTo(200, 2400); - $t->setColor(0xff, 0xff, 0); - $t->setHeight(1200); - $t->addString("PHP generates Flash with Ming!!"); + $t->setFont($f); + $t->moveTo(200, 2400); + $t->setColor(0xff, 0xff, 0); + $t->setHeight(1200); + $t->addString("PHP generates Flash with Ming!!"); $m = new SWFMovie(); - $m->setDimension(5400, 3600); + $m->setDimension(5400, 3600); - $m->add($t); + $m->add($t); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -2355,6 +2524,7 @@ <paramdef>string <parameter>font</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext->setfont</function> ã¯ãã«ã¬ã³ãã®ãã©ã³ãã <parameter>font</parameter> ã«è¨å®ãã¾ãã @@ -2372,9 +2542,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swftext->setheight</function></funcdef> - <paramdef>integer <parameter>height</parameter></paramdef> + <paramdef>int <parameter>height</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext->setheight</function> sets the current font height to <parameter>height</parameter>. Default is 240. @@ -2392,9 +2563,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swftext->setspacing</function></funcdef> - <paramdef>double <parameter>spacing</parameter></paramdef> + <paramdef>float <parameter>spacing</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext->setspacing</function> sets the current font spacing to <parameter>spacing</parameter><parameter>spacing</parameter>. Default is 1.0. @@ -2418,12 +2590,13 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swftext->setcolor</function></funcdef> - <paramdef>integer <parameter>red</parameter></paramdef> - <paramdef>integer <parameter>green</parameter></paramdef> - <paramdef>integer <parameter>blue</parameter></paramdef> - <paramdef>integer <parameter><optional>a</optional></parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter><optional>a</optional></parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext->setspacing</function> changes the current text color. Default is black. I think. Color is represented using the RGB system. @@ -2441,10 +2614,11 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swftext->moveto</function></funcdef> - <paramdef>integer <parameter>x</parameter></paramdef> - <paramdef>integer <parameter>y</parameter></paramdef> + <paramdef>int <parameter>x</parameter></paramdef> + <paramdef>int <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext->moveto</function> moves the pen (or cursor, if that makes more sense) to (<parameter>x</parameter>,<parameter>y</parameter>) @@ -2467,6 +2641,7 @@ <paramdef>string <parameter>string</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext->addstring</function> draws the string <parameter>string</parameter> at the current pen (cursor) location. Pen is at the baseline of the text; @@ -2488,6 +2663,7 @@ <paramdef>string <parameter>string</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext->addstring</function> returns the rendered width of the <parameter>string</parameter> string at the text object's current font, @@ -2511,6 +2687,7 @@ <paramdef>string <parameter>filename</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <parameter>filename</parameter> ããFDBãã¡ã¤ã«ã®åå(ããªãã¡ã ".fdb" ã§çµã)ã®å ´åããã®ãã¡ã¤ã«ä¸ã®ãã©ã³ãã®å®ç¾©ããã¼ããã¾ @@ -2530,9 +2707,11 @@ ä»®å®ãã¾ãããã©ã³ã _serif, _sans, _typewriter ã¯ã常ã«ä½¿ç¨å¯è½ ã§ããä¾ãã°ã <programlisting role="php"> -<?php -$f = new SWFFont("_sans"); -?> +<![CDATA[ +<?php +$f = newSWFFont("_sans"); +?> +]]> </programlisting> ã«ãããæ¨æºç㪠sans-serif ãã©ã³ããæå®ããã¾ããããã¯ãHTML ã§ <literal><font name="sans-serif"></literal> ã¨æå®ããå ´ @@ -2563,6 +2742,7 @@ <paramdef>string <parameter>string</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swffont->getwidth</function> returns the string <parameter>string</parameter>'s width, using font's default scaling. @@ -2589,6 +2769,7 @@ </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield</function> creates a new text field object. Text Fields are less flexible than <function>swftext</function> objects- @@ -2633,9 +2814,11 @@ Flags are combined with the bitwise <link linkend="language.operators.bitwise">OR</link> operation. For example, <programlisting role="php"> -<?php +<![CDATA[ +<?php $t = newSWFTextField(SWFTEXTFIELD_PASSWORD | SWFTEXTFIELD_NOEDIT); -?> +?> +]]> </programlisting> creates a totally useless non-editable password field. </para> @@ -2664,6 +2847,7 @@ <paramdef>string <parameter>font</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setfont</function> sets the text field font to the [browser-defined?] <parameter>font</parameter> font. @@ -2685,6 +2869,7 @@ <paramdef>int <parameter>height</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setbounds</function> sets the text field width to <parameter>width</parameter> and height to <parameter>height</parameter>. @@ -2707,6 +2892,7 @@ <paramdef>int <parameter>alignement</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->align</function> sets the text field alignment to <parameter>alignement</parameter>. Valid values for @@ -2732,6 +2918,7 @@ <paramdef>int <parameter>height</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setheight</function> sets the font height of this text field font to the given height <parameter>height</parameter>. Default is 240. @@ -2752,6 +2939,7 @@ <paramdef>int <parameter>width</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setleftmargin</function> sets the left margin width of the text field to <parameter>width</parameter>. Default is 0. @@ -2772,6 +2960,7 @@ <paramdef>int <parameter>width</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setrightmargin</function> sets the right margin width of the text field to <parameter>width</parameter>. Default is 0. @@ -2793,6 +2982,7 @@ <paramdef>int <parameter>right</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setmargins</function> set both margins at once, for the man on the go. @@ -2813,6 +3003,7 @@ <paramdef>int <parameter>width</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setindentation</function> sets the indentation of the first line in the text field, to <parameter>width</parameter>. @@ -2833,6 +3024,7 @@ <paramdef>int <parameter>height</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setlinespacing</function> sets the line spacing of the text field to the height of <parameter>height</parameter>. Default is 40. @@ -2850,12 +3042,13 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swftextfield->setcolor</function></funcdef> - <paramdef>integer <parameter>red</parameter></paramdef> - <paramdef>integer <parameter>green</parameter></paramdef> - <paramdef>integer <parameter>blue</parameter></paramdef> - <paramdef>integer <parameter><optional>a</optional></parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter><optional>a</optional></parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setcolor</function> sets the color of the text field. Default is fully opaque black. Color is represented using RGB system. @@ -2876,6 +3069,7 @@ <paramdef>string <parameter>name</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setname</function> sets the variable name of this text field to <parameter>name</parameter>, for form posting and action @@ -2897,6 +3091,7 @@ <paramdef>string <parameter>string</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setname</function> ã¯ãæåå <parameter>string</parameter>ãããã¹ããã£ã¼ã«ãã«çµåãã¾ãã @@ -2916,9 +3111,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swfsprite</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfsprite</function> are also known as a "movie clip", this allows one to create objects which are animated in their own @@ -2935,40 +3131,42 @@ <example> <title><function>swfsprite</function> ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $s = new SWFShape(); - $s->setRightFill($s->addFill(0xff, 0, 0)); - $s->movePenTo(-500,-500); - $s->drawLineTo(500,-500); - $s->drawLineTo(500,500); - $s->drawLineTo(-500,500); - $s->drawLineTo(-500,-500); + $s->setRightFill($s->addFill(0xff, 0, 0)); + $s->movePenTo(-500,-500); + $s->drawLineTo(500,-500); + $s->drawLineTo(500,500); + $s->drawLineTo(-500,500); + $s->drawLineTo(-500,-500); $p = new SWFSprite(); - $i = $p->add($s); - $p->nextFrame(); - $i->rotate(15); - $p->nextFrame(); - $i->rotate(15); - $p->nextFrame(); - $i->rotate(15); - $p->nextFrame(); - $i->rotate(15); - $p->nextFrame(); - $i->rotate(15); - $p->nextFrame(); + $i = $p->add($s); + $p->nextFrame(); + $i->rotate(15); + $p->nextFrame(); + $i->rotate(15); + $p->nextFrame(); + $i->rotate(15); + $p->nextFrame(); + $i->rotate(15); + $p->nextFrame(); + $i->rotate(15); + $p->nextFrame(); $m = new SWFMovie(); - $i = $m->add($p); - $i->moveTo(1500,1000); - $i->setName("blah"); + $i = $m->add($p); + $i->moveTo(1500,1000); + $i->setName("blah"); - $m->setBackground(0xff, 0xff, 0xff); - $m->setDimension(3000,2000); + $m->setBackground(0xff, 0xff, 0xff); + $m->setDimension(3000,2000); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -2985,9 +3183,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfsprite->add</function></funcdef> - <paramdef>ressource <parameter>object</parameter></paramdef> + <paramdef>resource <parameter>object</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfsprite->add</function> adds a <function>swfshape</function>, a <function>swfbutton</function>, a <function>swftext</function>, @@ -3034,9 +3233,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfsprite->setframes</function></funcdef> - <paramdef>integer <parameter>numberofframes</parameter></paramdef> + <paramdef>int <parameter>numberofframes</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfsprite->setframes</function> sets the total number of frames in the animation to <parameter>numberofframes</parameter>. @@ -3054,9 +3254,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfsprite->nextframe</function></funcdef> - <paramdef>void </paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfsprite->setframes</function> moves to the next frame of the animation. @@ -3076,9 +3277,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swfbutton</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbutton</function> creates a new Button. Roll over it, click it, see it call action code. Swank. @@ -3096,7 +3298,8 @@ <example> <title><function>swfbutton</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $f = new SWFFont("_serif"); @@ -3107,22 +3310,22 @@ global $f; $t = new SWFTextField(); - $t->setFont($f); - $t->addString($string); - $t->setHeight(200); - $t->setBounds(3200,200); + $t->setFont($f); + $t->addString($string); + $t->setHeight(200); + $t->setBounds(3200,200); return $t; } function addLabel($string) { global $p; - $i = $p->add(label($string)); - $p->nextFrame(); - $p->remove($i); + $i = $p->add(label($string)); + $p->nextFrame(); + $p->remove($i); } - $p->add(new SWFAction("stop();")); + $p->add(new SWFAction("stop();")); addLabel("NO ACTION"); addLabel("SWFBUTTON_MOUSEUP"); addLabel("SWFBUTTON_MOUSEDOWN"); @@ -3135,54 +3338,55 @@ function rect($r, $g, $b) { $s = new SWFShape(); - $s->setRightFill($s->addFill($r, $g, $b)); - $s->drawLine(600,0); - $s->drawLine(0,600); - $s->drawLine(-600,0); - $s->drawLine(0,-600); + $s->setRightFill($s->addFill($r, $g, $b)); + $s->drawLine(600,0); + $s->drawLine(0,600); + $s->drawLine(-600,0); + $s->drawLine(0,-600); return $s; } $b = new SWFButton(); - $b->addShape(rect(0xff, 0, 0), SWFBUTTON_UP | SWFBUTTON_HIT); - $b->addShape(rect(0, 0xff, 0), SWFBUTTON_OVER); - $b->addShape(rect(0, 0, 0xff), SWFBUTTON_DOWN); + $b->addShape(rect(0xff, 0, 0), SWFBUTTON_UP | SWFBUTTON_HIT); + $b->addShape(rect(0, 0xff, 0), SWFBUTTON_OVER); + $b->addShape(rect(0, 0, 0xff), SWFBUTTON_DOWN); - $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(1);"), - SWFBUTTON_MOUSEUP); + $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(1);"), + SWFBUTTON_MOUSEUP); - $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(2);"), - SWFBUTTON_MOUSEDOWN); + $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(2);"), + SWFBUTTON_MOUSEDOWN); - $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(3);"), - SWFBUTTON_MOUSEOVER); + $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(3);"), + SWFBUTTON_MOUSEOVER); - $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(4);"), - SWFBUTTON_MOUSEOUT); + $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(4);"), + SWFBUTTON_MOUSEOUT); - $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(5);"), - SWFBUTTON_MOUSEUPOUTSIDE); + $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(5);"), + SWFBUTTON_MOUSEUPOUTSIDE); - $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(6);"), - SWFBUTTON_DRAGOVER); + $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(6);"), + SWFBUTTON_DRAGOVER); - $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(7);"), - SWFBUTTON_DRAGOUT); + $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(7);"), + SWFBUTTON_DRAGOUT); $m = new SWFMovie(); - $m->setDimension(4000,3000); + $m->setDimension(4000,3000); - $i = $m->add($p); - $i->setName("label"); - $i->moveTo(400,1900); + $i = $m->add($p); + $i->setName("label"); + $i->moveTo(400,1900); - $i = $m->add($b); - $i->moveTo(400,900); + $i = $m->add($b); + $i->moveTo(400,900); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -3192,36 +3396,38 @@ <example> <title><function>swfbutton->addaction</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $s = new SWFShape(); - $s->setRightFill($s->addFill(0xff, 0, 0)); - $s->drawLine(1000,0); - $s->drawLine(0,1000); - $s->drawLine(-1000,0); - $s->drawLine(0,-1000); + $s->setRightFill($s->addFill(0xff, 0, 0)); + $s->drawLine(1000,0); + $s->drawLine(0,1000); + $s->drawLine(-1000,0); + $s->drawLine(0,-1000); $b = new SWFButton(); - $b->addShape($s, SWFBUTTON_HIT | SWFBUTTON_UP | SWFBUTTON_DOWN | SWFBUTTON_OVER); + $b->addShape($s, SWFBUTTON_HIT | SWFBUTTON_UP | SWFBUTTON_DOWN | SWFBUTTON_OVER); - $b->addAction(new SWFAction("startDrag('/test', 0);"), // '0' means don't lock to mouse - SWFBUTTON_MOUSEDOWN); + $b->addAction(new SWFAction("startDrag('/test', 0);"), // '0' means don't lock to mouse + SWFBUTTON_MOUSEDOWN); - $b->addAction(new SWFAction("stopDrag();"), - SWFBUTTON_MOUSEUP | SWFBUTTON_MOUSEUPOUTSIDE); + $b->addAction(new SWFAction("stopDrag();"), + SWFBUTTON_MOUSEUP | SWFBUTTON_MOUSEUPOUTSIDE); $p = new SWFSprite(); - $p->add($b); - $p->nextFrame(); + $p->add($b); + $p->nextFrame(); $m = new SWFMovie(); - $i = $m->add($p); - $i->setName('test'); - $i->moveTo(1000,1000); + $i = $m->add($p); + $i->setName('test'); + $i->moveTo(1000,1000); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -3239,9 +3445,10 @@ <funcprototype> <funcdef>void <function>swfbutton->addshape</function></funcdef> <paramdef>ressource <parameter>shape</parameter></paramdef> - <paramdef>integer <parameter>flags</parameter></paramdef> + <paramdef>int <parameter>flags</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbutton->addshape</function> adds the shape <parameter>shape</parameter> to this button. The following @@ -3267,9 +3474,15 @@ <paramdef>ressource <parameter>shape</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbutton->setup</function> alias for addShape(shape, SWFBUTTON_UP). </para> + <para> + See also + <function>swfbutton->addshape</function> and + <function>SWFAction</function>. + </para> </refsect1> </refentry> @@ -3286,9 +3499,15 @@ <paramdef>ressource <parameter>shape</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbutton->setup</function> alias for addShape(shape, SWFBUTTON_OVER). </para> + <para> + See also + <function>swfbutton->addshape</function> and + <function>SWFAction</function>. + </para> </refsect1> </refentry> @@ -3305,9 +3524,46 @@ <paramdef>ressource <parameter>shape</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbutton->sethit</function> alias for addShape(shape, SWFBUTTON_HIT). </para> + <para> + See also + <function>swfbutton->addshape</function> and + <function>SWFAction</function>. + </para> + </refsect1> + </refentry> + + <refentry id="function.swfbutton.addaction"> + <refnamediv> + <refname>SWFbutton->addAction</refname> + <refpurpose>ã¢ã¯ã·ã§ã³ã追å ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>swfbutton->addaction</function></funcdef> + <paramdef>ressource <parameter>action</parameter></paramdef> + <paramdef>int <parameter>flags</parameter></paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + <function>swfbutton->addaction</function> adds the action + <parameter>action</parameter> to this button for the given conditions. + The following <parameter>flags</parameter> are valid: + SWFBUTTON_MOUSEOVER, SWFBUTTON_MOUSEOUT, SWFBUTTON_MOUSEUP, + SWFBUTTON_MOUSEUPOUTSIDE, SWFBUTTON_MOUSEDOWN, SWFBUTTON_DRAGOUT and + SWFBUTTON_DRAGOVER. + </para> + <para> + See also + <function>swfbutton->addshape</function> and + <function>SWFAction</function>. + </para> </refsect1> </refentry> @@ -3324,11 +3580,17 @@ <paramdef>ressource <parameter>action</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbutton->setaction</function> sets the action to be performed when the button is clicked. Alias for addAction(shape, SWFBUTTON_MOUSEUP). <parameter>action</parameter> is a <function>swfaction</function>. </para> + <para> + See also + <function>swfbutton->addshape</function> and + <function>SWFAction</function>. + </para> </refsect1> </refentry> @@ -3347,6 +3609,7 @@ <paramdef>string <parameter>script</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfaction</function> creates a new Action, and compiles the given script into an SWFAction object. @@ -3740,45 +4003,47 @@ <example> <title><function>swfaction</function>ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $s = new SWFShape(); - $f = $s->addFill(0xff, 0, 0); - $s->setRightFill($f); + $f = $s->addFill(0xff, 0, 0); + $s->setRightFill($f); - $s->movePenTo(-500,-500); - $s->drawLineTo(500,-500); - $s->drawLineTo(500,500); - $s->drawLineTo(-500,500); - $s->drawLineTo(-500,-500); + $s->movePenTo(-500,-500); + $s->drawLineTo(500,-500); + $s->drawLineTo(500,500); + $s->drawLineTo(-500,500); + $s->drawLineTo(-500,-500); $p = new SWFSprite(); - $i = $p->add($s); - $i->setDepth(1); - $p->nextFrame(); + $i = $p->add($s); + $i->setDepth(1); + $p->nextFrame(); - for($n=0; $n<5; ++$n) + for($n=0; $n<5; ++$n) { - $i->rotate(-15); - $p->nextFrame(); + $i->rotate(-15); + $p->nextFrame(); } $m = new SWFMovie(); - $m->setBackground(0xff, 0xff, 0xff); - $m->setDimension(6000,4000); + $m->setBackground(0xff, 0xff, 0xff); + $m->setDimension(6000,4000); - $i = $m->add($p); - $i->setDepth(1); - $i->moveTo(-500,2000); - $i->setName("box"); - - $m->add(new SWFAction("/box.x += 3;")); - $m->nextFrame(); - $m->add(new SWFAction("gotoFrame(0); play();")); - $m->nextFrame(); + $i = $m->add($p); + $i->setDepth(1); + $i->moveTo(-500,2000); + $i->setName("box"); + + $m->add(new SWFAction("/box.x += 3;")); + $m->nextFrame(); + $m->add(new SWFAction("gotoFrame(0); play();")); + $m->nextFrame(); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -3787,75 +4052,76 @@ <example> <title><function>swfaction</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $m = new SWFMovie(); - $m->setRate(36.0); - $m->setDimension(1200, 800); - $m->setBackground(0, 0, 0); + $m->setRate(36.0); + $m->setDimension(1200, 800); + $m->setBackground(0, 0, 0); /* mouse tracking sprite - empty, but follows mouse so we can get its x and y coordinates */ - $i = $m->add(new SWFSprite()); - $i->setName('mouse'); + $i = $m->add(new SWFSprite()); + $i->setName('mouse'); - $m->add(new SWFAction(" + $m->add(new SWFAction(" startDrag('/mouse', 1); /* '1' means lock sprite to the mouse */ ")); /* might as well turn off antialiasing, since these are just squares. */ - $m->add(new SWFAction(" + $m->add(new SWFAction(" this.quality = 0; ")); /* morphing box */ $r = new SWFMorph(); - $s = $r->getShape1(); + $s = $r->getShape1(); /* Note this is backwards from normal shapes. No idea why. */ - $s->setLeftFill($s->addFill(0xff, 0xff, 0xff)); - $s->movePenTo(-40, -40); - $s->drawLine(80, 0); - $s->drawLine(0, 80); - $s->drawLine(-80, 0); - $s->drawLine(0, -80); - - $s = $r->getShape2(); - - $s->setLeftFill($s->addFill(0x00, 0x00, 0x00)); - $s->movePenTo(-1, -1); - $s->drawLine(2, 0); - $s->drawLine(0, 2); - $s->drawLine(-2, 0); - $s->drawLine(0, -2); + $s->setLeftFill($s->addFill(0xff, 0xff, 0xff)); + $s->movePenTo(-40, -40); + $s->drawLine(80, 0); + $s->drawLine(0, 80); + $s->drawLine(-80, 0); + $s->drawLine(0, -80); + + $s = $r->getShape2(); + + $s->setLeftFill($s->addFill(0x00, 0x00, 0x00)); + $s->movePenTo(-1, -1); + $s->drawLine(2, 0); + $s->drawLine(0, 2); + $s->drawLine(-2, 0); + $s->drawLine(0, -2); /* sprite container for morphing box - this is just a timeline w/ the box morphing */ $box = new SWFSprite(); - $box->add(new SWFAction(" + $box->add(new SWFAction(" stop(); ")); - $i = $box->add($r); + $i = $box->add($r); - for($n=0; $n<=20; ++$n) + for($n=0; $n<=20; ++$n) { - $i->setRatio($n/20); - $box->nextFrame(); + $i->setRatio($n/20); + $box->nextFrame(); } /* this container sprite allows us to use the same action code many times */ $cell = new SWFSprite(); - $i = $cell->add($box); - $i->setName('box'); + $i = $cell->add($box); + $i->setName('box'); - $cell->add(new SWFAction(" + $cell->add(new SWFAction(" setTarget('box'); @@ -3866,31 +4132,31 @@ ")); - $cell->nextFrame(); - $cell->add(new SWFAction(" + $cell->nextFrame(); + $cell->add(new SWFAction(" gotoFrame(0); play(); ")); - $cell->nextFrame(); + $cell->nextFrame(); /* finally, add a bunch of the cells to the movie */ - for($x=0; $x<12; ++$x) + for($x=0; $x<12; ++$x) { - for($y=0; $y<8; ++$y) + for($y=0; $y<8; ++$y) { - $i = $m->add($cell); - $i->moveTo(100*$x+50, 100*$y+50); + $i = $m->add($cell); + $i->moveTo(100*$x+50, 100*$y+50); } } - $m->nextFrame(); + $m->nextFrame(); - $m->add(new SWFAction(" + $m->add(new SWFAction(" gotoFrame(1); play(); @@ -3898,8 +4164,9 @@ ")); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -3908,13 +4175,14 @@ <example> <title><function>swfaction</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $m = new SWFMovie(); - $m->setDimension(11000, 8000); - $m->setBackground(0x00, 0x00, 0x00); + $m->setDimension(11000, 8000); + $m->setBackground(0x00, 0x00, 0x00); - $m->add(new SWFAction(" + $m->add(new SWFAction(" this.quality = 0; /frames.visible = 0; @@ -3924,56 +4192,56 @@ // mouse tracking sprite $t = new SWFSprite(); - $i = $m->add($t); - $i->setName('mouse'); + $i = $m->add($t); + $i->setName('mouse'); $g = new SWFGradient(); - $g->addEntry(0, 0xff, 0xff, 0xff, 0xff); - $g->addEntry(0.1, 0xff, 0xff, 0xff, 0xff); - $g->addEntry(0.5, 0xff, 0xff, 0xff, 0x5f); - $g->addEntry(1.0, 0xff, 0xff, 0xff, 0); + $g->addEntry(0, 0xff, 0xff, 0xff, 0xff); + $g->addEntry(0.1, 0xff, 0xff, 0xff, 0xff); + $g->addEntry(0.5, 0xff, 0xff, 0xff, 0x5f); + $g->addEntry(1.0, 0xff, 0xff, 0xff, 0); // gradient shape thing $s = new SWFShape(); - $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); - $f->scaleTo(0.03); - $s->setRightFill($f); - $s->movePenTo(-600, -600); - $s->drawLine(1200, 0); - $s->drawLine(0, 1200); - $s->drawLine(-1200, 0); - $s->drawLine(0, -1200); + $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); + $f->scaleTo(0.03); + $s->setRightFill($f); + $s->movePenTo(-600, -600); + $s->drawLine(1200, 0); + $s->drawLine(0, 1200); + $s->drawLine(-1200, 0); + $s->drawLine(0, -1200); // need to make this a sprite so we can multColor it $p = new SWFSprite(); - $p->add($s); - $p->nextFrame(); + $p->add($s); + $p->nextFrame(); // put the shape in here, each frame a different color $q = new SWFSprite(); - $q->add(new SWFAction("gotoFrame(random(7)+1); stop();")); - $i = $q->add($p); + $q->add(new SWFAction("gotoFrame(random(7)+1); stop();")); + $i = $q->add($p); - $i->multColor(1.0, 1.0, 1.0); - $q->nextFrame(); - $i->multColor(1.0, 0.5, 0.5); - $q->nextFrame(); - $i->multColor(1.0, 0.75, 0.5); - $q->nextFrame(); - $i->multColor(1.0, 1.0, 0.5); - $q->nextFrame(); - $i->multColor(0.5, 1.0, 0.5); - $q->nextFrame(); - $i->multColor(0.5, 0.5, 1.0); - $q->nextFrame(); - $i->multColor(1.0, 0.5, 1.0); - $q->nextFrame(); + $i->multColor(1.0, 1.0, 1.0); + $q->nextFrame(); + $i->multColor(1.0, 0.5, 0.5); + $q->nextFrame(); + $i->multColor(1.0, 0.75, 0.5); + $q->nextFrame(); + $i->multColor(1.0, 1.0, 0.5); + $q->nextFrame(); + $i->multColor(0.5, 1.0, 0.5); + $q->nextFrame(); + $i->multColor(0.5, 0.5, 1.0); + $q->nextFrame(); + $i->multColor(1.0, 0.5, 1.0); + $q->nextFrame(); // finally, this one contains the action code $p = new SWFSprite(); - $i = $p->add($q); - $i->setName('frames'); - $p->add(new SWFAction(" + $i = $p->add($q); + $i->setName('frames'); + $p->add(new SWFAction(" dx = (/:mousex-/:lastx)/3 + random(10)-5; dy = (/:mousey-/:lasty)/3; @@ -3982,9 +4250,9 @@ alpha = 100; ")); - $p->nextFrame(); + $p->nextFrame(); - $p->add(new SWFAction(" + $p->add(new SWFAction(" this.x = x; this.y = y; @@ -3995,16 +4263,16 @@ alpha -= 8; ")); - $p->nextFrame(); + $p->nextFrame(); - $p->add(new SWFAction("prevFrame(); play();")); - $p->nextFrame(); + $p->add(new SWFAction("prevFrame(); play();")); + $p->nextFrame(); - $i = $m->add($p); - $i->setName('frames'); - $m->nextFrame(); + $i = $m->add($p); + $i->setName('frames'); + $m->nextFrame(); - $m->add(new SWFAction(" + $m->add(new SWFAction(" lastx = mousex; lasty = mousey; @@ -4016,17 +4284,18 @@ if(num == 11) num = 1; -removeClip('char' & num); -duplicateClip(/frames, 'char' & num, num); +removeClip('char' & num); +duplicateClip(/frames, 'char' & num, num); ")); - $m->nextFrame(); - $m->add(new SWFAction("prevFrame(); play();")); + $m->nextFrame(); + $m->add(new SWFAction("prevFrame(); play();")); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -4039,46 +4308,47 @@ <example> <title><function>swfaction</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php /* sprite has one letter per frame */ $p = new SWFSprite(); - $p->add(new SWFAction("stop();")); + $p->add(new SWFAction("stop();")); $chars = "abcdefghijklmnopqrstuvwxyz". - "ABCDEFGHIJKLMNOPQRSTUVWXYZ". - "1234567890!@#$%^&*()_+-=/[]{}|;:,.<>?`~"; + "ABCDEFGHIJKLMNOPQRSTUVWXYZ". + "1234567890!@#$%^&/*()_+-=/[]{}|;:,.<>?`~"; $f = new SWFFont("_sans"); for($n=0; $nremove($i); $t = new SWFTextField(); - $t->setFont($f); - $t->setHeight(240); - $t->setBounds(600,240); - $t->align(SWFTEXTFIELD_ALIGN_CENTER); - $t->addString($c); - $i = $p->add($t); - $p->labelFrame($c); - $p->nextFrame(); + $t->setFont($f); + $t->setHeight(240); + $t->setBounds(600,240); + $t->align(SWFTEXTFIELD_ALIGN_CENTER); + $t->addString($c); + $i = $p->add($t); + $p->labelFrame($c); + $p->nextFrame(); } /* hit region for button - the entire frame */ $s = new SWFShape(); - $s->setFillStyle0($s->addSolidFill(0, 0, 0, 0)); - $s->drawLine(600, 0); - $s->drawLine(0, 400); - $s->drawLine(-600, 0); - $s->drawLine(0, -400); + $s->setFillStyle0($s->addSolidFill(0, 0, 0, 0)); + $s->drawLine(600, 0); + $s->drawLine(0, 400); + $s->drawLine(-600, 0); + $s->drawLine(0, -400); /* button checks for pressed key, sends sprite to the right frame */ $b = new SWFButton(); - $b->addShape($s, SWFBUTTON_HIT); + $b->addShape($s, SWFBUTTON_HIT); for($n=0; $naddAction(new SWFAction(" @@ -4089,23 +4359,26 @@ } $m = new SWFMovie(); - $m->setDimension(600,400); - $i = $m->add($p); - $i->setName('char'); - $i->moveTo(0,80); + $m->setDimension(600,400); + $i = $m->add($p); + $i->setName('char'); + $i->moveTo(0,80); - $m->add($b); + $m->add($b); header('Content-type: application/x-shockwave-flash'); - $m->output(); + $m->output(); -?> +?> +]]> </programlisting> </example> </para> </refsect1> </refentry> + </reference> + <!-- Keep this comment at the end of the file Local variables: mode: sgml Index: phpdoc/ja/functions/misc.xml diff -u phpdoc/ja/functions/misc.xml:1.24 phpdoc/ja/functions/misc.xml:1.25 --- phpdoc/ja/functions/misc.xml:1.24 Wed Dec 12 15:53:20 2001 +++ phpdoc/ja/functions/misc.xml Sat Jan 26 03:55:51 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.25 $ --> <reference id="ref.misc"> <title>ãã®ä»ã®é¢æ°</title> <titleabbrev>ãã®ä»</titleabbrev> @@ -21,7 +22,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>connection_aborted</function></funcdef> - <paramdef>void <parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> <simpara> @@ -43,7 +44,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>connection_status</function></funcdef> - <paramdef>void <parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> <simpara> @@ -65,7 +66,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>connection_timeout</function></funcdef> - <paramdef>void <parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> <simpara> @@ -111,14 +112,16 @@ <example> <title><function>constant</function> ã®ä¾</title> <programlisting role="php"> -<php +<![CDATA[ +<?php define ("MAXSIZE", 100); echo MAXSIZE; echo constant("MAXSIZE"); // åã®è¡ã¨åä½ã¯åã -?> +?> +]]> </programlisting> </example> </para> @@ -169,7 +172,8 @@ <example> <title>宿°ã®å®ç¾©</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php define ("CONSTANT", "Hello world."); echo CONSTANT; // "Hello world."ãåºåãã¾ãã echo Constant; // "Constant"ãåºåããè¦åãçºçãã¾ãã @@ -178,7 +182,8 @@ echo GREETING; // "Hello you."ãåºå echo Greeting; // "Hello you."ãåºå -?> +?> +]]> </programlisting> </example> </para> @@ -215,11 +220,13 @@ <example> <title>宿°ã®ãã§ãã¯</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php if (defined("CONSTANT")){ // å¼ç¨ç¬¦ã§æ¬ããã¦ããå¿ è¦ãããã¾ã echo CONSTANT; // } -?> +?> +]]> </programlisting> </example> </para> @@ -234,65 +241,13 @@ <refentry id="function.die"> <refnamediv> <refname>die</refname> - <refpurpose> - ã¡ãã»ã¼ã¸ãåºåããç¾å¨ã®ã¹ã¯ãªãããçµäºãã - </refpurpose> + <refpurpose><function>exit</function>ã®ã¨ã¤ãªã¢ã¹</refpurpose> </refnamediv> <refsect1> <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>die</function></funcdef> - <paramdef>string <parameter>message</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - <function>die</function> ã¯ã<parameter>message</parameter> ãåº - åããã¹ã¯ãªããã®å¦çãçµäºãã¾ãããã®é¢æ°ã¯å¤ãä½ãè¿ãã¾ããã - </simpara> - <simpara> - ã¾ãã<function>die</function> ã«ã¯ããã©ã¡ã¼ã¿ã¨ãã¦é¢æ°ãæå®å¯ - è½ã§ãããã®é¢æ°ã¯ã<function>die</function> ãã¹ã¯ãªããã®ãã¼ã¹ - ãçµäºããåã«å®è¡ããã¾ãã - </simpara> <para> - <example> - <title><function>die</function> ã®ä¾</title> - <programlisting role="php"> -<?php - -$filename = '/path/to/data-file'; -$file = fopen ($filename, 'r') - or die("unable to open file ($filename)"); - -?> - </programlisting> - </example> - </para> - <para> - <example> - <title>颿°ã使ç¨ãã<function>die</function>ã®ä¾</title> - <programlisting role="php"> -<?php - -function handle_error($msg) { - if ($fp = @fopen("/tmp/error.log", "a")) { - fwrite($fp, $msg, strlen($msg)); - fclose($fp); - } -} - -if ($bad) { - die(handle_error("Something bad happened.\n")); -} - -?> - </programlisting> - </example> + ãã®é¢æ°ã¯<function>exit</function>ã®ã¨ã¤ãªã¢ã¹ã§ãã </para> - <simpara> - <function>exit</function>ãåç §ä¸ããã - </simpara> </refsect1> </refentry> @@ -330,10 +285,10 @@ </simpara> <simpara> <literal>return</literal> æã¯ãæååã®è©ä¾¡ããã ã¡ã«çµäºãã¾ãã - PHP4ã§ã¯ã<function>eval</function>颿°ã®çµæã®å¤ãè¿ãããã« - <literal>return</literal>ã使ç¨ãããã¨ãå¯è½ã§ãã䏿¹ãPHP3ã§ã¯ã - <function>eval</function>ã®åã¯<literal>void</literal>ã§ãããå¤ - ãä½ãè¿ãã¾ããã + PHP4ã§ã¯ã<function>eval</function>颿°ã¯ &false;ãè¿ãã¾ãããã + ãªãã°ãçµæã®å¤ãè¿ãããã«<literal>return</literal>ã使ç¨ããã + ã¨ãå¯è½ã§ãã䏿¹ãPHP3ã§ã¯ã<function>eval</function>ã®å㯠+ <literal>void</literal>ã§ãããå¤ãä½ãè¿ãã¾ããã </simpara> <para> <example> @@ -341,48 +296,89 @@ <function>eval</function>ã®ä¾ - ç°¡åãªããã¹ãã®ãã¼ã¸ </title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $string = 'cup'; $name = 'coffee'; -$str = 'This is a $string with my $name in it.<br>'; +$str = 'This is a $string with my $name in it.<br>'; echo $str; -eval( "\$str = \"$str\";" ); +eval ("\$str = \"$str\";"); echo $str; -?> +?> +]]> </programlisting> - </example> - </para> - <para> - ä¸ã®ä¾ã¯ã以ä¸ã表示ãã¾ãã - <programlisting> + <para> + ä¸ã®ä¾ã¯ã以ä¸ã表示ãã¾ãã + <screen> +<![CDATA[ This is a $string with my $name in it. This is a cup with my coffee in it. - </programlisting> +]]> + </screen> + </para> + </example> </para> + &tip.ob-capture; </refsect1> </refentry> <refentry id="function.exit"> <refnamediv> <refname>exit</refname> - <refpurpose>ç¾å¨ã®ã¹ã¯ãªãããçµäºãã¾ã</refpurpose> + <refpurpose>ã¡ãã»ã¼ã¸ãåºåããã«ã¬ã³ãã®ã¹ã¯ãªãããçµäºãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>void <function>exit</function></funcdef> - <paramdef>mixed <parameter>status</parameter></paramdef> + <paramdef>string + <parameter><optional>status</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> + <note> + <simpara> + ãã®é¢æ°ã¯å®éã«ã¯é¢æ°ã§ã¯ãªãè¨èªæ§é ã§ãã + </simpara> + </note> <simpara> <function>exit</function> 颿°ã¯ãã¹ã¯ãªããã®å®è¡ãçµäºãã¾ãã - è¿ãå¤ã¯ãªãã§ããã<parameter>status</parameter>ãçµäºã¹ãã¼ã¿ã¹ - ã¨ãã¦ä½¿ç¨ãã¾ãã + çµäºç´åã«<parameter>status</parameter>ãåºåãã¾ãã </simpara> <simpara> - <function>die</function>ãåç §ä¸ããã + <parameter>status</parameter>ã<type>integer</type>ã®å ´åããã®å¤ + ãçµäºã¹ãã¼ã¿ã¹ã¨ãã¦ä½¿ç¨ããã¾ãã </simpara> + <note> + <simpara> + ã«ã¬ã³ãã®CVSçã¯ã<type>integer</type>ã®å ´åã + <parameter>status</parameter>ãåºåãã¾ããã + </simpara> + </note> + <note> + <simpara> + 颿°<function>die</function>ã¯ã<function>exit</function>ã®ã¨ã¤ + ãªã¢ã¹ã§ãã + </simpara> + </note> + <para> + <example> + <title><function>exit</function>ã®ä¾</title> + <programlisting role="php"> +<![CDATA[ +<?php + +$filename = '/path/to/data-file'; +$file = fopen ($filename, 'r') + or exit("unable to open file ($filename)"); + +?> +]]> + </programlisting> + <!-- TODO: example with integer exit-statis --> + </example> + </para> </refsect1> </refentry> @@ -433,17 +429,19 @@ <example> <title><function>get_browser</function>ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php function list_array ($array) { - while (list ($key, $value) = each ( $array ) ) { - $str .= "<b>$key:</b> $value<br>\n"; - } - return $str; + while (list ($key, $value) = each ($array)) { + $str .= "<b>$key:</b> $value<br>\n"; + } + return $str; } -echo "$HTTP_USER_AGENT<hr>\n"; +echo "$HTTP_USER_AGENT<hr>\n"; $browser = get_browser(); echo list_array ((array) $browser); -?> +?> +]]> </programlisting> </example> </para> @@ -451,26 +449,28 @@ ä¸ã®ã¹ã¯ãªããã®åºåã¯ã次ã®ããã«ãªãã¾ãã </simpara> <programlisting> -Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586)<hr> -<b>browser_name_pattern:</b> Mozilla/4\.5.*<br> -<b>parent:</b> Netscape 4.0<br> -<b>platform:</b> Unknown<br> -<b>majorver:</b> 4<br> -<b>minorver:</b> 5<br> -<b>browser:</b> Netscape<br> -<b>version:</b> 4<br> -<b>frames:</b> 1<br> -<b>tables:</b> 1<br> -<b>cookies:</b> 1<br> -<b>backgroundsounds:</b> <br> -<b>vbscript:</b> <br> -<b>javascript:</b> 1<br> -<b>javaapplets:</b> 1<br> -<b>activexcontrols:</b> <br> -<b>beta:</b> <br> -<b>crawler:</b> <br> -<b>authenticodeupdate:</b> <br> -<b>msn:</b> <br> +<![CDATA[ +Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586)<hr> +<b>browser_name_pattern:</b> Mozilla/4\.5.*<br> +<b>parent:</b> Netscape 4.0<br> +<b>platform:</b> Unknown<br> +<b>majorver:</b> 4<br> +<b>minorver:</b> 5<br> +<b>browser:</b> Netscape<br> +<b>version:</b> 4<br> +<b>frames:</b> 1<br> +<b>tables:</b> 1<br> +<b>cookies:</b> 1<br> +<b>backgroundsounds:</b> <br> +<b>vbscript:</b> <br> +<b>javascript:</b> 1<br> +<b>javaapplets:</b> 1<br> +<b>activexcontrols:</b> <br> +<b>beta:</b> <br> +<b>crawler:</b> <br> +<b>authenticodeupdate:</b> <br> +<b>msn:</b> <br> +]]> </programlisting> <simpara> ãããåä½ãããããã«ã¯ãè¨å®ãã¡ã¤ã«ã® @@ -494,7 +494,7 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>boolean <function>highlight_file</function></funcdef> + <funcdef>bool <function>highlight_file</function></funcdef> <paramdef>string <parameter>filename</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -529,45 +529,48 @@ <para> <informalexample> <programlisting> -<Location /source> +<![CDATA[ +<Location /source> ForceType application/x-httpd-php -</Location> +</Location> +]]> </programlisting> </informalexample> </para> <simpara> - ããã¦ã"source" ã¨ããååã®ãã¡ã¤ã«ã使ããããã - Webã®ã«ã¼ããã£ã¬ã¯ããªã«ç½®ãã¾ãã + ããã¦ã"source"ã¨ããååã®ãã¡ã¤ã«ã使ãããããWebã®ã«ã¼ã + ãã£ã¬ã¯ããªã«ç½®ãã¾ãã </simpara> <para> <programlisting role="php"> -<HTML> -<HEAD> -<TITLE>Source Display</TITLE> -</HEAD> -<BODY BGCOLOR="white"> -<?php - $script = getenv ("PATH_TRANSLATED"); +<![CDATA[ +<HTML> +<HEAD> +<TITLE>Source Display</TITLE> +</HEAD> +<BODY BGCOLOR="white"> +<?php + $script = getenv ("PATH_TRANSLATED"); if(!$script) { - echo "<BR><B>ERROR: Script Name needed</B><BR>"; + echo "<BR><B>ERROR: Script Name needed</B><BR>"; } else { - if (ereg("(\.php|\.inc)$",$script)) { - echo "<H1>Source of: $PATH_INFO</H1>\n<HR>\n"; - highlight_file($script); + if (ereg("(\.php|\.inc)$",$script)) { + echo "<H1>Source of: $PATH_INFO</H1>\n<HR>\n"; + highlight_file($script); } else { - echo "<H1>ERROR: Only PHP or include script names are allowed</H1>"; + echo "<H1>ERROR: Only PHP or include script names are allowed</H1>"; } } - echo "<HR>Processed: ".date("Y/M/d H:i:s",time()); -?> -</BODY> -</HTML> + echo "<HR>Processed: ".date("Y/M/d H:i:s",time()); +?> +</BODY> +</HTML> +]]> </programlisting> </para> <simpara> - ããã«ããã"/path/to/script.php" ã«ããã¹ã¯ãªããã® - ã«ã©ã¼è¡¨ç¤ºã表示ããããã«ä»¥ä¸ã®URLã使ç¨ãããã¨ãã§ããããã« - ãªãã¾ãã + ããã«ããã"/path/to/script.php"ã«ããã¹ã¯ãªããã®ã«ã©ã¼è¡¨ç¤ºã + 表示ããããã«ä»¥ä¸ã®URLã使ç¨ãããã¨ãã§ããããã«ãªãã¾ãã </simpara> <para> <informalexample> @@ -578,6 +581,7 @@ </para> </example> </para> + &tip.ob-capture; <simpara> <function>highlight_string</function>, <function>show_source</function>ãåç §ä¸ããã @@ -594,7 +598,7 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>boolean <function>highlight_string</function></funcdef> + <funcdef>bool <function>highlight_string</function></funcdef> <paramdef>string <parameter>str</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -602,8 +606,9 @@ <function>highlight_string</function> 颿°ã¯ãPHPçµè¾¼ã¿ã®æ§æã㤠ã©ã¤ã¿ã§å®ç¾©ãããã«ã©ã¼ã使ç¨ãã¦<parameter>str</parameter>ãæ§ æãã¤ã©ã¤ã表示ããããã®ãåºåãã¾ãã - æåæã«&true;ãããã§ãªãå ´åã«&false;ãè¿ãã¾ãã(PHP 4) + &return.success; </simpara> + &tip.ob-capture; <simpara> <function>highlight_file</function>, <function>show_source</function>ãåç §ä¸ããã @@ -834,7 +839,9 @@ <example> <title>ãã©ã¼ãããæååã®ããã¯</title> <programlisting role="php"> -$binarydata = pack("nvc*", 0x1234, 0x5678, 65, 66); +<![CDATA[ +$binarydata = pack ("nvc*", 0x1234, 0x5678, 65, 66); +]]> </programlisting> <para> ãã®çµæã®ãã¤ããªæååã¯ã6ãã¤ãé·ã§ããã @@ -849,10 +856,10 @@ ããã </para> <para> - PHP ã¯å é¨çã«å¤ããã·ã³ä¾åã®å¤§ããã®ç¬¦å·ä»ã®å¤ã¨ãã¦ä¿æãã - ãã¨ã«ã注æãã¦ä¸ããã + PHP ã¯å é¨çã«å¤ããã·ã³ä¾åã®å¤§ããã®ç¬¦å·ä»ã® + <type>integer</type>å¤ã¨ãã¦ä¿æãããã¨ã«ã注æãã¦ä¸ããã ãã®ããã«ä¿æããã«ã¯å¤§ãããã符å·ç¡ãã®å¤ãä¸ããå ´åã - åç²¾åº¦å®æ°ã«å¤æããéã«ãã°ãã°æå¾ å¤ãã®çµæã¨ãªãã¾ãã + <type>float</type>ã«å¤æããéã«ãã°ãã°æå¾ å¤ãã®çµæã¨ãªãã¾ãã </para> </refsect1> </refentry> @@ -866,7 +873,7 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>boolean <function>show_source</function></funcdef> + <funcdef>bool <function>show_source</function></funcdef> <paramdef>string <parameter>filename</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -927,7 +934,7 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>uniqid</function></funcdef> + <funcdef>string <function>uniqid</function></funcdef> <paramdef>string <parameter>prefix</parameter></paramdef> <paramdef>bool <parameter> @@ -965,8 +972,10 @@ ãã¼)ãæ¬¡ã®ä¾ã®ããã«ããã®ãæ¨å¥¨ããã¾ãã <informalexample> <programlisting role="php"> -$token = md5 (uniqid ("")); // ã©ã³ãã è¦ç´ ãªã -$better_token = md5 (uniqid (rand())); // æ¨æ¸¬ãå°é£ã§ãããããåªãã¦ããã +<![CDATA[ +$token = md5(uniqid("")); // ã©ã³ãã è¦ç´ ãªã +$better_token = md5(uniqid(rand(),1)); // æ¨æ¸¬ãå°é£ã§ãããããåªãã¦ããã +]]> </programlisting> </informalexample> </para> @@ -1003,7 +1012,9 @@ <example> <title>ãã©ã¼ãããæååã®<function>unpack</function></title> <programlisting role="php"> +<![CDATA[ $array = unpack ("c2chars/nint", $binarydata); +]]> </programlisting> <para> çµæã®é åã¯ãã¨ã³ã㪠"chars1","chars2","int" ãä¿æãã¾ãã @@ -1053,6 +1064,7 @@ </refentry> </reference> + <!-- Keep this comment at the end of the file Local variables: mode: sgml Index: phpdoc/ja/functions/mnogosearch.xml diff -u phpdoc/ja/functions/mnogosearch.xml:1.7 phpdoc/ja/functions/mnogosearch.xml:1.8 --- phpdoc/ja/functions/mnogosearch.xml:1.7 Wed Dec 12 15:53:21 2001 +++ phpdoc/ja/functions/mnogosearch.xml Sat Jan 26 03:55:51 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.8 $ --> <reference id="ref.mnogo"> <title>mnoGoSearch 颿°</title> <titleabbrev>mnoGoSearch</titleabbrev> @@ -6,13 +7,15 @@ <simpara> ããã§ç¤ºã颿°ã«ãããããªã¼ã®æ¤ç´¢ã¨ã³ã¸ã³ mnoGoSearch (æ§å㯠UdmSearch)ã¸ã¢ã¯ã»ã¹ãããã¨ãå¯è½ã¨ãªãã¾ãããããã®é¢æ°ãå©ç¨å¯ - è½ã¨ããããã«ã¯ããªãã·ã§ã³ <option - role="configure">--with-mnogosearch</option> ã«ãã mnogosearchãµ - ãã¼ããæå®ãã¦PHPãã³ã³ãã¤ã«ããå¿ è¦ãããã¾ããmnogosearchã®ã - ã¹ãæå®ããã«ãã®ãªãã·ã§ã³ã使ç¨ããå ´åãPHPã¯ããã©ã«ãã§ - mnogosearchã/usr/local/mnogosearchã«ãããã®ã¨ãã¦æ¤ç´¢ãè¡ãã¾ãã - mnogosearchãä»ã®å ´æã«ã¤ã³ã¹ãã¼ã«ãã¦ããå ´åã«ã¯ã - <option role="configure">--with-mnogosearch=DIR</option>ã®ããã«ã + è½ã¨ããããã«ã¯ããªãã·ã§ã³<link + linkend="install.configure.with-mnogosearch"><option + role="configure">--with-mnogosearch</option></link>ã«ãã + mnogosearchãµãã¼ããæå®ãã¦PHPãã³ã³ãã¤ã«ããå¿ è¦ãããã¾ãã + mnogosearchã®ãã¹ãæå®ããã«ãã®ãªãã·ã§ã³ã使ç¨ããå ´åãPHPã¯ã + ãã©ã«ãã§mnogosearchã/usr/local/mnogosearchã«ãããã®ã¨ãã¦æ¤ç´¢ + ãè¡ãã¾ããmnogosearchãä»ã®å ´æã«ã¤ã³ã¹ãã¼ã«ãã¦ããå ´åã«ã¯ã + <link linkend="install.configure.with-mnogosearch"><option + role="configure">--with-mnogosearch=DIR</option></link>ã®ããã«ã ã®ãã¹ãæå®ããå¿ è¦ãããã¾ãã </simpara> <para> @@ -41,7 +44,8 @@ configureã«MySQLãã¤ã³ã¹ãã¼ã«ãããã£ã¬ã¯ããªãæå®ããå¿ è¦ã ããã¾ããããã¯ãmnoGoSearchã«é¢ããè¨å®ã§ä½¿ç¨ãããä¾ãã°ã次㮠ããã«ãªãã¾ãã - <option role="configure">--with-mnogosearch --with-mysql=/usr</option> + <link linkend="install.configure.with-mnogosearch"><option role="configure"> + --with-mnogosearch --with-mysql=/usr</option></link> </para> </note> <simpara> @@ -54,283 +58,6 @@ </simpara> </partintro> - <refentry id="function.udm-alloc-agent"> - <refnamediv> - <refname>udm_alloc_agent</refname> - <refpurpose>mnoGoSearch ã»ãã·ã§ã³ã確ä¿ãã</refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>udm_alloc_agent</function></funcdef> - <paramdef>string <parameter>dbaddr</parameter></paramdef> - <paramdef>string - <parameter> - <optional>dbmode</optional> - </parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>udm_alloc_agent</function> ã¯ãæåæã«mnogosearchã¨ã¼ - ã¸ã§ã³ãIDãã¨ã©ã¼æã«&false;ãè¿ãã¾ãããã®é¢ - æ°ã¯ããã¼ã¿ãã¼ã¹ãã©ã¡ã¼ã¿ãæããã»ãã·ã§ã³ãçæãã¾ãã - </para> - <para> - <parameter>dbaddr</parameter> - URLå½¢å¼ã®ãã¼ã¿ãã¼ã¹åãSQLãã¼ - ã¿ãã¼ã¹ã¸æ¥ç¶ããéã®ãªãã·ã§ã³(åããã¹ãããã¼ã¿ãã¼ã¹åããã¼ - ããã¦ã¼ã¶ããã¹ã¯ã¼ã)ã - çµã¿è¾¼ã¿ã®ããã¹ããã¡ã¤ã«ãµãã¼ãã«ã¯é¢ä¿ããã¾ããããã©ã¼ãã - ã: DBAddr DBType:[//[DBUser[:DBPass]@]DBHost[:DBPort]]/DBName/ - ç¾å¨ããµãã¼ãããã¦ãã DBType ã®å¤ã¯æ¬¡ã®ãã®ã§ãã: mysql, - pgsql, msql, solid, mssql, oracle, ibase - å®éããã¼ãã£ããªã©ã¤ãã©ãªã®ãµãã¼ãã¯éè¦ã§ã¯ããã¾ããããããã - ODBCã¦ã¼ã¶ã¯ããµãã¼ããããå¤ã®ä¸ã¤ãæå®ããå¿ è¦ãããã¾ãã使 - ç¨ãããã¼ã¿ãã¼ã¹åããµãã¼ãããã¦ããªãå ´åã"unknown"ã代ãã - ã«ä½¿ç¨ãããã¨ãå¯è½ã§ãã - </para> - <para> - <parameter>dbmode</parameter> - åèªã®è¨æ¶ç¨SQLãã¼ã¿ãã¼ã¹ã¢ã¼ - ãã鏿å¯è½ã§ãã"single"ãæå®ããå ´åãå ¨ã¦ã®åèªã¯ãåããã¼ - ãã«ã«ä¿åããã¾ãã"multi"ã鏿ããå ´åãåèªã¯ãã®é·ãã«å¿ã㦠- å¥ã ã®ãã¼ãã«ã«ä¿åããã¾ãã"multi"ã¢ã¼ãã®æ¹ãé常é«éã§ããã - ãã¼ã¿ãã¼ã¹ä¸ã§ããå¤ãã®ãã¼ãã«ãå¿ è¦ã¨ãã¾ãã"crc"ã¢ã¼ããé¸ - æãããå ´åãmnoGoSearch ã¯ãåèªã®ä»£ããã«CRC32ã¢ã«ã´ãªãºã ã§è¨ - ç®ããã32ãããæ´æ°ã®åèªIDãä¿åãã¾ãããã®ã¢ã¼ãã§å¿ è¦ãªã㣠- ã¹ã¯å®¹éã¯ããå°ããã§ããã"single"ããã³"multi"ã¢ã¼ãã¨æ¯è¼ã㦠- ããé«éã§ãã"crc-multi" ã¯ã"crc"ã¢ã¼ãã¨åãè¨æ¶æ§é ã使ç¨ãã¾ - ããã"multi"ã¢ã¼ãã®ããã«åèªé·ã«å¿ãã¦å¥ã ã®ãã¼ã¿ãã¼ã¹ã«åèª - ãä¿åãã¾ãããã©ã¼ããã: DBMode single/multi/crc/crc-multi - </para> - <note> - <para> - <parameter>dbaddr</parameter> ããã³ - <parameter>dbmode</parameter> ã¯ãã¤ã³ããã¯ã¹ä½ææã«ä½¿ç¨ããã - ãããã®é¸æåã«ä¸è´ãã¦ããå¿ è¦ãããã¾ãã - </para> - </note> - <note> - <para> - å®éããããã®é¢æ°ã¯ãã¼ã¿ãã¼ã¹ã¸ã®æ¥ç¶ããªã¼ãã³ããå¿ è¦ã¯ãªãã - ãã£ã¦ããã°ã¤ã³åããã¹ã¯ã¼ãã確èªãã¾ãããå®éã®ãã¼ã¿ãã¼ã¹ - ã¸ã®æ¥ç¶ããã³ãã°ã¤ã³/ãã¹ã¯ã¼ãèªè¨¼ã¯ã - <function>udm_find</function>ã§è¡ããã¾ãã - </para> - </note> - </refsect1> - </refentry> - - <refentry id="function.udm-set-agent-param"> - <refnamediv> - <refname>udm_set_agent_param</refname> - <refpurpose> - mnoGoSearch ã¨ã¼ã¸ã§ã³ãã®ã»ãã·ã§ã³ãã©ã¡ã¼ã¿ãè¨å®ãã - </refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>udm_set_agent_param</function></funcdef> - <paramdef>int <parameter>agent</parameter></paramdef> - <paramdef>int <parameter>var</parameter></paramdef> - <paramdef>string <parameter>val</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>udm_set_agent_param</function> ã¯æåæã« - &true;ãã¨ã©ã¼æã«&false;ãè¿ã - ã¾ããmnoGoSearch ã»ãã·ã§ã³ãã©ã¡ã¼ã¿ãå®ç¾©ãã¾ãã - </para> - <simpara> - 以ä¸ã®ãã©ã¡ã¼ã¿ããã³ãããã®å¤ãå©ç¨å¯è½ã§ãã - </simpara> - <itemizedlist> - <listitem> - <simpara> - UDM_PARAM_PAGE_NUM - ã¯ãã¼ã¸çªå·ãæ¤ç´¢çµæã¨ããããã«ä½¿ç¨ã - ãã¾ãã(çµæã¯ããã¼ã¸æ¯ã«UDM_PARAM_PAGE_SIZEåã®çµæãæãã0 - ããå§ã¾ããã¼ã¸ã§è¿ããã¾ã) - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_PAGE_SIZE - ã¯ä¸ãã¼ã¸ã«è¡¨ç¤ºãããæ¤ç´¢çµæã®æ°ã - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_SEARCH_MODE - æ¤ç´¢ã¢ã¼ããæ¬¡ã®å¤ãå©ç¨å¯è½ã§ãã: - UDM_MODE_ALL - å ¨ã¦ã®åèªãæ¤ç´¢ãã¾ãã; - UDM_MODE_ANY - å ¨ã¦ã®åèªã§æ¤ç´¢ãã; - UDM_MODE_PHRASE - çèªæ¤ç´¢; - UDM_MODE_BOOL - è«ç夿¤ç´¢ãè«ç夿¤ç´¢ã«é¢ãã詳細ã«ã¤ãã¦ã¯ - <function>udm_find</function> ãåç §ä¸ããã - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_CACHE_MODE - æ¤ç´¢çµæã®ãã£ãã·ã¥ã¢ã¼ãããªã³ã¾ãã¯ãª - ãã«ãã¾ããæå¹ã®å ´åãæ¤ç´¢ã¨ã³ã¸ã³ã¯æ¤ç´¢çµæããã£ã¹ã¯ã«ä¿å - ãã¾ããä¼¼ããããªæ¤ç´¢ãå¾ã§å®è¡ãããå ´åãã¨ã³ã¸ã³ã¯ããé«é - ã«ãã£ãã·ã¥ããçµæãå¾ããã¨ãå¯è½ã§ãã - å©ç¨å¯è½ãªå¤: UDM_CACHE_ENABLED, UDM_CACHE_DISABLED. - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_TRACK_MODE - ã¯ã¨ãªè¿½è·¡ã¢ã¼ãããªã³ã¾ãã¯ãªãã«ãã¾ãã - ãã¼ã¸ã§ã³3.1.2以éãmnoGoSearch ã¯ã¯ã¨ãªè¿½è·¡ã¢ã¼ãããµãã¼ãã - ã¦ãã¾ãã追跡ã¯SQLãã¼ã¸ã§ã³ã«ã®ã¿å®è£ ããã¦ãããçµã¿è¾¼ã¿ãã¼ - ã¿ãã¼ã¹ã§ã¯å©ç¨ã§ãã¾ããã追跡ã使ç¨ããã«ã¯ããã¼ãã«ã追跡 - ãµãã¼ãç¨ã«ä½æããå¿ è¦ãããã¾ããMySQLã®å ´åã - create/mysql/track.txtã使ç¨ãã¦ä¸ãããæ¤ç´¢å®è¡æã«ãããã³ã - ã¨ã³ãã¯ã¯ã¨ãªåèªãè¦ã¤ããããã¥ã¡ã³ãã®æ°ãã«ã¬ã³ãã®ç§åä½ - ã®UNIXã¿ã¤ã ã¹ã¿ã³ããä¿åããããã«ãããã®ãã¼ãã«ã使ç¨ãã¾ - ãã - å©ç¨å¯è½ãªå¤: UDM_TRACK_ENABLED, UDM_TRACK_DISABLED. - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_PHRASE_MODE - çèªãç¨ããã¤ã³ããã¯ã¹ãã¼ã¿ãã¼ã¹ã - ã©ãããå®ç¾©ãã¾ãã(indexer.confã«ããã"phrase" ãã©ã¡ã¼ã¿) - 使ç¨å¯è½ãªå¤: UDM_PHRASE_ENABLED ããã³ UDM_PHRASE_DISABLEDã - çèªæ¤ç´¢ãæå¹ãªå ´å(UDM_PHRASE_ENABLED)ã§ããå ¨ã¦ã®ã¢ã¼ã - (ANYãALLãBOOLãPHRASE)ã§æ¤ç´¢ãå¯è½ã§ãããã¨ã«æ³¨æãã¦ä¸ããã - mnoGoSearchã®ãã¼ã¸ã§ã³3.1.10ã§çèªæ¤ç´¢ãSQLã¨çµã¿è¾¼ã¿ãã¼ã¿ãã¼ - ã¹ã¢ã¼ãã§ã®ã¿ãµãã¼ãããã¾ããã䏿¹ã3.1.11ã§çèªãcachemode - ã§ããµãã¼ãããå§ãã¾ããã - </simpara> - <simpara> - çèªæ¤ç´¢ã®ä¾: - </simpara> - <simpara> - "Arizona desert" - ãã®ã¯ã¨ãªã¯ã"Arizona desert"ãçèªã¨ãã¦å« - ãå ¨ã¦ã®ããã¥ã¡ã³ããè¿ãã¾ããçèªã®åå¾ã«äºéå¼ç¨ç¬¦ãå¿ è¦ã§ - ãããã¨ã«æ³¨æãã¦ä¸ããã - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_CHARSET - ãã¼ã«ã«ãªcharsetãå®ç¾©ãã¾ããå©ç¨å¯è½ãªå¤: - mnoGoSearchã«ãããµãã¼ããããcharsetã®çµ, - ä¾ãã°ãkoi8-r, cp1251, ... - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_STOPFILE - stopfileã®ååã¨ãã¹ãå®ç¾©ãã¾ãã - (mnoGoSearchã¨è¥å¹²éããããã¾ããã¤ã¾ããmnoGoSearchã«ããã¦ã¯ã - ç¸å¯¾ãã¹ã¾ãã¯ãã¹ãå ¥åãããªãã£ãå ´åãUDM_CONF_DIRã«é¢ã㦠- ãã®ãã¡ã¤ã«ãæ¢ããã¾ããã¢ã¸ã¥ã¼ã«ã¯ããã®ãã¡ã¤ã«ãã«ã¬ã³ã - ã®ãã¹(ããªãã¡ãPHPã¹ã¯ãªãããå®è¡ããããã¹)ã§æ¢ãã¾ãã - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_STOPTABLE - æå®ããSQLãã¼ãã«ãã忢åèªããã¼ãã - ã¾ããè¤æ°ã®StopwordTableã³ãã³ãã使ç¨å¯è½ã§ãããã®ã³ãã³ãã¯ã - SQLãã¼ã¿ãã¼ã¹ãµãã¼ããæå¹ã«ããã«ã³ã³ãã¤ã«ããå ´åã¯ä½¿ç¨ã§ - ãã¾ããã - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_WEIGHT_FACTOR - æå®ããããã¥ã¡ã³ãé¨åã®éã¿ä¿æ°ã - 表ãã¾ããç¾å¨ãbody, title, keywords, description, urlããµãã¼ - ãããã¦ãã¾ãããã®æ©è½ãæå¹ã«ããã«ã¯ãindexer.confã®*Weight - ã³ãã³ãã«2ã®ç´¯ä¹ãæå®ãã¦ä¸ãããããã§æ¬¡ã®ãããªéã¿ãæå®ã - ãå ´åãèãã¦ã¿ã¾ãããã - </simpara> - <simpara>URLWeight 1</simpara> - <simpara>BodyWeight 2</simpara> - <simpara>TitleWeight 4</simpara> - <simpara>KeywordWeight 8</simpara> - <simpara>DescWeight 16</simpara> - <simpara> - åãããã¥ã¡ã³ãã«ããã¤ãã®åèªãè¤æ°åç¾ããå ´åã - indexerãåèªã®éã¿ã«ORæ¼ç®åã使ç¨ããã®ã§ãç°ãªã£ãããã¥ã¡ã³ - ãã®é¨åã«åèªãç¾ããåæ°ãæ¤åºå¯è½ã§ããå ¨ã¦ã®ããã¥ã¡ã³ãé¨ - åã§ä½¿ç¨ãããåèªã¯ãéã¿éå 00011111 ãæãã¾ãã - </simpara> - <simpara> - ãã®ãã©ã¡ã¼ã¿ã®å¤ã¯ã16鲿°æåå ABCDE ã§ããåæ¡ã¯ãåèªéã¿ - ã®å¯¾å¿ãããããã®å åã§ããä¸ã§æå®ããéã¿è¨å®ã¯æ¬¡ã®ããã«ãª - ãã¾ãã - </simpara> - <simpara>E ã¯éã¿1ã®å å (URL Weight ããã)</simpara> - <simpara>D ã¯éã¿2ã®å å (BodyWeight ããã)</simpara> - <simpara>C ã¯éã¿4ã®å å (TitleWeight ããã)</simpara> - <simpara>B ã¯éã¿8ã®å å (KeywordWeight ããã)</simpara> - <simpara>A ã¯éã¿16ã®å å (DescWeight ããã)</simpara> - <simpara> - ä¾: - </simpara> - <simpara> - UDM_PARAM_WEIGHT_FACTOR=00001 ã¯ãURLã®ã¿ãæ¤ç´¢ãã¾ãã - </simpara> - <simpara> - UDM_PARAM_WEIGHT_FACTOR=00100 ã¯ãTitleã®ã¿ãæ¤ç´¢ãã¾ãã - </simpara> - <simpara> - UDM_PARAM_WEIGHT_FACTOR=11100 ã¯ãTitle,Keywords,Desctriptionã - æ¤ç´¢ãã¾ãããURL 㨠Bodyã¯æ¤ç´¢ãã¾ããã - </simpara> - <simpara> - UDM_PARAM_WEIGHT_FACTOR=F9421 ã¯ãæ¬¡ã®æ¤ç´¢ãè¡ãã¾ãã - </simpara> - <simpara>Description with factor 15 (16鲿° F)</simpara> - <simpara>Keywords with factor 9</simpara> - <simpara>Title with factor 4</simpara> - <simpara>Body with factor 2</simpara> - <simpara>URL with factor 1</simpara> - <simpara> - UDM_PARAM_WEIGHT_FACTOR 夿°ãçç¥ãããå ´åãå ã®éã¿ã®å¤ã¯ã½ã¼ - ãçµæããå¼ãåºããã¾ããä¸è¨ã§æå®ããéã¿è¨å®ã®å ´åããã㥠- ã¡ã³ãã®Descriptionã¯ãæå¤§éã¿16ãæããããã¥ã¡ã³ãã® - descriptionãæå³ãã¾ãã - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_WORD_MATCH - åèªã«ãããããã®ãã©ã¡ã¼ã¿ãåèªæ¤ç´¢å - ã鏿ããéã«ä½¿ç¨å¯è½ã§ãããã®æ©è½ã¯ã"single"ããã³"multi"ã¢ã¼ - ãã§SQLãã¼ã¿ãã¼ã¹ããã³çµã¿è¾¼ã¿ã®ãã¼ã¿ãã¼ã¹ã使ç¨ããå ´åã« - ã®ã¿åä½ãã¾ãããã®æ©è½ã¯ãcachemodeããã³ä»ã®ã¢ã¼ãã§ã¯åä½ã - ã¾ãããããã¯ããããã®ã¢ã¼ãããåèªCRCã使ç¨ãã¦ãããé¨åæ - ååæ¤ç´¢ããµãã¼ããã¦ããªãããã§ãã - å©ç¨å¯è½ãªå¤ã¯æ¬¡ã®ããã«ãªãã¾ãã - </simpara> - <simpara>UDM_MATCH_BEGIN - åèªã®å§ãã«ããã</simpara> - <simpara>UDM_MATCH_END - åèªã®çµãã«ããã</simpara> - <simpara>UDM_MATCH_WORD - åèªå ¨ä½ã«ããã</simpara> - <simpara>UDM_MATCH_SUBSTR - åèªã®é¨åæååã«ããã</simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_MIN_WORD_LEN - åèªã®æçé·ãå®ç¾©ãã¾ãã - ãã®å¶éããçãåèªã¯ãstopwordã¨ã¿ãªããã¾ãããã®ãã©ã¡ã¼ã¿ - ã¯ãã®å¤èªèº«ãç¯å²ã«å«ããã¨ã«æ³¨æãã¦ä¸ãããã¤ã¾ãã - UDM_PARAM_MIN_WORD_LEN=3 ã®å ´åã3æåã®é·ãã®åèªã¯stopword㨠- è¦ãªããã¾ãããã2æåã®åèªã¯stopwordã¨ã¿ãªããã¾ããããã©ã« - ãã¯1ã§ãã - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_MAX_WORD_LEN - æé·ã®åèªãå®ç¾©ãã¾ãããã®å¶éããã - é·ãå符ã¯ãstopwordã¨ã¿ãªããã¾ãããã®ãã©ã¡ã¼ã¿ã¯ãã®å¤ãç¯ - å²ã«å«ããã¨ã«æ³¨æãã¦ä¸ãããã¤ã¾ããUDM_PARAM_MAX_WORD_LEN=32 - ã®å ´åã32æåã®åèªã¯stopwordã¨ã¿ãªããã¾ãããã33æåã®åèª - ã¯ã¿ãªããã¾ããããã©ã«ãã¯ã32ã§ãã - </simpara> - </listitem> - </itemizedlist> - </refsect1> - </refentry> - <refentry id="function.udm-add-search-limit"> <refnamediv> <refname>udm_add_search_limit</refname> @@ -416,8 +143,246 @@ </itemizedlist> </refsect1> </refentry> - -<refentry id="function.udm-clear-search-limits"> + + <refentry id="function.udm-alloc-agent"> + <refnamediv> + <refname>udm_alloc_agent</refname> + <refpurpose>mnoGoSearch ã»ãã·ã§ã³ã確ä¿ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_alloc_agent</function></funcdef> + <paramdef>string <parameter>dbaddr</parameter></paramdef> + <paramdef>string + <parameter><optional>dbmode</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_alloc_agent</function> ã¯ãæåæã«mnogosearchã¨ã¼ + ã¸ã§ã³ãIDãã¨ã©ã¼æã«&false;ãè¿ãã¾ãããã®é¢æ°ã¯ããã¼ã¿ãã¼ã¹ + ãã©ã¡ã¼ã¿ãæããã»ãã·ã§ã³ãçæãã¾ãã + </para> + <para> + <parameter>dbaddr</parameter> - URLå½¢å¼ã®ãã¼ã¿ãã¼ã¹åãSQLãã¼ + ã¿ãã¼ã¹ã¸æ¥ç¶ããéã®ãªãã·ã§ã³(åããã¹ãããã¼ã¿ãã¼ã¹åããã¼ + ããã¦ã¼ã¶ããã¹ã¯ã¼ã)ã + çµã¿è¾¼ã¿ã®ããã¹ããã¡ã¤ã«ãµãã¼ãã«ã¯é¢ä¿ããã¾ããããã©ã¼ãã + ã: DBAddr DBType:[//[DBUser[:DBPass]@]DBHost[:DBPort]]/DBName/ + ç¾å¨ããµãã¼ãããã¦ãã DBType ã®å¤ã¯æ¬¡ã®ãã®ã§ãã: mysql, + pgsql, msql, solid, mssql, oracle, ibase + å®éããã¼ãã£ããªã©ã¤ãã©ãªã®ãµãã¼ãã¯éè¦ã§ã¯ããã¾ããããããã + ODBCã¦ã¼ã¶ã¯ããµãã¼ããããå¤ã®ä¸ã¤ãæå®ããå¿ è¦ãããã¾ãã使 + ç¨ãããã¼ã¿ãã¼ã¹åããµãã¼ãããã¦ããªãå ´åã"unknown"ã代ãã + ã«ä½¿ç¨ãããã¨ãå¯è½ã§ãã + </para> + <para> + <parameter>dbmode</parameter> - åèªã®è¨æ¶ç¨SQLãã¼ã¿ãã¼ã¹ã¢ã¼ + ãã鏿å¯è½ã§ãã"single"ãæå®ããå ´åãå ¨ã¦ã®åèªã¯ãåããã¼ + ãã«ã«ä¿åããã¾ãã"multi"ã鏿ããå ´åãåèªã¯ãã®é·ãã«å¿ã㦠+ å¥ã ã®ãã¼ãã«ã«ä¿åããã¾ãã"multi"ã¢ã¼ãã®æ¹ãé常é«éã§ããã + ãã¼ã¿ãã¼ã¹ä¸ã§ããå¤ãã®ãã¼ãã«ãå¿ è¦ã¨ãã¾ãã"crc"ã¢ã¼ããé¸ + æãããå ´åãmnoGoSearch ã¯ãåèªã®ä»£ããã«CRC32ã¢ã«ã´ãªãºã ã§è¨ + ç®ããã32ãããæ´æ°ã®åèªIDãä¿åãã¾ãããã®ã¢ã¼ãã§å¿ è¦ãªã㣠+ ã¹ã¯å®¹éã¯ããå°ããã§ããã"single"ããã³"multi"ã¢ã¼ãã¨æ¯è¼ã㦠+ ããé«éã§ãã"crc-multi" ã¯ã"crc"ã¢ã¼ãã¨åãè¨æ¶æ§é ã使ç¨ãã¾ + ããã"multi"ã¢ã¼ãã®ããã«åèªé·ã«å¿ãã¦å¥ã ã®ãã¼ã¿ãã¼ã¹ã«åèª + ãä¿åãã¾ãããã©ã¼ããã: DBMode single/multi/crc/crc-multi + </para> + <note> + <para> + <parameter>dbaddr</parameter> ããã³ + <parameter>dbmode</parameter> ã¯ãã¤ã³ããã¯ã¹ä½ææã«ä½¿ç¨ããã + ãããã®é¸æåã«ä¸è´ãã¦ããå¿ è¦ãããã¾ãã + </para> + </note> + <note> + <para> + å®éããããã®é¢æ°ã¯ãã¼ã¿ãã¼ã¹ã¸ã®æ¥ç¶ããªã¼ãã³ããå¿ è¦ã¯ãªãã + ãã£ã¦ããã°ã¤ã³åããã¹ã¯ã¼ãã確èªãã¾ãããå®éã®ãã¼ã¿ãã¼ã¹ + ã¸ã®æ¥ç¶ããã³ãã°ã¤ã³/ãã¹ã¯ã¼ãèªè¨¼ã¯ã + <function>udm_find</function>ã§è¡ããã¾ãã + </para> + </note> + </refsect1> + </refentry> + + <refentry id="function.udm-api-version"> + <refnamediv> + <refname>udm_api_version</refname> + <refpurpose>mnoGoSearch APIãã¼ã¸ã§ã³ãåå¾ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_api_version</function></funcdef> + <void/> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_api_version</function>ã¯ãmnoGoSearch APIãã¼ã¸ã§ã³ + çªå·ãè¿ãã¾ããä¾ãã°ãmnoGoSearch 3.1.10 APIã使ç¨ãã¦ããå ´åã + ãã®é¢æ°ã¯ã<literal>30110</literal>ãè¿ãã¾ãã + </para> + <para> + ãã®é¢æ°ã«ããå©ç¨å¯è½ãªAPI颿°ãã¦ã¼ã¶ã調ã¹ããã¨ãå¯è½ã¨ãªãã¾ + ããä¾ãã°ã<function>udm_get_doc_count</function>颿°ã¯ + mnoGoSearch 3.1.11以éã§ã®ã¿å©ç¨å¯è½ã§ãã + </para> + <simpara>ä¾:</simpara> + <informalexample> + <programlisting role="php"> +<![CDATA[ + if (udm_api_version() >= 30111) { + print "Total number of urls in database: ".udm_get_doc_count($udm)."<br>\n"; + } +]]> + </programlisting> + </informalexample> + </refsect1> + </refentry> + + <refentry id="function.udm-cat-path"> + <refnamediv> + <refname>udm_cat_path</refname> + <refpurpose>ã«ã¬ã³ãã®ã«ãã´ãªã¸ã®ãã¹ãåå¾ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>array <function>udm_cat_path</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>string <parameter>category</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_cat_path</function>ã¯ãããªã¼ã«ã¼ãããã«ã¬ã³ãã®ã« + ãã´ãªã¸ã®ã«ãã´ãªããªã¼ã®ä¸ã®æ¢è¿°ãã¹ãå«ãé åãè¿ãã¾ãã + </para> + <para> + <parameter>agent</parameter> - ã¨ã¼ã¸ã§ã³ããªã³ã¯IDã + </para> + <para> + <parameter>category</parameter> - ã«ã¬ã³ãã®ã«ãã´ãª - ãã¹ãå¾ã + ãã¨ããã«ãã´ãªã + </para> + <para> + 以ä¸ã®å½¢å¼ã®é åãè¿ãã¾ãã + </para> + <para> + çµããæ§æãããé åãå¶æ°æ·»åçªå·ã®è¦ç´ ã«ã¯ã«ãã´ãªãã¹ã奿°è¦ + ç´ ã«ã¯ã対å¿ããã«ãã´ãªåãå«ã¾ãã¾ãã + </para> + <para> + ä¾ãã°ã<literal>$array=udm_cat_path($agent, '02031D');</literal> + ã¨ã³ã¼ã«ããã¨ã以ä¸ã®é åãè¿ããã¾ãã + </para> + <literallayout> +<![CDATA[ +$array[0] will contain '' +$array[1] will contain 'Root' +$array[2] will contain '02' +$array[3] will contain 'Sport' +$array[4] will contain '0203' +$array[5] will contain 'Auto' +$array[4] will contain '02031D' +$array[5] will contain 'Ferrari' +]]> + </literallayout> + <example> + <title> + ã«ã¬ã³ãã®ã«ãã´ãªã¸ã®ãã¹ã¯ä»¥ä¸ã®å½¢å¼ã§æå®ãã¾ãã + '> Root > Sport > Auto > Ferrari' + </title> + <programlisting role="php"> +<![CDATA[ +<?php + $cat_path_arr = udm_cat_path($udm_agent,$cat); + $cat_path = ''; + for ($i=0; $i<count($cat_path_arr); $i+=2) { + $path = $cat_path_arr[$i]; + $name = $cat_path_arr[$i+1]; + $cat_path .= " > <a href=\"$PHP_SELF?cat=$path\">$name</a> "; + } +?> +]]> + </programlisting> + </example> + </refsect1> + </refentry> + + <refentry id="function.udm-cat-list"> + <refnamediv> + <refname>udm_cat_list</refname> + <refpurpose> + ã«ã¬ã³ãã®ã«ãã´ãªã¨åãã¬ãã«ã®ã«ãã´ãªãå ¨ã¦åå¾ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>array <function>udm_cat_list</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>string <parameter>category</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_cat_list</function>ã¯ãã«ãã´ãªããªã¼ã®ä¸ã®ã«ã¬ã³ã + ã«ãã´ãªã¨åãã¬ãã«ã®å ¨ã¦ã®ã«ãã´ãªã®ä¸è¦§ãé åã¨ãã¦è¿ãã¾ãã + </para> + <para> + ãã®é¢æ°ã¯ãã«ãã´ãªããªã¼ã®ãã©ã¦ã¶ãéçºããéã«æç¨ã§ãã + </para> + <para> + 以ä¸ã®å½¢å¼ã§é åãè¿ãã¾ãã + </para> + <para> + çµããæ§æãããé åãå¶æ°æ·»åçªå·ã®è¦ç´ ã«ã¯ã«ãã´ãªãã¹ã奿°è¦ + ç´ ã«ã¯ã対å¿ããã«ãã´ãªåãå«ã¾ãã¾ãã + </para> + <literallayout> +<![CDATA[ +$array[0] will contain '020300' +$array[1] will contain 'Audi' +$array[2] will contain '020301' +$array[3] will contain 'BMW' +$array[4] will contain '020302' +$array[5] will contain 'Opel' +... +etc. +]]> + </literallayout> + <literallayout> + 以ä¸ã¯ãã«ã¬ã³ãã®ã¬ãã«ã®ãªã³ã¯ããã®å½¢å¼ã§è¡¨ç¤ºããä¾ã§ãã + Audi + BMW + Opel + ... + </literallayout> + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php + $cat_list_arr = udm_cat_list($udm_agent,$cat); + $cat_list = ''; + for ($i=0; $i<count($cat_list_arr); $i+=2) { + $path = $cat_list_arr[$i]; + $name = $cat_list_arr[$i+1]; + $cat_list .= "<a href=\"$PHP_SELF?cat=$path\">$name</a><br>"; + } +?> +]]> + </programlisting> + </informalexample> + </refsect1> + </refentry> + + <refentry id="function.udm-clear-search-limits"> <refnamediv> <refname>udm_clear_search_limits</refname> <refpurpose> @@ -439,6 +404,62 @@ </refsect1> </refentry> + <refentry id="function.udm-errno"> + <refnamediv> + <refname>udm_errno</refname> + <refpurpose>mnoGoSearch ã¨ã©ã¼çªå·ãåå¾ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_errno</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_errno</function> ã¯ãmnoGoSearch ã¨ã©ã¼çªå·ãè¿ãã¾ + ããã¨ã©ã¼ããªãå ´åã«ã¼ããè¿ãã¾ãã + </para> + <para> + <parameter>agent</parameter> - + <function>udm_alloc_agent</function>ã¸ã®ã³ã¼ã«ããè¿ãããã¨ã¼ã¸ã§ + ã³ãIDã¸ã®ãªã³ã¯ + </para> + <para> + æ°åã§ã¨ã¼ã¸ã§ã³ãã¨ã©ã¼ã³ã¼ããè¿ãã¾ãã + </para> + </refsect1> + </refentry> + + <refentry id="function.udm-error"> + <refnamediv> + <refname>udm_error</refname> + <refpurpose>mnoGoSearch ã¨ã©ã¼ã¡ãã»ã¼ã¸ãå¾ã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>udm_error</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_error</function> ã¯ãmnoGoSearch ã¨ã©ã¼ã¡ãã»ã¼ã¸ã + è¿ãã¾ããã¨ã©ã¼ããªãå ´åã«ã¯ãç©ºã®æååãè¿ãã¾ãã + </para> + <para> + <parameter>agent</parameter> ã¯ãã¨ã¼ã¸ã§ã³ãIDã¸ã®ãªã³ã¯ã§ããã + <function>udm_alloc_agent</function>ãã³ã¼ã«ããéã«å¾ããããã® + ã§ãã + </para> + <para> + ã¨ã¼ã¸ã§ã³ãã¨ã©ã¼ã¡ãã»ã¼ã¸ãå¾ã¾ãã + </para> + </refsect1> + </refentry> + <refentry id="function.udm-find"> <refnamediv> <refname>udm_find</refname> @@ -457,7 +478,7 @@ <function>udm_find</function> ã¯æåæã«çµæãªã³ã¯IDãã¨ã©ã¼æã« &false; ãè¿ãã¾ãã </para> - <para> + <para> æ¤ç´¢ãè¡ãã¾ããæåã®å¼æ°ã¯ã»ãã·ã§ã³ã次ã®å¼æ°ã¯ã¯ã¨ãªæ¬ä½ã§ãã æ¤ç´¢ã®å®è¡ã¯ãæ¢ãåèªãå ¥åããæç¨¿ãã¿ã³ãæ¼ãã ãã§å¯è½ã§ãã ä¾ãã°ã"mysql odbc"ããã®ä¾ã§å¼ç¨ç¬¦ã¯ä»ã®ããã¹ãããåºå¥ããã @@ -498,7 +519,229 @@ </refsect1> </refentry> - <refentry id="function.udm-get-res-param"> + <refentry id="function.udm-free-agent"> + <refnamediv> + <refname>udm_free_agent</refname> + <refpurpose>mnoGoSearch ã»ãã·ã§ã³ãéæ¾ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_free_agent</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_free_agent</function> ã¯æåæã« + &true;ãã¨ã©ã¼æã«&false;ãè¿ã + ã¾ãã + </para> + <para> + <parameter>agent</parameter> - + <function>udm_alloc_agent</function>ããè¿ãããã¨ã¼ã¸ã§ã³ãID㸠+ ã®ãªã³ã¯ã + </para> + <para> + ã¨ã¼ã¸ã§ã³ãã»ãã·ã§ã³ç¨ã«ç¢ºä¿ãããã¡ã¢ãªãéæ¾ãã¾ãã + </para> + </refsect1> + </refentry> + + <refentry id="function.udm-free-ispell-data"> + <refnamediv> + <refname>udm_free_ispell_data</refname> + <refpurpose>ispellãã¼ã¿ç¨ã«ç¢ºä¿ãããã¡ã¢ãªãè§£æ¾ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_free_ispell_data</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_free_ispell_data</function>ã¯ã常ã«&true;ãè¿ãã¾ãã + </para> + <para> + <parameter>agent</parameter> - + <function>udm_alloc_agent</function>ã«ããå¾ãããã¨ã¼ã¸ã§ã³ããªã³ + ã¯IDã + </para> + <note> + <para> + ãã®é¢æ°ã¯ãmnoGoSearchãã¼ã¸ã§ã³3.1.12以éã§ãµãã¼ãããã颿°ã§ã + ãã以åã®ãã¼ã¸ã§ã³ã§ã¯ãµãã¼ãããã¦ãã¾ããã + </para> + </note> + </refsect1> + </refentry> + + <refentry id="function.udm-free-res"> + <refnamediv> + <refname>udm_free_res</refname> + <refpurpose>mnoGoSearch çµæãéæ¾ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_free_res</function></funcdef> + <paramdef>int <parameter>res</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_free_res</function> ã¯æåæã« + &true;ãã¨ã©ã¼æã«&false;ãè¿ã + ã¾ãã + </para> + <para> + <parameter>res</parameter> - <function>udm_find</function>ããè¿ + ãããçµæIDã¸ã®ãªã³ã¯ã + </para> + <para> + çµæç¨ã«ç¢ºä¿ãããã¡ã¢ãªãéæ¾ãã¾ãã + </para> + </refsect1> + </refentry> + + <refentry id="function.udm-get-doc-count"> + <refnamediv> + <refname>udm_get_doc_count</refname> + <refpurpose>Get total number of documents in database.</refpurpose> + </refnamediv> + + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_get_doc_count</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + </funcprototype> + </funcsynopsis> + + <para> + <function>udm_get_doc_count</function> returns number of documents in database. + </para> + + <para> + <parameter>agent</parameter> - link to agent identifier, received after + call to <function>udm_alloc_agent</function>. + </para> + + <note> + <simpara> + This function is supported only in mnoGoSearch 3.1.11 or later. + </simpara> + </note> + + </refsect1> + </refentry> + + <refentry id="function.udm-get-res-field"> + <refnamediv> + <refname>udm_get_res_field</refname> + <refpurpose>mnoGoSearch çµæãã£ã¼ã«ããåå¾ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>udm_get_res_field</function></funcdef> + <paramdef>int <parameter>res</parameter></paramdef> + <paramdef>int <parameter>row</parameter></paramdef> + <paramdef>int <parameter>field</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_get_res_field</function> ã¯ãæåæã«çµæãã£ã¼ã«ãã + ã¨ã©ã¼æã«&false;ãè¿ãã¾ãã + </para> + <para> + <parameter>res</parameter> - <function>udm_find</function>ããè¿ + ãããçµæIDã¸ã®ãªã³ã¯ã + </para> + <para> + <parameter>row</parameter> - ã«ã¬ã³ããã¼ã¸ã®ãªã³ã¯çªå·ã0ãã + <parameter>UDM_PARAM_NUM_ROWS</parameter>ã¾ã§ã®çªå·ã + </para> + <para> + <parameter>field</parameter> - ãã£ã¼ã«ãIDãæ¬¡ã®å¤ã®ã©ããã + </para> + <itemizedlist> + <listitem> + <simpara> + UDM_FIELD_URL - ããã¥ã¡ã³ãURLãã£ã¼ã«ã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_CONTENT - ããã¥ã¡ã³ãContent-typeãã£ã¼ã«ã (ä¾ãã°ã + text/html) + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_TITLE - ããã¥ã¡ã³ãã®titleãã£ã¼ã«ãã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_KEYWORDS - ããã¥ã¡ã³ãkeywordsãã£ã¼ã«ã(META + KEYWORDSã¿ã°ãã) + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_DESC - ããã¥ã¡ã³ãdescriptionãã£ã¼ã«ã (META + DESCRIPTIONã¿ã°ãã) + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_TEXT - ããã¥ã¡ã³ã body ããã¹ã (æåã®æ°è¡ã§ãã㥠+ ã¡ã³ãã®å 容ã«é¢ããã¢ã¤ãã¢ã示ã)ã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_SIZE - ããã¥ã¡ã³ãã®ãµã¤ãºã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_URLID - ãªã³ã¯ã¸ã®ã¦ãã¼ã¯ãªURL IDã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_RATING - (mnoGoSearchã§è¨ç®ããã)ãã¼ã¸ã®ã¬ã¼ãã£ã³ + ã°ã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_MODIFIED - unixtimeå½¢å¼ã®last-modifiedãã£ã¼ã«ãã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_ORDER - è¦ã¤ãã£ãããã¥ã¡ã³ãã®ä¸ã®ã«ã¬ã³ãã®ãã㥠+ ã¡ã³ãã®æ° + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_CRC - ããã¥ã¡ã³ãCRCã + </simpara> + </listitem> + </itemizedlist> + </refsect1> + </refentry> + + + <refentry id="function.udm-get-res-param"> <refnamediv> <refname>udm_get_res_param</refname> <refpurpose>mnoGoSearch çµæãã©ã¡ã¼ã¿ãåå¾ãã</refpurpose> @@ -513,272 +756,614 @@ </funcprototype> </funcsynopsis> <para> - <function>udm_get_res_param</function> ã¯æåæã«çµæãã©ã¡ã¼ã¿ã - è¿ãã¾ããã¨ã©ã¼æã«&false;ãè¿ãã¾ãã - </para> - <para> - <parameter>res</parameter> - <function>udm_find</function>ããè¿ - ãããçµæIDã¸ã®ãªã³ã¯ã - </para> - <para> - <parameter>param</parameter> - ãã©ã¡ã¼ã¿IDã§ãããæ¬¡ã®å¤ã®ã©ãã - ã¨ãªãã¾ãã + <function>udm_get_res_param</function> ã¯æåæã«çµæãã©ã¡ã¼ã¿ã + è¿ãã¾ããã¨ã©ã¼æã«&false;ãè¿ãã¾ãã + </para> + <para> + <parameter>res</parameter> - <function>udm_find</function>ããè¿ + ãããçµæIDã¸ã®ãªã³ã¯ã + </para> + <para> + <parameter>param</parameter> - ãã©ã¡ã¼ã¿IDã§ãããæ¬¡ã®å¤ã®ã©ãã + ã¨ãªãã¾ãã + </para> + <itemizedlist> + <listitem> + <simpara> + UDM_PARAM_NUM_ROWS - ã«ã¬ã³ãã®ãã¼ã¸ã§è¦ä»ãã£ããªã³ã¯ã®æ°ã + å ¨ã¦ã®æ¤ç´¢ãã¼ã¸ã§ã®æå¾ã®ãã¼ã¸ã§ã®UDM_PARAM_PAGE_SIZEãæ®ãã® + ãªã³ã¯ã«çããã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_PARAM_FOUND - ã¯ã¨ãªã«ãããããçµæã®åè¨ã®æ° + </simpara> + </listitem> + <listitem> + <simpara> + UDM_PARAM_WORDINFO - è¦ä»ãã£ãåèªã«é¢ããæ å ±ãä¾ãã°ã"a + good book" ã«é¢ããã¯ã¨ãªã¯ "a: stopword, good:5637, book: 120" + ãè¿ãã¾ãã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_PARAM_SEARCHTIME - ç§åä½ã®æ¤ç´¢æéã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_PARAM_FIRST_DOC - ã«ã¬ã³ãã®ãã¼ã¸ã«è¡¨ç¤ºãããæåã®ãã㥠+ ã¡ã³ãã®æ°ã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_PARAM_LAST_DOC - ã«ã¬ã³ãã®ãã¼ã¸ã«è¡¨ç¤ºãããæå¾ã®ããã¥ã¡ + ã³ãã®æ°ã + </simpara> + </listitem> + </itemizedlist> + </refsect1> + </refentry> + + <refentry id="function.udm-load-ispell-data"> + <refnamediv> + <refname>udm_load_ispell_data</refname> + <refpurpose>ispellãã¼ã¿ãèªã¿è¾¼ã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_load_ispell_data</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>int <parameter>var</parameter></paramdef> + <paramdef>string <parameter>val1</parameter></paramdef> + <paramdef>string <parameter>val2</parameter></paramdef> + <paramdef>int <parameter>flag</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_load_ispell_data</function>ã¯ãispellãã¼ã¿ããã¼ã + ãã¾ããæåæã«&true;ãã¨ã©ã¼æã«&false;ãè¿ãã¾ãã + </para> + <para> + <parameter>agent</parameter> - agent link identifier, received after call + to <function>udm_alloc_agent</function>. + </para> + <para> + <parameter>var</parameter> - parameter, indicating the source for ispell + data. May have the following values: + </para> + <para> + After using this function to free memory allocated for ispell data, please + use <function>udm_free_ispell_data</function>, even if you use + UDM_ISPELL_TYPE_SERVER mode. + </para> + <para> + The fastest mode is UDM_ISPELL_TYPE_SERVER. UDM_ISPELL_TYPE_TEXT is slower + and UDM_ISPELL_TYPE_DB is the slowest. The above pattern is &true; for + mnoGoSearch 3.1.10 - 3.1.11. It is planned to speed up DB mode in future + versions and it is going to be faster than TEXT mode. + </para> + <itemizedlist> + <listitem> + <simpara> + UDM_ISPELL_TYPE_DB - indicates that ispell data should be loaded from SQL. + In this case, parameters <parameter>val1</parameter> and <parameter>val2</parameter> + are ignored and should be left blank. <parameter>flag</parameter> + should be equal to <literal>1</literal>. + </simpara> + <note> + <para> + <parameter>flag</parameter> indicates that after loading ispell data + from defined source it sould be sorted (it is necessary for correct + functioning of ispell). In case of loading ispell data from files + there may be several calls to <function>udm_load_ispell_data</function>, + and there is no sense to sort data after every call, but only after + the last one. Since in db mode all the data is loaded by one call, + this parameter should have the value <literal>1</literal>. In this mode + in case of error, e.g. if ispell tables are absent, the function will + return &false; and code and error message will be accessible through + <function>udm_error</function> and <function>udm_errno</function>. + </para> + </note> + + <simpara>Example:</simpara> + <informalexample> + <programlisting role="php"> +if (! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_DB,'','',1)) { + printf("Error #%d: '%s'\n", udm_errno($udm), udm_error($udm)); + exit; +} + </programlisting> + </informalexample> + </listitem> + <listitem> + <para> + UDM_ISPELL_TYPE_AFFIX - indicates that ispell data should be loaded from + file and initiates loading affixes file. In this case <parameter>val1</parameter> + defines double letter language code for which affixes are loaded, + and <parameter>val2</parameter> - file path. Please note, that if + a relative path entered, the module looks for the file not in UDM_CONF_DIR, + but in relation to current path, i.e. to the path where the script is executed. + In case of error in this mode, e.g. if file is absent, the function will return + &false;, and an error message will be displayed. Error message text cannot be + accessed through <function>udm_error</function> and <function>udm_errno</function>, + since those functions can only return messages associated with SQL. Please, + see <parameter>flag</parameter> parameter description in UDM_ISPELL_TYPE_DB. + </para> + + <simpara>Example:</simpara> + <informalexample> + <programlisting role="php"> + if ((! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_AFFIX,'en','/opt/ispell/en.aff',0)) || + (! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_AFFIX,'ru','/opt/ispell/ru.aff',0)) || + (! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_SPELL,'en','/opt/ispell/en.dict',0)) || + (! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_SPELL,'ru','/opt/ispell/ru.dict',1))) { + exit; + } + </programlisting> + </informalexample> + <note> + <para> + <parameter>flag</parameter> is equal to <literal>1</literal> only in the last call. + </para> + </note> + </listitem> + <listitem> + <para> + UDM_ISPELL_TYPE_SPELL - indicates that ispell data should be loaded from + file and initiates loading of ispell dictionary file. In this case + <parameter>val1</parameter> defines double letter language code for which + affixes are loaded, + and <parameter>val2</parameter> - file path. Please note, that if a relative + path entered, the module looks for the file not in UDM_CONF_DIR, but in + relation to current path, i.e. to the path where the script is executed. + In case of error in this mode, e.g. if file is absent, the function will + return &false;, and an error message will be displayed. Error message text + cannot be accessed through <function>udm_error</function> and + <function>udm_errno</function>, since those functions can only return messages + associated with SQL. Please, see <parameter>flag</parameter> parameter + description in UDM_ISPELL_TYPE_DB. + </para> + <informalexample> + <programlisting role="php"> + if ((! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_AFFIX,'en','/opt/ispell/en.aff',0)) || + (! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_AFFIX,'ru','/opt/ispell/ru.aff',0)) || + (! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_SPELL,'en','/opt/ispell/en.dict',0)) || + (! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_SPELL,'ru','/opt/ispell/ru.dict',1))) { + exit; + } + </programlisting> + </informalexample> + + <note> + <para> + <parameter>flag</parameter> is equal to <literal>1</literal> only in the last call. + </para> + </note> + </listitem> + <listitem> + <para> + UDM_ISPELL_TYPE_SERVER - enables spell server support. + <parameter>val1</parameter> parameter indicates + address of the host running spell server. <parameter>val2</parameter> ` + is not used yet, but in future releases it is going to indicate number + of port used by spell server. <parameter>flag</parameter> parameter in + this case is not needed since ispell data is stored + on spellserver already sorted. + </para> + <para> + Spelld server reads spell-data from a separate configuration file + (/usr/local/mnogosearch/etc/spelld.conf by default), sorts it and stores in + memory. With clients server communicates in two ways: to indexer all the + data is transferred (so that indexer starts faster), from search.cgi server + receives word to normalize and then passes over to client (search.cgi) list + of normalized word forms. This allows fastest, compared to db and text modes + processing of search queries (by omitting loading and sorting all the spell data). + </para> + <para> + <function>udm_load_ispell_data</function> function in UDM_ISPELL_TYPE_SERVER + mode does not actually load ispell data, but only defines server address. + In fact, server is automatically used by <function>udm_find</function> + function when performing search. In case of errors, e.g. if spellserver + is not running or invalid host indicated, there are no messages returned + and ispell conversion does not work. + </para> + + <note> + <para> + ãã®é¢æ°ã¯ãmnoGoSearch 3.1.12以éã§ã®ã¿å©ç¨å¯è½ã§ãã + </para> + </note> + <simpara>ä¾:</simpara> + <informalexample> + <programlisting role="php"> +<![CDATA[ +if (!udm_load_ispell_data($udm,UDM_ISPELL_TYPE_SERVER,'','',1)) { + printf("Error loading ispell data from server<br>\n"); + exit; +} +]]> + </programlisting> + </informalexample> + </listitem> + </itemizedlist> + </refsect1> + </refentry> + + <refentry id="function.udm-set-agent-param"> + <refnamediv> + <refname>udm_set_agent_param</refname> + <refpurpose> + mnoGoSearch ã¨ã¼ã¸ã§ã³ãã®ã»ãã·ã§ã³ãã©ã¡ã¼ã¿ãè¨å®ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_set_agent_param</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>int <parameter>var</parameter></paramdef> + <paramdef>string <parameter>val</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_set_agent_param</function> ã¯æåæã« + &true;ãã¨ã©ã¼æã«&false;ãè¿ã + ã¾ããmnoGoSearch ã»ãã·ã§ã³ãã©ã¡ã¼ã¿ãå®ç¾©ãã¾ãã </para> + <simpara> + 以ä¸ã®ãã©ã¡ã¼ã¿ããã³ãããã®å¤ãå©ç¨å¯è½ã§ãã + </simpara> <itemizedlist> <listitem> <simpara> - UDM_PARAM_NUM_ROWS - ã«ã¬ã³ãã®ãã¼ã¸ã§è¦ä»ãã£ããªã³ã¯ã®æ°ã - å ¨ã¦ã®æ¤ç´¢ãã¼ã¸ã§ã®æå¾ã®ãã¼ã¸ã§ã®UDM_PARAM_PAGE_SIZEãæ®ãã® - ãªã³ã¯ã«çããã + UDM_PARAM_PAGE_NUM - ã¯ãã¼ã¸çªå·ãæ¤ç´¢çµæã¨ããããã«ä½¿ç¨ã + ãã¾ãã(çµæã¯ããã¼ã¸æ¯ã«UDM_PARAM_PAGE_SIZEåã®çµæãæãã0 + ããå§ã¾ããã¼ã¸ã§è¿ããã¾ã) </simpara> </listitem> <listitem> <simpara> - UDM_PARAM_FOUND - ã¯ã¨ãªã«ãããããçµæã®åè¨ã®æ° + UDM_PARAM_PAGE_SIZE - ã¯ä¸ãã¼ã¸ã«è¡¨ç¤ºãããæ¤ç´¢çµæã®æ°ã </simpara> - </listitem> + </listitem> <listitem> <simpara> - UDM_PARAM_WORDINFO - è¦ä»ãã£ãåèªã«é¢ããæ å ±ãä¾ãã°ã"a - good book" ã«é¢ããã¯ã¨ãªã¯ "a: stopword, good:5637, book: 120" - ãè¿ãã¾ãã + UDM_PARAM_SEARCH_MODE - æ¤ç´¢ã¢ã¼ããæ¬¡ã®å¤ãå©ç¨å¯è½ã§ãã: + UDM_MODE_ALL - å ¨ã¦ã®åèªãæ¤ç´¢ãã¾ãã; + UDM_MODE_ANY - å ¨ã¦ã®åèªã§æ¤ç´¢ãã; + UDM_MODE_PHRASE - çèªæ¤ç´¢; + UDM_MODE_BOOL - è«ç夿¤ç´¢ãè«ç夿¤ç´¢ã«é¢ãã詳細ã«ã¤ãã¦ã¯ + <function>udm_find</function> ãåç §ä¸ããã </simpara> - </listitem> + </listitem> <listitem> <simpara> - UDM_PARAM_SEARCHTIME - ç§åä½ã®æ¤ç´¢æéã + UDM_PARAM_CACHE_MODE - æ¤ç´¢çµæã®ãã£ãã·ã¥ã¢ã¼ãããªã³ã¾ãã¯ãª + ãã«ãã¾ããæå¹ã®å ´åãæ¤ç´¢ã¨ã³ã¸ã³ã¯æ¤ç´¢çµæããã£ã¹ã¯ã«ä¿å + ãã¾ããä¼¼ããããªæ¤ç´¢ãå¾ã§å®è¡ãããå ´åãã¨ã³ã¸ã³ã¯ããé«é + ã«ãã£ãã·ã¥ããçµæãå¾ããã¨ãå¯è½ã§ãã + å©ç¨å¯è½ãªå¤: UDM_CACHE_ENABLED, UDM_CACHE_DISABLED. </simpara> - </listitem> + </listitem> <listitem> <simpara> - UDM_PARAM_FIRST_DOC - ã«ã¬ã³ãã®ãã¼ã¸ã«è¡¨ç¤ºãããæåã®ãã㥠- ã¡ã³ãã®æ°ã + UDM_PARAM_TRACK_MODE - ã¯ã¨ãªè¿½è·¡ã¢ã¼ãããªã³ã¾ãã¯ãªãã«ãã¾ãã + ãã¼ã¸ã§ã³3.1.2以éãmnoGoSearch ã¯ã¯ã¨ãªè¿½è·¡ã¢ã¼ãããµãã¼ãã + ã¦ãã¾ãã追跡ã¯SQLãã¼ã¸ã§ã³ã«ã®ã¿å®è£ ããã¦ãããçµã¿è¾¼ã¿ãã¼ + ã¿ãã¼ã¹ã§ã¯å©ç¨ã§ãã¾ããã追跡ã使ç¨ããã«ã¯ããã¼ãã«ã追跡 + ãµãã¼ãç¨ã«ä½æããå¿ è¦ãããã¾ããMySQLã®å ´åã + create/mysql/track.txtã使ç¨ãã¦ä¸ãããæ¤ç´¢å®è¡æã«ãããã³ã + ã¨ã³ãã¯ã¯ã¨ãªåèªãè¦ã¤ããããã¥ã¡ã³ãã®æ°ãã«ã¬ã³ãã®ç§åä½ + ã®UNIXã¿ã¤ã ã¹ã¿ã³ããä¿åããããã«ãããã®ãã¼ãã«ã使ç¨ãã¾ + ãã + å©ç¨å¯è½ãªå¤: UDM_TRACK_ENABLED, UDM_TRACK_DISABLED. </simpara> </listitem> <listitem> <simpara> - UDM_PARAM_LAST_DOC - ã«ã¬ã³ãã®ãã¼ã¸ã«è¡¨ç¤ºãããæå¾ã®ããã¥ã¡ - ã³ãã®æ°ã + UDM_PARAM_PHRASE_MODE - çèªãç¨ããã¤ã³ããã¯ã¹ãã¼ã¿ãã¼ã¹ã + ã©ãããå®ç¾©ãã¾ãã(indexer.confã«ããã"phrase" ãã©ã¡ã¼ã¿) + 使ç¨å¯è½ãªå¤: UDM_PHRASE_ENABLED ããã³ UDM_PHRASE_DISABLEDã + çèªæ¤ç´¢ãæå¹ãªå ´å(UDM_PHRASE_ENABLED)ã§ããå ¨ã¦ã®ã¢ã¼ã + (ANYãALLãBOOLãPHRASE)ã§æ¤ç´¢ãå¯è½ã§ãããã¨ã«æ³¨æãã¦ä¸ããã + mnoGoSearchã®ãã¼ã¸ã§ã³3.1.10ã§çèªæ¤ç´¢ãSQLã¨çµã¿è¾¼ã¿ãã¼ã¿ãã¼ + ã¹ã¢ã¼ãã§ã®ã¿ãµãã¼ãããã¾ããã䏿¹ã3.1.11ã§çèªãcachemode + ã§ããµãã¼ãããå§ãã¾ããã </simpara> - </listitem> - </itemizedlist> - </refsect1> - </refentry> - - <refentry id="function.udm-get-res-field"> - <refnamediv> - <refname>udm_get_res_field</refname> - <refpurpose>mnoGoSearch çµæãã£ã¼ã«ããåå¾ãã</refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>udm_get_res_field</function></funcdef> - <paramdef>int <parameter>res</parameter></paramdef> - <paramdef>int <parameter>row</parameter></paramdef> - <paramdef>int <parameter>field</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>udm_get_res_field</function> ã¯ãæåæã«çµæãã£ã¼ã«ãã - ã¨ã©ã¼æã«&false;ãè¿ãã¾ãã - </para> - <para> - <parameter>res</parameter> - <function>udm_find</function>ããè¿ - ãããçµæIDã¸ã®ãªã³ã¯ã - </para> - <para> - <parameter>row</parameter> - ã«ã¬ã³ããã¼ã¸ã®ãªã³ã¯çªå·ã0ãã - <parameter>UDM_PARAM_NUM_ROWS</parameter>ã¾ã§ã®çªå·ã - </para> - <para> - <parameter>field</parameter> - ãã£ã¼ã«ãIDãæ¬¡ã®å¤ã®ã©ããã - </para> - <itemizedlist> + <simpara> + çèªæ¤ç´¢ã®ä¾: + </simpara> + <simpara> + "Arizona desert" - ãã®ã¯ã¨ãªã¯ã"Arizona desert"ãçèªã¨ãã¦å« + ãå ¨ã¦ã®ããã¥ã¡ã³ããè¿ãã¾ããçèªã®åå¾ã«äºéå¼ç¨ç¬¦ãå¿ è¦ã§ + ãããã¨ã«æ³¨æãã¦ä¸ããã + </simpara> + </listitem> <listitem> <simpara> - UDM_FIELD_URL - ããã¥ã¡ã³ãURLãã£ã¼ã«ã + UDM_PARAM_CHARSET - ãã¼ã«ã«ãªcharsetãå®ç¾©ãã¾ããå©ç¨å¯è½ãªå¤: + mnoGoSearchã«ãããµãã¼ããããcharsetã®çµ, + ä¾ãã°ãkoi8-r, cp1251, ... </simpara> </listitem> <listitem> <simpara> - UDM_FIELD_CONTENT - ããã¥ã¡ã³ãContent-typeãã£ã¼ã«ã (ä¾ãã°ã - text/html) + UDM_PARAM_STOPFILE - stopfileã®ååã¨ãã¹ãå®ç¾©ãã¾ãã + (mnoGoSearchã¨è¥å¹²éããããã¾ããã¤ã¾ããmnoGoSearchã«ããã¦ã¯ã + ç¸å¯¾ãã¹ã¾ãã¯ãã¹ãå ¥åãããªãã£ãå ´åãUDM_CONF_DIRã«é¢ã㦠+ ãã®ãã¡ã¤ã«ãæ¢ããã¾ããã¢ã¸ã¥ã¼ã«ã¯ããã®ãã¡ã¤ã«ãã«ã¬ã³ã + ã®ãã¹(ããªãã¡ãPHPã¹ã¯ãªãããå®è¡ããããã¹)ã§æ¢ãã¾ãã </simpara> </listitem> <listitem> - <simpara> - UDM_FIELD_TITLE - ããã¥ã¡ã³ãã®titleãã£ã¼ã«ãã + <simpara> + UDM_PARAM_STOPTABLE - æå®ããSQLãã¼ãã«ãã忢åèªããã¼ãã + ã¾ããè¤æ°ã®StopwordTableã³ãã³ãã使ç¨å¯è½ã§ãããã®ã³ãã³ãã¯ã + SQLãã¼ã¿ãã¼ã¹ãµãã¼ããæå¹ã«ããã«ã³ã³ãã¤ã«ããå ´åã¯ä½¿ç¨ã§ + ãã¾ããã </simpara> </listitem> <listitem> <simpara> - UDM_FIELD_KEYWORDS - ããã¥ã¡ã³ãkeywordsãã£ã¼ã«ã(META - KEYWORDSã¿ã°ãã) + UDM_PARAM_WEIGHT_FACTOR - æå®ããããã¥ã¡ã³ãé¨åã®éã¿ä¿æ°ã + 表ãã¾ããç¾å¨ãbody, title, keywords, description, urlããµãã¼ + ãããã¦ãã¾ãããã®æ©è½ãæå¹ã«ããã«ã¯ãindexer.confã®*Weight + ã³ãã³ãã«2ã®ç´¯ä¹ãæå®ãã¦ä¸ãããããã§æ¬¡ã®ãããªéã¿ãæå®ã + ãå ´åãèãã¦ã¿ã¾ãããã + </simpara> + <literallayout> + URLWeight 1 + BodyWeight 2 + TitleWeight 4 + KeywordWeight 8 + DescWeight 16 + </literallayout> + <simpara> + åãããã¥ã¡ã³ãã«ããã¤ãã®åèªãè¤æ°åç¾ããå ´åã + indexerãåèªã®éã¿ã«ORæ¼ç®åã使ç¨ããã®ã§ãç°ãªã£ãããã¥ã¡ã³ + ãã®é¨åã«åèªãç¾ããåæ°ãæ¤åºå¯è½ã§ããããã£ã¼ã«ã®ã¿ç¾ãã + åèªã¯ã(2鲿¨è¨ã§)éã¿éå00000010ãæãã¾ããå ¨ã¦ã®ããã¥ã¡ã³ + ãé¨åã§ä½¿ç¨ãããåèªã¯ãéã¿éå 00011111 ãæãã¾ãã </simpara> - </listitem> - <listitem> <simpara> - UDM_FIELD_DESC - ããã¥ã¡ã³ãdescriptionãã£ã¼ã«ã (META - DESCRIPTIONã¿ã°ãã) + ãã®ãã©ã¡ã¼ã¿ã®å¤ã¯ã16鲿°æåå ABCDE ã§ããåæ¡ã¯ãåèªéã¿ + ã®å¯¾å¿ãããããã®å åã§ããä¸ã§æå®ããéã¿è¨å®ã¯æ¬¡ã®ããã«ãª + ãã¾ãã </simpara> - </listitem> - <listitem> + <literallayout> + E is a factor for weight 1 (URL Weight bit) + D is a factor for weight 2 (BodyWeight bit) + C is a factor for weight 4 (TitleWeight bit) + B is a factor for weight 8 (KeywordWeight bit) + A is a factor for weight 16 (DescWeight bit) + </literallayout> + <simpara> + ä¾: + </simpara> + <simpara> + UDM_PARAM_WEIGHT_FACTOR=00001 ã¯ãURLã®ã¿ãæ¤ç´¢ãã¾ãã + </simpara> + <simpara> + UDM_PARAM_WEIGHT_FACTOR=00100 ã¯ãTitleã®ã¿ãæ¤ç´¢ãã¾ãã + </simpara> <simpara> - UDM_FIELD_TEXT - ããã¥ã¡ã³ã body ããã¹ã (æåã®æ°è¡ã§ãã㥠- ã¡ã³ãã®å 容ã«é¢ããã¢ã¤ãã¢ã示ã)ã + UDM_PARAM_WEIGHT_FACTOR=11100 ã¯ãTitle,Keywords,Desctriptionã + æ¤ç´¢ãã¾ãããURL 㨠Bodyã¯æ¤ç´¢ãã¾ããã + </simpara> + <simpara> + UDM_PARAM_WEIGHT_FACTOR=F9421 ã¯ãæ¬¡ã®æ¤ç´¢ãè¡ãã¾ãã + </simpara> + <literallayout> + Description with factor 15 (F hex) + Keywords with factor 9 + Title with factor 4 + Body with factor 2 + URL with factor 1 + </literallayout> + <simpara> + UDM_PARAM_WEIGHT_FACTOR 夿°ãçç¥ãããå ´åãå ã®éã¿ã®å¤ã¯ã½ã¼ + ãçµæããå¼ãåºããã¾ããä¸è¨ã§æå®ããéã¿è¨å®ã®å ´åããã㥠+ ã¡ã³ãã®Descriptionã¯ãæå¤§éã¿16ãæããããã¥ã¡ã³ãã® + descriptionãæå³ãã¾ãã </simpara> </listitem> <listitem> <simpara> - UDM_FIELD_SIZE - ããã¥ã¡ã³ãã®ãµã¤ãºã + UDM_PARAM_WORD_MATCH - åèªã«ãããããã®ãã©ã¡ã¼ã¿ãåèªæ¤ç´¢å + ã鏿ããéã«ä½¿ç¨å¯è½ã§ãããã®æ©è½ã¯ã"single"ããã³"multi"ã¢ã¼ + ãã§SQLãã¼ã¿ãã¼ã¹ããã³çµã¿è¾¼ã¿ã®ãã¼ã¿ãã¼ã¹ã使ç¨ããå ´åã« + ã®ã¿åä½ãã¾ãããã®æ©è½ã¯ãcachemodeããã³ä»ã®ã¢ã¼ãã§ã¯åä½ã + ã¾ãããããã¯ããããã®ã¢ã¼ãããåèªCRCã使ç¨ãã¦ãããé¨åæ + ååæ¤ç´¢ããµãã¼ããã¦ããªãããã§ãã + å©ç¨å¯è½ãªå¤ã¯æ¬¡ã®ããã«ãªãã¾ãã </simpara> + <simpara>UDM_MATCH_BEGIN - åèªã®å§ãã«ããã</simpara> + <simpara>UDM_MATCH_END - åèªã®çµãã«ããã</simpara> + <simpara>UDM_MATCH_WORD - åèªå ¨ä½ã«ããã</simpara> + <simpara>UDM_MATCH_SUBSTR - åèªã®é¨åæååã«ããã</simpara> </listitem> <listitem> <simpara> - UDM_FIELD_URLID - ãªã³ã¯ã¸ã®ã¦ãã¼ã¯ãªURL IDã + UDM_PARAM_MIN_WORD_LEN - åèªã®æçé·ãå®ç¾©ãã¾ãã + ãã®å¶éããçãåèªã¯ãstopwordã¨ã¿ãªããã¾ãããã®ãã©ã¡ã¼ã¿ + ã¯ãã®å¤èªèº«ãç¯å²ã«å«ããã¨ã«æ³¨æãã¦ä¸ãããã¤ã¾ãã + UDM_PARAM_MIN_WORD_LEN=3 ã®å ´åã3æåã®é·ãã®åèªã¯stopword㨠+ è¦ãªããã¾ãããã2æåã®åèªã¯stopwordã¨ã¿ãªããã¾ããããã©ã« + ãã¯1ã§ãã </simpara> - </listitem> + </listitem> <listitem> <simpara> - UDM_FIELD_RATING - (mnoGoSearchã§è¨ç®ããã)ãã¼ã¸ã®ã¬ã¼ãã£ã³ - ã°ã + UDM_PARAM_ISPELL_PREFIXES - Possible values: UDM_PREFIXES_ENABLED and + UDM_PREFIXES_DISABLED, that respectively enable or disable using prefixes. + E.g. if a word "tested" is in search query, also words like "test", + "testing", etc. Only suffixes are supported by default. Prefixes usually + change word meanings, for example if somebody is searching for the word "tested" + one hardly wants "untested" to be found. Prefixes support may also be + found useful for site's spelling checking purposes. In order to enable + ispell, you have to load ispell data with + <function>udm_load_ispell_data</function>. </simpara> </listitem> <listitem> <simpara> - UDM_FIELD_MODIFIED - unixtimeå½¢å¼ã®last-modifiedãã£ã¼ã«ãã + UDM_PARAM_CROSS_WORDS - enables or disables crosswords support. + Possible values: UDM_CROSS_WORDS_ENABLED and UDM_CROSS_WORDS_DISABLED. + </simpara> + <simpara> + The corsswords feature allows to assign words between <a + href="xxx"> and </a> also to a document this link + leads to. It works in SQL database mode and is not supported in + built-in database and Cachemode. </simpara> + <note> + <simpara> + Crosswords are supported only in mnoGoSearch 3.1.11 or later. + </simpara> + </note> </listitem> <listitem> <simpara> - UDM_FIELD_ORDER - è¦ã¤ãã£ãããã¥ã¡ã³ãã®ä¸ã®ã«ã¬ã³ãã®ãã㥠- ã¡ã³ãã®æ° + UDM_PARAM_VARDIR - specifies a custom path to directory where indexer + stores data when using built-in database and in cache mode. + By default <literal>/var</literal> directory of + <application>mnoGoSearch</application> installation is used. Can have + only string values. The parameter is available in PHP 4.1.0 or later. </simpara> </listitem> <listitem> <simpara> - UDM_FIELD_CRC - ããã¥ã¡ã³ãCRCã + UDM_PARAM_VARDIR - specifies a custom path to directory where indexer + stores data when using built-in database and in cache mode. + By default <literal>/var</literal> directory of + <application>mnoGoSearch</application> installation is used. Can have + only string values. The parameter is available in PHP 4.1.0 or later. </simpara> </listitem> </itemizedlist> - </refsect1> + </refsect1> </refentry> - - <refentry id="function.udm-free-res"> + + <refentry id='function.udm-check-charset'> <refnamediv> - <refname>udm_free_res</refname> - <refpurpose>mnoGoSearch çµæãéæ¾ãã</refpurpose> + <refname>udm_check_charset</refname> + <refpurpose> + æå®ããcharsetãmnogosearchã§èªèããããã©ãã調ã¹ã + </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>udm_free_res</function></funcdef> - <paramdef>int <parameter>res</parameter></paramdef> + <funcdef>int <function>udm_check_charset</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>string <parameter>charset</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>udm_free_res</function> ã¯æåæã« - &true;ãã¨ã©ã¼æã«&false;ãè¿ã - ã¾ãã - </para> - <para> - <parameter>res</parameter> - <function>udm_find</function>ããè¿ - ãããçµæIDã¸ã®ãªã³ã¯ã + &warn.undocumented.func; </para> + </refsect1> + </refentry> + + <refentry id='function.udm-check-stored'> + <refnamediv> + <refname>udm_check_stored</refname> + <refpurpose> + ä¿åãããæ¥ç¶ã調ã¹ã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_check_stored</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>int <parameter>link</parameter></paramdef> + <paramdef>string <parameter>doc_id</parameter></paramdef> + </funcprototype> + </funcsynopsis> <para> - çµæç¨ã«ç¢ºä¿ãããã¡ã¢ãªãéæ¾ãã¾ãã + &warn.undocumented.func; </para> </refsect1> </refentry> - <refentry id="function.udm-free-agent"> + <refentry id='function.udm-close-stored'> <refnamediv> - <refname>udm_free_agent</refname> - <refpurpose>mnoGoSearch ã»ãã·ã§ã³ãéæ¾ãã</refpurpose> + <refname>udm_close_stored</refname> + <refpurpose> + ä¿åããæ¥ç¶ãéãã + </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>udm_free_agent</function></funcdef> + <funcdef>int <function>udm_close_stored</function></funcdef> <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>int <parameter>link</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>udm_free_agent</function> ã¯æåæã« - &true;ãã¨ã©ã¼æã«&false;ãè¿ã - ã¾ãã - </para> - <para> - <parameter>agent</parameter> - - <function>udm_alloc_agent</function>ããè¿ãããã¨ã¼ã¸ã§ã³ãID㸠- ã®ãªã³ã¯ã - </para> - <para> - ã¨ã¼ã¸ã§ã³ãã»ãã·ã§ã³ç¨ã«ç¢ºä¿ãããã¡ã¢ãªãéæ¾ãã¾ãã + &warn.undocumented.func; </para> </refsect1> </refentry> - <refentry id="function.udm-errno"> + <refentry id='function.udm-crc32'> <refnamediv> - <refname>udm_errno</refname> - <refpurpose>mnoGoSearch ã¨ã©ã¼çªå·ãåå¾ãã</refpurpose> + <refname>udm_crc32</refname> + <refpurpose> + æå®ããæååã®CRC32ãã§ãã¯ãµã ãè¨ç®ãã + </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>udm_errno</function></funcdef> + <funcdef>int <function>udm_crc32</function></funcdef> <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>string <parameter>str</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>udm_errno</function> ã¯ãmnoGoSearch ã¨ã©ã¼çªå·ãè¿ãã¾ - ããã¨ã©ã¼ããªãå ´åã«ã¼ããè¿ãã¾ãã - </para> - <para> - <parameter>agent</parameter> - - <function>udm_alloc_agent</function>ã¸ã®ã³ã¼ã«ããè¿ãããã¨ã¼ã¸ã§ - ã³ãIDã¸ã®ãªã³ã¯ - </para> - <para> - æ°åã§ã¨ã¼ã¸ã§ã³ãã¨ã©ã¼ã³ã¼ããè¿ãã¾ãã + &warn.undocumented.func; </para> </refsect1> </refentry> - <refentry id="function.udm-error"> + <refentry id='function.udm-open-stored'> <refnamediv> - <refname>udm_error</refname> - <refpurpose>mnoGoSearch ã¨ã©ã¼ã¡ãã»ã¼ã¸ãå¾ã</refpurpose> + <refname>udm_open_stored</refname> + <refpurpose> + ä¿åããæ¥ç¶ããªã¼ãã³ãã + </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>string <function>udm_error</function></funcdef> + <funcdef>int <function>udm_open_stored</function></funcdef> <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>string <parameter>storedaddr</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>udm_error</function> ã¯ãmnoGoSearch ã¨ã©ã¼ã¡ãã»ã¼ã¸ã - è¿ãã¾ããã¨ã©ã¼ããªãå ´åã«ã¯ãç©ºã®æååãè¿ãã¾ãã - </para> - <para> - <parameter>agent</parameter> ã¯ãã¨ã¼ã¸ã§ã³ãIDã¸ã®ãªã³ã¯ã§ããã - <function>udm_alloc_agent</function>ãã³ã¼ã«ããéã«å¾ããããã® - ã§ãã - </para> - <para> - ã¨ã¼ã¸ã§ã³ãã¨ã©ã¼ã¡ãã»ã¼ã¸ãå¾ã¾ãã + &warn.undocumented.func; </para> </refsect1> </refentry> + </reference> + <!-- Keep this comment at the end of the file Local variables: Index: phpdoc/ja/functions/msql.xml diff -u phpdoc/ja/functions/msql.xml:1.11 phpdoc/ja/functions/msql.xml:1.12 --- phpdoc/ja/functions/msql.xml:1.11 Wed Dec 12 15:53:22 2001 +++ phpdoc/ja/functions/msql.xml Sat Jan 26 03:55:51 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> - +<!-- $Revision: 1.12 $ --> <reference id="ref.msql"> <title>mSQL 颿°</title> <titleabbrev>mSQL</titleabbrev> @@ -119,7 +119,18 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_connect</function></funcdef> - <paramdef>string <parameter>host_name</parameter></paramdef> + <paramdef>string + <parameter><optional>hostname</optional></parameter> + </paramdef> + <paramdef>string + <parameter><optional>server</optional></parameter> + </paramdef> + <paramdef>string + <parameter><optional>username</optional></parameter> + </paramdef> + <paramdef>string + <parameter><optional>password</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> @@ -127,9 +138,10 @@ &false;ãè¿ãã¾ãã </para> <para> - <function>msql_connect</function>㯠mSQL ãµã¼ãã¼ã¸ã®æ¥ç¶ã確ç«ãã¾ãã - 弿°host_name ã¯ãªãã·ã§ã³ã§ããããæå®ãããªãå ´åã - localhostãæå®ãããã¨ä»®å®ãã¾ãã + <function>msql_connect</function>㯠mSQL ãµã¼ãã¼ã¸ã®æ¥ç¶ã確ç«ã + ã¾ãããã©ã¡ã¼ã¿<parameter>server</parameter>ã«ã¯ã + "hostname:port"ã®ããã«ãã¼ãçªå·ãå«ãããã¨ãå¯è½ã§ãã + ããã©ã«ãã¯ã'localhost'ã§ãã </para> <para> åã弿°ã§<function>msql_connect</function>ãå度ã³ã¼ã«ãããå ´åã @@ -215,7 +227,7 @@ </funcprototype> </funcsynopsis> <para> - æåã®å ´åã«&true;ã失æã®å ´åã«&false;ãè¿ãã¾ãã + &return.success; </para> <para> <function>msql_data_seek</function> ã¯ãæå®ããã¯ã¨ãªã¼ID @@ -240,7 +252,7 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>msql_dbname</function></funcdef> - <paramdef>string <parameter>query_identifier</parameter></paramdef> + <paramdef>int <parameter>query_identifier</parameter></paramdef> <paramdef>int <parameter>i</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -264,12 +276,12 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_drop_db</function></funcdef> - <paramdef>string <parameter>ãã¼ã¿ãã¼ã¹å</parameter></paramdef> + <paramdef>string <parameter>database_name</parameter></paramdef> <paramdef>int <parameter>link_identifier</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - æåæã«&true;ã失æããå ´åã«&false;ãè¿ãã¾ãã + &return.success; </para> <para> <function>msql_drop_db</function>ã¯ãæå®ãããªã³ã¯IDãæã @@ -306,13 +318,17 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>msql_error</function></funcdef> - <paramdef> <parameter></parameter></paramdef> + <paramdef>int + <parameter> + <replaceable><optional>link_identifier</optional></replaceable> + </parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> - mSQL ãã¼ã¿ãã¼ã¹ã®ããã¯ã¨ã³ãããã¨ã©ã¼ãè¿ããã¦ãã - ãã¯ãè¦åãçºãã¾ããã - ã¨ã©ã¼æååãåãåºãããã«ã¯ãæ¿ããã«ãããã®é¢æ°ã使ç¨ãã¦ãã ããã + mSQL ãã¼ã¿ãã¼ã¹ã®ããã¯ã¨ã³ãããè¿ãããã¨ã©ã¼ã¯ãç¾å¨ã§ã¯ã㯠+ ãè¦åã¨ãã¦åºåããã¾ãããã¨ã©ã¼æååãåãåºãããã«ã¯ãæ¿ã + ãã«ãããã®é¢æ°ã使ç¨ãã¦ãã ããã </para> </refsect1> </refentry> @@ -395,26 +411,44 @@ <para> ãªãã¸ã§ã¯ãã®ããããã£ã¯ã次ã®ããã«ãªãã¾ãã <itemizedlist> - <listitem><simpara>name - ã«ã©ã å</simpara></listitem> - <listitem><simpara>table - ã«ã©ã ãå±ãããã¼ãã«ã®åå - </simpara></listitem> - <listitem><simpara>not_null - ãã®ã«ã©ã ããã«ã«ãªããã¨ãã§ããªãå ´åã« - 1 ã¨ããã - </simpara></listitem> - <listitem><simpara>primary_key - ãã®ã«ã©ã ããã©ã¤ããªãã¼ - ã§ããå ´åã« 1 - </simpara></listitem> - <listitem><simpara>unique - ãã®ã«ã©ã ãã¦ãã¼ã¯ãã¼ã§ãã - å ´åã« 1</simpara></listitem> - <listitem><simpara>type - ã«ã©ã ã®å</simpara></listitem> - </itemizedlist></para> + <listitem> + <simpara> + name - ã«ã©ã å + </simpara> + </listitem> + <listitem> + <simpara> + table - ã«ã©ã ãå±ãããã¼ãã«ã®åå + </simpara> + </listitem> + <listitem> + <simpara> + not_null - ãã®ã«ã©ã ããã«ã«ãªããã¨ãã§ããªãå ´åã«1ã¨ããã + </simpara> + </listitem> + <listitem> + <simpara> + primary_key - ãã®ã«ã©ã ããã©ã¤ããªãã¼ã§ããå ´åã«1 + </simpara> + </listitem> + <listitem> + <simpara> + unique - ãã®ã«ã©ã ãã¦ãã¼ã¯ãã¼ã§ããå ´åã«1 + </simpara> + </listitem> + <listitem> + <simpara> + type - ã«ã©ã ã®å + </simpara> + </listitem> + </itemizedlist> + </para> <para> <function>msql_field_seek</function> ãåç §ä¸ããã </para> </refsect1> </refentry> - <refentry id="function.msql-fetch-object"> <refnamediv> <refname>msql_fetch_object</refname> @@ -434,16 +468,15 @@ </funcprototype> </funcsynopsis> <para> - å¾ãè¡ã«å¯¾å¿ããããããã£ãæãããªãã¸ã§ã¯ããè¿ãã¾ãã - ããè¡ããªãå ´åã«ã¯ã&false;ãè¿ãã¾ãã + å¾ãè¡ã«å¯¾å¿ããããããã£ãæãããªãã¸ã§ã¯ããè¿ãã¾ããããè¡ + ããªãå ´åã«ã¯ã&false;ãè¿ãã¾ãã </para> <para> - <function>msql_fetch_object</function> ã¯ã<function>msql_fetch_array - </function> - ã«ä¼¼ã¦ãã¾ãããé åã®ä»£ããã«ãªãã¸ã§ã¯ããè¿ãã¨ããã ãã - ç°ãªã£ã¦ãã¾ãã - 鿥çã«ã¨ããã®ã¯ããªãã»ããå¤ã«ãã£ã¦ã§ã¯ãªããã£ã¼ã«ãåã«ãã£ã¦ã®ã¿ - ãã¼ã¿ãã¢ã¯ã»ã¹ãããã¨ãã§ãããã¨ãæå³ãã¦ãã¾ãã + <function>msql_fetch_object</function> ã¯ã + <function>msql_fetch_array</function>ã«ä¼¼ã¦ãã¾ãããé åã®ä»£ãã + ã«ãªãã¸ã§ã¯ããè¿ãã¨ããã ããç°ãªã£ã¦ãã¾ãã鿥çã«ã¨ããã® + ã¯ããªãã»ããå¤ã«ãã£ã¦ã§ã¯ãªããã£ã¼ã«ãåã«ãã£ã¦ã®ã¿ãã¼ã¿ã + ã¢ã¯ã»ã¹ãããã¨ãã§ãããã¨ãæå³ãã¦ãã¾ãã (æ°åã¯ãããããã£åã¨ãã¦ä½¿ç¨ã§ãã¾ããã) </para> <para> @@ -577,7 +610,7 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>msql_fieldtype</function></funcdef> - <paramdef>string <parameter>query_identifier</parameter></paramdef> + <paramdef>int <parameter>query_identifier</parameter></paramdef> <paramdef>int <parameter>i</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -600,7 +633,7 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>msql_fieldflags</function></funcdef> - <paramdef>string <parameter>query_identifier</parameter></paramdef> + <paramdef>int <parameter>query_identifier</parameter></paramdef> <paramdef>int <parameter>i</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -623,7 +656,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_fieldlen</function></funcdef> - <paramdef>string <parameter>query_identifier</parameter></paramdef> + <paramdef>int <parameter>query_identifier</parameter></paramdef> <paramdef>int <parameter>i</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -681,8 +714,8 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_list_fields</function></funcdef> - <paramdef>string <parameter>dãã¼ã¿ãã¼ã¹</parameter></paramdef> - <paramdef>string <parameter>ãã¼ãã«å</parameter></paramdef> + <paramdef>string <parameter>database</parameter></paramdef> + <paramdef>string <parameter>tablename</parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -832,7 +865,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_num_rows</function></funcdef> - <paramdef>string <parameter>query_identifier</parameter></paramdef> + <paramdef>int <parameter>query_identifier</parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -865,7 +898,6 @@ </refsect1> </refentry> - <refentry id="function.msql-numrows"> <refnamediv> <refname>msql_numrows</refname> @@ -896,7 +928,15 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_pconnect</function></funcdef> - <paramdef>string <parameter>ãã¹ãå</parameter></paramdef> + <paramdef>string + <parameter><optional>server</optional></parameter> + </paramdef> + <paramdef>string + <parameter><optional>username</optional></parameter> + </paramdef> + <paramdef>string + <parameter><optional>password</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> @@ -908,20 +948,20 @@ <function>msql_connect</function> ã¨å ¨ãåæ§ã«åä½ãã¾ãã </para> <para> - 1çªç®ã®å·®ç°ã¯ããã®é¢æ°ã¯æ¥ç¶ããéã«åããã¹ãã«ãã㦠- ãã§ã«ç¢ºç«ããã(æç¶çãª)ãªã³ã¯ãè¦ã¤ãããã¨ãããã¨ã§ãã - ãããããªã³ã¯ãè¦ã¤ãã£ãå ´åãæ°ããªæ¥ç¶ãéã代ããã« - ãã®ãªã³ã¯ã¸ã®IDãè¿ããã¾ãã + 1çªç®ã®å·®ç°ã¯ããã®é¢æ°ã¯æ¥ç¶ããéã«åããã¹ãã«ããã¦ãã§ã«ç¢ºç« + ããã(æç¶çãª)ãªã³ã¯ãè¦ã¤ãããã¨ãããã¨ã§ãããããããªã³ã¯ + ãè¦ã¤ãã£ãå ´åãæ°ããªæ¥ç¶ãéã代ããã«ãã®ãªã³ã¯ã¸ã®IDãè¿ã + ãã¾ãã </para> <para> - 2 çªç®ã¯ãã¹ã¯ãªããã®å®è¡çµäºæã« SQL ãµã¼ãã¼ã¸ã®æ¥ç¶ã - éããããªãã¨ãããã¨ã§ãã - 代ããã«ããªã³ã¯ã¯ã次ã«ä½¿ç¨ããããã«éãããã¾ã¾ã«ããã¾ãã - (<function>msql_close</function> ã¯ã<function>msql_pconnect</function> - ã«ãã確ç«ããããªã³ã¯ãéãã¾ãã) + 2çªç®ã¯ãã¹ã¯ãªããã®å®è¡çµäºæã«SQLãµã¼ãã¼ã¸ã®æ¥ç¶ãéããã㪠+ ãã¨ãããã¨ã§ãã代ããã«ããªã³ã¯ã¯ã次ã«ä½¿ç¨ããããã«éããã + ã¾ã¾ã«ããã¾ãã(<function>msql_close</function> ã¯ã + <function>msql_pconnect</function>ã«ãã確ç«ããããªã³ã¯ãéãã¾ + ãã) </para> <para> - ãã®ããããã®åã®ãªã³ã¯ã¯ã'æç¶ç' ã§ããã¨å¼ã°ãã¾ãã + ãã®ããããã®åã®ãªã³ã¯ã¯ã'æç¶ç' ã§ããã¨å¼ã°ãã¾ãã </para> </refsect1> </refentry> @@ -936,7 +976,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_query</function></funcdef> - <paramdef>string <parameter>ã¯ã¨ãªã¼</parameter></paramdef> + <paramdef>string <parameter>query</parameter></paramdef> <paramdef>int <parameter>link_identifier</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -953,6 +993,28 @@ æåããå ´åã«æ£ã®mSQL ã¯ã¨ãªã¼IDãè¿ãã¾ããã¨ã©ã¼ã®å ´åã«&false; ãè¿ãã¾ãã </para> + <example> + <title><function>msql_query</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$link = msql_connect("dbserver") + or die("unable to connect to msql server: ".msql_error()); +msql_select_db("db", $link) + or die("unable to select database 'db': ".msql_error()); + +$result = msql_query("SELECT * FROM table WHERE id=1", $link); +if (!$result) { + die("query failed: ".msql_error()); +} + +while ($row = msql_fetch_array($result)) { + echo $row["id"]; +} +?> +]]> + </programlisting> + </example> <para> <function>msql</function>ã <function>msql_select_db</function>ã @@ -961,12 +1023,12 @@ </refsect1> </refentry> - <refentry id="function.msql-regcase"> <refnamediv> <refname>msql_regcase</refname> - <refpurpose>大æåå°æåãåºå¥ããªããããã³ã°ç¨ã«æ£è¦è¡¨ç¾ - ã使ãã¾ã</refpurpose> + <refpurpose> + 大æåå°æåãåºå¥ããªããããã³ã°ç¨ã«æ£è¦è¡¨ç¾ã使ãã¾ã + </refpurpose> </refnamediv> <refsect1> <title>説æ</title> @@ -1032,7 +1094,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_select_db</function></funcdef> - <paramdef>string <parameter>ãã¼ã¿ãã¼ã¹å</parameter></paramdef> + <paramdef>string <parameter>database_name</parameter></paramdef> <paramdef>int <parameter>link_identifier</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1073,7 +1135,6 @@ </refsect1> </refentry> - <refentry id="function.msql-tablename"> <refnamediv> <refname>msql_tablename</refname> @@ -1085,7 +1146,7 @@ <funcprototype> <funcdef>string <function>msql_tablename</function></funcdef> <paramdef>int <parameter>query_identifier</parameter></paramdef> - <paramdef>int <parameter>ãã£ã¼ã«ã</parameter></paramdef> + <paramdef>int <parameter>field</parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -1097,22 +1158,23 @@ <example> <title><function>msql_tablename</function>ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php msql_connect ("localhost"); -$result = msql_list_tables("wisconsin"); +$result = msql_list_tables ("wisconsin"); $i = 0; -while ($i < msql_numrows($result)) { - $tb_names[$i] = msql_tablename($result, $i); - echo $tb_names[$i] . "<BR>"; +while ($i < msql_numrows ($result)) { + $tb_names[$i] = msql_tablename ($result, $i); + echo $tb_names[$i] . "<BR>"; $i++; } ?> -</programlisting> +]]> + </programlisting> </example> </para> </refsect1> </refentry> - </reference> Index: phpdoc/ja/functions/mssql.xml diff -u phpdoc/ja/functions/mssql.xml:1.9 phpdoc/ja/functions/mssql.xml:1.10 --- phpdoc/ja/functions/mssql.xml:1.9 Wed Dec 12 15:53:23 2001 +++ phpdoc/ja/functions/mssql.xml Sat Jan 26 03:55:51 2002 @@ -1,7 +1,28 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.10 $ --> <reference id="ref.mssql"> <title>MS SQL ãµã¼ãã¼é¢æ°</title> <titleabbrev>MS SQL ãµã¼ãã¼</titleabbrev> + <partintro> + <simpara> + MSSQLæ¡å¼µã¢ã¸ã¥ã¼ã«ã¯ãWin32ã·ã¹ãã ã§ã®ã¿å©ç¨å¯è½ã§ããä»ã®ãã©ã + ããã©ã¼ã ããMSSQLãã¼ã¿ãã¼ã¹ã«æ¥ç¶ããã«ã¯ãSybaseæ¡å¼µã¢ã¸ã¥ã¼ + ã«ã使ç¨ãããã¨ãå¯è½ã§ãã + </simpara> + <simpara> + ãããã®é¢æ°ã§ã¯ãMS SQLãµã¼ããã¼ã¿ãã¼ã¹ã使ç¨å¯è½ã§ãããã®æ¡å¼µ + ã¢ã¸ã¥ã¼ã«ã¯ãPHPãã¤ã³ã¹ãã¼ã«ããã¦ããã·ã¹ãã ã«MS SQLã¯ã©ã¤ã¢ + ã³ããã¼ã«ã®ã¤ã³ã¹ãã¼ã«ãè¦ãã¾ããã¯ã©ã¤ã¢ã³ããã¼ã«ã¯ã + MS SQL Server CDã¾ãã¯\winnt\system32ããntwdblib.dllãPHPã·ã¹ãã + ã®\winnt\system32ã«ã³ãã¼ãããã¨ã«ããã¤ã³ã¹ãã¼ã«å¯è½ã§ãã + ntwdblib.dllã®ã³ãã¼ã§ã¯ã¢ã¯ã»ã¹ã®ã¿ãå¯è½ã§ããã¯ã©ã¤ã¢ã³ãã®è¨å® + ã¯ãå ¨ã¦ã®ãã¼ã«ã®ã¤ã³ã¹ãã¼ã«ãå¿ è¦ã§ãã + </simpara> + <simpara> + MSSQLæ¡å¼µã¢ã¸ã¥ã¼ã«ã¯ãextension=php_mssql.dllãphp.iniã«è¿½å ãã + ãã¨ã«ãããå©ç¨å¯è½ã¨ãªãã¾ãã + </simpara> + </partintro> <refentry id="function.mssql-close"> <refnamediv> @@ -30,9 +51,8 @@ ä»®å®ãã¾ãã </para> <para> - - æç¶çã§ãªããªã³ã¯ã¯ã¹ã¯ãªããå®è¡çµäºæã«èªåçã«éããããã®ã§ - ãã®é¢æ°ã¯é常ã¯å¿ è¦ã§ã¯ããã¾ããã + æç¶çã§ãªããªã³ã¯ã¯ã¹ã¯ãªããå®è¡çµäºæã«èªåçã«éããããã®ã§ + ãã®é¢æ°ã¯é常ã¯å¿ è¦ã§ã¯ããã¾ããã </para> <para> <function>mssql_close</function>ã¯<function>mssql_pconnect</function> @@ -151,8 +171,8 @@ 強調ãã¦ããã¾ãã </para> <para> - æ´ã«è©³ç´°ãªæ å ±ã«é¢ãã¦ã¯ã - <function>mssql_fetch_row</function> ãåç §ä¸ããã + æ´ã«è©³ç´°ãªæ å ±ã«é¢ãã¦ã¯ã<function>mssql_fetch_row</function> ã + åç §ä¸ããã </para> </refsect1> </refentry> @@ -186,33 +206,31 @@ ãã£ã¼ã«ããåå¾ããã¾ãã </para> <para> - ãªãã¸ã§ã¯ãã®ããããã£ã¯ã次ã®ããã«ãªãã¾ãã + ãªãã¸ã§ã¯ãã®ããããã£ã¯ã次ã®ããã«ãªãã¾ãã </para> - - <itemizedlist> - <listitem> - <simpara> - name - ã«ã©ã åãã«ã©ã ã颿°ã®çµæã§ããå ´åããã®ããããã£ã¯ - computed#N ã«è¨å®ããã¾ãããã ãã#N ã¯ã·ãªã¢ã«çªå·ã§ãã - </simpara> - </listitem> - <listitem> - <simpara> - column_source - ãã®ã«ã©ã ãåå¾ããããã¼ãã« - </simpara> - </listitem> - <listitem> - <simpara> - max_length - ã«ã©ã ã®æå¤§é· - </simpara> - </listitem> - <listitem> - <simpara> - numeric - ãã®ã«ã©ã ãæ°åã§ããå ´åã« 1 - </simpara> - </listitem> - </itemizedlist> - + <itemizedlist> + <listitem> + <simpara> + name - ã«ã©ã åãã«ã©ã ã颿°ã®çµæã§ããå ´åããã®ããããã£ã¯ + computed#N ã«è¨å®ããã¾ãããã ãã#N ã¯ã·ãªã¢ã«çªå·ã§ãã + </simpara> + </listitem> + <listitem> + <simpara> + column_source - ãã®ã«ã©ã ãåå¾ããããã¼ãã« + </simpara> + </listitem> + <listitem> + <simpara> + max_length - ã«ã©ã ã®æå¤§é· + </simpara> + </listitem> + <listitem> + <simpara> + numeric - ãã®ã«ã©ã ãæ°åã§ããå ´åã« 1 + </simpara> + </listitem> + </itemizedlist> <para> <function>mssql_field_seek</function> ãåç §ä¸ããã </para> @@ -278,15 +296,15 @@ é åãªãã»ããã«ä¿åãããåçµæã«ã©ã ã¯ããªãã»ãã 0 ããå§ã¾ãã¾ãã </para> <para> - <function>mssql_fetch_rows</function>ãç¶ãã¦ã³ã¼ã«ããå ´åã - çµæã»ããã®æ¬¡ã®è¡ãè¿ãããè¡ããããªãå ´å㯠&false; ãè¿ããã¾ãã + <function>mssql_fetch_rows</function>ãç¶ãã¦ã³ã¼ã«ããå ´åã + çµæã»ããã®æ¬¡ã®è¡ãè¿ãããè¡ããããªãå ´å㯠&false; ãè¿ããã¾ãã </para> <para> <function>mssql_fetch_array</function>, - <function>mssql_fetch_object</function>, - <function>mssql_data_seek</function>, - <function>mssql_fetch_lengths</function>, - <function>mssql_result</function> ãåç §ä¸ããã + <function>mssql_fetch_object</function>, + <function>mssql_data_seek</function>, + <function>mssql_fetch_lengths</function>, + <function>mssql_result</function> ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -309,6 +327,9 @@ </paramdef> </funcprototype> </funcsynopsis> + <para> + &warn.undocumented.func; + </para> </refsect1> </refentry> @@ -417,7 +438,7 @@ <funcdef>string <function>mssql_get_last_message</function> </funcdef> - <paramdef>void <parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> </refsect1> @@ -459,6 +480,52 @@ </refsect1> </refentry> + <refentry id="function.mssql-next-result"> + <refnamediv> + <refname>mssql_next_result</refname> + <refpurpose>次ã®çµæã«å é¨çµæãã¤ã³ã¿ãç§»åãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool + <function>mssql_next_result</function> + </funcdef> + <paramdef>int <parameter>result_id</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + ãµã¼ãã¸è¤æ°ã®SQLå½ä»¤ãéä¿¡ãããè¤æ°ã®çµæãæããã¹ãã¢ãããã·ã¼ + ã¸ã£ãå®è¡ããå ´åããã®é¢æ°ã¯ãµã¼ããè¤æ°ã®çµæéåãè¿ãããã« + ãã¾ãããã®é¢æ°ã¯ããµã¼ããã追å ã®çµæãåå¨ãããã©ããã調㹠+ ã¾ãã追å ã®çµæéåãåå¨ããå ´åãæ¢åã®çµæéåãè§£æ¾ããæ°ã + ãçµæéåããè¡ãåå¾ããããã®æºåãè¡ãã¾ãããã®é¢æ°ã¯ã追å + ã®çµæéåãåå¾å¯è½ãªå ´åã«&true;ããã®ä»ã®å ´åã«&false;ãè¿ãã¾ + ãã + </para> + <example> + <title><function>mssql_next_result</function>ã®ä¾</title> + <programlisting role="php"> +<![CDATA[ +<?php + $link = mssql_connect ("localhost", "userid", "secret"); + mssql_select_db("MyDB", $link); + $SQL = "Select * from table1 select * from table2"; + $rs = mssql_query($SQL, $link); + do { + while ($row = mssql_fetch_row($rs)) { + } + } while (mssql_next_result($rs)); + mssql_free_result($rs); + mssql_close ($link); +?> +]]> + </programlisting> + </example> + </refsect1> + </refentry> + <refentry id="function.mssql-num-fields"> <refnamediv> <refname>mssql_num_fields</refname> @@ -473,7 +540,7 @@ </funcprototype> </funcsynopsis> <para> - <function>mssql_num_fields</function>ã¯çµæã®ãã£ã¼ã«ãæ°ãè¿ãã¾ãã + <function>mssql_num_fields</function>ã¯çµæã®ãã£ã¼ã«ãæ°ãè¿ãã¾ãã </para> <para> <function>mssql_db_query</function>, @@ -624,13 +691,12 @@ ã使ç¨ããã¾ãã </para> <para> - 大éã®çµæãå¦çããå ´åã(以ä¸ã«ç¤ºã)è¡å ¨ä½ãåå¾ãã颿°ã®ã©ããã - 使ç¨ãããã¨ãèããå¿ è¦ãããã¾ãã - ãããã®é¢æ°ã¯ä¸åã®é¢æ°ã³ã¼ã«ã§è¤æ°ã®ã»ã«ã®å 容ãè¿ãã®ã§ã - <function>mssql_result</function>ãããããªãé«éã§ãã - ã¾ããfield 弿°ã§ãªãã»ããçªå·ãæå®ããæ¹ãã - ãã£ã¼ã«ãåã¾ãã¯ãã¼ãã«å.ãã£ã¼ã«ãåã§å¼æ°ã§æå®ããããã - ããªãé«éã§ãã + 大éã®çµæãå¦çããå ´åã(以ä¸ã«ç¤ºã)è¡å ¨ä½ãåå¾ãã颿°ã®ã©ã + ãã使ç¨ãããã¨ãèããå¿ è¦ãããã¾ãããããã®é¢æ°ã¯ä¸åã®é¢æ° + ã³ã¼ã«ã§è¤æ°ã®ã»ã«ã®å 容ãè¿ãã®ã§ã + <function>mssql_result</function>ãããããªãé«éã§ããã¾ãã + field 弿°ã§ãªãã»ããçªå·ãæå®ããæ¹ãããã£ã¼ã«ãåã¾ãã¯ãã¼ + ãã«å.ãã£ã¼ã«ãåã§å¼æ°ã§æå®ãããããããªãé«éã§ãã </para> <para> æ¨å¥¨ããã髿§è½ãªä»£æ¿é¢æ°: @@ -678,6 +744,176 @@ <function>mssql_connect</function>, <function>mssql_pconnect</function>, <function>mssql_query</function> ãåç §ä¸ããã + </para> + </refsect1> + </refentry> + + <refentry id='function.mssql-bind'> + <refnamediv> + <refname>mssql_bind</refname> + <refpurpose> + ã¹ãã¢ãããã·ã¼ã¸ã£ã¾ãã¯ãªã¢ã¼ãã¹ãã¢ãããã·ã¼ã¸ã£ã¸ãã©ã¡ã¼ + ã¿ã追å ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>mssql_bind</function></funcdef> + <paramdef>int <parameter>stmt</parameter></paramdef> + <paramdef>string <parameter>param_name</parameter></paramdef> + <paramdef>mixed <parameter>var</parameter></paramdef> + <paramdef>int <parameter>type</parameter></paramdef> + <paramdef>int + <parameter><optional>is_output</optional></parameter> + </paramdef> + <paramdef>int + <parameter><optional>is_null</optional></parameter> + </paramdef> + <paramdef>int + <parameter><optional>maxlen</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.mssql-execute'> + <refnamediv> + <refname>mssql_execute</refname> + <refpurpose> + MS SQLãµã¼ããã¼ã¿ãã¼ã¹ã§ã¹ãã¢ãããã·ã¼ã¸ã£ãå®è¡ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>mssql_execute</function></funcdef> + <paramdef>int <parameter>stmt</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.mssql-fetch-assoc'> + <refnamediv> + <refname>mssql_fetch_assoc</refname> + <refpurpose> + result_idã§æå®ããçµæéåã§ã«ã¬ã³ãã®è¡ã飿³é åã¨ãã¦è¿ã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>array <function>mssql_fetch_assoc</function></funcdef> + <paramdef>int <parameter>result_id</parameter></paramdef> + <paramdef>int + <parameter><optional>result_type</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.mssql-fetch-batch'> + <refnamediv> + <refname>mssql_fetch_batch</refname> + <refpurpose> + ã¬ã³ã¼ãã®æ¬¡ã®ããããè¿ã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>mssql_fetch_batch</function></funcdef> + <paramdef>string <parameter>result_index</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.mssql-guid-string'> + <refnamediv> + <refname>mssql_guid_string</refname> + <refpurpose> + 16ãã¤ããã¤ããªGUIDãæååã«å¤æãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>mssql_guid_string</function></funcdef> + <paramdef>string <parameter>binary</parameter></paramdef> + <paramdef>int + <parameter><optional>short_format</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.mssql-init'> + <refnamediv> + <refname>mssql_init</refname> + <refpurpose> + ã¹ãã¢ãããã·ã¼ã¸ã£ã¾ãã¯ãªã¢ã¼ãã®ã¹ãã¢ãããã·ã¼ã¸ã£ãåæå + ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>mssql_init</function></funcdef> + <paramdef>string <parameter>sp_name</parameter></paramdef> + <paramdef>int + <parameter><optional>conn_id</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.mssql-rows-affected'> + <refnamediv> + <refname>mssql_rows_affected</refname> + <refpurpose> + ã¯ã¨ãªã«ããåå¾ããã¬ã³ã¼ãæ°ãè¿ã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>mssql_rows_affected</function></funcdef> + <paramdef>int <parameter>conn_id</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; </para> </refsect1> </refentry> Index: phpdoc/ja/functions/mysql.xml diff -u phpdoc/ja/functions/mysql.xml:1.22 phpdoc/ja/functions/mysql.xml:1.23 --- phpdoc/ja/functions/mysql.xml:1.22 Wed Dec 12 15:53:23 2001 +++ phpdoc/ja/functions/mysql.xml Sat Jan 26 03:55:51 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.23 $ --> <reference id="ref.mysql"> <title>MySQL颿°</title> <titleabbrev>MySQL</titleabbrev> @@ -25,6 +26,99 @@ MySQL ã®ããã¥ã¡ã³ãã¯ã<ulink url="&url.mysql.docs;">&url.mysql.docs;</ulink>ã«ããã¾ãã </simpara> + <para> + MySQL颿°ã®åä½ã¯ãã°ãã¼ãã«ãª<link linkend="configuration">è¨å® + </link>ãã¡ã¤ã«ã®è¨å®ã®å½±é¿ãåãã¾ãã + <table> + <title><link linkend="ini.sect.mysql">MySQLè¨å®</link>ãªãã·ã§ã³</title> + <tgroup cols="3"> + <thead> + <row> + <entry>åå</entry> + <entry>ããã©ã«ã</entry> + <entry>夿´ã®å¯å¦</entry> + </row> + </thead> + <tbody> + <row> + <entry>mysql.allow_persistent</entry> + <entry>"On"</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>mysql.max_persistent</entry> + <entry>"-1"</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>mysql.max_links</entry> + <entry>"-1"</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>mysql.default_port</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + </row> + <row> + <entry>mysql.default_socket</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + </row> + <row> + <entry>mysql.default_host</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + </row> + <row> + <entry>mysql.default_user</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + </row> + </tbody> + </tgroup> + </table> + PHP_INI_*宿°ã«é¢ãã詳細ã¨å®ç¾©ã«ã¤ãã¦ã¯ã + <function>ini_set</function>ãåç §ä¸ããã + </para> + <para> + 以ä¸ã¯ãMySQLãã¼ã¿ãã¼ã¹ã«æ¥ç¶ããã¯ã¨ãªãå®è¡ããçµæã¬ã³ã¼ãã + åºåãæ¥ç¶ãæããä¾ã§ãã + <example> + <title>MySQLæ¡å¼µã«é¢ããæ¦è¦ã®ä¾</title> + <programlisting role="php"> +<![CDATA[ +<?php +// ãã¼ã¿ãã¼ã¹ã«æ¥ç¶ãã鏿ãã +$link = mysql_connect("mysql_host", "mysql_login", "mysql_password") + or die("Could not connect"); +print "Connected successfully"; +mysql_select_db("my_database") + or die("Could not select database"); + +// SQLã¯ã¨ãªãå®è¡ãã +$query = "SELECT * FROM my_table"; +$result = mysql_query($query) + or die("Query failed"); + +// HTMLã«çµæãåºåãã +print "<table>\n"; +while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { + print "\t<tr>\n"; + foreach ($line as $col_value) { + print "\t\t<td>$col_value</td>\n"; + } + print "\t</tr>\n"; +} +print "</table>\n"; + +// æ¥ç¶ãéãã +mysql_close($link); +?> +]]> + </programlisting> + </example> + </para> </partintro> <refentry id="function.mysql-affected-rows"> @@ -107,7 +201,7 @@ <replaceable><optional>database</optional></replaceable> </parameter> </paramdef> - <paramdef>int + <paramdef>resource <parameter> <replaceable><optional>link_identifier</optional></replaceable> </parameter> @@ -140,8 +234,8 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>mysql_close</function></funcdef> - <paramdef>int + <funcdef>bool <function>mysql_close</function></funcdef> + <paramdef>resource <parameter> <replaceable><optional>link_identifier</optional></replaceable> </parameter> @@ -149,17 +243,19 @@ </funcprototype> </funcsynopsis> <para> - æåã®å ´åã«&true;ãã¨ã©ã¼ã®å ´åã«&false;ãè¿ãã¾ãã + &return.success; </para> <para> <function>mysql_close</function>ã¯ãæå®ããlink_identifierãæã MySQLãã¼ã¿ãã¼ã¹ã¸ã®ãªã³ã¯ãéãã¾ãã - link_identifierãæå®ãããªãå ´åãæå¾ã«ãªã¼ãã³ããããªã³ã¯ã - ä»®å®ããã¾ãã + <parameter>link_identifier</parameter>ãæå®ãããªãå ´åãæå¾ã« + ãªã¼ãã³ããããªã³ã¯ã使ç¨ããã¾ãã </para> <para> - éæç¶çãªã³ã¯ã¯ã¹ã¯ãªããã®å®è¡çµäºæã«èªåçã« - éããããã®ã§ããã®é¢æ°ã¯é常ã®å ´åå¿ è¦ããã¾ããã + æç¶çã§ãªããªã³ã¯ã¯ã¹ã¯ãªããã®å®è¡çµäºæã«èªåçã«éããããã® + ã§ããã®é¢æ°ã¯é常ã®å ´åå¿ è¦ããã¾ããã<link + linkend="language.types.resource.self-destruct">ãªã½ã¼ã¹ã®è§£æ¾ + </link>ãåç §ä¸ããã </para> <para> <function>mysql_close</function>ã¯ã<function>mysql_pconnect</function> @@ -168,12 +264,14 @@ <example> <title>MySQL æ¥ç¶ãã¯ãã¼ãºããä¾</title> <programlisting role="php"> -<?php - $link = mysql_connect ("kraemer", "marliesle", "secret") - or die ("æ¥ç¶ã§ãã¾ãã"); - print ("æ¥ç¶ã«æåãã¾ãã"); - mysql_close ($link); +<![CDATA[ +<?php + $link = mysql_connect("kraemer", "marliesle", "secret") + or exit("Could not connect"); + print ("Connected successfully"); + mysql_close($link); ?> +]]> </programlisting> </example> <para> @@ -193,24 +291,19 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>mysql_connect</function></funcdef> - <paramdef>string + <paramdef>string <parameter> - <replaceable> - <optional>hostname - <optional>:port</optional> - <optional>:/path/to/socket</optional> - </optional> - </replaceable> + <optional>server</optional> </parameter> </paramdef> - <paramdef>string + <paramdef>string <parameter> - <replaceable><optional>user_name</optional></replaceable> + <optional>username</optional> </parameter> </paramdef> - <paramdef>string + <paramdef>string <parameter> - <replaceable><optional>password</optional></replaceable> + <optional>password</optional> </parameter> </paramdef> </funcprototype> @@ -220,15 +313,18 @@ ã¨ã©ã¼ã¡ãã»ã¼ã¸ãçºçãã¾ãã </para> <para> - <function>mysql_connect</function>ã¯ãMySQL ãµã¼ãã¼ã¸ã® - æ¥ç¶ã確ç«ãã¾ãã弿°ã¯å ¨ã¦ãªãã·ã§ã³ã§ãæå®ãããªãå ´åã - ããã©ã«ãå¤ ('localhost'ããµã¼ãã¼ããã»ã¹ã®ææè ã®ã¦ã¼ã¶ã¼åã - 空ã®ãã¹ã¯ã¼ã)ãé©ç¨ããã¾ãã + <function>mysql_connect</function>ã¯ãMySQL ãµã¼ãã¼ã¸ã®æ¥ç¶ã確 + ç«ãã¾ãããªãã·ã§ã³ã®ãã©ã¡ã¼ã¿ãæå®ãããªãå ´åã以ä¸ã®ããã© + ã«ãå¤ã使ç¨ããã¾ãã: + <parameter>server</parameter> = 'localhost:3306', + <parameter>username</parameter> = ãµã¼ãããã»ã¹ã®ææã¦ã¼ã¶å + <parameter>password</parameter> = 空ã®ãã¹ã¯ã¼ã </para> <para> - æååhostnameã«ã¯ããã¼ãçªå·ãæå®ãããã¨ãå¯è½ã§ãã - ä¾ãã°ã"hostname:port"ã¨ãã¾ããlocalhostã®å ´åã«ã¯ã - ã½ã±ããã¸ã®ãã¹ ":/path/to/socket"ã¨ãã¾ãã + ãã©ã¡ã¼ã¿<parameter>server</parameter>ã«ã¯ããã¼ãçªå·ãæå®ãã + ãã¨ãå¯è½ã§ããä¾ãã°ã"hostname:port"ãã¾ãã¯ã + localhostã®å ´åã«ã¯ãã½ã±ããã¸ã®ãã¹ + ":/path/to/socket"ã¨ãã¾ãã <note> <para> ":port"ã®ãµãã¼ãã¯3.0B4ã§è¿½å ããã¾ããã @@ -254,14 +350,14 @@ <example> <title>MySQL ã«æ¥ç¶ããä¾</title> <programlisting role="php"> -<?php - - $link = mysql_connect ("localhost", "username", "secret") - or die ("æ¥ç¶ã§ãã¾ããã§ãã"); - print ("æ¥ç¶ã«æåãã¾ãã"); - mysql_close ($link); - -?> +<![CDATA[ +<?php + $link = mysql_connect("localhost", "username", "secret") + or die("Could not connect"); + print ("Connected successfully"); + mysql_close($link); +?> +]]> </programlisting> </example> <para> @@ -280,9 +376,9 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>mysql_create_db</function></funcdef> + <funcdef>bool <function>mysql_create_db</function></funcdef> <paramdef>string <parameter>database_name</parameter></paramdef> - <paramdef>int + <paramdef>resource <parameter> <replaceable><optional>link_identifier</optional></replaceable> </parameter> @@ -296,15 +392,17 @@ <example> <title>MySQLãã¼ã¿ãã¼ã¹ã使ããä¾</title> <programlisting role="php"> -<?php - $link = mysql_pconnect ("kron", "jutta", "geheim") - or die ("Could not connect"); - if (mysql_create_db ("my_db")) { - print ("ãã¼ã¿ãã¼ã¹ã®ä½æã«æåãã¾ãã\n"); +<![CDATA[ +<?php + $link = mysql_pconnect("kron", "jutta", "geheim") + or exit("Could not connect"); + if (mysql_create_db("my_db")) { + print ("Database created successfully\n"); } else { - printf ("ãã¼ã¿ãã¼ã¹ä½ææã«æ¬¡ã®ã¨ã©ã¼ãçºçãã¾ãã: %s\n", mysql_error ()); + printf ("Error creating database: %s\n", mysql_error ()); } ?> +]]> </programlisting> </example> <para> @@ -326,13 +424,13 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>mysql_data_seek</function></funcdef> - <paramdef>int <parameter>result_identifier</parameter></paramdef> + <funcdef>bool <function>mysql_data_seek</function></funcdef> + <paramdef>resource <parameter>result_identifier</parameter></paramdef> <paramdef>int <parameter>row_number</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - æåããå ´åã«&true;ã失æããå ´åã«&false;ãè¿ãã¾ãã + &return.success; </para> <para> <function>mysql_data_seek</function>ã¯ãæå®ããçµæID @@ -344,37 +442,38 @@ <para> <parameter>row_number</parameter> ã¯ã0ããå§ã¾ãã¾ãã </para> - <example> <title>MySQLãã¼ã¿ãã·ã¼ã¯ããä¾</title> <programlisting role="php"> -<?php - $link = mysql_pconnect ("kron", "jutta", "geheim") - or die ("æ¥ç¶ã§ãã¾ãã"); +<![CDATA[ +<?php + $link = mysql_pconnect("kron", "jutta", "geheim") + or die("Could not connect"); - mysql_select_db ("samp_db") - or die ("ãã¼ã¿ãã¼ã¹ã select ã§ãã¾ãã"); + mysql_select_db("samp_db") + or exit("Could not select database"); $query = "SELECT last_name, first_name FROM friends"; - $result = mysql_query ($query) - or die ("ã¯ã¨ãªã失æãã¾ãã"); + $result = mysql_query($query) + or die("Query failed"); - # è¡ãéé ã«åå¾ãã + // fetch rows in reverse order - for ($i = mysql_num_rows ($result) - 1; $i >=0; $i--) { - if (!mysql_data_seek ($result, $i)) { - printf ("è¡ %d ã«ç§»åã§ãã¾ãã\n", $i); + for ($i = mysql_num_rows($result) - 1; $i >=0; $i--) { + if (!mysql_data_seek($result, $i)) { + echo "Cannot seek to row $i\n"; continue; } - if(!($row = mysql_fetch_object ($result))) + if(!($row = mysql_fetch_object($result))) continue; - printf ("%s %s<BR>\n", $row->last_name, $row->first_name); + echo "$row->last_name $row->first_name<br />\n"; } - mysql_free_result ($result); + mysql_free_result($result); ?> +]]> </programlisting> </example> </refsect1> @@ -389,8 +488,8 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>mysql_db_name</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <funcdef>string <function>mysql_db_name</function></funcdef> + <paramdef>resource <parameter>result</parameter></paramdef> <paramdef>int <parameter>row</parameter></paramdef> <paramdef>mixed <parameter> @@ -414,7 +513,8 @@ <example> <title><function>mysql_db_name</function> ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php error_reporting(E_ALL); mysql_connect('dbhost', 'username', 'password'); @@ -422,11 +522,12 @@ $i = 0; $cnt = mysql_num_rows($db_list); -while ($i < $cnt) { +while ($i < $cnt) { echo mysql_db_name($db_list, $i) . "\n"; $i++; } ?> +]]> </programlisting> </example> <para> @@ -445,10 +546,10 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>mysql_db_query</function></funcdef> + <funcdef>resource <function>mysql_db_query</function></funcdef> <paramdef>string <parameter>database</parameter></paramdef> <paramdef>string <parameter>query</parameter></paramdef> - <paramdef>int + <paramdef>resource <parameter> <replaceable><optional>link_identifier</optional></replaceable> </parameter> @@ -469,10 +570,17 @@ åæ§ã«ãªã³ã¯ã使ãããã¨ãã¾ãã </para> <para> - <function>mysql_connect</function>ãåç §ä¸ããã + <function>mysql_connect</function>㨠+ <function>mysql_query</function>ãåç §ä¸ããã </para> - <para> - ä¸ä½äºææ§ã®ç¶æã®ããã«<function>mysql</function>ã使ç¨å¯è½ã§ãã + <para> + <note> + <simpara> + ãã®é¢æ°ã¯ãPHP 4.0.6以éå¤ã颿°ã¨ãªã£ã¦ãã¾ãããã®é¢æ°ã¯ä½¿ç¨ + ããªãã§ä¸ãããæ¿ããã«<function>mysql_select_db</function>ã + ãã³<function>mysql_query</function>ã使ç¨ãã¦ä¸ããã + </simpara> + </note> </para> </refsect1> </refentry> @@ -486,17 +594,17 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>mysql_drop_db</function></funcdef> + <funcdef>bool <function>mysql_drop_db</function></funcdef> <paramdef>string <parameter>database_name</parameter></paramdef> - <paramdef>int + <paramdef>resource <parameter> <replaceable><optional>link_identifier</optional></replaceable> </parameter> </paramdef> </funcprototype> </funcsynopsis> - <para> - æåããå ´åã«&true;ã失æããå ´åã«&false;ãè¿ãã¾ãã + <para> + &return.success; </para> <para> <function>mysql_drop_db</function>ã¯ãæå®ããlink_identifierãæã @@ -507,6 +615,9 @@ ä¸ä½äºææ§ã®ç¶æã®ããã<function>mysql_dropdb</function>ã 使ç¨ãããã¨ãå¯è½ã§ãã </para> + <para> + <function>mysql_create_db</function>ãåç §ä¸ããã + </para> </refsect1> </refentry> @@ -522,7 +633,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>mysql_errno</function></funcdef> - <paramdef>int + <paramdef>resource <parameter> <replaceable><optional>link_identifier</optional></replaceable> </parameter> @@ -546,14 +657,16 @@ ä»ã®MySQL颿°ãã³ã¼ã«ããåã«å¤ããã§ãã¯ããããã«ãã¦ä¸ããã <informalexample> <programlisting role="php"> -<?php +<![CDATA[ +<?php mysql_connect("marliesle"); -echo mysql_errno().": ".mysql_error()."<BR>"; +echo mysql_errno().": ".mysql_error()."<BR>"; mysql_select_db("nonexistentdb"); -echo mysql_errno().": ".mysql_error()."<BR>"; +echo mysql_errno().": ".mysql_error()."<BR>"; $conn = mysql_query("SELECT * FROM nonexistenttable"); -echo mysql_errno().": ".mysql_error()."<BR>"; +echo mysql_errno().": ".mysql_error()."<BR>"; ?> +]]> </programlisting> </informalexample> </para> @@ -575,7 +688,7 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>mysql_error</function></funcdef> - <paramdef>int + <paramdef>resource <parameter> <replaceable><optional>link_identifier</optional></replaceable> </parameter> @@ -596,14 +709,16 @@ ä»ã®MySQL颿°ãã³ã¼ã«ããåã«ãå¤ããã§ãã¯ããããã«ãã¦ä¸ããã <informalexample> <programlisting role="php"> -<?php +<![CDATA[ +<?php mysql_connect("marliesle"); -echo mysql_errno().": ".mysql_error()."<BR>"; +echo mysql_errno().": ".mysql_error()."<BR>"; mysql_select_db("nonexistentdb"); -echo mysql_errno().": ".mysql_error()."<BR>"; +echo mysql_errno().": ".mysql_error()."<BR>"; $conn = mysql_query("SELECT * FROM nonexistenttable"); -echo mysql_errno().": ".mysql_error()."<BR>"; +echo mysql_errno().": ".mysql_error()."<BR>"; ?> +]]> </programlisting> </informalexample> </para> @@ -653,7 +768,7 @@ <funcsynopsis> <funcprototype> <funcdef>array <function>mysql_fetch_array</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <paramdef>resource <parameter>result</parameter></paramdef> <paramdef>int <parameter> <replaceable><optional>result_type</optional></replaceable> @@ -677,8 +792,10 @@ ååã®ä»ã®ã«ã©ã ã«ã¢ã¯ã»ã¹ããã«ã¯ããã®ã«ã©ã ã®æ°å¤ã¤ã³ããã¯ã¹ ã使ããã¾ãã¯ã«ã©ã ã®å¥åãå®ç¾©ããå¿ è¦ãããã¾ãã <informalexample> - <programlisting> -select t1.f1 as foo t2.f1 as bar from t1, t2 + <programlisting role="sql"> +<![CDATA[ +select tone.field as foo ttwo.field as bar from tone, ttwo +]]> </programlisting> </informalexample> </para> @@ -692,7 +809,16 @@ <function>mysql_fetch_array</function>ã® ãªãã·ã§ã³ã®2çªç®ã®å¼æ°<parameter>result_type</parameter>ã¯å®æ°ã§ããã æ¬¡ã®å¤ãã¨ãã¾ãã: MYSQL_ASSOC, MYSQL_NUM, MYSQL_BOTH - (ãã®æ©è½ã¯ PHP 3.0.7ã§è¿½å ãããæ©è½ã§ã) + ãã®æ©è½ã¯ PHP 3.0.7ã§è¿½å ãããæ©è½ã§ãããã®å¼æ°ã®ããã©ã«ãå¤ã¯ã + MYSQL_BOTHã§ãã + </para> + <para> + MYSQL_BOTHã使ç¨ããã¨ã飿³æ·»åã¨æ°å¤æ·»åãå ±ã«æããé åãåå¾ + ãã¾ããMYSQL_ASSOCã使ç¨ããã¨ã( + <function>mysql_fetch_assoc</function>ã®åä½ã¨åæ§ã«)飿³æ·»åã®ã¿ + ãåå¾ãããMYSQL_NUMã使ç¨ããã¨ã + (<function>mysql_fetch_row</function>ã®åä½ã¨åæ§ã«æ°å¤æ·»åã®ã¿ã + åå¾ããã¾ãã </para> <para> ããè©³ç´°ãªæ å ±ã«ã¤ãã¦ã¯ã @@ -700,19 +826,22 @@ <function>mysql_fetch_assoc</function>ãåç §ä¸ããã </para> <example> - <title><function>mysql_fetch_array</function></title> + <title><function>mysql_fetch_array</function>ã®ä¾</title> <programlisting role="php"> -<?php -mysql_connect ($host, $user, $password); -$result = mysql_db_query ("database","select user_id, fullname from table"); -while ($row = mysql_fetch_array ($result)) { - echo "user_id: ".$row["user_id"]."<br>\n"; - echo "user_id: ".$row[0]."<br>\n"; - echo "fullname: ".$row["fullname"]."<br>\n"; - echo "fullname: ".$row[1]."<br>\n"; +<![CDATA[ +<?php +mysql_connect($host, $user, $password); +mysql_select_db("database"); +$result = mysql_query("select user_id, fullname from table"); +while ($row = mysql_fetch_array($result)) { + echo "user_id: ".$row["user_id"]."<br>\n"; + echo "user_id: ".$row[0]."<br>\n"; + echo "fullname: ".$row["fullname"]."<br>\n"; + echo "fullname: ".$row[1]."<br>\n"; } -mysql_free_result ($result); +mysql_free_result($result); ?> +]]> </programlisting> </example> </refsect1> @@ -730,7 +859,7 @@ <funcsynopsis> <funcprototype> <funcdef>array <function>mysql_fetch_assoc</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <paramdef>resource <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -749,8 +878,9 @@ <para> çµæã®è¤æ°ã®ã«ã©ã ãåããã£ã¼ã«ãåãæãã¦ããå ´åãæå¾ã®ã«ã© ã ãåªå ããã¾ããåãååãæããä»ã®ã«ã©ã ã«ã¢ã¯ã»ã¹ããã«ã¯ã - <function>mysql_fetch_array</function>ã使ç¨ããåæã«æ°å¤æ·»åã - è¿ãå¿ è¦ãããã¾ãã + <function>mysql_fetch_row</function>ã使ç¨ãã¦æ°å¤æ·»åãè¿ããã + ã¨ã¤ãªã¢ã¹åã追å ããå¿ è¦ãããã¾ããã¨ã¤ãªã¢ã¹ã®èª¬æã«ã¤ãã¦ã¯ã + <function>mysql_fetch_array</function>ã®ä¾ãåç §ä¸ããã </para> <para> <function>mysql_fetch_assoc</function>ã®ä½¿ç¨ã«é¢ãã¦ãèããä»å @@ -764,15 +894,19 @@ <example> <title><function>mysql_fetch_assoc</function></title> <programlisting role="php"> -<?php -mysql_connect ($host, $user, $password); -$result = mysql_db_query ("database","select * from table"); -while ($row = mysql_fetch_assoc ($result)) { +<![CDATA[ +<?php +mysql_connect($host, $user, $password); +mysql_select_db($database); +$query = "select * from table"; +$result = mysql_query($query); +while ($row = mysql_fetch_assoc($result)) { echo $row["user_id"]; echo $row["fullname"]; } -mysql_free_result ($result); +mysql_free_result($result); ?> +]]> </programlisting> </example> </refsect1> @@ -790,7 +924,7 @@ <funcsynopsis> <funcprototype> <funcdef>object <function>mysql_fetch_field</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <paramdef>resource <parameter>result</parameter></paramdef> <paramdef>int <parameter> <replaceable><optional>field_offset</optional></replaceable> @@ -876,20 +1010,22 @@ <example> <title><function>mysql_fetch_field</function></title> <programlisting role="php"> -<?php -mysql_connect ($host, $user, $password) - or die ("æ¥ç¶ã§ãã¾ãã"); -$result = mysql_db_query ("database", "select * from table") - or die ("ã¯ã¨ãªã失æãã¾ãã"); +<![CDATA[ +<?php +mysql_connect('localhost:3306', $user, $password) + or die ("Could not connect"); +mysql_select_db("database"); +$result = mysql_query("select * from table") + or die("Query failed"); # get column metadata $i = 0; -while ($i < mysql_num_fields ($result)) { - echo "ã«ã©ã $i ã®æ å ± <BR>\n"; - $meta = mysql_fetch_field ($result); +while ($i < mysql_num_fields($result)) { + echo "Information for column $i:<BR>\n"; + $meta = mysql_fetch_field($result); if (!$meta) { - echo "æ å ±ãå ¥æã§ãã¾ãã <BR>\n"; + echo "No information available<BR>\n"; } - echo "<PRE> + echo "<PRE> blob: $meta->blob max_length: $meta->max_length multiple_key: $meta->multiple_key @@ -902,11 +1038,12 @@ unique_key: $meta->unique_key unsigned: $meta->unsigned zerofill: $meta->zerofill -</PRE>"; +</PRE>"; $i++; } -mysql_free_result ($result); +mysql_free_result($result); ?> +]]> </programlisting> </example> <para> @@ -926,8 +1063,8 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef> <function>mysql_fetch_lengths</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <funcdef>array <function>mysql_fetch_lengths</function></funcdef> + <paramdef>resource <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -959,7 +1096,7 @@ <funcsynopsis> <funcprototype> <funcdef>object <function>mysql_fetch_object</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <paramdef>resource <parameter>result</parameter></paramdef> <paramdef>int <parameter> <replaceable><optional>result_typ</optional></replaceable> @@ -987,17 +1124,20 @@ é度é¢ã§ã¯ããã®é¢æ°ã¯<function>mysql_fetch_array</function>ã¨åçã§ã <function>mysql_fetch_row</function>ã¨ã»ã¼åçã§ãã(éãã¯ãããã§ã) <example> - <title>MySQLãªãã¸ã§ã¯ãã®åå¾</title> + <title><function>mysql_fetch_object</function>ã®ä¾</title> <programlisting role="php"> -<?php -mysql_connect ($host, $user, $password); -$result = mysql_db_query ("database", "select * from table"); -while($row = mysql_fetch_object ($result)) { +<![CDATA[ +<?php +mysql_connect("hostname", "user", "password"); +mysql_select_db($db); +$result = mysql_query("select * from table"); +while ($row = mysql_fetch_object($result)) { echo $row->user_id; echo $row->fullname; } -mysql_free_result ($result); +mysql_free_result($result); ?> +]]> </programlisting> </example> </para> @@ -1018,7 +1158,7 @@ <funcsynopsis> <funcprototype> <funcdef>array <function>mysql_fetch_row</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <paramdef>resource <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -1057,7 +1197,7 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>mysql_field_flags</function></funcdef> - <paramdef>string <parameter>result</parameter></paramdef> + <paramdef>resource <parameter>result</parameter></paramdef> <paramdef>int <parameter>field_offset</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1091,18 +1231,53 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>mysql_field_name</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <paramdef>resource <parameter>result</parameter></paramdef> <paramdef>int <parameter>field_index</parameter></paramdef> </funcprototype> </funcsynopsis> <para> <function>mysql_field_name</function>ã¯ãæå®ãããã£ã¼ã«ãã® - ååãè¿ãã¾ãã颿°ã®å¼æ°ã¯ãçµæIDã¨ãã£ã¼ã«ãã¤ã³ããã¯ã¹ã§ãã - ããªãã¡ã<literal>mysql_field_name($result,2);</literal> + ååãè¿ãã¾ãã<parameter>result</parameter>ã¯æå¹ãªçµæIDã + <parameter>field_index</parameter>ã¯ãã£ã¼ã«ãã®ãªãã»ããæ°ã¨ã + ãå¿ è¦ãããã¾ãã </para> + <note> + <para> + <parameter>field_index</parameter>ã¯0ããå§ã¾ãã¾ãã + </para> + <para> + ä¾ãã°ã3çªç®ã®ãã£ã¼ã«ãã®æ·»åã¯2ã4çªç®ã®ãã£ã¼ã«ãã®æ·»åã¯3㨠+ ãã£ãããã«ãªãã¾ãã + </para> + </note> <para> - <function>mysql_field_name</function>ã¯ãçµæIDãæãçµæã«ãã㦠- 2çªç®ã®ãã£ã¼ã«ãã®ååãè¿ãã¾ãã + <example> + <title><function>mysql_field_name</function>ã®ä¾</title> + <programlisting role="php"> +<![CDATA[ +// The users table consists of three fields: +// user_id +// username +// password. +$link = mysql_connect('localhost', $user, "secret"); +mysql_select_db($dbname, $link) + or die("Could not set $dbname"); +$res = mysql_query("select * from users", $link); + +echo mysql_field_name($res, 0) . "\n"; +echo mysql_field_name($res, 2); +]]> + </programlisting> + <para> + ä¸ã®ä¾ã¯åºåã®ããã«ãªãã¾ãã + <screen> +<![CDATA[ +user_id +password +]]> + </screen> + </para> + </example> </para> <para> ä¸ä½äºææ§ãç¶æããããã<function>mysql_fieldname</function> Index: phpdoc/ja/functions/network.xml diff -u phpdoc/ja/functions/network.xml:1.22 phpdoc/ja/functions/network.xml:1.23 --- phpdoc/ja/functions/network.xml:1.22 Wed Dec 12 15:53:25 2001 +++ phpdoc/ja/functions/network.xml Sat Jan 26 03:55:51 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.23 $ --> <reference id="ref.network"> <title>ãããã¯ã¼ã¯é¢æ°</title> <titleabbrev>ãããã¯ã¼ã¯</titleabbrev>
Index: phpdoc/ja/functions/mhash.xml diff -u phpdoc/ja/functions/mhash.xml:1.10 phpdoc/ja/functions/mhash.xml:1.11 --- phpdoc/ja/functions/mhash.xml:1.10 Wed Dec 12 15:53:18 2001 +++ phpdoc/ja/functions/mhash.xml Sat Jan 26 03:55:51 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.11 $ --> <reference id="ref.mhash"> <title>Mhash颿°</title> <titleabbrev>mhash</titleabbrev> @@ -29,30 +30,35 @@ <example> <title>MD5ãã¤ã¸ã§ã¹ãã¨hmacãè¨ç®ãã16鲿°ã§åºåãã</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $input = "what do ya want for nothing?"; $hash = mhash (MHASH_MD5, $input); -print "The hash is ".bin2hex ($hash)."\n<br>"; +print "The hash is ".bin2hex ($hash)."<br />\n"; $hash = mhash (MHASH_MD5, $input, "Jefe"); -print "The hmac is ".bin2hex ($hash)."\n<br>"; -?> +print "The hmac is ".bin2hex ($hash)."<br />\n"; +?> +]]> </programlisting> - </example> - ãã®ä¾ã®åºåã¯æ¬¡ã®ããã«ãªãã¾ãã - <programlisting> + <para> + ãã®ä¾ã®åºåã¯æ¬¡ã®ããã«ãªãã¾ãã + <screen> +<![CDATA[ The hash is d03cb659cbf9192dcd066272249f8412 The hmac is 750c783e6ab0b503eaa86e310a5db738 - </programlisting> - ãµãã¼ããããããã·ã¥ã®å®å ¨ãªãªã¹ãã«ã¤ãã¦ã¯ãmhashã®ããã¥ã¡ã³ãã - åç §ä¸ããã - PHPããç¹å®ã®ããã·ã¥ã¢ã«ã´ãªãºã ã«ã¢ã¯ã»ã¹ããã«ã¯ããMHASH_ããã·ã¥åã - ãæå®ãã¾ããä¾ãã°ãTIGERã«ã¢ã¯ã»ã¹ããã«ã¯ãPHP宿° MHASH_TIGER - ã使ç¨ãã¾ãã +]]> + </screen> + </para> + </example> + ãµãã¼ããããããã·ã¥ã®å®å ¨ãªãªã¹ãã«ã¤ãã¦ã¯ãmhashã®ããã¥ã¡ + ã³ããåç §ä¸ãããPHPããç¹å®ã®ããã·ã¥ã¢ã«ã´ãªãºã ã«ã¢ã¯ã»ã¹ã + ãã«ã¯ããMHASH_ããã·ã¥åããæå®ãã¾ããä¾ãã°ãTIGERã«ã¢ã¯ã» + ã¹ããã«ã¯ãPHP宿° MHASH_TIGERã使ç¨ãã¾ãã </para> <para> 以ä¸ã«ç¾å¨mhashã«ãããµãã¼ãããã¦ããããã·ã¥ã®ä¸è¦§ã示ãã¾ãã - mhashã«ãµãã¼ãããã¦ããããã·ã¥ãããã®ãªã¹ãã«ãªãå ´åã¯ã - ãã®ããã¥ã¡ã³ããå¤ãã¨ä»®å®ãã¦ä¸ããã + mhashã«ãµãã¼ãããã¦ããããã·ã¥ãããã®ãªã¹ãã«ãªãå ´åã¯ãã + ã®ããã¥ã¡ã³ããå¤ãã¨ä»®å®ãã¦ä¸ããã <itemizedlist> <listitem> <simpara> @@ -139,17 +145,23 @@ <example> <title><function>mhash_get_hash_name</function>ã®ä¾</title> <programlisting> -<?php +<![CDATA[ +<?php $hash = MHASH_MD5; print mhash_get_hash_name ($hash); -?> +?> +]]> </programlisting> + <para> + ä¸ã®ä¾ã®åºåã¯æ¬¡ã®ããã«ãªãã¾ãã + <screen> +<![CDATA[ + MD5 +]]> + </screen> + </para> </example> - ä¸ã®ä¾ã®åºåã¯æ¬¡ã®ããã«ãªãã¾ãã - <programlisting> -MD5 - </programlisting> </para> </refsect1> </refentry> @@ -190,7 +202,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>mhash_count</function></funcdef> - <paramdef>void </paramdef> + <void/> </funcprototype> </funcsynopsis> <para> @@ -201,16 +213,18 @@ <example> <title>å ¨ããã·ã¥ãã«ã¼ããã</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $nr = mhash_count(); -for ($i = 0; $i <= $nr; $i++) { +for ($i = 0; $i <= $nr; $i++) { echo sprintf ("The blocksize of %s is %d\n", - mhash_get_hash_name ($i), - mhash_get_block_size ($i)); + mhash_get_hash_name ($i), + mhash_get_block_size ($i)); } -?> +?> +]]> </programlisting> </example> </para> @@ -240,7 +254,7 @@ <function>mhash</function>ã¯ã<parameter>data</parameter>ã« <parameter>hash</parameter>ã§æå®ããããã·ã¥é¢æ°ãé©ç¨ãã (ãã¤ã¸ã§ã¹ãã¨ãå¼ã°ãã)ããã·ã¥ãè¿ãã¾ãã - <parameter> key</parameter> ãæå®ããã¦ããå ´åãçµæã¨ãã¦HMAC + <parameter>key</parameter> ãæå®ããã¦ããå ´åãçµæã¨ãã¦HMAC ãè¿ããã¾ããHMACã¯ãã¡ãã»ã¼ã¸èªè¨¼æã¯ãã¼ã«åºã¥ãããã·ã¥ãã¾ã ã¯æå®ãããã¼ã«åºã¥ãåãªãã¡ãã»ã¼ã¸ãã¤ã¸ã§ã¹ãã§ããmhashã§ãµ ãã¼ãããã¦ããå ¨ã¦ã®ã¢ã«ã´ãªãºã ãHMACã¢ã¼ãã§ä½¿ç¨ã§ããããã§ Index: phpdoc/ja/functions/ming.xml diff -u phpdoc/ja/functions/ming.xml:1.9 phpdoc/ja/functions/ming.xml:1.10 --- phpdoc/ja/functions/ming.xml:1.9 Wed Dec 12 15:53:19 2001 +++ phpdoc/ja/functions/ming.xml Sat Jan 26 03:55:51 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.10 $ --> <reference id="ref.ming"> <title>Flash ç¨ Ming 颿°</title> <titleabbrev>Ming (flash)</titleabbrev> @@ -66,13 +67,17 @@ <sect2 id="ming.install.php.unix"> <title>PHP (unix) ã«çµã¿è¾¼ã</title> <para> - <literallayout> - mkdir <phpdir>/ext/ming - cp php_ext/* <phpdir>/ext/ming - cd <phpdir> + <informalexample> + <literallayout> +<![CDATA[ + mkdir <phpdir>/ext/ming + cp php_ext/* <phpdir>/ext/ming + cd <phpdir> ./buildconf - ./configure --with-ming <other config options> - </literallayout> + ./configure --with-ming <other config options> +]]> + </literallayout> + </informalexample> PHP ãé常ã¨åæ§ã«æ§ç¯ãã¤ã³ã¹ãã¼ã«ãã¦ä¸ãããå¿ è¦ãªãã° Web ãµã¼ããåèµ·åãã¦ä¸ããã </para> @@ -168,6 +173,90 @@ </itemizedlist> </sect1> </partintro> + + <refentry id='function.ming-setcubicthreshold'> + <refnamediv> + <refname>ming_setcubicthreshold</refname> + <refpurpose> + Set cubic threshold (?) + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>ming_setcubicthreshold</function></funcdef> + <paramdef>int <parameter>threshold</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.ming-setscale'> + <refnamediv> + <refname>ming_setscale</refname> + <refpurpose> + Set scale (?) + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>ming_setscale</function></funcdef> + <paramdef>int <parameter>scale</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.ming-useswfversion'> + <refnamediv> + <refname>ming_useswfversion</refname> + <refpurpose> + Use SWF version (?) + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>ming_useswfversion</function></funcdef> + <paramdef>int <parameter>version</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.swfbutton-keypress'> + <refnamediv> + <refname>swfbutton_keypress</refname> + <refpurpose> + Returns the action flag for keyPress(char) + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>swfbutton_keypress</function></funcdef> + <paramdef>string <parameter>str</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> <!-- SWFMovie --> @@ -183,9 +272,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swfmovie</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie</function> ã¯ãSWFãã¼ã¸ã§ã³4ã ã¼ãã¼å½¢å¼ã§æ°ã ã«ã ã¼ãã¼ãªãã¸ã§ã¯ãã使ãã¾ãã @@ -221,7 +311,7 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfmovie->output</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> <para> @@ -229,9 +319,11 @@ ãã¾ããPHP ã§ã¯ããã®åã«æ¬¡ã®ã³ãã³ããå®è¡ãããã¨ã«ããããã© ã¦ã¶ã«flashã ã¼ãã¼ãåºåããã¾ãã <programlisting role="php"> -<?php +<![CDATA[ +<?php header('Content-type: application/x-shockwave-flash'); -?> +?> +]]> </programlisting> </para> <simpara> @@ -259,6 +351,7 @@ <paramdef>string <parameter>filename</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie->save</function> ã¯ãã ã¼ãã¼ã <parameter>filename</parameter> ã¨ããååã®ãã¡ã¤ã«ã«ä¿åãã¾ãã @@ -323,6 +416,7 @@ <paramdef>ressource <parameter>instance</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie->remove</function> ã¯ã表示ãªã¹ããããªãã¸ã§ ã¯ãã®ã¤ã³ã¹ã¿ã³ã¹ <parameter>instance</parameter>ãåé¤ãã¾ãã @@ -348,6 +442,7 @@ <paramdef>int <parameter>blue</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie->setbackground</function>ã¯èæ¯è²ãè¨å®ãã¾ãã Why is @@ -373,6 +468,7 @@ <paramdef>int <parameter>rate</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>nom_de_la_fonction</function> sets the frame rate to <parameter>rate</parameter>, in frame per seconds. @@ -397,6 +493,7 @@ <paramdef>int <parameter>height</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie->setdimension</function> ã¯ãã ã¼ãã¼ã®å¹ ã <parameter>width</parameter> ã«ãé«ãã @@ -418,6 +515,7 @@ <paramdef>string <parameter>numberofframes</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie->setframes</function> sets the total number of frames in the animation to <parameter>numberofframes</parameter>. @@ -435,9 +533,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfmovie->nextframe</function></funcdef> - <paramdef>void </paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie->setframes</function> moves to the next frame of the animation. @@ -458,6 +557,7 @@ <paramdef>string <parameter>mp3FileName</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmovie->streammp3</function> streams the mp3 file <parameter>mp3FileName</parameter>. Not very robust in dealing with @@ -476,18 +576,20 @@ <example> <title><function>swfmovie->streammp3</function> ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $m = new SWFMovie(); - $m->setRate(12.0); - $m->streamMp3("distortobass.mp3"); -// use your own MP3 + $m->setRate(12.0); + $m->streamMp3("distortobass.mp3"); + // use your own MP3 // 11.85 seconds at 12.0 fps = 142 frames - $m->setFrames(142); + $m->setFrames(142); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -506,9 +608,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swfdisplayitem</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem</function> creates a new swfdisplayitem object. </para> @@ -545,6 +648,7 @@ <paramdef>int <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->moveto</function> moves the current object to (<parameter>x</parameter>,<parameter>y</parameter>) in global coordinates. @@ -575,6 +679,7 @@ <paramdef>int <parameter>dy</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->move</function> moves the current object by (<parameter>dx</parameter>,<parameter>dy</parameter>) from its @@ -606,6 +711,7 @@ <paramdef>int <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->scaleto</function> scales the current object to (<parameter>x</parameter>,<parameter>y</parameter>) in global coordinates. @@ -636,6 +742,7 @@ <paramdef>int <parameter>dy</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->scale</function> scales the current object by (<parameter>dx</parameter>,<parameter>dy</parameter>) from its @@ -663,9 +770,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->rotateto</function></funcdef> - <paramdef>double <parameter>degrees</parameter></paramdef> + <paramdef>float <parameter>degrees</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->rotateto</function> set the current object rotation to <parameter>degrees</parameter> degrees in global coordinates. @@ -682,15 +790,16 @@ <example> <title><function>swfdisplayitem->rotateto</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $thetext = "ming!"; $f = new SWFFont("Bauhaus 93.fdb"); $m = new SWFMovie(); - $m->setRate(24.0); - $m->setDimension(2400, 1600); - $m->setBackground(0xff, 0xff, 0xff); + $m->setRate(24.0); + $m->setDimension(2400, 1600); + $m->setBackground(0xff, 0xff, 0xff); // functions with huge numbers of arbitrary // arguments are always a good idea! Really! @@ -700,23 +809,23 @@ global $f, $m; $t = new SWFText(); - $t->setFont($f); - $t->setColor($r, $g, $b, $a); - $t->setHeight(960); - $t->moveTo(-($f->getWidth($string))/2, $f->getAscent()/2); - $t->addString($string); + $t->setFont($f); + $t->setColor($r, $g, $b, $a); + $t->setHeight(960); + $t->moveTo(-($f->getWidth($string))/2, $f->getAscent()/2); + $t->addString($string); // we can add properties just like a normal php var, // as long as the names aren't already used. - // e.g., we can't set $i->scale, because that's a function + // e.g., we can't set $i->scale, because that's a function - $i = $m->add($t); - $i->x = $x; - $i->y = $y; - $i->rot = $rot; - $i->s = $scale; - $i->rotateTo($rot); - $i->scale($scale, $scale); + $i = $m->add($t); + $i->x = $x; + $i->y = $y; + $i->rot = $rot; + $i->s = $scale; + $i->rotateTo($rot); + $i->scale($scale, $scale); // but the changes are local to the function, so we have to // return the changed object. kinda weird.. @@ -726,15 +835,15 @@ function step($i) { - $oldrot = $i->rot; - $i->rot = 19*$i->rot/20; - $i->x = (19*$i->x + 1200)/20; - $i->y = (19*$i->y + 800)/20; - $i->s = (19*$i->s + 1.0)/20; - - $i->rotateTo($i->rot); - $i->scaleTo($i->s, $i->s); - $i->moveTo($i->x, $i->y); + $oldrot = $i->rot; + $i->rot = 19*$i->rot/20; + $i->x = (19*$i->x + 1200)/20; + $i->y = (19*$i->y + 800)/20; + $i->s = (19*$i->s + 1.0)/20; + + $i->rotateTo($i->rot); + $i->scaleTo($i->s, $i->s); + $i->moveTo($i->x, $i->y); return $i; } @@ -745,18 +854,19 @@ $i2 = text(0x00, 0x33, 0xff, 0x7f, -560, 1200, 800, 0.04, $thetext); $i3 = text(0xff, 0xff, 0xff, 0x9f, 180, 1200, 800, 0.001, $thetext); - for($i=1; $i<=100; ++$i) + for($i=1; $i<=100; ++$i) { $i1 = step($i1); $i2 = step($i2); $i3 = step($i3); - $m->nextFrame(); + $m->nextFrame(); } header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -776,9 +886,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->rotate</function></funcdef> - <paramdef>double <parameter>ddegrees</parameter></paramdef> + <paramdef>float <parameter>ddegrees</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->rotate</function> rotates the current object by <parameter>ddegrees</parameter> degrees from its current rotation. @@ -805,9 +916,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->skewxto</function></funcdef> - <paramdef>double <parameter>degrees</parameter></paramdef> + <paramdef>float <parameter>degrees</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->skewxto</function> sets the x-skew to <parameter>degrees</parameter>. For <parameter>degrees</parameter> @@ -838,9 +950,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->skewx</function></funcdef> - <paramdef>double <parameter>ddegrees</parameter></paramdef> + <paramdef>float <parameter>ddegrees</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->skewx</function> adds <parameter>ddegrees</parameter> to current x-skew. @@ -869,9 +982,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->skewyto</function></funcdef> - <paramdef>double <parameter>degrees</parameter></paramdef> + <paramdef>float <parameter>degrees</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->skewyto</function> sets the y-skew to <parameter>degrees</parameter>. For <parameter>degrees</parameter> @@ -902,9 +1016,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->skewy</function></funcdef> - <paramdef>double <parameter>ddegrees</parameter></paramdef> + <paramdef>float <parameter>ddegrees</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->skewy</function> adds <parameter>ddegrees</parameter> to current y-skew. @@ -933,7 +1048,7 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->setdepth</function></funcdef> - <paramdef>double <parameter>depth</parameter></paramdef> + <paramdef>float <parameter>depth</parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -962,9 +1077,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->remove</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->remove</function> removes this object from the movie's display list. @@ -994,6 +1110,7 @@ <paramdef>string <parameter>name</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->setname</function> sets the object's name to <parameter>name</parameter>, for targetting with action script. @@ -1018,9 +1135,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->setratio</function></funcdef> - <paramdef>double <parameter>ratio</parameter></paramdef> + <paramdef>float <parameter>ratio</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->setratio</function> sets the object's ratio to <parameter>ratio</parameter>. Obviously only useful for morphs. @@ -1036,63 +1154,65 @@ <example> <title><function>swfdisplayitem->setname</function>ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $p = new SWFMorph(); $g = new SWFGradient(); - $g->addEntry(0.0, 0, 0, 0); - $g->addEntry(0.16, 0xff, 0xff, 0xff); - $g->addEntry(0.32, 0, 0, 0); - $g->addEntry(0.48, 0xff, 0xff, 0xff); - $g->addEntry(0.64, 0, 0, 0); - $g->addEntry(0.80, 0xff, 0xff, 0xff); - $g->addEntry(1.00, 0, 0, 0); - - $s = $p->getShape1(); - $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); - $f->scaleTo(0.05); - $s->setLeftFill($f); - $s->movePenTo(-160, -120); - $s->drawLine(320, 0); - $s->drawLine(0, 240); - $s->drawLine(-320, 0); - $s->drawLine(0, -240); + $g->addEntry(0.0, 0, 0, 0); + $g->addEntry(0.16, 0xff, 0xff, 0xff); + $g->addEntry(0.32, 0, 0, 0); + $g->addEntry(0.48, 0xff, 0xff, 0xff); + $g->addEntry(0.64, 0, 0, 0); + $g->addEntry(0.80, 0xff, 0xff, 0xff); + $g->addEntry(1.00, 0, 0, 0); + + $s = $p->getShape1(); + $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); + $f->scaleTo(0.05); + $s->setLeftFill($f); + $s->movePenTo(-160, -120); + $s->drawLine(320, 0); + $s->drawLine(0, 240); + $s->drawLine(-320, 0); + $s->drawLine(0, -240); $g = new SWFGradient(); - $g->addEntry(0.0, 0, 0, 0); - $g->addEntry(0.16, 0xff, 0, 0); - $g->addEntry(0.32, 0, 0, 0); - $g->addEntry(0.48, 0, 0xff, 0); - $g->addEntry(0.64, 0, 0, 0); - $g->addEntry(0.80, 0, 0, 0xff); - $g->addEntry(1.00, 0, 0, 0); - - $s = $p->getShape2(); - $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); - $f->scaleTo(0.05); - $f->skewXTo(1.0); - $s->setLeftFill($f); - $s->movePenTo(-160, -120); - $s->drawLine(320, 0); - $s->drawLine(0, 240); - $s->drawLine(-320, 0); - $s->drawLine(0, -240); + $g->addEntry(0.0, 0, 0, 0); + $g->addEntry(0.16, 0xff, 0, 0); + $g->addEntry(0.32, 0, 0, 0); + $g->addEntry(0.48, 0, 0xff, 0); + $g->addEntry(0.64, 0, 0, 0); + $g->addEntry(0.80, 0, 0, 0xff); + $g->addEntry(1.00, 0, 0, 0); + + $s = $p->getShape2(); + $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); + $f->scaleTo(0.05); + $f->skewXTo(1.0); + $s->setLeftFill($f); + $s->movePenTo(-160, -120); + $s->drawLine(320, 0); + $s->drawLine(0, 240); + $s->drawLine(-320, 0); + $s->drawLine(0, -240); $m = new SWFMovie(); - $m->setDimension(320, 240); - $i = $m->add($p); - $i->moveTo(160, 120); + $m->setDimension(320, 240); + $i = $m->add($p); + $i->moveTo(160, 120); - for($n=0; $n<=1.001; $n+=0.01) + for($n=0; $n<=1.001; $n+=0.01) { - $i->setRatio($n); - $m->nextFrame(); + $i->setRatio($n); + $m->nextFrame(); } header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1111,20 +1231,21 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->addcolor</function></funcdef> - <paramdef>integer + <paramdef>int <parameter><optional>red</optional></parameter> </paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>green</optional></parameter> </paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>blue</optional></parameter> </paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>a</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->addcolor</function> adds the color to this item's color transform. The color is given in its RGB form. @@ -1148,20 +1269,21 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfdisplayitem->multcolor</function></funcdef> - <paramdef>integer + <paramdef>int <parameter><optional>red</optional></parameter> </paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>green</optional></parameter> </paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>blue</optional></parameter> </paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>a</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfdisplayitem->multcolor</function> multiplies the item's color transform by the given values. @@ -1178,32 +1300,34 @@ <example> <title><function>swfdisplayitem->multcolor</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $b = new SWFBitmap("backyard.jpg"); // note use your own picture :-) $s = new SWFShape(); - $s->setRightFill($s->addFill($b)); - $s->drawLine($b->getWidth(), 0); - $s->drawLine(0, $b->getHeight()); - $s->drawLine(-$b->getWidth(), 0); - $s->drawLine(0, -$b->getHeight()); + $s->setRightFill($s->addFill($b)); + $s->drawLine($b->getWidth(), 0); + $s->drawLine(0, $b->getHeight()); + $s->drawLine(-$b->getWidth(), 0); + $s->drawLine(0, -$b->getHeight()); $m = new SWFMovie(); - $m->setDimension($b->getWidth(), $b->getHeight()); + $m->setDimension($b->getWidth(), $b->getHeight()); - $i = $m->add($s); + $i = $m->add($s); - for($n=0; $n<=20; ++$n) + for($n=0; $n<=20; ++$n) { - $i->multColor(1.0-$n/10, 1.0, 1.0); - $i->addColor(0xff*$n/20, 0, 0); - $m->nextFrame(); + $i->multColor(1.0-$n/10, 1.0, 1.0); + $i->addColor(0xff*$n/20, 0, 0); + $m->nextFrame(); } header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1222,9 +1346,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swfshape</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfshape</function> creates a new shape object. </para> @@ -1241,24 +1366,26 @@ <example> <title><function>swfshape</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $s = new SWFShape(); - $s->setLine(40, 0x7f, 0, 0); - $s->setRightFill($s->addFill(0xff, 0, 0)); - $s->movePenTo(200, 200); - $s->drawLineTo(6200, 200); - $s->drawLineTo(6200, 4600); - $s->drawCurveTo(200, 4600, 200, 200); + $s->setLine(40, 0x7f, 0, 0); + $s->setRightFill($s->addFill(0xff, 0, 0)); + $s->movePenTo(200, 200); + $s->drawLineTo(6200, 200); + $s->drawLineTo(6200, 4600); + $s->drawCurveTo(200, 4600, 200, 200); $m = new SWFMovie(); - $m->setDimension(6400, 4800); - $m->setRate(12.0); - $m->add($s); - $m->nextFrame(); + $m->setDimension(6400, 4800); + $m->setRate(12.0); + $m->add($s); + $m->nextFrame(); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1276,12 +1403,13 @@ <funcprototype> <funcdef>void <function>swfshape->setline</function></funcdef> <paramdef>int <parameter>width</parameter></paramdef> - <paramdef>integer <parameter><optional>red</optional></parameter></paramdef> - <paramdef>integer <parameter><optional>green</optional></parameter></paramdef> - <paramdef>integer <parameter><optional>blue</optional></parameter></paramdef> - <paramdef>integer <parameter><optional>a</optional></parameter></paramdef> + <paramdef>int <parameter><optional>red</optional></parameter></paramdef> + <paramdef>int <parameter><optional>green</optional></parameter></paramdef> + <paramdef>int <parameter><optional>blue</optional></parameter></paramdef> + <paramdef>int <parameter><optional>a</optional></parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfshape->setline</function> sets the shape's line style. <parameter>width</parameter> is the line's width. If <parameter>width</parameter> @@ -1303,56 +1431,58 @@ <example> <title><function>swfshape->setline</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $s = new SWFShape(); - $f1 = $s->addFill(0xff, 0, 0); - $f2 = $s->addFill(0xff, 0x7f, 0); - $f3 = $s->addFill(0xff, 0xff, 0); - $f4 = $s->addFill(0, 0xff, 0); - $f5 = $s->addFill(0, 0, 0xff); + $f1 = $s->addFill(0xff, 0, 0); + $f2 = $s->addFill(0xff, 0x7f, 0); + $f3 = $s->addFill(0xff, 0xff, 0); + $f4 = $s->addFill(0, 0xff, 0); + $f5 = $s->addFill(0, 0, 0xff); // bug: have to declare all line styles before you use them - $s->setLine(40, 0x7f, 0, 0); - $s->setLine(40, 0x7f, 0x3f, 0); - $s->setLine(40, 0x7f, 0x7f, 0); - $s->setLine(40, 0, 0x7f, 0); - $s->setLine(40, 0, 0, 0x7f); + $s->setLine(40, 0x7f, 0, 0); + $s->setLine(40, 0x7f, 0x3f, 0); + $s->setLine(40, 0x7f, 0x7f, 0); + $s->setLine(40, 0, 0x7f, 0); + $s->setLine(40, 0, 0, 0x7f); $f = new SWFFont('Techno.fdb'); - $s->setRightFill($f1); - $s->setLine(40, 0x7f, 0, 0); - $s->drawGlyph($f, '!'); - $s->movePen($f->getWidth('!'), 0); - - $s->setRightFill($f2); - $s->setLine(40, 0x7f, 0x3f, 0); - $s->drawGlyph($f, '#'); - $s->movePen($f->getWidth('#'), 0); - - $s->setRightFill($f3); - $s->setLine(40, 0x7f, 0x7f, 0); - $s->drawGlyph($f, '%'); - $s->movePen($f->getWidth('%'), 0); - - $s->setRightFill($f4); - $s->setLine(40, 0, 0x7f, 0); - $s->drawGlyph($f, '*'); - $s->movePen($f->getWidth('*'), 0); - - $s->setRightFill($f5); - $s->setLine(40, 0, 0, 0x7f); - $s->drawGlyph($f, '@'); + $s->setRightFill($f1); + $s->setLine(40, 0x7f, 0, 0); + $s->drawGlyph($f, '!'); + $s->movePen($f->getWidth('!'), 0); + + $s->setRightFill($f2); + $s->setLine(40, 0x7f, 0x3f, 0); + $s->drawGlyph($f, '#'); + $s->movePen($f->getWidth('#'), 0); + + $s->setRightFill($f3); + $s->setLine(40, 0x7f, 0x7f, 0); + $s->drawGlyph($f, '%'); + $s->movePen($f->getWidth('%'), 0); + + $s->setRightFill($f4); + $s->setLine(40, 0, 0x7f, 0); + $s->drawGlyph($f, '*'); + $s->movePen($f->getWidth('*'), 0); + + $s->setRightFill($f5); + $s->setLine(40, 0, 0, 0x7f); + $s->drawGlyph($f, '@'); $m = new SWFMovie(); - $m->setDimension(3000,2000); - $m->setRate(12.0); - $i = $m->add($s); - $i->moveTo(1500-$f->getWidth("!#%*@")/2, 1000+$f->getAscent()/2); + $m->setDimension(3000,2000); + $m->setRate(12.0); + $i = $m->add($s); + $i->moveTo(1500-$f->getWidth("!#%*@")/2, 1000+$f->getAscent()/2); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1369,32 +1499,35 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->addfill</function></funcdef> - <paramdef>integer <parameter>red</parameter></paramdef> - <paramdef>integer <parameter>green</parameter></paramdef> - <paramdef>integer <parameter>blue</parameter></paramdef> - <paramdef>integer + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter><optional>a</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->addfill</function></funcdef> <paramdef>SWFbitmap <parameter>bitmap</parameter></paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>flags</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->addfill</function></funcdef> <paramdef>SWFGradient <parameter>gradient</parameter></paramdef> - <paramdef>integer + <paramdef>int <parameter><optional>flags</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfshape->addfill</function> adds a solid fill to the shape's list @@ -1437,54 +1570,56 @@ <example> <title><function>swfshape->addfill</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $p = new SWFMorph(); $b = new SWFBitmap("alphafill.jpg"); // use your own bitmap - $width = $b->getWidth(); - $height = $b->getHeight(); + $width = $b->getWidth(); + $height = $b->getHeight(); - $s = $p->getShape1(); - $f = $s->addFill($b, SWFFILL_TILED_BITMAP); - $f->moveTo(-$width/2, -$height/4); - $f->scaleTo(1.0, 0.5); - $s->setLeftFill($f); - $s->movePenTo(-$width/2, -$height/4); - $s->drawLine($width, 0); - $s->drawLine(0, $height/2); - $s->drawLine(-$width, 0); - $s->drawLine(0, -$height/2); + $s = $p->getShape1(); + $f = $s->addFill($b, SWFFILL_TILED_BITMAP); + $f->moveTo(-$width/2, -$height/4); + $f->scaleTo(1.0, 0.5); + $s->setLeftFill($f); + $s->movePenTo(-$width/2, -$height/4); + $s->drawLine($width, 0); + $s->drawLine(0, $height/2); + $s->drawLine(-$width, 0); + $s->drawLine(0, -$height/2); - $s = $p->getShape2(); - $f = $s->addFill($b, SWFFILL_TILED_BITMAP); + $s = $p->getShape2(); + $f = $s->addFill($b, SWFFILL_TILED_BITMAP); // these two have no effect! - $f->moveTo(-$width/4, -$height/2); - $f->scaleTo(0.5, 1.0); + $f->moveTo(-$width/4, -$height/2); + $f->scaleTo(0.5, 1.0); - $s->setLeftFill($f); - $s->movePenTo(-$width/4, -$height/2); - $s->drawLine($width/2, 0); - $s->drawLine(0, $height); - $s->drawLine(-$width/2, 0); - $s->drawLine(0, -$height); + $s->setLeftFill($f); + $s->movePenTo(-$width/4, -$height/2); + $s->drawLine($width/2, 0); + $s->drawLine(0, $height); + $s->drawLine(-$width/2, 0); + $s->drawLine(0, -$height); $m = new SWFMovie(); - $m->setDimension($width, $height); - $i = $m->add($p); - $i->moveTo($width/2, $height/2); + $m->setDimension($width, $height); + $i = $m->add($p); + $i->moveTo($width/2, $height/2); - for($n=0; $n<1.001; $n+=0.03) + for($n=0; $n<1.001; $n+=0.03) { - $i->setRatio($n); - $m->nextFrame(); + $i->setRatio($n); + $m->nextFrame(); } header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1504,17 +1639,19 @@ <paramdef>swfgradient <parameter>fill</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->setleftfill</function></funcdef> - <paramdef>integer <parameter>red</parameter></paramdef> - <paramdef>integer <parameter>green</parameter></paramdef> - <paramdef>integer <parameter>blue</parameter></paramdef> - <paramdef>integer + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter><optional>a</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> What this nonsense is about is, every edge segment borders at most two fills. When rasterizing the object, it's pretty handy to know what those fills are @@ -1552,17 +1689,19 @@ <paramdef>swfgradient <parameter>fill</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->setrightfill</function></funcdef> - <paramdef>integer <parameter>red</parameter></paramdef> - <paramdef>integer <parameter>green</parameter></paramdef> - <paramdef>integer <parameter>blue</parameter></paramdef> - <paramdef>integer + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter><optional>a</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <simpara> See also <function>swfshape->setleftfill</function>. </simpara> @@ -1582,10 +1721,11 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->movepento</function></funcdef> - <paramdef>integer <parameter>x</parameter></paramdef> - <paramdef>integer <parameter>y</parameter></paramdef> + <paramdef>int <parameter>x</parameter></paramdef> + <paramdef>int <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <simpara> <function>swfshape->setrightfill</function> move the shape's pen to (<parameter>x</parameter>,<parameter>y</parameter>) in the shape's @@ -1611,10 +1751,11 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->movepen</function></funcdef> - <paramdef>integer <parameter>dx</parameter></paramdef> - <paramdef>integer <parameter>dy</parameter></paramdef> + <paramdef>int <parameter>dx</parameter></paramdef> + <paramdef>int <parameter>dy</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <simpara> <function>swfshape->setrightfill</function> move the shape's pen from coordinates (current x,current y) to (current x + <parameter>dx</parameter>, @@ -1640,10 +1781,11 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->drawlineto</function></funcdef> - <paramdef>integer <parameter>x</parameter></paramdef> - <paramdef>integer <parameter>y</parameter></paramdef> + <paramdef>int <parameter>x</parameter></paramdef> + <paramdef>int <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <simpara> <function>swfshape->setrightfill</function> draws a line (using the current line style, set by <function>swfshape->setline</function>) from the current @@ -1670,10 +1812,11 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->drawline</function></funcdef> - <paramdef>integer <parameter>dx</parameter></paramdef> - <paramdef>integer <parameter>dy</parameter></paramdef> + <paramdef>int <parameter>dx</parameter></paramdef> + <paramdef>int <parameter>dy</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <simpara> <function>swfshape->setrightfill</function> draws a line (using the current line style set by <function>swfshape->setline</function>) from the current pen position to @@ -1699,12 +1842,13 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->drawcurveto</function></funcdef> - <paramdef>integer <parameter>controlx</parameter></paramdef> - <paramdef>integer <parameter>controly</parameter></paramdef> - <paramdef>integer <parameter>anchorx</parameter></paramdef> - <paramdef>integer <parameter>anchory</parameter></paramdef> + <paramdef>int <parameter>controlx</parameter></paramdef> + <paramdef>int <parameter>controly</parameter></paramdef> + <paramdef>int <parameter>anchorx</parameter></paramdef> + <paramdef>int <parameter>anchory</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <simpara> <function>swfshape->drawcurveto</function> draws a quadratic curve (using the current line style, set by <function>swfshape->setline</function>) @@ -1734,12 +1878,13 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfshape->drawcurve</function></funcdef> - <paramdef>integer <parameter>controldx</parameter></paramdef> - <paramdef>integer <parameter>controldy</parameter></paramdef> - <paramdef>integer <parameter>anchordx</parameter></paramdef> - <paramdef>integer <parameter>anchordy</parameter></paramdef> + <paramdef>int <parameter>controldx</parameter></paramdef> + <paramdef>int <parameter>controldy</parameter></paramdef> + <paramdef>int <parameter>anchordx</parameter></paramdef> + <paramdef>int <parameter>anchordy</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <simpara> <function>swfshape->drawcurve</function> draws a quadratic curve (using the current line style,set by <function>swfshape->setline</function>) @@ -1772,9 +1917,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swfgradient</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfgradient</function> creates a new SWFGradient object. </para> @@ -1791,50 +1937,52 @@ <example> <title><function>swfgradient</function> ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $m = new SWFMovie(); - $m->setDimension(320, 240); + $m->setDimension(320, 240); $s = new SWFShape(); // first gradient- black to white $g = new SWFGradient(); - $g->addEntry(0.0, 0, 0, 0); - $g->addEntry(1.0, 0xff, 0xff, 0xff); + $g->addEntry(0.0, 0, 0, 0); + $g->addEntry(1.0, 0xff, 0xff, 0xff); - $f = $s->addFill($g, SWFFILL_LINEAR_GRADIENT); - $f->scaleTo(0.01); - $f->moveTo(160, 120); - $s->setRightFill($f); - $s->drawLine(320, 0); - $s->drawLine(0, 240); - $s->drawLine(-320, 0); - $s->drawLine(0, -240); + $f = $s->addFill($g, SWFFILL_LINEAR_GRADIENT); + $f->scaleTo(0.01); + $f->moveTo(160, 120); + $s->setRightFill($f); + $s->drawLine(320, 0); + $s->drawLine(0, 240); + $s->drawLine(-320, 0); + $s->drawLine(0, -240); - $m->add($s); + $m->add($s); $s = new SWFShape(); // second gradient- radial gradient from red to transparent $g = new SWFGradient(); - $g->addEntry(0.0, 0xff, 0, 0, 0xff); - $g->addEntry(1.0, 0xff, 0, 0, 0); + $g->addEntry(0.0, 0xff, 0, 0, 0xff); + $g->addEntry(1.0, 0xff, 0, 0, 0); - $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); - $f->scaleTo(0.005); - $f->moveTo(160, 120); - $s->setRightFill($f); - $s->drawLine(320, 0); - $s->drawLine(0, 240); - $s->drawLine(-320, 0); - $s->drawLine(0, -240); + $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); + $f->scaleTo(0.005); + $f->moveTo(160, 120); + $s->setRightFill($f); + $s->drawLine(320, 0); + $s->drawLine(0, 240); + $s->drawLine(-320, 0); + $s->drawLine(0, -240); - $m->add($s); + $m->add($s); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1851,13 +1999,14 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfgradient->addentry</function></funcdef> - <paramdef>double <parameter>ratio</parameter></paramdef> - <paramdef>integer <parameter>red</parameter></paramdef> - <paramdef>integer <parameter>green</parameter></paramdef> - <paramdef>integer <parameter>blue</parameter></paramdef> - <paramdef>integer <parameter><optional>a</optional></parameter></paramdef> + <paramdef>float <parameter>ratio</parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter><optional>a</optional></parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfgradient->addentry</function> adds an entry to the gradient list. <parameter>ratio</parameter> is a number between 0 and 1 indicating where in @@ -1883,9 +2032,10 @@ <funcprototype> <funcdef>new <function>swfbitmap</function></funcdef> <paramdef>string <parameter>filename</parameter></paramdef> - <paramdef>integer <parameter><optional>alphafilename</optional></parameter></paramdef> + <paramdef>int <parameter><optional>alphafilename</optional></parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbitmap</function> creates a new SWFBitmap object from the Jpeg or DBL file named <parameter>filename</parameter>. @@ -1910,23 +2060,25 @@ <example> <title>Import PNG files</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $s = new SWFShape(); - $f = $s->addFill(new SWFBitmap("png.dbl")); - $s->setRightFill($f); + $f = $s->addFill(new SWFBitmap("png.dbl")); + $s->setRightFill($f); - $s->drawLine(32, 0); - $s->drawLine(0, 32); - $s->drawLine(-32, 0); - $s->drawLine(0, -32); + $s->drawLine(32, 0); + $s->drawLine(0, 32); + $s->drawLine(-32, 0); + $s->drawLine(0, -32); $m = new SWFMovie(); - $m->setDimension(32, 32); - $m->add($s); + $m->setDimension(32, 32); + $m->add($s); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1935,53 +2087,55 @@ <example> <title><function>swfbitmap</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $s = new SWFShape(); // .msk file generated with "gif2mask" utility - $f = $s->addFill(new SWFBitmap("alphafill.jpg", "alphafill.msk")); - $s->setRightFill($f); + $f = $s->addFill(new SWFBitmap("alphafill.jpg", "alphafill.msk")); + $s->setRightFill($f); - $s->drawLine(640, 0); - $s->drawLine(0, 480); - $s->drawLine(-640, 0); - $s->drawLine(0, -480); + $s->drawLine(640, 0); + $s->drawLine(0, 480); + $s->drawLine(-640, 0); + $s->drawLine(0, -480); $c = new SWFShape(); - $c->setRightFill($c->addFill(0x99, 0x99, 0x99)); - $c->drawLine(40, 0); - $c->drawLine(0, 40); - $c->drawLine(-40, 0); - $c->drawLine(0, -40); + $c->setRightFill($c->addFill(0x99, 0x99, 0x99)); + $c->drawLine(40, 0); + $c->drawLine(0, 40); + $c->drawLine(-40, 0); + $c->drawLine(0, -40); $m = new SWFMovie(); - $m->setDimension(640, 480); - $m->setBackground(0xcc, 0xcc, 0xcc); + $m->setDimension(640, 480); + $m->setBackground(0xcc, 0xcc, 0xcc); // draw checkerboard background - for($y=0; $y<480; $y+=40) + for($y=0; $y<480; $y+=40) { - for($x=0; $x<640; $x+=80) + for($x=0; $x<640; $x+=80) { - $i = $m->add($c); - $i->moveTo($x, $y); + $i = $m->add($c); + $i->moveTo($x, $y); } $y+=40; - for($x=40; $x<640; $x+=80) + for($x=40; $x<640; $x+=80) { - $i = $m->add($c); - $i->moveTo($x, $y); + $i = $m->add($c); + $i->moveTo($x, $y); } } - $m->add($s); + $m->add($s); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -1998,9 +2152,10 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>swfbitmap->getwidth</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbitmap->getwidth</function> returns the bitmap's width in pixels. </para> @@ -2020,9 +2175,10 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>swfbitmap->getheight</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbitmap->getheight</function> returns the bitmap's height in pixels. </para> @@ -2064,10 +2220,11 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swffill->moveto</function></funcdef> - <paramdef>integer <parameter>x</parameter></paramdef> - <paramdef>integer <parameter>y</parameter></paramdef> + <paramdef>int <parameter>x</parameter></paramdef> + <paramdef>int <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swffill->moveto</function> moves fill's origin to (<parameter>x</parameter>,<parameter>y</parameter>) in global coordinates. @@ -2085,10 +2242,11 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swffill->scaleto</function></funcdef> - <paramdef>integer <parameter>x</parameter></paramdef> - <paramdef>integer <parameter>y</parameter></paramdef> + <paramdef>int <parameter>x</parameter></paramdef> + <paramdef>int <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swffill->scaleto</function> sets fill's scale to <parameter>x</parameter> in the x-direction, @@ -2107,9 +2265,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swffill->rotateto</function></funcdef> - <paramdef>double <parameter>degrees</parameter></paramdef> + <paramdef>float <parameter>degrees</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swffill->rotateto</function> sets fill's rotation to <parameter>degrees</parameter> degrees. @@ -2127,9 +2286,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swffill->skewxto</function></funcdef> - <paramdef>double <parameter>x</parameter></paramdef> + <paramdef>float <parameter>x</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swffill->skewxto</function> sets fill x-skew to <parameter>x</parameter>. For <parameter>x</parameter> is 1.0, it is a is a 45-degree @@ -2148,9 +2308,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swffill->skewyto</function></funcdef> - <paramdef>double <parameter>y</parameter></paramdef> + <paramdef>float <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swffill->skewyto</function> sets fill y-skew to <parameter>y</parameter>. For <parameter>y</parameter> is 1.0, it is a is a 45-degree @@ -2171,9 +2332,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swfmorph</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmorph</function> creates a new SWFMorph object. </para> @@ -2199,47 +2361,49 @@ <example> <title><function>swfmorph</function>ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $p = new SWFMorph(); - $s = $p->getShape1(); - $s->setLine(0,0,0,0); + $s = $p->getShape1(); + $s->setLine(0,0,0,0); /* Note that this is backwards from normal shapes (left instead of right). I have no idea why, but this seems to work.. */ - $s->setLeftFill($s->addFill(0xff, 0, 0)); - $s->movePenTo(-1000,-1000); - $s->drawLine(2000,0); - $s->drawLine(0,2000); - $s->drawLine(-2000,0); - $s->drawLine(0,-2000); - - $s = $p->getShape2(); - $s->setLine(60,0,0,0); - $s->setLeftFill($s->addFill(0, 0, 0xff)); - $s->movePenTo(0,-1000); - $s->drawLine(1000,1000); - $s->drawLine(-1000,1000); - $s->drawLine(-1000,-1000); - $s->drawLine(1000,-1000); + $s->setLeftFill($s->addFill(0xff, 0, 0)); + $s->movePenTo(-1000,-1000); + $s->drawLine(2000,0); + $s->drawLine(0,2000); + $s->drawLine(-2000,0); + $s->drawLine(0,-2000); + + $s = $p->getShape2(); + $s->setLine(60,0,0,0); + $s->setLeftFill($s->addFill(0, 0, 0xff)); + $s->movePenTo(0,-1000); + $s->drawLine(1000,1000); + $s->drawLine(-1000,1000); + $s->drawLine(-1000,-1000); + $s->drawLine(1000,-1000); $m = new SWFMovie(); - $m->setDimension(3000,2000); - $m->setBackground(0xff, 0xff, 0xff); + $m->setDimension(3000,2000); + $m->setBackground(0xff, 0xff, 0xff); - $i = $m->add($p); - $i->moveTo(1500,1000); + $i = $m->add($p); + $i->moveTo(1500,1000); - for($r=0.0; $r<=1.0; $r+=0.1) + for($r=0.0; $r<=1.0; $r+=0.1) { - $i->setRatio($r); - $m->nextFrame(); + $i->setRatio($r); + $m->nextFrame(); } header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -2256,9 +2420,10 @@ <funcsynopsis> <funcprototype> <funcdef>mixed <function>swfmorph->getshape1</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmorph->getshape1</function> gets a handle to the morph's starting shape. <function>swfmorph->getshape1</function> returns an @@ -2277,9 +2442,10 @@ <funcsynopsis> <funcprototype> <funcdef>mixed <function>swfmorph->getshape2</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfmorph->getshape2</function> gets a handle to the morph's ending shape. <function>swfmorph->getshape2</function> returns an @@ -2300,9 +2466,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swftext</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext</function> creates a new SWFText object, fresh for manipulating. @@ -2319,23 +2486,25 @@ <example> <title><function>swftext</function>ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $f = new SWFFont("Techno.fdb"); $t = new SWFText(); - $t->setFont($f); - $t->moveTo(200, 2400); - $t->setColor(0xff, 0xff, 0); - $t->setHeight(1200); - $t->addString("PHP generates Flash with Ming!!"); + $t->setFont($f); + $t->moveTo(200, 2400); + $t->setColor(0xff, 0xff, 0); + $t->setHeight(1200); + $t->addString("PHP generates Flash with Ming!!"); $m = new SWFMovie(); - $m->setDimension(5400, 3600); + $m->setDimension(5400, 3600); - $m->add($t); + $m->add($t); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -2355,6 +2524,7 @@ <paramdef>string <parameter>font</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext->setfont</function> ã¯ãã«ã¬ã³ãã®ãã©ã³ãã <parameter>font</parameter> ã«è¨å®ãã¾ãã @@ -2372,9 +2542,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swftext->setheight</function></funcdef> - <paramdef>integer <parameter>height</parameter></paramdef> + <paramdef>int <parameter>height</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext->setheight</function> sets the current font height to <parameter>height</parameter>. Default is 240. @@ -2392,9 +2563,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swftext->setspacing</function></funcdef> - <paramdef>double <parameter>spacing</parameter></paramdef> + <paramdef>float <parameter>spacing</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext->setspacing</function> sets the current font spacing to <parameter>spacing</parameter><parameter>spacing</parameter>. Default is 1.0. @@ -2418,12 +2590,13 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swftext->setcolor</function></funcdef> - <paramdef>integer <parameter>red</parameter></paramdef> - <paramdef>integer <parameter>green</parameter></paramdef> - <paramdef>integer <parameter>blue</parameter></paramdef> - <paramdef>integer <parameter><optional>a</optional></parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter><optional>a</optional></parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext->setspacing</function> changes the current text color. Default is black. I think. Color is represented using the RGB system. @@ -2441,10 +2614,11 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swftext->moveto</function></funcdef> - <paramdef>integer <parameter>x</parameter></paramdef> - <paramdef>integer <parameter>y</parameter></paramdef> + <paramdef>int <parameter>x</parameter></paramdef> + <paramdef>int <parameter>y</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext->moveto</function> moves the pen (or cursor, if that makes more sense) to (<parameter>x</parameter>,<parameter>y</parameter>) @@ -2467,6 +2641,7 @@ <paramdef>string <parameter>string</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext->addstring</function> draws the string <parameter>string</parameter> at the current pen (cursor) location. Pen is at the baseline of the text; @@ -2488,6 +2663,7 @@ <paramdef>string <parameter>string</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftext->addstring</function> returns the rendered width of the <parameter>string</parameter> string at the text object's current font, @@ -2511,6 +2687,7 @@ <paramdef>string <parameter>filename</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <parameter>filename</parameter> ããFDBãã¡ã¤ã«ã®åå(ããªãã¡ã ".fdb" ã§çµã)ã®å ´åããã®ãã¡ã¤ã«ä¸ã®ãã©ã³ãã®å®ç¾©ããã¼ããã¾ @@ -2530,9 +2707,11 @@ ä»®å®ãã¾ãããã©ã³ã _serif, _sans, _typewriter ã¯ã常ã«ä½¿ç¨å¯è½ ã§ããä¾ãã°ã <programlisting role="php"> -<?php -$f = new SWFFont("_sans"); -?> +<![CDATA[ +<?php +$f = newSWFFont("_sans"); +?> +]]> </programlisting> ã«ãããæ¨æºç㪠sans-serif ãã©ã³ããæå®ããã¾ããããã¯ãHTML ã§ <literal><font name="sans-serif"></literal> ã¨æå®ããå ´ @@ -2563,6 +2742,7 @@ <paramdef>string <parameter>string</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swffont->getwidth</function> returns the string <parameter>string</parameter>'s width, using font's default scaling. @@ -2589,6 +2769,7 @@ </paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield</function> creates a new text field object. Text Fields are less flexible than <function>swftext</function> objects- @@ -2633,9 +2814,11 @@ Flags are combined with the bitwise <link linkend="language.operators.bitwise">OR</link> operation. For example, <programlisting role="php"> -<?php +<![CDATA[ +<?php $t = newSWFTextField(SWFTEXTFIELD_PASSWORD | SWFTEXTFIELD_NOEDIT); -?> +?> +]]> </programlisting> creates a totally useless non-editable password field. </para> @@ -2664,6 +2847,7 @@ <paramdef>string <parameter>font</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setfont</function> sets the text field font to the [browser-defined?] <parameter>font</parameter> font. @@ -2685,6 +2869,7 @@ <paramdef>int <parameter>height</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setbounds</function> sets the text field width to <parameter>width</parameter> and height to <parameter>height</parameter>. @@ -2707,6 +2892,7 @@ <paramdef>int <parameter>alignement</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->align</function> sets the text field alignment to <parameter>alignement</parameter>. Valid values for @@ -2732,6 +2918,7 @@ <paramdef>int <parameter>height</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setheight</function> sets the font height of this text field font to the given height <parameter>height</parameter>. Default is 240. @@ -2752,6 +2939,7 @@ <paramdef>int <parameter>width</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setleftmargin</function> sets the left margin width of the text field to <parameter>width</parameter>. Default is 0. @@ -2772,6 +2960,7 @@ <paramdef>int <parameter>width</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setrightmargin</function> sets the right margin width of the text field to <parameter>width</parameter>. Default is 0. @@ -2793,6 +2982,7 @@ <paramdef>int <parameter>right</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setmargins</function> set both margins at once, for the man on the go. @@ -2813,6 +3003,7 @@ <paramdef>int <parameter>width</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setindentation</function> sets the indentation of the first line in the text field, to <parameter>width</parameter>. @@ -2833,6 +3024,7 @@ <paramdef>int <parameter>height</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setlinespacing</function> sets the line spacing of the text field to the height of <parameter>height</parameter>. Default is 40. @@ -2850,12 +3042,13 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swftextfield->setcolor</function></funcdef> - <paramdef>integer <parameter>red</parameter></paramdef> - <paramdef>integer <parameter>green</parameter></paramdef> - <paramdef>integer <parameter>blue</parameter></paramdef> - <paramdef>integer <parameter><optional>a</optional></parameter></paramdef> + <paramdef>int <parameter>red</parameter></paramdef> + <paramdef>int <parameter>green</parameter></paramdef> + <paramdef>int <parameter>blue</parameter></paramdef> + <paramdef>int <parameter><optional>a</optional></parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setcolor</function> sets the color of the text field. Default is fully opaque black. Color is represented using RGB system. @@ -2876,6 +3069,7 @@ <paramdef>string <parameter>name</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setname</function> sets the variable name of this text field to <parameter>name</parameter>, for form posting and action @@ -2897,6 +3091,7 @@ <paramdef>string <parameter>string</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swftextfield->setname</function> ã¯ãæåå <parameter>string</parameter>ãããã¹ããã£ã¼ã«ãã«çµåãã¾ãã @@ -2916,9 +3111,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swfsprite</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfsprite</function> are also known as a "movie clip", this allows one to create objects which are animated in their own @@ -2935,40 +3131,42 @@ <example> <title><function>swfsprite</function> ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $s = new SWFShape(); - $s->setRightFill($s->addFill(0xff, 0, 0)); - $s->movePenTo(-500,-500); - $s->drawLineTo(500,-500); - $s->drawLineTo(500,500); - $s->drawLineTo(-500,500); - $s->drawLineTo(-500,-500); + $s->setRightFill($s->addFill(0xff, 0, 0)); + $s->movePenTo(-500,-500); + $s->drawLineTo(500,-500); + $s->drawLineTo(500,500); + $s->drawLineTo(-500,500); + $s->drawLineTo(-500,-500); $p = new SWFSprite(); - $i = $p->add($s); - $p->nextFrame(); - $i->rotate(15); - $p->nextFrame(); - $i->rotate(15); - $p->nextFrame(); - $i->rotate(15); - $p->nextFrame(); - $i->rotate(15); - $p->nextFrame(); - $i->rotate(15); - $p->nextFrame(); + $i = $p->add($s); + $p->nextFrame(); + $i->rotate(15); + $p->nextFrame(); + $i->rotate(15); + $p->nextFrame(); + $i->rotate(15); + $p->nextFrame(); + $i->rotate(15); + $p->nextFrame(); + $i->rotate(15); + $p->nextFrame(); $m = new SWFMovie(); - $i = $m->add($p); - $i->moveTo(1500,1000); - $i->setName("blah"); + $i = $m->add($p); + $i->moveTo(1500,1000); + $i->setName("blah"); - $m->setBackground(0xff, 0xff, 0xff); - $m->setDimension(3000,2000); + $m->setBackground(0xff, 0xff, 0xff); + $m->setDimension(3000,2000); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -2985,9 +3183,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfsprite->add</function></funcdef> - <paramdef>ressource <parameter>object</parameter></paramdef> + <paramdef>resource <parameter>object</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfsprite->add</function> adds a <function>swfshape</function>, a <function>swfbutton</function>, a <function>swftext</function>, @@ -3034,9 +3233,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfsprite->setframes</function></funcdef> - <paramdef>integer <parameter>numberofframes</parameter></paramdef> + <paramdef>int <parameter>numberofframes</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfsprite->setframes</function> sets the total number of frames in the animation to <parameter>numberofframes</parameter>. @@ -3054,9 +3254,10 @@ <funcsynopsis> <funcprototype> <funcdef>void <function>swfsprite->nextframe</function></funcdef> - <paramdef>void </paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfsprite->setframes</function> moves to the next frame of the animation. @@ -3076,9 +3277,10 @@ <funcsynopsis> <funcprototype> <funcdef>new <function>swfbutton</function></funcdef> - <paramdef>void</paramdef> + <void/> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbutton</function> creates a new Button. Roll over it, click it, see it call action code. Swank. @@ -3096,7 +3298,8 @@ <example> <title><function>swfbutton</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $f = new SWFFont("_serif"); @@ -3107,22 +3310,22 @@ global $f; $t = new SWFTextField(); - $t->setFont($f); - $t->addString($string); - $t->setHeight(200); - $t->setBounds(3200,200); + $t->setFont($f); + $t->addString($string); + $t->setHeight(200); + $t->setBounds(3200,200); return $t; } function addLabel($string) { global $p; - $i = $p->add(label($string)); - $p->nextFrame(); - $p->remove($i); + $i = $p->add(label($string)); + $p->nextFrame(); + $p->remove($i); } - $p->add(new SWFAction("stop();")); + $p->add(new SWFAction("stop();")); addLabel("NO ACTION"); addLabel("SWFBUTTON_MOUSEUP"); addLabel("SWFBUTTON_MOUSEDOWN"); @@ -3135,54 +3338,55 @@ function rect($r, $g, $b) { $s = new SWFShape(); - $s->setRightFill($s->addFill($r, $g, $b)); - $s->drawLine(600,0); - $s->drawLine(0,600); - $s->drawLine(-600,0); - $s->drawLine(0,-600); + $s->setRightFill($s->addFill($r, $g, $b)); + $s->drawLine(600,0); + $s->drawLine(0,600); + $s->drawLine(-600,0); + $s->drawLine(0,-600); return $s; } $b = new SWFButton(); - $b->addShape(rect(0xff, 0, 0), SWFBUTTON_UP | SWFBUTTON_HIT); - $b->addShape(rect(0, 0xff, 0), SWFBUTTON_OVER); - $b->addShape(rect(0, 0, 0xff), SWFBUTTON_DOWN); + $b->addShape(rect(0xff, 0, 0), SWFBUTTON_UP | SWFBUTTON_HIT); + $b->addShape(rect(0, 0xff, 0), SWFBUTTON_OVER); + $b->addShape(rect(0, 0, 0xff), SWFBUTTON_DOWN); - $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(1);"), - SWFBUTTON_MOUSEUP); + $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(1);"), + SWFBUTTON_MOUSEUP); - $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(2);"), - SWFBUTTON_MOUSEDOWN); + $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(2);"), + SWFBUTTON_MOUSEDOWN); - $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(3);"), - SWFBUTTON_MOUSEOVER); + $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(3);"), + SWFBUTTON_MOUSEOVER); - $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(4);"), - SWFBUTTON_MOUSEOUT); + $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(4);"), + SWFBUTTON_MOUSEOUT); - $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(5);"), - SWFBUTTON_MOUSEUPOUTSIDE); + $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(5);"), + SWFBUTTON_MOUSEUPOUTSIDE); - $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(6);"), - SWFBUTTON_DRAGOVER); + $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(6);"), + SWFBUTTON_DRAGOVER); - $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(7);"), - SWFBUTTON_DRAGOUT); + $b->addAction(new SWFAction("setTarget('/label'); gotoFrame(7);"), + SWFBUTTON_DRAGOUT); $m = new SWFMovie(); - $m->setDimension(4000,3000); + $m->setDimension(4000,3000); - $i = $m->add($p); - $i->setName("label"); - $i->moveTo(400,1900); + $i = $m->add($p); + $i->setName("label"); + $i->moveTo(400,1900); - $i = $m->add($b); - $i->moveTo(400,900); + $i = $m->add($b); + $i->moveTo(400,900); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -3192,36 +3396,38 @@ <example> <title><function>swfbutton->addaction</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $s = new SWFShape(); - $s->setRightFill($s->addFill(0xff, 0, 0)); - $s->drawLine(1000,0); - $s->drawLine(0,1000); - $s->drawLine(-1000,0); - $s->drawLine(0,-1000); + $s->setRightFill($s->addFill(0xff, 0, 0)); + $s->drawLine(1000,0); + $s->drawLine(0,1000); + $s->drawLine(-1000,0); + $s->drawLine(0,-1000); $b = new SWFButton(); - $b->addShape($s, SWFBUTTON_HIT | SWFBUTTON_UP | SWFBUTTON_DOWN | SWFBUTTON_OVER); + $b->addShape($s, SWFBUTTON_HIT | SWFBUTTON_UP | SWFBUTTON_DOWN | SWFBUTTON_OVER); - $b->addAction(new SWFAction("startDrag('/test', 0);"), // '0' means don't lock to mouse - SWFBUTTON_MOUSEDOWN); + $b->addAction(new SWFAction("startDrag('/test', 0);"), // '0' means don't lock to mouse + SWFBUTTON_MOUSEDOWN); - $b->addAction(new SWFAction("stopDrag();"), - SWFBUTTON_MOUSEUP | SWFBUTTON_MOUSEUPOUTSIDE); + $b->addAction(new SWFAction("stopDrag();"), + SWFBUTTON_MOUSEUP | SWFBUTTON_MOUSEUPOUTSIDE); $p = new SWFSprite(); - $p->add($b); - $p->nextFrame(); + $p->add($b); + $p->nextFrame(); $m = new SWFMovie(); - $i = $m->add($p); - $i->setName('test'); - $i->moveTo(1000,1000); + $i = $m->add($p); + $i->setName('test'); + $i->moveTo(1000,1000); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -3239,9 +3445,10 @@ <funcprototype> <funcdef>void <function>swfbutton->addshape</function></funcdef> <paramdef>ressource <parameter>shape</parameter></paramdef> - <paramdef>integer <parameter>flags</parameter></paramdef> + <paramdef>int <parameter>flags</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbutton->addshape</function> adds the shape <parameter>shape</parameter> to this button. The following @@ -3267,9 +3474,15 @@ <paramdef>ressource <parameter>shape</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbutton->setup</function> alias for addShape(shape, SWFBUTTON_UP). </para> + <para> + See also + <function>swfbutton->addshape</function> and + <function>SWFAction</function>. + </para> </refsect1> </refentry> @@ -3286,9 +3499,15 @@ <paramdef>ressource <parameter>shape</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbutton->setup</function> alias for addShape(shape, SWFBUTTON_OVER). </para> + <para> + See also + <function>swfbutton->addshape</function> and + <function>SWFAction</function>. + </para> </refsect1> </refentry> @@ -3305,9 +3524,46 @@ <paramdef>ressource <parameter>shape</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbutton->sethit</function> alias for addShape(shape, SWFBUTTON_HIT). </para> + <para> + See also + <function>swfbutton->addshape</function> and + <function>SWFAction</function>. + </para> + </refsect1> + </refentry> + + <refentry id="function.swfbutton.addaction"> + <refnamediv> + <refname>SWFbutton->addAction</refname> + <refpurpose>ã¢ã¯ã·ã§ã³ã追å ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>void <function>swfbutton->addaction</function></funcdef> + <paramdef>ressource <parameter>action</parameter></paramdef> + <paramdef>int <parameter>flags</parameter></paramdef> + </funcprototype> + </funcsynopsis> + &warn.experimental.func; + <para> + <function>swfbutton->addaction</function> adds the action + <parameter>action</parameter> to this button for the given conditions. + The following <parameter>flags</parameter> are valid: + SWFBUTTON_MOUSEOVER, SWFBUTTON_MOUSEOUT, SWFBUTTON_MOUSEUP, + SWFBUTTON_MOUSEUPOUTSIDE, SWFBUTTON_MOUSEDOWN, SWFBUTTON_DRAGOUT and + SWFBUTTON_DRAGOVER. + </para> + <para> + See also + <function>swfbutton->addshape</function> and + <function>SWFAction</function>. + </para> </refsect1> </refentry> @@ -3324,11 +3580,17 @@ <paramdef>ressource <parameter>action</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfbutton->setaction</function> sets the action to be performed when the button is clicked. Alias for addAction(shape, SWFBUTTON_MOUSEUP). <parameter>action</parameter> is a <function>swfaction</function>. </para> + <para> + See also + <function>swfbutton->addshape</function> and + <function>SWFAction</function>. + </para> </refsect1> </refentry> @@ -3347,6 +3609,7 @@ <paramdef>string <parameter>script</parameter></paramdef> </funcprototype> </funcsynopsis> + &warn.experimental.func; <para> <function>swfaction</function> creates a new Action, and compiles the given script into an SWFAction object. @@ -3740,45 +4003,47 @@ <example> <title><function>swfaction</function>ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $s = new SWFShape(); - $f = $s->addFill(0xff, 0, 0); - $s->setRightFill($f); + $f = $s->addFill(0xff, 0, 0); + $s->setRightFill($f); - $s->movePenTo(-500,-500); - $s->drawLineTo(500,-500); - $s->drawLineTo(500,500); - $s->drawLineTo(-500,500); - $s->drawLineTo(-500,-500); + $s->movePenTo(-500,-500); + $s->drawLineTo(500,-500); + $s->drawLineTo(500,500); + $s->drawLineTo(-500,500); + $s->drawLineTo(-500,-500); $p = new SWFSprite(); - $i = $p->add($s); - $i->setDepth(1); - $p->nextFrame(); + $i = $p->add($s); + $i->setDepth(1); + $p->nextFrame(); - for($n=0; $n<5; ++$n) + for($n=0; $n<5; ++$n) { - $i->rotate(-15); - $p->nextFrame(); + $i->rotate(-15); + $p->nextFrame(); } $m = new SWFMovie(); - $m->setBackground(0xff, 0xff, 0xff); - $m->setDimension(6000,4000); + $m->setBackground(0xff, 0xff, 0xff); + $m->setDimension(6000,4000); - $i = $m->add($p); - $i->setDepth(1); - $i->moveTo(-500,2000); - $i->setName("box"); - - $m->add(new SWFAction("/box.x += 3;")); - $m->nextFrame(); - $m->add(new SWFAction("gotoFrame(0); play();")); - $m->nextFrame(); + $i = $m->add($p); + $i->setDepth(1); + $i->moveTo(-500,2000); + $i->setName("box"); + + $m->add(new SWFAction("/box.x += 3;")); + $m->nextFrame(); + $m->add(new SWFAction("gotoFrame(0); play();")); + $m->nextFrame(); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -3787,75 +4052,76 @@ <example> <title><function>swfaction</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $m = new SWFMovie(); - $m->setRate(36.0); - $m->setDimension(1200, 800); - $m->setBackground(0, 0, 0); + $m->setRate(36.0); + $m->setDimension(1200, 800); + $m->setBackground(0, 0, 0); /* mouse tracking sprite - empty, but follows mouse so we can get its x and y coordinates */ - $i = $m->add(new SWFSprite()); - $i->setName('mouse'); + $i = $m->add(new SWFSprite()); + $i->setName('mouse'); - $m->add(new SWFAction(" + $m->add(new SWFAction(" startDrag('/mouse', 1); /* '1' means lock sprite to the mouse */ ")); /* might as well turn off antialiasing, since these are just squares. */ - $m->add(new SWFAction(" + $m->add(new SWFAction(" this.quality = 0; ")); /* morphing box */ $r = new SWFMorph(); - $s = $r->getShape1(); + $s = $r->getShape1(); /* Note this is backwards from normal shapes. No idea why. */ - $s->setLeftFill($s->addFill(0xff, 0xff, 0xff)); - $s->movePenTo(-40, -40); - $s->drawLine(80, 0); - $s->drawLine(0, 80); - $s->drawLine(-80, 0); - $s->drawLine(0, -80); - - $s = $r->getShape2(); - - $s->setLeftFill($s->addFill(0x00, 0x00, 0x00)); - $s->movePenTo(-1, -1); - $s->drawLine(2, 0); - $s->drawLine(0, 2); - $s->drawLine(-2, 0); - $s->drawLine(0, -2); + $s->setLeftFill($s->addFill(0xff, 0xff, 0xff)); + $s->movePenTo(-40, -40); + $s->drawLine(80, 0); + $s->drawLine(0, 80); + $s->drawLine(-80, 0); + $s->drawLine(0, -80); + + $s = $r->getShape2(); + + $s->setLeftFill($s->addFill(0x00, 0x00, 0x00)); + $s->movePenTo(-1, -1); + $s->drawLine(2, 0); + $s->drawLine(0, 2); + $s->drawLine(-2, 0); + $s->drawLine(0, -2); /* sprite container for morphing box - this is just a timeline w/ the box morphing */ $box = new SWFSprite(); - $box->add(new SWFAction(" + $box->add(new SWFAction(" stop(); ")); - $i = $box->add($r); + $i = $box->add($r); - for($n=0; $n<=20; ++$n) + for($n=0; $n<=20; ++$n) { - $i->setRatio($n/20); - $box->nextFrame(); + $i->setRatio($n/20); + $box->nextFrame(); } /* this container sprite allows us to use the same action code many times */ $cell = new SWFSprite(); - $i = $cell->add($box); - $i->setName('box'); + $i = $cell->add($box); + $i->setName('box'); - $cell->add(new SWFAction(" + $cell->add(new SWFAction(" setTarget('box'); @@ -3866,31 +4132,31 @@ ")); - $cell->nextFrame(); - $cell->add(new SWFAction(" + $cell->nextFrame(); + $cell->add(new SWFAction(" gotoFrame(0); play(); ")); - $cell->nextFrame(); + $cell->nextFrame(); /* finally, add a bunch of the cells to the movie */ - for($x=0; $x<12; ++$x) + for($x=0; $x<12; ++$x) { - for($y=0; $y<8; ++$y) + for($y=0; $y<8; ++$y) { - $i = $m->add($cell); - $i->moveTo(100*$x+50, 100*$y+50); + $i = $m->add($cell); + $i->moveTo(100*$x+50, 100*$y+50); } } - $m->nextFrame(); + $m->nextFrame(); - $m->add(new SWFAction(" + $m->add(new SWFAction(" gotoFrame(1); play(); @@ -3898,8 +4164,9 @@ ")); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -3908,13 +4175,14 @@ <example> <title><function>swfaction</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $m = new SWFMovie(); - $m->setDimension(11000, 8000); - $m->setBackground(0x00, 0x00, 0x00); + $m->setDimension(11000, 8000); + $m->setBackground(0x00, 0x00, 0x00); - $m->add(new SWFAction(" + $m->add(new SWFAction(" this.quality = 0; /frames.visible = 0; @@ -3924,56 +4192,56 @@ // mouse tracking sprite $t = new SWFSprite(); - $i = $m->add($t); - $i->setName('mouse'); + $i = $m->add($t); + $i->setName('mouse'); $g = new SWFGradient(); - $g->addEntry(0, 0xff, 0xff, 0xff, 0xff); - $g->addEntry(0.1, 0xff, 0xff, 0xff, 0xff); - $g->addEntry(0.5, 0xff, 0xff, 0xff, 0x5f); - $g->addEntry(1.0, 0xff, 0xff, 0xff, 0); + $g->addEntry(0, 0xff, 0xff, 0xff, 0xff); + $g->addEntry(0.1, 0xff, 0xff, 0xff, 0xff); + $g->addEntry(0.5, 0xff, 0xff, 0xff, 0x5f); + $g->addEntry(1.0, 0xff, 0xff, 0xff, 0); // gradient shape thing $s = new SWFShape(); - $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); - $f->scaleTo(0.03); - $s->setRightFill($f); - $s->movePenTo(-600, -600); - $s->drawLine(1200, 0); - $s->drawLine(0, 1200); - $s->drawLine(-1200, 0); - $s->drawLine(0, -1200); + $f = $s->addFill($g, SWFFILL_RADIAL_GRADIENT); + $f->scaleTo(0.03); + $s->setRightFill($f); + $s->movePenTo(-600, -600); + $s->drawLine(1200, 0); + $s->drawLine(0, 1200); + $s->drawLine(-1200, 0); + $s->drawLine(0, -1200); // need to make this a sprite so we can multColor it $p = new SWFSprite(); - $p->add($s); - $p->nextFrame(); + $p->add($s); + $p->nextFrame(); // put the shape in here, each frame a different color $q = new SWFSprite(); - $q->add(new SWFAction("gotoFrame(random(7)+1); stop();")); - $i = $q->add($p); + $q->add(new SWFAction("gotoFrame(random(7)+1); stop();")); + $i = $q->add($p); - $i->multColor(1.0, 1.0, 1.0); - $q->nextFrame(); - $i->multColor(1.0, 0.5, 0.5); - $q->nextFrame(); - $i->multColor(1.0, 0.75, 0.5); - $q->nextFrame(); - $i->multColor(1.0, 1.0, 0.5); - $q->nextFrame(); - $i->multColor(0.5, 1.0, 0.5); - $q->nextFrame(); - $i->multColor(0.5, 0.5, 1.0); - $q->nextFrame(); - $i->multColor(1.0, 0.5, 1.0); - $q->nextFrame(); + $i->multColor(1.0, 1.0, 1.0); + $q->nextFrame(); + $i->multColor(1.0, 0.5, 0.5); + $q->nextFrame(); + $i->multColor(1.0, 0.75, 0.5); + $q->nextFrame(); + $i->multColor(1.0, 1.0, 0.5); + $q->nextFrame(); + $i->multColor(0.5, 1.0, 0.5); + $q->nextFrame(); + $i->multColor(0.5, 0.5, 1.0); + $q->nextFrame(); + $i->multColor(1.0, 0.5, 1.0); + $q->nextFrame(); // finally, this one contains the action code $p = new SWFSprite(); - $i = $p->add($q); - $i->setName('frames'); - $p->add(new SWFAction(" + $i = $p->add($q); + $i->setName('frames'); + $p->add(new SWFAction(" dx = (/:mousex-/:lastx)/3 + random(10)-5; dy = (/:mousey-/:lasty)/3; @@ -3982,9 +4250,9 @@ alpha = 100; ")); - $p->nextFrame(); + $p->nextFrame(); - $p->add(new SWFAction(" + $p->add(new SWFAction(" this.x = x; this.y = y; @@ -3995,16 +4263,16 @@ alpha -= 8; ")); - $p->nextFrame(); + $p->nextFrame(); - $p->add(new SWFAction("prevFrame(); play();")); - $p->nextFrame(); + $p->add(new SWFAction("prevFrame(); play();")); + $p->nextFrame(); - $i = $m->add($p); - $i->setName('frames'); - $m->nextFrame(); + $i = $m->add($p); + $i->setName('frames'); + $m->nextFrame(); - $m->add(new SWFAction(" + $m->add(new SWFAction(" lastx = mousex; lasty = mousey; @@ -4016,17 +4284,18 @@ if(num == 11) num = 1; -removeClip('char' & num); -duplicateClip(/frames, 'char' & num, num); +removeClip('char' & num); +duplicateClip(/frames, 'char' & num, num); ")); - $m->nextFrame(); - $m->add(new SWFAction("prevFrame(); play();")); + $m->nextFrame(); + $m->add(new SWFAction("prevFrame(); play();")); header('Content-type: application/x-shockwave-flash'); - $m->output(); -?> + $m->output(); +?> +]]> </programlisting> </example> </para> @@ -4039,46 +4308,47 @@ <example> <title><function>swfaction</function> example</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php /* sprite has one letter per frame */ $p = new SWFSprite(); - $p->add(new SWFAction("stop();")); + $p->add(new SWFAction("stop();")); $chars = "abcdefghijklmnopqrstuvwxyz". - "ABCDEFGHIJKLMNOPQRSTUVWXYZ". - "1234567890!@#$%^&*()_+-=/[]{}|;:,.<>?`~"; + "ABCDEFGHIJKLMNOPQRSTUVWXYZ". + "1234567890!@#$%^&/*()_+-=/[]{}|;:,.<>?`~"; $f = new SWFFont("_sans"); for($n=0; $nremove($i); $t = new SWFTextField(); - $t->setFont($f); - $t->setHeight(240); - $t->setBounds(600,240); - $t->align(SWFTEXTFIELD_ALIGN_CENTER); - $t->addString($c); - $i = $p->add($t); - $p->labelFrame($c); - $p->nextFrame(); + $t->setFont($f); + $t->setHeight(240); + $t->setBounds(600,240); + $t->align(SWFTEXTFIELD_ALIGN_CENTER); + $t->addString($c); + $i = $p->add($t); + $p->labelFrame($c); + $p->nextFrame(); } /* hit region for button - the entire frame */ $s = new SWFShape(); - $s->setFillStyle0($s->addSolidFill(0, 0, 0, 0)); - $s->drawLine(600, 0); - $s->drawLine(0, 400); - $s->drawLine(-600, 0); - $s->drawLine(0, -400); + $s->setFillStyle0($s->addSolidFill(0, 0, 0, 0)); + $s->drawLine(600, 0); + $s->drawLine(0, 400); + $s->drawLine(-600, 0); + $s->drawLine(0, -400); /* button checks for pressed key, sends sprite to the right frame */ $b = new SWFButton(); - $b->addShape($s, SWFBUTTON_HIT); + $b->addShape($s, SWFBUTTON_HIT); for($n=0; $naddAction(new SWFAction(" @@ -4089,23 +4359,26 @@ } $m = new SWFMovie(); - $m->setDimension(600,400); - $i = $m->add($p); - $i->setName('char'); - $i->moveTo(0,80); + $m->setDimension(600,400); + $i = $m->add($p); + $i->setName('char'); + $i->moveTo(0,80); - $m->add($b); + $m->add($b); header('Content-type: application/x-shockwave-flash'); - $m->output(); + $m->output(); -?> +?> +]]> </programlisting> </example> </para> </refsect1> </refentry> + </reference> + <!-- Keep this comment at the end of the file Local variables: mode: sgml Index: phpdoc/ja/functions/misc.xml diff -u phpdoc/ja/functions/misc.xml:1.24 phpdoc/ja/functions/misc.xml:1.25 --- phpdoc/ja/functions/misc.xml:1.24 Wed Dec 12 15:53:20 2001 +++ phpdoc/ja/functions/misc.xml Sat Jan 26 03:55:51 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.25 $ --> <reference id="ref.misc"> <title>ãã®ä»ã®é¢æ°</title> <titleabbrev>ãã®ä»</titleabbrev> @@ -21,7 +22,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>connection_aborted</function></funcdef> - <paramdef>void <parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> <simpara> @@ -43,7 +44,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>connection_status</function></funcdef> - <paramdef>void <parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> <simpara> @@ -65,7 +66,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>connection_timeout</function></funcdef> - <paramdef>void <parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> <simpara> @@ -111,14 +112,16 @@ <example> <title><function>constant</function> ã®ä¾</title> <programlisting role="php"> -<php +<![CDATA[ +<?php define ("MAXSIZE", 100); echo MAXSIZE; echo constant("MAXSIZE"); // åã®è¡ã¨åä½ã¯åã -?> +?> +]]> </programlisting> </example> </para> @@ -169,7 +172,8 @@ <example> <title>宿°ã®å®ç¾©</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php define ("CONSTANT", "Hello world."); echo CONSTANT; // "Hello world."ãåºåãã¾ãã echo Constant; // "Constant"ãåºåããè¦åãçºçãã¾ãã @@ -178,7 +182,8 @@ echo GREETING; // "Hello you."ãåºå echo Greeting; // "Hello you."ãåºå -?> +?> +]]> </programlisting> </example> </para> @@ -215,11 +220,13 @@ <example> <title>宿°ã®ãã§ãã¯</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php if (defined("CONSTANT")){ // å¼ç¨ç¬¦ã§æ¬ããã¦ããå¿ è¦ãããã¾ã echo CONSTANT; // } -?> +?> +]]> </programlisting> </example> </para> @@ -234,65 +241,13 @@ <refentry id="function.die"> <refnamediv> <refname>die</refname> - <refpurpose> - ã¡ãã»ã¼ã¸ãåºåããç¾å¨ã®ã¹ã¯ãªãããçµäºãã - </refpurpose> + <refpurpose><function>exit</function>ã®ã¨ã¤ãªã¢ã¹</refpurpose> </refnamediv> <refsect1> <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>void <function>die</function></funcdef> - <paramdef>string <parameter>message</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <simpara> - <function>die</function> ã¯ã<parameter>message</parameter> ãåº - åããã¹ã¯ãªããã®å¦çãçµäºãã¾ãããã®é¢æ°ã¯å¤ãä½ãè¿ãã¾ããã - </simpara> - <simpara> - ã¾ãã<function>die</function> ã«ã¯ããã©ã¡ã¼ã¿ã¨ãã¦é¢æ°ãæå®å¯ - è½ã§ãããã®é¢æ°ã¯ã<function>die</function> ãã¹ã¯ãªããã®ãã¼ã¹ - ãçµäºããåã«å®è¡ããã¾ãã - </simpara> <para> - <example> - <title><function>die</function> ã®ä¾</title> - <programlisting role="php"> -<?php - -$filename = '/path/to/data-file'; -$file = fopen ($filename, 'r') - or die("unable to open file ($filename)"); - -?> - </programlisting> - </example> - </para> - <para> - <example> - <title>颿°ã使ç¨ãã<function>die</function>ã®ä¾</title> - <programlisting role="php"> -<?php - -function handle_error($msg) { - if ($fp = @fopen("/tmp/error.log", "a")) { - fwrite($fp, $msg, strlen($msg)); - fclose($fp); - } -} - -if ($bad) { - die(handle_error("Something bad happened.\n")); -} - -?> - </programlisting> - </example> + ãã®é¢æ°ã¯<function>exit</function>ã®ã¨ã¤ãªã¢ã¹ã§ãã </para> - <simpara> - <function>exit</function>ãåç §ä¸ããã - </simpara> </refsect1> </refentry> @@ -330,10 +285,10 @@ </simpara> <simpara> <literal>return</literal> æã¯ãæååã®è©ä¾¡ããã ã¡ã«çµäºãã¾ãã - PHP4ã§ã¯ã<function>eval</function>颿°ã®çµæã®å¤ãè¿ãããã« - <literal>return</literal>ã使ç¨ãããã¨ãå¯è½ã§ãã䏿¹ãPHP3ã§ã¯ã - <function>eval</function>ã®åã¯<literal>void</literal>ã§ãããå¤ - ãä½ãè¿ãã¾ããã + PHP4ã§ã¯ã<function>eval</function>颿°ã¯ &false;ãè¿ãã¾ãããã + ãªãã°ãçµæã®å¤ãè¿ãããã«<literal>return</literal>ã使ç¨ããã + ã¨ãå¯è½ã§ãã䏿¹ãPHP3ã§ã¯ã<function>eval</function>ã®å㯠+ <literal>void</literal>ã§ãããå¤ãä½ãè¿ãã¾ããã </simpara> <para> <example> @@ -341,48 +296,89 @@ <function>eval</function>ã®ä¾ - ç°¡åãªããã¹ãã®ãã¼ã¸ </title> <programlisting role="php"> -<?php +<![CDATA[ +<?php $string = 'cup'; $name = 'coffee'; -$str = 'This is a $string with my $name in it.<br>'; +$str = 'This is a $string with my $name in it.<br>'; echo $str; -eval( "\$str = \"$str\";" ); +eval ("\$str = \"$str\";"); echo $str; -?> +?> +]]> </programlisting> - </example> - </para> - <para> - ä¸ã®ä¾ã¯ã以ä¸ã表示ãã¾ãã - <programlisting> + <para> + ä¸ã®ä¾ã¯ã以ä¸ã表示ãã¾ãã + <screen> +<![CDATA[ This is a $string with my $name in it. This is a cup with my coffee in it. - </programlisting> +]]> + </screen> + </para> + </example> </para> + &tip.ob-capture; </refsect1> </refentry> <refentry id="function.exit"> <refnamediv> <refname>exit</refname> - <refpurpose>ç¾å¨ã®ã¹ã¯ãªãããçµäºãã¾ã</refpurpose> + <refpurpose>ã¡ãã»ã¼ã¸ãåºåããã«ã¬ã³ãã®ã¹ã¯ãªãããçµäºãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> <funcdef>void <function>exit</function></funcdef> - <paramdef>mixed <parameter>status</parameter></paramdef> + <paramdef>string + <parameter><optional>status</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> + <note> + <simpara> + ãã®é¢æ°ã¯å®éã«ã¯é¢æ°ã§ã¯ãªãè¨èªæ§é ã§ãã + </simpara> + </note> <simpara> <function>exit</function> 颿°ã¯ãã¹ã¯ãªããã®å®è¡ãçµäºãã¾ãã - è¿ãå¤ã¯ãªãã§ããã<parameter>status</parameter>ãçµäºã¹ãã¼ã¿ã¹ - ã¨ãã¦ä½¿ç¨ãã¾ãã + çµäºç´åã«<parameter>status</parameter>ãåºåãã¾ãã </simpara> <simpara> - <function>die</function>ãåç §ä¸ããã + <parameter>status</parameter>ã<type>integer</type>ã®å ´åããã®å¤ + ãçµäºã¹ãã¼ã¿ã¹ã¨ãã¦ä½¿ç¨ããã¾ãã </simpara> + <note> + <simpara> + ã«ã¬ã³ãã®CVSçã¯ã<type>integer</type>ã®å ´åã + <parameter>status</parameter>ãåºåãã¾ããã + </simpara> + </note> + <note> + <simpara> + 颿°<function>die</function>ã¯ã<function>exit</function>ã®ã¨ã¤ + ãªã¢ã¹ã§ãã + </simpara> + </note> + <para> + <example> + <title><function>exit</function>ã®ä¾</title> + <programlisting role="php"> +<![CDATA[ +<?php + +$filename = '/path/to/data-file'; +$file = fopen ($filename, 'r') + or exit("unable to open file ($filename)"); + +?> +]]> + </programlisting> + <!-- TODO: example with integer exit-statis --> + </example> + </para> </refsect1> </refentry> @@ -433,17 +429,19 @@ <example> <title><function>get_browser</function>ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php function list_array ($array) { - while (list ($key, $value) = each ( $array ) ) { - $str .= "<b>$key:</b> $value<br>\n"; - } - return $str; + while (list ($key, $value) = each ($array)) { + $str .= "<b>$key:</b> $value<br>\n"; + } + return $str; } -echo "$HTTP_USER_AGENT<hr>\n"; +echo "$HTTP_USER_AGENT<hr>\n"; $browser = get_browser(); echo list_array ((array) $browser); -?> +?> +]]> </programlisting> </example> </para> @@ -451,26 +449,28 @@ ä¸ã®ã¹ã¯ãªããã®åºåã¯ã次ã®ããã«ãªãã¾ãã </simpara> <programlisting> -Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586)<hr> -<b>browser_name_pattern:</b> Mozilla/4\.5.*<br> -<b>parent:</b> Netscape 4.0<br> -<b>platform:</b> Unknown<br> -<b>majorver:</b> 4<br> -<b>minorver:</b> 5<br> -<b>browser:</b> Netscape<br> -<b>version:</b> 4<br> -<b>frames:</b> 1<br> -<b>tables:</b> 1<br> -<b>cookies:</b> 1<br> -<b>backgroundsounds:</b> <br> -<b>vbscript:</b> <br> -<b>javascript:</b> 1<br> -<b>javaapplets:</b> 1<br> -<b>activexcontrols:</b> <br> -<b>beta:</b> <br> -<b>crawler:</b> <br> -<b>authenticodeupdate:</b> <br> -<b>msn:</b> <br> +<![CDATA[ +Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586)<hr> +<b>browser_name_pattern:</b> Mozilla/4\.5.*<br> +<b>parent:</b> Netscape 4.0<br> +<b>platform:</b> Unknown<br> +<b>majorver:</b> 4<br> +<b>minorver:</b> 5<br> +<b>browser:</b> Netscape<br> +<b>version:</b> 4<br> +<b>frames:</b> 1<br> +<b>tables:</b> 1<br> +<b>cookies:</b> 1<br> +<b>backgroundsounds:</b> <br> +<b>vbscript:</b> <br> +<b>javascript:</b> 1<br> +<b>javaapplets:</b> 1<br> +<b>activexcontrols:</b> <br> +<b>beta:</b> <br> +<b>crawler:</b> <br> +<b>authenticodeupdate:</b> <br> +<b>msn:</b> <br> +]]> </programlisting> <simpara> ãããåä½ãããããã«ã¯ãè¨å®ãã¡ã¤ã«ã® @@ -494,7 +494,7 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>boolean <function>highlight_file</function></funcdef> + <funcdef>bool <function>highlight_file</function></funcdef> <paramdef>string <parameter>filename</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -529,45 +529,48 @@ <para> <informalexample> <programlisting> -<Location /source> +<![CDATA[ +<Location /source> ForceType application/x-httpd-php -</Location> +</Location> +]]> </programlisting> </informalexample> </para> <simpara> - ããã¦ã"source" ã¨ããååã®ãã¡ã¤ã«ã使ããããã - Webã®ã«ã¼ããã£ã¬ã¯ããªã«ç½®ãã¾ãã + ããã¦ã"source"ã¨ããååã®ãã¡ã¤ã«ã使ãããããWebã®ã«ã¼ã + ãã£ã¬ã¯ããªã«ç½®ãã¾ãã </simpara> <para> <programlisting role="php"> -<HTML> -<HEAD> -<TITLE>Source Display</TITLE> -</HEAD> -<BODY BGCOLOR="white"> -<?php - $script = getenv ("PATH_TRANSLATED"); +<![CDATA[ +<HTML> +<HEAD> +<TITLE>Source Display</TITLE> +</HEAD> +<BODY BGCOLOR="white"> +<?php + $script = getenv ("PATH_TRANSLATED"); if(!$script) { - echo "<BR><B>ERROR: Script Name needed</B><BR>"; + echo "<BR><B>ERROR: Script Name needed</B><BR>"; } else { - if (ereg("(\.php|\.inc)$",$script)) { - echo "<H1>Source of: $PATH_INFO</H1>\n<HR>\n"; - highlight_file($script); + if (ereg("(\.php|\.inc)$",$script)) { + echo "<H1>Source of: $PATH_INFO</H1>\n<HR>\n"; + highlight_file($script); } else { - echo "<H1>ERROR: Only PHP or include script names are allowed</H1>"; + echo "<H1>ERROR: Only PHP or include script names are allowed</H1>"; } } - echo "<HR>Processed: ".date("Y/M/d H:i:s",time()); -?> -</BODY> -</HTML> + echo "<HR>Processed: ".date("Y/M/d H:i:s",time()); +?> +</BODY> +</HTML> +]]> </programlisting> </para> <simpara> - ããã«ããã"/path/to/script.php" ã«ããã¹ã¯ãªããã® - ã«ã©ã¼è¡¨ç¤ºã表示ããããã«ä»¥ä¸ã®URLã使ç¨ãããã¨ãã§ããããã« - ãªãã¾ãã + ããã«ããã"/path/to/script.php"ã«ããã¹ã¯ãªããã®ã«ã©ã¼è¡¨ç¤ºã + 表示ããããã«ä»¥ä¸ã®URLã使ç¨ãããã¨ãã§ããããã«ãªãã¾ãã </simpara> <para> <informalexample> @@ -578,6 +581,7 @@ </para> </example> </para> + &tip.ob-capture; <simpara> <function>highlight_string</function>, <function>show_source</function>ãåç §ä¸ããã @@ -594,7 +598,7 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>boolean <function>highlight_string</function></funcdef> + <funcdef>bool <function>highlight_string</function></funcdef> <paramdef>string <parameter>str</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -602,8 +606,9 @@ <function>highlight_string</function> 颿°ã¯ãPHPçµè¾¼ã¿ã®æ§æã㤠ã©ã¤ã¿ã§å®ç¾©ãããã«ã©ã¼ã使ç¨ãã¦<parameter>str</parameter>ãæ§ æãã¤ã©ã¤ã表示ããããã®ãåºåãã¾ãã - æåæã«&true;ãããã§ãªãå ´åã«&false;ãè¿ãã¾ãã(PHP 4) + &return.success; </simpara> + &tip.ob-capture; <simpara> <function>highlight_file</function>, <function>show_source</function>ãåç §ä¸ããã @@ -834,7 +839,9 @@ <example> <title>ãã©ã¼ãããæååã®ããã¯</title> <programlisting role="php"> -$binarydata = pack("nvc*", 0x1234, 0x5678, 65, 66); +<![CDATA[ +$binarydata = pack ("nvc*", 0x1234, 0x5678, 65, 66); +]]> </programlisting> <para> ãã®çµæã®ãã¤ããªæååã¯ã6ãã¤ãé·ã§ããã @@ -849,10 +856,10 @@ ããã </para> <para> - PHP ã¯å é¨çã«å¤ããã·ã³ä¾åã®å¤§ããã®ç¬¦å·ä»ã®å¤ã¨ãã¦ä¿æãã - ãã¨ã«ã注æãã¦ä¸ããã + PHP ã¯å é¨çã«å¤ããã·ã³ä¾åã®å¤§ããã®ç¬¦å·ä»ã® + <type>integer</type>å¤ã¨ãã¦ä¿æãããã¨ã«ã注æãã¦ä¸ããã ãã®ããã«ä¿æããã«ã¯å¤§ãããã符å·ç¡ãã®å¤ãä¸ããå ´åã - åç²¾åº¦å®æ°ã«å¤æããéã«ãã°ãã°æå¾ å¤ãã®çµæã¨ãªãã¾ãã + <type>float</type>ã«å¤æããéã«ãã°ãã°æå¾ å¤ãã®çµæã¨ãªãã¾ãã </para> </refsect1> </refentry> @@ -866,7 +873,7 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>boolean <function>show_source</function></funcdef> + <funcdef>bool <function>show_source</function></funcdef> <paramdef>string <parameter>filename</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -927,7 +934,7 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>uniqid</function></funcdef> + <funcdef>string <function>uniqid</function></funcdef> <paramdef>string <parameter>prefix</parameter></paramdef> <paramdef>bool <parameter> @@ -965,8 +972,10 @@ ãã¼)ãæ¬¡ã®ä¾ã®ããã«ããã®ãæ¨å¥¨ããã¾ãã <informalexample> <programlisting role="php"> -$token = md5 (uniqid ("")); // ã©ã³ãã è¦ç´ ãªã -$better_token = md5 (uniqid (rand())); // æ¨æ¸¬ãå°é£ã§ãããããåªãã¦ããã +<![CDATA[ +$token = md5(uniqid("")); // ã©ã³ãã è¦ç´ ãªã +$better_token = md5(uniqid(rand(),1)); // æ¨æ¸¬ãå°é£ã§ãããããåªãã¦ããã +]]> </programlisting> </informalexample> </para> @@ -1003,7 +1012,9 @@ <example> <title>ãã©ã¼ãããæååã®<function>unpack</function></title> <programlisting role="php"> +<![CDATA[ $array = unpack ("c2chars/nint", $binarydata); +]]> </programlisting> <para> çµæã®é åã¯ãã¨ã³ã㪠"chars1","chars2","int" ãä¿æãã¾ãã @@ -1053,6 +1064,7 @@ </refentry> </reference> + <!-- Keep this comment at the end of the file Local variables: mode: sgml Index: phpdoc/ja/functions/mnogosearch.xml diff -u phpdoc/ja/functions/mnogosearch.xml:1.7 phpdoc/ja/functions/mnogosearch.xml:1.8 --- phpdoc/ja/functions/mnogosearch.xml:1.7 Wed Dec 12 15:53:21 2001 +++ phpdoc/ja/functions/mnogosearch.xml Sat Jan 26 03:55:51 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.8 $ --> <reference id="ref.mnogo"> <title>mnoGoSearch 颿°</title> <titleabbrev>mnoGoSearch</titleabbrev> @@ -6,13 +7,15 @@ <simpara> ããã§ç¤ºã颿°ã«ãããããªã¼ã®æ¤ç´¢ã¨ã³ã¸ã³ mnoGoSearch (æ§å㯠UdmSearch)ã¸ã¢ã¯ã»ã¹ãããã¨ãå¯è½ã¨ãªãã¾ãããããã®é¢æ°ãå©ç¨å¯ - è½ã¨ããããã«ã¯ããªãã·ã§ã³ <option - role="configure">--with-mnogosearch</option> ã«ãã mnogosearchãµ - ãã¼ããæå®ãã¦PHPãã³ã³ãã¤ã«ããå¿ è¦ãããã¾ããmnogosearchã®ã - ã¹ãæå®ããã«ãã®ãªãã·ã§ã³ã使ç¨ããå ´åãPHPã¯ããã©ã«ãã§ - mnogosearchã/usr/local/mnogosearchã«ãããã®ã¨ãã¦æ¤ç´¢ãè¡ãã¾ãã - mnogosearchãä»ã®å ´æã«ã¤ã³ã¹ãã¼ã«ãã¦ããå ´åã«ã¯ã - <option role="configure">--with-mnogosearch=DIR</option>ã®ããã«ã + è½ã¨ããããã«ã¯ããªãã·ã§ã³<link + linkend="install.configure.with-mnogosearch"><option + role="configure">--with-mnogosearch</option></link>ã«ãã + mnogosearchãµãã¼ããæå®ãã¦PHPãã³ã³ãã¤ã«ããå¿ è¦ãããã¾ãã + mnogosearchã®ãã¹ãæå®ããã«ãã®ãªãã·ã§ã³ã使ç¨ããå ´åãPHPã¯ã + ãã©ã«ãã§mnogosearchã/usr/local/mnogosearchã«ãããã®ã¨ãã¦æ¤ç´¢ + ãè¡ãã¾ããmnogosearchãä»ã®å ´æã«ã¤ã³ã¹ãã¼ã«ãã¦ããå ´åã«ã¯ã + <link linkend="install.configure.with-mnogosearch"><option + role="configure">--with-mnogosearch=DIR</option></link>ã®ããã«ã ã®ãã¹ãæå®ããå¿ è¦ãããã¾ãã </simpara> <para> @@ -41,7 +44,8 @@ configureã«MySQLãã¤ã³ã¹ãã¼ã«ãããã£ã¬ã¯ããªãæå®ããå¿ è¦ã ããã¾ããããã¯ãmnoGoSearchã«é¢ããè¨å®ã§ä½¿ç¨ãããä¾ãã°ã次㮠ããã«ãªãã¾ãã - <option role="configure">--with-mnogosearch --with-mysql=/usr</option> + <link linkend="install.configure.with-mnogosearch"><option role="configure"> + --with-mnogosearch --with-mysql=/usr</option></link> </para> </note> <simpara> @@ -54,283 +58,6 @@ </simpara> </partintro> - <refentry id="function.udm-alloc-agent"> - <refnamediv> - <refname>udm_alloc_agent</refname> - <refpurpose>mnoGoSearch ã»ãã·ã§ã³ã確ä¿ãã</refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>udm_alloc_agent</function></funcdef> - <paramdef>string <parameter>dbaddr</parameter></paramdef> - <paramdef>string - <parameter> - <optional>dbmode</optional> - </parameter> - </paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>udm_alloc_agent</function> ã¯ãæåæã«mnogosearchã¨ã¼ - ã¸ã§ã³ãIDãã¨ã©ã¼æã«&false;ãè¿ãã¾ãããã®é¢ - æ°ã¯ããã¼ã¿ãã¼ã¹ãã©ã¡ã¼ã¿ãæããã»ãã·ã§ã³ãçæãã¾ãã - </para> - <para> - <parameter>dbaddr</parameter> - URLå½¢å¼ã®ãã¼ã¿ãã¼ã¹åãSQLãã¼ - ã¿ãã¼ã¹ã¸æ¥ç¶ããéã®ãªãã·ã§ã³(åããã¹ãããã¼ã¿ãã¼ã¹åããã¼ - ããã¦ã¼ã¶ããã¹ã¯ã¼ã)ã - çµã¿è¾¼ã¿ã®ããã¹ããã¡ã¤ã«ãµãã¼ãã«ã¯é¢ä¿ããã¾ããããã©ã¼ãã - ã: DBAddr DBType:[//[DBUser[:DBPass]@]DBHost[:DBPort]]/DBName/ - ç¾å¨ããµãã¼ãããã¦ãã DBType ã®å¤ã¯æ¬¡ã®ãã®ã§ãã: mysql, - pgsql, msql, solid, mssql, oracle, ibase - å®éããã¼ãã£ããªã©ã¤ãã©ãªã®ãµãã¼ãã¯éè¦ã§ã¯ããã¾ããããããã - ODBCã¦ã¼ã¶ã¯ããµãã¼ããããå¤ã®ä¸ã¤ãæå®ããå¿ è¦ãããã¾ãã使 - ç¨ãããã¼ã¿ãã¼ã¹åããµãã¼ãããã¦ããªãå ´åã"unknown"ã代ãã - ã«ä½¿ç¨ãããã¨ãå¯è½ã§ãã - </para> - <para> - <parameter>dbmode</parameter> - åèªã®è¨æ¶ç¨SQLãã¼ã¿ãã¼ã¹ã¢ã¼ - ãã鏿å¯è½ã§ãã"single"ãæå®ããå ´åãå ¨ã¦ã®åèªã¯ãåããã¼ - ãã«ã«ä¿åããã¾ãã"multi"ã鏿ããå ´åãåèªã¯ãã®é·ãã«å¿ã㦠- å¥ã ã®ãã¼ãã«ã«ä¿åããã¾ãã"multi"ã¢ã¼ãã®æ¹ãé常é«éã§ããã - ãã¼ã¿ãã¼ã¹ä¸ã§ããå¤ãã®ãã¼ãã«ãå¿ è¦ã¨ãã¾ãã"crc"ã¢ã¼ããé¸ - æãããå ´åãmnoGoSearch ã¯ãåèªã®ä»£ããã«CRC32ã¢ã«ã´ãªãºã ã§è¨ - ç®ããã32ãããæ´æ°ã®åèªIDãä¿åãã¾ãããã®ã¢ã¼ãã§å¿ è¦ãªã㣠- ã¹ã¯å®¹éã¯ããå°ããã§ããã"single"ããã³"multi"ã¢ã¼ãã¨æ¯è¼ã㦠- ããé«éã§ãã"crc-multi" ã¯ã"crc"ã¢ã¼ãã¨åãè¨æ¶æ§é ã使ç¨ãã¾ - ããã"multi"ã¢ã¼ãã®ããã«åèªé·ã«å¿ãã¦å¥ã ã®ãã¼ã¿ãã¼ã¹ã«åèª - ãä¿åãã¾ãããã©ã¼ããã: DBMode single/multi/crc/crc-multi - </para> - <note> - <para> - <parameter>dbaddr</parameter> ããã³ - <parameter>dbmode</parameter> ã¯ãã¤ã³ããã¯ã¹ä½ææã«ä½¿ç¨ããã - ãããã®é¸æåã«ä¸è´ãã¦ããå¿ è¦ãããã¾ãã - </para> - </note> - <note> - <para> - å®éããããã®é¢æ°ã¯ãã¼ã¿ãã¼ã¹ã¸ã®æ¥ç¶ããªã¼ãã³ããå¿ è¦ã¯ãªãã - ãã£ã¦ããã°ã¤ã³åããã¹ã¯ã¼ãã確èªãã¾ãããå®éã®ãã¼ã¿ãã¼ã¹ - ã¸ã®æ¥ç¶ããã³ãã°ã¤ã³/ãã¹ã¯ã¼ãèªè¨¼ã¯ã - <function>udm_find</function>ã§è¡ããã¾ãã - </para> - </note> - </refsect1> - </refentry> - - <refentry id="function.udm-set-agent-param"> - <refnamediv> - <refname>udm_set_agent_param</refname> - <refpurpose> - mnoGoSearch ã¨ã¼ã¸ã§ã³ãã®ã»ãã·ã§ã³ãã©ã¡ã¼ã¿ãè¨å®ãã - </refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>int <function>udm_set_agent_param</function></funcdef> - <paramdef>int <parameter>agent</parameter></paramdef> - <paramdef>int <parameter>var</parameter></paramdef> - <paramdef>string <parameter>val</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>udm_set_agent_param</function> ã¯æåæã« - &true;ãã¨ã©ã¼æã«&false;ãè¿ã - ã¾ããmnoGoSearch ã»ãã·ã§ã³ãã©ã¡ã¼ã¿ãå®ç¾©ãã¾ãã - </para> - <simpara> - 以ä¸ã®ãã©ã¡ã¼ã¿ããã³ãããã®å¤ãå©ç¨å¯è½ã§ãã - </simpara> - <itemizedlist> - <listitem> - <simpara> - UDM_PARAM_PAGE_NUM - ã¯ãã¼ã¸çªå·ãæ¤ç´¢çµæã¨ããããã«ä½¿ç¨ã - ãã¾ãã(çµæã¯ããã¼ã¸æ¯ã«UDM_PARAM_PAGE_SIZEåã®çµæãæãã0 - ããå§ã¾ããã¼ã¸ã§è¿ããã¾ã) - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_PAGE_SIZE - ã¯ä¸ãã¼ã¸ã«è¡¨ç¤ºãããæ¤ç´¢çµæã®æ°ã - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_SEARCH_MODE - æ¤ç´¢ã¢ã¼ããæ¬¡ã®å¤ãå©ç¨å¯è½ã§ãã: - UDM_MODE_ALL - å ¨ã¦ã®åèªãæ¤ç´¢ãã¾ãã; - UDM_MODE_ANY - å ¨ã¦ã®åèªã§æ¤ç´¢ãã; - UDM_MODE_PHRASE - çèªæ¤ç´¢; - UDM_MODE_BOOL - è«ç夿¤ç´¢ãè«ç夿¤ç´¢ã«é¢ãã詳細ã«ã¤ãã¦ã¯ - <function>udm_find</function> ãåç §ä¸ããã - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_CACHE_MODE - æ¤ç´¢çµæã®ãã£ãã·ã¥ã¢ã¼ãããªã³ã¾ãã¯ãª - ãã«ãã¾ããæå¹ã®å ´åãæ¤ç´¢ã¨ã³ã¸ã³ã¯æ¤ç´¢çµæããã£ã¹ã¯ã«ä¿å - ãã¾ããä¼¼ããããªæ¤ç´¢ãå¾ã§å®è¡ãããå ´åãã¨ã³ã¸ã³ã¯ããé«é - ã«ãã£ãã·ã¥ããçµæãå¾ããã¨ãå¯è½ã§ãã - å©ç¨å¯è½ãªå¤: UDM_CACHE_ENABLED, UDM_CACHE_DISABLED. - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_TRACK_MODE - ã¯ã¨ãªè¿½è·¡ã¢ã¼ãããªã³ã¾ãã¯ãªãã«ãã¾ãã - ãã¼ã¸ã§ã³3.1.2以éãmnoGoSearch ã¯ã¯ã¨ãªè¿½è·¡ã¢ã¼ãããµãã¼ãã - ã¦ãã¾ãã追跡ã¯SQLãã¼ã¸ã§ã³ã«ã®ã¿å®è£ ããã¦ãããçµã¿è¾¼ã¿ãã¼ - ã¿ãã¼ã¹ã§ã¯å©ç¨ã§ãã¾ããã追跡ã使ç¨ããã«ã¯ããã¼ãã«ã追跡 - ãµãã¼ãç¨ã«ä½æããå¿ è¦ãããã¾ããMySQLã®å ´åã - create/mysql/track.txtã使ç¨ãã¦ä¸ãããæ¤ç´¢å®è¡æã«ãããã³ã - ã¨ã³ãã¯ã¯ã¨ãªåèªãè¦ã¤ããããã¥ã¡ã³ãã®æ°ãã«ã¬ã³ãã®ç§åä½ - ã®UNIXã¿ã¤ã ã¹ã¿ã³ããä¿åããããã«ãããã®ãã¼ãã«ã使ç¨ãã¾ - ãã - å©ç¨å¯è½ãªå¤: UDM_TRACK_ENABLED, UDM_TRACK_DISABLED. - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_PHRASE_MODE - çèªãç¨ããã¤ã³ããã¯ã¹ãã¼ã¿ãã¼ã¹ã - ã©ãããå®ç¾©ãã¾ãã(indexer.confã«ããã"phrase" ãã©ã¡ã¼ã¿) - 使ç¨å¯è½ãªå¤: UDM_PHRASE_ENABLED ããã³ UDM_PHRASE_DISABLEDã - çèªæ¤ç´¢ãæå¹ãªå ´å(UDM_PHRASE_ENABLED)ã§ããå ¨ã¦ã®ã¢ã¼ã - (ANYãALLãBOOLãPHRASE)ã§æ¤ç´¢ãå¯è½ã§ãããã¨ã«æ³¨æãã¦ä¸ããã - mnoGoSearchã®ãã¼ã¸ã§ã³3.1.10ã§çèªæ¤ç´¢ãSQLã¨çµã¿è¾¼ã¿ãã¼ã¿ãã¼ - ã¹ã¢ã¼ãã§ã®ã¿ãµãã¼ãããã¾ããã䏿¹ã3.1.11ã§çèªãcachemode - ã§ããµãã¼ãããå§ãã¾ããã - </simpara> - <simpara> - çèªæ¤ç´¢ã®ä¾: - </simpara> - <simpara> - "Arizona desert" - ãã®ã¯ã¨ãªã¯ã"Arizona desert"ãçèªã¨ãã¦å« - ãå ¨ã¦ã®ããã¥ã¡ã³ããè¿ãã¾ããçèªã®åå¾ã«äºéå¼ç¨ç¬¦ãå¿ è¦ã§ - ãããã¨ã«æ³¨æãã¦ä¸ããã - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_CHARSET - ãã¼ã«ã«ãªcharsetãå®ç¾©ãã¾ããå©ç¨å¯è½ãªå¤: - mnoGoSearchã«ãããµãã¼ããããcharsetã®çµ, - ä¾ãã°ãkoi8-r, cp1251, ... - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_STOPFILE - stopfileã®ååã¨ãã¹ãå®ç¾©ãã¾ãã - (mnoGoSearchã¨è¥å¹²éããããã¾ããã¤ã¾ããmnoGoSearchã«ããã¦ã¯ã - ç¸å¯¾ãã¹ã¾ãã¯ãã¹ãå ¥åãããªãã£ãå ´åãUDM_CONF_DIRã«é¢ã㦠- ãã®ãã¡ã¤ã«ãæ¢ããã¾ããã¢ã¸ã¥ã¼ã«ã¯ããã®ãã¡ã¤ã«ãã«ã¬ã³ã - ã®ãã¹(ããªãã¡ãPHPã¹ã¯ãªãããå®è¡ããããã¹)ã§æ¢ãã¾ãã - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_STOPTABLE - æå®ããSQLãã¼ãã«ãã忢åèªããã¼ãã - ã¾ããè¤æ°ã®StopwordTableã³ãã³ãã使ç¨å¯è½ã§ãããã®ã³ãã³ãã¯ã - SQLãã¼ã¿ãã¼ã¹ãµãã¼ããæå¹ã«ããã«ã³ã³ãã¤ã«ããå ´åã¯ä½¿ç¨ã§ - ãã¾ããã - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_WEIGHT_FACTOR - æå®ããããã¥ã¡ã³ãé¨åã®éã¿ä¿æ°ã - 表ãã¾ããç¾å¨ãbody, title, keywords, description, urlããµãã¼ - ãããã¦ãã¾ãããã®æ©è½ãæå¹ã«ããã«ã¯ãindexer.confã®*Weight - ã³ãã³ãã«2ã®ç´¯ä¹ãæå®ãã¦ä¸ãããããã§æ¬¡ã®ãããªéã¿ãæå®ã - ãå ´åãèãã¦ã¿ã¾ãããã - </simpara> - <simpara>URLWeight 1</simpara> - <simpara>BodyWeight 2</simpara> - <simpara>TitleWeight 4</simpara> - <simpara>KeywordWeight 8</simpara> - <simpara>DescWeight 16</simpara> - <simpara> - åãããã¥ã¡ã³ãã«ããã¤ãã®åèªãè¤æ°åç¾ããå ´åã - indexerãåèªã®éã¿ã«ORæ¼ç®åã使ç¨ããã®ã§ãç°ãªã£ãããã¥ã¡ã³ - ãã®é¨åã«åèªãç¾ããåæ°ãæ¤åºå¯è½ã§ããå ¨ã¦ã®ããã¥ã¡ã³ãé¨ - åã§ä½¿ç¨ãããåèªã¯ãéã¿éå 00011111 ãæãã¾ãã - </simpara> - <simpara> - ãã®ãã©ã¡ã¼ã¿ã®å¤ã¯ã16鲿°æåå ABCDE ã§ããåæ¡ã¯ãåèªéã¿ - ã®å¯¾å¿ãããããã®å åã§ããä¸ã§æå®ããéã¿è¨å®ã¯æ¬¡ã®ããã«ãª - ãã¾ãã - </simpara> - <simpara>E ã¯éã¿1ã®å å (URL Weight ããã)</simpara> - <simpara>D ã¯éã¿2ã®å å (BodyWeight ããã)</simpara> - <simpara>C ã¯éã¿4ã®å å (TitleWeight ããã)</simpara> - <simpara>B ã¯éã¿8ã®å å (KeywordWeight ããã)</simpara> - <simpara>A ã¯éã¿16ã®å å (DescWeight ããã)</simpara> - <simpara> - ä¾: - </simpara> - <simpara> - UDM_PARAM_WEIGHT_FACTOR=00001 ã¯ãURLã®ã¿ãæ¤ç´¢ãã¾ãã - </simpara> - <simpara> - UDM_PARAM_WEIGHT_FACTOR=00100 ã¯ãTitleã®ã¿ãæ¤ç´¢ãã¾ãã - </simpara> - <simpara> - UDM_PARAM_WEIGHT_FACTOR=11100 ã¯ãTitle,Keywords,Desctriptionã - æ¤ç´¢ãã¾ãããURL 㨠Bodyã¯æ¤ç´¢ãã¾ããã - </simpara> - <simpara> - UDM_PARAM_WEIGHT_FACTOR=F9421 ã¯ãæ¬¡ã®æ¤ç´¢ãè¡ãã¾ãã - </simpara> - <simpara>Description with factor 15 (16鲿° F)</simpara> - <simpara>Keywords with factor 9</simpara> - <simpara>Title with factor 4</simpara> - <simpara>Body with factor 2</simpara> - <simpara>URL with factor 1</simpara> - <simpara> - UDM_PARAM_WEIGHT_FACTOR 夿°ãçç¥ãããå ´åãå ã®éã¿ã®å¤ã¯ã½ã¼ - ãçµæããå¼ãåºããã¾ããä¸è¨ã§æå®ããéã¿è¨å®ã®å ´åããã㥠- ã¡ã³ãã®Descriptionã¯ãæå¤§éã¿16ãæããããã¥ã¡ã³ãã® - descriptionãæå³ãã¾ãã - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_WORD_MATCH - åèªã«ãããããã®ãã©ã¡ã¼ã¿ãåèªæ¤ç´¢å - ã鏿ããéã«ä½¿ç¨å¯è½ã§ãããã®æ©è½ã¯ã"single"ããã³"multi"ã¢ã¼ - ãã§SQLãã¼ã¿ãã¼ã¹ããã³çµã¿è¾¼ã¿ã®ãã¼ã¿ãã¼ã¹ã使ç¨ããå ´åã« - ã®ã¿åä½ãã¾ãããã®æ©è½ã¯ãcachemodeããã³ä»ã®ã¢ã¼ãã§ã¯åä½ã - ã¾ãããããã¯ããããã®ã¢ã¼ãããåèªCRCã使ç¨ãã¦ãããé¨åæ - ååæ¤ç´¢ããµãã¼ããã¦ããªãããã§ãã - å©ç¨å¯è½ãªå¤ã¯æ¬¡ã®ããã«ãªãã¾ãã - </simpara> - <simpara>UDM_MATCH_BEGIN - åèªã®å§ãã«ããã</simpara> - <simpara>UDM_MATCH_END - åèªã®çµãã«ããã</simpara> - <simpara>UDM_MATCH_WORD - åèªå ¨ä½ã«ããã</simpara> - <simpara>UDM_MATCH_SUBSTR - åèªã®é¨åæååã«ããã</simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_MIN_WORD_LEN - åèªã®æçé·ãå®ç¾©ãã¾ãã - ãã®å¶éããçãåèªã¯ãstopwordã¨ã¿ãªããã¾ãããã®ãã©ã¡ã¼ã¿ - ã¯ãã®å¤èªèº«ãç¯å²ã«å«ããã¨ã«æ³¨æãã¦ä¸ãããã¤ã¾ãã - UDM_PARAM_MIN_WORD_LEN=3 ã®å ´åã3æåã®é·ãã®åèªã¯stopword㨠- è¦ãªããã¾ãããã2æåã®åèªã¯stopwordã¨ã¿ãªããã¾ããããã©ã« - ãã¯1ã§ãã - </simpara> - </listitem> - <listitem> - <simpara> - UDM_PARAM_MAX_WORD_LEN - æé·ã®åèªãå®ç¾©ãã¾ãããã®å¶éããã - é·ãå符ã¯ãstopwordã¨ã¿ãªããã¾ãããã®ãã©ã¡ã¼ã¿ã¯ãã®å¤ãç¯ - å²ã«å«ããã¨ã«æ³¨æãã¦ä¸ãããã¤ã¾ããUDM_PARAM_MAX_WORD_LEN=32 - ã®å ´åã32æåã®åèªã¯stopwordã¨ã¿ãªããã¾ãããã33æåã®åèª - ã¯ã¿ãªããã¾ããããã©ã«ãã¯ã32ã§ãã - </simpara> - </listitem> - </itemizedlist> - </refsect1> - </refentry> - <refentry id="function.udm-add-search-limit"> <refnamediv> <refname>udm_add_search_limit</refname> @@ -416,8 +143,246 @@ </itemizedlist> </refsect1> </refentry> - -<refentry id="function.udm-clear-search-limits"> + + <refentry id="function.udm-alloc-agent"> + <refnamediv> + <refname>udm_alloc_agent</refname> + <refpurpose>mnoGoSearch ã»ãã·ã§ã³ã確ä¿ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_alloc_agent</function></funcdef> + <paramdef>string <parameter>dbaddr</parameter></paramdef> + <paramdef>string + <parameter><optional>dbmode</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_alloc_agent</function> ã¯ãæåæã«mnogosearchã¨ã¼ + ã¸ã§ã³ãIDãã¨ã©ã¼æã«&false;ãè¿ãã¾ãããã®é¢æ°ã¯ããã¼ã¿ãã¼ã¹ + ãã©ã¡ã¼ã¿ãæããã»ãã·ã§ã³ãçæãã¾ãã + </para> + <para> + <parameter>dbaddr</parameter> - URLå½¢å¼ã®ãã¼ã¿ãã¼ã¹åãSQLãã¼ + ã¿ãã¼ã¹ã¸æ¥ç¶ããéã®ãªãã·ã§ã³(åããã¹ãããã¼ã¿ãã¼ã¹åããã¼ + ããã¦ã¼ã¶ããã¹ã¯ã¼ã)ã + çµã¿è¾¼ã¿ã®ããã¹ããã¡ã¤ã«ãµãã¼ãã«ã¯é¢ä¿ããã¾ããããã©ã¼ãã + ã: DBAddr DBType:[//[DBUser[:DBPass]@]DBHost[:DBPort]]/DBName/ + ç¾å¨ããµãã¼ãããã¦ãã DBType ã®å¤ã¯æ¬¡ã®ãã®ã§ãã: mysql, + pgsql, msql, solid, mssql, oracle, ibase + å®éããã¼ãã£ããªã©ã¤ãã©ãªã®ãµãã¼ãã¯éè¦ã§ã¯ããã¾ããããããã + ODBCã¦ã¼ã¶ã¯ããµãã¼ããããå¤ã®ä¸ã¤ãæå®ããå¿ è¦ãããã¾ãã使 + ç¨ãããã¼ã¿ãã¼ã¹åããµãã¼ãããã¦ããªãå ´åã"unknown"ã代ãã + ã«ä½¿ç¨ãããã¨ãå¯è½ã§ãã + </para> + <para> + <parameter>dbmode</parameter> - åèªã®è¨æ¶ç¨SQLãã¼ã¿ãã¼ã¹ã¢ã¼ + ãã鏿å¯è½ã§ãã"single"ãæå®ããå ´åãå ¨ã¦ã®åèªã¯ãåããã¼ + ãã«ã«ä¿åããã¾ãã"multi"ã鏿ããå ´åãåèªã¯ãã®é·ãã«å¿ã㦠+ å¥ã ã®ãã¼ãã«ã«ä¿åããã¾ãã"multi"ã¢ã¼ãã®æ¹ãé常é«éã§ããã + ãã¼ã¿ãã¼ã¹ä¸ã§ããå¤ãã®ãã¼ãã«ãå¿ è¦ã¨ãã¾ãã"crc"ã¢ã¼ããé¸ + æãããå ´åãmnoGoSearch ã¯ãåèªã®ä»£ããã«CRC32ã¢ã«ã´ãªãºã ã§è¨ + ç®ããã32ãããæ´æ°ã®åèªIDãä¿åãã¾ãããã®ã¢ã¼ãã§å¿ è¦ãªã㣠+ ã¹ã¯å®¹éã¯ããå°ããã§ããã"single"ããã³"multi"ã¢ã¼ãã¨æ¯è¼ã㦠+ ããé«éã§ãã"crc-multi" ã¯ã"crc"ã¢ã¼ãã¨åãè¨æ¶æ§é ã使ç¨ãã¾ + ããã"multi"ã¢ã¼ãã®ããã«åèªé·ã«å¿ãã¦å¥ã ã®ãã¼ã¿ãã¼ã¹ã«åèª + ãä¿åãã¾ãããã©ã¼ããã: DBMode single/multi/crc/crc-multi + </para> + <note> + <para> + <parameter>dbaddr</parameter> ããã³ + <parameter>dbmode</parameter> ã¯ãã¤ã³ããã¯ã¹ä½ææã«ä½¿ç¨ããã + ãããã®é¸æåã«ä¸è´ãã¦ããå¿ è¦ãããã¾ãã + </para> + </note> + <note> + <para> + å®éããããã®é¢æ°ã¯ãã¼ã¿ãã¼ã¹ã¸ã®æ¥ç¶ããªã¼ãã³ããå¿ è¦ã¯ãªãã + ãã£ã¦ããã°ã¤ã³åããã¹ã¯ã¼ãã確èªãã¾ãããå®éã®ãã¼ã¿ãã¼ã¹ + ã¸ã®æ¥ç¶ããã³ãã°ã¤ã³/ãã¹ã¯ã¼ãèªè¨¼ã¯ã + <function>udm_find</function>ã§è¡ããã¾ãã + </para> + </note> + </refsect1> + </refentry> + + <refentry id="function.udm-api-version"> + <refnamediv> + <refname>udm_api_version</refname> + <refpurpose>mnoGoSearch APIãã¼ã¸ã§ã³ãåå¾ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_api_version</function></funcdef> + <void/> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_api_version</function>ã¯ãmnoGoSearch APIãã¼ã¸ã§ã³ + çªå·ãè¿ãã¾ããä¾ãã°ãmnoGoSearch 3.1.10 APIã使ç¨ãã¦ããå ´åã + ãã®é¢æ°ã¯ã<literal>30110</literal>ãè¿ãã¾ãã + </para> + <para> + ãã®é¢æ°ã«ããå©ç¨å¯è½ãªAPI颿°ãã¦ã¼ã¶ã調ã¹ããã¨ãå¯è½ã¨ãªãã¾ + ããä¾ãã°ã<function>udm_get_doc_count</function>颿°ã¯ + mnoGoSearch 3.1.11以éã§ã®ã¿å©ç¨å¯è½ã§ãã + </para> + <simpara>ä¾:</simpara> + <informalexample> + <programlisting role="php"> +<![CDATA[ + if (udm_api_version() >= 30111) { + print "Total number of urls in database: ".udm_get_doc_count($udm)."<br>\n"; + } +]]> + </programlisting> + </informalexample> + </refsect1> + </refentry> + + <refentry id="function.udm-cat-path"> + <refnamediv> + <refname>udm_cat_path</refname> + <refpurpose>ã«ã¬ã³ãã®ã«ãã´ãªã¸ã®ãã¹ãåå¾ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>array <function>udm_cat_path</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>string <parameter>category</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_cat_path</function>ã¯ãããªã¼ã«ã¼ãããã«ã¬ã³ãã®ã« + ãã´ãªã¸ã®ã«ãã´ãªããªã¼ã®ä¸ã®æ¢è¿°ãã¹ãå«ãé åãè¿ãã¾ãã + </para> + <para> + <parameter>agent</parameter> - ã¨ã¼ã¸ã§ã³ããªã³ã¯IDã + </para> + <para> + <parameter>category</parameter> - ã«ã¬ã³ãã®ã«ãã´ãª - ãã¹ãå¾ã + ãã¨ããã«ãã´ãªã + </para> + <para> + 以ä¸ã®å½¢å¼ã®é åãè¿ãã¾ãã + </para> + <para> + çµããæ§æãããé åãå¶æ°æ·»åçªå·ã®è¦ç´ ã«ã¯ã«ãã´ãªãã¹ã奿°è¦ + ç´ ã«ã¯ã対å¿ããã«ãã´ãªåãå«ã¾ãã¾ãã + </para> + <para> + ä¾ãã°ã<literal>$array=udm_cat_path($agent, '02031D');</literal> + ã¨ã³ã¼ã«ããã¨ã以ä¸ã®é åãè¿ããã¾ãã + </para> + <literallayout> +<![CDATA[ +$array[0] will contain '' +$array[1] will contain 'Root' +$array[2] will contain '02' +$array[3] will contain 'Sport' +$array[4] will contain '0203' +$array[5] will contain 'Auto' +$array[4] will contain '02031D' +$array[5] will contain 'Ferrari' +]]> + </literallayout> + <example> + <title> + ã«ã¬ã³ãã®ã«ãã´ãªã¸ã®ãã¹ã¯ä»¥ä¸ã®å½¢å¼ã§æå®ãã¾ãã + '> Root > Sport > Auto > Ferrari' + </title> + <programlisting role="php"> +<![CDATA[ +<?php + $cat_path_arr = udm_cat_path($udm_agent,$cat); + $cat_path = ''; + for ($i=0; $i<count($cat_path_arr); $i+=2) { + $path = $cat_path_arr[$i]; + $name = $cat_path_arr[$i+1]; + $cat_path .= " > <a href=\"$PHP_SELF?cat=$path\">$name</a> "; + } +?> +]]> + </programlisting> + </example> + </refsect1> + </refentry> + + <refentry id="function.udm-cat-list"> + <refnamediv> + <refname>udm_cat_list</refname> + <refpurpose> + ã«ã¬ã³ãã®ã«ãã´ãªã¨åãã¬ãã«ã®ã«ãã´ãªãå ¨ã¦åå¾ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>array <function>udm_cat_list</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>string <parameter>category</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_cat_list</function>ã¯ãã«ãã´ãªããªã¼ã®ä¸ã®ã«ã¬ã³ã + ã«ãã´ãªã¨åãã¬ãã«ã®å ¨ã¦ã®ã«ãã´ãªã®ä¸è¦§ãé åã¨ãã¦è¿ãã¾ãã + </para> + <para> + ãã®é¢æ°ã¯ãã«ãã´ãªããªã¼ã®ãã©ã¦ã¶ãéçºããéã«æç¨ã§ãã + </para> + <para> + 以ä¸ã®å½¢å¼ã§é åãè¿ãã¾ãã + </para> + <para> + çµããæ§æãããé åãå¶æ°æ·»åçªå·ã®è¦ç´ ã«ã¯ã«ãã´ãªãã¹ã奿°è¦ + ç´ ã«ã¯ã対å¿ããã«ãã´ãªåãå«ã¾ãã¾ãã + </para> + <literallayout> +<![CDATA[ +$array[0] will contain '020300' +$array[1] will contain 'Audi' +$array[2] will contain '020301' +$array[3] will contain 'BMW' +$array[4] will contain '020302' +$array[5] will contain 'Opel' +... +etc. +]]> + </literallayout> + <literallayout> + 以ä¸ã¯ãã«ã¬ã³ãã®ã¬ãã«ã®ãªã³ã¯ããã®å½¢å¼ã§è¡¨ç¤ºããä¾ã§ãã + Audi + BMW + Opel + ... + </literallayout> + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php + $cat_list_arr = udm_cat_list($udm_agent,$cat); + $cat_list = ''; + for ($i=0; $i<count($cat_list_arr); $i+=2) { + $path = $cat_list_arr[$i]; + $name = $cat_list_arr[$i+1]; + $cat_list .= "<a href=\"$PHP_SELF?cat=$path\">$name</a><br>"; + } +?> +]]> + </programlisting> + </informalexample> + </refsect1> + </refentry> + + <refentry id="function.udm-clear-search-limits"> <refnamediv> <refname>udm_clear_search_limits</refname> <refpurpose> @@ -439,6 +404,62 @@ </refsect1> </refentry> + <refentry id="function.udm-errno"> + <refnamediv> + <refname>udm_errno</refname> + <refpurpose>mnoGoSearch ã¨ã©ã¼çªå·ãåå¾ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_errno</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_errno</function> ã¯ãmnoGoSearch ã¨ã©ã¼çªå·ãè¿ãã¾ + ããã¨ã©ã¼ããªãå ´åã«ã¼ããè¿ãã¾ãã + </para> + <para> + <parameter>agent</parameter> - + <function>udm_alloc_agent</function>ã¸ã®ã³ã¼ã«ããè¿ãããã¨ã¼ã¸ã§ + ã³ãIDã¸ã®ãªã³ã¯ + </para> + <para> + æ°åã§ã¨ã¼ã¸ã§ã³ãã¨ã©ã¼ã³ã¼ããè¿ãã¾ãã + </para> + </refsect1> + </refentry> + + <refentry id="function.udm-error"> + <refnamediv> + <refname>udm_error</refname> + <refpurpose>mnoGoSearch ã¨ã©ã¼ã¡ãã»ã¼ã¸ãå¾ã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>udm_error</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_error</function> ã¯ãmnoGoSearch ã¨ã©ã¼ã¡ãã»ã¼ã¸ã + è¿ãã¾ããã¨ã©ã¼ããªãå ´åã«ã¯ãç©ºã®æååãè¿ãã¾ãã + </para> + <para> + <parameter>agent</parameter> ã¯ãã¨ã¼ã¸ã§ã³ãIDã¸ã®ãªã³ã¯ã§ããã + <function>udm_alloc_agent</function>ãã³ã¼ã«ããéã«å¾ããããã® + ã§ãã + </para> + <para> + ã¨ã¼ã¸ã§ã³ãã¨ã©ã¼ã¡ãã»ã¼ã¸ãå¾ã¾ãã + </para> + </refsect1> + </refentry> + <refentry id="function.udm-find"> <refnamediv> <refname>udm_find</refname> @@ -457,7 +478,7 @@ <function>udm_find</function> ã¯æåæã«çµæãªã³ã¯IDãã¨ã©ã¼æã« &false; ãè¿ãã¾ãã </para> - <para> + <para> æ¤ç´¢ãè¡ãã¾ããæåã®å¼æ°ã¯ã»ãã·ã§ã³ã次ã®å¼æ°ã¯ã¯ã¨ãªæ¬ä½ã§ãã æ¤ç´¢ã®å®è¡ã¯ãæ¢ãåèªãå ¥åããæç¨¿ãã¿ã³ãæ¼ãã ãã§å¯è½ã§ãã ä¾ãã°ã"mysql odbc"ããã®ä¾ã§å¼ç¨ç¬¦ã¯ä»ã®ããã¹ãããåºå¥ããã @@ -498,7 +519,229 @@ </refsect1> </refentry> - <refentry id="function.udm-get-res-param"> + <refentry id="function.udm-free-agent"> + <refnamediv> + <refname>udm_free_agent</refname> + <refpurpose>mnoGoSearch ã»ãã·ã§ã³ãéæ¾ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_free_agent</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_free_agent</function> ã¯æåæã« + &true;ãã¨ã©ã¼æã«&false;ãè¿ã + ã¾ãã + </para> + <para> + <parameter>agent</parameter> - + <function>udm_alloc_agent</function>ããè¿ãããã¨ã¼ã¸ã§ã³ãID㸠+ ã®ãªã³ã¯ã + </para> + <para> + ã¨ã¼ã¸ã§ã³ãã»ãã·ã§ã³ç¨ã«ç¢ºä¿ãããã¡ã¢ãªãéæ¾ãã¾ãã + </para> + </refsect1> + </refentry> + + <refentry id="function.udm-free-ispell-data"> + <refnamediv> + <refname>udm_free_ispell_data</refname> + <refpurpose>ispellãã¼ã¿ç¨ã«ç¢ºä¿ãããã¡ã¢ãªãè§£æ¾ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_free_ispell_data</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_free_ispell_data</function>ã¯ã常ã«&true;ãè¿ãã¾ãã + </para> + <para> + <parameter>agent</parameter> - + <function>udm_alloc_agent</function>ã«ããå¾ãããã¨ã¼ã¸ã§ã³ããªã³ + ã¯IDã + </para> + <note> + <para> + ãã®é¢æ°ã¯ãmnoGoSearchãã¼ã¸ã§ã³3.1.12以éã§ãµãã¼ãããã颿°ã§ã + ãã以åã®ãã¼ã¸ã§ã³ã§ã¯ãµãã¼ãããã¦ãã¾ããã + </para> + </note> + </refsect1> + </refentry> + + <refentry id="function.udm-free-res"> + <refnamediv> + <refname>udm_free_res</refname> + <refpurpose>mnoGoSearch çµæãéæ¾ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_free_res</function></funcdef> + <paramdef>int <parameter>res</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_free_res</function> ã¯æåæã« + &true;ãã¨ã©ã¼æã«&false;ãè¿ã + ã¾ãã + </para> + <para> + <parameter>res</parameter> - <function>udm_find</function>ããè¿ + ãããçµæIDã¸ã®ãªã³ã¯ã + </para> + <para> + çµæç¨ã«ç¢ºä¿ãããã¡ã¢ãªãéæ¾ãã¾ãã + </para> + </refsect1> + </refentry> + + <refentry id="function.udm-get-doc-count"> + <refnamediv> + <refname>udm_get_doc_count</refname> + <refpurpose>Get total number of documents in database.</refpurpose> + </refnamediv> + + <refsect1> + <title>Description</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_get_doc_count</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + </funcprototype> + </funcsynopsis> + + <para> + <function>udm_get_doc_count</function> returns number of documents in database. + </para> + + <para> + <parameter>agent</parameter> - link to agent identifier, received after + call to <function>udm_alloc_agent</function>. + </para> + + <note> + <simpara> + This function is supported only in mnoGoSearch 3.1.11 or later. + </simpara> + </note> + + </refsect1> + </refentry> + + <refentry id="function.udm-get-res-field"> + <refnamediv> + <refname>udm_get_res_field</refname> + <refpurpose>mnoGoSearch çµæãã£ã¼ã«ããåå¾ãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>udm_get_res_field</function></funcdef> + <paramdef>int <parameter>res</parameter></paramdef> + <paramdef>int <parameter>row</parameter></paramdef> + <paramdef>int <parameter>field</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_get_res_field</function> ã¯ãæåæã«çµæãã£ã¼ã«ãã + ã¨ã©ã¼æã«&false;ãè¿ãã¾ãã + </para> + <para> + <parameter>res</parameter> - <function>udm_find</function>ããè¿ + ãããçµæIDã¸ã®ãªã³ã¯ã + </para> + <para> + <parameter>row</parameter> - ã«ã¬ã³ããã¼ã¸ã®ãªã³ã¯çªå·ã0ãã + <parameter>UDM_PARAM_NUM_ROWS</parameter>ã¾ã§ã®çªå·ã + </para> + <para> + <parameter>field</parameter> - ãã£ã¼ã«ãIDãæ¬¡ã®å¤ã®ã©ããã + </para> + <itemizedlist> + <listitem> + <simpara> + UDM_FIELD_URL - ããã¥ã¡ã³ãURLãã£ã¼ã«ã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_CONTENT - ããã¥ã¡ã³ãContent-typeãã£ã¼ã«ã (ä¾ãã°ã + text/html) + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_TITLE - ããã¥ã¡ã³ãã®titleãã£ã¼ã«ãã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_KEYWORDS - ããã¥ã¡ã³ãkeywordsãã£ã¼ã«ã(META + KEYWORDSã¿ã°ãã) + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_DESC - ããã¥ã¡ã³ãdescriptionãã£ã¼ã«ã (META + DESCRIPTIONã¿ã°ãã) + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_TEXT - ããã¥ã¡ã³ã body ããã¹ã (æåã®æ°è¡ã§ãã㥠+ ã¡ã³ãã®å 容ã«é¢ããã¢ã¤ãã¢ã示ã)ã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_SIZE - ããã¥ã¡ã³ãã®ãµã¤ãºã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_URLID - ãªã³ã¯ã¸ã®ã¦ãã¼ã¯ãªURL IDã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_RATING - (mnoGoSearchã§è¨ç®ããã)ãã¼ã¸ã®ã¬ã¼ãã£ã³ + ã°ã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_MODIFIED - unixtimeå½¢å¼ã®last-modifiedãã£ã¼ã«ãã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_ORDER - è¦ã¤ãã£ãããã¥ã¡ã³ãã®ä¸ã®ã«ã¬ã³ãã®ãã㥠+ ã¡ã³ãã®æ° + </simpara> + </listitem> + <listitem> + <simpara> + UDM_FIELD_CRC - ããã¥ã¡ã³ãCRCã + </simpara> + </listitem> + </itemizedlist> + </refsect1> + </refentry> + + + <refentry id="function.udm-get-res-param"> <refnamediv> <refname>udm_get_res_param</refname> <refpurpose>mnoGoSearch çµæãã©ã¡ã¼ã¿ãåå¾ãã</refpurpose> @@ -513,272 +756,614 @@ </funcprototype> </funcsynopsis> <para> - <function>udm_get_res_param</function> ã¯æåæã«çµæãã©ã¡ã¼ã¿ã - è¿ãã¾ããã¨ã©ã¼æã«&false;ãè¿ãã¾ãã - </para> - <para> - <parameter>res</parameter> - <function>udm_find</function>ããè¿ - ãããçµæIDã¸ã®ãªã³ã¯ã - </para> - <para> - <parameter>param</parameter> - ãã©ã¡ã¼ã¿IDã§ãããæ¬¡ã®å¤ã®ã©ãã - ã¨ãªãã¾ãã + <function>udm_get_res_param</function> ã¯æåæã«çµæãã©ã¡ã¼ã¿ã + è¿ãã¾ããã¨ã©ã¼æã«&false;ãè¿ãã¾ãã + </para> + <para> + <parameter>res</parameter> - <function>udm_find</function>ããè¿ + ãããçµæIDã¸ã®ãªã³ã¯ã + </para> + <para> + <parameter>param</parameter> - ãã©ã¡ã¼ã¿IDã§ãããæ¬¡ã®å¤ã®ã©ãã + ã¨ãªãã¾ãã + </para> + <itemizedlist> + <listitem> + <simpara> + UDM_PARAM_NUM_ROWS - ã«ã¬ã³ãã®ãã¼ã¸ã§è¦ä»ãã£ããªã³ã¯ã®æ°ã + å ¨ã¦ã®æ¤ç´¢ãã¼ã¸ã§ã®æå¾ã®ãã¼ã¸ã§ã®UDM_PARAM_PAGE_SIZEãæ®ãã® + ãªã³ã¯ã«çããã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_PARAM_FOUND - ã¯ã¨ãªã«ãããããçµæã®åè¨ã®æ° + </simpara> + </listitem> + <listitem> + <simpara> + UDM_PARAM_WORDINFO - è¦ä»ãã£ãåèªã«é¢ããæ å ±ãä¾ãã°ã"a + good book" ã«é¢ããã¯ã¨ãªã¯ "a: stopword, good:5637, book: 120" + ãè¿ãã¾ãã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_PARAM_SEARCHTIME - ç§åä½ã®æ¤ç´¢æéã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_PARAM_FIRST_DOC - ã«ã¬ã³ãã®ãã¼ã¸ã«è¡¨ç¤ºãããæåã®ãã㥠+ ã¡ã³ãã®æ°ã + </simpara> + </listitem> + <listitem> + <simpara> + UDM_PARAM_LAST_DOC - ã«ã¬ã³ãã®ãã¼ã¸ã«è¡¨ç¤ºãããæå¾ã®ããã¥ã¡ + ã³ãã®æ°ã + </simpara> + </listitem> + </itemizedlist> + </refsect1> + </refentry> + + <refentry id="function.udm-load-ispell-data"> + <refnamediv> + <refname>udm_load_ispell_data</refname> + <refpurpose>ispellãã¼ã¿ãèªã¿è¾¼ã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_load_ispell_data</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>int <parameter>var</parameter></paramdef> + <paramdef>string <parameter>val1</parameter></paramdef> + <paramdef>string <parameter>val2</parameter></paramdef> + <paramdef>int <parameter>flag</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_load_ispell_data</function>ã¯ãispellãã¼ã¿ããã¼ã + ãã¾ããæåæã«&true;ãã¨ã©ã¼æã«&false;ãè¿ãã¾ãã + </para> + <para> + <parameter>agent</parameter> - agent link identifier, received after call + to <function>udm_alloc_agent</function>. + </para> + <para> + <parameter>var</parameter> - parameter, indicating the source for ispell + data. May have the following values: + </para> + <para> + After using this function to free memory allocated for ispell data, please + use <function>udm_free_ispell_data</function>, even if you use + UDM_ISPELL_TYPE_SERVER mode. + </para> + <para> + The fastest mode is UDM_ISPELL_TYPE_SERVER. UDM_ISPELL_TYPE_TEXT is slower + and UDM_ISPELL_TYPE_DB is the slowest. The above pattern is &true; for + mnoGoSearch 3.1.10 - 3.1.11. It is planned to speed up DB mode in future + versions and it is going to be faster than TEXT mode. + </para> + <itemizedlist> + <listitem> + <simpara> + UDM_ISPELL_TYPE_DB - indicates that ispell data should be loaded from SQL. + In this case, parameters <parameter>val1</parameter> and <parameter>val2</parameter> + are ignored and should be left blank. <parameter>flag</parameter> + should be equal to <literal>1</literal>. + </simpara> + <note> + <para> + <parameter>flag</parameter> indicates that after loading ispell data + from defined source it sould be sorted (it is necessary for correct + functioning of ispell). In case of loading ispell data from files + there may be several calls to <function>udm_load_ispell_data</function>, + and there is no sense to sort data after every call, but only after + the last one. Since in db mode all the data is loaded by one call, + this parameter should have the value <literal>1</literal>. In this mode + in case of error, e.g. if ispell tables are absent, the function will + return &false; and code and error message will be accessible through + <function>udm_error</function> and <function>udm_errno</function>. + </para> + </note> + + <simpara>Example:</simpara> + <informalexample> + <programlisting role="php"> +if (! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_DB,'','',1)) { + printf("Error #%d: '%s'\n", udm_errno($udm), udm_error($udm)); + exit; +} + </programlisting> + </informalexample> + </listitem> + <listitem> + <para> + UDM_ISPELL_TYPE_AFFIX - indicates that ispell data should be loaded from + file and initiates loading affixes file. In this case <parameter>val1</parameter> + defines double letter language code for which affixes are loaded, + and <parameter>val2</parameter> - file path. Please note, that if + a relative path entered, the module looks for the file not in UDM_CONF_DIR, + but in relation to current path, i.e. to the path where the script is executed. + In case of error in this mode, e.g. if file is absent, the function will return + &false;, and an error message will be displayed. Error message text cannot be + accessed through <function>udm_error</function> and <function>udm_errno</function>, + since those functions can only return messages associated with SQL. Please, + see <parameter>flag</parameter> parameter description in UDM_ISPELL_TYPE_DB. + </para> + + <simpara>Example:</simpara> + <informalexample> + <programlisting role="php"> + if ((! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_AFFIX,'en','/opt/ispell/en.aff',0)) || + (! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_AFFIX,'ru','/opt/ispell/ru.aff',0)) || + (! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_SPELL,'en','/opt/ispell/en.dict',0)) || + (! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_SPELL,'ru','/opt/ispell/ru.dict',1))) { + exit; + } + </programlisting> + </informalexample> + <note> + <para> + <parameter>flag</parameter> is equal to <literal>1</literal> only in the last call. + </para> + </note> + </listitem> + <listitem> + <para> + UDM_ISPELL_TYPE_SPELL - indicates that ispell data should be loaded from + file and initiates loading of ispell dictionary file. In this case + <parameter>val1</parameter> defines double letter language code for which + affixes are loaded, + and <parameter>val2</parameter> - file path. Please note, that if a relative + path entered, the module looks for the file not in UDM_CONF_DIR, but in + relation to current path, i.e. to the path where the script is executed. + In case of error in this mode, e.g. if file is absent, the function will + return &false;, and an error message will be displayed. Error message text + cannot be accessed through <function>udm_error</function> and + <function>udm_errno</function>, since those functions can only return messages + associated with SQL. Please, see <parameter>flag</parameter> parameter + description in UDM_ISPELL_TYPE_DB. + </para> + <informalexample> + <programlisting role="php"> + if ((! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_AFFIX,'en','/opt/ispell/en.aff',0)) || + (! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_AFFIX,'ru','/opt/ispell/ru.aff',0)) || + (! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_SPELL,'en','/opt/ispell/en.dict',0)) || + (! udm_load_ispell_data($udm,UDM_ISPELL_TYPE_SPELL,'ru','/opt/ispell/ru.dict',1))) { + exit; + } + </programlisting> + </informalexample> + + <note> + <para> + <parameter>flag</parameter> is equal to <literal>1</literal> only in the last call. + </para> + </note> + </listitem> + <listitem> + <para> + UDM_ISPELL_TYPE_SERVER - enables spell server support. + <parameter>val1</parameter> parameter indicates + address of the host running spell server. <parameter>val2</parameter> ` + is not used yet, but in future releases it is going to indicate number + of port used by spell server. <parameter>flag</parameter> parameter in + this case is not needed since ispell data is stored + on spellserver already sorted. + </para> + <para> + Spelld server reads spell-data from a separate configuration file + (/usr/local/mnogosearch/etc/spelld.conf by default), sorts it and stores in + memory. With clients server communicates in two ways: to indexer all the + data is transferred (so that indexer starts faster), from search.cgi server + receives word to normalize and then passes over to client (search.cgi) list + of normalized word forms. This allows fastest, compared to db and text modes + processing of search queries (by omitting loading and sorting all the spell data). + </para> + <para> + <function>udm_load_ispell_data</function> function in UDM_ISPELL_TYPE_SERVER + mode does not actually load ispell data, but only defines server address. + In fact, server is automatically used by <function>udm_find</function> + function when performing search. In case of errors, e.g. if spellserver + is not running or invalid host indicated, there are no messages returned + and ispell conversion does not work. + </para> + + <note> + <para> + ãã®é¢æ°ã¯ãmnoGoSearch 3.1.12以éã§ã®ã¿å©ç¨å¯è½ã§ãã + </para> + </note> + <simpara>ä¾:</simpara> + <informalexample> + <programlisting role="php"> +<![CDATA[ +if (!udm_load_ispell_data($udm,UDM_ISPELL_TYPE_SERVER,'','',1)) { + printf("Error loading ispell data from server<br>\n"); + exit; +} +]]> + </programlisting> + </informalexample> + </listitem> + </itemizedlist> + </refsect1> + </refentry> + + <refentry id="function.udm-set-agent-param"> + <refnamediv> + <refname>udm_set_agent_param</refname> + <refpurpose> + mnoGoSearch ã¨ã¼ã¸ã§ã³ãã®ã»ãã·ã§ã³ãã©ã¡ã¼ã¿ãè¨å®ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_set_agent_param</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>int <parameter>var</parameter></paramdef> + <paramdef>string <parameter>val</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + <function>udm_set_agent_param</function> ã¯æåæã« + &true;ãã¨ã©ã¼æã«&false;ãè¿ã + ã¾ããmnoGoSearch ã»ãã·ã§ã³ãã©ã¡ã¼ã¿ãå®ç¾©ãã¾ãã </para> + <simpara> + 以ä¸ã®ãã©ã¡ã¼ã¿ããã³ãããã®å¤ãå©ç¨å¯è½ã§ãã + </simpara> <itemizedlist> <listitem> <simpara> - UDM_PARAM_NUM_ROWS - ã«ã¬ã³ãã®ãã¼ã¸ã§è¦ä»ãã£ããªã³ã¯ã®æ°ã - å ¨ã¦ã®æ¤ç´¢ãã¼ã¸ã§ã®æå¾ã®ãã¼ã¸ã§ã®UDM_PARAM_PAGE_SIZEãæ®ãã® - ãªã³ã¯ã«çããã + UDM_PARAM_PAGE_NUM - ã¯ãã¼ã¸çªå·ãæ¤ç´¢çµæã¨ããããã«ä½¿ç¨ã + ãã¾ãã(çµæã¯ããã¼ã¸æ¯ã«UDM_PARAM_PAGE_SIZEåã®çµæãæãã0 + ããå§ã¾ããã¼ã¸ã§è¿ããã¾ã) </simpara> </listitem> <listitem> <simpara> - UDM_PARAM_FOUND - ã¯ã¨ãªã«ãããããçµæã®åè¨ã®æ° + UDM_PARAM_PAGE_SIZE - ã¯ä¸ãã¼ã¸ã«è¡¨ç¤ºãããæ¤ç´¢çµæã®æ°ã </simpara> - </listitem> + </listitem> <listitem> <simpara> - UDM_PARAM_WORDINFO - è¦ä»ãã£ãåèªã«é¢ããæ å ±ãä¾ãã°ã"a - good book" ã«é¢ããã¯ã¨ãªã¯ "a: stopword, good:5637, book: 120" - ãè¿ãã¾ãã + UDM_PARAM_SEARCH_MODE - æ¤ç´¢ã¢ã¼ããæ¬¡ã®å¤ãå©ç¨å¯è½ã§ãã: + UDM_MODE_ALL - å ¨ã¦ã®åèªãæ¤ç´¢ãã¾ãã; + UDM_MODE_ANY - å ¨ã¦ã®åèªã§æ¤ç´¢ãã; + UDM_MODE_PHRASE - çèªæ¤ç´¢; + UDM_MODE_BOOL - è«ç夿¤ç´¢ãè«ç夿¤ç´¢ã«é¢ãã詳細ã«ã¤ãã¦ã¯ + <function>udm_find</function> ãåç §ä¸ããã </simpara> - </listitem> + </listitem> <listitem> <simpara> - UDM_PARAM_SEARCHTIME - ç§åä½ã®æ¤ç´¢æéã + UDM_PARAM_CACHE_MODE - æ¤ç´¢çµæã®ãã£ãã·ã¥ã¢ã¼ãããªã³ã¾ãã¯ãª + ãã«ãã¾ããæå¹ã®å ´åãæ¤ç´¢ã¨ã³ã¸ã³ã¯æ¤ç´¢çµæããã£ã¹ã¯ã«ä¿å + ãã¾ããä¼¼ããããªæ¤ç´¢ãå¾ã§å®è¡ãããå ´åãã¨ã³ã¸ã³ã¯ããé«é + ã«ãã£ãã·ã¥ããçµæãå¾ããã¨ãå¯è½ã§ãã + å©ç¨å¯è½ãªå¤: UDM_CACHE_ENABLED, UDM_CACHE_DISABLED. </simpara> - </listitem> + </listitem> <listitem> <simpara> - UDM_PARAM_FIRST_DOC - ã«ã¬ã³ãã®ãã¼ã¸ã«è¡¨ç¤ºãããæåã®ãã㥠- ã¡ã³ãã®æ°ã + UDM_PARAM_TRACK_MODE - ã¯ã¨ãªè¿½è·¡ã¢ã¼ãããªã³ã¾ãã¯ãªãã«ãã¾ãã + ãã¼ã¸ã§ã³3.1.2以éãmnoGoSearch ã¯ã¯ã¨ãªè¿½è·¡ã¢ã¼ãããµãã¼ãã + ã¦ãã¾ãã追跡ã¯SQLãã¼ã¸ã§ã³ã«ã®ã¿å®è£ ããã¦ãããçµã¿è¾¼ã¿ãã¼ + ã¿ãã¼ã¹ã§ã¯å©ç¨ã§ãã¾ããã追跡ã使ç¨ããã«ã¯ããã¼ãã«ã追跡 + ãµãã¼ãç¨ã«ä½æããå¿ è¦ãããã¾ããMySQLã®å ´åã + create/mysql/track.txtã使ç¨ãã¦ä¸ãããæ¤ç´¢å®è¡æã«ãããã³ã + ã¨ã³ãã¯ã¯ã¨ãªåèªãè¦ã¤ããããã¥ã¡ã³ãã®æ°ãã«ã¬ã³ãã®ç§åä½ + ã®UNIXã¿ã¤ã ã¹ã¿ã³ããä¿åããããã«ãããã®ãã¼ãã«ã使ç¨ãã¾ + ãã + å©ç¨å¯è½ãªå¤: UDM_TRACK_ENABLED, UDM_TRACK_DISABLED. </simpara> </listitem> <listitem> <simpara> - UDM_PARAM_LAST_DOC - ã«ã¬ã³ãã®ãã¼ã¸ã«è¡¨ç¤ºãããæå¾ã®ããã¥ã¡ - ã³ãã®æ°ã + UDM_PARAM_PHRASE_MODE - çèªãç¨ããã¤ã³ããã¯ã¹ãã¼ã¿ãã¼ã¹ã + ã©ãããå®ç¾©ãã¾ãã(indexer.confã«ããã"phrase" ãã©ã¡ã¼ã¿) + 使ç¨å¯è½ãªå¤: UDM_PHRASE_ENABLED ããã³ UDM_PHRASE_DISABLEDã + çèªæ¤ç´¢ãæå¹ãªå ´å(UDM_PHRASE_ENABLED)ã§ããå ¨ã¦ã®ã¢ã¼ã + (ANYãALLãBOOLãPHRASE)ã§æ¤ç´¢ãå¯è½ã§ãããã¨ã«æ³¨æãã¦ä¸ããã + mnoGoSearchã®ãã¼ã¸ã§ã³3.1.10ã§çèªæ¤ç´¢ãSQLã¨çµã¿è¾¼ã¿ãã¼ã¿ãã¼ + ã¹ã¢ã¼ãã§ã®ã¿ãµãã¼ãããã¾ããã䏿¹ã3.1.11ã§çèªãcachemode + ã§ããµãã¼ãããå§ãã¾ããã </simpara> - </listitem> - </itemizedlist> - </refsect1> - </refentry> - - <refentry id="function.udm-get-res-field"> - <refnamediv> - <refname>udm_get_res_field</refname> - <refpurpose>mnoGoSearch çµæãã£ã¼ã«ããåå¾ãã</refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <funcsynopsis> - <funcprototype> - <funcdef>string <function>udm_get_res_field</function></funcdef> - <paramdef>int <parameter>res</parameter></paramdef> - <paramdef>int <parameter>row</parameter></paramdef> - <paramdef>int <parameter>field</parameter></paramdef> - </funcprototype> - </funcsynopsis> - <para> - <function>udm_get_res_field</function> ã¯ãæåæã«çµæãã£ã¼ã«ãã - ã¨ã©ã¼æã«&false;ãè¿ãã¾ãã - </para> - <para> - <parameter>res</parameter> - <function>udm_find</function>ããè¿ - ãããçµæIDã¸ã®ãªã³ã¯ã - </para> - <para> - <parameter>row</parameter> - ã«ã¬ã³ããã¼ã¸ã®ãªã³ã¯çªå·ã0ãã - <parameter>UDM_PARAM_NUM_ROWS</parameter>ã¾ã§ã®çªå·ã - </para> - <para> - <parameter>field</parameter> - ãã£ã¼ã«ãIDãæ¬¡ã®å¤ã®ã©ããã - </para> - <itemizedlist> + <simpara> + çèªæ¤ç´¢ã®ä¾: + </simpara> + <simpara> + "Arizona desert" - ãã®ã¯ã¨ãªã¯ã"Arizona desert"ãçèªã¨ãã¦å« + ãå ¨ã¦ã®ããã¥ã¡ã³ããè¿ãã¾ããçèªã®åå¾ã«äºéå¼ç¨ç¬¦ãå¿ è¦ã§ + ãããã¨ã«æ³¨æãã¦ä¸ããã + </simpara> + </listitem> <listitem> <simpara> - UDM_FIELD_URL - ããã¥ã¡ã³ãURLãã£ã¼ã«ã + UDM_PARAM_CHARSET - ãã¼ã«ã«ãªcharsetãå®ç¾©ãã¾ããå©ç¨å¯è½ãªå¤: + mnoGoSearchã«ãããµãã¼ããããcharsetã®çµ, + ä¾ãã°ãkoi8-r, cp1251, ... </simpara> </listitem> <listitem> <simpara> - UDM_FIELD_CONTENT - ããã¥ã¡ã³ãContent-typeãã£ã¼ã«ã (ä¾ãã°ã - text/html) + UDM_PARAM_STOPFILE - stopfileã®ååã¨ãã¹ãå®ç¾©ãã¾ãã + (mnoGoSearchã¨è¥å¹²éããããã¾ããã¤ã¾ããmnoGoSearchã«ããã¦ã¯ã + ç¸å¯¾ãã¹ã¾ãã¯ãã¹ãå ¥åãããªãã£ãå ´åãUDM_CONF_DIRã«é¢ã㦠+ ãã®ãã¡ã¤ã«ãæ¢ããã¾ããã¢ã¸ã¥ã¼ã«ã¯ããã®ãã¡ã¤ã«ãã«ã¬ã³ã + ã®ãã¹(ããªãã¡ãPHPã¹ã¯ãªãããå®è¡ããããã¹)ã§æ¢ãã¾ãã </simpara> </listitem> <listitem> - <simpara> - UDM_FIELD_TITLE - ããã¥ã¡ã³ãã®titleãã£ã¼ã«ãã + <simpara> + UDM_PARAM_STOPTABLE - æå®ããSQLãã¼ãã«ãã忢åèªããã¼ãã + ã¾ããè¤æ°ã®StopwordTableã³ãã³ãã使ç¨å¯è½ã§ãããã®ã³ãã³ãã¯ã + SQLãã¼ã¿ãã¼ã¹ãµãã¼ããæå¹ã«ããã«ã³ã³ãã¤ã«ããå ´åã¯ä½¿ç¨ã§ + ãã¾ããã </simpara> </listitem> <listitem> <simpara> - UDM_FIELD_KEYWORDS - ããã¥ã¡ã³ãkeywordsãã£ã¼ã«ã(META - KEYWORDSã¿ã°ãã) + UDM_PARAM_WEIGHT_FACTOR - æå®ããããã¥ã¡ã³ãé¨åã®éã¿ä¿æ°ã + 表ãã¾ããç¾å¨ãbody, title, keywords, description, urlããµãã¼ + ãããã¦ãã¾ãããã®æ©è½ãæå¹ã«ããã«ã¯ãindexer.confã®*Weight + ã³ãã³ãã«2ã®ç´¯ä¹ãæå®ãã¦ä¸ãããããã§æ¬¡ã®ãããªéã¿ãæå®ã + ãå ´åãèãã¦ã¿ã¾ãããã + </simpara> + <literallayout> + URLWeight 1 + BodyWeight 2 + TitleWeight 4 + KeywordWeight 8 + DescWeight 16 + </literallayout> + <simpara> + åãããã¥ã¡ã³ãã«ããã¤ãã®åèªãè¤æ°åç¾ããå ´åã + indexerãåèªã®éã¿ã«ORæ¼ç®åã使ç¨ããã®ã§ãç°ãªã£ãããã¥ã¡ã³ + ãã®é¨åã«åèªãç¾ããåæ°ãæ¤åºå¯è½ã§ããããã£ã¼ã«ã®ã¿ç¾ãã + åèªã¯ã(2鲿¨è¨ã§)éã¿éå00000010ãæãã¾ããå ¨ã¦ã®ããã¥ã¡ã³ + ãé¨åã§ä½¿ç¨ãããåèªã¯ãéã¿éå 00011111 ãæãã¾ãã </simpara> - </listitem> - <listitem> <simpara> - UDM_FIELD_DESC - ããã¥ã¡ã³ãdescriptionãã£ã¼ã«ã (META - DESCRIPTIONã¿ã°ãã) + ãã®ãã©ã¡ã¼ã¿ã®å¤ã¯ã16鲿°æåå ABCDE ã§ããåæ¡ã¯ãåèªéã¿ + ã®å¯¾å¿ãããããã®å åã§ããä¸ã§æå®ããéã¿è¨å®ã¯æ¬¡ã®ããã«ãª + ãã¾ãã </simpara> - </listitem> - <listitem> + <literallayout> + E is a factor for weight 1 (URL Weight bit) + D is a factor for weight 2 (BodyWeight bit) + C is a factor for weight 4 (TitleWeight bit) + B is a factor for weight 8 (KeywordWeight bit) + A is a factor for weight 16 (DescWeight bit) + </literallayout> + <simpara> + ä¾: + </simpara> + <simpara> + UDM_PARAM_WEIGHT_FACTOR=00001 ã¯ãURLã®ã¿ãæ¤ç´¢ãã¾ãã + </simpara> + <simpara> + UDM_PARAM_WEIGHT_FACTOR=00100 ã¯ãTitleã®ã¿ãæ¤ç´¢ãã¾ãã + </simpara> <simpara> - UDM_FIELD_TEXT - ããã¥ã¡ã³ã body ããã¹ã (æåã®æ°è¡ã§ãã㥠- ã¡ã³ãã®å 容ã«é¢ããã¢ã¤ãã¢ã示ã)ã + UDM_PARAM_WEIGHT_FACTOR=11100 ã¯ãTitle,Keywords,Desctriptionã + æ¤ç´¢ãã¾ãããURL 㨠Bodyã¯æ¤ç´¢ãã¾ããã + </simpara> + <simpara> + UDM_PARAM_WEIGHT_FACTOR=F9421 ã¯ãæ¬¡ã®æ¤ç´¢ãè¡ãã¾ãã + </simpara> + <literallayout> + Description with factor 15 (F hex) + Keywords with factor 9 + Title with factor 4 + Body with factor 2 + URL with factor 1 + </literallayout> + <simpara> + UDM_PARAM_WEIGHT_FACTOR 夿°ãçç¥ãããå ´åãå ã®éã¿ã®å¤ã¯ã½ã¼ + ãçµæããå¼ãåºããã¾ããä¸è¨ã§æå®ããéã¿è¨å®ã®å ´åããã㥠+ ã¡ã³ãã®Descriptionã¯ãæå¤§éã¿16ãæããããã¥ã¡ã³ãã® + descriptionãæå³ãã¾ãã </simpara> </listitem> <listitem> <simpara> - UDM_FIELD_SIZE - ããã¥ã¡ã³ãã®ãµã¤ãºã + UDM_PARAM_WORD_MATCH - åèªã«ãããããã®ãã©ã¡ã¼ã¿ãåèªæ¤ç´¢å + ã鏿ããéã«ä½¿ç¨å¯è½ã§ãããã®æ©è½ã¯ã"single"ããã³"multi"ã¢ã¼ + ãã§SQLãã¼ã¿ãã¼ã¹ããã³çµã¿è¾¼ã¿ã®ãã¼ã¿ãã¼ã¹ã使ç¨ããå ´åã« + ã®ã¿åä½ãã¾ãããã®æ©è½ã¯ãcachemodeããã³ä»ã®ã¢ã¼ãã§ã¯åä½ã + ã¾ãããããã¯ããããã®ã¢ã¼ãããåèªCRCã使ç¨ãã¦ãããé¨åæ + ååæ¤ç´¢ããµãã¼ããã¦ããªãããã§ãã + å©ç¨å¯è½ãªå¤ã¯æ¬¡ã®ããã«ãªãã¾ãã </simpara> + <simpara>UDM_MATCH_BEGIN - åèªã®å§ãã«ããã</simpara> + <simpara>UDM_MATCH_END - åèªã®çµãã«ããã</simpara> + <simpara>UDM_MATCH_WORD - åèªå ¨ä½ã«ããã</simpara> + <simpara>UDM_MATCH_SUBSTR - åèªã®é¨åæååã«ããã</simpara> </listitem> <listitem> <simpara> - UDM_FIELD_URLID - ãªã³ã¯ã¸ã®ã¦ãã¼ã¯ãªURL IDã + UDM_PARAM_MIN_WORD_LEN - åèªã®æçé·ãå®ç¾©ãã¾ãã + ãã®å¶éããçãåèªã¯ãstopwordã¨ã¿ãªããã¾ãããã®ãã©ã¡ã¼ã¿ + ã¯ãã®å¤èªèº«ãç¯å²ã«å«ããã¨ã«æ³¨æãã¦ä¸ãããã¤ã¾ãã + UDM_PARAM_MIN_WORD_LEN=3 ã®å ´åã3æåã®é·ãã®åèªã¯stopword㨠+ è¦ãªããã¾ãããã2æåã®åèªã¯stopwordã¨ã¿ãªããã¾ããããã©ã« + ãã¯1ã§ãã </simpara> - </listitem> + </listitem> <listitem> <simpara> - UDM_FIELD_RATING - (mnoGoSearchã§è¨ç®ããã)ãã¼ã¸ã®ã¬ã¼ãã£ã³ - ã°ã + UDM_PARAM_ISPELL_PREFIXES - Possible values: UDM_PREFIXES_ENABLED and + UDM_PREFIXES_DISABLED, that respectively enable or disable using prefixes. + E.g. if a word "tested" is in search query, also words like "test", + "testing", etc. Only suffixes are supported by default. Prefixes usually + change word meanings, for example if somebody is searching for the word "tested" + one hardly wants "untested" to be found. Prefixes support may also be + found useful for site's spelling checking purposes. In order to enable + ispell, you have to load ispell data with + <function>udm_load_ispell_data</function>. </simpara> </listitem> <listitem> <simpara> - UDM_FIELD_MODIFIED - unixtimeå½¢å¼ã®last-modifiedãã£ã¼ã«ãã + UDM_PARAM_CROSS_WORDS - enables or disables crosswords support. + Possible values: UDM_CROSS_WORDS_ENABLED and UDM_CROSS_WORDS_DISABLED. + </simpara> + <simpara> + The corsswords feature allows to assign words between <a + href="xxx"> and </a> also to a document this link + leads to. It works in SQL database mode and is not supported in + built-in database and Cachemode. </simpara> + <note> + <simpara> + Crosswords are supported only in mnoGoSearch 3.1.11 or later. + </simpara> + </note> </listitem> <listitem> <simpara> - UDM_FIELD_ORDER - è¦ã¤ãã£ãããã¥ã¡ã³ãã®ä¸ã®ã«ã¬ã³ãã®ãã㥠- ã¡ã³ãã®æ° + UDM_PARAM_VARDIR - specifies a custom path to directory where indexer + stores data when using built-in database and in cache mode. + By default <literal>/var</literal> directory of + <application>mnoGoSearch</application> installation is used. Can have + only string values. The parameter is available in PHP 4.1.0 or later. </simpara> </listitem> <listitem> <simpara> - UDM_FIELD_CRC - ããã¥ã¡ã³ãCRCã + UDM_PARAM_VARDIR - specifies a custom path to directory where indexer + stores data when using built-in database and in cache mode. + By default <literal>/var</literal> directory of + <application>mnoGoSearch</application> installation is used. Can have + only string values. The parameter is available in PHP 4.1.0 or later. </simpara> </listitem> </itemizedlist> - </refsect1> + </refsect1> </refentry> - - <refentry id="function.udm-free-res"> + + <refentry id='function.udm-check-charset'> <refnamediv> - <refname>udm_free_res</refname> - <refpurpose>mnoGoSearch çµæãéæ¾ãã</refpurpose> + <refname>udm_check_charset</refname> + <refpurpose> + æå®ããcharsetãmnogosearchã§èªèããããã©ãã調ã¹ã + </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>udm_free_res</function></funcdef> - <paramdef>int <parameter>res</parameter></paramdef> + <funcdef>int <function>udm_check_charset</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>string <parameter>charset</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>udm_free_res</function> ã¯æåæã« - &true;ãã¨ã©ã¼æã«&false;ãè¿ã - ã¾ãã - </para> - <para> - <parameter>res</parameter> - <function>udm_find</function>ããè¿ - ãããçµæIDã¸ã®ãªã³ã¯ã + &warn.undocumented.func; </para> + </refsect1> + </refentry> + + <refentry id='function.udm-check-stored'> + <refnamediv> + <refname>udm_check_stored</refname> + <refpurpose> + ä¿åãããæ¥ç¶ã調ã¹ã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>udm_check_stored</function></funcdef> + <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>int <parameter>link</parameter></paramdef> + <paramdef>string <parameter>doc_id</parameter></paramdef> + </funcprototype> + </funcsynopsis> <para> - çµæç¨ã«ç¢ºä¿ãããã¡ã¢ãªãéæ¾ãã¾ãã + &warn.undocumented.func; </para> </refsect1> </refentry> - <refentry id="function.udm-free-agent"> + <refentry id='function.udm-close-stored'> <refnamediv> - <refname>udm_free_agent</refname> - <refpurpose>mnoGoSearch ã»ãã·ã§ã³ãéæ¾ãã</refpurpose> + <refname>udm_close_stored</refname> + <refpurpose> + ä¿åããæ¥ç¶ãéãã + </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>udm_free_agent</function></funcdef> + <funcdef>int <function>udm_close_stored</function></funcdef> <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>int <parameter>link</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>udm_free_agent</function> ã¯æåæã« - &true;ãã¨ã©ã¼æã«&false;ãè¿ã - ã¾ãã - </para> - <para> - <parameter>agent</parameter> - - <function>udm_alloc_agent</function>ããè¿ãããã¨ã¼ã¸ã§ã³ãID㸠- ã®ãªã³ã¯ã - </para> - <para> - ã¨ã¼ã¸ã§ã³ãã»ãã·ã§ã³ç¨ã«ç¢ºä¿ãããã¡ã¢ãªãéæ¾ãã¾ãã + &warn.undocumented.func; </para> </refsect1> </refentry> - <refentry id="function.udm-errno"> + <refentry id='function.udm-crc32'> <refnamediv> - <refname>udm_errno</refname> - <refpurpose>mnoGoSearch ã¨ã©ã¼çªå·ãåå¾ãã</refpurpose> + <refname>udm_crc32</refname> + <refpurpose> + æå®ããæååã®CRC32ãã§ãã¯ãµã ãè¨ç®ãã + </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>udm_errno</function></funcdef> + <funcdef>int <function>udm_crc32</function></funcdef> <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>string <parameter>str</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>udm_errno</function> ã¯ãmnoGoSearch ã¨ã©ã¼çªå·ãè¿ãã¾ - ããã¨ã©ã¼ããªãå ´åã«ã¼ããè¿ãã¾ãã - </para> - <para> - <parameter>agent</parameter> - - <function>udm_alloc_agent</function>ã¸ã®ã³ã¼ã«ããè¿ãããã¨ã¼ã¸ã§ - ã³ãIDã¸ã®ãªã³ã¯ - </para> - <para> - æ°åã§ã¨ã¼ã¸ã§ã³ãã¨ã©ã¼ã³ã¼ããè¿ãã¾ãã + &warn.undocumented.func; </para> </refsect1> </refentry> - <refentry id="function.udm-error"> + <refentry id='function.udm-open-stored'> <refnamediv> - <refname>udm_error</refname> - <refpurpose>mnoGoSearch ã¨ã©ã¼ã¡ãã»ã¼ã¸ãå¾ã</refpurpose> + <refname>udm_open_stored</refname> + <refpurpose> + ä¿åããæ¥ç¶ããªã¼ãã³ãã + </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>string <function>udm_error</function></funcdef> + <funcdef>int <function>udm_open_stored</function></funcdef> <paramdef>int <parameter>agent</parameter></paramdef> + <paramdef>string <parameter>storedaddr</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - <function>udm_error</function> ã¯ãmnoGoSearch ã¨ã©ã¼ã¡ãã»ã¼ã¸ã - è¿ãã¾ããã¨ã©ã¼ããªãå ´åã«ã¯ãç©ºã®æååãè¿ãã¾ãã - </para> - <para> - <parameter>agent</parameter> ã¯ãã¨ã¼ã¸ã§ã³ãIDã¸ã®ãªã³ã¯ã§ããã - <function>udm_alloc_agent</function>ãã³ã¼ã«ããéã«å¾ããããã® - ã§ãã - </para> - <para> - ã¨ã¼ã¸ã§ã³ãã¨ã©ã¼ã¡ãã»ã¼ã¸ãå¾ã¾ãã + &warn.undocumented.func; </para> </refsect1> </refentry> + </reference> + <!-- Keep this comment at the end of the file Local variables: Index: phpdoc/ja/functions/msql.xml diff -u phpdoc/ja/functions/msql.xml:1.11 phpdoc/ja/functions/msql.xml:1.12 --- phpdoc/ja/functions/msql.xml:1.11 Wed Dec 12 15:53:22 2001 +++ phpdoc/ja/functions/msql.xml Sat Jan 26 03:55:51 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> - +<!-- $Revision: 1.12 $ --> <reference id="ref.msql"> <title>mSQL 颿°</title> <titleabbrev>mSQL</titleabbrev> @@ -119,7 +119,18 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_connect</function></funcdef> - <paramdef>string <parameter>host_name</parameter></paramdef> + <paramdef>string + <parameter><optional>hostname</optional></parameter> + </paramdef> + <paramdef>string + <parameter><optional>server</optional></parameter> + </paramdef> + <paramdef>string + <parameter><optional>username</optional></parameter> + </paramdef> + <paramdef>string + <parameter><optional>password</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> @@ -127,9 +138,10 @@ &false;ãè¿ãã¾ãã </para> <para> - <function>msql_connect</function>㯠mSQL ãµã¼ãã¼ã¸ã®æ¥ç¶ã確ç«ãã¾ãã - 弿°host_name ã¯ãªãã·ã§ã³ã§ããããæå®ãããªãå ´åã - localhostãæå®ãããã¨ä»®å®ãã¾ãã + <function>msql_connect</function>㯠mSQL ãµã¼ãã¼ã¸ã®æ¥ç¶ã確ç«ã + ã¾ãããã©ã¡ã¼ã¿<parameter>server</parameter>ã«ã¯ã + "hostname:port"ã®ããã«ãã¼ãçªå·ãå«ãããã¨ãå¯è½ã§ãã + ããã©ã«ãã¯ã'localhost'ã§ãã </para> <para> åã弿°ã§<function>msql_connect</function>ãå度ã³ã¼ã«ãããå ´åã @@ -215,7 +227,7 @@ </funcprototype> </funcsynopsis> <para> - æåã®å ´åã«&true;ã失æã®å ´åã«&false;ãè¿ãã¾ãã + &return.success; </para> <para> <function>msql_data_seek</function> ã¯ãæå®ããã¯ã¨ãªã¼ID @@ -240,7 +252,7 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>msql_dbname</function></funcdef> - <paramdef>string <parameter>query_identifier</parameter></paramdef> + <paramdef>int <parameter>query_identifier</parameter></paramdef> <paramdef>int <parameter>i</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -264,12 +276,12 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_drop_db</function></funcdef> - <paramdef>string <parameter>ãã¼ã¿ãã¼ã¹å</parameter></paramdef> + <paramdef>string <parameter>database_name</parameter></paramdef> <paramdef>int <parameter>link_identifier</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - æåæã«&true;ã失æããå ´åã«&false;ãè¿ãã¾ãã + &return.success; </para> <para> <function>msql_drop_db</function>ã¯ãæå®ãããªã³ã¯IDãæã @@ -306,13 +318,17 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>msql_error</function></funcdef> - <paramdef> <parameter></parameter></paramdef> + <paramdef>int + <parameter> + <replaceable><optional>link_identifier</optional></replaceable> + </parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> - mSQL ãã¼ã¿ãã¼ã¹ã®ããã¯ã¨ã³ãããã¨ã©ã¼ãè¿ããã¦ãã - ãã¯ãè¦åãçºãã¾ããã - ã¨ã©ã¼æååãåãåºãããã«ã¯ãæ¿ããã«ãããã®é¢æ°ã使ç¨ãã¦ãã ããã + mSQL ãã¼ã¿ãã¼ã¹ã®ããã¯ã¨ã³ãããè¿ãããã¨ã©ã¼ã¯ãç¾å¨ã§ã¯ã㯠+ ãè¦åã¨ãã¦åºåããã¾ãããã¨ã©ã¼æååãåãåºãããã«ã¯ãæ¿ã + ãã«ãããã®é¢æ°ã使ç¨ãã¦ãã ããã </para> </refsect1> </refentry> @@ -395,26 +411,44 @@ <para> ãªãã¸ã§ã¯ãã®ããããã£ã¯ã次ã®ããã«ãªãã¾ãã <itemizedlist> - <listitem><simpara>name - ã«ã©ã å</simpara></listitem> - <listitem><simpara>table - ã«ã©ã ãå±ãããã¼ãã«ã®åå - </simpara></listitem> - <listitem><simpara>not_null - ãã®ã«ã©ã ããã«ã«ãªããã¨ãã§ããªãå ´åã« - 1 ã¨ããã - </simpara></listitem> - <listitem><simpara>primary_key - ãã®ã«ã©ã ããã©ã¤ããªãã¼ - ã§ããå ´åã« 1 - </simpara></listitem> - <listitem><simpara>unique - ãã®ã«ã©ã ãã¦ãã¼ã¯ãã¼ã§ãã - å ´åã« 1</simpara></listitem> - <listitem><simpara>type - ã«ã©ã ã®å</simpara></listitem> - </itemizedlist></para> + <listitem> + <simpara> + name - ã«ã©ã å + </simpara> + </listitem> + <listitem> + <simpara> + table - ã«ã©ã ãå±ãããã¼ãã«ã®åå + </simpara> + </listitem> + <listitem> + <simpara> + not_null - ãã®ã«ã©ã ããã«ã«ãªããã¨ãã§ããªãå ´åã«1ã¨ããã + </simpara> + </listitem> + <listitem> + <simpara> + primary_key - ãã®ã«ã©ã ããã©ã¤ããªãã¼ã§ããå ´åã«1 + </simpara> + </listitem> + <listitem> + <simpara> + unique - ãã®ã«ã©ã ãã¦ãã¼ã¯ãã¼ã§ããå ´åã«1 + </simpara> + </listitem> + <listitem> + <simpara> + type - ã«ã©ã ã®å + </simpara> + </listitem> + </itemizedlist> + </para> <para> <function>msql_field_seek</function> ãåç §ä¸ããã </para> </refsect1> </refentry> - <refentry id="function.msql-fetch-object"> <refnamediv> <refname>msql_fetch_object</refname> @@ -434,16 +468,15 @@ </funcprototype> </funcsynopsis> <para> - å¾ãè¡ã«å¯¾å¿ããããããã£ãæãããªãã¸ã§ã¯ããè¿ãã¾ãã - ããè¡ããªãå ´åã«ã¯ã&false;ãè¿ãã¾ãã + å¾ãè¡ã«å¯¾å¿ããããããã£ãæãããªãã¸ã§ã¯ããè¿ãã¾ããããè¡ + ããªãå ´åã«ã¯ã&false;ãè¿ãã¾ãã </para> <para> - <function>msql_fetch_object</function> ã¯ã<function>msql_fetch_array - </function> - ã«ä¼¼ã¦ãã¾ãããé åã®ä»£ããã«ãªãã¸ã§ã¯ããè¿ãã¨ããã ãã - ç°ãªã£ã¦ãã¾ãã - 鿥çã«ã¨ããã®ã¯ããªãã»ããå¤ã«ãã£ã¦ã§ã¯ãªããã£ã¼ã«ãåã«ãã£ã¦ã®ã¿ - ãã¼ã¿ãã¢ã¯ã»ã¹ãããã¨ãã§ãããã¨ãæå³ãã¦ãã¾ãã + <function>msql_fetch_object</function> ã¯ã + <function>msql_fetch_array</function>ã«ä¼¼ã¦ãã¾ãããé åã®ä»£ãã + ã«ãªãã¸ã§ã¯ããè¿ãã¨ããã ããç°ãªã£ã¦ãã¾ãã鿥çã«ã¨ããã® + ã¯ããªãã»ããå¤ã«ãã£ã¦ã§ã¯ãªããã£ã¼ã«ãåã«ãã£ã¦ã®ã¿ãã¼ã¿ã + ã¢ã¯ã»ã¹ãããã¨ãã§ãããã¨ãæå³ãã¦ãã¾ãã (æ°åã¯ãããããã£åã¨ãã¦ä½¿ç¨ã§ãã¾ããã) </para> <para> @@ -577,7 +610,7 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>msql_fieldtype</function></funcdef> - <paramdef>string <parameter>query_identifier</parameter></paramdef> + <paramdef>int <parameter>query_identifier</parameter></paramdef> <paramdef>int <parameter>i</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -600,7 +633,7 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>msql_fieldflags</function></funcdef> - <paramdef>string <parameter>query_identifier</parameter></paramdef> + <paramdef>int <parameter>query_identifier</parameter></paramdef> <paramdef>int <parameter>i</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -623,7 +656,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_fieldlen</function></funcdef> - <paramdef>string <parameter>query_identifier</parameter></paramdef> + <paramdef>int <parameter>query_identifier</parameter></paramdef> <paramdef>int <parameter>i</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -681,8 +714,8 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_list_fields</function></funcdef> - <paramdef>string <parameter>dãã¼ã¿ãã¼ã¹</parameter></paramdef> - <paramdef>string <parameter>ãã¼ãã«å</parameter></paramdef> + <paramdef>string <parameter>database</parameter></paramdef> + <paramdef>string <parameter>tablename</parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -832,7 +865,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_num_rows</function></funcdef> - <paramdef>string <parameter>query_identifier</parameter></paramdef> + <paramdef>int <parameter>query_identifier</parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -865,7 +898,6 @@ </refsect1> </refentry> - <refentry id="function.msql-numrows"> <refnamediv> <refname>msql_numrows</refname> @@ -896,7 +928,15 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_pconnect</function></funcdef> - <paramdef>string <parameter>ãã¹ãå</parameter></paramdef> + <paramdef>string + <parameter><optional>server</optional></parameter> + </paramdef> + <paramdef>string + <parameter><optional>username</optional></parameter> + </paramdef> + <paramdef>string + <parameter><optional>password</optional></parameter> + </paramdef> </funcprototype> </funcsynopsis> <para> @@ -908,20 +948,20 @@ <function>msql_connect</function> ã¨å ¨ãåæ§ã«åä½ãã¾ãã </para> <para> - 1çªç®ã®å·®ç°ã¯ããã®é¢æ°ã¯æ¥ç¶ããéã«åããã¹ãã«ãã㦠- ãã§ã«ç¢ºç«ããã(æç¶çãª)ãªã³ã¯ãè¦ã¤ãããã¨ãããã¨ã§ãã - ãããããªã³ã¯ãè¦ã¤ãã£ãå ´åãæ°ããªæ¥ç¶ãéã代ããã« - ãã®ãªã³ã¯ã¸ã®IDãè¿ããã¾ãã + 1çªç®ã®å·®ç°ã¯ããã®é¢æ°ã¯æ¥ç¶ããéã«åããã¹ãã«ããã¦ãã§ã«ç¢ºç« + ããã(æç¶çãª)ãªã³ã¯ãè¦ã¤ãããã¨ãããã¨ã§ãããããããªã³ã¯ + ãè¦ã¤ãã£ãå ´åãæ°ããªæ¥ç¶ãéã代ããã«ãã®ãªã³ã¯ã¸ã®IDãè¿ã + ãã¾ãã </para> <para> - 2 çªç®ã¯ãã¹ã¯ãªããã®å®è¡çµäºæã« SQL ãµã¼ãã¼ã¸ã®æ¥ç¶ã - éããããªãã¨ãããã¨ã§ãã - 代ããã«ããªã³ã¯ã¯ã次ã«ä½¿ç¨ããããã«éãããã¾ã¾ã«ããã¾ãã - (<function>msql_close</function> ã¯ã<function>msql_pconnect</function> - ã«ãã確ç«ããããªã³ã¯ãéãã¾ãã) + 2çªç®ã¯ãã¹ã¯ãªããã®å®è¡çµäºæã«SQLãµã¼ãã¼ã¸ã®æ¥ç¶ãéããã㪠+ ãã¨ãããã¨ã§ãã代ããã«ããªã³ã¯ã¯ã次ã«ä½¿ç¨ããããã«éããã + ã¾ã¾ã«ããã¾ãã(<function>msql_close</function> ã¯ã + <function>msql_pconnect</function>ã«ãã確ç«ããããªã³ã¯ãéãã¾ + ãã) </para> <para> - ãã®ããããã®åã®ãªã³ã¯ã¯ã'æç¶ç' ã§ããã¨å¼ã°ãã¾ãã + ãã®ããããã®åã®ãªã³ã¯ã¯ã'æç¶ç' ã§ããã¨å¼ã°ãã¾ãã </para> </refsect1> </refentry> @@ -936,7 +976,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_query</function></funcdef> - <paramdef>string <parameter>ã¯ã¨ãªã¼</parameter></paramdef> + <paramdef>string <parameter>query</parameter></paramdef> <paramdef>int <parameter>link_identifier</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -953,6 +993,28 @@ æåããå ´åã«æ£ã®mSQL ã¯ã¨ãªã¼IDãè¿ãã¾ããã¨ã©ã¼ã®å ´åã«&false; ãè¿ãã¾ãã </para> + <example> + <title><function>msql_query</function></title> + <programlisting role="php"> +<![CDATA[ +<?php +$link = msql_connect("dbserver") + or die("unable to connect to msql server: ".msql_error()); +msql_select_db("db", $link) + or die("unable to select database 'db': ".msql_error()); + +$result = msql_query("SELECT * FROM table WHERE id=1", $link); +if (!$result) { + die("query failed: ".msql_error()); +} + +while ($row = msql_fetch_array($result)) { + echo $row["id"]; +} +?> +]]> + </programlisting> + </example> <para> <function>msql</function>ã <function>msql_select_db</function>ã @@ -961,12 +1023,12 @@ </refsect1> </refentry> - <refentry id="function.msql-regcase"> <refnamediv> <refname>msql_regcase</refname> - <refpurpose>大æåå°æåãåºå¥ããªããããã³ã°ç¨ã«æ£è¦è¡¨ç¾ - ã使ãã¾ã</refpurpose> + <refpurpose> + 大æåå°æåãåºå¥ããªããããã³ã°ç¨ã«æ£è¦è¡¨ç¾ã使ãã¾ã + </refpurpose> </refnamediv> <refsect1> <title>説æ</title> @@ -1032,7 +1094,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>msql_select_db</function></funcdef> - <paramdef>string <parameter>ãã¼ã¿ãã¼ã¹å</parameter></paramdef> + <paramdef>string <parameter>database_name</parameter></paramdef> <paramdef>int <parameter>link_identifier</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1073,7 +1135,6 @@ </refsect1> </refentry> - <refentry id="function.msql-tablename"> <refnamediv> <refname>msql_tablename</refname> @@ -1085,7 +1146,7 @@ <funcprototype> <funcdef>string <function>msql_tablename</function></funcdef> <paramdef>int <parameter>query_identifier</parameter></paramdef> - <paramdef>int <parameter>ãã£ã¼ã«ã</parameter></paramdef> + <paramdef>int <parameter>field</parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -1097,22 +1158,23 @@ <example> <title><function>msql_tablename</function>ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php msql_connect ("localhost"); -$result = msql_list_tables("wisconsin"); +$result = msql_list_tables ("wisconsin"); $i = 0; -while ($i < msql_numrows($result)) { - $tb_names[$i] = msql_tablename($result, $i); - echo $tb_names[$i] . "<BR>"; +while ($i < msql_numrows ($result)) { + $tb_names[$i] = msql_tablename ($result, $i); + echo $tb_names[$i] . "<BR>"; $i++; } ?> -</programlisting> +]]> + </programlisting> </example> </para> </refsect1> </refentry> - </reference> Index: phpdoc/ja/functions/mssql.xml diff -u phpdoc/ja/functions/mssql.xml:1.9 phpdoc/ja/functions/mssql.xml:1.10 --- phpdoc/ja/functions/mssql.xml:1.9 Wed Dec 12 15:53:23 2001 +++ phpdoc/ja/functions/mssql.xml Sat Jan 26 03:55:51 2002 @@ -1,7 +1,28 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.10 $ --> <reference id="ref.mssql"> <title>MS SQL ãµã¼ãã¼é¢æ°</title> <titleabbrev>MS SQL ãµã¼ãã¼</titleabbrev> + <partintro> + <simpara> + MSSQLæ¡å¼µã¢ã¸ã¥ã¼ã«ã¯ãWin32ã·ã¹ãã ã§ã®ã¿å©ç¨å¯è½ã§ããä»ã®ãã©ã + ããã©ã¼ã ããMSSQLãã¼ã¿ãã¼ã¹ã«æ¥ç¶ããã«ã¯ãSybaseæ¡å¼µã¢ã¸ã¥ã¼ + ã«ã使ç¨ãããã¨ãå¯è½ã§ãã + </simpara> + <simpara> + ãããã®é¢æ°ã§ã¯ãMS SQLãµã¼ããã¼ã¿ãã¼ã¹ã使ç¨å¯è½ã§ãããã®æ¡å¼µ + ã¢ã¸ã¥ã¼ã«ã¯ãPHPãã¤ã³ã¹ãã¼ã«ããã¦ããã·ã¹ãã ã«MS SQLã¯ã©ã¤ã¢ + ã³ããã¼ã«ã®ã¤ã³ã¹ãã¼ã«ãè¦ãã¾ããã¯ã©ã¤ã¢ã³ããã¼ã«ã¯ã + MS SQL Server CDã¾ãã¯\winnt\system32ããntwdblib.dllãPHPã·ã¹ãã + ã®\winnt\system32ã«ã³ãã¼ãããã¨ã«ããã¤ã³ã¹ãã¼ã«å¯è½ã§ãã + ntwdblib.dllã®ã³ãã¼ã§ã¯ã¢ã¯ã»ã¹ã®ã¿ãå¯è½ã§ããã¯ã©ã¤ã¢ã³ãã®è¨å® + ã¯ãå ¨ã¦ã®ãã¼ã«ã®ã¤ã³ã¹ãã¼ã«ãå¿ è¦ã§ãã + </simpara> + <simpara> + MSSQLæ¡å¼µã¢ã¸ã¥ã¼ã«ã¯ãextension=php_mssql.dllãphp.iniã«è¿½å ãã + ãã¨ã«ãããå©ç¨å¯è½ã¨ãªãã¾ãã + </simpara> + </partintro> <refentry id="function.mssql-close"> <refnamediv> @@ -30,9 +51,8 @@ ä»®å®ãã¾ãã </para> <para> - - æç¶çã§ãªããªã³ã¯ã¯ã¹ã¯ãªããå®è¡çµäºæã«èªåçã«éããããã®ã§ - ãã®é¢æ°ã¯é常ã¯å¿ è¦ã§ã¯ããã¾ããã + æç¶çã§ãªããªã³ã¯ã¯ã¹ã¯ãªããå®è¡çµäºæã«èªåçã«éããããã®ã§ + ãã®é¢æ°ã¯é常ã¯å¿ è¦ã§ã¯ããã¾ããã </para> <para> <function>mssql_close</function>ã¯<function>mssql_pconnect</function> @@ -151,8 +171,8 @@ 強調ãã¦ããã¾ãã </para> <para> - æ´ã«è©³ç´°ãªæ å ±ã«é¢ãã¦ã¯ã - <function>mssql_fetch_row</function> ãåç §ä¸ããã + æ´ã«è©³ç´°ãªæ å ±ã«é¢ãã¦ã¯ã<function>mssql_fetch_row</function> ã + åç §ä¸ããã </para> </refsect1> </refentry> @@ -186,33 +206,31 @@ ãã£ã¼ã«ããåå¾ããã¾ãã </para> <para> - ãªãã¸ã§ã¯ãã®ããããã£ã¯ã次ã®ããã«ãªãã¾ãã + ãªãã¸ã§ã¯ãã®ããããã£ã¯ã次ã®ããã«ãªãã¾ãã </para> - - <itemizedlist> - <listitem> - <simpara> - name - ã«ã©ã åãã«ã©ã ã颿°ã®çµæã§ããå ´åããã®ããããã£ã¯ - computed#N ã«è¨å®ããã¾ãããã ãã#N ã¯ã·ãªã¢ã«çªå·ã§ãã - </simpara> - </listitem> - <listitem> - <simpara> - column_source - ãã®ã«ã©ã ãåå¾ããããã¼ãã« - </simpara> - </listitem> - <listitem> - <simpara> - max_length - ã«ã©ã ã®æå¤§é· - </simpara> - </listitem> - <listitem> - <simpara> - numeric - ãã®ã«ã©ã ãæ°åã§ããå ´åã« 1 - </simpara> - </listitem> - </itemizedlist> - + <itemizedlist> + <listitem> + <simpara> + name - ã«ã©ã åãã«ã©ã ã颿°ã®çµæã§ããå ´åããã®ããããã£ã¯ + computed#N ã«è¨å®ããã¾ãããã ãã#N ã¯ã·ãªã¢ã«çªå·ã§ãã + </simpara> + </listitem> + <listitem> + <simpara> + column_source - ãã®ã«ã©ã ãåå¾ããããã¼ãã« + </simpara> + </listitem> + <listitem> + <simpara> + max_length - ã«ã©ã ã®æå¤§é· + </simpara> + </listitem> + <listitem> + <simpara> + numeric - ãã®ã«ã©ã ãæ°åã§ããå ´åã« 1 + </simpara> + </listitem> + </itemizedlist> <para> <function>mssql_field_seek</function> ãåç §ä¸ããã </para> @@ -278,15 +296,15 @@ é åãªãã»ããã«ä¿åãããåçµæã«ã©ã ã¯ããªãã»ãã 0 ããå§ã¾ãã¾ãã </para> <para> - <function>mssql_fetch_rows</function>ãç¶ãã¦ã³ã¼ã«ããå ´åã - çµæã»ããã®æ¬¡ã®è¡ãè¿ãããè¡ããããªãå ´å㯠&false; ãè¿ããã¾ãã + <function>mssql_fetch_rows</function>ãç¶ãã¦ã³ã¼ã«ããå ´åã + çµæã»ããã®æ¬¡ã®è¡ãè¿ãããè¡ããããªãå ´å㯠&false; ãè¿ããã¾ãã </para> <para> <function>mssql_fetch_array</function>, - <function>mssql_fetch_object</function>, - <function>mssql_data_seek</function>, - <function>mssql_fetch_lengths</function>, - <function>mssql_result</function> ãåç §ä¸ããã + <function>mssql_fetch_object</function>, + <function>mssql_data_seek</function>, + <function>mssql_fetch_lengths</function>, + <function>mssql_result</function> ãåç §ä¸ããã </para> </refsect1> </refentry> @@ -309,6 +327,9 @@ </paramdef> </funcprototype> </funcsynopsis> + <para> + &warn.undocumented.func; + </para> </refsect1> </refentry> @@ -417,7 +438,7 @@ <funcdef>string <function>mssql_get_last_message</function> </funcdef> - <paramdef>void <parameter></parameter></paramdef> + <void/> </funcprototype> </funcsynopsis> </refsect1> @@ -459,6 +480,52 @@ </refsect1> </refentry> + <refentry id="function.mssql-next-result"> + <refnamediv> + <refname>mssql_next_result</refname> + <refpurpose>次ã®çµæã«å é¨çµæãã¤ã³ã¿ãç§»åãã</refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>bool + <function>mssql_next_result</function> + </funcdef> + <paramdef>int <parameter>result_id</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + ãµã¼ãã¸è¤æ°ã®SQLå½ä»¤ãéä¿¡ãããè¤æ°ã®çµæãæããã¹ãã¢ãããã·ã¼ + ã¸ã£ãå®è¡ããå ´åããã®é¢æ°ã¯ãµã¼ããè¤æ°ã®çµæéåãè¿ãããã« + ãã¾ãããã®é¢æ°ã¯ããµã¼ããã追å ã®çµæãåå¨ãããã©ããã調㹠+ ã¾ãã追å ã®çµæéåãåå¨ããå ´åãæ¢åã®çµæéåãè§£æ¾ããæ°ã + ãçµæéåããè¡ãåå¾ããããã®æºåãè¡ãã¾ãããã®é¢æ°ã¯ã追å + ã®çµæéåãåå¾å¯è½ãªå ´åã«&true;ããã®ä»ã®å ´åã«&false;ãè¿ãã¾ + ãã + </para> + <example> + <title><function>mssql_next_result</function>ã®ä¾</title> + <programlisting role="php"> +<![CDATA[ +<?php + $link = mssql_connect ("localhost", "userid", "secret"); + mssql_select_db("MyDB", $link); + $SQL = "Select * from table1 select * from table2"; + $rs = mssql_query($SQL, $link); + do { + while ($row = mssql_fetch_row($rs)) { + } + } while (mssql_next_result($rs)); + mssql_free_result($rs); + mssql_close ($link); +?> +]]> + </programlisting> + </example> + </refsect1> + </refentry> + <refentry id="function.mssql-num-fields"> <refnamediv> <refname>mssql_num_fields</refname> @@ -473,7 +540,7 @@ </funcprototype> </funcsynopsis> <para> - <function>mssql_num_fields</function>ã¯çµæã®ãã£ã¼ã«ãæ°ãè¿ãã¾ãã + <function>mssql_num_fields</function>ã¯çµæã®ãã£ã¼ã«ãæ°ãè¿ãã¾ãã </para> <para> <function>mssql_db_query</function>, @@ -624,13 +691,12 @@ ã使ç¨ããã¾ãã </para> <para> - 大éã®çµæãå¦çããå ´åã(以ä¸ã«ç¤ºã)è¡å ¨ä½ãåå¾ãã颿°ã®ã©ããã - 使ç¨ãããã¨ãèããå¿ è¦ãããã¾ãã - ãããã®é¢æ°ã¯ä¸åã®é¢æ°ã³ã¼ã«ã§è¤æ°ã®ã»ã«ã®å 容ãè¿ãã®ã§ã - <function>mssql_result</function>ãããããªãé«éã§ãã - ã¾ããfield 弿°ã§ãªãã»ããçªå·ãæå®ããæ¹ãã - ãã£ã¼ã«ãåã¾ãã¯ãã¼ãã«å.ãã£ã¼ã«ãåã§å¼æ°ã§æå®ããããã - ããªãé«éã§ãã + 大éã®çµæãå¦çããå ´åã(以ä¸ã«ç¤ºã)è¡å ¨ä½ãåå¾ãã颿°ã®ã©ã + ãã使ç¨ãããã¨ãèããå¿ è¦ãããã¾ãããããã®é¢æ°ã¯ä¸åã®é¢æ° + ã³ã¼ã«ã§è¤æ°ã®ã»ã«ã®å 容ãè¿ãã®ã§ã + <function>mssql_result</function>ãããããªãé«éã§ããã¾ãã + field 弿°ã§ãªãã»ããçªå·ãæå®ããæ¹ãããã£ã¼ã«ãåã¾ãã¯ãã¼ + ãã«å.ãã£ã¼ã«ãåã§å¼æ°ã§æå®ãããããããªãé«éã§ãã </para> <para> æ¨å¥¨ããã髿§è½ãªä»£æ¿é¢æ°: @@ -678,6 +744,176 @@ <function>mssql_connect</function>, <function>mssql_pconnect</function>, <function>mssql_query</function> ãåç §ä¸ããã + </para> + </refsect1> + </refentry> + + <refentry id='function.mssql-bind'> + <refnamediv> + <refname>mssql_bind</refname> + <refpurpose> + ã¹ãã¢ãããã·ã¼ã¸ã£ã¾ãã¯ãªã¢ã¼ãã¹ãã¢ãããã·ã¼ã¸ã£ã¸ãã©ã¡ã¼ + ã¿ã追å ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>mssql_bind</function></funcdef> + <paramdef>int <parameter>stmt</parameter></paramdef> + <paramdef>string <parameter>param_name</parameter></paramdef> + <paramdef>mixed <parameter>var</parameter></paramdef> + <paramdef>int <parameter>type</parameter></paramdef> + <paramdef>int + <parameter><optional>is_output</optional></parameter> + </paramdef> + <paramdef>int + <parameter><optional>is_null</optional></parameter> + </paramdef> + <paramdef>int + <parameter><optional>maxlen</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.mssql-execute'> + <refnamediv> + <refname>mssql_execute</refname> + <refpurpose> + MS SQLãµã¼ããã¼ã¿ãã¼ã¹ã§ã¹ãã¢ãããã·ã¼ã¸ã£ãå®è¡ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>mssql_execute</function></funcdef> + <paramdef>int <parameter>stmt</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.mssql-fetch-assoc'> + <refnamediv> + <refname>mssql_fetch_assoc</refname> + <refpurpose> + result_idã§æå®ããçµæéåã§ã«ã¬ã³ãã®è¡ã飿³é åã¨ãã¦è¿ã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>array <function>mssql_fetch_assoc</function></funcdef> + <paramdef>int <parameter>result_id</parameter></paramdef> + <paramdef>int + <parameter><optional>result_type</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.mssql-fetch-batch'> + <refnamediv> + <refname>mssql_fetch_batch</refname> + <refpurpose> + ã¬ã³ã¼ãã®æ¬¡ã®ããããè¿ã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>mssql_fetch_batch</function></funcdef> + <paramdef>string <parameter>result_index</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.mssql-guid-string'> + <refnamediv> + <refname>mssql_guid_string</refname> + <refpurpose> + 16ãã¤ããã¤ããªGUIDãæååã«å¤æãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>string <function>mssql_guid_string</function></funcdef> + <paramdef>string <parameter>binary</parameter></paramdef> + <paramdef>int + <parameter><optional>short_format</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.mssql-init'> + <refnamediv> + <refname>mssql_init</refname> + <refpurpose> + ã¹ãã¢ãããã·ã¼ã¸ã£ã¾ãã¯ãªã¢ã¼ãã®ã¹ãã¢ãããã·ã¼ã¸ã£ãåæå + ãã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>mssql_init</function></funcdef> + <paramdef>string <parameter>sp_name</parameter></paramdef> + <paramdef>int + <parameter><optional>conn_id</optional></parameter> + </paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; + </para> + </refsect1> + </refentry> + + <refentry id='function.mssql-rows-affected'> + <refnamediv> + <refname>mssql_rows_affected</refname> + <refpurpose> + ã¯ã¨ãªã«ããåå¾ããã¬ã³ã¼ãæ°ãè¿ã + </refpurpose> + </refnamediv> + <refsect1> + <title>説æ</title> + <funcsynopsis> + <funcprototype> + <funcdef>int <function>mssql_rows_affected</function></funcdef> + <paramdef>int <parameter>conn_id</parameter></paramdef> + </funcprototype> + </funcsynopsis> + <para> + &warn.undocumented.func; </para> </refsect1> </refentry> Index: phpdoc/ja/functions/mysql.xml diff -u phpdoc/ja/functions/mysql.xml:1.22 phpdoc/ja/functions/mysql.xml:1.23 --- phpdoc/ja/functions/mysql.xml:1.22 Wed Dec 12 15:53:23 2001 +++ phpdoc/ja/functions/mysql.xml Sat Jan 26 03:55:51 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.23 $ --> <reference id="ref.mysql"> <title>MySQL颿°</title> <titleabbrev>MySQL</titleabbrev> @@ -25,6 +26,99 @@ MySQL ã®ããã¥ã¡ã³ãã¯ã<ulink url="&url.mysql.docs;">&url.mysql.docs;</ulink>ã«ããã¾ãã </simpara> + <para> + MySQL颿°ã®åä½ã¯ãã°ãã¼ãã«ãª<link linkend="configuration">è¨å® + </link>ãã¡ã¤ã«ã®è¨å®ã®å½±é¿ãåãã¾ãã + <table> + <title><link linkend="ini.sect.mysql">MySQLè¨å®</link>ãªãã·ã§ã³</title> + <tgroup cols="3"> + <thead> + <row> + <entry>åå</entry> + <entry>ããã©ã«ã</entry> + <entry>夿´ã®å¯å¦</entry> + </row> + </thead> + <tbody> + <row> + <entry>mysql.allow_persistent</entry> + <entry>"On"</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>mysql.max_persistent</entry> + <entry>"-1"</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>mysql.max_links</entry> + <entry>"-1"</entry> + <entry>PHP_INI_SYSTEM</entry> + </row> + <row> + <entry>mysql.default_port</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + </row> + <row> + <entry>mysql.default_socket</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + </row> + <row> + <entry>mysql.default_host</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + </row> + <row> + <entry>mysql.default_user</entry> + <entry>NULL</entry> + <entry>PHP_INI_ALL</entry> + </row> + </tbody> + </tgroup> + </table> + PHP_INI_*宿°ã«é¢ãã詳細ã¨å®ç¾©ã«ã¤ãã¦ã¯ã + <function>ini_set</function>ãåç §ä¸ããã + </para> + <para> + 以ä¸ã¯ãMySQLãã¼ã¿ãã¼ã¹ã«æ¥ç¶ããã¯ã¨ãªãå®è¡ããçµæã¬ã³ã¼ãã + åºåãæ¥ç¶ãæããä¾ã§ãã + <example> + <title>MySQLæ¡å¼µã«é¢ããæ¦è¦ã®ä¾</title> + <programlisting role="php"> +<![CDATA[ +<?php +// ãã¼ã¿ãã¼ã¹ã«æ¥ç¶ãã鏿ãã +$link = mysql_connect("mysql_host", "mysql_login", "mysql_password") + or die("Could not connect"); +print "Connected successfully"; +mysql_select_db("my_database") + or die("Could not select database"); + +// SQLã¯ã¨ãªãå®è¡ãã +$query = "SELECT * FROM my_table"; +$result = mysql_query($query) + or die("Query failed"); + +// HTMLã«çµæãåºåãã +print "<table>\n"; +while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { + print "\t<tr>\n"; + foreach ($line as $col_value) { + print "\t\t<td>$col_value</td>\n"; + } + print "\t</tr>\n"; +} +print "</table>\n"; + +// æ¥ç¶ãéãã +mysql_close($link); +?> +]]> + </programlisting> + </example> + </para> </partintro> <refentry id="function.mysql-affected-rows"> @@ -107,7 +201,7 @@ <replaceable><optional>database</optional></replaceable> </parameter> </paramdef> - <paramdef>int + <paramdef>resource <parameter> <replaceable><optional>link_identifier</optional></replaceable> </parameter> @@ -140,8 +234,8 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>mysql_close</function></funcdef> - <paramdef>int + <funcdef>bool <function>mysql_close</function></funcdef> + <paramdef>resource <parameter> <replaceable><optional>link_identifier</optional></replaceable> </parameter> @@ -149,17 +243,19 @@ </funcprototype> </funcsynopsis> <para> - æåã®å ´åã«&true;ãã¨ã©ã¼ã®å ´åã«&false;ãè¿ãã¾ãã + &return.success; </para> <para> <function>mysql_close</function>ã¯ãæå®ããlink_identifierãæã MySQLãã¼ã¿ãã¼ã¹ã¸ã®ãªã³ã¯ãéãã¾ãã - link_identifierãæå®ãããªãå ´åãæå¾ã«ãªã¼ãã³ããããªã³ã¯ã - ä»®å®ããã¾ãã + <parameter>link_identifier</parameter>ãæå®ãããªãå ´åãæå¾ã« + ãªã¼ãã³ããããªã³ã¯ã使ç¨ããã¾ãã </para> <para> - éæç¶çãªã³ã¯ã¯ã¹ã¯ãªããã®å®è¡çµäºæã«èªåçã« - éããããã®ã§ããã®é¢æ°ã¯é常ã®å ´åå¿ è¦ããã¾ããã + æç¶çã§ãªããªã³ã¯ã¯ã¹ã¯ãªããã®å®è¡çµäºæã«èªåçã«éããããã® + ã§ããã®é¢æ°ã¯é常ã®å ´åå¿ è¦ããã¾ããã<link + linkend="language.types.resource.self-destruct">ãªã½ã¼ã¹ã®è§£æ¾ + </link>ãåç §ä¸ããã </para> <para> <function>mysql_close</function>ã¯ã<function>mysql_pconnect</function> @@ -168,12 +264,14 @@ <example> <title>MySQL æ¥ç¶ãã¯ãã¼ãºããä¾</title> <programlisting role="php"> -<?php - $link = mysql_connect ("kraemer", "marliesle", "secret") - or die ("æ¥ç¶ã§ãã¾ãã"); - print ("æ¥ç¶ã«æåãã¾ãã"); - mysql_close ($link); +<![CDATA[ +<?php + $link = mysql_connect("kraemer", "marliesle", "secret") + or exit("Could not connect"); + print ("Connected successfully"); + mysql_close($link); ?> +]]> </programlisting> </example> <para> @@ -193,24 +291,19 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>mysql_connect</function></funcdef> - <paramdef>string + <paramdef>string <parameter> - <replaceable> - <optional>hostname - <optional>:port</optional> - <optional>:/path/to/socket</optional> - </optional> - </replaceable> + <optional>server</optional> </parameter> </paramdef> - <paramdef>string + <paramdef>string <parameter> - <replaceable><optional>user_name</optional></replaceable> + <optional>username</optional> </parameter> </paramdef> - <paramdef>string + <paramdef>string <parameter> - <replaceable><optional>password</optional></replaceable> + <optional>password</optional> </parameter> </paramdef> </funcprototype> @@ -220,15 +313,18 @@ ã¨ã©ã¼ã¡ãã»ã¼ã¸ãçºçãã¾ãã </para> <para> - <function>mysql_connect</function>ã¯ãMySQL ãµã¼ãã¼ã¸ã® - æ¥ç¶ã確ç«ãã¾ãã弿°ã¯å ¨ã¦ãªãã·ã§ã³ã§ãæå®ãããªãå ´åã - ããã©ã«ãå¤ ('localhost'ããµã¼ãã¼ããã»ã¹ã®ææè ã®ã¦ã¼ã¶ã¼åã - 空ã®ãã¹ã¯ã¼ã)ãé©ç¨ããã¾ãã + <function>mysql_connect</function>ã¯ãMySQL ãµã¼ãã¼ã¸ã®æ¥ç¶ã確 + ç«ãã¾ãããªãã·ã§ã³ã®ãã©ã¡ã¼ã¿ãæå®ãããªãå ´åã以ä¸ã®ããã© + ã«ãå¤ã使ç¨ããã¾ãã: + <parameter>server</parameter> = 'localhost:3306', + <parameter>username</parameter> = ãµã¼ãããã»ã¹ã®ææã¦ã¼ã¶å + <parameter>password</parameter> = 空ã®ãã¹ã¯ã¼ã </para> <para> - æååhostnameã«ã¯ããã¼ãçªå·ãæå®ãããã¨ãå¯è½ã§ãã - ä¾ãã°ã"hostname:port"ã¨ãã¾ããlocalhostã®å ´åã«ã¯ã - ã½ã±ããã¸ã®ãã¹ ":/path/to/socket"ã¨ãã¾ãã + ãã©ã¡ã¼ã¿<parameter>server</parameter>ã«ã¯ããã¼ãçªå·ãæå®ãã + ãã¨ãå¯è½ã§ããä¾ãã°ã"hostname:port"ãã¾ãã¯ã + localhostã®å ´åã«ã¯ãã½ã±ããã¸ã®ãã¹ + ":/path/to/socket"ã¨ãã¾ãã <note> <para> ":port"ã®ãµãã¼ãã¯3.0B4ã§è¿½å ããã¾ããã @@ -254,14 +350,14 @@ <example> <title>MySQL ã«æ¥ç¶ããä¾</title> <programlisting role="php"> -<?php - - $link = mysql_connect ("localhost", "username", "secret") - or die ("æ¥ç¶ã§ãã¾ããã§ãã"); - print ("æ¥ç¶ã«æåãã¾ãã"); - mysql_close ($link); - -?> +<![CDATA[ +<?php + $link = mysql_connect("localhost", "username", "secret") + or die("Could not connect"); + print ("Connected successfully"); + mysql_close($link); +?> +]]> </programlisting> </example> <para> @@ -280,9 +376,9 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>mysql_create_db</function></funcdef> + <funcdef>bool <function>mysql_create_db</function></funcdef> <paramdef>string <parameter>database_name</parameter></paramdef> - <paramdef>int + <paramdef>resource <parameter> <replaceable><optional>link_identifier</optional></replaceable> </parameter> @@ -296,15 +392,17 @@ <example> <title>MySQLãã¼ã¿ãã¼ã¹ã使ããä¾</title> <programlisting role="php"> -<?php - $link = mysql_pconnect ("kron", "jutta", "geheim") - or die ("Could not connect"); - if (mysql_create_db ("my_db")) { - print ("ãã¼ã¿ãã¼ã¹ã®ä½æã«æåãã¾ãã\n"); +<![CDATA[ +<?php + $link = mysql_pconnect("kron", "jutta", "geheim") + or exit("Could not connect"); + if (mysql_create_db("my_db")) { + print ("Database created successfully\n"); } else { - printf ("ãã¼ã¿ãã¼ã¹ä½ææã«æ¬¡ã®ã¨ã©ã¼ãçºçãã¾ãã: %s\n", mysql_error ()); + printf ("Error creating database: %s\n", mysql_error ()); } ?> +]]> </programlisting> </example> <para> @@ -326,13 +424,13 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>mysql_data_seek</function></funcdef> - <paramdef>int <parameter>result_identifier</parameter></paramdef> + <funcdef>bool <function>mysql_data_seek</function></funcdef> + <paramdef>resource <parameter>result_identifier</parameter></paramdef> <paramdef>int <parameter>row_number</parameter></paramdef> </funcprototype> </funcsynopsis> <para> - æåããå ´åã«&true;ã失æããå ´åã«&false;ãè¿ãã¾ãã + &return.success; </para> <para> <function>mysql_data_seek</function>ã¯ãæå®ããçµæID @@ -344,37 +442,38 @@ <para> <parameter>row_number</parameter> ã¯ã0ããå§ã¾ãã¾ãã </para> - <example> <title>MySQLãã¼ã¿ãã·ã¼ã¯ããä¾</title> <programlisting role="php"> -<?php - $link = mysql_pconnect ("kron", "jutta", "geheim") - or die ("æ¥ç¶ã§ãã¾ãã"); +<![CDATA[ +<?php + $link = mysql_pconnect("kron", "jutta", "geheim") + or die("Could not connect"); - mysql_select_db ("samp_db") - or die ("ãã¼ã¿ãã¼ã¹ã select ã§ãã¾ãã"); + mysql_select_db("samp_db") + or exit("Could not select database"); $query = "SELECT last_name, first_name FROM friends"; - $result = mysql_query ($query) - or die ("ã¯ã¨ãªã失æãã¾ãã"); + $result = mysql_query($query) + or die("Query failed"); - # è¡ãéé ã«åå¾ãã + // fetch rows in reverse order - for ($i = mysql_num_rows ($result) - 1; $i >=0; $i--) { - if (!mysql_data_seek ($result, $i)) { - printf ("è¡ %d ã«ç§»åã§ãã¾ãã\n", $i); + for ($i = mysql_num_rows($result) - 1; $i >=0; $i--) { + if (!mysql_data_seek($result, $i)) { + echo "Cannot seek to row $i\n"; continue; } - if(!($row = mysql_fetch_object ($result))) + if(!($row = mysql_fetch_object($result))) continue; - printf ("%s %s<BR>\n", $row->last_name, $row->first_name); + echo "$row->last_name $row->first_name<br />\n"; } - mysql_free_result ($result); + mysql_free_result($result); ?> +]]> </programlisting> </example> </refsect1> @@ -389,8 +488,8 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>mysql_db_name</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <funcdef>string <function>mysql_db_name</function></funcdef> + <paramdef>resource <parameter>result</parameter></paramdef> <paramdef>int <parameter>row</parameter></paramdef> <paramdef>mixed <parameter> @@ -414,7 +513,8 @@ <example> <title><function>mysql_db_name</function> ã®ä¾</title> <programlisting role="php"> -<?php +<![CDATA[ +<?php error_reporting(E_ALL); mysql_connect('dbhost', 'username', 'password'); @@ -422,11 +522,12 @@ $i = 0; $cnt = mysql_num_rows($db_list); -while ($i < $cnt) { +while ($i < $cnt) { echo mysql_db_name($db_list, $i) . "\n"; $i++; } ?> +]]> </programlisting> </example> <para> @@ -445,10 +546,10 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>mysql_db_query</function></funcdef> + <funcdef>resource <function>mysql_db_query</function></funcdef> <paramdef>string <parameter>database</parameter></paramdef> <paramdef>string <parameter>query</parameter></paramdef> - <paramdef>int + <paramdef>resource <parameter> <replaceable><optional>link_identifier</optional></replaceable> </parameter> @@ -469,10 +570,17 @@ åæ§ã«ãªã³ã¯ã使ãããã¨ãã¾ãã </para> <para> - <function>mysql_connect</function>ãåç §ä¸ããã + <function>mysql_connect</function>㨠+ <function>mysql_query</function>ãåç §ä¸ããã </para> - <para> - ä¸ä½äºææ§ã®ç¶æã®ããã«<function>mysql</function>ã使ç¨å¯è½ã§ãã + <para> + <note> + <simpara> + ãã®é¢æ°ã¯ãPHP 4.0.6以éå¤ã颿°ã¨ãªã£ã¦ãã¾ãããã®é¢æ°ã¯ä½¿ç¨ + ããªãã§ä¸ãããæ¿ããã«<function>mysql_select_db</function>ã + ãã³<function>mysql_query</function>ã使ç¨ãã¦ä¸ããã + </simpara> + </note> </para> </refsect1> </refentry> @@ -486,17 +594,17 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef>int <function>mysql_drop_db</function></funcdef> + <funcdef>bool <function>mysql_drop_db</function></funcdef> <paramdef>string <parameter>database_name</parameter></paramdef> - <paramdef>int + <paramdef>resource <parameter> <replaceable><optional>link_identifier</optional></replaceable> </parameter> </paramdef> </funcprototype> </funcsynopsis> - <para> - æåããå ´åã«&true;ã失æããå ´åã«&false;ãè¿ãã¾ãã + <para> + &return.success; </para> <para> <function>mysql_drop_db</function>ã¯ãæå®ããlink_identifierãæã @@ -507,6 +615,9 @@ ä¸ä½äºææ§ã®ç¶æã®ããã<function>mysql_dropdb</function>ã 使ç¨ãããã¨ãå¯è½ã§ãã </para> + <para> + <function>mysql_create_db</function>ãåç §ä¸ããã + </para> </refsect1> </refentry> @@ -522,7 +633,7 @@ <funcsynopsis> <funcprototype> <funcdef>int <function>mysql_errno</function></funcdef> - <paramdef>int + <paramdef>resource <parameter> <replaceable><optional>link_identifier</optional></replaceable> </parameter> @@ -546,14 +657,16 @@ ä»ã®MySQL颿°ãã³ã¼ã«ããåã«å¤ããã§ãã¯ããããã«ãã¦ä¸ããã <informalexample> <programlisting role="php"> -<?php +<![CDATA[ +<?php mysql_connect("marliesle"); -echo mysql_errno().": ".mysql_error()."<BR>"; +echo mysql_errno().": ".mysql_error()."<BR>"; mysql_select_db("nonexistentdb"); -echo mysql_errno().": ".mysql_error()."<BR>"; +echo mysql_errno().": ".mysql_error()."<BR>"; $conn = mysql_query("SELECT * FROM nonexistenttable"); -echo mysql_errno().": ".mysql_error()."<BR>"; +echo mysql_errno().": ".mysql_error()."<BR>"; ?> +]]> </programlisting> </informalexample> </para> @@ -575,7 +688,7 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>mysql_error</function></funcdef> - <paramdef>int + <paramdef>resource <parameter> <replaceable><optional>link_identifier</optional></replaceable> </parameter> @@ -596,14 +709,16 @@ ä»ã®MySQL颿°ãã³ã¼ã«ããåã«ãå¤ããã§ãã¯ããããã«ãã¦ä¸ããã <informalexample> <programlisting role="php"> -<?php +<![CDATA[ +<?php mysql_connect("marliesle"); -echo mysql_errno().": ".mysql_error()."<BR>"; +echo mysql_errno().": ".mysql_error()."<BR>"; mysql_select_db("nonexistentdb"); -echo mysql_errno().": ".mysql_error()."<BR>"; +echo mysql_errno().": ".mysql_error()."<BR>"; $conn = mysql_query("SELECT * FROM nonexistenttable"); -echo mysql_errno().": ".mysql_error()."<BR>"; +echo mysql_errno().": ".mysql_error()."<BR>"; ?> +]]> </programlisting> </informalexample> </para> @@ -653,7 +768,7 @@ <funcsynopsis> <funcprototype> <funcdef>array <function>mysql_fetch_array</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <paramdef>resource <parameter>result</parameter></paramdef> <paramdef>int <parameter> <replaceable><optional>result_type</optional></replaceable> @@ -677,8 +792,10 @@ ååã®ä»ã®ã«ã©ã ã«ã¢ã¯ã»ã¹ããã«ã¯ããã®ã«ã©ã ã®æ°å¤ã¤ã³ããã¯ã¹ ã使ããã¾ãã¯ã«ã©ã ã®å¥åãå®ç¾©ããå¿ è¦ãããã¾ãã <informalexample> - <programlisting> -select t1.f1 as foo t2.f1 as bar from t1, t2 + <programlisting role="sql"> +<![CDATA[ +select tone.field as foo ttwo.field as bar from tone, ttwo +]]> </programlisting> </informalexample> </para> @@ -692,7 +809,16 @@ <function>mysql_fetch_array</function>ã® ãªãã·ã§ã³ã®2çªç®ã®å¼æ°<parameter>result_type</parameter>ã¯å®æ°ã§ããã æ¬¡ã®å¤ãã¨ãã¾ãã: MYSQL_ASSOC, MYSQL_NUM, MYSQL_BOTH - (ãã®æ©è½ã¯ PHP 3.0.7ã§è¿½å ãããæ©è½ã§ã) + ãã®æ©è½ã¯ PHP 3.0.7ã§è¿½å ãããæ©è½ã§ãããã®å¼æ°ã®ããã©ã«ãå¤ã¯ã + MYSQL_BOTHã§ãã + </para> + <para> + MYSQL_BOTHã使ç¨ããã¨ã飿³æ·»åã¨æ°å¤æ·»åãå ±ã«æããé åãåå¾ + ãã¾ããMYSQL_ASSOCã使ç¨ããã¨ã( + <function>mysql_fetch_assoc</function>ã®åä½ã¨åæ§ã«)飿³æ·»åã®ã¿ + ãåå¾ãããMYSQL_NUMã使ç¨ããã¨ã + (<function>mysql_fetch_row</function>ã®åä½ã¨åæ§ã«æ°å¤æ·»åã®ã¿ã + åå¾ããã¾ãã </para> <para> ããè©³ç´°ãªæ å ±ã«ã¤ãã¦ã¯ã @@ -700,19 +826,22 @@ <function>mysql_fetch_assoc</function>ãåç §ä¸ããã </para> <example> - <title><function>mysql_fetch_array</function></title> + <title><function>mysql_fetch_array</function>ã®ä¾</title> <programlisting role="php"> -<?php -mysql_connect ($host, $user, $password); -$result = mysql_db_query ("database","select user_id, fullname from table"); -while ($row = mysql_fetch_array ($result)) { - echo "user_id: ".$row["user_id"]."<br>\n"; - echo "user_id: ".$row[0]."<br>\n"; - echo "fullname: ".$row["fullname"]."<br>\n"; - echo "fullname: ".$row[1]."<br>\n"; +<![CDATA[ +<?php +mysql_connect($host, $user, $password); +mysql_select_db("database"); +$result = mysql_query("select user_id, fullname from table"); +while ($row = mysql_fetch_array($result)) { + echo "user_id: ".$row["user_id"]."<br>\n"; + echo "user_id: ".$row[0]."<br>\n"; + echo "fullname: ".$row["fullname"]."<br>\n"; + echo "fullname: ".$row[1]."<br>\n"; } -mysql_free_result ($result); +mysql_free_result($result); ?> +]]> </programlisting> </example> </refsect1> @@ -730,7 +859,7 @@ <funcsynopsis> <funcprototype> <funcdef>array <function>mysql_fetch_assoc</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <paramdef>resource <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -749,8 +878,9 @@ <para> çµæã®è¤æ°ã®ã«ã©ã ãåããã£ã¼ã«ãåãæãã¦ããå ´åãæå¾ã®ã«ã© ã ãåªå ããã¾ããåãååãæããä»ã®ã«ã©ã ã«ã¢ã¯ã»ã¹ããã«ã¯ã - <function>mysql_fetch_array</function>ã使ç¨ããåæã«æ°å¤æ·»åã - è¿ãå¿ è¦ãããã¾ãã + <function>mysql_fetch_row</function>ã使ç¨ãã¦æ°å¤æ·»åãè¿ããã + ã¨ã¤ãªã¢ã¹åã追å ããå¿ è¦ãããã¾ããã¨ã¤ãªã¢ã¹ã®èª¬æã«ã¤ãã¦ã¯ã + <function>mysql_fetch_array</function>ã®ä¾ãåç §ä¸ããã </para> <para> <function>mysql_fetch_assoc</function>ã®ä½¿ç¨ã«é¢ãã¦ãèããä»å @@ -764,15 +894,19 @@ <example> <title><function>mysql_fetch_assoc</function></title> <programlisting role="php"> -<?php -mysql_connect ($host, $user, $password); -$result = mysql_db_query ("database","select * from table"); -while ($row = mysql_fetch_assoc ($result)) { +<![CDATA[ +<?php +mysql_connect($host, $user, $password); +mysql_select_db($database); +$query = "select * from table"; +$result = mysql_query($query); +while ($row = mysql_fetch_assoc($result)) { echo $row["user_id"]; echo $row["fullname"]; } -mysql_free_result ($result); +mysql_free_result($result); ?> +]]> </programlisting> </example> </refsect1> @@ -790,7 +924,7 @@ <funcsynopsis> <funcprototype> <funcdef>object <function>mysql_fetch_field</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <paramdef>resource <parameter>result</parameter></paramdef> <paramdef>int <parameter> <replaceable><optional>field_offset</optional></replaceable> @@ -876,20 +1010,22 @@ <example> <title><function>mysql_fetch_field</function></title> <programlisting role="php"> -<?php -mysql_connect ($host, $user, $password) - or die ("æ¥ç¶ã§ãã¾ãã"); -$result = mysql_db_query ("database", "select * from table") - or die ("ã¯ã¨ãªã失æãã¾ãã"); +<![CDATA[ +<?php +mysql_connect('localhost:3306', $user, $password) + or die ("Could not connect"); +mysql_select_db("database"); +$result = mysql_query("select * from table") + or die("Query failed"); # get column metadata $i = 0; -while ($i < mysql_num_fields ($result)) { - echo "ã«ã©ã $i ã®æ å ± <BR>\n"; - $meta = mysql_fetch_field ($result); +while ($i < mysql_num_fields($result)) { + echo "Information for column $i:<BR>\n"; + $meta = mysql_fetch_field($result); if (!$meta) { - echo "æ å ±ãå ¥æã§ãã¾ãã <BR>\n"; + echo "No information available<BR>\n"; } - echo "<PRE> + echo "<PRE> blob: $meta->blob max_length: $meta->max_length multiple_key: $meta->multiple_key @@ -902,11 +1038,12 @@ unique_key: $meta->unique_key unsigned: $meta->unsigned zerofill: $meta->zerofill -</PRE>"; +</PRE>"; $i++; } -mysql_free_result ($result); +mysql_free_result($result); ?> +]]> </programlisting> </example> <para> @@ -926,8 +1063,8 @@ <title>説æ</title> <funcsynopsis> <funcprototype> - <funcdef> <function>mysql_fetch_lengths</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <funcdef>array <function>mysql_fetch_lengths</function></funcdef> + <paramdef>resource <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -959,7 +1096,7 @@ <funcsynopsis> <funcprototype> <funcdef>object <function>mysql_fetch_object</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <paramdef>resource <parameter>result</parameter></paramdef> <paramdef>int <parameter> <replaceable><optional>result_typ</optional></replaceable> @@ -987,17 +1124,20 @@ é度é¢ã§ã¯ããã®é¢æ°ã¯<function>mysql_fetch_array</function>ã¨åçã§ã <function>mysql_fetch_row</function>ã¨ã»ã¼åçã§ãã(éãã¯ãããã§ã) <example> - <title>MySQLãªãã¸ã§ã¯ãã®åå¾</title> + <title><function>mysql_fetch_object</function>ã®ä¾</title> <programlisting role="php"> -<?php -mysql_connect ($host, $user, $password); -$result = mysql_db_query ("database", "select * from table"); -while($row = mysql_fetch_object ($result)) { +<![CDATA[ +<?php +mysql_connect("hostname", "user", "password"); +mysql_select_db($db); +$result = mysql_query("select * from table"); +while ($row = mysql_fetch_object($result)) { echo $row->user_id; echo $row->fullname; } -mysql_free_result ($result); +mysql_free_result($result); ?> +]]> </programlisting> </example> </para> @@ -1018,7 +1158,7 @@ <funcsynopsis> <funcprototype> <funcdef>array <function>mysql_fetch_row</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <paramdef>resource <parameter>result</parameter></paramdef> </funcprototype> </funcsynopsis> <para> @@ -1057,7 +1197,7 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>mysql_field_flags</function></funcdef> - <paramdef>string <parameter>result</parameter></paramdef> + <paramdef>resource <parameter>result</parameter></paramdef> <paramdef>int <parameter>field_offset</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -1091,18 +1231,53 @@ <funcsynopsis> <funcprototype> <funcdef>string <function>mysql_field_name</function></funcdef> - <paramdef>int <parameter>result</parameter></paramdef> + <paramdef>resource <parameter>result</parameter></paramdef> <paramdef>int <parameter>field_index</parameter></paramdef> </funcprototype> </funcsynopsis> <para> <function>mysql_field_name</function>ã¯ãæå®ãããã£ã¼ã«ãã® - ååãè¿ãã¾ãã颿°ã®å¼æ°ã¯ãçµæIDã¨ãã£ã¼ã«ãã¤ã³ããã¯ã¹ã§ãã - ããªãã¡ã<literal>mysql_field_name($result,2);</literal> + ååãè¿ãã¾ãã<parameter>result</parameter>ã¯æå¹ãªçµæIDã + <parameter>field_index</parameter>ã¯ãã£ã¼ã«ãã®ãªãã»ããæ°ã¨ã + ãå¿ è¦ãããã¾ãã </para> + <note> + <para> + <parameter>field_index</parameter>ã¯0ããå§ã¾ãã¾ãã + </para> + <para> + ä¾ãã°ã3çªç®ã®ãã£ã¼ã«ãã®æ·»åã¯2ã4çªç®ã®ãã£ã¼ã«ãã®æ·»åã¯3㨠+ ãã£ãããã«ãªãã¾ãã + </para> + </note> <para> - <function>mysql_field_name</function>ã¯ãçµæIDãæãçµæã«ãã㦠- 2çªç®ã®ãã£ã¼ã«ãã®ååãè¿ãã¾ãã + <example> + <title><function>mysql_field_name</function>ã®ä¾</title> + <programlisting role="php"> +<![CDATA[ +// The users table consists of three fields: +// user_id +// username +// password. +$link = mysql_connect('localhost', $user, "secret"); +mysql_select_db($dbname, $link) + or die("Could not set $dbname"); +$res = mysql_query("select * from users", $link); + +echo mysql_field_name($res, 0) . "\n"; +echo mysql_field_name($res, 2); +]]> + </programlisting> + <para> + ä¸ã®ä¾ã¯åºåã®ããã«ãªãã¾ãã + <screen> +<![CDATA[ +user_id +password +]]> + </screen> + </para> + </example> </para> <para> ä¸ä½äºææ§ãç¶æããããã<function>mysql_fieldname</function> Index: phpdoc/ja/functions/network.xml diff -u phpdoc/ja/functions/network.xml:1.22 phpdoc/ja/functions/network.xml:1.23 --- phpdoc/ja/functions/network.xml:1.22 Wed Dec 12 15:53:25 2001 +++ phpdoc/ja/functions/network.xml Sat Jan 26 03:55:51 2002 @@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.23 $ --> <reference id="ref.network"> <title>ãããã¯ã¼ã¯é¢æ°</title> <titleabbrev>ãããã¯ã¼ã¯</titleabbrev>