Introducción a Zend Framework

 Aprendiendo Zend Framework

Apéndice

 Referencia de Zend Framework


  • Zend_Gdata
  • Zend_Http
  • Zend_InfoCard
  • Zend_Json
  • Zend_Layout
  • Zend_Ldap
  • Zend_Loader
  • Zend_Locale
  • Zend_Log
  • Zend_Mail
  • Zend_Markup
  • Zend_Measure
  • Zend_Memory
  • Zend_Mime
  • Zend_Navigation
  • Zend_Oauth
  • Zend_OpenId
  • Zend_Paginator
  • Zend_Pdf
  • Zend_ProgressBar
  • Zend_Queue
  • Zend_Reflection
  • Zend_Registry
  • Zend_Rest

  • Zend_Search_Lucene
  • Zend_Serializer
  • Zend_Server
  • Zend_Service
  • Zend_Session
  • Zend_Soap
  • Zend_Tag
  • Zend_Test
  • Zend_Text
  • Zend_TimeSync
  • Zend_Tool
  • Zend_Tool_Framework
  • Zend_Tool_Project
  • Zend_Translate
  • Zend_Uri
  • Zend_Validate
  • Zend_Version
  • Zend_View
  • Zend_Wildfire
  • Zend_XmlRpc
  • ZendX_Console_Process_Unix
  • ZendX_JQuery
  • Traducción al 26.9% - Actualizado el 2011-11-16 - Revisión 24249 - Versión ZF 1.11.x

    41.7. Serializing LDAP data to and from LDIF

    41.7.1. Serialize a LDAP entry to LDIF

    $data = array(
        
    'dn'                         => 'uid=rogasawara,ou=営業部,o=Airius',
        
    'objectclass'                => array('top',
                                              
    'person',
                                              
    'organizationalPerson',
                                              
    'inetOrgPerson'),
        
    'uid'                        => array('rogasawara'),
        
    'mail'                       => array('rogasawara@airius.co.jp'),
        
    'givenname;lang-ja'          => array('ロドニー'),
        
    'sn;lang-ja'                 => array('小笠原'),
        
    'cn;lang-ja'                 => array('小笠原 ロドニー'),
        
    'title;lang-ja'              => array('営業部 部長'),
        
    'preferredlanguage'          => array('ja'),
        
    'givenname'                  => array('ロドニー'),
        
    'sn'                         => array('小笠原'),
        
    'cn'                         => array('小笠原 ロドニー'),
        
    'title'                      => array('営業部 部長'),
        
    'givenname;lang-ja;phonetic' => array('ろどにー'),
        
    'sn;lang-ja;phonetic'        => array('おがさわら'),
        
    'cn;lang-ja;phonetic'        => array('おがさわら ろどにー'),
        
    'title;lang-ja;phonetic'     => array('えいぎょうぶ ぶちょう'),
        
    'givenname;lang-en'          => array('Rodney'),
        
    'sn;lang-en'                 => array('Ogasawara'),
        
    'cn;lang-en'                 => array('Rodney Ogasawara'),
        
    'title;lang-en'              => array('Sales, Director'),
    );
    $ldif Zend_Ldap_Ldif_Encoder::encode($data, array('sort' => false,
                                                        
    'version' => null));
    /*
    $ldif contains:
    dn:: dWlkPXJvZ2FzYXdhcmEsb3U95Za25qWt6YOoLG89QWlyaXVz
    objectclass: top
    objectclass: person
    objectclass: organizationalPerson
    objectclass: inetOrgPerson
    uid: rogasawara
    mail: rogasawara@airius.co.jp
    givenname;lang-ja:: 44Ot44OJ44OL44O8
    sn;lang-ja:: 5bCP56yg5Y6f
    cn;lang-ja:: 5bCP56yg5Y6fIOODreODieODi+ODvA==
    title;lang-ja:: 5Za25qWt6YOoIOmDqOmVtw==
    preferredlanguage: ja
    givenname:: 44Ot44OJ44OL44O8
    sn:: 5bCP56yg5Y6f
    cn:: 5bCP56yg5Y6fIOODreODieODi+ODvA==
    title:: 5Za25qWt6YOoIOmDqOmVtw==
    givenname;lang-ja;phonetic:: 44KN44Gp44Gr44O8
    sn;lang-ja;phonetic:: 44GK44GM44GV44KP44KJ
    cn;lang-ja;phonetic:: 44GK44GM44GV44KP44KJIOOCjeOBqeOBq+ODvA==
    title;lang-ja;phonetic:: 44GI44GE44GO44KH44GG44G2IOOBtuOBoeOCh+OBhg==
    givenname;lang-en: Rodney
    sn;lang-en: Ogasawara
    cn;lang-en: Rodney Ogasawara
    title;lang-en: Sales, Director
    */

    41.7.2. Deserialize a LDIF string into a LDAP entry

    $ldif "dn:: dWlkPXJvZ2FzYXdhcmEsb3U95Za25qWt6YOoLG89QWlyaXVz
    objectclass: top
    objectclass: person
    objectclass: organizationalPerson
    objectclass: inetOrgPerson
    uid: rogasawara
    mail: rogasawara@airius.co.jp
    givenname;lang-ja:: 44Ot44OJ44OL44O8
    sn;lang-ja:: 5bCP56yg5Y6f
    cn;lang-ja:: 5bCP56yg5Y6fIOODreODieODi+ODvA==
    title;lang-ja:: 5Za25qWt6YOoIOmDqOmVtw==
    preferredlanguage: ja
    givenname:: 44Ot44OJ44OL44O8
    sn:: 5bCP56yg5Y6f
    cn:: 5bCP56yg5Y6fIOODreODieODi+ODvA==
    title:: 5Za25qWt6YOoIOmDqOmVtw==
    givenname;lang-ja;phonetic:: 44KN44Gp44Gr44O8
    sn;lang-ja;phonetic:: 44GK44GM44GV44KP44KJ
    cn;lang-ja;phonetic:: 44GK44GM44GV44KP44KJIOOCjeOBqeOBq+ODvA==
    title;lang-ja;phonetic:: 44GI44GE44GO44KH44GG44G2IOOBtuOBoeOCh+OBhg==
    givenname;lang-en: Rodney
    sn;lang-en: Ogasawara
    cn;lang-en: Rodney Ogasawara
    title;lang-en: Sales, Director"
    ;
    $data Zend_Ldap_Ldif_Encoder::decode($ldif);
    /*
    $data = array(
        'dn'                         => 'uid=rogasawara,ou=営業部,o=Airius',
        'objectclass'                => array('top',
                                              'person',
                                              'organizationalPerson',
                                              'inetOrgPerson'),
        'uid'                        => array('rogasawara'),
        'mail'                       => array('rogasawara@airius.co.jp'),
        'givenname;lang-ja'          => array('ロドニー'),
        'sn;lang-ja'                 => array('小笠原'),
        'cn;lang-ja'                 => array('小笠原 ロドニー'),
        'title;lang-ja'              => array('営業部 部長'),
        'preferredlanguage'          => array('ja'),
        'givenname'                  => array('ロドニー'),
        'sn'                         => array('小笠原'),
        'cn'                         => array('小笠原 ロドニー'),
        'title'                      => array('営業部 部長'),
        'givenname;lang-ja;phonetic' => array('ろどにー'),
        'sn;lang-ja;phonetic'        => array('おがさわら'),
        'cn;lang-ja;phonetic'        => array('おがさわら ろどにー'),
        'title;lang-ja;phonetic'     => array('えいぎょうぶ ぶちょう'),
        'givenname;lang-en'          => array('Rodney'),
        'sn;lang-en'                 => array('Ogasawara'),
        'cn;lang-en'                 => array('Rodney Ogasawara'),
        'title;lang-en'              => array('Sales, Director'),
    );
    */
    digg delicious meneame google twitter technorati facebook

    Comentarios

    Loading...