Commit 38198658 authored by David Surville's avatar David Surville
Browse files

Copie de la branche tags/1.0.4 dans trunk

parents a193a2d9 c881be34
Loading
Loading
Loading
Loading
+30 −0
Changes for src/UnicaenZimbra/Entity/DistributionList.php: 30 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -8,6 +8,36 @@

namespace UnicaenZimbra\Entity;

use SimpleXMLElement;

class DistributionList extends Entity
{
     public function populate( SimpleXMLElement $object )
    {
        $this->data = array();
        $this->data['id'] = (string) $object['id'];
        $this->data['name'] = (string) $object['name'];
        $this->id = (string) $object['id'];
        $this->name = (string) $object['name'];

        foreach ($object->children()->a as $data) {
            $key = (string) $data['n'];

            if (isset($this->data[$key])) {     // store multiple attributes in an array
                $this->data[$key] = (array) $this->data[$key];
                $this->data[$key][] = self::convertFromXml($data);
            } else {
                $this->data[$key] = self::convertFromXml($data);
            }
        }
	
	foreach($object->children()->dlm as $member) {
	    if (isset($this->data['members'])) {     // store multiple attributes in an array
                $this->data['members'] = (array) $this->data['members'];
                $this->data['members'][] = self::convertFromXml($member);
            } else {
                $this->data['members'] = (array) self::convertFromXml($member);
            }
	}
    }
}
+36 −0
Changes for src/UnicaenZimbra/Entity/Filter/Action/Discard.php: 36 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php
namespace UnicaenZimbra\Entity\Filter\Action;

use SimpleXMLElement;

/**
 * @version    $Id$
 * 
 * Action discard pour filtre Zimbra
 * 
 * @author     David Surville <david.surville at unicaen.fr>
 */
class Discard extends Action
{

    /**
     *
     * @param SimpleXMLElement $node
     * @return self
     */
    protected function populate( SimpleXMLElement $node )
    {
        /* Aucune propriété particulière n'est requise */
        return $this;
    }

    /**
     * Retourne la liste des propriétés de l'objet sous forme de tableau associatif
     *
     * @return array
     */
    public function getArrayCopy()
    {
        return array();
    }
}
+69 −0
Changes for src/UnicaenZimbra/Entity/Filter/Action/Flag.php: 69 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php
namespace UnicaenZimbra\Entity\Filter\Action;

use SimpleXMLElement;


/**
 * @version    $Id$
 * 
 * Action flag pour filtre Zimbra
 * 
 * @author     David Surville <david.surville at unicaen.fr>
 */
class Flag extends Action
{

    /**
     * Nom du flag
     *
     * @var string
     */
    protected $flagName;


    /**
     * Retourne le nom du flag
     *
     * @return string
     */
    public function getFlagName()
    {
        return $this->flagName;
    }

    /**
     * Définie le nom du flag
     *
     * @param string $flagName
     * @return self
     */
    public function setFlagName( $flagName )
    {
        $this->flagName = $flagName;
        return $this;
    }

    /**
     *
     * @param SimpleXMLElement $node
     * @return self
     */
    protected function populate( SimpleXMLElement $node )
    {
        $this->setFlagName((string)$node['flagName']);
        return $this;
    }

    /**
     * Retourne la liste des propriétés de l'objet sous forme de tableau associatif
     *
     * @return array
     */
    public function getArrayCopy()
    {
        return array(
            'flagName' => $this->getFlagName(),
        );
    }
}
 No newline at end of file
+1 −1
Changes for src/UnicaenZimbra/Entity/Filter/Action/Keep.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ use SimpleXMLElement;
/**
 * @version    $Id$
 * 
 * Action de keep pour filtre Zimbra
 * Action keep pour filtre Zimbra
 * 
 * @author     David Surville <david.surville at unicaen.fr>
 */
+69 −0
Changes for src/UnicaenZimbra/Entity/Filter/Action/Redirect.php: 69 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php
namespace UnicaenZimbra\Entity\Filter\Action;

use SimpleXMLElement;


/**
 * @version    $Id$
 * 
 * Action redirect pour filtre Zimbra
 * 
 * @author     David Surville <david.surville at unicaen.fr>
 */
class Redirect extends Action
{

    /**
     * Adresse mail du destinataire
     *
     * @var string
     */
    protected $a;


    /**
     * Retourne le nom du destinataire
     *
     * @return string
     */
    public function getA()
    {
        return $this->a;
    }

    /**
     * Définie le nom du destinataire
     *
     * @param string $a
     * @return self
     */
    public function setA( $a )
    {
        $this->a = $a;
        return $this;
    }

    /**
     *
     * @param SimpleXMLElement $node
     * @return self
     */
    protected function populate( SimpleXMLElement $node )
    {
        $this->setA((string)$node['a']);
        return $this;
    }

    /**
     * Retourne la liste des propriétés de l'objet sous forme de tableau associatif
     *
     * @return array
     */
    public function getArrayCopy()
    {
        return array(
            'a' => $this->getA(),
        );
    }
}
 No newline at end of file
Loading