public function addAsset($asset, $state)
    {
        switch ($state) {
            case self::STATE_PUBLIC:
                return $this->addPublicAsset($asset);
            case self::STATE_PROTECTED:
                return $this->addProtectedAsset($asset);
            case self::STATE_DELETED:
                return $this->addDeletedAsset($asset);
            default:
                throw new \InvalidArgumentException("Invalid state {$state}");
        }
    }
public function addAsset($asset, $state)
    {
        switch ($state) {
            case self::STATE_PUBLIC:
                return $this->addPublicAsset($asset);
            case self::STATE_PROTECTED:
                return $this->addProtectedAsset($asset);
            case self::STATE_DELETED:
                return $this->addDeletedAsset($asset);
            default:
                throw new \InvalidArgumentException("Invalid state {$state}");
        }
    }
public function addAsset ( $ asset , $ state ) { switch ( $ state ) { case self :: STATE_PUBLIC : return $ this -> addPublicAsset ( $ asset ) ; case self :: STATE_PROTECTED : return $ this -> addProtectedAsset ( $ asset ) ; case self :: STATE_DELETED : return $ this -> addDeletedAsset ( $ asset ) ; default : throw new \ InvalidArgumentException ( "Invalid state {$state}" ) ; } }
Add asset with the given state

@param array $asset Asset tuple
@param string $state One of the STATE_* const vars
@return bool True if the asset was added to the set matching the given state
Add asset with the given state