Loading config/module.config.php +1 −5 Changes for config/module.config.php: 1 added line, 5 removed lines. Original line number Diff line number Diff line <?php $settings = array( 'server' => 'zimbra-pp.unicaen.fr', 'port' => 7071, 'email' => 'david.surville@pp.unicaen.fr', 'password' => 'Zimbra14', 'domain' => 'pp.unicaen.fr', ); return array( Loading config/unicaen-zimbra.global.php.dist +5 −0 Changes for config/unicaen-zimbra.global.php.dist: 5 added lines, 0 removed lines. Original line number Diff line number Diff line <?php $settings = array( 'server' => 'zimbra-pp.unicaen.fr', 'port' => 7071, 'email' => 'david.surville@pp.unicaen.fr', 'password' => 'Zimbra14', 'domain' => 'pp.unicaen.fr', ); return array( Loading config/unicaen-zimbra.local.php.dist 0 → 100644 +13 −0 Changes for config/unicaen-zimbra.local.php.dist: 13 added lines, 0 removed lines. Original line number Diff line number Diff line <?php $settings = array( 'server' => 'zimbra-pp.unicaen.fr', 'port' => 7071, 'email' => 'david.surville@pp.unicaen.fr', 'password' => 'Zimbra14', 'domain' => 'pp.unicaen.fr', ); return array( 'unicaen-zimbra' => $settings ); No newline at end of file src/UnicaenZimbra/Entity/Entity.php +5 −3 Changes for src/UnicaenZimbra/Entity/Entity.php: 5 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -11,8 +11,8 @@ namespace UnicaenZimbra\Entity; use \SimpleXMLElement; use \Exception as CommonException; use SimpleXMLElement; use Exception; abstract class Entity { Loading Loading @@ -143,7 +143,7 @@ abstract class Entity public function __set($name, $value) { if ('id' == $name){ throw new CommonException('Il est impossible de changer un identifiant d\'objet.'); throw new Exception('Il est impossible de changer un identifiant d\'objet.'); } $this->data[$name] = $value; if ('name' == $name){ Loading Loading @@ -227,11 +227,13 @@ abstract class Entity /** * * @param string $name * @return self */ public function setName( $name ) { $this->name = (string)$name; $this->data['name'] = $name; return $this; } } src/UnicaenZimbra/Entity/Filter/Action/Action.php +67 −1 Changes for src/UnicaenZimbra/Entity/Filter/Action/Action.php: 67 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -7,8 +7,74 @@ * @license http://www.gnu.org/licenses/gpl.txt */ namespace UnicaenZimbra\Entity\Filter; namespace UnicaenZimbra\Entity\Filter\Action; use SimpleXMLElement; use Exception; abstract class Action { private static $classRoot = 'UnicaenZimbra\\Entity\\Filter\\Action\\'; /** * Retourne le type d'action */ public function getType() { return 'action'.substr(get_class($this), strlen(self::$classRoot)); } /** * Crée une action à partir d'un nœud XML * * @param SimpleXMLElement $node * @return self * @throws Exception */ public static function factory( SimpleXMLElement $node ) { $nodeName = $node->getName(); /* * On retire "action" du nom * Exemple : $nodeName = actionFileInto donnera $className = FileInto */ $className = substr( $nodeName, 6 ); /* * On recherche si le fichier de classe existe ou non * * Si non alors on lève une exception car le test demandé n'est pas implémenté ou il y a a erreur */ $fileName = __DIR__.'/'.$className.'.php'; if (! file_exists($fileName) ){ throw new Exception( 'Type d\'action de filtre "'.$nodeName.'" non pris en charge.'); } $className = self::$classRoot.$className; $action = new $className; $action->populate( $node ); return $action; } abstract protected function populate( SimpleXMLElement $node ); /** * Retourne les propriétés de l'objet courant sous forme de tableau */ abstract public function getArrayCopy(); /** * Retourne la liste des changements intervenus * * Les changements n'étant pas logués, toutes les données sont retournées * * @return array */ public function getConvertedChanges(){ $result = $this->getArrayCopy(); return $result; } } No newline at end of file Loading
config/module.config.php +1 −5 Changes for config/module.config.php: 1 added line, 5 removed lines. Original line number Diff line number Diff line <?php $settings = array( 'server' => 'zimbra-pp.unicaen.fr', 'port' => 7071, 'email' => 'david.surville@pp.unicaen.fr', 'password' => 'Zimbra14', 'domain' => 'pp.unicaen.fr', ); return array( Loading
config/unicaen-zimbra.global.php.dist +5 −0 Changes for config/unicaen-zimbra.global.php.dist: 5 added lines, 0 removed lines. Original line number Diff line number Diff line <?php $settings = array( 'server' => 'zimbra-pp.unicaen.fr', 'port' => 7071, 'email' => 'david.surville@pp.unicaen.fr', 'password' => 'Zimbra14', 'domain' => 'pp.unicaen.fr', ); return array( Loading
config/unicaen-zimbra.local.php.dist 0 → 100644 +13 −0 Changes for config/unicaen-zimbra.local.php.dist: 13 added lines, 0 removed lines. Original line number Diff line number Diff line <?php $settings = array( 'server' => 'zimbra-pp.unicaen.fr', 'port' => 7071, 'email' => 'david.surville@pp.unicaen.fr', 'password' => 'Zimbra14', 'domain' => 'pp.unicaen.fr', ); return array( 'unicaen-zimbra' => $settings ); No newline at end of file
src/UnicaenZimbra/Entity/Entity.php +5 −3 Changes for src/UnicaenZimbra/Entity/Entity.php: 5 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -11,8 +11,8 @@ namespace UnicaenZimbra\Entity; use \SimpleXMLElement; use \Exception as CommonException; use SimpleXMLElement; use Exception; abstract class Entity { Loading Loading @@ -143,7 +143,7 @@ abstract class Entity public function __set($name, $value) { if ('id' == $name){ throw new CommonException('Il est impossible de changer un identifiant d\'objet.'); throw new Exception('Il est impossible de changer un identifiant d\'objet.'); } $this->data[$name] = $value; if ('name' == $name){ Loading Loading @@ -227,11 +227,13 @@ abstract class Entity /** * * @param string $name * @return self */ public function setName( $name ) { $this->name = (string)$name; $this->data['name'] = $name; return $this; } }
src/UnicaenZimbra/Entity/Filter/Action/Action.php +67 −1 Changes for src/UnicaenZimbra/Entity/Filter/Action/Action.php: 67 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -7,8 +7,74 @@ * @license http://www.gnu.org/licenses/gpl.txt */ namespace UnicaenZimbra\Entity\Filter; namespace UnicaenZimbra\Entity\Filter\Action; use SimpleXMLElement; use Exception; abstract class Action { private static $classRoot = 'UnicaenZimbra\\Entity\\Filter\\Action\\'; /** * Retourne le type d'action */ public function getType() { return 'action'.substr(get_class($this), strlen(self::$classRoot)); } /** * Crée une action à partir d'un nœud XML * * @param SimpleXMLElement $node * @return self * @throws Exception */ public static function factory( SimpleXMLElement $node ) { $nodeName = $node->getName(); /* * On retire "action" du nom * Exemple : $nodeName = actionFileInto donnera $className = FileInto */ $className = substr( $nodeName, 6 ); /* * On recherche si le fichier de classe existe ou non * * Si non alors on lève une exception car le test demandé n'est pas implémenté ou il y a a erreur */ $fileName = __DIR__.'/'.$className.'.php'; if (! file_exists($fileName) ){ throw new Exception( 'Type d\'action de filtre "'.$nodeName.'" non pris en charge.'); } $className = self::$classRoot.$className; $action = new $className; $action->populate( $node ); return $action; } abstract protected function populate( SimpleXMLElement $node ); /** * Retourne les propriétés de l'objet courant sous forme de tableau */ abstract public function getArrayCopy(); /** * Retourne la liste des changements intervenus * * Les changements n'étant pas logués, toutes les données sont retournées * * @return array */ public function getConvertedChanges(){ $result = $this->getArrayCopy(); return $result; } } No newline at end of file