Model/Tag.php
changeset 8 7d2fb5d7c9ff
parent 5 45378793512a
child 11 5f038a505cd7
equal deleted inserted replaced
7:7a877de630fd 8:7d2fb5d7c9ff
     7  * For the full copyright and license information, please view the LICENSE
     7  * For the full copyright and license information, please view the LICENSE
     8  * file that was distributed with this source code.
     8  * file that was distributed with this source code.
     9  */
     9  */
    10  namespace IRI\Bundle\WikiTagBundle\Model;
    10  namespace IRI\Bundle\WikiTagBundle\Model;
    11  
    11  
    12  abstract class Tag implements TagInterface {
    12  use IRI\Bundle\WikiTagBundle\Utils\WikiTagUtils;
       
    13 
       
    14 abstract class Tag implements TagInterface {
    13     
    15     
    14     public static $TAG_URL_STATUS_DICT = array('null_result'=>0,'redirection'=>1,'homonyme'=>2,'match'=>3);
    16     public static $TAG_URL_STATUS_DICT = array('null_result'=>0,'redirection'=>1,'homonyme'=>2,'match'=>3);
    15      
    17      
    16     /**
    18     /**
    17      * @var integer $id
    19      * @var integer $id
    85      * @param string $label
    87      * @param string $label
    86      */
    88      */
    87     public function setLabel($label)
    89     public function setLabel($label)
    88     {
    90     {
    89         $this->label = $label;
    91         $this->label = $label;
       
    92         $this->normalizedLabel = WikiTagUtils::normalizeTag($label);
    90     }
    93     }
    91 
    94 
    92     /**
    95     /**
    93      * Get label
    96      * Get label
    94      *
    97      *