PHPackages                             germania-kg/salesmen - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. germania-kg/salesmen

ActiveLibrary

germania-kg/salesmen
====================

Work with Salesman IDs: Interfaces, Traits, FilterIterator

2.2.2(4y ago)0181[1 issues](https://github.com/GermaniaKG/Salesmen/issues)MITPHPPHP ^7.0

Since Jul 3Pushed 3y ago2 watchersCompare

[ Source](https://github.com/GermaniaKG/Salesmen)[ Packagist](https://packagist.org/packages/germania-kg/salesmen)[ RSS](/packages/germania-kg-salesmen/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (5)Versions (27)Used By (0)

Germania KG · Salesmen
======================

[](#germania-kg--salesmen)

[![Packagist](https://camo.githubusercontent.com/ba6fb55bc5f9112c6e08523bf166cf78d5419c67951851cae6d0748f444a8b9b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6765726d616e69612d6b672f73616c65736d656e2e7376673f7374796c653d666c6174)](https://packagist.org/packages/germania-kg/salesmen)[![PHP version](https://camo.githubusercontent.com/19110b6e0dba7f167914a97b8f609e8c6d02879a938a32cd7e86d872c202e06a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6765726d616e69612d6b672f73616c65736d656e2e737667)](https://packagist.org/packages/germania-kg/salesmen)[![Build Status](https://camo.githubusercontent.com/7c3778139e22dd3f556bb50b16c1235e9664867964538b74b12b9fa65b06e10d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4765726d616e69614b472f53616c65736d656e2e7376673f6c6162656c3d5472617669732532304349)](https://travis-ci.org/GermaniaKG/Salesmen)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5eeb0c9cb59e51c9a4ab6e876b0d5869d6c580e5efb54258605411a723348ada/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4765726d616e69614b472f53616c65736d656e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/GermaniaKG/Salesmen/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/9917dfbc4b86bd0b2909da4233fe5132fcda58f623b94b15f82e774a67f326b1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4765726d616e69614b472f53616c65736d656e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/GermaniaKG/Salesmen/?branch=master)[![Build Status](https://camo.githubusercontent.com/9cbc315c465a3c97078e01b09cfd3000edca726569011d7234d11dfe9f47e55b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4765726d616e69614b472f53616c65736d656e2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/GermaniaKG/Salesmen/build-status/master)

Installation
------------

[](#installation)

```
$ composer require germania-kg/salesmen
```

Interfaces
----------

[](#interfaces)

### SalesmanIdProviderInterface

[](#salesmanidproviderinterface)

```
public function getSalesmanId()
```

### SalesmanIdAwareInterface

[](#salesmanidawareinterface)

```
extends SalesmanIdProviderInterface
public function setSalesmanId( $id )
```

Traits
------

[](#traits)

### SalesmanIdProviderTrait

[](#salesmanidprovidertrait)

Objects using this trait will provide a `salesman_id` attribute and a `getSalesmanId` getter method, as outlined here:

```
public $salesman_id;
public function getSalesmanId()
```

### SalesmanIdAwareTrait

[](#salesmanidawaretrait)

Objects using this trait will provide anything that **SalesmanIdProviderTrait** provides, and additionally a setter method `setSalesmanId` which accepts anything; if **SalesmanIdProviderInterface** given here, *getSalesmanId* method will be called to obtain the ID to use. Roughly outlined:

```
use SalesmanIdProviderTrait;
public function setSalesmanId( $salesman )
```

Examples
--------

[](#examples)

```
