이클립스 PDT : PHP 개발 생산성을 높여주는 통합 개발 환경

101
  • date post

    22-Jul-2016
  • Category

    Documents

  • view

    278
  • download

    22

description

용영환 지음 | 오픈소스 & 웹 시리즈 _ 027 | ISBN: 9788992939720 | 22,000원 | 2011년 03월 11일 발행 | 352쪽

Transcript of 이클립스 PDT : PHP 개발 생산성을 높여주는 통합 개발 환경

  • PREFACE

    .

    .

    . ,

    .

    PDT .

    PHP .

    ,

    , PHPKorea

    ,

    , .

    .

    2011 2

    http://phpk.org

    E-Mail : [email protected]

  • BETATEST : (Kooo.net) NHN UX .

    , .

    . ,

    . ()

    . () .

    . PHP

    . PHP

    .

    : NHN DBMS CUBRID , (springsprout.org) github.com/codeport

    .

    PHP . GUI

    vi . PHP

    RSE .

    PHP .

    : (neople.co.kr) .

    PHP . PHP IDE

    , . .

  • BETATEST

    : .

    PHP

    ,

    . +PDT PHP

    .

    OS

    .

    : NHN , (naver.jp) .

    (http://m.oolzo.com) .

    2 ! .

    . PDT

    .

    . .

    : 2009 NHN NHN Business Platform

    .

  • CONTENTS

    011-1. PHP ......................................................................................................................20

    1-2. PHP .........................................................................................................................21

    1-3. PDT ......................................................................................................................22

    1-4. PHP ..........................................................................................22

    1-5. PHP .......................................................23

    1-6. ...................................................................................................................23

    1-7. ......................................................................................................................24

    1-8. ............................................................................................................................24

    1-9. ..................................................................................................................................25

    1-10. ................................................................................................................26

    PDT 022-1. JRE ...................................................................................................................................28

    JDK ..........................................................................................................................................................29

    JDK ................................................................................................................................................. 31

    Mac OS X JDK ...........................................................................................................................................33

    JDK .................................................................................................................................................34

    2-2. PDT .................................................................................................................36

    PDT .........................................................................................................................37

    Mac OS X PDT ...................................................................................................................39

    .................................................................................................................................40

  • PDT 033-1. PDT ................................................................................................................44

    3-2. PDT ..................................................................................47

    ............................................................................................................................................................. 47

    PHP ....................................................................................................................................................48

    ........................................................................................................................................................49

    ....................................................................................................................................................................50

    ............................................................................................................................................................................50

    3-3. PHP ...............................................................................................................51

    3-4. ...........................................................53

    .......................................................................................................................54

    PHP ..................................................................................................55

    PHP ...........................................................................................................56

    Workspace ................................................................................................................ 57

    3-5. PHP .......................................................................................................................58

    PDT 044-1. .....................................................................................................................62

    .......................................................................................................................63

    ........................................................................................................................................................64

    ....................................................................................................................................................65

  • CONTENTSCONTENTS ............................................................................................................................................66

    ............................................................................................................................................68

    ........................................................................................................................................70

    4-2. ..............................................................................................................................70

    .....................................................................................................................................................71

    4-3. ........................................................................................................................72

    4-4. ..............................................................................................................................73

    ............................................................................................................................................................ 73

    ............................................................................................................................................... 74

    ............................................................................................................................................................ 75

    4-5. ........................................................................................................................77

    ...............................................................................................................................................78

    4-6. ........................................................................................................79

    4-7. ..................................................................................................................................81

    ................................................................................................................................................83

    .......................................................................................................................................................84

    4-8. PHP ..............................................................................................................................85

    PHP .......................................................................................................85

    PHP ...............................................................................................................................86

    PHP ................................................................................................................................87

  • 4-9. .......................................................................................................................................89

    ................................................................................................................................90

    4-10. ................................................................................................................................90

    4-11. ....................................................................................................................92

    4-12. .........................................................................................................94

    4-13. ................................................................................................................................95

    4-14. ......................................................................................................................96

    4-15. PHP Include Path .................................................................................................................97

    055-1. ...................................................................................................................104

    5-2. ................................................................................................................................106

    5-3. PHP Explorer ....................................................................................107

    5-4. ................................................................................................................107

    5-5. .............................................................................................................108

    5-6. PHP Explorer ..................................................................................................109

    5-7. ..........................................................................110

    5-8. ............................................................................................................111

    ........................................................................................................................................................ 113

  • CONTENTS

    066-1. Zend Debugger ..........................................................................................117

    ...........................................................................................................................118

    ..............................................................................................................................................120

    Zend Debugger ....................................................................................................................................121

    6-2. PHP ..............................................................................................................123

    PHP ......................................................................................................................................125

    PHP ..............................................................................................................................127

    ...............................................................................................................................128

    PHP ...............................................................................................................................129

    Zend Debugger .........................................................................................................131

    6-3. PHP .............................................................................................................131

    6-4. PHP ..........................................................................................................133

    PHP Debug ........................................................................................................................................134

    ........................................................................................................................................................135

    .......................................................................................................................................... 136

    6-5. ...........................................................................................137

    Zend Debugger ................................................................................................................... 137

    Zend Debugger .......................................................................................................... 139

    ..................................................................................................................................... 140

  • 6-6. ...............................................................................................141

    6-7. ............................................................................................144

    IP ..................................................................................................................... 147

    DMBS 077-1. DBMS ...................................................................................................................151

    7-2. GEF ................................................................................................................................152

    7-3. Quantum DB ...............................................................................................................154

    7-4. Quantum ...........................................................................................................156

    MySQL ........................................................................................................................................................158

    CUBRID ................................................................................................................................................162

    7-5. Quantum ...................................................................................................................166

    ..................................................................................................................................................167

    .......................................................................................................................168

    (INSERT) .............................................................................................................................................170

    .....................................................................................................................................171

    (UPDATE) .......................................................................................................................................... 172

    (DELETE) ........................................................................................................................................... 173

    DB .................................................................................................................................................... 174

    ................................................................................................................................ 175

    ..........................................................................................................................176

  • CONTENTS

    088-1. SVN .........................................................................................................................................180

    Subclipse ......................................................................................................................................................181

    Subversive ................................................................................................................................................... 184

    JavaHL SVN Kit ................................................................................................................................................188

    SVN ................................................................................................................................................. 189

    SVN ......................................................................................................................191

    ...................................................................................................................................................... 195

    ...............................................................................................................................................197

    ...............................................................................................................................................198

    (Revert) ..................................................................................................................................201

    8-2. ........................................................................................................................................204

    .............................................................................................................................................................204

    Patch Root ..............................................................................................................................206

    .............................................................................................................................................................206

    .....................................................................................................................................207

    , , ............................................................................................................................................209

  • Ant 099-1. Ant ...................................................................................................................................212

    Ant FTP ......................................................................................................................................215

    9-2. Ant FTP ......................................................................................................................217

    No grammar constraints detected for the document ............................................................................ 220

    FTP ...............................................................................................................................................221

    ..........................................................................................................................................222

    FTP ............................................................................................................................223

    RSE 1010-1. RSE ..............................................................................................................................227

    10-2. FTP ...................................................................................................229

    10-3. RSE PHP ...........................................................................................232

    10-4. ................................................................................................................232

    RSE PHP ..........................................................................................................233

    10-5. ....................................................................................................234

    10-6. SSH .............................................................................................................................235

  • CONTENTS

    Saros 1111-1. Saros ...........................................................................................................................240

    11-2. ...................................................................................243

    .............................................................................................................................................244

    .............................................................................................................................................................245

    .........................................................................................................................................................246

    11-3. XMPP ...................................................................................................246

    11-4. ...........................................................................................................248

    11-5. .........................................................................................................................251

    Mylyn 1212-1. Mylyn ...........................................................................................................................254

    12-2. Trac .............................................................................................................................259

    12-3. Mylyn ..........................................................................................................................262

    (Task) ....................................................................................................................................................262

    .............................................................................................................................................................264

    .............................................................................................................................................................266

  • PHPDoc 1313-1. PHPDoc .......................................................................................................................270

    13-2. phpDocumentor ........................................................................................................274

    13-3. PHPDoc .....................................................................................275

    13-4. ...................................................................................................................................279

    ..............................................................................................................................................279

    ..........................................................................................................................................................279

    13-5. ..........................................................................................................................281

    1414-1. Notepad ................................................................................................................................284

    14-2. Hex Editor ............................................................................................................................284

    14-3. FreeMEM ..............................................................................................................................285

    14-4. RSS View .............................................................................................................................285

    14-5. FileSync ................................................................................................................................286

    14-6. StartExplorer .......................................................................................................................287

    15 ............................................................................................................................................. 290

    ..................................................................................................................................................291

    ......................................................................................................................................291

  • CONTENTS

    011-1. ..........................................................................................................................294

    ...........................................................................................................................294

    1-2. PDT ....................................................................297

    1-3. PHP ...............................................................................................................................298

    1-4. XAMPP ............................................................................................................302

    XAMPP .................................................................................................................................................302

    Mac OS X XAMPP ...........................................................................................................................................307

    XAMPP ..................................................................................................................................................312

    1-5. ................................................................................................................................ 314

    1-6. Trac ........................................................................................................319

    ..............................................................................................................................319

    Trac .............................................................................................................................................322

    .............................................................................................................................324

    Trac ..............................................................................................................................................327

  • 18 PDT

  • 19

    PHP

    PHP

    PDT

    PHP

    PHP

    01CHAPTERPHP PDT

  • 20 PDT

    .

    PHP PHP

    .

    . PHP

    .

    PHP

    PHP

    .

    .

    .

    .

    .

    1-1. PHP

    PHP 4.0 2000 PHP

    . PHP

    , PHP PHP

    . PHP 2000

    .

    PHP . 5

    (http://www.facebook.com)

    !(http://www.yahoo.com) PHP PHP

  • 21

    .

    ,

    PHP .

    PHP

    PHP .

    1-2. PHP

    .

    .

    .

    .

    , PHP

    . PDT PHPEclipse, Zend Studio PHP

    .

    .

    . PDT PHP

    PDT .

  • 22 PDT

    1-3. PDT

    PDT(PHP Development Tools) 2006 . 2006

    Zend Studio PHPEclipse PHP , Zend Studio

    PHPEclipse . PHPEclipse

    2002 PDT

    . PDT 2007 1.0

    PHPEclipse 3.1x, 3.2.x, 3.3.x

    .

    PDT 2008 2.0, 2009 2.1

    . PDT 2.0 . . PHP

    . 3.3.x Europa

    PHPEclipse PDT 3.4.x Ganymede,

    3.5.x Galileo

    .

    PDT PHPEclipse . PHPEclipse 2002

    2008 PHP PDT 2009 PHP

    PHP

    .

    1-4. PHP

    .

    . PDT

    ,

    .

  • 23

    1-5. PHP

    PHP

    . ,

    Mac OS X VI .

    PHP

    . .

    PDT PHP . PDT

    PDT , PDT

    PDT .

    .

    1-6.

    PHP . PHP

    .

    . PHP VI

    .

    .

    PDT .

    PHP .

    PDT .

  • 24 PDT

    PDT .

    PHP PHP

    . PDT

    /

    .

    PDT .

    1-7.

    JRE(Java Runtime Environment)

    . ,

    2GB .

    PHP

    .

    .

    .

    .

    , , Mac OS X GUI

    1GB (2GB )

    JavaVM(5.0 )

    1-8.

    .

    , Mac OS X

    .

  • 25

    PDT , , PDT

    . PHP JRE

    . PDT

    . PDT

    .

    .

    PDT

    PDT

    PDT PHP

    PHP

    PDT

    PDT

    1-9.

    PDT . PDT

    PHP PDT

    .

    1-10.

    (OS, Operating System)

    .

    . (http://www.

    eclipse.org/downloads/) Eclipse IDE for Java Developers

  • 26 PDT

    , CDT(C/C++ Development Tooling) C/C++

    .

    .

    , ,

    . PDT PHP

    JDT CDT . PDT JDT

    JDT PDT .

    .

  • 27 PDT

    PDT

    JRE

    PDT

    02CHAPTERPHP PDT

  • 28 PDT

    PDT PDT

    (Java Runtime Environment, JRE) .

    PHP PHP

    (Java Virtual Machine, JavaVM JVM) JRE

    . JavaVM

    , . JavaVM

    , Mac OS X,

    . JavaVM

    GUI PDT .

    PDT JRE PDT

    .

    2-1. JRE

    PDT PDT JRE

    . JRE Java SE (http://java.sun.com/javase/downloads/)

    . Java SE JRE JDK

    . JDK(Java Development Kit)

    . JDK JRE PDT

    JRE JDK

    JRE JDK . OS JRE

    JRE .

  • 29 PDT

    JRE

    cmd , Mac OS X

    . java version

    .

    JDK

    (Sun) (Oracle)

    . JDK

    .

    JDK .

    01. Java SE (http://java.sun.com/javase/downloads/) .

    02. JDK Download JDK .

    [ 2-1] JDK

  • 30 PDT

    03. PDT Download .

    [ 2-2]

    04. [ 2-3] Skip this Step .

    [ 2-3]

  • 31 PDT

    05. JDK .

    [ 2-4] JDK

    JDK

    JDK . ,

    PDT 32 32

    . JDK .

    01. JDK [ 2-5] . Accept .

    [ 2-5]

  • 32 PDT

    02. JDK Next . C:\Program Files

    C:\java .

    [ 2-6] JDK

    03. JRE Next . JRE C:\java .

    [ 2-7] JRE

    04. Finish .

    [ 2-8]

  • 33 PDT

    [ 2-9]

    .

    .

    [ 2-9] Java

    Mac OS X JDK

    Mac OS X Leopard JDK . Mac OS X

    JDK Java

    [ 2-10] JDK .

    [ 2-10] Java

  • 34 PDT

    JDK JDK [ 2-11] Mac OS

    X .

    [ 2-11]

    JDK

    (http://www.ubuntu.com)

    JDK . 10.04

    .

    JDK .

    01. .

    [ 2-12] Applications

    02. java .

    03. java OpenJDK Java Runtime .

  • 35 PDT

    [ 2-13]

    04. . .

    [ 2-14] OpenJDK Java 6 Runtime

  • 36 PDT

    05. .

    06. java version .

    [ 2-15] OpenJDK

    2-2. PDT

    .

    .

    . (, ,

    ) .

    PDT .

    .

    .

    Mac OS X,

    PDT . , PDT

    . Mac OS X

    PDT .

  • 37 PDT

    PDT

    PDT Mac OS X 64

    . 64 JRE 32 JRE .

    64 PHP PDT All In One

    32 . PDT All In One 64

    PDT PHP Zend Debugger

    32 64 PHP

    . PDT All In One

    .

    PDT .

    01. PDT (http://eclipse.org/pdt/) .

    02. Download .

    [ 2-16] PDT

  • 38 PDT

    03. All In Ones/Eclipse PHP Package PDT .

    [ 2-17] PDT

    PDT 2.2 Helios PDT 2.1 Galileo .

    .

    04. . C:\eclipse PDT .

    .

    05. [ 2-18] .

    [ 2-18] PDT

  • 39 PDT

    .

    . .

    01. .

    02. .

    03. .

    [ 2-19]

    04. [ 2-18] . [ 2-19]

    .

    Mac OS X PDT

    Mac OS X PDT .

    Mac OS X PDT .

    01. PDT (http://eclipse.org/pdt/) Download .

  • 40 PDT

    02. PDT PDT . All In Ones / Eclipse PHP Package . Mac OS X

    PDT Cocoa Carbon 32 64

    . Leopard Cocoa . Leopard

    32 64 Mac OS X JDK 32

    64 PDT . [ 2-20] 64

    JRE .

    [ 2-20]

    03. PDT .

    04. .

    [ 2-21] PDT

    Mac OS X .

    GUI .

  • 41 PDT

    PDT . PDT

    (http://eclipse.org/pdt/downloads/)

    [ 2-22] PDT .

    (eclipse) () .

    [ 2-22] PDT

  • 42 PDT

  • 43 PDT

    PDT

    PDT

    PDT

    PHP

    PHP

    03CHAPTERPHP PDT

  • 44 PDT

    PDT

    .

    .

    PDT PHP PDT

    , PHP .

    3-1. PDT

    eclipse.exe .

    .

    JDK( JRE)

    1GB . 1GB

    .

    2GB .

    1GB 2GB

    .

    64

    . 64 .

    8GB

    . 7 Mac OS X

    . , PDT 64

    32 PDT .

    , PDT .

    PDT

    . PDT

    .

  • 45 PDT

    PDT .

    01. PDT .

    02. eclipse.exe .

    [ 3-1] PDT

    .exe

    .

    03. PDT Workspace [ 3-2] Workspace Launcher . Browse

    OK .

    [ 3-2] Workspace Launcher

    Workspace PHP , HTML, CSS, JavaScript

    . HelloWorld

    [ 3-3] Workspace HelloWorld

    .

  • 46 PDT

    [ 3-3] Workspace

    Workspace Launcher .

    Workspace Workspace Launcher

    Use this as the default and do not ask again

    OK .

    Workspace File Switch Workspace .

    04. PDT Welcome .

    [ 3-4] Welcome

    05. Welcome X PHP (Perspective) .

  • 47 PDT

    3-2. PDT

    PDT (View) .

    , , ,

    .

    (Perspective)

    . PDT PHP Explorer

    Outline PHP .

    PDT PHP PHP Debug Web

    , Java .

    PHP PHP

    PHP Debug Debug , Breakpoint

    .

    .

    PHP

    PHP Debug

    Remote System Explorer

    SVN Repository Exploring

    ,

    .

  • 48 PDT

    PHP

    PHP [ 3-5] .

    (Editor) . PHP Explorer Type Hierarchy

    , Outline Task , Problems Tasks ,

    Console .

    .

    .

    .

    .

    [ 3-5] PDT PHP

    Window Reset Perspective .

  • 49 PDT

    PDT . PDT

    , PDT

    .

    . Customize Perspective

    . Customize Perspective

    Customize Perspective .

    [ 3-6] PDT

    Mac OS X [ 3-7] .

    [ 3-7] Mac OS X

  • 50 PDT

    PDT

    (Resource) . , PHP XML

    UML .

    . .

    .

    . ,

    .

    (View) . PDT

    PHP Explorer Outline Problems

    .

    . PDT PHP Explorer

    PHP .

    , PHP Explorer . Outline

    . PHP , , .

    .

    Problems .

    .

  • 51 PDT

    [ 3-1] PHP

    PHP Explorer . .

    Outline PHP , , .

    Problems .

    Tasks .

    Console PHP .

    PHP Functions PHP .

    Type Hierarchy .

    PHP Project Outline , , . Outline PHP Project Outline .

    3-3. PHP

    PDT .

    Workspace . PHP

    .

    01. File New PHP Project . PHP Project Other PHP Project .

    [ 3-8] PHP Project

  • 52 PDT

    02. Project Name . HelloWorld Project Name HelloWorld Next .

    [ 3-9] HelloWorld

    03. PHP Include path . PHP Include path Next .

    [ 3-10] PHP Include Path

  • 53 PDT

    04. . PHP Build Path . Finish .

    [ 3-11] PHP Build Path

    05. PHP Explorer HelloWorld .

    [ 3-12] HelloWorld

    3-4.

    PDT

    PHP (Import) .

    Workspace .

  • 54 PDT

    .

    .

    .project,

    .buildpath .

    .

    . .project

    .

    01. File Import .

    02. Import General Existing Projects into Workspace Next .

    [ 3-13]

    03. Import Projects Finish . Workspace Copy

    projects into workspace . ZIP TGZ

  • 55 PDT

    Select archive file

    Workspace .

    [ 3-14]

    PHP

    PDT PHP PDT

    PDT PHP . HelloWorld

    PHP PDT PHP

    .

    01. HelloWorld Workspace . HelloWorld .

    02. File New PHP Project .

    03. Project name HelloWorld .

    [ 3-15]

  • 56 PDT

    04. [ 3-16] Finish .

    [ 3-16]

    HelloWorld

    .

    PHP

    HTML PDT

    PHP . PHP

    .

    01. PHP Explorer PHP .

    02. Configure Add PHP Support .

    [ 3-17] Add PHP Support

  • 57 PDT

    03. PHP Explorer PHP Include Path, PHP Language Library PHP .

    [ 3-18] PHP

    Workspace

    Workspace

    Workspace .

    .

    01. File New PHP Project .

    02. New PHP Project Project name Contents Create project from existing source .

    [ 3-19] Create project from existing source PHP

    03. Directory .

  • 58 PDT

    3-5. PHP

    PHP PHP . PHP File

    PHP Explorer PHP .

    PHP .

    01. PHP Explorer HelloWorld .

    02. PHP Explorer New PHP File .

    [ 3-20] PHP Explorer

    03. New PHP File File Name Next . index.php .

    HelloWorld.php

    PHP index.php index.php .

    Source Folder PHP Next . [

    3-20] HelloWorld Source Folder /HelloWorld

    . Source Folder

    Browse .

  • 59 PDT

    [ 3-21] New PHP File PHP

    04. PHP . . New PHP File-HTML frameset HTML . New simple PHP

    file PHP

  • 60 PDT

  • 61 PDT

    PDT

    PHP

    PHP Include Path

    04CHAPTERPHP PDT

  • 62 PDT

    PDT PHP .

    PDT .

    .

    PDT

    .

    4-1.

    PHP PHP

    .

    , ,

    . PDT

    (Content assist) .

    (Content assist) JDT(Java Development Tools)

    PDT (Code assist) . PDT

    PDT

    .

    PHP , Workspace

    , , ,

    .

    .

    PHP

    .

    .

    PHP

    .

  • 63 PDT

    PDT

    .

    + . PHP

    + [ 4-1] .

    PHP

    .

    [ 4-1]

    .

    .

    .

    .

  • 64 PDT

    + .

    .

    +

    .

    .

    PHP .

    , ,

    .

    PDT .

    pr + PHP

    . PHP

    .

    [ 4-2]

    ( ) [

    4-3]

    .

  • 65 PDT

    [ 4-3]

    .

    [ 4-4]

    .

    .

    .

    . private

    .

    .

    . +

    [ 4-5]

    . public

    getTitle() getContent() . getTitle() private

    protected $post

    .

  • 66 PDT

    class Post {

    private $title;

    private $content;

    /**

    *

    * @return string

    */

    public function getTitle() {

    return $this->title;

    }

    /**

    *

    * @return string

    */

    public function getContent() {

    return $this->content;

    }

    }

    $post = new Post();

    $post->

    [ 4-5]

    . PostDAO . $postModel PostModel

    . PostDAO $post getPostModel()

    PostModel $post .

  • 67 PDT

    C#

    , PHP PDT

    .

    $postModel->

    .

    class PostModel {

    private $title;

    private $content;

    /**

    *

    */

    public function getTitle(){

    return $this->title;

    }

    /**

    *

    */

    public function getContent(){

    return $this->content;

    }

    }

    class PostDAO {

    private $postModel;

    public function __construct(){

    $this->postModel = new PostModel();

    }

    /**

    * Post

    * @return PostModel

    */

    public function getPostModel() {

    return $this->postModel;

    }

    }

  • 68 PDT

    $post = new PostDAO();

    $postModel = $post->getPost();

    $postModel->

    PDT PHPDoc

    . $post->getPost() $postModel Post

    PHPDoc . PostModel

    $postModel /* @var $postModel PostModel */

    .

    $post = new PostDAO();

    /* @var $postModel PostModel */

    $postModel = $post->getPost();

    $postModel->

    /* @var */ PHP

    . $postModel [ 4-6]

    .

    [ 4-6]

    Window Preferences PHP Editor

    Content Assist .

  • 69 PDT

    [ 4-7]

    Options

    Completion Inserts/Completion Overwrites

    . INSERT /

    .

    Insert single proposals automatically

    .

    Show variables from other files include

    .

    Filters

    Respect case sensitivity .

    .

    Auto Activation

    Enable auto activation

    . 200ms, 0.2. 1000ms(1)

    ,

    .

  • 70 PDT

    [ 4-1]

    PHP

    /

    PHP

    4-2.

    (Hovers) , ,

    . [ 4-8] Cubrid()

    Cubrid .

    [ 4-8]

  • 71 PDT

    Window Preferences

    Preferences PHP Editor Hovers .

    [ 4-9] Hovers

    Combined Hover Source . Source [ 4-8]

    . Source

    .

    Variable Values, Problem Description, Documentation, Annotation

    Description . Combined

    Hover Source . Combined

    Hover Variable Values, Problem Description, Documentation,

    Annotation Description .

    Hover

    . .

  • 72 PDT

    4-3.

    . swi +

    . [ 4-10]

    switch swi . switch

    PHP swi .

    [ 4-10]

    swi switch .

    PHP

    .

    .

    switch ($variable) {

    case value:

    ;

    break;

    default:

    ;

    break;

    }

  • 73 PDT

    4-4.

    .

    01. Window preferences .

    02. PHP Editor Templates .

    [ 4-11]

    03. New New Template .

    [ 4-12] New Template

  • 74 PDT

    [ 4-11]

    Edit . [ 4-13] Edit Template

    OK .

    [ 4-13] Edit Template

    Remove .

    Remove

    .

    Edit Template Insert Variable

    .

    [ 4-2]

    Cursor

    Date ) 2010. 6. 7.

    Dollar $ ) $

    File ) CurrentFile.php

    Interpreter PHP

    Language ) PHP

    Line_selection

    Time ) 8:31:14

  • 75 PDT

    User ) Lina

    Word_selection

    Year ) 2010

    PDT 40 .

    .

    [ 4-3]

    class class ${class_name} { function ${function_name}() { ${cursor}; }

    }

    Cln ${dollar}${new_obj} = clone ${dollar}${variable};${cursor}

    Closure function (${parameters}) use (${lexical_variables}) { ${cursor};}

    Cls class ${class_name} { function ${function_name}() { ${cursor}; }

    }

    Eco echo("${}");${cursor}

    Elif elseif (${condition}) { ${cursor};}

    Els else { ${cursor};}

    Fnc function ${function_name}() { ${cursor};}

    For for (${dollar}${index} = 0; ${dollar}${index} < ${number_variable}; ${dollar}${index}++) {

    ${line_selection}${cursor}}

  • 76 PDT

    Fore foreach (${dollar}${array_variable} as ${dollar}${variable}) { ${cursor};}

    Forek foreach (${dol lar}${array_var iable} as ${dol lar}${number_var iable} => ${dollar}${variable}) { ${cursor};}

    Function function ${function_name}() { ${cursor};}

    If if (${condition}) { ${cursor};}

    Inst if (${dollar}${variable} instanceof ${class}) { ${cursor};}

    Itdir ${dollar}${dirh} = opendir(${dirname});if (${dollar}${dirh}) { while (${dollar}${dir_element} = readdir(${dollar}${dirh})) { ${cursor}; }

    unset(${dollar}${dir_element}); closedir(${dollar}${dirh});}

    Iter for (${dol lar}${number_var iable} = 0 ; ${dol lar}${number_var iable} < count(${dollar}${array_variable}) ; ${dollar}${number_variable}++) { ${cursor};}

    Lambda function (${parameters}) use (${lexical_variables}) { ${cursor};}

    my_fa while (${dollar}${row} = mysql_fetch_array(${dollar}${query})) { ${cursor};}

    My_fo while (${dollar}${row} = mysql_fetch_object(${dollar}${query})) { ${cursor};}

    My_fr while (${dollar}${row} = mysql_fetch_row(${dollar}${query})) { ${cursor};}

    My_gc ob_start();

    ${cursor};

    ${dollar}${contents} = ob_get_contents();ob_end_clean();

    Ns namespace ${name};

  • 77 PDT

    Pclon parent::__clone();

    Pcon parent::__construct();${cursor}

    Pr print ${};${cursor}

    Prc print("${class_container}");${cursor}

    Prf print("${function_container}");${cursor}

    Prln print ${}."\n";${cursor}

    Prs print "${}";${cursor}

    Prv print("\${dollar}${variable} = ". ${dollar}${variable});${cursor}

    Swi switch (${dollar}${variable}) { case ${value}: ${cursor}; break;

    default: ;

    break;}

    Try try { ${cursor}} catch (${Exception} ${dollar}e) {

    }

    Use use ${namespace} as ${alias};

    While while (${condition}) { ${cursor};}

    4-5.

    (Mark Occurrences)

    .

    ,

    .

  • 78 PDT

    [ 4-14] . getNo() no $this -> no

    . private $no $no getNo() $this -> no,

    setNo() $this -> no .

    [ 4-14]

    , , ,

    . .

    /

    /

    break, continue

    throws, return HTML

    . .

    01. Window Preferences Preferences .

    02. PHP Editor Mark Occurrences .

  • 79 PDT

    [ 4-15]

    Mark occurrences of the selected element in

    the current file .

    [ 4-15] Annotations .

    [ 4-16] General Editors Text Editors Annotations

    , Annotation types PHP elements read occurrences PHP elements write

    occurrences .

    [ 4-16] Annotations

    4-6.

    PHP .php .php PHP

    PHP

    . PHP [ 4-17]

  • 80 PDT

    Next Finish

    .

    [ 4-17]

    PHP Editor [ 4-18]

    .

    [ 4-18]

    .php PHP

    .

    01. Window Preferences .

    02. Preferences General Content Types .

    [ 4-19] Content Types

  • 81 PDT

    03. Content Types Text PHP Content Type .

    04. Add . *. .

    [ 4-20]

    05. File associations .

    PHP PHP

    PDT .

    [ 4-4]

    PHP php6, inc, php, php3, php4, php5, phtml

    JavaScript js

    HTML htm, html, htpl, shtm, wml, xhtml

    XML xml, exsd, wsdl, xmi, xsd, xslt

    CSS css

    cfg, ini

    4-7.

    .

    .

    .

    PDT

  • 82 PDT

    ,

    .

    .

    PDT .

    [ 4-5]

    TODO , @todo

    FIXME

    XXX

    PHP .

  • 83 PDT

    [ 4-21] Tasks

    Tasks . [ 4-22]

    Tasks ! . Low, Normal,

    High .

    [ 4-22]

    Low ! , High

    . Normal . FIXME High

    .

    [ 4-23]

  • 84 PDT

    TODO, FIXME .

    Window Preferences PHP Editor Task Tags

    .

    [ 4-24]

    New New Task Tag Tag .

    Priority High, Normal, Low

    . Case sensitive task tag names

    .

    [ 4-25]

  • 85 PDT

    4-8. PHP

    php.net

    . PHP PHP

    .

    .

    PDT PHP

    . PDT PHP

    .

    PHP

    PHP .

    Window Preferences PHP PHP Manual

    php.net .

    [ 4-26] PHP

    +

    Open PHP Manual . [ 4-28]

    PHP .

  • 86 PDT

    [ 4-27]

    [ 4-28] PHP

    PHP

    PDT PHP URL . PHP.net

    PHP

    .

    PHP .

    01. Preferences PHP Manual .

    02. New .

  • 87 PDT

    03. New PHP Manual Site Name Remote Site(URL) http://www.php.net/manual/kr .

    [ 4-29] New PHP Manual Site

    04. OK .

    05. [ 4-30] Default .

    [ 4-30] PHP Manual

    06. OK . PHP .

    PHP

    .

    ? PDT

    PHP .

  • 88 PDT

    PHP

    .

    01. http://www.php.net/download-docs.php .

    02. Download documentation Many HTML files tag.gz . http://kr.php.net/

    distributions/manual/php_manual_kr.tar.gz .

    [ 4-31] PHP Manual HTML

    03. .

    04. Preferences PHP Manual New New PHP Manual Site .

    05. Local Directory PHP .

    [ 4-32] New PHP Manual Site

  • 89 PDT

    06. OK .

    07. PHP Default OK . PHP .

    [ 4-33] PDT PHP

    4-9.

    . .

    .

    01. .

    02. Add Bookmark .

    [ 4-34]

  • 90 PDT

    03. Add Bookmark OK . .

    [ 4-35]

    04. Bookmarks .

    [ 4-36] Bookmarks

    Bookmarks

    Go to .

    [ 4-37] Bookmarks

    4-10.

    PHP .

    .

    .

  • 91 PDT

    , . PDT

    ,

    .

    .

    Person User . User Person

    . .

    interface Person {

    public function getName();

    public function setName($name);

    }

    class User implements Person {

    private $name;

    public function getName()

    {

    return $this->name;

    }

    public function setName($name) {

    $this->name = $name;

    }

    }

    User

    Open Type Hierarchy

    .

    [ 4-38]

  • 92 PDT

    [ 4-39] Type Hierarchy . Type

    Hierarchy User Person Person

    User . User

    .

    [ 4-39] Type Hierarchy

    Type Hierarchy

    + Quick Type

    Hierarchy [ 4-40] .

    [ 4-40] Quick Type Hierarchy

    4-11.

    ,

    (Override)

    . /

  • 93 PDT

    .

    [ 4-41] User getName() Person

    . Person

    getName() .

    ,

    .

    [ 4-41] ( )

    [ 4-42] .

    .

    [ 4-42] ( )

  • 94 PDT

    4-12.

    PHP

    . PHP PHP

    . PHP

    ?

    .

    .

    PDT PHP

    . PHP

    [ 4-43] Problems .

    Problems , , .

    [ 4-43]

    Go to .

    [ 4-44] Problems

  • 95 PDT

    .

    [ 4-45]

    4-13.

    .

    [ 4-46] .

    .

    [ 4-46]

    Validator

    .

    .

    .

  • 96 PDT

    .

    Window Preferences General Editors Text Editors

    Spelling .

    [ 4-47]

    [ 4-5]

    Ignore words with digits

    Ignore mixed case words

    Ignore sentence capitalization

    Ignore upper case words

    Ignore internet address URL

    Ignore non-letters at word boundaries

    Ignore single letters

    Ignore Java string literals

    Ignore & in Java properties files &

  • 97 PDT

    4-14.

    .

    .

    .

    .

    Source Format .

    [ 4-48]

    4-15. PHP Include Path

    PHP PHP Include Path .

    PHP Explorer PHP Include Path ,

    PHP Include Path .

    [ 4-49] PHP Explorer PHP Include Path

  • 98 PDT

    PHP include() require()

    include_path . include_

    path php.ini , include_path include()

    include_path .

    include_path=/php_libs/; HelloWorld.php include(global.

    php); HelloWorld.php

    global.php /php_libs global.php

    . include(/php_libs/global.php); include(global.

    php); global.php

    .

    PDT include_path ?

    include_path . , www libs

    . www (View) , libs

    . www PHP

    libs PHP . PDT

    .

    www libs PDT

    . PDT

    PHP Include Path . PHP Include Path PHP

    . www libs ,

    , .

    www PostTest.php include(DB/Cubrid.php);

    . $CUBRID . +

    ? PostTest.php

  • 99 PDT

    DB/Cubrid.php libs

    .

    [ 4-50]

    PHP Include Path .

    01. PHP Explorer www Include Path Configure Include Path .

    [ 4-51] Include Path

  • 100 PDT

    02. PHP Include Path Add .

    [ 4-52] PHP Include Path

    03. Required Project Selection PHP Include Path PHP OK .

    [ 4-53]

    04. PHP OK .

    [ 4-54] Include Path

  • 101 PDT

    05. + PHP Explorer www PHP Include Path PHP .

    [ 4-55]

    PHP Include Path PHP PHAR

    . PHAR JAR PHP 5.3

    .

    [ 4-56] PHP Include Path